Repository navigation
fix(service-knowledge): a source naming an unmounted adapter is logged once at boot - #37951
Conversation
…d once at boot The boot build pass no longer adds a warn line for a source whose adapter is not mounted; reportUnmountedAdapters names it once at error. Pinned by a boot-pass test counting every log line that names the source. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
📓 Docs Drift CheckThis PR changes 1 package(s): 2 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 — 4 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 2f473b2d08650557a230c0956bee22a184fbe33f && git checkout 2f473b2d08650557a230c0956bee22a184fbe33f
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 94b0314c80eed17bdf2d656e317125da6249d9f5 13f32fc828a388ed7188f0ec6a5e3ed042013a71 && git checkout -B drift-repro 94b0314c80eed17bdf2d656e317125da6249d9f5 && git merge --no-ff 13f32fc828a388ed7188f0ec6a5e3ed042013a71
node scripts/docs-audit/affected-docs.mjs --json 94b0314c80eed17bdf2d656e317125da6249d9f5
|
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 L1 verdict (L1-a): ACCEPT at head 席位核对Shape and gates. Item 1, one boot line: delivered. Item 2, the publish-time refusal: closed by decision D, accepted. The card's Done-when leaves the refusal point to the lane and names boot as an allowed one. On this head the rest of Done-when already holds on Changeset, sentence by sentence. Named twice before, once at Body and evidence. The area's body patch (Fixes, D's acceptance line) is the area's to make under os-dev rule 3. The ablation run outside the verify lock is declared in the PR, the change is 5 lines in one package, and Test Core is green on the head, so it counts. Landing: not governed, under 3000 lines, no narrowing. The area lands it. |
|
repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP Landing · area o1-C · head
State: ready + auto-merge; #37479 closes on merge via |
…pter main's boot pass (#37951) read the source's named adapter; a source that names none is now placed through boundAdapterId, and one that cannot be placed is left to the reading, as an unmounted named one is. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP
Fixes #37479
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
packages/services/service-knowledge/src/knowledge-service.tsbuildIfDue: at boot, a source whose adapter is not mounted is skipped by the first-build pass without a line. Before, the pass read its index state,getAdapterthrew the unmounted-adapter refusal, and the pass logged it atwarnas "is not built at boot: what the adapter holds could not be read (...)", beside theerrorthatreportUnmountedAdaptersalready prints atkernel:bootstrapped. Now the boot says it once, aterror, naming the source, the adapter and the mounted adapters.knowledge_sourceitem added while the process runs) nothing changes: no boot reading runs then, so the reload build'swarnis still the one line that names the source.SERVICE_UNAVAILABLE503 (PR feat(core): requires knowledge mounts the knowledge service and one vector store #37442); not touched.This is item 1 of the re-scope (card comment 7187970703). Item 2, a publish or
os validaterefusal of an adapter name no deployment can serve, is NOT in this PR: it would narrow what is accepted, and the area decides. Options are in the dev report on the card. That is why this PR saysPart ofand leaves the card open.Tests
src/__tests__/knowledge-build.test.ts: with a data engine bound, one mounted source and one namingpgvector(not mounted), the boot pass plus the boot reading produce exactly one log line naming'docs'across debug/info/warn/error. That line is aterrorand names the adapter as not mounted. The mounted source is still built (status: 'done').expected [ [ 'warn', …(1) ], [ 'error', …(1) ] ] to have a length of 1 but got 2(1 failed, 22 passed). With the line restored, the file is green (23 passed).Package test and typecheck (head 13f32fc)
pnpm --filter @objectstack/service-knowledge test && pnpm --filter @objectstack/service-knowledge typecheckunder the verify lock:VERDICT command-exit 0, Test Files 17 passed (17), Tests 529 passed (529).typecheckistsc --noEmit && pnpm check:test-typecheck, so the test files are type-checked too.Acceptance notes
os validaterefusal) is closed by area decision D, with no publish-time refusal added. The refusal point is boot:reportUnmountedAdaptersprints a coded error naming the source and the adapter.searchWithRefusalslists such a source as refused (knowledge-service.tsnear :1882), and index and search answer the coded 503 (PR feat(core): requires knowledge mounts the knowledge service and one vector store #37442 and this PR). Options A (save-time admission) and B (aragflowtombstone) stay in the dev report on the card, for a future card.:372as "the boot build pass's kept(...) line". On origin/main 73d5e34,:372isdropMetadataSource'skept(...), which runs when a source is removed, not at boot. The second boot line comes frombuildIfDue(thewarnof anunreadableindex reading). The fix sits there, anddropMetadataSourceis not touched.Verification
Read first:
knowledge-service.tsbuildIfDue(the one added guard line), then the new pin.Two-minute check:
pnpm --filter @objectstack/service-knowledge exec vitest run --maxWorkers=2 src/__tests__/knowledge-build.test.tsshould show 23 passed. Delete the guard lineif (trigger === 'boot' && !this.adapters.has(entry.handed.adapter)) return;and the pin fails with 2 lines (warn, error) where it expects 1.Derived gates (local, head 13f32fc): 68 exit 0, 2 NOT MEASURED
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 70 families from the 3 changed paths. All 70 ran;--ranwith recorded exit codes: "70 derived famil(ies) accounted for — 68 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3)".check:dual-build-cjs-loads, reason: PREREQUISITE NOT MET, it needs every package'sdist/(a whole-tree build). CI runs it.check:type-check-debt, reason: its re-measure build did not get a turn on the shared verify lock (queue-timeout 99). CI runs it.The package-wide scans (
pnpm lintand the rest of the farm) are CI's.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP