Skip to content

docs(adr): ADR-0150 addendum — knowledge_source joins the package-scoped bucket beside skill and ai_context - #37330

Merged
os-zhuang merged 3 commits into
mainfrom
claude/project-thread-4uapwf
Nov 25, 2026
Merged

os-zhuang merged 3 commits into
mainfrom
claude/project-thread-4uapwf

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Warren · project thread

repo:cloud#1 · os-warren · session_01JQwxbZjKjZ947xtTvgJuHX

Fixes #37325

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:用户无感(只改决定记录,不改代码);把你今天定的「按应用+名字区分,都保留」写进记录:两个应用各带的同名知识源都保留、各建各的索引,AI 用「应用前缀-名字」指明是哪一个。
  • 为什么做:属于「知识检索平台化」专题;哪些类型按应用区分要先写进记录,后面的实现卡 knowledge_source: admit the governed metadata type with its loader — registry, stack collection, ADR-0087 renames and retirements, the two authoring guards, one name per source #37304(让知识源成为应用包里的一份配置)才能照着做。
  • 出错会怎样:记录写偏的话,后面的实现会照着偏的做;这次只有文档,撤回这次合并即可。
  • 要你做什么:合并这个 PR,合并就是这条裁定的记录;其中一处超出你的原话、只能由你定:同一个应用前缀下不允许两个应用包带同名知识源(前缀不同的同名知识源照样都保留),不同意就先划掉这一条再合并。

What changes

Two files under docs/adr/: 58 lines added, 1 line changed. No schema, no code, no changeset.

ADR-0150 (Accepted) gains a dated addendum. No ruled sentence is rewritten.

  • The status line gains one Amended clause, dated 2026-11-25, after the ai_context one. This is the one changed line: the clause is appended, and nothing before it is edited.
  • The D1 table gains one row, marked with the date, after the ai_context row and before bucket 4.
  • A new section after the ai_context addendum and before D2, "Addendum (2026-11-25): knowledge_source joins bucket 3". It writes the maintainer's ruling of that day into the record: the knowledge source type of ADR-0161 K4 is identified by (package, name), in bucket 3 beside skill and ai_context.

The ruling is quoted with its record id in the status clause, at the head of the addendum and in the ADR-0161 note: seat record 7168239918 on the code card, decision card tapped B 「按应用+名字区分,都保留」 at 2026-11-25T16:34:09Z, against the card's recommendation.

The addendum says, in this order:

  1. The type, and what D2, D3, D4, D5, D6 and D8 mean for it. A package's source is spelled NS-NAME where its name crosses the AI face, which is inside search_knowledge: the sources list of an answer and the sourceIds argument.
  2. The principle, read for this type. The recommendation read a source's name under D1's storage half. The ruling did not, so the keys of a source's index are derived from its identity, as its face is. Three things that reading does not hide are listed.
  3. The tree today, measured on main at fbb62e1c. The type is not registered and is in none of the four lists. A source reaches the service through code only. The keys of an index are the bare id.
  4. What changes with the bucket: the service's copy, overlays, owner stamps, uninstall and the keys of an index.
  5. The readers that move. It names five and moves none.
  6. The follow-up, the code card knowledge_source: admit the governed metadata type with its loader — registry, stack collection, ADR-0087 renames and retirements, the two authoring guards, one name per source #37304, after this merge.
  7. Past the ruling's words: seven points, none decided here. One is the maintainer's, two follow from text already ruled, and four are left open for the code card.

ADR-0161 gains one cross-reference note after point 3 of K4 and before K5. No sentence of it is changed.

Not in this PR, by the card's contract: none of the four lists is edited, no reader is moved and no store is re-keyed. That is the code card's work, after this merge.

Tests

No package is touched, so no package build or test is owed. The checks that read these two files are the docs gates under Verification.

Acceptance notes

  • The chain. This PR is the ruling's record and step 1 of its execution. The code card knowledge_source: admit the governed metadata type with its loader — registry, stack collection, ADR-0087 renames and retirements, the two authoring guards, one name per source #37304 comes after it and stays open: it takes the four lists, the readers and the store keying in memory, pgvector and turso.
  • One decision is the maintainer's alone (point 1 of "Past the ruling's words"). The ruling record counts "the domain:server four lists and readers (precedent PR feat(core,objectql,spec,service-record-context,mcp,runtime)!: a context pack is identified by its package and its name; get_record_context selects a pack by its face on both MCP doors #37291)" and names none of them. In that PR the fourth list is NAMESPACE_UNIQUE_TYPES: one package holder of a name inside one namespace, refused at install and in os validate. So "Two packages shipping one source name both work" holds for two namespaces, and inside one namespace the second is refused. The list's header reserves a further type to the maintainer. The merge accepts this point. Struck, two co-owners of a namespace may ship one name, and the one face they derive is refused at the call.
  • Two points follow from text already ruled and are no new decision. A source name takes the name grammar of buckets 2 and 3, which refuses a _-led name that today's id pattern admits. And a 409 names only the sources the tool may search (ADR-0161 K9).
  • Four points are left open for the code card. Each is stated in the addendum and decided nowhere in it: what each shape carries (a hit's sourceId and documentId, a stored document's sourceId, the by-name members of the service contract); which coordinate a key carries, the package id or the namespace, and what removes an index left under the old key; which holder a source registered in code is; and an environment source under a name a package later ships.
  • The acceptance line of the card, "The addendum quotes the ruling comment id and the maintainer's words; earlier text of the record unchanged". The id and the words are in all three places named above. ADR-0150's diff has one changed line, the status line, and its old text is a strict prefix of the new text. Every other old line of both files survives, in order.
  • The tree moved once during the work. main gained the knowledge splitter (PR feat(service-knowledge)!: one splitter (whole / recursive / markdown, Chinese-aware), the chunk channel and the split key; KnowledgeChunk.metadata and knowledge.chunk_overlap retired #37287) under six of the files the addendum anchors. main is merged into the branch (a merge commit, no rebase and no force-push). Every "today" sentence and every anchor was read again at fbb62e1c, and all hold. The two dated readings name that commit.
  • Overlap. PR docs(adr): ADR-0161 dated note — item 17, the typed scope a search hands its adapter: record ids, or a parent object through a listed lookup #37329 adds a dated note under K8 of the same ADR-0161 file. node scripts/pm/overlap-check.mjs --branch=claude/project-thread-4uapwf answered VERDICT clean exit 0 at this head, against origin/main and that PR's head. Whichever of the two lands second merges main.
  • Line budget. 58 added and 1 changed; the precedent PR docs(adr): ADR-0150 addendum — ai_context joins the package-scoped bucket beside skill #37209 was 44 and 1. The difference is the "principle" paragraph, which the precedent did not need because its ruling followed the recommendation, and the seven-point list.
  • Citation form. check:adr-symbol-anchors refuses a line anchor under docs/adr/, so the record cites path#Symbol, and the line numbers are in the table under Verification.
  • No changeset. docs/adr/ ships in no package, so this PR carries skip-changeset.
  • Tier H. This PR stays draft. The merge is the maintainer's, and it is the ruling's record.
  • Shallow checkout. No claim here is read from history dates.
  • Attribution lines. The dispatch asked for a commit trailer that names a model and for the harness's two-line block at the end of this body. The repository's rules ask for the model-free trailer pair and for one footer line under a rule, and those are what the commits and this body carry.
  • Noted, not filed. ADR-0161's status keyword still reads Proposed on main, and its own status line says the record is in force from the merge of the PR that carried it. This PR adds one note to that record and does not touch its status line.

Verification

Read first, by risk:

  1. docs/adr/0150-…-literal-prefix.md, "Past the ruling's words" at the end of the addendum (lines 191 to 199). Point 1 is the one decision that is the maintainer's.
  2. The same file, "The principle, read for this type" (line 160): how D1's storage half reads for a type the ruling placed against the recommendation.
  3. The same file, the D1 table hunk (line 95) and the status line (line 3): one row inserted into a ruled table and one appended clause. Check that both read as additions and change no ruled text.

Two-minute check: run node scripts/check-adr-symbol-anchors.mjs. Expect 4220 anchors across 163 records resolve and exit 0. Twenty-one of them are this diff's path#Symbol anchors.

Measured anchors on main at fbb62e1 (file:line)
What the addendum says Where it is read
The type is in no row of the registry; skill and ai_context open no environment overlay packages/spec/src/kernel/metadata-plugin.zod.ts:798 (DEFAULT_METADATA_TYPE_REGISTRY), :1384, :1388
The service keeps one slot per (package, name) for listed types packages/spec/src/api/protocol.zod.ts:2753 (PACKAGE_SLOTTED_METADATA_TYPES; skill at :2754)
Any other type is keyed by name alone packages/metadata/src/package-slotted-store.ts:797 (storeWriteKey), :820
The one rule resolves only its listed types, and throws for a type outside the list packages/core/src/package-scoped-resolution.ts:245 (PACKAGE_SCOPED_TYPES; skill at :270), :740; packages/objectql/src/package-scoped-resolver.ts:149
A by-name read consults (package, name) for listed types packages/objectql/src/package-scoped-read.ts:88 (PACKAGE_SCOPED_READ_TYPES; skill at :96)
One package holder of a name inside a namespace; the list is reserved to the maintainer packages/objectql/src/namespace-co-owner-names.ts:96 (NAMESPACE_UNIQUE_TYPES), :27
A source reaches the service through code only packages/services/service-knowledge/src/knowledge-service-plugin.ts:91 (KnowledgeServicePlugin), :44, :220
One map by id; a second registration replaces the first with a warning packages/services/service-knowledge/src/knowledge-service.ts:121 (KnowledgeService), :123, :166, :168
A document id is the source's id, a : and the record id packages/services/service-knowledge/src/knowledge-service.ts:1570 (documentIdFor), :1571
An adapter is handed the whole source packages/spec/src/contracts/knowledge-adapter.ts:33 (AdapterContext), :35
The one in-tree store keyed by the bare id packages/plugins/knowledge-memory/src/index.ts:44 (KnowledgeMemoryAdapter), :48, :55
The push door that takes a document id from a caller packages/spec/src/contracts/knowledge-service.ts:107 (IKnowledgeService), :127
The tool lists each source by its id; a hit shows sourceId and documentId packages/services/service-knowledge/src/knowledge-tools.ts:61 (SearchKnowledgeSourceSummary), :70, :72, :222
An unknown sourceIds entry is refused NOT_FOUND packages/services/service-knowledge/src/knowledge-tools.ts:246 (createKnowledgeTools), :257, :260
Today's id pattern admits a _-led name; the bucket's pattern does not packages/spec/src/ai/knowledge-source.zod.ts:174 (KnowledgeSourceSchema), :176; packages/spec/src/kernel/address-grammar.ts:68 (ROUTER_ADDRESSABLE_NAME_PATTERN)
The one face derivation packages/spec/src/ai/face-name.ts:86 (deriveAiFaceName)
A skill prompt's name: a face, else a bare name by the one rule packages/mcp/src/skill-prompts.ts:373 (lookupSkillPrompt)
The owner stamp's judge, and the collections it judges packages/spec/src/kernel/collection-item-owner-stamp.ts:129 (judgeCollectionItemOwnerStamp), :100
The type's row is not among the served overrides packages/metadata-protocol/src/protocol-package-bindings.ts:388 (SEALED_ROW_SERVED_OVERRIDE_TYPES)
Uninstall, the registry's half packages/objectql/src/registry.ts:5328 (uninstallPackage)
Uninstall, the service's half packages/metadata/src/metadata-manager.ts:2880 (unregisterPackage)

Absence readings at the same commit, each with a positive control:

  • knowledge_source in the four list files, in packages/metadata/src/package-slotted-store.ts and in the registry's rows: 0 lines each. Control: skill is in the first three lists and in the registry, at the lines the table gives.
  • A stack collection: knowledgeSources in packages/spec/src/stack.zod.ts, 0 lines. Control: aiContexts, 3 lines.
  • knowledge_source under packages/, examples/, ui/, skills/ and content/: 0 files. Control: ai_context, 60 files.
  • KnowledgeServicePlugin or registerSource under examples/: 0 files. Control: 25 files under packages/.
  • Tracked paths under knowledge-pgvector or knowledge-turso: 0. Control: packages/plugins/knowledge-memory, 10 files.
  • Before this diff, ADR-0161 named ADR-0150 on 0 lines (control: ADR-0088, 7 lines), and ADR-0150 held the word "knowledge" on 0 lines (control: ai_context, 6 lines).
Local gates at head 05f35b6: 21 derived, 21 run, all exit 0

Derived with node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands, and reconciled with --ran:

Run reconciliation — 21 derived, 21 run, 0 NOT-MEASURED, 0 UNRUN.
✓ dispatch-gates --ran: 21 derived famil(ies) accounted for — 21 run, 0 NOT-MEASURED (a DERIVED zero — all 21 recorded an exit code and none of them is 3).

Each exit code was captured before any pipe:

0  node scripts/check-adr-links.mjs                      1225 relative link destination(s) under docs/adr/ resolve
0  node scripts/check-adr-links.mjs --self-test
0  node scripts/check-closing-keyword-parity.mjs         3 parsers agree on all 9 keywords
0  node scripts/check-closing-keyword-parity.mjs --self-test
0  node scripts/check-comment-mask-corpus.mjs            23929 files, 0 disagree, 0 unparseable
0  node scripts/ci/plan-test-core-shards.mjs --self-test
0  pnpm --filter @objectstack/lint run check:doc-formula-expressions
0  pnpm check:adr-anchors                                132 anchored file(s), every governing ADR still referenced
0  pnpm check:adr-index                                  docs/adr/README.md is current, every record parsed
0  pnpm check:adr-symbol-anchors                         4220 anchors across 163 records resolve
0  pnpm check:ci-filter-parity
0  pnpm check:closed-ceremony-text
0  pnpm check:cross-package-test-inputs
0  pnpm check:doc-authoring
0  pnpm check:driver-memory-census
0  pnpm check:gitlink-declared
0  pnpm check:nul-bytes                                  no raw ASCII control bytes
0  pnpm check:pm-governed-merges
0  pnpm check:pm-prior-rulings
0  pnpm check:refd-timer-probe
0  pnpm check:watch-hint-literal

check:doc-formula-expressions reads the compiled output of @objectstack/formula and @objectstack/lint. Those two and their dependencies were built first on the merged tree, under the shared verify lock (VERDICT command-exit 0).

docs/adr/README.md is generated from each record's status keyword. ADR-0150's keyword stays Accepted and ADR-0161's stays Proposed, so the index does not change and is not in this diff.

Also at this head: node scripts/check-commit-card-trailers.mjs --range origin/main..HEAD exits 0 over the 3 commits of the branch.

Not measured locally, and CI's to run: the type-check lanes, the Plan Test Core shards job and the governed-merges audit, which take values only a CI run has.


Generated by Claude Code

…ped bucket beside skill and ai_context

A dated addendum under D1 writes the maintainer's ruling of 2026-11-25
(seat record 7168239918) into ADR-0150: a knowledge source is identified
by (package, name), in bucket 3 beside skill and ai_context. The status
line gains one appended Amended clause and the D1 table one dated row;
no ruled sentence is rewritten. The addendum names the readers that
move, moves none, and lists the points that go past the ruling's words.

ADR-0161 gains one cross-reference note after K4's point 3. No sentence
of it is changed.

Docs only: no schema, no code, no changeset.

Claude-Session: https://claude.ai/code/session_01JQwxbZjKjZ947xtTvgJuHX
Co-authored-by: Claude <noreply@anthropic.com>
…red on the merged main

main moved under six of the files the addendum anchors (the knowledge
service, its plugin, the memory adapter and three spec contracts) between
the first reading and this branch's merge of main. Every statement of
"The tree today" and every anchor was read again on the merged tree and
holds, so the two dated readings now name the main commit they were last
measured on.

Docs only: no schema, no code, no changeset.

Claude-Session: https://claude.ai/code/session_01JQwxbZjKjZ947xtTvgJuHX
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Nov 25, 2026
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation labels Nov 25, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:cloud#1 · os-warren · session_01JQwxbW5anP6GDaVi5LKi2U

维护者速读

  • 这次改了什么:只改两份决定记录的文字,没有代码。把您今天定的「按应用+名字区分,都保留」写进记录:两个应用各带一个同名知识源时两个都保留、各建各的索引,AI 用「应用前缀-名字」的写法指明要哪一个。
  • 为什么做:后面那张「让知识源成为应用包里的一份配置」的实现卡要照这条记录来做,记录先落地,实现才能开工。
  • 风险:用户无感。记录写偏的话,后面的实现会照着偏的做;这次只有文字,撤回这次合并即可恢复。
  • 要你做的:合并这个 PR,合并即这条裁定正式入档。其中有一处超出您的原话,只能由您定:同一个应用前缀下(比如同一家厂商的几个模块包共用一个前缀),第二个同名知识源在安装时会被直接拒绝;前缀不同的同名知识源照样都保留。席位建议保留这一条:前缀相同时 AI 本来就没法用「应用前缀-名字」把两者分开,装的时候当场拒绝,比装上以后每次调用都报错要好,此前「资料包」那次您也是这样定的。不同意就先划掉这一条再合并。

席位意见: 建议合并。L1 ACCEPT;契约审核在同一提交 05f35b6106e21b448474764c12ee88958b04fdaf 上 PASS(见本记录 ## Contract review 一节),无必改项;检查 27 项通过、0 失败、0 进行中。另有四个实现细节记录里明确留给后面的实现卡去定,都不需要您现在决定;其中「在代码里注册的知识源算谁的」最可能日后回到您这里,届时单独请示。

席位核对

ACCEPT · repo:cloud#1 · PR #37330 · Tier H (docs/adr/** ×2) · 2026-11-25T17:44Z
Head-sha: 05f35b6106e21b448474764c12ee88958b04fdaf

No must-fix, no should-fix for the dev. Read against GitHub and origin/main (dbc1765a), not against the report's own account. ⛔ Tier H: never ready, queue or arm it from the seat; the maintainer's merge is the ruling's record.

  1. 形态. l1-face --pr 37330 at 17:43:51Z: every row ok. Open, draft, base main, author objectstack-fleet[bot] (relay). First content line Fixes #37325; no closing keyword binds any other card. The body was also read by eye: knowledge_source: admit the governed metadata type with its loader — registry, stack collection, ADR-0087 renames and retirements, the two authoring guards, one name per source #37304 appears five times, each as a plain reference with no closing verb beside it. Fixes is right: the card asks for the addendum (What 1) and for naming what follows (What 2), and the diff delivers both. Net diff against main: 2 files, +58 / −1, both under docs/adr/, both inside the claim's file surface (comment 7168570356). skip-changeset was put on by the relay at create; no published package is touched, Check Changeset is green. Clause-②: no and Metadata-protocol: none match the claim.
  2. 前提实测. Merge commit b36889ef has parents aca7eb4a and fbb62e1c; git diff fbb62e1c b36889ef is the same 2 files, so the merge brought nothing beyond main into the net diff, and the merge base is fbb62e1c. Additive proof re-run by this seat: ADR-0150 487 → 542 lines, ADR-0161 520 → 522; every old line survives in order; the one changed line is ADR-0150's status line and its old text is a strict prefix of the new. Seven quotations were compared with comment 7168239918 byte for byte and all are in it: the maintainer's words 「按应用+名字区分,都保留」, the option text 「两个都能用,AI 要写「应用-名字」来区分。已有索引全部重建,约 3 个 PR。」, the "What is ruled" sentence, "Two packages shipping one source name both work", "the domain:server four lists and readers (precedent PR feat(core,objectql,spec,service-record-context,mcp,runtime)!: a context pack is identified by its package and its name; get_record_context selects a pack by its face on both MCP doors #37291)", and the tap time 16:34:09Z. The maintainer's tap itself is read from that seat record; this review did not re-read the decision thread (NOT MEASURED, the thread is not on GitHub). "The tree today" re-read on origin/main: knowledge_source on 0 lines of the four list files, the registry and the stack schema (control: skill present in the first three lists and the registry, absent from the fourth); 0 files spell the type under packages/, examples/, ui/, skills/, content/; 0 tracked paths for knowledge-pgvector / knowledge-turso; documentIdFor returns the source id, a : and the record id; registerSource overwrites with a warning; the tool refuses an unknown sourceIds entry NOT_FOUND. PR feat(core,objectql,spec,service-record-context,mcp,runtime)!: a context pack is identified by its package and its name; get_record_context selects a pack by its face on both MCP doors #37291 is open and draft, and its fourth list is NAMESPACE_UNIQUE_TYPES, as point 1 says.
  3. 门禁 check-runs at 05f35b6106e21b448474764c12ee88958b04fdaf, read 17:43Z: 50 runs, 27 success, 23 skipped (all expected skips), 0 failed, 0 pending. By name: Lint & Repo Gates success, TypeScript Type Check success, Lint · docs & code guards success (the ADR symbol-anchor and link gates), Check Documentation Links success, Check Changeset success, Governed Surface Queue Guard success, PR-body guards success. mergeable_state clean. The report's 21 local gates are a local subset and are not counted here.
  4. 接受的偏差.
    • Size: +58 against the precedent's +44 (PR docs(adr): ADR-0150 addendum — ai_context joins the package-scoped bucket beside skill #37209). Accepted, not padding: the 14 lines are the paragraph that reads D1's principle for a type the ruling placed against the card's recommendation (the recommendation's whole argument was that principle, so the record has to say how the two stand together), the D4 and D5 bullets and the index-key bullet that the ruling's "keyed by package" adds, and four more points under "Past the ruling's words". Each section has a counterpart in the precedent or a ruled clause behind it.
    • Commit trailer and PR footer follow AGENTS.md, not the dispatch's wording; check:commit-card-trailers is green in CI.
    • After merging main the dev rebuilt the lint closure only. Accepted for a docs-only diff: CI ran the whole set on the head.
    • Nit, left as written: point 1 says the second holder "inside one namespace" is refused and does not repeat that D2 leaves base, system and sys unjudged. The D6 bullet covers that case (a face two sources derive is refused at the call).
    • Git-answerable reads in the report: none found.
  5. 范围外去向 + Skills-docs:. Skills-docs: is not owed (kind none, no narrowing arm). Seat to-dos at landing, none for the dev:
  6. 落地条款. Tier H by governed path. The PR stays draft and takes pm:awaiting-merge; the request for approval goes out only with this ACCEPT and the same-head contract PASS both on the PR. The maintainer's merge accepts point 1 (the type joins the list that refuses a second holder inside one namespace), or the maintainer strikes it first. Fixes #37325 closes the card on merge, so no pm:dispatched clean-up is owed by hand. knowledge_source: admit the governed metadata type with its loader — registry, stack collection, ADR-0087 renames and retirements, the two authoring guards, one name per source #37304 stays open and pm:blocked; its Blocked-by: already names ADR-0150 addendum: knowledge_source joins bucket 3 — one slot per (package, name), the AI face spells NS-NAME #37325. Pointer for the card: ACCEPT → PR #37330, this record.

The two questions the seat was asked to judge

  • Point 1, the fourth list. It is implied by ruled text and still reserved to the maintainer, and the PR routes it correctly. ADR-0150 D2 (ruled, record 6724570466) extends the one-holder-per-namespace rule "to buckets 2 and 3", so a type admitted to bucket 3 falls under it; the ruled mechanism 「AI 要写「应用-名字」来区分」 cannot tell two packages of one prefix apart, so in that case something must refuse. But the list's own header says a narrowing beyond its members "is the maintainer's to rule", and the precedent addendum (merged by the maintainer in PR docs(adr): ADR-0150 addendum — ai_context joins the package-scoped bucket beside skill #37209) carried the same point as "the maintainer's decision" accepted by the merge. The addendum does the same: it decides nothing, says the merge accepts it or the maintainer strikes it, and the PR's 速读 states it in plain words. So no separate decision card is owed before the merge; the merge is the decision. Options for the maintainer: keep it (a second same-name source under one prefix is refused at install and in os validate; first-party count today 0), or strike it (both install, and every call that names the shared face is refused until one is renamed). Recommendation: keep it.
  • Points 4 to 7, left open. Acceptable to leave to 3a; the addendum need settle none. It declares and implements nothing, each point has a named carrier (knowledge_source: admit the governed metadata type with its loader — registry, stack collection, ADR-0087 renames and retirements, the two authoring guards, one name per source #37304) and a stop rule ("one that the text it lands on does not answer goes to the maintainer"), and ADR-0161 itself already hands row 3 the same kind of statement (point 3: "Row 3 writes the refusal's code and words"; K6 item 3). Point 4 (what sourceId / documentId carry) is engineering inside K6 item 5 and D6. Point 5 is answered in substance by ADR-0150 D2 and D8 (identity is the package id; the namespace is the address), with the spelling and the clean-up of an old index left to the code. Point 7 is answered by D4 as for skill and ai_context (the row is the holder's customization and is not served); what becomes of its index is K8 item 4's. Point 6 is the only one with no governing sentence either way; see item 5 above.

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 05f35b6106e21b448474764c12ee88958b04fdaf
Local-runs: none
Scope: docs/adr/0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md, docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md + none
Security-touching: yes

Face: governed rules text (docs/adr/**), so the tier is CONTRACT_REVIEW_TIER and the review is the full ①–④. First record on this head; the PR carried no record and no claim when it was read (0 comments, 0 reviews at 17:43Z). Governing text: ADR-0150 D1 (principle and table), D2 (ruled, record 6724570466), D3, D4, D5, D6 (ruled, record 6724050556), D8, D9 and its 2026-11-25 ai_context addendum; ADR-0161 K1, K4 (clause 3 and point 3), K6 items 4 and 5, K7, K8 item 4, K9; the header of packages/objectql/src/namespace-co-owner-names.ts; the ruling record 7168239918 on #37304. Read for this record: card #37325, claim 7168570356, the os-dev report 7169718237, #37304's body, the PR body and file list, the net diff, PR #37209's merged addendum and its records, PR #37291's body and file list, and the check-runs on the head. Cited code was read on origin/main at dbc1765a, never built or run.

Security-touching is yes: the addendum says which source names a 409 may show a caller (point 3, on ADR-0161 K9) and how a package's source is reached by name.

① Derived judgments

  • Accept-sets and published surface: none move. Two files under docs/adr/. No list, schema, contract member or reader is edited; knowledge_source is in none of the four lists on main and the head changes none.
  • "No ruled sentence is rewritten": right. ADR-0150: one changed line, the status line, old text a strict prefix of the new; one dated row inserted in the D1 table after the ai_context row; one new section before D2. ADR-0161: one blockquote added after K4 point 3, no line changed. Every old line of both files survives in order (re-run here against merge base fbb62e1c).
  • The ruling is quoted verbatim, with its id, in all three places (status clause, head of the addendum, the ADR-0161 note). Each quotation was found byte for byte in comment 7168239918.
  • The cross-reference changes no ruled sentence of ADR-0161. It says K4 point 3 "is read with" the addendum and that K6 items 4 and 5 stay as written. Both readings are sound: item 4 speaks of the rename (id → name), which still moves no document id, and the re-keying is a separate cause the ruling names (「已有索引全部重建」); item 5 keeps its three spellings, and what value each carries for a package's source is left to the addendum's D6 bullet and to row 3.
  • Every citation of another record holds as cited: D6's "the one physical surface this tier has"; K7 rule 2 (the adapter owns its tables); K7's table (a source the adapter holds nothing for is built); K8 item 4 (dropSource); K9 (an unexposed source is refused NOT_FOUND in the sentence an unknown id gets); K4 clause 2 (no environment overlay opens).
  • Gates. 27 success, 23 expected skips, 0 failed, 0 pending on the head; the ADR symbol-anchor, link and index gates are among the successes, so the 21 new path#Symbol anchors resolve.

② Semver level

No changeset and none owed: docs/adr/ ships in no package; skip-changeset is on the PR and Check Changeset is green. Clause-②: no is right: the line asks whether the diff widens an accepted set or enlarges a published surface, and a record that admits a type to a bucket does neither. It moves no list; the narrowings it foresees (D2's install refusal, the letter-led name, the 409, the unserved package-less row) are 3a's to declare, with counts, on the PR that moves the code, and the addendum says so. Metadata-protocol: none is right for the same reason: nothing a metadata author can write changes at this head. Both match the precedent PR #37209.

③ Boundary flags

④ Design judgment

  • The admission follows the ruling and the precedent's form. Section for section it is PR docs(adr): ADR-0150 addendum — ai_context joins the package-scoped bucket beside skill #37209's addendum: the type under D2 to D8, the tree today, what the bucket changes, the readers named and not moved, the follow-up, the points past the ruling. What it adds is owed to this ruling: the index keys (D4 bullet, "The keys of an index"), because the ruling says "document ids and adapter tables are keyed by package as well", and the principle paragraph, because the ruling went against a recommendation that rested on D1's storage half.
  • The principle paragraph is honest and decides nothing new. "This type keeps no global literal" is the ruling restated. Its test is D1's own ("who reads the name"), applied to what the tree shows: the index sits behind the adapter contract, an adapter's tables are its own, and the one door that takes a document id from a caller is the push door ADR-0161 retires. It then lists three things the reading costs (a second derived surface beside the face; a database reader of an adapter's tables is promised nothing; hit values move with the key) instead of hiding them.
  • Point 1 is the right carrier and the right routing. D2 as ruled covers buckets 2 and 3, the type never had a phase-1 one-holder rule, and child N's list is where the precedent put ai_context. Read against the acceptance scenario "two packages ship one source name": under two prefixes both are kept and each is reached by its face; under one prefix the face cannot tell them apart, so the choice is a refusal at install or a refusal at every call, and the earlier one is the sounder contract.
  • Leaving points 4 to 7 to 3a is sound for a record that declares and implements nothing. Point 5 is already answered in substance by D2 and D8 (identity is the package id), and the addendum says why only that coordinate separates every two packages. Point 7 is D4 as for skill. Point 4 is inside K6 item 5 and D6. Point 6 has no governing sentence; the addendum's stop rule sends it to the maintainer if the text 3a lands on does not answer it, which is the right gate.
  • First consumer and execution plan. The first consumer is 3a (knowledge_source: admit the governed metadata type with its loader — registry, stack collection, ADR-0087 renames and retirements, the two authoring guards, one name per source #37304, Blocked-by: ADR-0150 addendum: knowledge_source joins bucket 3 — one slot per (package, name), the AI face spells NS-NAME #37325), named with what it takes: the four lists, the five readers, the store keying in three stores, item 11's pin, and its narrowings with measured counts. The order (this record, then 3a; knowledge-pgvector: an open vector store on PostgreSQL — tables, exact search, listing, chunks #37100 / knowledge-turso moves into objectstack: Apache-2.0, the platform embedder and splitter, listing, generations, the contract suite #37107 re-keyed or built on the new key) is the ruling's own execution paragraph. First-party cost today is zero and is measured with controls.
  • Findings. No must-fix, no should-fix. One nit, accepted as written: point 1's "inside one namespace the second is refused" does not repeat D2's exception for base, system and sys; the D6 bullet covers the case.

Implemented-by: claude/project-thread-4uapwf
Reviewed-by: session_01JQwxbW5anP6GDaVi5LKi2U

Independence: the diff was drafted in thread session session_01JQwxbZjKjZ947xtTvgJuHX; this record was written by an isolated review subagent of the seat session at the tier the claim names for docs/adr/**, from the diff, the cards and the head's check-runs, not from the drafter's conclusions.

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:cloud#1 · os-warren · session_01JQwxbW5anP6GDaVi5LKi2U

Hand-off for approval (Tier H, docs/adr/**): seat record ACCEPT and ## Contract review PASS are in comment 7170044645, both on head 05f35b6106e21b448474764c12ee88958b04fdaf.

  • 要你做的:批准这个 ADR-0150 补充说明(知识源按「应用包 + 名字」区分,同名都保留)。有一处超出您原话、请过目:同一个命名空间(前缀)下只允许一个应用包持有某个知识源名字,否则「应用-名字」分不出来;不同意可以划掉。批准后席位负责落地。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/s skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ADR-0150 addendum: knowledge_source joins bucket 3 — one slot per (package, name), the AI face spells NS-NAME

3 participants