Skip to content

feat(service-knowledge): index_status and rebuild say when the knowledge service is held - #38796

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-38369-held-index-status
Nov 30, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-38369-held-index-status

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

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

维护者速读

  • 用户能看到什么变化:没启用知识服务(缺嵌入模型或知识存储没挂上)的私有部署上,管理员查看知识库状态时,第一行写明未启用、几个知识源被挂起、原因和怎么补,每个知识源显示「挂起」,不再误报「需要重建」;手动重建会被直接拒绝并给出补救办法。没有知识服务的部署,启动日志里的补救说明也补上了「保存嵌入模型后再重启一次」这一步。
  • 为什么做:知识服务「挂载不等于启用」那张卡的最后一块代码,让管理员看得见服务为什么没生效;同时修正了上一张 PR 审核时留下的三处小问题。
  • 出错会怎样:只影响状态查询和手动重建的回答,以及一行启动日志;已启用的部署和宿主自己挂载知识服务的部署回答不变。撤回这次合并即可恢复。
  • 要你做什么:无。

What changes

  • index_status, while the service is held (knowledge-build-actions.ts): each source's index reads the new state held (heldIndexReading in knowledge-build.ts: not due, with one sentence), and the store is not asked what it holds. On main a held read called the store adapter's indexStatus once per source, through KnowledgeService.readIndexState, and could answer "it is built anew" for a build that nothing would run. The answer gains enablement (state: 'not-enabled', the reason naming 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 (heldSourcesError in rebuildSource) 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 answered ok as "was not started". No second refusal path is added: the action reads heldReading() only after rebuildSource threw.
  • KnowledgeBuildActionsService gains heldReading as an optional member, so a caller's own service double still fits.
  • Carry-overs from the PR 2 contract review (record 7257422588, routed here by L1 record 7257956376):
    • N1: knowledge-settings-contribution.test.ts. The "no identity" assertion now passes null, because undefined hit the helper's default parameter and repeated the author's case. It asserts the held 503 SERVICE_UNAVAILABLE, which pins that the held refusal comes ahead of the identity check.
    • N2: the admitAuthoredSource jsdoc in knowledge-service.ts now says that door also decides whether the held refusal applies.
    • N6: packages/objectql/src/knowledge-source-unserved.ts. The boot line of a deployment that holds knowledge_source items 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 makes knowledge-rag.mdx's "and the same fix" true again.
  • Docs: content/docs/protocol/knowledge.mdx gets 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

  • New 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:
    • the not-enabled enablement with its reason, the embedder half and the held count;
    • both halves at once;
    • a host-mounted service and an enabled one answer no enablement and the old message;
    • a held rebuild is refused with the remedy and no store call;
    • an enabled rebuild is not refused.
  • On a service with a data engine bound and a counting store, while held: the index reads held, not due, with no "built anew", and 0 indexStatus calls. Control, enabled: the same store is asked once (new-fingerprint).
  • knowledge-source-unserved.test.ts pins the embedder step in the boot line.

Acceptance notes

  • N2's other stale lines are in 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.
  • The new-fingerprint detail "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. typecheck exit 0 (it includes check:test-typecheck).
  • pnpm --filter @objectstack/objectql exec vitest run src/knowledge-source-unserved.test.ts: 7 passed. pnpm --filter @objectstack/objectql typecheck: exit 0.
  • Ablation 1: with index_status reading the store while held (the fix reverted), "held, the store mounted: ... the store is never called" fails (1 failed / 6 passed).
  • Ablation 2: with the held branch disabled (heldOf answering undefined), 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-measure starts a whole-workspace build beyond the 10-minute cap; stopped, and CI runs it.
  • eslint over the changed .ts files: exit 0. overlap-check against origin/main 6cc2024 (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.ts should report 7 passed.


Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01ADHkmPDtfMCw4FJfyFfQ7v

@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 30, 2026
@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/objectql, @objectstack/service-knowledge, touching 14 documentable anchor(s).

2 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/ai/knowledge-rag.mdx (via KnowledgeService (symbol, a top-level class))
  • content/docs/protocol/knowledge.mdx (via KnowledgeService (symbol, a top-level class))
What this run could not see
  • 3 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 69 of 252 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 124 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 24 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 6cc2024e86d740d8740a0892b3234c05e32828f2 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 88abd74ef4ebdbf200917c1c877bb12b27984800 — the merge of head 4ebd9ba0f33d2ae11fdaccedc846507e521d4540 into base 6cc2024e86d740d8740a0892b3234c05e32828f2, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# 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

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 6cc2024e86d740d8740a0892b3234c05e32828f2 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-steve · session_01ADHkmPDtfMCw4FJfyFfQ7v

Final head for review — zone o3-K · 2026-11-30T17:44Z
Head-sha: 4ebd9ba0f33d2ae11fdaccedc846507e521d4540
CI: every check-run on this head is success or an expected skip (42 success, 17 skipped, 0 failed, 0 running). mergeable_state clean. check-governed-merges --pr 38796: NOT governed, under the human-merge threshold.
PR 3b of #38369 under claim amendments 2 (7281263878) and 3 (7284633200); dev report 7285913533. While the service is held, index_status answers each source as held with 0 store indexStatus calls (seat route B; pin + two ablations), adds enablement, and rebuild answers the service's own held refusal; carry-overs N1, N2, N6 and the protocol-page sentence dropped from 3a.
Zone fix on top of the dev head (4ebd9ba0): Check Changeset was red on 142f3f66 because the changeset graded @objectstack/service-knowledge minor beside Metadata-protocol: none, which allows patch only. Graded patch; the gate, run with this PR's event payload, is green locally and in CI.
Clause-②: yes (widening), kept in the zone as a rule 5 exception; L2 at CONTRACT_REVIEW_TIER by the seat. Next: L1 (L1-b).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-steve · session_01ADHkmT9HTWLMN33WUVxVWB
L1-b, the seat's L1 thread · 2026-11-30T17:51Z · first review

席位核对

ACCEPT @ 4ebd9ba (#38369 PR 3b). The PR is not governed. Clause-②: yes (widening), so the L2 is the seat's.

Fence: claim amendments 2 (7281263878) and 3 (7284633200). Every path is inside the fence, with one addition:

  • packages/objectql/src/knowledge-source-unserved.test.ts is not named in either amendment. It is the pin of the N6 sentence the fence names, and it adds one assertion.
  • I read it as the same item's test, not a new face.
  • The widening is the exported KnowledgeIndexState (from service-knowledge's index.ts), which gains 'held', plus the optional enablement on the index_status answer. Both add only. No other package reads the union.

Held index_status asks no store.

  • When heldReading() is set, each entry's index is heldIndexReading(id): state: 'held', due: false, and the detail no longer says "built anew". readIndexState (the path that calls adapter.indexStatus) is not called.
  • enablement carries state: 'not-enabled'. Its reason is heldSourcesText(held), the same sentence a held search is refused with. embedder and store appear only for the missing halves, and heldSources counts every registered source.
  • The message leads with the reason.
  • The shape matches the KnowledgeEnablementView that PR 3a's CLI reads on main (cli/src/utils/knowledge-actions.ts), field for field.
  • An enabled service, and a host-mounted one, take the old branch unchanged.

Held rebuild is refused, using the service's own refusal.

  • heldOf() is read only after rebuildSource has thrown. The answer is ok: false with the thrown message, which is heldSourcesError's and names the remedy. No second refusal path exists.
  • On main's CLI, rebuild.ts exits 1 on !started.ok with that message, as the changeset says.

The carry-overs:

  • N1: admit(knowledge, null) now reaches the no-identity case, and the assertion pins 503 SERVICE_UNAVAILABLE ahead of the identity check.
  • N2: the jsdoc now says door decides whether the held refusal applies (at save, never at duplicate).
  • N6: the boot line's remedy now has the embedder step, worded as the save refusal in metadata-core/src/knowledge-source-save-admission.ts:202 words it ("save an embedder provider and restart again").
  • The protocol page sentence describes both actions as the code answers them.
  • The stale lines the PR leaves in knowledge-source-save-admission.ts (:84, :115, :185) are outside the fence and are named for a follow-up.

Measured in a scratchpad worktree at this head:

  • held-status-38369 with knowledge-settings-contribution: 60/60.
  • objectql knowledge-source-unserved: 7/7.
  • The whole service-knowledge suite: 879/879, 29 files.
  • service-knowledge typecheck: exit 0.

Ablations, each type-clean and restored after:

  • A: index_status reads the store while held. Red: "held, the store mounted: … the store is never called".
  • B: the held rebuild is answered as before. Red: "refused (ok: false) … no store is called".
  • C: no enablement on the answer. Red: the two "no embedder" and "both halves" pins.
  • D: knowledge-source-unserved.ts restored from the base. Red: "names the item, the missing service and both remedies".

The zone's commit 4ebd9ba0 grades @objectstack/service-knowledge patch, as Metadata-protocol: none requires. With it, Check Changeset and the rest are green: 42 success, 17 skipped, 0 failed.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-steve · session_01ADHkmSAjFEZHRpRq3WCj6z

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 4ebd9ba0f33d2ae11fdaccedc846507e521d4540
Local-runs: none
Scope: no hits (face declaration, Clause-②: yes (widening) alone) + packages/services/service-knowledge/src/knowledge-build.ts, packages/services/service-knowledge/src/knowledge-build-actions.ts, packages/services/service-knowledge/src/knowledge-service.ts, packages/objectql/src/knowledge-source-unserved.ts, content/docs/protocol/knowledge.mdx, .changeset/38369-held-status.md
Security-touching: no

Inputs: card #38369 (body and all 21 comments, amendments 2 7281263878 and 3 7284633200, dev reports 7283259818 and 7285913533), PR #38796 (body, 9 files, net diff from base c8b1dbb3; main has since moved to 6cc2024e (#38786, #38778) and none of the files it changed is in this diff), and the head's check-runs: 42 success, 17 skipped, 0 failed, 0 pending (Check Changeset, TypeScript Type Check and the four Type Check · runs are success; Type Check UI skipped, no ui/ path). Final-head comment 7286800148 and L1-b ACCEPT 7286982967 were read as claims and checked against the tree.

① Derived judgments

The public surface widens in exactly the two declared places, and nothing else changes on it:

  • KnowledgeIndexState gains 'held' (knowledge-build.ts:117). It is exported as a type from the package root (index.ts:55). This is right: the reading is produced only by heldIndexReading (knowledge-build.ts:137), and only index_status calls that function.
  • The index_status answer gains an optional details.enablement (KnowledgeIndexStatusEnablement). It is present only while heldReading() returns a reading. This is right. The type is not exported from the root (N1).
  • KnowledgeBuildActionsService gains an optional heldReading (knowledge-build-actions.ts:95). The type is not exported from the root. Because the member is Partial, a caller's own service double still type-checks. This is right.
  • The held rebuild answer changes from ok: true to ok: false. Before, it answered "was not started"; now it answers "is refused: [the service's heldSourcesError sentence]". The settings door turns ok: false into 400 SETTINGS_ACTION_FAILED and keeps the message (service-settings/src/settings-routes.ts:486 on main). This answer was already a failure for its only caller: on main, os knowledge rebuild exits 1 both on !ok and on build: null. This is right, and it is what card item 4 asks for ("refused with the remedy").
  • The held index_status message now leads with the reason and the held count. The build counts are dropped from it (N4). This is right.

Consumers on main (6cc2024e) of KnowledgeIndexState or of the index_status answer, and what each does with 'held' and enablement:

  • packages/cli/src/commands/knowledge/status.ts (PR 3a): prints index.state as an open string, so held prints as itself, not due, with its detail. It prints describeEnablement and the reason first. KnowledgeEnablementView in cli/src/utils/knowledge-actions.ts:84 matches KnowledgeIndexStatusEnablement field for field (state, reason, embedder, store, heldSources). Handles it.
  • packages/cli/src/commands/knowledge/rebuild.ts: on !started.ok it calls this.error(message, { exit: 1 }), so the follow-up index_status poll is never reached. Handles it.
  • packages/cli/src/utils/knowledge-actions.ts: index?: { state?: string } is an open string, not a switch. Degrades safely.
  • The Studio retrieval-mode picker (ui/packages/app-shell/src/views/metadata-admin/knowledgeRetrieval.ts): reads only details.adapters and details.defaultAdapter. The held answer still carries both, because it spreads the same details and adds enablement beside them. Unaffected.
  • The Settings page: knowledge.manifest.ts declares no renderer for either action, and the knowledge namespace is reached only through the action door. Unaffected.
  • The AI tools and MCP (knowledge-tools.ts, packages/mcp): they read neither the type nor index_status. A held service hands out no tool definition (PR 1). Unaffected.
  • packages/objectql/src/knowledge-source-unserved.ts: reads neither. Its hunk changes only the text of the remedy in the boot line, for a deployment that runs no service. Unaffected.
  • Inside the package: the reconcile in knowledge-service-indexing.ts (:1268, :1371 on main) reads reading.state from readIndexStateOf, which can never yield held. The same holds for testing.ts:1337.
  • Exhaustive matches: there is no switch, Record keyed by KnowledgeIndexState, or never check over the type anywhere in the repository, and no package outside service-knowledge imports the type.

No consumer misses the new case.

② Semver level

  • The changeset level is right. The changeset grades '@objectstack/service-knowledge': patch and '@objectstack/objectql': patch, with Clause-②: yes (widening) and Metadata-protocol: none. The PR body carries the same two lines.
  • Metadata-protocol: none is right. Nothing a metadata author can write changes: no key, no accepted value and no metadata type. The change is to a runtime action's answer and to a TypeScript output union.
  • patch is right for the additive member and the optional field. AGENTS.md, Post-Task Checklist item 3, says the level follows the kind alone: "none takes patch; a non-protocol change, widening or breaking, ships patch". scripts/check-changeset-no-major.mjs (:909-910) enforces "none: every introduced entry patch" and refuses a minor beside none. This is why the zone's fix commit 4ebd9ba0 regraded the earlier minor. Check Changeset is success on this head.
  • Clause-②: yes (widening) is right. The answer gains one enum member and one optional field, and nothing is taken away. The held rebuild answer moving from ok to a refusal is not a narrowing: the service already refused the build with 503 (PR 1), and on main the only caller already exited 1 on it.
  • objectql patch is right. Its change is the text of the boot line and its jsdoc.

③ Boundary flags

  • Dev report 7285913533: open_questions: []. Its one out-of-scope finding is the stale lines N2 leaves in packages/metadata-core/src/knowledge-source-save-admission.ts:

    • :185, noKnowledgeServiceRefusal's jsdoc, "the token, a restart, then the save", which no longer matches the embedder step its code adds;
    • :84 and :115, the door docs, which do not say that door also decides whether the held refusal applies.

    I confirmed all three on main. The file is outside amendments 2 and 3, and the finding is recorded as "noted, not filed". Escalated to the seat: this is a jsdoc-only follow-up, and it needs a carrier card, because none exists yet. It is not a finding against this head.

  • The open question of dev report 7283259818 (held index_status reaches the store) was answered by the seat's route B in amendment 3. The tree carries it out: index_status calls heldIndexReading instead of readIndexState (knowledge-build-actions.ts:404, :414).

  • The open questions of dev report 7281219171 (order against feat(service-knowledge): read a source's retrieval mode and refuse a mode its store does not run #38722, and the N1/N2/N6 fence) were answered by amendment 2 (the split, and 3b's fence). Both waits are cleared in amendment 3.

  • The deviations (foreground builds, the orphaned check:type-check-debt run that was killed by PID, the PR's first line) touch no contract. The three gates the dev did not measure locally are covered by CI on this head.

  • The fence: every path is inside amendments 2 and 3, except packages/objectql/src/knowledge-source-unserved.test.ts. That file is the one-assertion pin of the N6 sentence the fence names. I agree with L1-b's reading that it is the same item.

  • SQL push-down: nothing is materialised as ids and nothing is joined in the app. heldSources is describeSources().length, read from the in-memory registry, and no query is added. No finding.

④ Design judgment

knowledge-build-actions.ts, checked against the contract:

  • (2) held is reported only when the service is held. heldOf (:117) reads service.heldReading(). That returns this.held, which only settleEnablement sets, once, at kernel:bootstrapped, and only for a service the runtime composed (knowledge-service.ts:226-233). A host-mounted service, and an enabled one, read undefined and take the unchanged branch.
  • held does not hide a real build failure.
    • Each entry still carries build and failures from the durable sync state. A build that failed or synced badly on an earlier, enabled boot still shows in the entry, and os knowledge status prints it.
    • What held replaces is the store reading, and ruling 3A forbids a held service from making that call. A held service runs no build, so no new failure can occur.
    • The summary message drops the failed-sync count (N4). The per-source details keep it.
  • (2) A held rebuild refuses without starting work.
    • Before rebuildSource, the action only does in-memory lookups: describeSource and buildRecord.
    • rebuildSource (knowledge-service-indexing.ts:793) throws heldSourcesError right after requireEntry, before rebuildOf. No lease, no lock, no sync-state write and no adapter call happen.
    • The action reads heldOf only once that throw has come back, so it adds no second refusal path. The message is the service's own sentence, which names the missing halves and their remedy.
    • The new test pins calls as [] on the store double.
  • N3: one imprecision in that branch, graded nit below.

knowledge-build.ts:

  • The 'held' member and its jsdoc bullet match heldIndexReading: not due, the adapter is not read, and the detail says so.
  • The "built anew" detail an enabled service gives stays, and there it is true.
  • See N2.

knowledge-service.ts (N2):

  • The jsdoc now says that door decides whether the held refusal applies "at save, never at duplicate". The code agrees: knowledge-service-admission.ts:249, if (this.held && options?.door !== 'duplicate').

knowledge-source-unserved.ts (N6):

  • The remedy is now "Declare requires: ['knowledge'] in the stack and restart, then save an embedder provider and restart again". This is the order of the save refusal on main (knowledge-source-save-admission.ts:200-202: the token, a restart, "save an embedder provider and restart again", then the retry).
  • It is also the fix knowledge-rag.mdx:44 names, so that page's "and the same fix" is true again.
  • The host-composed alternative correctly carries no embedder step, because a service a host mounts is never held.

content/docs/protocol/knowledge.mdx (4): each clause of the sentence matches the code:

  • "answers each held source's index as held, without reading its store": heldIndexReading, with no readIndexState call.
  • "adds enablement: not enabled, the reason with its remedy, and how many sources are held": state: 'not-enabled', reason: heldSourcesText(held), heldSources.
  • "The rebuild action refuses the build with the same remedy": ok: false, carrying the same heldSourcesText sentence.
  • "os knowledge rebuild exits 1 with it": rebuild.ts on main, !started.ok, exit 1.

(5) Security-touching: no.

  • No changed hunk changes who may read the status or start a rebuild. Both actions stay behind the settings door's manage_platform_settings write gate, which is unchanged context in the module docblock.
  • The N1 test hunk pins an existing order, from PR 2: the held 503 comes before the identity check. It does not change who may save.
  • No hunk teaches credential, token, sharing or permission behaviour.

The changeset: its level and declarations are judged in ②. Its prose is not reviewed.

Graded findings:

  • N1 (nit): KnowledgeIndexStatusEnablement is not exported from the package root. Its sibling answer types are (index.ts:66-71: KnowledgeIndexStatusEntry, Adapter, Build, Queue), so a TypeScript consumer cannot name the new field's type. The JSON contract is not affected, and no consumer on main imports it: the CLI types its own view. Left as a follow-up.
  • N2 (nit): three doc lines are now narrower than the code. KnowledgeIndexReading's jsdoc (knowledge-build.ts:119) still says the type is KnowledgeService.readIndexState's reading, and KnowledgeIndexStatusEntry.index (knowledge-build-actions.ts:133) still says "What the adapter holds against what the service expects". While held, neither is true. Separately, the existing optional field KnowledgeIndexReading.held (what the adapter's indexStatus answered) now sits beside state: 'held', which means something else. Wording only.
  • N3 (nit): on a held service, the rebuild branch at knowledge-build-actions.ts:344 answers any throw as the held refusal. rebuildSource runs requireEntry before its held check. So a source removed between describe and the start answers ok: false "is refused: [the not-registered message]", where an enabled service answers ok: true "was not started". The text is still the true reason, and the CLI exits 1 on both. Only the inline comment's "the service refused the build (heldSourcesError)" overstates.
  • N4 (nit): the held index_status message leaves out the counts the served message carried: failed syncs and record syncs waiting. The code comment says this is deliberate. The counts stay in details per source and in details.queue. An accepted deviation.

No must-fix, no should-fix.

Implemented-by: claude/issue-38369-held-index-status
Reviewed-by: session_01ADHkmSAjFEZHRpRq3WCj6z

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-steve · session_01ADHkmPDtfMCw4FJfyFfQ7v

Landing — zone o3-K · 2026-11-30T17:59Z

Probe Reading on head 4ebd9ba0f33d2ae11fdaccedc846507e521d4540
check-governed-merges --pr 38796 NOT governed; 0 of 9 paths on the register; under the human-merge threshold
CI check-runs 42 success, 17 skipped, 0 failed, 0 running; mergeable_state clean

L1 ACCEPT 7286982967 (L1-b); contract review PASS 7287148901 (seat), no must-fix, no should-fix. A widening, no !, no narrowing arm. State change: draft → ready, auto-merge armed. The seat's nits N1–N4 and the stale lines in packages/metadata-core/src/knowledge-source-save-admission.ts (:84, :115, :185) stay in the review record; no new card is filed (maintainer order of 2026-11-30T16:06Z: no new cards).

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 30, 2026 18:00
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 30, 2026
Merged via the queue into main with commit f7252bc Nov 30, 2026
60 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-38369-held-index-status branch November 30, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants