Repository navigation
docs(adr,spec): ADR-0084's notes catch up with the knowledge_source row; the knowledge_source tombstones name the code door - #38015
Conversation
…; knowledge_source tombstones name the code door ADR-0084: a dated note under the type-to-group table reads the registry again (35 entries, 34 rows, AI 5), the fold sentence and the 2026-11-25 amendment-table row are marked for the second AI row, and item 6 is headed for both types it places. No row, order or tier changes. knowledge_source: each prescription that names `os migrate meta` first says what the author of a registration in code does, and the D3 entry knowledge-source-registration-governed states what a source whose 18 id began with an underscore leaves behind and how it is dropped. Text only. Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP Co-authored-by: Claude <noreply@anthropic.com>
… for the tombstone text `check:generated` found one artifact stale after the tombstone change, content/docs/references/**, and `--fix` rewrote one page of it: content/docs/references/ai/knowledge-source.mdx. The changeset is a patch on @objectstack/spec: text only, no schema shape. Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP Co-authored-by: Claude <noreply@anthropic.com>
main carries the datasource-row change to ADR-0084 (its own dated note under the type-to-group table, at the spot this branch's note was written). Resolved by keeping that note first and this branch's note after it. This branch's note is reworded for the table as it now stands: the registry is read again at origin/main 62dd9e1 (35 entries, 34 rows, unchanged counts), and its last sentence names the datasource row as the one row rewritten since the 2026-11-26 note. Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP Co-authored-by: Claude <noreply@anthropic.com>
…bed again on the rebuild The entry said the build under the new name sends the content fields to the embedding provider for every record. That holds for an adapter that embeds (pgvector, turso); the memory adapter reports no embedding and sends nothing. The sentence now says "on an adapter that embeds". Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP Co-authored-by: Claude <noreply@anthropic.com>
main moved the knowledge service (a scheduled reconcile) and packages/spec (the ask-question envelope) since the last merge. No conflict; none of this branch's files is touched by it. Merged so the upgrade entry's text is read against the service it will land beside. Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP Co-authored-by: Claude <noreply@anthropic.com>
…tarts the build The entry said the renamed source is built "at the next boot or by `os knowledge rebuild` where `buildAtBoot` is `false`". main now has a third moment, the scheduled reconcile, which builds a source the adapter holds nothing for exactly as the boot pass does. The entry's point is what the build costs, not what starts it, so the sentence says that: every record the source covers is read, and on an adapter that embeds the content fields of each are sent to the embedding provider again. Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
What this run could not see
Coarse fallback — 177 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 124c275a339603027b7130f1986eb75275f4643d && git checkout 124c275a339603027b7130f1986eb75275f4643d
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 4af32b99db078cef6b9cbda8f2f4a77632b75f49 4f6792529c3a86ae2e44e249fa4c8bada27956fe && git checkout -B drift-repro 4af32b99db078cef6b9cbda8f2f4a77632b75f49 && git merge --no-ff 4f6792529c3a86ae2e44e249fa4c8bada27956fe
node scripts/docs-audit/affected-docs.mjs --json 4af32b99db078cef6b9cbda8f2f4a77632b75f49
|
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 Contract-review-claim: session_016WV4czzx9dtSEm3jWWL9c3 · head 4f67925 · 2026-11-27T16:34Z |
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 Contract reviewServed-tier: Inputs read: card #37740 (body, triage, claim, dev report) and folded card #37741 (body, triage, claim); PR #38015 body and file list; the net diff against Check-runs on the head: 70, all completed; 0 failed; 60 success, 10 skipped (the opt-in and placeholder rows: Lint UI, Temporal Conformance, the Dogfood matrix placeholder, Dogfood Verify CLI, UI Published Artifacts, Borrowed queue verdict, Queue verdict, 18.x upgrade harness, Packed-tarball smoke, Schedule gate). Test Core 1 to 10, Type Check (workspace, source gates, consumer gates, debt ledger), Lint (ESLint, docs and code guards, repo and tooling gates, CI release and engine gates, PM dispatch-gates), Spec property liveness, Check Changeset, Build Docs, Check Documentation Links and Governed Surface Queue Guard are all success. The one family the dev left to CI (the CLI spawn test ① Derived judgments
② Semver levelChangeset Clause-②: no. Agreed: no authorable capability is taken away or added at any consumer. ③ Boundary flagsOpen question (item 6's closing note, the clause "its schema requires one object ... so the first test of the rule sorts it 高级"): A is the true one; keep the clause.
Dev premise corrections, each checked:
Dev deviations:
Out-of-scope notes from the dev: (a) Security-touching is SQL push-down: the diff holds no query, no id materialisation and no in-app join. ④ Design judgment
No must-fix, no should-fix. N1 — The entry says without condition "The adapter also keeps the index it built under the old id". Of the adapters in the tree, only Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 L1 verdict (L1-a): ACCEPT at head 席位核对Shape and gates. 6 files, +98/-18. Check-runs at 4f67925: 60 success, 10 expected skip, 0 failed. Governed ( Contract review. Record 7223548043 at this head: PASS at the contract tier ( The parts left to me.
Open question (1): A, keep the clause. The record rules it in ③. Item 6's lead-in says three sentences place the type, so dropping the clause would leave two and is not a one-clause edit. The clause restates the first test, which the schema's required Security-touching. The record says Follow-up for the seat. The dev's out-of-scope note has no carrier card: Landing: governed, so it goes through the seat's Tier H handoff, not area label-write --land. |
|
repo:objectstack#1 · os-elon-musk · session_016WV4cwoXEE1amuRAGHdPBs Seat record · 2026-11-27T16:42Z · PR #38015 (Fixes #37740, Fixes #37741) · head 维护者速读
Seat opinion: land. 席位核对 — ACCEPT · repo:objectstack#1 · head
|
|
repo:objectstack#1 · os-elon-musk · session_016WV4cwoXEE1amuRAGHdPBs Approval request · governed @os-zhuang — text follow-ups of the |
Fixes #37740
Fixes #37741
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
Two cards from one contract record (the review of the change that made
knowledge_sourcea governed type): its nit N2 is #37740, its nit N5 is #37741. Text only: no schema shape, no behaviour, no menu row.#37740 — ADR-0084's notes read true for the table as it stands (governed,
docs/adr/**)The table has held a
knowledge_sourcerow since that change (AI, order 5, 高级). The prose around the table still described it without that row. Five places, each amended in the record's own dated form, struck text kept:origin/main62dd9e1ef5holds 35 entries — the 33 of the two earlier readings and two registered on 2026-11-27,form(ui) andknowledge_source(ai);formhas no row yet, so the table has 34 rows; AI counts 5.ai_context") gains a dated note: AI holds two 高级 types, so either one draws the label.ai_context") gains a dated note: a second row has been written under item 6 since.ai_context's row (fourth, no longer last in AI) and how the same three ruled sentences placeknowledge_source.The card says "33 entries"; the registry holds 35, because
formwas registered the same day (hidden from Studio's directory, no row). The note says 35 and says why the table has 34 rows.Nothing is decided: the row, its order and its tier were written by the earlier change under item 6, and
studioMenuPlacement.tsalready mirrors them. No Status line changes.#37741 — the
knowledge_sourcetombstones say what the author of a registration in code does (packages/spec)os migrate meta --from 18(id,source.contentFields,embedding,vectorStore,adapterConfig,refresh.cron, and the'*'member ofsource.content) now first says: a source registered in code (KnowledgeServicePlugin({ sources }),registerSource) is in no stack collection, so the command lists no edit for it, and the edit is made in the registration itself. One constant,CODE_DOOR_18, placed before the migrate sentence, which stays the last sentence of its prescription (the house pin). The prescription for a retired source kind (file,http) is unchanged: it sends nobody to the command.knowledge-source-registration-governed(the entryos migrate meta --from 18prints) now states the one exception to "nothing is rebuilt": a source whose 18idbegan with an underscore. Anamemust start with a letter, so that source is renamed; an adapter keys what it holds by the source's name, so the renamed source is built from nothing under its new name and the adapter keeps the index it built under the old id; the service never drops that index (it drops one only for aknowledge_sourceitem it stops serving). The entry says how it is dropped:dropSource({ source })on the adapter (IKnowledgeService.getAdapter) withnameset to the old id, or in the adapter's own store where the adapter has nodropSource.knowledge-source.test.ts: each of the six tombstones and the'*'message must name both spellings of the code door and "in the registration itself", each before the sentence that names the command.check:generatedfound one artifact stale after the tombstone change (content/docs/references/**), and--fixrewrote one page of it:content/docs/references/ai/knowledge-source.mdx.@objectstack/specpatch.Tests
All on head
4f6792529c, in one hold of the shared verify lock (VERDICT command-exit 0), unless a line says otherwise.pnpm --filter @objectstack/spec build— exit 0.pnpm --filter @objectstack/spec check:generated— exit 0: "All 14 generated artifacts are up to date".pnpm --filter @objectstack/spec test— exit 0:Test Files 909 passed (909),Tests 28748 passed | 1 todo (28749).pnpm --filter @objectstack/spec typecheck— exit 0.pnpm --filter @object-ui/app-shell exec vitest run --root ../.. --maxWorkers=2 packages/app-shell/src/views/studio-design/studioMenuPlacement.test.ts— exit 0:Tests 19 passed (19). This is the test that parses the ADR's table rows; no row changes here.Ablation (one): the new pin goes red when one tombstone loses the code-door sentence
Run on
df045b9f8b. The two files it involves have the same blobs on the final head:knowledge-source.zod.ts0d433e77468e,knowledge-source.test.ts56ebce2f5d4e.Through
scripts/ablation-replace.mjs: the+ CODE_DOOR_18line of one tombstone (adapterConfig) replaced by an empty-string term. Direction set before the run: that row red, every other test green.ok mutation landed: anchor 1 -> 0, blob 0d433e77468e -> 8a47142baebf;+ CODE_DOOR_18lines on disk during the run: 6 (7 before).Tests 1 failed | 31 passed (32). The one failure is the row "adapterConfigis refused at its own path with its prescription, the code door and the migrate sentence":AssertionError: `KnowledgeServicePlugin({ sources })` is named: expected -1 to be greater than -1.ok restored: blob == HEAD (0d433e77468e) and `git diff HEAD` is empty; 7 lines again. The full suite above ran after it.The first attempt measured nothing and is void: its replacement text was a prefix of the anchor, so the tool refused it ("the replacement count moved 1 -> 1, a rise of 0, not the declared 1") and restored without running the test. The replacement was changed and the ablation run once more.
Probe (one-off, not committed): an underscore-led id leaves its index behind, and dropSource removes it
A test file placed in
packages/plugins/knowledge-memoryfor the run and removed after it (git statusclean, checked by the same script). It reads the schema and the memory adapter:KnowledgeSourceSchema.safeParseof a source named_kbis refused, at pathnamealone; the same source namedkbparses._kb, then the source built underkb:old key holds ["article:1"] new key holds ["article:1"].dropSourcewith the source'snameset to_kb:old key holds [] new key holds ["article:1"].Tests 1 passed (1).Two earlier attempts measured nothing and are void: the first imported the service and stopped on a workspace package that was not built; the second read a field the listing does not have.
The service's half is pinned by landed tests and was not run again here: "unregisterSource removes a source registered in code and keeps its index" (
service-knowledge,knowledge-source-registry.test.ts) and the adapter contract suite'sdropSourceblock.Acceptance notes
Container & modelline namedocs/adr/0087-metadata-protocol-upgrade-contract.md. That file holds noknowledge_sourcetext (grep -c knowledge: 0; controlgrep -c D3: 19). The D3 entry the card means ispackages/spec/src/migrations/entries/semantic/19.knowledge-source-registration-governed.ts, which is what this PR edits. ADR-0087 is not touched; the PR is governed through ADR-0084 alone.nametakesROUTER_ADDRESSABLE_NAME_PATTERN(a letter first) where the 18idpattern admitted a leading underscore; every adapter keys byAdapterContext.source.name;KnowledgeService.unregisterSourceleaves the index with its adapter anddropMetadataSourceruns only for a metadata item; the scheduled reconcile that landed onmainmeanwhile walks registered sources only; the three adapters in the tree (memory, pgvector, turso) implementdropSource, which the contract leaves optional.maingained a third moment (the scheduled reconcile) while this branch was open, so the sentence says what the build costs instead: every record the source covers is read, and on an adapter that embeds the content fields of each are sent to the embedding provider again.idtombstone still says "the value is unchanged, so the source's index is found again and is not rebuilt". That holds for every id that is a legal name; for an underscore-led id the parse refuses the value next, with the name grammar's own message, and the D3 entry carries the rest. The card asks for the exception in the entry, not in the tombstone..changeset/37304-knowledge-source-governed-type.md) and the hand-writtencontent/docs/protocol/knowledge.mdxsay the index is found again, without the underscore exception. Both are right for an id that is a legal name. An edit to a landed changeset is a deliberate correction with its own declaration, so it is left for the seat to place.datasourcerow) rewrote the same note block of ADR-0084 and landed first.mainwas merged twice: at62dd9e1ef5(one conflict, in that block: its note kept first, this PR's note after it, reworded for the table as it then stood) and at9a274e6725(clean).node scripts/pm/overlap-check.mjsbefore each push; on the final head:VERDICT clean exit 0, 0 PR heads.knowledge-source.zod.tsat theadapterline, about ten lines from this PR's nearest edits on either side. It has no open PR at this writing.pnpm --filter @objectstack/cli exec vitest run test/migrate-meta-engine-guidance.test.ts, which the derivation names. It spawns the CLI and needs its 71-package dependency closure built; CI runs it. What it pins for this diff was read directly: the entry's four printed fields hold no tracker id (surface279 chars,replacement863,reason2140,acceptanceCriteria648: no match; a control string matches).Verification
Read first (by risk):
docs/adr/0084-application-builder-information-architecture.md, item 6's closing note. The risk hunk is one clause: "its schema requires one object (theobjectkey of itssource, …), so the first test of the rule sorts it 高级". It applies the record's own rule ("Its schema does not require one object") to a type the ruling did not name. The row's tier does not rest on it: the two sentences that follow place the type without it. If the seat reads that clause as more than carrying out, it can be struck and the note still stands.packages/spec/src/migrations/entries/semantic/19.knowledge-source-registration-governed.ts:replacement,reasonandacceptanceCriteriaare what an upgrading author is shown. Check the drop instruction againstpackages/spec/src/contracts/knowledge-adapter.ts(dropSourcetakes anAdapterContext).packages/spec/src/ai/knowledge-source.zod.ts:CODE_DOOR_18and its seven uses.Two-minute check:
pnpm --filter @objectstack/spec exec vitest run --project local --maxWorkers=2 src/ai/knowledge-source.test.ts— expectTests 32 passed (32); six of them are the rows titled "… with its prescription, the code door and the migrate sentence".Local gates, on head
4f6792529c. Derived bynode scripts/pm/dispatch-gates.mjs --commandswith no paths; each command run as printed, its exit code recorded before any pipe; reconciled by--ran:Run reconciliation — 116 derived, 111 run, 4 NOT-MEASURED, 1 UNRUN.·✗ dispatch-gates --ran: 1 of 116 derived famil(ies) UNRUN.check:adr-index,check:adr-anchors,check:adr-symbol-anchors,node scripts/check-adr-links.mjs,check:keyed-text-bounds,check:spec-docblock-symbol-anchors,check:issue-citations,check:nul-bytes,check:role-word,check:closed-ceremony-text,node scripts/check-adr-0087-registration.mjs --base origin/main,node scripts/check-empty-changeset.mjs --base origin/main,node scripts/check-changeset-no-major.mjs --base origin/main, and the spec's owncheck:generated,check:docs,check:api-surface,check:authorable-surface,check:liveness,check:upgrade-guide,check:spec-changes.node scripts/adr-index.mjs --check: exit 0, "adr-index: OK — docs/adr/README.md is current and every record parsed." No index regeneration was needed.The five not measured here, each with its reason (none is a finding; CI runs all five)
pnpm --filter @objectstack/cli exec vitest run test/migrate-meta-engine-guidance.test.ts(Acceptance notes).pnpm --filter @objectstack/spec run check:skill-examples: its client-SDK surface reads the declarations of@objectstack/client-react, a 48-package build closure that is not built here. This diff adds or changes no fenced example.pnpm check:dual-build-cjs-loads: reads every package'sdist("Runpnpm buildfirst").pnpm check:lean-entry-closure: loads the built entries of@objectstack/objectql(a 14-package closure).pnpm check:type-check-debt: its re-measure builds every package under the shared verify lock. It got no turn on the first run (VERDICT queue-timeout (exit 99)), and the second was withdrawn while still queued: a whole-workspace build is out of proportion to a text-only diff. Its structural half printed "OK — 132/135 workspace packages type-checked (plus the root), 0 in the DEBT ledger".origin/mainat that moment, and that none of the commits it could see touched what the answer derives from.CI: no check-run existed when this body was written; the PR's own check-runs are the verdict for every family CI runs.
🤖 Generated with Claude Code
https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP