Repository navigation
Commit 95ffacc
<!-- claude-projects-attribution: {"github_login":"os-warren"} -->
_Requested by **Warren** · [project
thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ87Bhnzn6nuM3CkcDbCdpBT9)_
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`](#38692 (comment))
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`](#38692 (comment))
(「可选(推荐)」, 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
#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`](#38692 (comment)),
「可选(推荐)」): 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:
```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: 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
```
</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 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:
```text
VERDICT command-exit 0 · held the lock 4s · waited 1s
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 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
- [x] 1. No schema and no code changes.
- [x] 2. No new name is declared in code. The names the note writes are
the ruling's.
- [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 `5a77a7063e`, one pull
request.
- [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 maintainer'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 by [Claude
Code](https://claude.ai/code/session_01JQwxbYfLbF7sSvBHtuXbvT)_
<!-- signed: repo:objectstack@os-warren · os-warren ·
session_01JQwxbYfLbF7sSvBHtuXbvT -->
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 004940f commit 95ffacc
1 file changed
Lines changed: 27 additions & 0 deletions
0 commit comments