Skip to content

docs(adr): ADR-0161 dated revision note — knowledge source declares retrieval mode (ruling on #38692) - #38714

Merged
os-zhuang merged 3 commits into
mainfrom
claude/project-thread-la73qn
Nov 30, 2026
Merged

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

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Warren · project thread

Part of #38692

This is phase 0 of the card and nothing else: the dated note in ADR-0161. The card stays open for phase 1a (mode), phase 1b (vectorWeight, after #38671 lands) and phase 2 (the per-search override, mode only). None of them is started here.

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:用户无感,只是在知识平台边界那份架构决策记录里追加一条 2026-11-30 的修订说明,把你当天关于「知识源自己声明检索方式和向量一路占比」的裁决写成文字,不改任何代码。
  • 为什么做:这是「知识源声明检索方式」这项工作的零期,你的裁决要求先把决策记录改好,后面的实现才有依据。
  • 出错会怎样:说明里若有和裁决不一致的句子,后面做实现的人会照着错的文字去做,好在它只是一处文档追加,可以直接撤回,不影响任何在运行的系统。
  • 补充:你 11-30 07:57 对「驱动收到的检索方式参数设为可选还是必填」选了「可选(推荐)」(裁决 7272337479),这一句已写进说明,原来挂着的这个问题已经了结。
  • 要你做什么:请你亲手审阅并合并这个合并请求,因为它改的是受管的决策记录,裁决写明由你本人合并。

What changes

One file, add-only. docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md gains its fifth dated note: 27 lines added, none changed and none removed. The note records section 八 of the maintainer's ruling record 7270218011 on the card, in the text as revised at 2026-11-30T06:16Z. The substance it writes down is that of the record's sections 一 to 七.

Four insertions, in the form the four earlier notes of this record use:

Line at the head Where What is added
23 header, after the note line of 2026-11-29 A fifth **Amended** line. It names the ruling record, the maintainer's words 「同意,更新决策卡」 (06:00Z) and 「全部采纳,修正裁决」 (06:16Z), the two contract members the note registers, that the second is optional by ruling record 7272337479 (「可选(推荐)」, 07:57Z), and that the note is in force from the maintainer's merge.
139 K1, under the note of 2026-11-29 A cross-reference: the "Hybrid retrieval" row, the title, the D1 key-words line and TL;DR item 1 are read with the new note.
255 K4, under the source-key table A cross-reference: source.retrieval is declared beside source.affinity, and the one intended exception to "builds on every store".
420 K8, under "Rules for every member" The note itself.

What the note says, with the ruling's item numbers:

  • Rule 4 of K8 is read anew: hybrid weights are declared by the knowledge source, rerank toggles and parser options stay with the adapter, and a parameter of one search request is not configuration (items 1 and 2).
  • The "Hybrid retrieval" row of K1, and "hybrid retrieval" in the title, the D1 key-words line and TL;DR item 1, are narrowed: the source declares which legs run and the vector leg's share, and the adapter still decides how candidates are found and how the legs are fused (items 3 and 4).
  • The source keys: source.retrieval, a strict object with mode (vector, keyword or hybrid) and vectorWeight (a number above 0 and below 1, written only beside an explicit hybrid), and what each of the three modes means (section 一, and item 11 for keyword).
  • Two contract members are registered with their full shape, AdapterCapabilities.retrieval and AdapterSearchOptions.retrieval, and the suite cases they land with (item 5).
  • What vectorWeight means, the weighted reciprocal rank fusion the two SQL stores compute, the pin at 0.5, and that the constant is not opened as an option (item 6).
  • The answer to two sentences of the note of 2026-11-29 (item 7), the intended exception to "builds on every store" (item 8), the four points where an unsupported mode is refused and that the index is still built (item 9), the known gaps (item 10), and the way out of a single number (item 11).
  • AdapterSearchOptions.retrieval is optional, as rule 2 says of every member: an adapter that declares no capabilities.retrieval, such as knowledge-memory, keeps working, and whenever the service settles a mode it always passes it. This is the maintainer's later ruling record 7272337479 (「可选(推荐)」, 2026-11-30T07:57Z), recorded in that member's bullet (line 428), with one clause naming it in the header line (23) and in the note's opening (420).
  • The sequence: mode in phase 1a, vectorWeight in phase 1b after 知识库混合检索在中文口语问题上比只用向量更差:关键词一路的滑动窗口切词 + 等权 RRF #38671 lands, and the per-search override in phase 2, mode only. So vectorWeight is ruled by this note and is in no schema until its phase.

Left as written, on purpose: the title, the **Status** and **Decided by** lines, the tables of K1 and K8, rules 1 to 5, the TL;DR and every earlier note. This record's own convention is add-only, each of its four earlier notes ends its header line with "The status line above is left as it is", and docs/adr/README.md is generated from the title and the status line, so it stays current with no edit.

No file under packages/, content/, skills/ or ui/ changes. The note declares; it builds nothing.

Why

The ruling orders the record before the code. Its 分期 puts this first, as 零期: 「ADR-0161 修订说明 PR,维护者合并。」 Its section 八 is headed 「ADR-0161 修订说明(单独 PR,Tier H,由维护者亲手合并)」. The claim on the card holds that no phase 1a PR lands before this one merges.

Tests

The diff touches no package, so there is no build closure to make and no package test or type-check owed. What was measured on the text itself:

  • Quotations. The added text holds 52 spans in corner brackets. A script compared each with the ruling records' bodies as read over REST: 50 are verbatim substrings of record 7270218011, 2 are the chosen option of record 7272337479, 0 mismatches. The added lines hold no raw control byte and no HTML comment.
  • The ruling's two numbers. A script recomputed both over all 40,400 rank combinations (ranks 1 to 200 in each leg, plus a leg that does not rank the passage). Dividing by the best score at w = 0.5 differs from today's function in the last bit in 0 of them. Multiplying by 61 differs in 13,369 of them, which is the count the record gives.
  • Every code location the ruling cites, read at the base 5a77a7063e. No drift.
    • fuse and RRF_K = 60 in packages/plugins/knowledge-turso/src/turso-adapter.ts and in packages/plugins/knowledge-pgvector/src/pgvector-adapter.ts: each divides by 2 / (RRF_K + 1).
    • AdapterCapabilities in packages/spec/src/contracts/knowledge-adapter.ts holds chunks alone, and AdapterSearchOptions has no retrieval member.
    • The note in packages/services/service-knowledge/src/knowledge-service.ts that adapters register in their plugins' start(), after a source registered in code at init().
    • reportUnmountedAdapters, taken at kernel:bootstrapped.
    • authoredKnowledgeSourceRefusal in packages/metadata-core/src/knowledge-source-save-admission.ts, which does not judge the engine's own write (a package install among them).
    • Section 7.1 of content/docs/protocol/knowledge.mdx exists.
    • knowledge-memory answers the cosine similarity.
    • In the ADR itself, rule 4 of K8, the "Hybrid retrieval" row of K1 and "◆ Why position" read exactly as the ruling quotes them.
  • Anchors. Every code citation in the note is written as a path with a symbol, never with a line number, and check:adr-symbol-anchors reads all of them (output below).

No ablation: the diff changes no behaviour a test pins.

Acceptance notes

Deviations from the dispatch order, reported and not settled here. The ones that concern process and not this text are in the report on the card.

  1. Items 1 to 11, where order 7270638751 says items 1 to 6. The ruling's own list in section 八 has eleven items, and the card thread widened the order to match it. The note covers all eleven.
  2. The **Status** and **Decided by** lines are not edited. The order asks for the header lines to name the ruling and its 06:16Z revision. This record's convention carries that in a new **Amended** header line, which is what was added, and leaves the status line as it is. Editing the status line would also change the generated index.
  3. The title, the D1 key-words line and TL;DR item 1 are not reworded (item 4). The ruling says their meaning is narrowed, 「含义同步收窄」, and the note says how each is read from now on. The D1 line is a quotation of the filing gate's record.

Text of ADR-0161 that the ruling touches beyond section 八. Listed for the seat, not changed. Line numbers are at head a909f81c (no line moved from c542278e).

  • a. Line 402, "What "capabilities" became": "One flag covers what a method cannot say, capabilities.chunks (item 5). No wider descriptor is added." The note registers a second member of AdapterCapabilities.
  • b. Line 374, the note of 2026-11-25: "No capability flag is added: capabilities.chunks stays the one flag". Same point.
  • c. Line 153, the K2 row for section 3.4 of the protocol page: "still no configuration, no rerank and no hybrid toggle". AdapterSearchOptions.retrieval.mode selects the legs for one search.
  • d. Line 415, rule 2: "Every member is optional." The record writes AdapterSearchOptions.retrieval: { mode, vectorWeight? } with no optional mark on retrieval. Ruled at 2026-11-30T07:57Z (record 7272337479, 「可选(推荐)」): the member is optional, and the note's bullet on it now says so. No longer open.
  • e. Lines 149 and 157 (two rows of the K2 table), and "Why the line is here" at line 107: each speaks of hybrid retrieval as the adapter's, outside the three places item 4 names. The note narrows only the three.
  • f. Line 535, Consequences: "The three adapters this repository ships run one suite." knowledge-memory does not declare the new member, and the suite gains one case per mode.
  • g. Line 125, the note of 2026-11-29: the two SQL stores "answer a reciprocal rank fusion of two legs". From phase 1a that holds only by default.
  • h. The record's fourth refusal point says the source is listed in refused 「带错误码」 and does not name the code. The note does not name one either.

Two places where the note's wording is assembled, not quoted. Both are marked by their position in the note and both stay inside the record's words.

  • The answer to "a smaller weight has no unit an author can check" (item 7) is put together from sections 一 and 四 and from the 分期. The record asks for an answer and does not write one out.
  • "A passage only the vector leg ranks scores at most the weight, and a passage only the keyword leg ranks scores at most the rest" is arithmetic on the record's formula, not a sentence of the record.

Not done here. content/docs/protocol/knowledge.mdx section 7.1, the Studio form and the skill text go with their own PRs, as the record routes them. No changeset: docs/adr/ is not published, and the PR carries skip-changeset.

Verification

Read first, by risk.

  1. Line 420, the bullet "Two sentences of the note of 2026-11-29 (item 7)". It is the one bullet whose answer is assembled from several sections of the record.
  2. Line 420, the bullet "Rule 4, amended (items 1 and 2)". The new reading of rule 4 is one sentence composed from the record's two instructions.
  3. Line 23, the header line: the wording of when the note is in force, and the two members it says are registered.
  4. Line 428, the sentence recording ruling record 7272337479: the member is optional, and the service always passes a mode it settles.

Two-minute check. One click: open the "Files changed" tab. Expected: one file, +27 −0, four hunks, every changed line an addition.

Landing. docs/adr/** is a governed surface. It is opened as a draft. The hand-off to the maintainer is the seat's, and the merge is the maintainer's. Nothing here requests a reviewer, marks it ready, or arms auto-merge.

CI on head a909f81c. Check-runs read at 2026-11-30T08:30Z: 44 rows, 25 success, 19 skipped by their selectors, 0 failed, 0 pending. Every required context that runs on this diff is success: Lint & Repo Gates, TypeScript Type Check, Test Core, Governed Surface Queue Guard, Test UI, Dogfood Regression Gate. Check Changeset is one skipped row, the skip-changeset exemption.

Gates, run locally on head a909f81c. node scripts/pm/dispatch-gates.mjs --commands derived 21 commands from the diff. All 21 were run, each exit code captured before any pipe, and all 21 are exit 0. The reconciliation:

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).
The 21 commands and their exit codes
node scripts/check-adr-links.mjs :: exit 0
node scripts/check-adr-links.mjs --self-test :: exit 0
node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-comment-mask-corpus.mjs :: exit 0
node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0
pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0
pnpm check:adr-anchors :: exit 0
pnpm check:adr-index :: exit 0
pnpm check:adr-symbol-anchors :: exit 0
pnpm check:ci-filter-parity :: exit 0
pnpm check:closed-ceremony-text :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:doc-authoring :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:gitlink-declared :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:pm-governed-merges :: exit 0
pnpm check:pm-prior-rulings :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:watch-hint-literal :: exit 0
Verdict lines of the gates that read the ADR
✅ check-adr-links: 1284 relative link destination(s) under docs/adr/ resolve
✅ check-adr-symbol-anchors: 4570 anchors across 165 records resolve — 1702 symbol (1673 declaration, 29 literal), 2816 file-level, 52 cross-repo, 6 exempt, 128 continuation. 0 line anchors survive
adr-index --report: OK — docs/adr/README.md is current, every record parsed, self-test 60 assertions green.
check-nul-bytes: OK (scanned 28925 text file(s) -- 28925 tracked, 0 untracked-not-ignored; skipped 101 binary; no raw ASCII control bytes).
✓ comment-mask corpus sweep [scripts/js-comment-mask.mjs]: 24416 files, 0 disagree, 0 unparseable
✓ doc authoring guard: 24172 customer-facing string(s) across 1954 spec sources clean
One gate first read NOT MEASURED, then green

pnpm --filter @objectstack/lint run check:doc-formula-expressions first answered exit 3, PREREQUISITE NOT MET: two workspace packages it imports were not built in the fresh worktree. That is a run that measured nothing, not a red gate. The two packages were built under the shared verify lock, and the gate was run again:

VERDICT command-exit 0 · held the lock 4s · waited 1s
pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0

Left to CI, not run locally. The repo-wide lint, the type-check lanes, the test shards, and the families dispatch-gates prints outside the derived list (the artifact-roster, wide-population and pending-changeset families). The commit trailer gate was read on the pushed range before the push and is green.

Human Minimum

  • 1. No schema and no code changes.
  • 2. No new name is declared in code. The names the note writes are the ruling's.
  • 3. No formatter ran. pnpm lint is NOT MEASURED locally: the repo-wide scan is CI's, and the diff is one Markdown file.
  • 4. One card, one branch off main at 5a77a7063e, one pull request.
  • 5. Nothing publishes, so no changeset; both declaration lines are filled in above.
  • 6. packages/spec is not touched.
  • 7. No edit to content/docs/references/, to a CHANGELOG.md or to content/docs/releases/.
  • 8. Title, body and comments are in English. The maintainer's Chinese words are quoted unchanged, and the 维护者速读 section is in Chinese as the fleet's rule asks.
  • The Before Submitting list is done for what a docs-only diff reaches; pnpm lint is as item 3 says.

Generated by Claude Code

…ares its retrieval mode and the vector leg's share

Records section 8 of the maintainer's ruling of 2026-11-30 on the knowledge
source retrieval card (ruling record 7270218011, as revised at
2026-11-30T06:16Z) as the fifth dated note of ADR-0161, under "Rules for
every member" in K8, with a header line and cross-references under K1 and K4.

The note amends the reading of K8 rule 4 and of the "Hybrid retrieval" row
of K1, registers two contract members (AdapterCapabilities.retrieval and
AdapterSearchOptions.retrieval) with their suite cases, and writes the
ruling's eleven items: the source keys and the three modes, the meaning of
vectorWeight and the formula of the two SQL stores, the answer to two
sentences of the 2026-11-29 note, the intended exception to "builds on every
store", the four refusal points, the known gaps, the way out of a single
weight, and the sequence (mode in phase 1a, vectorWeight in phase 1b, the
per-search override in phase 2, mode only).

Add-only: 27 lines added, none changed or removed. The title, the status
line, the tables and every earlier note are left as written. It declares and
builds nothing; no file under packages/ changes.

Claude-Session: https://claude.ai/code/session_01JQwxbYfLbF7sSvBHtuXbvT
Co-authored-by: Claude <noreply@anthropic.com>
The exception bullet (item 8) now says the index of a source in the
exception is still built and points at the list of refusal points, where it
said that what is refused is the search; a save and a registration are
refused too. The known-gaps bullet (item 10) introduces the sentence the
ruling adds to the search_knowledge description without a causal "so".

No other line changes. Against the base the note stays add-only: 27 lines
added, none changed or removed.

Claude-Session: https://claude.ai/code/session_01JQwxbYfLbF7sSvBHtuXbvT
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 30, 2026
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation labels Nov 30, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu

Contract-review-claim: session_01JQwxbXyLoBzNYY1U8SNPFu · head c542278 · 2026-11-30T07:20Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: c542278e582fab65e0bd3dcb73b16f228d2156fa
Local-runs: none
Scope: docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md + none
Security-touching: no

PR #38714 on card #38692, phase 0 of ruling record 7270218011 (the text as revised at 2026-11-30T06:16Z). Read: the card body and all eight comments, the PR body and file list, the net diff against main (merge base 5a77a7063e, main at d2caaec40d, which does not touch this file), and the head's check-runs. The tier was confirmed with record-recognisers.mjs --template --paths: the one changed path is a governed path, the rules face.

① Derived judgments

  • File list: right. One file, +27 −0, four hunks, every changed line an addition. No path under packages/, content/, skills/, ui/ or .claude/.
  • Accept set: unchanged, right. The note declares and builds nothing. At the head, packages/spec/src/contracts/knowledge-adapter.ts#AdapterCapabilities holds chunks alone, #AdapterSearchOptions has no retrieval member, and packages/spec/src/ai/knowledge-source.zod.ts has no retrieval key. The note's closing paragraph says exactly that.
  • Public surface: unchanged, right. docs/adr/** is not published. The title and the status line are untouched, so the generated docs/adr/README.md owes no edit.
  • Add-only dated note: right. The form is that of the four earlier notes: a header **Amended** line that ends "The status line above is left as it is", the note as a block quote under the text it amends, and cross-references under K1 and K4 that end "No sentence of … is changed".
  • Check-runs on the head, read twice (2026-11-30T07:20Z and 07:25Z): 48 rows at the second read, 24 success, 23 skipped by their selectors, 1 not concluded, 0 failed. Success: TypeScript Type Check, Governed Surface Queue Guard, Check Changeset, Check Documentation Links, Check PR Size, PR-body guards, Dogfood Regression Gate, Test UI, every Lint · row and every Type Check · row. Test Core (1/12) was still in_progress. This record does not stand in for that row: the landing waits for it.
  • Tier. The record's Security-touching: no is true of the text: no hunk teaches permission, sharing, credential, token or authentication behaviour. A refusal of an unsupported mode with 400 VALIDATION_ERROR is validation. ⛔ That line must not be read as the low-risk arm's licence here. Ruling 7270218011 keeps the merge for the maintainer in words, 「单独 PR,Tier H,由维护者亲手合并」, and the note's own header line repeats them. No seat queues or arms this PR on this record. The PR is a draft, and it stays one until he acts.

② Semver level

No changeset, and the skip-changeset label: right. The diff publishes nothing from any released package. The PR body carries Clause-②: no and Metadata-protocol: none, and both are right for phase 0: the note rules source.retrieval and two contract members, and each lands with its first reader in phase 1a or 1b, where the claim already declares Clause-②: yes and Metadata-protocol: added. Check Changeset is success on the head.

③ Boundary flags

SQL push-down. No query, no id materialisation and no join is added. Nothing to judge.

The three deviations the dev reports.

  1. Items 1 to 6 widened to all eleven: accepted, and required. Section 八 of the ruling is headed 「需要写到的内容」 and lists eleven items. A note that stopped at item 6 would leave out the answer to the note of 2026-11-29 (7), the intended exception (8), the four refusal points (9), the known gaps (10) and the way out of a single number (11), each of which the ruling orders written. All eleven are in the note, and each bullet names the items it carries.
  2. Status and Decided by left unedited, an **Amended** header line added: accepted. The ruling does not ask for either line to change. The record's convention is the one followed: four earlier notes, four **Amended** lines, each leaving the status line as it is. The new line names the ruling record, both of the maintainer's phrases with their times, and that the note records the revised text. An edit of the status line would also stop the diff being add-only and would move the generated index.
  3. The title, the D1 key-words line and TL;DR item 1 not reworded: accepted. Item 4 says their meaning is narrowed, 「含义同步收窄」; it does not say the texts are rewritten. The D1 line is a verbatim quotation of the filing gate's record, which is never rewritten. The note says how each of the three is read from its merge, and the header line and the K1 cross-reference both point a reader there.

The open questions.

  • A — lines 402, 374 and 153 against the note. Nit, does not block this PR. The three are not alike.
    • Line 374 ("No capability flag is added: capabilities.chunks stays the one flag") is a sentence of the note of 2026-11-25 about its own design, the scope filter. It is still true of that design. No conflict.
    • Line 402 ("No wider descriptor is added") is standing K8 prose, and the note registers a second member of AdapterCapabilities. The tension is in the words and not in the contract: rule 5 is the door a later member comes through, the note says it registers exactly two members and that AdapterCapabilities "holds chunks alone today", and it stands sixteen lines below. A cross-reference there would be in the record's own form, but it is text past the ruling's list of eleven, so it is the maintainer's to ask for. This is N1 below. The seat puts the dev's option B to him in the hand-off; nothing waits on the answer.
    • Line 153 ("still no configuration, no rerank and no hybrid toggle") is a row of the K2 table, which says what a text becomes and who rewrites it: "service-knowledge: adapters list their documents; a complete reindex skips unchanged documents and purges the ones its source no longer has; one contract test suite #37096, then each card that adds a member". Phase 1a adds a member, so the rewrite of the note on IKnowledgeAdapter and of section 3.4 of the protocol page is phase 1a's, and it must not write "no hybrid toggle" again. Belongs to phase 1a.
  • B — AdapterSearchOptions.retrieval without an optional mark, against rule 2. Escalated; does not block this PR; phase 1a must not settle it in code. The note copies the ruling's spelling and says so ("written here as the record writes it"), which is all it may do. Three facts for the maintainer:
    • The ruling marks every other new member optional (source.retrieval?, AdapterCapabilities.retrieval?, vectorWeight?) and leaves this one bare.
    • Rule 2 says "Every member is optional", and the note leaves the rules as written. Item 17 is spelled AdapterSearchOptions.scope?.
    • For an adapter that declares no capabilities.retrieval (knowledge-memory is one), the service has no default to resolve, so it cannot fill a required mode. Read strictly, the bare spelling cannot be built for that adapter.
    • Rule 3 makes a registered shape the decided one: if phase 1a lands retrieval?, that is a change to a shape this note registers, and it owes a further dated note. So the cheap moment for the question is the hand-off of this PR, before the merge. My reading is that the member is optional in the type and present whenever the service resolved a mode; the word is his.
  • C — the fourth refusal point names no error code. Not a finding; belongs to phase 1a. The ruling says 「带错误码」 and names none, and the note says "listed in refused with its code" and names none. A name here would be a decision past the ruling's words. The code is a contract value under ADR-0112: phase 1a's spec PR proposes it with its ledger entry, under the Clause-②: yes review that phase already owes, and asks the maintainer if no existing code fits.

Other entries of the dev's list. Rule 2 (item d) is B. Lines 149, 157 and 107 (e), line 535 (f) and line 125 (g) speak of the state before phase 1a or of hybrid retrieval in the sense the note now fixes; the note's closing paragraph ("read rule 4 and the 'Hybrid retrieval' row with this note") and the K1 cross-reference cover them, and none is in the ruling's list. Not findings. The two assembled passages (the answer under item 7, and the arithmetic on the formula) are judged in ④.

④ Design judgment

docs/adr/0161-…-is-a-governed-type.md, against the ruling's words, the record's existing text, its first consumer (phase 1a) and the code it cites.

  • Every quotation is the ruling's text. The added lines hold 50 spans in corner brackets; each is a verbatim substring of comment 7270218011 as stored now (edited at 06:17Z). Every English quotation of the record itself (rule 4, the "Hybrid retrieval" row, the two sentences of "◆ Why position", the two K4 sentences, "A source is written once and builds on every store (K4)") is a verbatim substring of the file on main.
  • All eleven items are present, and none is turned. Rule 4's new reading moves "hybrid weights" to the source and keeps rerank toggles and parser options with the adapter (1), and adds the sentence on request parameters (2). The K1 row is read as the ruling writes it, with the table left as written (3). The three places are narrowed to "how candidates are found and how the legs are fused" (4). Both members are written with the ruling's shapes, on the right symbols, with the suite cases rule 1 asks for (5). The abstract meaning, the formula, the kept division, the pin at 0.5, the tie rule, the single-leg score and the closed constant are all the ruling's section 五 (6). Items 7 to 11 each have a bullet.
  • The cited code holds at the head. fuse in both SQL adapters divides the two legs' 1 / (RRF_K + rank) by 2 / (RRF_K + 1), with RRF_K at 60, a missing leg adding 0, and ties going to the vector rank and then the chunk id. adapterIdFor carries the note that adapters register in start() after a source registered at init(). reportUnmountedAdapters is read at kernel:bootstrapped. authoredKnowledgeSourceRefusal does not judge the engine's own write. knowledge-memory declares capabilities = { chunks: true } and nothing else. Every citation is a path with a symbol, none a line number.
  • The two assembled passages stay inside the ruling. The answer to "a smaller weight has no unit an author can check" says the record gives the key no unit, and then states three things that are each the ruling's: the abstract meaning (section 一), the Studio hint (section 四, quoted), and that the key is built only after a measured range (分期). It also says that affinity is not touched, which is true: the sentence it answers refuses a fusion with affinity as a leg, and that refusal stands. The sentence "a passage only the vector leg ranks scores at most the weight, and … only the keyword leg … at most the rest" is correct on the formula: the denominator is 1/61 for every w, so a first rank in one leg alone scores w or 1 − w.
  • Tried to break it, and it held.
    • Does the note build a key ahead of its reader? No. It says vectorWeight "is ruled here and is in no schema until that phase", and the K4 cross-reference sends each key to its phase.
    • Does it open a door the ruling shut? No. Section 六 is quoted whole, and "Not in this note" repeats that the per-search argument of phase 2 is not registered.
    • Does the exception to "builds on every store" swallow the rule? No. It is limited to an explicit mode, and "a source that omits mode is not in the exception" is said twice.
    • Does the log level contradict the degradation rule in AGENTS.md? The ruling orders error for the post-boot line, and the note copies it. A ruling's word, not the note's choice.
    • Does the header line overstate when it is in force? No: from the maintainer's merge, in his own words.
  • First consumer. Phase 1a can be built from this text for mode: the three values, the report's shape, the four refusal points in order, the single-leg score, "no embedder call" under keyword, and no rebuild. The two things it cannot read off the note are B and C above, and both are gaps of the ruling, which the note rightly does not fill.

No must-fix, no should-fix.

  • N1 (nit) — line 402, "No wider descriptor is added", has no cross-reference to the note that registers AdapterCapabilities.retrieval. No effect on the contract: rule 5 and the note's own closing paragraph govern. Left as written unless the maintainer asks for the add-only line (open question A).
  • N2 (nit) — the bullet on AdapterSearchOptions.retrieval does not say that rule 2 stands beside the bare spelling. It does say the spelling is the record's. The substance is open question B, escalated above; no change to the note is asked for on this head.

Implemented-by: claude/project-thread-la73qn
Reviewed-by: session_01JQwxbXyLoBzNYY1U8SNPFu

VERDICT: PASS

… member is optional

Records the maintainer's ruling of 2026-11-30T07:57Z (ruling record
7272337479, his choice of the decision card's option the note quotes):
AdapterSearchOptions.retrieval is optional, as rule 2 of K8 says of every
member; an adapter that declares no capabilities.retrieval keeps working;
and whenever the service settles a mode, it always passes it.

One sentence with its citation ends the bullet on the member the service
hands the adapter, which still writes the member as the first record writes
it. One clause in the header Amended line names the ruling, and one clause
in the note's opening paragraph names the one point, and the one quotation,
that is not the first record's text.

Three lines of the note change, all of them lines this branch added.
Against the base the note stays add-only: 27 lines added, none changed or
removed.

Claude-Session: https://claude.ai/code/session_01JQwxbYfLbF7sSvBHtuXbvT
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu

Contract-review-claim: session_01JQwxbXyLoBzNYY1U8SNPFu · head a909f81 · 2026-11-30T08:29Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: a909f81c83d1eb34a32236aa5003a02b5d94ccdf
Local-runs: none
Scope: docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md + none
Security-touching: no

Delta review of PR #38714 on card #38692, against record 7271729439 (head c542278e). The delta is one commit, c542278e..a909f81c. Read: the card's twelve comments, ruling record 7272337479 and the dev's rework report 7272933379 among them, the PR thread, the PR body, the delta and the net diff against main (merge base 5a77a7063e; main at 2d6102c7db has no commit on this file since the base), and the check-runs of the new head. Everything record 7271729439 judged and this delta does not touch stands as judged there.

① Derived judgments

  • The delta: three lines, each a pure insertion. Right. Lines 23, 420 and 428 of the file each gain text and lose none; the file has 615 lines at both heads, so no line of the note moved. Against the merge base the diff is still one file, +27 −0, four hunks, every changed line an addition.
  • Nothing else moved. Right. No other line of the file differs between the two heads, and the file list is still the one path.
  • Accept set and public surface: unchanged, right. The note still declares and builds nothing.
  • Check-runs on the head, read at 2026-11-30T08:30Z: 44 rows, 25 success, 19 skipped by their selectors, 0 failed, 0 pending. Success includes every required context that runs on this diff: Lint & Repo Gates, TypeScript Type Check, Test Core, Governed Surface Queue Guard, Test UI, Dogfood Regression Gate. Check Changeset is one row on this head, skipped: the PR carries the skip-changeset label, and the row is that exemption, not a missing check. The row that was open at the last record, Test Core (1/12), is success here.
  • Tier: as in record 7271729439. Security-touching: no is true of the text. ⛔ It is not the low-risk arm's licence: ruling 7270218011 keeps the merge for the maintainer, 「单独 PR,Tier H,由维护者亲手合并」, and record 7272337479 repeats that he merges. The PR is a draft. No seat queues or arms it on this record.

② Semver level

Unchanged and right: no changeset, the skip-changeset label, Clause-②: no and Metadata-protocol: none. The delta publishes nothing.

③ Boundary flags

SQL push-down. Nothing to judge.

Open question B of record 7271729439: answered by the maintainer. Record 7272337479 on the card: he chose 「可选(推荐)」 at 2026-11-30T07:57Z. The option, as that record gives it: a driver that declares no retrieval mode keeps working; whenever the service settles a mode it always passes it; the ADR adds one sentence saying so before merge. The delta is that sentence.

The dev's deviation: one sentence and two clauses, where the ruling orders one sentence. Accepted. The clause on line 23 follows the record's own convention: the header line of 2026-11-28 names its later ruling record 7248214179 the same way. The clause on line 420 is needed: without it "every quotation is the record's text" would be false of the two spans taken from the second record.

N1 left undone. Stands. No word of the maintainer asks for the line, and record 7271729439 says it is his to ask for. It does not have to be settled before he merges: rule 5 and the note's closing paragraph govern, and the contract is the same with or without it. The seat names it in the hand-off as one optional line, with the default "left as written" if he says nothing. The ready text, from report 7272933379, to be added on his word as one block-quote line under "What "capabilities" became":

Cross-reference (2026-11-30, #38692). "No wider descriptor is added" above is read with the dated note of 2026-11-30 under "Rules for every member" below, which registers one more member of the descriptor, AdapterCapabilities.retrieval. No sentence of K8 is changed.

A yes costs one commit, a new head and a further delta review, and this record then no longer covers the head.

Open question C (the refusal code): unchanged. It is phase 1a's, and report 7271953415 already proposes a code there.

The PR body: four readings are behind the head. None blocks this record, which judges the tree. The body is the seat's, and it becomes the squash commit message, so the seat corrects all four in one edit before the hand-off. A body edit does not move the head.

  • "Gates, run locally on head c542278e": a note. The gate verdicts are the check-runs of a909f81c, read above.
  • "50 spans in corner brackets": a note. It is 52 now, two of them from record 7272337479.
  • The table row for line 23: a note. It does not name the second ruling record.
  • Acceptance note d: a note, and the one to correct first. It tells the maintainer that whether the member is optional "is not said by the record", and he has since ruled on exactly that. Left as it is, it reads as a question still open.

The body's "What changes" section also says nothing of the 07:57Z ruling; the same edit adds it.

④ Design judgment

The three insertions, against record 7272337479, ruling 7270218011 and the text around them.

  • The ruling is quoted exactly. 「可选(推荐)」 appears twice in the delta, on lines 23 and 428, and both are verbatim substrings of record 7272337479. The time, 2026-11-30T07:57Z, and the words "the decision card's option" are that record's. Both links resolve to comment 7272337479 on 知识源加「检索方式」和混合比例:只用向量 / 只用关键词 / 混合(可设比例),由应用元数据指定,单次检索可覆盖 #38692.
  • Every quotation in the note is still a record's text. The added lines hold 52 spans in corner brackets, counted at the outer level: 50 are verbatim substrings of comment 7270218011 as stored now, which is byte-identical to the text read for record 7271729439, and 2 are the option above. None is neither.
  • Line 428 says what the option says, and no more. "The member is optional, AdapterSearchOptions.retrieval?" is the choice. "An adapter that declares no capabilities.retrieval, such as knowledge-memory, keeps working" and "whenever the service settles a mode, it always passes it" are the option's two clauses, with the record's "driver" and "in-memory one" written as this ADR writes them. "As rule 2 says of every member" is a true statement of rule 2 ("Every member is optional"). The bullet's first sentence, "written here as the record writes it", is untouched and still true of 7270218011, and the new sentence says in so many words that the bare spelling is the first record's.
  • Line 23 is right. "That the second is optional, like the first": the first member is written AdapterCapabilities.retrieval? in the ruling and in the note.
  • Line 420 is right. The exception it names is exactly the one point, and it sends the reader to the bullet that cites it.
  • Tried to break it.
    • Does the sentence leave the unbuildable case of the last record? No. For an adapter that declares nothing and a source that omits mode, the service settles no mode and passes nothing; the member is absent, and the adapter runs as it does today.
    • Does it contradict another sentence of the note? No. "It carries the value in effect for this search, which the service resolves" holds whenever a value is in effect. The closing paragraph still says exactly two members are registered, and that is still so.
    • Does it bind phase 1a to something it has not built? No. Report 7271953415 says feat(spec): a knowledge source declares its retrieval mode; an adapter reports the modes it runs #38720 built the member optional, and record 7272337479 lifts its hold on this point.
    • Is the second record the maintainer's own comment? It is the seat's record of his choice in the project timeline. That is the form this ADR already cites for a choice made on a decision card (record 7248214179), and the note calls it his choice of the card's option, which is what the record says. This review reads the record and not the timeline.

No must-fix, no should-fix.

  • N2: closed. The bullet now states the optional mark and cites the ruling.
  • N1 (nit) — unchanged from record 7271729439: line 402 has no cross-reference to the note. No effect on the contract. Left as written unless the maintainer asks for the line above.

Implemented-by: claude/project-thread-la73qn
Reviewed-by: session_01JQwxbXyLoBzNYY1U8SNPFu

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu

维护者速读

  • 这是什么:知识平台边界的架构决策记录(ADR-0161)里追加一段 2026-11-30 的修订说明,把你当天「知识源自己声明检索方式和向量一路占比」的裁决写成文字;你 07:57 选的「检索方式参数可选」也已写进去。只改文档,不改代码。
  • 风险:只是一处文档追加(+27 行),可以直接撤回;后面 1a 的实现 PR 都照这段文字做,所以它要先合。
  • 一个可选项(不选就按现状):审查建议在上文「No wider descriptor is added」那句下加一行交叉引用,指向这段新说明,契约不变。你说要就加,多一个提交和一轮复核;不说就按原样合并。
  • 要你做什么:请批准并亲手合并(受管的决策记录,按裁决由你合并)。

席位核对

ACCEPT · L1 · area o2-A · Head-sha a909f81c83d1eb34a32236aa5003a02b5d94ccdf · 2026-11-30T08:34Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-warren · session_01JQwxbXyLoBzNYY1U8SNPFu

2026-11-30T08:35Z · L1 ACCEPT and hand-off · #38692 phase 0 (ADR-0161 revision: source-declared retrieval mode, with ruling 7272337479) at its current head.

  • Seat record 7273091651 (维护者速读 + 席位核对 ACCEPT), and same-head contract review PASS 7273026100.
  • Checks: 25 success, 19 skipped, 0 failed.
  • Tier H (ADR): requesting approval from the governed approvers; the maintainer merges it himself. One optional line (N1) is put to him in the 维护者速读; default as written.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 30, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 30, 2026 09:06
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 30, 2026
Merged via the queue into main with commit 95ffacc Nov 30, 2026
54 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-la73qn branch November 30, 2026 09:30
@objectstack-fleet objectstack-fleet Bot removed the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 30, 2026
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…mode its store does not run (objectstack-ai#38722)

<!-- claude-projects-attribution: {"github_login":"os-warren"} -->
_Requested by **Warren** · [project
thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ8QCBjsNDZa4iwo35VN5fKKg)_

Part of objectstack-ai#38692

Clause-②: no
Metadata-protocol: none

## 维护者速读

-
知识源声明了检索方式后,搜索就按它执行;没声明的按存储默认。存储不支持所声明的方式时,保存时直接报错并列出可选方式,启动后记一次错误日志,每次搜索都把它列为未检索,绝不悄悄换成别的方式。
- 属于知识管理专题「一期 a:检索方式」。
- 出错会是本该能搜的知识源被拒;未声明方式的知识源行为不变,可直接撤回。
- 无。

## Stack

Base: `main`. objectstack-ai#38700 (the facade split) has merged and `main` is merged
in. The spec PR objectstack-ai#38720 merged as f576dee and `main` is merged in, so
this diff is the service's own 15 files. The phase-0 ADR note (objectstack-ai#38714)
is merged too. Independent of the adapter PRs. The Studio form PR stacks
on this one.

## What changes

- New `knowledge-retrieval-mode.ts`: the effective mode is the source's
`source.retrieval.mode`, else the adapter's
`capabilities.retrieval.default`; an adapter reporting no modes is never
told one.
- The four refusal points for a declared mode the adapter does not list,
never searched another way:
1. save (`admitAuthoredSource`): `400 VALIDATION_ERROR`, listing the
modes the store runs;
2. registration in code (`registerSource`): the same refusal, only when
the adapter already resolves (startup registry reads). A published item
(`registerMetadataSource`, the loader) is not refused there: the loader
runs after every store has started, so a refusal would drop it whole; it
is registered and indexed, and points 3 and 4 refuse it (review M1);
3. once after boot (`reportUnsupportedRetrieval`, called at
`kernel:bootstrapped` beside `reportUnmountedAdapters`), at `error`;
4. every search (`planSearches`): listed in `refused` with
`SERVICE_UNAVAILABLE` (503), the code an unmounted adapter's source
already carries.
- Every search hands the store `AdapterSearchOptions.retrieval` and logs
the mode and its origin at `debug`; the caller's answer carries neither.
- `index_status` entries carry `retrieval` (declared, effective mode,
origin, the store's modes, refused), and the answer lists each mounted
store's modes (`details.adapters`) and the store a source naming none
binds to (`details.defaultAdapter`), the data the Studio form PR reads.
New service member `describeRetrieval`.
- Contract suite: service-level cases for every adapter (a listed mode
is handed through; an unlisted one is refused at registration in code
and at every search, and still indexes; a published item loaded after
its store started is registered, indexes, is named by the boot reading
and is refused on every search).
- Liveness row flips to `live`; protocol doc §3.1 and the save guard;
patch changeset.

## Tests

- New `retrieval-mode-38692.test.ts` (16 cases): resolution, refusal
text, each refusal point, debug log and its absence from the answer,
still indexes, the loader path (a published item with its store already
started), plugin hook, `index_status`.
- `service-knowledge`: 861 passed (26 files, at 1a7ba24); typecheck
clean. `knowledge-memory` 70 passed and `knowledge-turso` contract 110
passed against this head's suite. `knowledge-memory` contract 54 passed;
`knowledge-turso` 110 contract passed; live pgvector contract 55 passed.
- With each adapter PR merged in locally: turso 326 passed, pgvector
against live PostgreSQL 133 passed.

## Acceptance notes

- The per-search refusal code is reused rather than added:
`SERVICE_UNAVAILABLE` (503), the code an unmounted adapter's source
already carries. The ruling and the phase-0 note say only "with its
code"; open question C, confirmed by Warren on 2026-11-30 at 12:40Z
(「同意」): the refusal stays 503.
- Declared `Metadata-protocol: none`: what an author can write was added
by the spec PR; this PR reads it. The save refusal of a mode the store
does not run is the shape the ruling gives the key from birth, in the
same release.
- Facade gate: `knowledge-service.ts` 1681 lines of 1758; both new
members are one-call delegations.

## Verification

- Two-minute check: `pnpm --filter @objectstack/service-knowledge exec
vitest run src/__tests__/retrieval-mode-38692.test.ts` → 16 passed.
- Related local gates (26 of `dispatch-gates.mjs --commands`: docs,
liveness, changeset, facade, error-code, ledger): all green.

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes.
- [ ] 4. One issue, one branch off an up-to-date `main`, one pull
request. (Stacked: see "Stack" above.)
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01JQwxbaASqBozmmj1n5tbUf

<!-- signed: repo:objectstack#2 · os-warren ·
session_01JQwxbaASqBozmmj1n5tbUf -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
… mode (objectstack-ai#38721)

<!-- claude-projects-attribution: {"github_login":"os-warren"} -->
_Requested by **Warren** · [project
thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ8QCBjsNDZa4iwo35VN5fKKg)_

Part of objectstack-ai#38692

Clause-②: yes (widening)
Metadata-protocol: none

## 维护者速读

- 使用 turso 存储的知识源可以按选定方式检索:只按意思、只按字词或两者结合;不选仍是两者结合,结果与现在逐位相同。
- 属于知识管理专题「一期 a:检索方式」。
- 出错会是某种方式漏掉或多出段落;未声明方式的知识源不受影响,可直接撤回。
- 无。

## Stack

Base: `main`. objectstack-ai#38697, the spec PR objectstack-ai#38720 and the phase-0 ADR note objectstack-ai#38714
are all merged and `main` is merged in, so this diff is the adapter's
own 6 files. It lands in the same release as the service PR objectstack-ai#38722,
which is the first reader of the mode.

## What changes

- `knowledge-turso` reports `capabilities.retrieval = { modes:
['vector', 'keyword', 'hybrid'], default: 'hybrid' }`.
- A search runs only the legs its mode names, in SQL: `keyword` binds no
vector and never calls the embedder (nor reads the one-bit approximate
index); `vector` drops the FTS5 leg.
- A single-leg answer is scored on the same RRF scale: rank n scores
61/(60+n) after normalising, so the first hit is 1. `hybrid` is
unchanged; `fuse(rows, topK, legs)` keeps the two-leg expression
bit-identical.
- README "Retrieval modes" paragraph, protocol doc §4.2 sentence, patch
changeset.
- A mode the store does not list is refused (`400 VALIDATION_ERROR`)
before anything is embedded or read, rather than run on the one-leg
scale (review S1). `Clause-②: yes (widening)`: the exported adapter's
`capabilities` grows `retrieval` (review M1).

## Tests

- New `retrieval-modes.test.ts` on a real libSQL store: legs per mode,
embedder calls, tie order by chunk id, single-leg scores, keyword never
reads `vector1bit(` while vector does, hybrid fusion pinned bit-for-bit.
- Contract suite with `implements.retrieval: true`.
- `knowledge-turso`: 319 passed at 2496e51 (the refused-mode case
added); typecheck clean. Ablation: keeping the keyword leg under
`vector` turns 3 cases red, restored.

## Acceptance notes

- With the service PR applied on top, the full turso suite (326,
including the service-level mode cases) passes.

## Verification

- Two-minute check: `pnpm --filter @objectstack/knowledge-turso exec
vitest run src/__tests__/retrieval-modes.test.ts` → all pass.

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes.
- [ ] 4. One issue, one branch off an up-to-date `main`, one pull
request. (Stacked: see "Stack" above.)
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [ ] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed. (Not touched.)
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01JQwxbaASqBozmmj1n5tbUf

<!-- signed: repo:objectstack#2 · os-warren ·
session_01JQwxbaASqBozmmj1n5tbUf -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…odes its store runs (objectstack-ai#38730)

<!-- claude-projects-attribution: {"github_login":"os-warren"} -->
_Requested by **Warren** · [project
thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ8QCBjsNDZa4iwo35VN5fKKg)_

Part of objectstack-ai#38692

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 管理员在 Studio
编辑知识源时,「检索方式」下拉只列出该知识源所用存储支持的方式,并写明「存储默认」是哪一种;存储未声明时显示「驱动未声明检索方式」。
- 属于知识管理专题「一期 a:检索方式」。
- 出错只会是下拉列错选项;保存时服务端仍会把不支持的方式拒掉,可直接撤回。
- 无。

## Stack

Base: `main`. Stacked on the service PR objectstack-ai#38722 (it reads
`index_status`'s `adapters` and `defaultAdapter`, which objectstack-ai#38722 adds) and
through it on objectstack-ai#38720; until those merge, this diff carries their
commits. Lands after both and after the phase-0 ADR note (objectstack-ai#38714).

## What changes

- The knowledge source form's `source.retrieval.mode` row names a new
widget, `knowledge-retrieval-mode` (spec form hint). A host whose
registry lacks the picker draws its unregistered-widget face (the JSON
editor), not a select; the three static `options` stay because the
form's generated translations carry their labels.
- `ResourceEditPage` loads, only for a form that declares the widget,
the store the draft binds to (its `adapter`, else `defaultAdapter`) and
the modes it reports, from `POST /api/settings/knowledge/index_status`
(`knowledgeRetrieval.ts`), into `WidgetContext.knowledgeRetrieval`.
- The picker: the store's listed modes plus a blank choice that names
the default ("Store default (Hybrid (both))"); a store that reports none
offers the default alone with "驱动未声明检索方式(STORE),此项请留空。"; a mode already
written that the store does not run is kept and flagged; no store answer
(refused read for an author who is not a platform administrator, store
not mounted, no host) offers the three modes and the save judges.
- en and zh strings in the studio namespace; registry cases in the two
widget registry tests; changeset (spec, app-shell, i18n patch).

## Tests

- New `KnowledgeRetrievalModeWidget-38692.test.tsx` (12): form row names
the widget, labelling, offered options per store shape, undeclared
sentence, flagged stored mode, fallbacks, writes and default removal,
disabled states, `storeRetrievalOf` parsing.
- Related UI suites: 180 files / 2,791 tests passed (widgets,
metadata-form, SchemaForm, i18n, console registry parity),
`ResourceEditPage*` 67 files / 342 passed; app-shell `tsc --noEmit` and
`tsconfig.test.json` clean before the main merge; spec form test 9
passed.

## Acceptance notes

- `index_status` is gated on `manage_platform_settings`; an author
without it gets the three-mode fallback, never an error card.
- The draft's `adapter` re-reads the store on change (one request per
distinct value).
- After merging `main` (with objectstack-ai#38700) the app-shell `tsc` reports one
error in `RecordDetailView.tsx` (`pinOverview`), outside this diff, from
a stale local build of a sibling package; not measured further here.

## Verification

- Two-minute check: `pnpm --dir ui exec vitest run
packages/app-shell/src/views/metadata-admin/KnowledgeRetrievalModeWidget-38692.test.tsx`
→ 12 passed.
- UI gates run: `check:i18n-keys`, `check:i18n-drift`,
`check:i18n-dead-keys`, `check-sdui-manifest`, `ui/scripts` vitest,
changeset gates: all green.

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes.
- [ ] 4. One issue, one branch off an up-to-date `main`, one pull
request. (Stacked: see "Stack" above.)
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01JQwxbaASqBozmmj1n5tbUf

<!-- signed: repo:objectstack#2 · os-warren ·
session_01JQwxbaASqBozmmj1n5tbUf -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…ll lists source.retrieval.mode (objectstack-ai#38732)

<!-- claude-projects-attribution: {"github_login":"os-warren"} -->
_Requested by **Warren** · [project
thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ8QCBjsNDZa4iwo35VN5fKKg)_

Part of objectstack-ai#38692

Clause-②: no
Metadata-protocol: none

## 维护者速读

- AI 助手搜知识库时会被告知:分数只表示同一知识源内的先后,不表示相关程度;AI 作者文档写明了检索方式的用法。
- 属于知识管理专题「一期 a:检索方式」。
- 出错只会是说明文字不准,不影响搜索结果,可直接撤回。
- 无。

## Stack

Base: `main`. Stacked on the service PR objectstack-ai#38722 (and through it objectstack-ai#38720);
until those merge, this diff carries their commits. Lands after both and
after the phase-0 ADR note (objectstack-ai#38714).

## What changes

- `search_knowledge` description: one sentence, the ruling's
「分数只表示同一知识源内的先后,不表示相关程度」: "A hit's `score` says only its order among the
hits of its own source, not how relevant it is." The `score` member's
doc says the same, with the one-leg rule (first hit scores 1).
- `skills/objectstack-ai/SKILL.md`: a `source.retrieval.mode` row in the
knowledge source key table; paid for in the same file (the `adapter`
row's save refusal shortened, the one-slot sentence dropped, the closing
rerank line made one clause and no longer says "hybrid weighting"). The
row says an unsupported mode fails a run-time save and, for a shipped
source, every search (503). Ratchet row lowered 7248 → 7247.
- `content/docs/ai/knowledge-rag.mdx`: the "0.5 for one first in only
one" paragraph now says a source can run one leg alone, its first hit
then scores 1, and scores order one source's hits only.
- Patch changeset, naming `@objectstack/service-knowledge` and
`@objectstack/skills` (which ships the SKILL.md).

## Tests

- `service-knowledge`: 860 passed (no test pins the description text).
- Skill gates: token ratchet, links, identifier liveness, frame sync and
freshness, top-level keys, affected docs: all green.

## Acceptance notes

Skill readings (`skills/**` touched):

| | before | after |
|:--|--:|--:|
| `skills/objectstack-ai/SKILL.md` lines | 507 | 507 |
| `skills/objectstack-ai/SKILL.md` bytes / tokens | 29017 / 7248 | 28990
/ 7241 |
| all `skills/*/SKILL.md` lines | 3406 | 3406 |
| all `skills/*/SKILL.md` bytes | 180659 | 180632 |

Net growth zero: the new row is paid by deletion in the same file.

## Verification

- Two-minute check: `node scripts/check-skills-token-ratchet.mjs` →
green, `objectstack-ai/SKILL.md` 7241 / 7241.

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes.
- [ ] 4. One issue, one branch off an up-to-date `main`, one pull
request. (Stacked: see "Stack" above.)
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01JQwxbaASqBozmmj1n5tbUf

<!-- signed: repo:objectstack#2 · os-warren ·
session_01JQwxbaASqBozmmj1n5tbUf -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…n once, and its refusals stay ahead of the embed (objectstack-ai#38812)

<!-- claude-projects-attribution: {"github_login":"os-warren"} -->
_Requested by **Warren** · [project
thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ8WwwNJsfXjR7KkaXqjQxjFx)_

Part of objectstack-ai#38676

**Update, head `a28863cef9`.** PR objectstack-ai#38809 (card objectstack-ai#38438) landed first, at
2026-12-01T03:58Z, and took the seventh and eighth `**Amended**` lines
of ADR-0161. This head merges `main` into the branch (merge commit
`a28863cef9`, no rebase): main's lines are kept as they are, this PR's
header line follows them, and its ordinal reads "a ninth dated note".
That one word is the only change to this PR's text (delta report
7300564224 on objectstack-ai#38676); the net diff against `main` is still this note
alone, +17 / -0. The gate readings and the overlap paragraph further
down are of the earlier head `f3cd7dba76`; the 21 derived gates were
re-run at `a28863cef9`, all exit 0.

This is phase 0 of the card's cause 3 and nothing else: the dated note
in ADR-0161. The card stays open for phase 1, the patch round on PR
objectstack-ai#38798, which waits for this note to merge.

Clause-②: yes (widening) — the two optional adapter-contract members the
note registers
Metadata-protocol: none

The two lines above are the claim's (comment `7296290387` on the card)
and cover both phases. This pull request changes no contract file: the
widening is what the note registers and PR objectstack-ai#38798 builds.

## 维护者速读

- 用户能看到什么变化:用户无感;只是在知识平台边界那份架构决策记录里追加一条 2026-12-01
的说明,把你当天选定的「写进约定,一次提问只转一次」和它的附带条件写成文字,不改任何代码。
-
为什么做:这是「知识检索慢」那张卡最后一项(补查时把同一个问题重复转成向量)的前置一步;平台和存储驱动之间的约定是一份封闭清单,要先在决策记录里登记这两项,已经做好的改动才能合并。
- 出错会怎样:说明里若有和你的裁决不一致的句子,接下来改代码的人会照着错的文字去做;它只是一处文档追加,可以直接撤回,不影响任何在运行的系统。
- 要你做什么:请审阅并批准这条说明;其中标了菱形记号的两处是说明自己定的写法,可以一并接受,也可以划掉。

## What changes

One file, add-only.
`docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md`
gains its ninth dated note: 17 lines added, none changed and none
removed (659 lines to 676 on `main` after objectstack-ai#38809). Three commits carry
it, the third being the merge of `main`, `a28863cef9`: `f00518e716`, the
note, and `f3cd7dba76`, a review pass over it (Acceptance notes).

**Ruling.** The maintainer chose option A for cause 3 on
2026-12-01T00:22Z: ruling record
[`7296268226`](objectstack-ai#38676 (comment))
on the card, given on analysis `7290428149`. He ruled by choosing an
option of a decision card, and the note quotes the card's words
unchanged: the option 「写进约定,一次提问只转一次」 and the condition
「附带条件:存储驱动原本会给出的拒绝提示(比如“需要重建索引”)要保持在前面,不能被转向量的报错盖掉。」 Nothing of the
ruling is opened again here.

Three insertions, in the form the six earlier notes of this record use.
Line numbers are at head `a28863cef9`.

| Lines | Where | What is added |
|---|---|---|
| 27 | Header, after the `**Amended**` line of the eighth note | A ninth
`**Amended**` line, dated 2026-12-01: the two members, the texts the
note is read with, the ruling record, the chosen option and the
condition. |
| 166 | K1, under the note of 2026-11-30 on rerank | A cross-reference:
the "Embedding calls" row, and "compute a vector" in the second sentence
of the list, are read with the new note. |
| 483 to 496 | K8, under "Rules for every member" | The note itself: an
opening paragraph, nine bullets and a last paragraph. |

What the note decides:

- **Two optional members, and the list stays closed beyond them** (K8
rules 3 and 5). `IKnowledgeAdapter.embedQuery?(query: string)`, which
answers a promise of a `number[]`, and
`AdapterSearchOptions.queryVector?`. No capability flag: the method's
presence is the signal.
- **The type of the second member.** A function of no arguments that
answers a promise of a read-only `number[]`. It is not the vector
itself. For one search the knowledge service makes one such function for
each adapter instance that has `embedQuery`. The first call of the
function calls that instance's `embedQuery`; every later call in that
search answers the same promise, a rejected one too. An adapter calls it
at the point of its `search` where it embeds the query today. This is
the per-search memoised provider the analysis recommends, and the one
choice the ruling record leaves to the note.
- **The three readings that M1 of contract review
[`7290045524`](objectstack-ai#38798 (comment))
left open.**
1. The adapter still embeds, with its own embedder and query prefix. The
service computes no vector: it carries one back to the instance that
made it, inside one search. The "Embedding calls" row of K1, the second
sentence of the list under it and item 15 of K8 stand as written.
2. One vector serves every source a search binds to that adapter
instance. An adapter whose query embedding depends on the source does
not implement the method.
3. A handed vector is checked by its width. The model is judged on the
index fingerprint, as K7 has it.
- **The condition, as an outcome.** An adapter's refusals are answered
as on `main`, code, status and remedy, and no question is sent to an
embedding provider for a source the adapter refuses. The ruling record's
case: a source that needs a rebuild behind a failing embedder answers
`KNOWLEDGE_REBUILD_REQUIRED` 409 with 0 embedder calls. The function
gives this by construction, because an adapter asks for the vector only
after everything it decides first.
- **What the members land with.** PR objectstack-ai#38798, after this note merges:
both members with their first readers in one PR and one case in the
contract test suite (rule 1). Each is optional (rule 2), and an adapter
without `embedQuery` is searched as before.
- **Not in the note.** A vector handed by a caller of the service or by
a tool argument, a memo an adapter keeps past one search, a source or
context argument on `embedQuery`, and a form that embeds several
questions at once.

No file under `packages/`, `content/`, `skills/` or `ui/` changes, and
no other ADR does. The note declares; it builds nothing.

## Why

K8 rule 5 of this record: "The list is closed. A member that is not in
the table needs a dated note on this record first." PR objectstack-ai#38798 built the
two members before the record named them, and its contract review is
FAIL on that point (M1). The ruling puts the record before the code:
this note first, then the patch round on objectstack-ai#38798.

## Tests

The diff touches no package, so there is no build closure to make and no
package test or type-check owed. What was measured, at head
`f3cd7dba76`:

- **The premise holds.** Read on `main` at `0fc9eab900`, the commit this
branch starts from. A refilled search still embeds the question twice:
-
`packages/services/service-knowledge/src/knowledge-service-search.ts:232`
is the first `searchRound` call and `:245` is the refill's.
- `:957`, inside `searchRound`, calls `adapter.search` once for each
source.
- `packages/plugins/knowledge-turso/src/turso-adapter.ts:741` and
`packages/plugins/knowledge-pgvector/src/pgvector-adapter.ts:657` embed
the query inside that call.
- No line under `packages/`, `content/` or `docs/` names `embedQuery` or
`queryVector` (`git grep` exit 1).
- `origin/main` has since moved one commit, to `d97aaaea9a` (objectstack-ai#38802: one
skill file, one ratchet script and a changeset). It changes none of the
files read here, so each reading holds there too, and this branch merges
with it cleanly. The branch was not merged with it.
- **Quotations.** A script compared every quoted span of the added lines
with its source, read over REST or from the ADR at the base. 9 spans in
corner brackets: each is a verbatim substring of ruling record
`7296268226`. 27 spans in double quotation marks: each is verbatim in
that record, in analysis `7290428149`, in review `7290045524` or in the
ADR at the base. 0 mismatches. (The nested title "What "capabilities"
became" counts as two spans.)
- **Bytes.** The added lines hold no raw control byte, no HTML comment
and no model identifier.
- **What an adapter decides ahead of its embed**, the list in the note's
bullet on the condition, read in both stores on `main` at `0fc9eab900`:
an empty organization set, a scope with no ids and a `topK` of zero
answer no hits; the store and the embedder are present and the store is
ready; the source has an active generation; that generation holds the
searched fingerprint and the embedder's width, or the refusal is
`KNOWLEDGE_REBUILD_REQUIRED` (409, with its remedy); the mode is one the
adapter runs; and `keyword` never embeds. Each is ahead of the embed in
`turso-adapter.ts` (lines 699 to 741) and in `pgvector-adapter.ts`
(lines 581 to 657).
- **PR objectstack-ai#38798 as it stands**, read at head `4561e81d0e`: `queryVector`
is the vector itself there, a read-only `number[]`, and `embedQuery` has
the signature the note writes.
- **Anchors.** Every code citation in the note is a path with a symbol,
never a line number, and `check:adr-symbol-anchors` reads all of them
(its verdict line is below).

No ablation: the diff changes no behaviour a test pins.

## Acceptance notes

**The committed note took the function, not a plain array.** A plain
array has to exist before `search` is called, so the service would have
to embed ahead of every decision the adapter makes. A refused source
would then cost an embedding call, and a failing embedder would answer
in place of the adapter's own refusal. That is the shape review
`7290045524` graded S2, and it cannot meet the condition. The function
can, and the note names it as the means it takes.

**The review pass, commit `f3cd7dba76`.** Two sentences of the note
changed; nothing it decides moved.

1. The opening said that every statement without a diamond is the ruling
record's, the analysis's, what follows from the means, or a reading of
`main`. Some rest on review `7290045524`, on this record's own rules, on
PR objectstack-ai#38798 at its head or on the body of the card. The sentence now lists
them.
2. The signature of `embedQuery` is the one PR objectstack-ai#38798 declares at head
`4561e81d0e`. The bullet on the two members now says so.

**Two things are marked with a diamond, for the approver to accept with
the note or strike.**

- a. The means, and with it the member's type. Three points go with it
and are the note's wording: the name `queryVector` is kept though the
member is now a function; the service hands the function on every
`search` call of that search and does not judge whether a call will
embed; and a rejected promise is shared like a fulfilled one, so one
failed embedding call refuses each source that asked for the vector in
that search.
- b. One sentence added to the third reading: a caller that reaches an
adapter's `search` directly and hands the member answers for the
function, and the adapter does not verify it.

**Wording that is the note's and not a quotation**, each resting on a
text named beside it:

- The suite case is the one review `7290045524` asks for under S1,
rewritten with the function in the vector's place.
- "The condition has its own pin in each of the two stores": the ruling
record says "a pin". Each store orders its own decisions ahead of its
embed, so the note asks for the case in each.
- The English beside the card's Chinese words is a reading aid. The
Chinese is quoted unchanged.

**Overlap with an open draft on this file.** `node
scripts/pm/overlap-check.mjs --repo=objectstack-ai/objectstack`, run at
`f3cd7dba76` against `origin/main` at `d97aaaea9a`, printed `VERDICT
overlap exit 1`: `origin/main` merges cleanly, and draft objectstack-ai#38809 (the
weekly ADR revisions, second part, opened 2026-12-01T00:50Z by another
seat's thread) conflicts with this branch in this file. Both insert
header lines after line 24, and both call their first line "a seventh
dated note" (objectstack-ai#38809 adds a seventh under K7 and an eighth under
Consequences). Its two notes and this one touch no common passage.
Whichever lands second merges `main`, keeps both sets of header lines
and corrects its ordinals. Which lands first is the seats' to settle; it
is put as a question in the report on the card.

**What the note asks of PR objectstack-ai#38798, none of it done here.**

- `queryVector` changes type there, from the vector to the function, and
the service stops calling `embedQuery` ahead of `search`.
- One case in the contract test suite, and a pin in each of the two
stores for the ruling record's case.
- The docblocks cite the note and no longer say that the knowledge
service embeds.

**Text of ADR-0161 that the note is read beside. Listed for the seat,
not changed.**

- "What "capabilities" became" lists the methods whose absence is the
capability signal (listing, dropping, status, the start and end of a
build). `embedQuery` joins them by this note; the paragraph is left as
written.
- The K2 row for §3.4 of the protocol page says what the contract
carries. Its last column gives the rewrite to "each card that adds a
member", so objectstack-ai#38798 rewrites it with its code.

**Not done here.** No changeset: `docs/adr/` is published by no package.
The two earlier note pull requests on this record, objectstack-ai#38714 and objectstack-ai#38764,
each carry the `skip-changeset` label, hung in the stroke that opened
them. This one is opened with no label, as its dispatch order says, so
that label is owed by the seat, and `Check Changeset` has no exemption
until it is hung.

## Verification

**Read first, by risk.** One file changes, so these are its three places
of most risk.

1. Line 476, the bullet marked with a diamond, "The means, and with it
the member's type". It is the one decision the note makes, and it sets
what the patch round on PR objectstack-ai#38798 must build.
2. Line 480, the bullet "The condition, as an outcome". It states the
maintainer's condition and what holds when the embedding call itself
fails.
3. Line 479, the last two sentences of "The third reading": the note's
own sentence on a caller that reaches an adapter directly.

**Two-minute check.** One click: open the "Files changed" tab. Expected:
one file, +17 −0, three hunks, every changed line an addition.

**Landing.** `docs/adr/**` is a governed surface. This is opened as a
draft. The hand-off is the seat's and the approval is the maintainer's.
Nothing here requests a reviewer, marks it ready or arms auto-merge.

**CI.** NOT MEASURED: the check-runs of this pull request, reason: it
did not exist when this body was written. The report on the card carries
the reading taken after it opened.

**Gates, run locally on head `f3cd7dba76`.** `node
scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derived 21 commands from the diff. All 21
ran in the foreground, each exit code was captured before any pipe, and
all 21 are exit 0. The reconciliation:

```text
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).
```

<details>
<summary>The 21 commands and their exit codes</summary>

```text
node scripts/check-adr-links.mjs :: exit 0
node scripts/check-adr-links.mjs --self-test :: exit 0
node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-comment-mask-corpus.mjs :: exit 0
node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0
pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0
pnpm check:adr-anchors :: exit 0
pnpm check:adr-index :: exit 0
pnpm check:adr-symbol-anchors :: exit 0
pnpm check:ci-filter-parity :: exit 0
pnpm check:closed-ceremony-text :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:doc-authoring :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:gitlink-declared :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:pm-governed-merges :: exit 0
pnpm check:pm-prior-rulings :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:watch-hint-literal :: exit 0
```

</details>

<details>
<summary>Verdict lines of the gates that read the ADR</summary>

```text
✅ check-adr-links: 1284 relative link destination(s) under docs/adr/ resolve
✅ check-adr-symbol-anchors: 4608 anchors across 165 records resolve — 1727 symbol (1698 declaration, 29 literal), 2829 file-level, 52 cross-repo, 6 exempt, 132 continuation. [cut here: the rest of the line is a note on what the count is not]
adr-index --report: OK — docs/adr/README.md is current, every record parsed, self-test 60 assertions green. Report-only: this line never reds the step.
check-nul-bytes: OK (scanned 29077 text file(s) -- 29077 tracked, 0 untracked-not-ignored; skipped 101 binary; no raw ASCII control bytes).
✓ check-closed-ceremony-text: 6688 shipped file(s) read; none says the ownership ceremony is closed.
✓ comment-mask corpus sweep [scripts/js-comment-mask.mjs]: 24511 files, 0 disagree, 0 unparseable, 211.2s (comparator self-test: 26 cases pass).
```

</details>

<details>
<summary>One gate first read NOT MEASURED, then green</summary>

`pnpm --filter @objectstack/lint run check:doc-formula-expressions`
first answered exit 3, PREREQUISITE NOT MET: two workspace packages it
imports were not built in this worktree. That is a run that measured
nothing, not a red gate. The two packages were built under the shared
verify lock, with the command the gate printed, and the gate was run
again at the same head:

```text
os-verify-lock: VERDICT command-exit 0 · held the lock 100s (1m40s) · waited 0s
pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0
```

</details>

**Left to CI, not run locally.** The repo-wide lint, the type-check
lanes, the test shards, and the families `dispatch-gates` prints outside
the derived list. The commit trailer gate ran in the pre-push hook on
the pushed range and is green.

## Human Minimum

- [x] 1. No schema and no code changes.
- [x] 2. No new name is declared in code. The two member names are the
ones PR objectstack-ai#38798 and the analysis use.
- [x] 3. No formatter ran. `pnpm lint` is NOT MEASURED locally: the
repo-wide scan is CI's, and the diff is one Markdown file.
- [x] 4. One card, one branch off `main` at `0fc9eab900`, one pull
request for this phase.
- [x] 5. Nothing publishes, so no changeset; both declaration lines are
filled in above.
- [x] 6. `packages/spec` is not touched.
- [x] 7. No edit to `content/docs/references/`, to a `CHANGELOG.md` or
to `content/docs/releases/`.
- [x] 8. Title, body and comments are in English. The card's Chinese
words are quoted unchanged, and the 维护者速读 section is in Chinese as the
fleet's rule asks.
- [x] The *Before Submitting* list is done for what a docs-only diff
reaches; `pnpm lint` is as item 3 says.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01JQwxbXfgA45f3y5YpDPT5h

<!-- signed: repo:objectstack#2 · os-warren ·
session_01JQwxbXfgA45f3y5YpDPT5h -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
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 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.

3 participants