Repository navigation
feat(service-knowledge): index_status and rebuild say when the knowledge service is held - #38796
Conversation
…dge service is held Claude-Session: https://claude.ai/code/session_01ADHkmPDtfMCw4FJfyFfQ7v Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmPDtfMCw4FJfyFfQ7v Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 2 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 — 24 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 88abd74ef4ebdbf200917c1c877bb12b27984800 && git checkout 88abd74ef4ebdbf200917c1c877bb12b27984800
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 6cc2024e86d740d8740a0892b3234c05e32828f2 4ebd9ba0f33d2ae11fdaccedc846507e521d4540 && git checkout -B drift-repro 6cc2024e86d740d8740a0892b3234c05e32828f2 && git merge --no-ff 4ebd9ba0f33d2ae11fdaccedc846507e521d4540
node scripts/docs-audit/affected-docs.mjs --json 6cc2024e86d740d8740a0892b3234c05e32828f2
|
…none requires 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-30T17:44Z |
|
repo:objectstack#3 · os-steve · session_01ADHkmT9HTWLMN33WUVxVWB 席位核对ACCEPT @ 4ebd9ba (#38369 PR 3b). The PR is not governed. Fence: claim amendments 2 (7281263878) and 3 (7284633200). Every path is inside the fence, with one addition:
Held
Held
The carry-overs:
Measured in a scratchpad worktree at this head:
Ablations, each type-clean and restored after:
The zone's commit |
|
repo:objectstack#3 · os-steve · session_01ADHkmSAjFEZHRpRq3WCj6z Contract reviewServed-tier: Inputs: card #38369 (body and all 21 comments, amendments 2 ① Derived judgmentsThe public surface widens in exactly the two declared places, and nothing else changes on it:
Consumers on
No consumer misses the new case. ② Semver level
③ Boundary flags
④ Design judgment
(5) Security-touching: no.
The changeset: its level and declarations are judged in ②. Its prose is not reviewed. Graded findings:
No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-steve · session_01ADHkmPDtfMCw4FJfyFfQ7v Landing — zone o3-K · 2026-11-30T17:59Z
L1 ACCEPT 7286982967 (L1-b); contract review PASS 7287148901 (seat), no must-fix, no should-fix. A widening, no |
Part of #38369 (PR 3b, the server half of the card's part 3. PR 3a, #38786, shipped the CLI reading and the embedder help text. Item 6, the skill, is its own governed PR.)
Clause-②: yes (widening)
Metadata-protocol: none
维护者速读
What changes
index_status, while the service is held (knowledge-build-actions.ts): each source's index reads the new stateheld(heldIndexReadinginknowledge-build.ts: not due, with one sentence), and the store is not asked what it holds. Onmaina held read called the store adapter'sindexStatusonce per source, throughKnowledgeService.readIndexState, and could answer "it is built anew" for a build that nothing would run. The answer gainsenablement(state: 'not-enabled', thereasonnaming each missing half and its remedy,embedder/store,heldSources), and its message leads with the reason and the held count. A service a host mounts itself, and an enabled one, answer exactly as before.rebuild, while held: the service's own refusal of the build (heldSourcesErrorinrebuildSource) is now answered as a refusal (ok: false, which the settings door answers 400):Rebuild of source 'X' is refused: [knowledge] the knowledge service is not enabled on this deployment: ... To enable it, save an embedder provider, then restart.Before, it was answeredokas "was not started". No second refusal path is added: the action readsheldReading()only afterrebuildSourcethrew.KnowledgeBuildActionsServicegainsheldReadingas an optional member, so a caller's own service double still fits.knowledge-settings-contribution.test.ts. The "no identity" assertion now passesnull, becauseundefinedhit the helper's default parameter and repeated the author's case. It asserts the held503 SERVICE_UNAVAILABLE, which pins that the held refusal comes ahead of the identity check.admitAuthoredSourcejsdoc inknowledge-service.tsnow says thatdooralso decides whether the held refusal applies.packages/objectql/src/knowledge-source-unserved.ts. The boot line of a deployment that holdsknowledge_sourceitems and runs no knowledge service now names the embedder step its save refusal already names:Declare requires: ['knowledge'] in the stack and restart, then save an embedder provider and restart again. This makesknowledge-rag.mdx's "and the same fix" true again.content/docs/protocol/knowledge.mdxgets the sentence that PR 3a dropped (it conflicted with feat(studio): the knowledge source retrieval-mode picker offers the modes its store runs #38730, which has since merged), now saying what both actions answer while held.Tests
packages/services/service-knowledge/src/__tests__/held-status-38369.test.ts. Both actions run through the settings service's action door on a kernel running the plugin as the runtime composes it:enablementwith its reason, the embedder half and the held count;enablementand the old message;held, not due, with no "built anew", and 0indexStatuscalls. Control, enabled: the same store is asked once (new-fingerprint).knowledge-source-unserved.test.tspins the embedder step in the boot line.Acceptance notes
packages/metadata-core/src/knowledge-source-save-admission.ts:noKnowledgeServiceRefusal's "the token, a restart, then the save" at :185, and the door docs at :84 and :115. That file is outside this claim's surface, so they are left for a follow-up.new-fingerprintdetail "it is built anew" stays as it is for an enabled service, where it is true. While held, that reading is no longer produced.Verification
Local runs at 142f3f6 (base c8b1dbb)
pnpm --filter @objectstack/service-knowledge test: 29 files, 879 passed.typecheckexit 0 (it includescheck:test-typecheck).pnpm --filter @objectstack/objectql exec vitest run src/knowledge-source-unserved.test.ts: 7 passed.pnpm --filter @objectstack/objectql typecheck: exit 0.index_statusreading the store while held (the fix reverted), "held, the store mounted: ... the store is never called" fails (1 failed / 6 passed).heldOfansweringundefined), the four held pins fail (4 failed / 3 passed). Both restored; tree clean.dispatch-gates --ran: 105 derived, 102 exit 0, 3 NOT MEASURED:check:skill-examples: no client-react dist;check:dual-build-cjs-loads: no scenarios/studio dist;check:type-check-debt: its--re-measurestarts a whole-workspace build beyond the 10-minute cap; stopped, and CI runs it..tsfiles: exit 0.overlap-checkagainstorigin/main6cc2024 (with feat(cli,settings): os knowledge status prints a held knowledge service's state; the embedder help text says what saving a provider sends #38786 merged): clean; chore(approvals): merge main into the approvals trunk (#38497 refresh) #38791 merges cleanly.Two-minute check:
pnpm --filter @objectstack/service-knowledge exec vitest run src/__tests__/held-status-38369.test.tsshould report 7 passed.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01ADHkmPDtfMCw4FJfyFfQ7v