Repository navigation
docs(adr): ADR-0161 dated note — a knowledge source declares rerank; the knowledge service reranks after the permission re-check - #38764
Conversation
…d the knowledge service reranks after the permission re-check A sixth dated note under K1, add-only. It records the maintainer's rulings of 2026-11-30 on knowledge retrieval rerank: a knowledge source may declare retrieval.rerank, the deployment configures the reranker and no source names a model, and the knowledge service reranks after the permission re-check and before the cut to topK. Adapters are unchanged. The note amends by name the "Rerank" row of K1, the second sentence of the K1 list, rule 4 of K8 and the sentences of the earlier notes that speak of rerank; cross-references stand under K2, K4 and K8, and the header gains an Amended line. No existing line of the record changes. Claude-Session: https://claude.ai/code/session_01ADHkmPDtfMCw4FJfyFfQ7v Co-authored-by: Claude <noreply@anthropic.com>
… this record's own and tighten four sentences The note's first draft wrote the rerank card's decisions as D1 to D6, which this record already uses for the key-words line of 2026-11-24. They are now written with their card number, and the record's own "the epic" keeps meaning what it meant. English renderings of the maintainer's words lose their quotation marks, so every quoted English span is verbatim from a source or is one of the two amended sentences. Still add-only against main. Claude-Session: https://claude.ai/code/session_01ADHkmPDtfMCw4FJfyFfQ7v Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#3 · os-steve · session_01ADHkmPDtfMCw4FJfyFfQ7v Final head for review — zone o3-K · 2026-11-30T12:45Z |
|
repo:objectstack#3 · os-steve · session_01ADHkmT9HTWLMN33WUVxVWB 席位核对ACCEPT @ 6552e29 (card #38760,
Checks at this head (read before writing): 26 success, 27 skipped, 0 failure. |
|
repo:objectstack#3 · os-steve · session_01ADHkmSAjFEZHRpRq3WCj6z Contract reviewServed-tier: PR #38764, card #38760 (row 1 of epic #38750). One file, +28 / -0, five insertions, no existing line edited. Read: the card and its three comments, the epic body and its ruling comments (7276086125, 7276135635, 7276183954, 7276461244), the PR body, the net diff, the ADR at the base ( ① Derived judgments
② Semver levelNothing publishes: ③ Boundary flags
SQL push-down: not applicable. The diff holds no code, no id materialisation and no join. Security: the hits path is not under ④ Design judgment(1) Is every sentence the card lists reached? Yes. The base holds the word on fifteen lines. Twelve are the card's and each is reached:
The other three lines are not contradictions: line 22 is the fourth note's header quoting the sentence it amended, line 58 is Context describing the old texts, line 210 is (2) Does the note state the ruled contract and no more? Yes. Each statement was traced to its source, and every quoted span was compared with it: all corner-bracket spans and all double-quoted spans are verbatim in the epic body, a ruling record or the ADR at the base, except the two sentences the note composes (the new list sentence and the new rule 4), which is what the note says of itself.
Row 2 and row 3 details are not promised. Pool size under the ceiling, the order of rerank and (3) Is the add-only route acceptable for a reader? Yes. The sixth (4) Is the K4 cross-reference accurate? Yes. The key, its type and its group are as ruled; "lands with its first reader ... row 2 of #38750" and "not reserved before that" agree with K4; the contrast with the (5) Consistency with the rest of ADR-0161. Holds.
Overlap with draft #38720. Its one hunk on this file replaces the K2 row at line 153 (context 150 to 156). This PR inserts at 24, after 140, after 163, in K4 and in K8, so the two merge in either order. The texts agree in either order too: #38720's row ends "still no configuration and no rerank", and the note says the §3.4 row "keeps its 'no rerank'", true of the row as it is and as #38720 leaves it. The note's " Findings. No must-fix, no should-fix.
Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-steve · session_01ADHkmSAjFEZHRpRq3WCj6z 维护者速读
Seat opinion: land as is. 席位核对ACCEPT at head
ACCEPT → comment 7278949690 · Contract review → comment 7279030801 |
…s five records) (objectstack-ai#38774) <!-- claude-projects-attribution: {"github_login":"os-support-ai"} --> _Requested by **Yibo Wang** · [project thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBHuLciv5hYVYUu4pypDP48J)_ Part of objectstack-ai#38438 Clause-②: no Metadata-protocol: none This pull request carries seven of the card's nine rows. The two ADR-0161 rows stay on the card; see "Rows not carried". ## 维护者速读 - 用户能看到什么变化:用户无感;只在五份设计记录里补了七条带日期的说明,写明主线现在实际怎么做,原有的决定文字一个字没动。 - 为什么做:属于「每周设计记录修订」滚动清单(11 月 29 日这一周);清单每一行指出一处「记录写的和主线不一致」或「记录留给某项工作回答、那项工作已经做完」,这次把代码已在主线的七行一并补齐。 - 出错会怎样:最坏是某条说明写得不准,照着设计记录干活的人会被带偏;纯文档、只增不删,可以直接撤回,不影响任何功能。 - 要你做什么:请审这七条说明并批准一次(设计记录须由你本人批)。 ## What changes Five ADR files gain seven notes dated 2026-11-30. Every diff line is an addition: 62 lines added, 0 removed. No original decision text is rewritten, and no decision changes. Each note follows the note convention its own record already uses, and each says that the passage it is read with is left as written. Each row's "what is true now" was read against the code on `main` before its note was written. Where a row's wording did not match the tree, the note says what `main` does; the last column says so and the list under the table gives the detail. | ADR · section | Was (the record's words) | Now (what the note records) | Source PR | Row on the card · result | |:---|:---|:---|:---|:---| | ADR-0084 · amendment of 2026-11-28, item (3) | "one landing for every door is not ruled"; the command palette's package entries, an app's design-in-Studio entry, the empty menu's entry and Setup's doors "still open the object list" | One landing is ruled: ruling record 7247357556 on objectstack-ai#37958, the maintainer's 「OK」, quoted with its question. Every door lands on the package's overview, `/studio/PACKAGE/overview`. `/studio/PACKAGE/data` stays a working address for the object list. The review-changes deep link still opens the Changes drawer over the object list and is read as no door, by a seat reading and not by a ruling | objectstack-ai#38501 | Card body row and 7252442785 · **written, corrected to the tree** (two labels, the date) | | ADR-0084 · the note of 2026-11-29 on the `form` row (near line 219) | "The same change takes the type off the directory's hidden types and brings its designer" | True of card objectstack-ai#37087, loose for the change: objectstack-ai#38484 brought the designer, and objectstack-ai#38619, which wrote the row, lists the type (off the hidden types, a place in the menu) | objectstack-ai#38484, objectstack-ai#38619 | 7258423977 · **written as an added note** (the row says "Reword") | | ADR-0037 · TL;DR item 2 and the "What already exists" table | "the streaming build tree (`data-build-progress` parts)", and a table row that marks "`data-build-progress` stream parts" shipped | The build-progress stream frame is retired. Its reader left with the build chat frontend, its producer with the cloud build loop, and its declaration left `@objectstack/spec/ai`. The upgrade guidance is the migration entry `ai-build-progress-frame-retired` | objectstack-ai#38398 (reader: objectstack-ai#37720) | 7250363289 · **written** (one sentence beyond the row) | | ADR-0150 · the note of 2026-11-26, bullet "Reads stay the missing name" | "Three reads at `_env` still answer `409` at this head (`?state=draft`, `?preview=draft`, `?layers=true`), and card objectstack-ai#34261 carries their move to `404`." | The move has landed. For a name only disabled packages hold, each of the three answers its own `404` and names no package, on both transports. An enabled package's stored draft that the plain read does not see keeps the `409` for the two draft reads | objectstack-ai#38633 | 7259890438 · **written, corrected to the tree** (codes and callers made exact) | | ADR-0150 · D4, the engine's flow-map row | The table keys the engine's flow map by `(package, name)` and says nothing of the status rows read from it | Each status row carries the `packageId` of the engine slot it reads, so `(packageId, name)` names one row. The toggle door reads back the row of the slot it switched, and echoes the request only where the reading cannot name that flow | objectstack-ai#38652 | 7266385586 · **written** | | ADR-0085 · the note of 2026-11-27 | "Neither key is in the spec yet: `ObjectSchema` is strict and refuses both until objectstack-ai#37792 lands `pinOverview` and objectstack-ai#37802 lands `fieldTabs`." | `pinOverview` is in the spec, an optional boolean on `ObjectSchema`; `false` means the desktop full record page never pins. An object extension does not carry the key. `fieldTabs` is still refused | objectstack-ai#38679 | 7271302663 · **written**, no `fieldTabs` line | | ADR-0146 · the note of 2026-11-24 (near line 908) | "A `.custom` package that is not the object's pair is not applied, and the boot log names it." | Maintainer ruling 7268226134 on objectstack-ai#36548, item 5, arm (c), verbatim 「保存和安装都拒绝」. A non-pair `.custom` package that writes `fieldGroups`, `relatedLists` or `actionLayout` on an object extension is refused at the save, the restore, the draft promotion, a package duplicate and marketplace install. Where no door can read the installed packages, the sentence stands | objectstack-ai#38706 | 7272564306 · **written, corrected to the tree** (statuses; the duplicate's answer corrected in patch round 1) | ### Rows not carried - **ADR-0161, two rows** (Consequences, "The service keeps none of its own"; K7 components table, "Split algorithm version"). The claim for this pull request leaves that file out, because pull request objectstack-ai#38764 was open on the same record when the claim was written. objectstack-ai#38764 merged at 2026-11-30T13:15:16Z, while this branch was being verified, and the prerequisites both rows name (objectstack-ai#38307, objectstack-ai#38401, objectstack-ai#38375, objectstack-ai#38452) are merged. Pull requests objectstack-ai#38730 and objectstack-ai#38732 (card objectstack-ai#38692) are still open and both write ADR-0161, so that record still has other writers. By the seat's call on the card (comment 7280598106) the two rows stay on objectstack-ai#38438 behind them, and this pull request is `Part of objectstack-ai#38438`. - **ADR-0085, a `fieldTabs` line.** Its pull request, objectstack-ai#38742, was open and a draft when this was opened (read at 2026-11-30, head `59220bf331`). The card says that line follows when it merges. Every prerequisite of the seven rows is merged on `main`: objectstack-ai#38398, objectstack-ai#38501, objectstack-ai#38484, objectstack-ai#38619, objectstack-ai#38633, objectstack-ai#38652, objectstack-ai#38679 and objectstack-ai#38706. The newest comment on the card when this was opened is the claim, 7279134045; a row added after it is not in this pull request. ### Where a note differs from its row - **ADR-0084, item (3).** The row names Setup's doors "Open in Studio" and "Customize in Studio". The labels on `main` are "Open in App Studio" and "Customize in App Studio", and the note uses them. The proposed text was dated 2026-11-29; the note is dated 2026-11-30, the day it was written into the record. The note names the three Setup doors one by one and says of the review-changes deep link what the row says: no door, by a seat reading, not by a ruling. - **ADR-0084, the `form` row.** The row says "Reword". The card's rule is that a row lands as an added dated note, so the 2026-11-29 note stays as written and a note under it says which pull request did which half. - **ADR-0037.** One sentence goes beyond the row: Phase 2's first invalidation source, the `buildProgress.items` diffs, was the same signal as the chat held it, and no code under `ui/` holds it any more. Cut it if the note should carry the row alone. The note also names the producer's retirement in the cloud repository and what a host does that still streams a progress part of its own. - **ADR-0150, the reads.** The row's proposed sentence gives `404` for `?preview=draft` and `?layers=true`. The note gives the code the tree answers, `404 RESOURCE_NOT_FOUND`, says that these are the answers to a caller admitted to the switch, and that a caller who is not admitted gets the plain read's `404`. It adds two facts from the tree: a package-less draft is withheld while a disabled package holds the name, and the layered view answers `404` under the leak guard. - **ADR-0150, D4.** The note spells out the three cases where the toggle door still echoes the request. The row's proposed sentence leaves them out. - **ADR-0085.** The row offers a "Built by" line in the style of an earlier note. The note carries it and also restates what `false` does and why an object extension does not carry the key, both from the row's own "what is true now". - **ADR-0146.** The row gives one code for every door. The tree answers `VALIDATION_ERROR` with status 400 at the save, the restore and the draft promotion, and with status 422 at marketplace install, with nothing installed. A package duplicate saves each copied row through the save door and lists a refused row in its own `failed[]`, with the save door's sentence and no code, storing nothing for that row. The note says all three, and that no error code is minted. ## Patch round 1 (head `04cc5911`) The contract review at `947b7e64` (comment 7280965486) passed with one should-fix: the ADR-0146 note put `VALIDATION_ERROR` / 400 on the package duplicate. Commit `04cc5911` corrects this branch's own 2026-11-30 note to the tree (`duplicatePackage` reports the refused row in `failed[]`) and adds one sentence from item 3 of ruling 7268226134 (a target whose owner the door does not know is not judged by role). Only that note moves: +9 / -3 inside it, and the branch is still +62 / -0 against `main`. Dev report: card comment 7281379369. Sections below that name `947b7e64` record the first round. ## Tests Docs only. No package source is touched, so no package test and no type check is owed for the change. No tested behaviour changed, so there is no ablation. Checked on the committed text at `947b7e64`: - Each phrase a note quotes from its ADR is in that file as it stands on `main`. A script compared them. One quotation, in the ADR-0085 note, reads as the sentence renders: the record links its two card references and the quotation does not. - Each verbatim maintainer quotation was compared with its record on GitHub (7247357556 and 7268226134). - Each path a note cites exists on the tree. The one exception is deliberate: the ADR-0037 note names `packages/spec/src/ai/build-progress.zod.ts` to say that the module is gone. - Each test title a note quotes is in the test file the note names. - A probe on the spec source: `ObjectSchema` accepts `pinOverview: false`, refuses `pinOverview: "no"`, and refuses `fieldTabs` as an unrecognised key; `ObjectExtensionSchema` refuses `pinOverview` as an unrecognised key, with its guidance. - Upstream moved four commits while this was written. The branch merges `main` at `f576dee5`; none of the four touches one of the five files or a path a note cites. `overlap-check` answers `VERDICT clean exit 0` against that `main`, and no open pull request shares a file with this branch. Two tests read these records from disk. Both were run on `947b7e64` under the verify lock, after building what each needs: - `ui/packages/app-shell/src/views/studio-design/studioMenuPlacement.test.ts` reads ADR-0084's type table: `Test Files 1 passed (1)`, `Tests 21 passed (21)`. - `packages/qa/scenarios/test/score/entry.test.ts` reads ADR-0150's D1 table: `Test Files 1 passed (1)`, `Tests 14 passed (14)`. Its first run answered `Failed to resolve entry for package "@objectstack/types"`, a missing build in the fresh worktree and no verdict on this change; it passed once that package's build closure was built. The local gate set is the `dispatch-gates --commands` derivation for this change set, 21 commands, run on commit `947b7e64` (patch round 1 ran the same 21 on `04cc5911`, all exit 0). Each exit code was captured before any pipe. Reconciliation: `Run reconciliation — 21 derived, 21 run, 0 NOT-MEASURED, 0 UNRUN`. The same 21 were derived and run on the commit before the merge, with the same result. <details><summary>ADR gates on 947b7e6 (all exit 0)</summary> | Command | Exit | Verdict line | |:---|:---|:---| | `pnpm check:adr-symbol-anchors` | 0 | `check-adr-symbol-anchors: 4597 anchors across 165 records resolve`, 0 line anchors survive. On the base commit the gate read 4570, and 4593 with this change alone; the other four come with `main`. | | `node scripts/check-adr-links.mjs` | 0 | `check-adr-links: 1284 relative link destination(s) under docs/adr/ resolve` | | `node scripts/check-adr-links.mjs --self-test` | 0 | | | `pnpm check:adr-anchors` | 0 | `check-adr-anchors: OK (135 anchored file(s), every governing ADR still referenced` | | `pnpm check:adr-index` | 0 | `adr-index --report: OK — docs/adr/README.md is current, every record parsed` | | `pnpm check:doc-authoring` | 0 | | | `pnpm check:nul-bytes` | 0 | `check-nul-bytes: OK (scanned 29015 text file(s)`, no raw control bytes | | `pnpm check:closed-ceremony-text` | 0 | | | `pnpm check:pm-governed-merges` | 0 | | | `pnpm --filter @objectstack/lint run check:doc-formula-expressions` | 0 | run after building `@objectstack/spec`, `@objectstack/formula` and `@objectstack/lint` under the verify lock | </details> <details><summary>The other derived families on 947b7e6 (all exit 0)</summary> `node scripts/check-closing-keyword-parity.mjs` and its `--self-test`, `node scripts/check-comment-mask-corpus.mjs`, `node scripts/ci/plan-test-core-shards.mjs --self-test`, `pnpm check:ci-filter-parity`, `pnpm check:cross-package-test-inputs`, `pnpm check:driver-memory-census`, `pnpm check:gitlink-declared`, `pnpm check:pm-prior-rulings`, `pnpm check:refd-timer-probe`, `pnpm check:watch-hint-literal`. Before the last push: `node scripts/check-commit-card-trailers.mjs --range origin/main..HEAD` exit 0, two commit messages (three after patch round 1, also exit 0), no card relation and no model identifier in the trailer pair. </details> <details><summary>A local-only reading that is red for a reason outside this change</summary> `pnpm check:dev-prereqs` exits 1 in this worktree: "The workspace is not built", 105 of 110 workspace packages have no build output. It judges the machine and not the diff, CI does not run its scan, and a fresh worktree that builds only what a docs change needs reads this way. It is not in the derived list. </details> Not run locally: the repository test project behind `test:repo`, and every package suite. CI runs them on the pull request and on the merge group. Every other family CI runs is read from this pull request's check runs, not re-run here. ## Acceptance notes - **Changeset.** None, and the pull request carries `skip-changeset`. `docs/adr/**` ships in no package. - **Governed surface.** `docs/adr/**` lands on the maintainer's approval. This pull request stays a draft; the seat arranges the review at the tier this surface owes and hands it over. - **Why "Part of".** The card says it ends when its pull request merges. Two of its rows are not here, so merging this one must leave the card open. - **Seen and left alone.** These are outside the seven rows and are not changed here. - ADR-0037's Status line says all four phases are implemented. On this tree the console's canvas-invalidate signal has a subscriber and no publisher: nothing calls the bus function that emits it. It is a candidate row for the card of this name. - ADR-0150's D4 note of 2026-11-10 gives its own end condition, an earlier card landing. That card ended on 2026-11-12, and the record carries no line that says so. A possible row; not judged here. - Comments in the chat plugin still name the retired build-progress part, and one test fixture uses the name as an open `data-` part. Not a record, so not a row. ## Verification ### Read first 1. `docs/adr/0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md`, the note of 2026-11-30 under the note of 2026-11-24. The highest-risk hunk: it quotes a maintainer ruling, and it draws the line between the doors that refuse and the places where the old sentence still stands. Check the two statuses and the list of places with no door. 2. `docs/adr/0084-application-builder-information-architecture.md`, the amendment of 2026-11-30 under the amendment of 2026-11-28. It quotes a maintainer ruling and lists every door; check the list, and the sentence on the review-changes deep link, which records a seat reading and says so. 3. `docs/adr/0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md`, the first amendment note of 2026-11-30. Check the three answers, who gets which, and the leak-guard paragraph against the tests it names. ### Two-minute check Run `git diff --numstat origin/main...HEAD` on this branch. Expect five rows under `docs/adr/`, each with `0` in the removed column, and 62 added lines in total (2, 4, 18, 28 and 10). Then run `pnpm check:adr-symbol-anchors` and expect exit 0 with a line that contains `anchors across 165 records resolve`. --- _Generated by [Claude Code](https://claude.ai/code/session_01WGufzhPdWmTd47Fi2bKYZS)_ <!-- signed: repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhPdWmTd47Fi2bKYZS --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…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>
Requested by Steve · project thread
Fixes #38760
Refs #38750
Clause-②: no
Metadata-protocol: none
维护者速读
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.mdgains its sixth dated note: 28 lines added, none changed and none removed (614 lines to 642).The note records the maintainer's rulings of 2026-11-30 on the epic for knowledge retrieval rerank. A knowledge source may declare that its searches are reranked. The deployment configures the reranker, and no source names a model. The knowledge service reranks, after the permission re-check and before the cut to
topK. The adapter contract does not change.Five insertions, in the form the five earlier notes of this record use. Line numbers are at head
6552e290.**Amended**line of the fifth note**Amended**line, dated 2026-11-30. It names what the note amends, the maintainer's words with their times, and ruling record7276086125.source.retrieval.rerank.Each amended place
No existing line is edited. This record's convention is add-only, so the note quotes the old sentence and states how it reads from the merge. The two sentences marked "new sentence" are the note's own wording. Every other entry in the third column is the note's reading of a text it leaves as written.
In the last column, "body 1" to "body 3" are items 1 to 3 under "Rulings" in the body of the epic, which record the maintainer's 「有就用」 (10:13Z) and 「所以还是应该按照主流系统的做法,开了开关,一律重排」 (10:37Z). "D1" to "D4" are the first four of the six decisions of the epic that he answered with 「全部同意」 (10:47Z), as ruling record
7276086125on the epic records them.mainatacf3b33etopK. The row keeps the adapter's own search.topK."What the note states beside the amended readings
Each is quoted in the note from the words named here.
source.retrieval.rerank, an optional boolean, in thesource.retrievalgroup the fifth note declares (body 1).no_rerankerinnotReranked, and saving or publishing the source shows a notice. It is never a refusal and never fewer hits (body 2; the two names are the ruling record's).failed, there is one attempt under a limit of 3 s, and it is not a coded refusal (D2).Left to the rows of the epic by name, under "Not in this note": the hosted recipient and its charging (D5, which is not decided); how a deployment states its reranker and what the knowledge service calls it through (rows 2 and 3); how many candidates are reranked under the ceiling of 50; how a rerank and a declared
affinityfollow one another; how the hits of several sources stand against each other; whatnotRerankedlooks like on the report and in the answer ofsearch_knowledge; how the notice is shown; a per-search argument on the tool.No file under
packages/,content/,skills/orui/changes, and no other ADR does. The note declares; it builds nothing.Why
The epic puts the record before the code. Its row 1 is this note, and the first decision of ruling record
7276086125says of it: "Accepting row 1's ADR-0161 note records it; no separate decision card." Until this note merges, the ADR gives rerank to the adapter in every place the table above lists, and rule 4 of K8 keeps "rerank toggles" in the adapter's plugin options. Row 2 of the epic brings the key with its reader, and it needs the record to say so first.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, at head
6552e290:7276086125or7276461244, or of the ADR at the base where it already quotes the record of the fifth note. 0 mismatches. It holds 50 spans in double quotation marks: 48 are verbatim in one of those sources, and 2 are the note's own wording, which are the two "new sentence" entries of the table above.mainthe last paragraph of the note cites, taken atacf3b33e31.packages/services/service-knowledge/src/knowledge-service-search.ts#searchByKeyre-checks the hits as the caller (applyPermissionFilter), orders them by a declaredaffinity(affinityOrderFor) and cuts them totopK, with no rerank between. Tests aside, inpackages/services/service-knowledge/srcand thesrcofknowledge-memory,knowledge-pgvectorandknowledge-turso, the wordrerankis on one line, which is the class note K2 lists. The control wordembedis on 412 lines, so the search reads those directories.check:adr-symbol-anchorsreads all of them (its verdict line is below).No ablation: the diff changes no behaviour a test pins.
Acceptance notes
Against the card's acceptance lines.
affinity, no settings key name and no shape for the reranker contract. Each of these is named under "Not in this note" and left to its row.Amendedline is dated." Line 24, dated 2026-11-30.Five things for the approver to weigh. The note marks no ◆, because each of these rests on a text this record or the epic already has. They are the places where the wording is the note's and not a quotation.
source.retrieval, so one was added. It changes no sentence of K4.mainand as feat(spec): a knowledge source declares its retrieval mode; an adapter reports the modes it runs #38720 leaves it.The names D1 to D6. This record already writes "ruling D1", "ruling D2" and "ruling D5" for rulings of its own. The note therefore writes the six decisions of the epic as
#38750 D1to#38750 D6, and says in its opening paragraph that none of them is a ruling of this record. It writesrow N of #38750for the same reason.The card's line numbers, read on
mainatacf3b33e. All twelve lines the card names (1, 9, 41, 104, 112, 119, 149, 153, 157, 417, 422, 438) exist and carry the text the card expects. Two labels are exchanged: the card gives 422 for rule 4 of K8 and 417 for the note of 2026-11-30. Onmain, rule 4 is line 417, and line 422 is that note's bullet "Rule 4, amended", which carries 「永远不进知识源协议」. Line 438 is that note's bullet "Not in this note". No line moved.Overlap with the open drafts on this file.
node scripts/pm/overlap-check.mjs --repo=objectstack-ai/objectstack, run at6552e2905bbefore the push, printedVERDICT clean exit 0. It readorigin/mainatacf3b33e31and the six open heads that change this file (#38745, #38732, #38730, #38722, #38721 and #38720), and each merges cleanly with this branch. The order expected exit 1 against #38720. It is clean because the note is add-only and inserts at none of the lines #38720 changes. It was run again before this pull request opened, withorigin/mainat8426fa0c89(one commit later, which does not change this file): the same six heads, each merging cleanly,VERDICT clean exit 0. The landing order is the card's: after #38720.Not done here.
content/docs/protocol/knowledge.mdxand the class note ofKnowledgeServiceare rewritten by the rows whose code makes their new sentences true. There is no changeset:docs/adr/is published by no package, and the PR carriesskip-changeset.Verification
Read first, by risk. One file changes, so these are its three hunks of most risk.
Two-minute check. One click: open the "Files changed" tab. Expected: one file, +28 −0, five hunks, every changed line an addition.
Landing.
docs/adr/**is a governed surface. This is opened as a draft. The hand-off to the maintainer 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 one reading taken after it opened.
Gates, run locally on head
6552e290.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 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:The 21 commands and their exit codes
Verdict lines of the gates that read the ADR
One gate first read NOT MEASURED, then green
At the first head,
151609a7,pnpm --filter @objectstack/lint run check:doc-formula-expressionsanswered 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 (the lock's verdict line is cut after the wait):At the final head it ran with the other 20 and answered exit 0.
Left to CI, not run locally. The repo-wide lint, the type-check lanes, the test shards, and the families
dispatch-gatesprints outside the derived list. The commit trailer gate ran in the pre-push hook on the pushed range and is green.Human Minimum
pnpm lintis NOT MEASURED locally: the repo-wide scan is CI's, and the diff is one Markdown file.mainatacf3b33e31, one pull request.packages/specis not touched.content/docs/references/, to aCHANGELOG.mdor tocontent/docs/releases/.pnpm lintis as item 3 says.Generated by Claude Code