You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ADR-0161: dated note — a knowledge source declares rerank; the knowledge service reranks after the permission re-check (#38750 row 1) #38760
area:aiAI-native — agent / tool / skill metadata, and the MCP surface an agent drivesdomain:serverDomain lane — seat card indexed by label:pm:seatpm:dispatchedDispatched to a dev agent by /pm-dispatchpriority:p2Medium: important, M3
Row 1 of epic #38750 (knowledge retrieval rerank), filed by the epic's holder, seat repo:objectstack#3 (7276605368).
Authority, the maintainer's words, quoted verbatim on #38750:
10:13Z 「有就用」
10:37Z 「开了开关,一律重排」
10:38Z 「立专题卡,交给3号座位」
10:47Z 「全部同意」 for D1 to D6, ruling comment 7276086125
11:02:50Z 「照常做,作为平台能力」
Grade: p2 (the epic's grade) · area:ai · governed (docs/adr/**, Tier H) · review at CONTRACT_REVIEW_TIER.
What
Add a dated note to docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md. It records:
A knowledge source may declare retrieval.rerank (boolean). The model always comes from the deployment.
The knowledge service reranks after the permission re-check and before the cut to topK. Adapters are unchanged. Accepting the note confirms D1.
With no reranker configured, the search runs normally and is marked. It is never refused.
With the switch on and a reranker configured, every search is reranked. Only a pool of 0 or 1 candidates makes no call.
The note amends these places, at the lines named on #38750 row 1:
the K1 table row and list (:104, :112, :119), including the 2026-11-29 sentence "the service reads no passage text and calls no model";
the K2 rows (:149, :153, :157);
K8 rule 4 (:422);
the 2026-11-30 note (:417, :438, 「永远不进知识源协议」);
the TL;DR, title and D1 keywords, which now read as narrowed (:1, :9, :41);
an "Amended" line.
The note does not change any other ADR. It adds no code.
Order
Open draft #38720 (os-warren) edits the same file at :153. Develop from origin/main in parallel. When #38720 merges, rebase the branch under the same name, and land this card after #38720.
Claim: PM loop round 1
Session: session_01ADHkmPDtfMCw4FJfyFfQ7v
Account: os-steve
Branch: claude/issue-38760-adr-0161-rerank-note
Worktree: objectstack-issue-38760
Domain: domain:server
Seat: repo:objectstack#3
Area: o3-K (area:ai p1/p2, knowledge topic first; zone order o3-area-K.md priority 1, row 1 of epic #38750; seat order to claim now)
File surface: docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md only (the dated note and the amended places the card lists: K1 row and list, K2 rows, K8 rule 4, the 2026-11-30 note, TL;DR / title / D1 keywords, an Amended line). No other ADR, no code, no changeset. Anything else ⇒ stop and report.
Container & model: S, mode:subagent, model: CONTRACT_REVIEW_TIER (dispatch-gates --tier: "Model tier — MANDATORY … docs/adr/… ⇢ 'docs/adr/**'"), effort: xhigh (reason: ADR revision, standing order; File surface names docs/adr/** alone)
Clause-②: no
Metadata-protocol: none
Responsibility: n/a — not a defect card
Thread-read: 7277273406
Premise: holds (origin/main acf3b33: the ADR still places rerank with the adapter — K8 rule 4 keeps "rerank toggles … in the adapter's own plugin options" and the 2026-11-30 note quotes 「永远不进知识源协议」 … 「重排」, :422; the file is 614 lines; the maintainer's 「有就用」 and D1 on #38750 overturn both)
Pre-claim lane: domain:server per triage 7277273406 (file-wise docs/adr/**, governed, Tier H).
Pre-claim deps: open draft PR #38720 (os-warren, #38692 phase 1a; #38721/#38722/#38745 carry the same ADR commit) edits this file at :153, inside this card's K2 range — a real textual overlap. Accepted on the seat's order (2026-11-30T11:35Z, on Steve's priority word 11:28:59Z 「知识专题是重点」): developed from origin/main in parallel, rebased under the same branch name after #38720 merges, landed after #38720.
Prior rulings read: #38750 rulings 7276086125 (D1–D6, 「全部同意」), 7276135635, 7276183954, 7276461244 (「照常做,作为平台能力」), body quotes 「有就用」 / 「开了开关,一律重排」; check-prior-rulings.mjs --card 38760 --paths ADR-0161 → 268 term hits; ADR-0093 D8, ADR-0106 D2, ADR-0131 D13 by term only, none on rerank placement.
Fold-or-serial: no fold (the only other claimable area:ai card in flight here, #38728, is code in service-knowledge). Serial behind #38720 for landing.
Serial constraints cleared: check-handover --inflight reads #38692's claim (7270621658) as the holder of the PRs that edit this ADR; handled as above. PR stays draft; L1-b, then seat 3 for the CONTRACT_REVIEW_TIER L2 and the governed hand-off (os-zhuang).
{
"issue": 38760,
"status": "done",
"branch": "claude/issue-38760-adr-0161-rerank-note",
"pr": "https://github.com/objectstack-ai/objectstack/pull/38764",
"session": "session_01ADHkmPDtfMCw4FJfyFfQ7v",
"premise_still_valid": true,
"summary": "ADR-0161 gains its sixth dated note, add-only (+28 / -0, one file). It records the maintainer's rulings of 2026-11-30 on #38750: a knowledge source may declare `source.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`; the adapter contract does not change. The note stands under K1 with a dated `Amended` header line and cross-references under K2, K4 and K8. It quotes each old sentence and states its new reading, and it leaves to the rows of #38750, by name, everything the rulings do not state (pool sizes, the order of rerank and `affinity`, settings key names, the shape of the reranker contract, #38750 D5). Draft PR #38764 is open on head 6552e2905b with `skip-changeset`; it stays draft (Tier H) and nothing requests a review, marks it ready or arms a merge. The premise holds: on main at acf3b33e31 the record gave rerank to the adapter in every place the card lists. The card's assignee was already set by the seat (os-steve) and was not written here. Not done, by the card's order: the rebase under the same branch name after #38720 merges. Today the branch merges cleanly with main and with the head of #38720.",
"tests": "No package is touched, so no build closure and no package test or type-check is owed. Measured on the text at head 6552e290: (1) quotations, by script against sources read over REST and the ADR at the base: 16 corner-bracket spans, each a verbatim substring of the body of #38750, of ruling record 7276086125 or 7276461244, or of the ADR at the base; output `RESULT corner MISS=0`. 50 double-quoted spans; output `double-quoted spans: 50; verbatim in a source: 48; this note's own wording: 2`. The 2 are the two amended sentences (the K1 list sentence and rule 4 of K8). (2) the 28 added lines hold no raw control byte, no HTML comment and no model identifier. (3) the reading of main the note cites, at acf3b33e31: `searchByKey` in packages/services/service-knowledge/src/knowledge-service-search.ts calls `applyPermissionFilter`, then `affinityOrderFor`, then cuts to `topK`, with no rerank between; tests aside, `rerank` is on 1 line in packages/services/service-knowledge/src and the src of knowledge-memory, knowledge-pgvector and knowledge-turso (the class note K2 lists), and the control `embed` is on 412 lines. (4) the PR body before the send: `closingKeywordTargets` (check-half-states) reads one target, 38760 by `Fixes`; `readPrBodyTrailer` parses the seat signature on the last non-empty line. No ablation: the diff changes no behaviour a test pins. `test:repo` was not run locally: the diff changes no test of that project and the derived list does not name it.",
"gates": {
"head": "6552e290 (git rev-parse --short HEAD, read in the same run as the gates)",
"derivation": "node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 21 commands; change set 1 path vs merge base acf3b33e3 of origin/main and HEAD; tier MANDATORY (docs/adr/**) as the claim records",
"local_runs": [
"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"
],
"reconciliation": [
"node scripts/pm/dispatch-gates.mjs --ran RAN_LIST --repo objectstack-ai/objectstack :: exit 0",
"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)."
],
"verdict_lines": [
"✅ check-adr-links: 1284 relative link destination(s) under docs/adr/ resolve",
"✅ check-adr-symbol-anchors: 4574 anchors across 165 records resolve — 1704 symbol (1675 declaration, 29 literal), 2818 file-level, 52 cross-repo, 6 exempt, 128 continuation. (line cut here)",
"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 29002 text file(s) -- 29002 tracked, 0 untracked-not-ignored; skipped 101 binary; no raw ASCII control bytes).",
"✓ doc authoring guard: 24253 customer-facing string(s) across 1963 spec sources clean — no internal issue-id references (message 3603 · strictObject 5655 · tombstone 1510 · describe 12078 · functionBuilt 529 · functionDeclared 878)."
],
"first_pass": "The same 21 were first run at 151609a7. There `pnpm --filter @objectstack/lint run check:doc-formula-expressions` answered exit 3, PREREQUISITE NOT MET (the formula and lint packages were not built in the fresh worktree): a run that measured nothing, not a red gate. Both were built under the verify lock (`VERDICT command-exit 0 · held the lock 23s · waited 167s (2m47s)`), and the gate then answered exit 0. The other 20 were exit 0. All 21 were run again at the final head, and that run is the one listed above.",
"pre_push": "check:commit-card-trailers passed in the pre-push hook on the push of 6552e290.",
"ci_check_runs": {
"note": "One reading of the check-runs of PR #38764 on head 6552e2905b, taken once after the pull request opened (read at 2026-11-30T12:34:10Z, the clock printed by the same command). CI was not waited for and no family was re-run locally.",
"total": 32,
"success": "Check Changeset, Governed Surface Queue Guard",
"skipped": "18.x upgrade harness (opt-in) (x2), Auto Label, Borrowed queue verdict, Check Changeset, Check PR Size, Dogfood battery (opt-in) (x2), Dogfood battery shard (MATRIX_SHARD/3, opt-in) (x2), Packed-tarball smoke (opt-in) (x2), Queue verdict, Schedule gate · skip when a green push run covers the commit",
"NOT MEASURED": "reason: still in progress at the one reading; convergence is the seat's. Families: Check Documentation Links, Check PR Size, Lint · CI, release & engine gates, Lint · ESLint, Lint · PM dispatch-gates, Lint · docs & code guards, Lint · repo & tooling gates, Lint · scoped · query-options erasure, Lint · scoped · slot lookup & corpus, Lint · scoped · tooling self-tests, PR-body guards (claim · duplicate · Part-of · single-writer path), Type Check · consumer gates, Type Check · debt ledger, Type Check · source gates, Type Check · workspace, filter"
}
},
"line_budget": {
"added": 28,
"removed": 0,
"files": 1,
"file_lines_before": 614,
"file_lines_after": 642,
"dispatch_gates_line": "changed lines: 28 (+28 / -0; 1 file(s), 0 binary counted 0, 0 untracked counted from disk) vs the human-merge threshold 3000: under",
"hunks_at_head": "line 24 (header); lines 142 to 162 (the note under K1); 186 to 187 (K2); 280 to 281 (K4); 468 to 469 (K8). No existing line is edited."
},
"files_changed": [
"docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md"
],
"overlap_check": {
"command": "node scripts/pm/overlap-check.mjs --repo=objectstack-ai/objectstack",
"exit": 0,
"expected_by_the_order": "exit 1 against #38720",
"why_it_differs": "The note is add-only and inserts at none of the lines #38720 changes (its one hunk on this file is -150,7 +150,7, one line replaced, the K2 row at 153). This branch inserts after 140 and after 163, so git merges both.",
"run_before_the_push": [
"overlap-check: claude/issue-38760-adr-0161-rerank-note (6552e2905b) changes 1 file(s); against origin/main (acf3b33e31) and 6 PR head(s)",
" ✓ origin/main: merges cleanly",
" ✓ #38745 (shares docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md): merges cleanly",
" not yours (#38745 against main): content/docs/references/index.mdx, packages/platform-objects/src/apps/translations/object-lifecycle-panel-echo-decisions.test.ts, packages/spec/src/type-alias-convention.pin.test.ts",
" ✓ #38732 (shares docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md): merges cleanly",
" not yours (#38732 against main): content/docs/references/index.mdx, packages/platform-objects/src/apps/translations/object-lifecycle-panel-echo-decisions.test.ts, packages/spec/src/type-alias-convention.pin.test.ts",
" ✓ #38730 (shares docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md): merges cleanly",
" not yours (#38730 against main): content/docs/references/index.mdx, packages/platform-objects/src/apps/translations/object-lifecycle-panel-echo-decisions.test.ts, packages/spec/src/type-alias-convention.pin.test.ts",
" ✓ #38722 (shares docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md): merges cleanly",
" not yours (#38722 against main): content/docs/references/index.mdx, packages/platform-objects/src/apps/translations/object-lifecycle-panel-echo-decisions.test.ts, packages/spec/src/type-alias-convention.pin.test.ts",
" ✓ #38721 (shares docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md): merges cleanly",
" not yours (#38721 against main): content/docs/references/index.mdx, packages/platform-objects/src/apps/translations/object-lifecycle-panel-echo-decisions.test.ts, packages/spec/src/type-alias-convention.pin.test.ts",
" ✓ #38720 (shares docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md): merges cleanly",
"VERDICT clean exit 0"
],
"run_again_before_the_pr_opened": [
"overlap-check: claude/issue-38760-adr-0161-rerank-note (6552e2905b) changes 1 file(s); against origin/main (8426fa0c89) and 6 PR head(s)",
" ✓ origin/main: merges cleanly",
" ✓ #38745 (shares docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md): merges cleanly",
" ✓ #38732 (shares docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md): merges cleanly",
" ✓ #38730 (shares docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md): merges cleanly",
" ✓ #38722 (shares docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md): merges cleanly",
" ✓ #38721 (shares docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md): merges cleanly",
" ✓ #38720 (shares docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md): merges cleanly",
"VERDICT clean exit 0"
]
},
"card_line_numbers": {
"read_on": "origin/main at acf3b33e31",
"named_by_the_card": [
1,
9,
41,
104,
112,
119,
149,
153,
157,
417,
422,
438
],
"all_present_with_the_expected_text": true,
"did_not_match": [
"Labels only. The card gives 422 for rule 4 of K8 and 417 for the note of 2026-11-30. On main, rule 4 is line 417. 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."
]
},
"deviations": [
"CONFLICT between the order and os-dev.md, named and not settled by me. The order's Writes line says: `Do not set assignees on pr_create.` os-dev.md rule 2 says the pull request is assigned to the claim's `Account:` and that `pr_create` carries it (also AGENTS.md, and the `pr_create` row of fleet-write/ops.mjs, which cites ruling A on #29828). os-dev.md says it prevails over an order and that the conflict is reported. So the create carried `assignees: [os-steve]`, the claim's `Account:`. The relay read back: assignees os-steve. If the order's line is the intended rule, the file is where it changes.",
"`skip-changeset` was sent in the same `pr_create` stroke, as the order allows (`use the repo's skip-changeset convention if a gate asks`). The `Check Changeset` job asks for a changeset or that label, and `docs/adr/**` is published by no package. Read back twice: the relay row lists it, and a later read of the pull lists labels [skip-changeset]. `Check Changeset` is success on the head.",
"A cross-reference was added under K4. The card's list of places does not name K4. This record gives every new source key a cross-reference there (the fifth note did for `source.retrieval`). It is inside the one-file fence and changes no sentence of K4.",
"The K2 rows, the title, the D1 key-words line, TL;DR item 1, the two tables of K1 and rule 4 of K8 are not edited in place. This record's convention is add-only: the note quotes each and gives its reading, and the two amended sentences are stated in the note as `From the merge of this note it reads`. Draft #38720 edits the K2 row at 153 in place with its code; the note's sentence about that row holds before and after it.",
"Names: the note writes the six decisions of #38750 as `#38750 D1` to `#38750 D6`, and `row N of #38750`, because this record already writes ruling D1, D2 and D5 for rulings of its own, and `the epic` for another card (the one its own card is a child of). The second commit made that change.",
"The overlap check answered exit 0, not the exit 1 the order expected. See overlap_check.",
"One gate first answered exit 3 (prerequisite not built), then exit 0 after a build under the verify lock. See gates.first_pass.",
"The PR body ends with the repository's footer block (a rule and one session-URL footer line, AGENTS.md's form for PR bodies) and then the signed trailer as its last non-empty line. The harness reminder's own two-line footer was not used: the repository's form takes precedence. Stored body: 21689 bytes sent, 21689 stored, identical; nothing was appended.",
"Environment: fleet-write/dispatch.mjs prints the value of `HTTPS_PROXY` in its own re-exec notice, and that line reached this run's transcript when its stderr was read. Variable name only, per the rule; it is the local proxy address and no credential.",
"CI was not waited for. One reading of the check-runs was taken after the pull request opened; see gates.ci_check_runs.",
"Cleanup: the worktree and its node_modules were removed before this comment was posted (the comment was sent from the shared checkout, whose write tools are byte-identical). The work is on origin at 6552e2905b93650940778b59220a714fdc704c57."
],
"mcp_calls": "0. No GitHub MCP tool was called. Reads went through `gh api` and git; writes went through the relay.",
"api_writes": "2, both `POST /repos/objectstack-ai/objectstack/dispatches` (the fleet-write relay; the runner writes as objectstack-fleet[bot]). (1) request fw-20261130T123320Z-2ac02a, op `pr_create`: on the runner `POST /repos/objectstack-ai/objectstack/pulls` (draft), `POST /repos/objectstack-ai/objectstack/issues/38764/assignees`, `POST /repos/objectstack-ai/objectstack/issues/38764/labels`; run 46419771814, conclusion success. (2) this comment, through post-stamped.mjs: on the runner `POST /repos/objectstack-ai/objectstack/issues/38760/comments`. Not REST writes: 3 git pushes to the branch (the empty-branch probe at acf3b33e, then 151609a7, then 6552e290). No force-push.",
"classifier_refusals": [],
"open_questions": [],
"security_findings": "none",
"out_of_scope_findings": [
"carrier: #38750 (its rows 2 and 3) · noted, not filed · two texts K2 lists still say that rerank stays the adapter's: the opening of content/docs/protocol/knowledge.mdx and the class note of `KnowledgeService` in packages/services/service-knowledge/src/knowledge-service.ts. By K2 each is rewritten by the PR whose code makes the new sentence true, so neither is a defect today: main reranks nothing."
]
}
area:aiAI-native — agent / tool / skill metadata, and the MCP surface an agent drivesdomain:serverDomain lane — seat card indexed by label:pm:seatpm:dispatchedDispatched to a dev agent by /pm-dispatchpriority:p2Medium: important, M3
Activity
objectstack-fleet commentedon Nov 30, 2026
triage@os-warren · os-warren · session_01JQwxbZzZ2f5mzcvJbRrRNZ
Triage: first-touch (type only) · Task · lane grade kept: p2 (inherits topic #38750) ·
area:ai·domain:server·pm:queue.objectstack-fleet commentedon Nov 30, 2026
repo:objectstack#3 · os-steve · session_01ADHkmPDtfMCw4FJfyFfQ7v
Claim: PM loop round 1
Session:
session_01ADHkmPDtfMCw4FJfyFfQ7vAccount:
os-steveBranch:
claude/issue-38760-adr-0161-rerank-noteWorktree:
objectstack-issue-38760Domain:
domain:serverSeat:
repo:objectstack#3Area: o3-K (area:ai p1/p2, knowledge topic first; zone order
o3-area-K.mdpriority 1, row 1 of epic #38750; seat order to claim now)File surface:
docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.mdonly (the dated note and the amended places the card lists: K1 row and list, K2 rows, K8 rule 4, the 2026-11-30 note, TL;DR / title / D1 keywords, anAmendedline). No other ADR, no code, no changeset. Anything else ⇒ stop and report.Container & model:
S,mode:subagent,model: CONTRACT_REVIEW_TIER(dispatch-gates --tier: "Model tier — MANDATORY … docs/adr/… ⇢ 'docs/adr/**'"),effort: xhigh (reason: ADR revision, standing order; File surface names docs/adr/** alone)Clause-②: no
Metadata-protocol: none
Responsibility: n/a — not a defect card
Thread-read: 7277273406
Premise: holds (origin/main acf3b33: the ADR still places rerank with the adapter — K8 rule 4 keeps "rerank toggles … in the adapter's own plugin options" and the 2026-11-30 note quotes 「永远不进知识源协议」 … 「重排」, :422; the file is 614 lines; the maintainer's 「有就用」 and D1 on #38750 overturn both)
Pre-claim lane:
domain:serverper triage 7277273406 (file-wisedocs/adr/**, governed, Tier H).Pre-claim deps: open draft PR #38720 (os-warren, #38692 phase 1a; #38721/#38722/#38745 carry the same ADR commit) edits this file at :153, inside this card's K2 range — a real textual overlap. Accepted on the seat's order (2026-11-30T11:35Z, on Steve's priority word 11:28:59Z 「知识专题是重点」): developed from
origin/mainin parallel, rebased under the same branch name after #38720 merges, landed after #38720.Prior rulings read: #38750 rulings 7276086125 (D1–D6, 「全部同意」), 7276135635, 7276183954, 7276461244 (「照常做,作为平台能力」), body quotes 「有就用」 / 「开了开关,一律重排」;
check-prior-rulings.mjs --card 38760 --paths ADR-0161→ 268 term hits; ADR-0093 D8, ADR-0106 D2, ADR-0131 D13 by term only, none on rerank placement.Fold-or-serial: no fold (the only other claimable area:ai card in flight here, #38728, is code in
service-knowledge). Serial behind #38720 for landing.Serial constraints cleared:
check-handover --inflightreads #38692's claim (7270621658) as the holder of the PRs that edit this ADR; handled as above. PR stays draft; L1-b, then seat 3 for the CONTRACT_REVIEW_TIER L2 and the governed hand-off (os-zhuang).objectstack-fleet commentedon Nov 30, 2026
repo:objectstack#3 · os-steve · session_01ADHkmPDtfMCw4FJfyFfQ7v
os-dev-report
{ "issue": 38760, "status": "done", "branch": "claude/issue-38760-adr-0161-rerank-note", "pr": "https://github.com/objectstack-ai/objectstack/pull/38764", "session": "session_01ADHkmPDtfMCw4FJfyFfQ7v", "premise_still_valid": true, "summary": "ADR-0161 gains its sixth dated note, add-only (+28 / -0, one file). It records the maintainer's rulings of 2026-11-30 on #38750: a knowledge source may declare `source.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`; the adapter contract does not change. The note stands under K1 with a dated `Amended` header line and cross-references under K2, K4 and K8. It quotes each old sentence and states its new reading, and it leaves to the rows of #38750, by name, everything the rulings do not state (pool sizes, the order of rerank and `affinity`, settings key names, the shape of the reranker contract, #38750 D5). Draft PR #38764 is open on head 6552e2905b with `skip-changeset`; it stays draft (Tier H) and nothing requests a review, marks it ready or arms a merge. The premise holds: on main at acf3b33e31 the record gave rerank to the adapter in every place the card lists. The card's assignee was already set by the seat (os-steve) and was not written here. Not done, by the card's order: the rebase under the same branch name after #38720 merges. Today the branch merges cleanly with main and with the head of #38720.", "tests": "No package is touched, so no build closure and no package test or type-check is owed. Measured on the text at head 6552e290: (1) quotations, by script against sources read over REST and the ADR at the base: 16 corner-bracket spans, each a verbatim substring of the body of #38750, of ruling record 7276086125 or 7276461244, or of the ADR at the base; output `RESULT corner MISS=0`. 50 double-quoted spans; output `double-quoted spans: 50; verbatim in a source: 48; this note's own wording: 2`. The 2 are the two amended sentences (the K1 list sentence and rule 4 of K8). (2) the 28 added lines hold no raw control byte, no HTML comment and no model identifier. (3) the reading of main the note cites, at acf3b33e31: `searchByKey` in packages/services/service-knowledge/src/knowledge-service-search.ts calls `applyPermissionFilter`, then `affinityOrderFor`, then cuts to `topK`, with no rerank between; tests aside, `rerank` is on 1 line in packages/services/service-knowledge/src and the src of knowledge-memory, knowledge-pgvector and knowledge-turso (the class note K2 lists), and the control `embed` is on 412 lines. (4) the PR body before the send: `closingKeywordTargets` (check-half-states) reads one target, 38760 by `Fixes`; `readPrBodyTrailer` parses the seat signature on the last non-empty line. No ablation: the diff changes no behaviour a test pins. `test:repo` was not run locally: the diff changes no test of that project and the derived list does not name it.", "gates": { "head": "6552e290 (git rev-parse --short HEAD, read in the same run as the gates)", "derivation": "node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 21 commands; change set 1 path vs merge base acf3b33e3 of origin/main and HEAD; tier MANDATORY (docs/adr/**) as the claim records", "local_runs": [ "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" ], "reconciliation": [ "node scripts/pm/dispatch-gates.mjs --ran RAN_LIST --repo objectstack-ai/objectstack :: exit 0", "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)." ], "verdict_lines": [ "✅ check-adr-links: 1284 relative link destination(s) under docs/adr/ resolve", "✅ check-adr-symbol-anchors: 4574 anchors across 165 records resolve — 1704 symbol (1675 declaration, 29 literal), 2818 file-level, 52 cross-repo, 6 exempt, 128 continuation. (line cut here)", "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 29002 text file(s) -- 29002 tracked, 0 untracked-not-ignored; skipped 101 binary; no raw ASCII control bytes).", "✓ doc authoring guard: 24253 customer-facing string(s) across 1963 spec sources clean — no internal issue-id references (message 3603 · strictObject 5655 · tombstone 1510 · describe 12078 · functionBuilt 529 · functionDeclared 878)." ], "first_pass": "The same 21 were first run at 151609a7. There `pnpm --filter @objectstack/lint run check:doc-formula-expressions` answered exit 3, PREREQUISITE NOT MET (the formula and lint packages were not built in the fresh worktree): a run that measured nothing, not a red gate. Both were built under the verify lock (`VERDICT command-exit 0 · held the lock 23s · waited 167s (2m47s)`), and the gate then answered exit 0. The other 20 were exit 0. All 21 were run again at the final head, and that run is the one listed above.", "pre_push": "check:commit-card-trailers passed in the pre-push hook on the push of 6552e290.", "ci_check_runs": { "note": "One reading of the check-runs of PR #38764 on head 6552e2905b, taken once after the pull request opened (read at 2026-11-30T12:34:10Z, the clock printed by the same command). CI was not waited for and no family was re-run locally.", "total": 32, "success": "Check Changeset, Governed Surface Queue Guard", "skipped": "18.x upgrade harness (opt-in) (x2), Auto Label, Borrowed queue verdict, Check Changeset, Check PR Size, Dogfood battery (opt-in) (x2), Dogfood battery shard (MATRIX_SHARD/3, opt-in) (x2), Packed-tarball smoke (opt-in) (x2), Queue verdict, Schedule gate · skip when a green push run covers the commit", "NOT MEASURED": "reason: still in progress at the one reading; convergence is the seat's. Families: Check Documentation Links, Check PR Size, Lint · CI, release & engine gates, Lint · ESLint, Lint · PM dispatch-gates, Lint · docs & code guards, Lint · repo & tooling gates, Lint · scoped · query-options erasure, Lint · scoped · slot lookup & corpus, Lint · scoped · tooling self-tests, PR-body guards (claim · duplicate · Part-of · single-writer path), Type Check · consumer gates, Type Check · debt ledger, Type Check · source gates, Type Check · workspace, filter" } }, "line_budget": { "added": 28, "removed": 0, "files": 1, "file_lines_before": 614, "file_lines_after": 642, "dispatch_gates_line": "changed lines: 28 (+28 / -0; 1 file(s), 0 binary counted 0, 0 untracked counted from disk) vs the human-merge threshold 3000: under", "hunks_at_head": "line 24 (header); lines 142 to 162 (the note under K1); 186 to 187 (K2); 280 to 281 (K4); 468 to 469 (K8). No existing line is edited." }, "files_changed": [ "docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md" ], "overlap_check": { "command": "node scripts/pm/overlap-check.mjs --repo=objectstack-ai/objectstack", "exit": 0, "expected_by_the_order": "exit 1 against #38720", "why_it_differs": "The note is add-only and inserts at none of the lines #38720 changes (its one hunk on this file is -150,7 +150,7, one line replaced, the K2 row at 153). This branch inserts after 140 and after 163, so git merges both.", "run_before_the_push": [ "overlap-check: claude/issue-38760-adr-0161-rerank-note (6552e2905b) changes 1 file(s); against origin/main (acf3b33e31) and 6 PR head(s)", " ✓ origin/main: merges cleanly", " ✓ #38745 (shares docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md): merges cleanly", " not yours (#38745 against main): content/docs/references/index.mdx, packages/platform-objects/src/apps/translations/object-lifecycle-panel-echo-decisions.test.ts, packages/spec/src/type-alias-convention.pin.test.ts", " ✓ #38732 (shares docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md): merges cleanly", " not yours (#38732 against main): content/docs/references/index.mdx, packages/platform-objects/src/apps/translations/object-lifecycle-panel-echo-decisions.test.ts, packages/spec/src/type-alias-convention.pin.test.ts", " ✓ #38730 (shares docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md): merges cleanly", " not yours (#38730 against main): content/docs/references/index.mdx, packages/platform-objects/src/apps/translations/object-lifecycle-panel-echo-decisions.test.ts, packages/spec/src/type-alias-convention.pin.test.ts", " ✓ #38722 (shares docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md): merges cleanly", " not yours (#38722 against main): content/docs/references/index.mdx, packages/platform-objects/src/apps/translations/object-lifecycle-panel-echo-decisions.test.ts, packages/spec/src/type-alias-convention.pin.test.ts", " ✓ #38721 (shares docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md): merges cleanly", " not yours (#38721 against main): content/docs/references/index.mdx, packages/platform-objects/src/apps/translations/object-lifecycle-panel-echo-decisions.test.ts, packages/spec/src/type-alias-convention.pin.test.ts", " ✓ #38720 (shares docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md): merges cleanly", "VERDICT clean exit 0" ], "run_again_before_the_pr_opened": [ "overlap-check: claude/issue-38760-adr-0161-rerank-note (6552e2905b) changes 1 file(s); against origin/main (8426fa0c89) and 6 PR head(s)", " ✓ origin/main: merges cleanly", " ✓ #38745 (shares docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md): merges cleanly", " ✓ #38732 (shares docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md): merges cleanly", " ✓ #38730 (shares docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md): merges cleanly", " ✓ #38722 (shares docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md): merges cleanly", " ✓ #38721 (shares docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md): merges cleanly", " ✓ #38720 (shares docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md): merges cleanly", "VERDICT clean exit 0" ] }, "card_line_numbers": { "read_on": "origin/main at acf3b33e31", "named_by_the_card": [ 1, 9, 41, 104, 112, 119, 149, 153, 157, 417, 422, 438 ], "all_present_with_the_expected_text": true, "did_not_match": [ "Labels only. The card gives 422 for rule 4 of K8 and 417 for the note of 2026-11-30. On main, rule 4 is line 417. 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." ] }, "deviations": [ "CONFLICT between the order and os-dev.md, named and not settled by me. The order's Writes line says: `Do not set assignees on pr_create.` os-dev.md rule 2 says the pull request is assigned to the claim's `Account:` and that `pr_create` carries it (also AGENTS.md, and the `pr_create` row of fleet-write/ops.mjs, which cites ruling A on #29828). os-dev.md says it prevails over an order and that the conflict is reported. So the create carried `assignees: [os-steve]`, the claim's `Account:`. The relay read back: assignees os-steve. If the order's line is the intended rule, the file is where it changes.", "`skip-changeset` was sent in the same `pr_create` stroke, as the order allows (`use the repo's skip-changeset convention if a gate asks`). The `Check Changeset` job asks for a changeset or that label, and `docs/adr/**` is published by no package. Read back twice: the relay row lists it, and a later read of the pull lists labels [skip-changeset]. `Check Changeset` is success on the head.", "A cross-reference was added under K4. The card's list of places does not name K4. This record gives every new source key a cross-reference there (the fifth note did for `source.retrieval`). It is inside the one-file fence and changes no sentence of K4.", "The K2 rows, the title, the D1 key-words line, TL;DR item 1, the two tables of K1 and rule 4 of K8 are not edited in place. This record's convention is add-only: the note quotes each and gives its reading, and the two amended sentences are stated in the note as `From the merge of this note it reads`. Draft #38720 edits the K2 row at 153 in place with its code; the note's sentence about that row holds before and after it.", "Names: the note writes the six decisions of #38750 as `#38750 D1` to `#38750 D6`, and `row N of #38750`, because this record already writes ruling D1, D2 and D5 for rulings of its own, and `the epic` for another card (the one its own card is a child of). The second commit made that change.", "The overlap check answered exit 0, not the exit 1 the order expected. See overlap_check.", "One gate first answered exit 3 (prerequisite not built), then exit 0 after a build under the verify lock. See gates.first_pass.", "The PR body ends with the repository's footer block (a rule and one session-URL footer line, AGENTS.md's form for PR bodies) and then the signed trailer as its last non-empty line. The harness reminder's own two-line footer was not used: the repository's form takes precedence. Stored body: 21689 bytes sent, 21689 stored, identical; nothing was appended.", "Environment: fleet-write/dispatch.mjs prints the value of `HTTPS_PROXY` in its own re-exec notice, and that line reached this run's transcript when its stderr was read. Variable name only, per the rule; it is the local proxy address and no credential.", "CI was not waited for. One reading of the check-runs was taken after the pull request opened; see gates.ci_check_runs.", "Cleanup: the worktree and its node_modules were removed before this comment was posted (the comment was sent from the shared checkout, whose write tools are byte-identical). The work is on origin at 6552e2905b93650940778b59220a714fdc704c57." ], "mcp_calls": "0. No GitHub MCP tool was called. Reads went through `gh api` and git; writes went through the relay.", "api_writes": "2, both `POST /repos/objectstack-ai/objectstack/dispatches` (the fleet-write relay; the runner writes as objectstack-fleet[bot]). (1) request fw-20261130T123320Z-2ac02a, op `pr_create`: on the runner `POST /repos/objectstack-ai/objectstack/pulls` (draft), `POST /repos/objectstack-ai/objectstack/issues/38764/assignees`, `POST /repos/objectstack-ai/objectstack/issues/38764/labels`; run 46419771814, conclusion success. (2) this comment, through post-stamped.mjs: on the runner `POST /repos/objectstack-ai/objectstack/issues/38760/comments`. Not REST writes: 3 git pushes to the branch (the empty-branch probe at acf3b33e, then 151609a7, then 6552e290). No force-push.", "classifier_refusals": [], "open_questions": [], "security_findings": "none", "out_of_scope_findings": [ "carrier: #38750 (its rows 2 and 3) · noted, not filed · two texts K2 lists still say that rerank stays the adapter's: the opening of content/docs/protocol/knowledge.mdx and the class note of `KnowledgeService` in packages/services/service-knowledge/src/knowledge-service.ts. By K2 each is rewritten by the PR whose code makes the new sentence true, so neither is a defect today: main reranks nothing." ] }docs(adr): ADR-0161 dated note — a knowledge source declares rerank; …