Skip to content

fix(metadata-protocol)!: global search leaves out the objects of a disabled package - #35367

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-35195-search-disabled-package
Nov 19, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-35195-search-disabled-package

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread
Fixes #35195

Clause-②: yes (narrowing: global search stops returning a disabled package's records, the answer every data route already gives)
Metadata-protocol: none
Skills-docs: none — no skill teaches which objects the global search sweep covers, or what a package disable does per door; the change moves a runtime answer, not anything an author writes

维护者速读

  • 改了什么:全局搜索 GET /api/v1/search 不再返回已停用包的对象记录;以停用包对象为引用标题目标时,命中只显示原 id,不再借出该记录的标题。
  • 为什么改:停用一个包后,数据路由对其记录一律答 404 OBJECT_PACKAGE_DISABLED,搜索却照样返回这些记录的标题和匹配片段,管理员无法如实承诺"停用即隐藏"。
  • 风险与回滚:只收窄搜索结果,没有停用包的环境零变化;回滚即 revert 本 PR(一个源文件两行判断)。
  • 先看:packages/metadata-protocol/src/protocol-record-reads.ts(sweep 循环里 isObjectOfDisabledPackage 那一行,与 readReferenceTitles 里同一判断)、packages/metadata-protocol/src/protocol.search-disabled-package-35195.test.ts、.changeset/35195-search-disabled-package.md。
  • 两分钟验证:pnpm --filter @objectstack/metadata-protocol exec vitest run src/protocol.search-disabled-package-35195.test.ts,预期 8 个用例全绿。
  • 需要你做的:无,席位落地。

What changes

searchAll (the body behind GET /api/v1/search) walks registry.getAllObjects(), which still lists a disabled package's objects: the schema stays resolvable on purpose. Nothing on that path asked whether the object's package was disabled, so the records came back as hits while GET /api/v1/data/:object/:id answered 404 OBJECT_PACKAGE_DISABLED.

  • The record sweep now asks isObjectOfDisabledPackage(registry, name), the same optional-called predicate the data plane's assertObjectRegistered and the by-name /meta reads ask, right beside the exposure decision. Such an object is never queried, never named, never counted in totalObjects, and the security service is never asked about it. An explicit ?objects= naming it answers exactly as one naming no object (a sweep, not a by-name read, so no 404), the same answer an object the exposure decision refuses already gets.
  • Reference titles: readReferenceTitles asks the same predicate of the lookup TARGET, so an enabled object whose nameField points into a disabled package keeps the bare id, the answer an unreadable target gives. Without it the disabled record's title text still reached the response.
  • Pages: no change. The page sweep reads through getMetaItems({ type: 'page' }), which already omits a disabled package's items (isItemOfDisabledPackage in protocol-meta-list-reads.ts).

The registry member is not declared on the host type (MetadataHostEngine.registry is any), so the guard uses the existing optional reader in protocol-authoring-refusals.ts: a registry that cannot answer hides nothing.

Tests

New file packages/metadata-protocol/src/protocol.search-disabled-package-35195.test.ts, through the real searchAll on the protocol, 8 cases:

  • THE PIN: a disabled package's record is not a hit, its object is never read, named or counted, and canReadObject is never asked about it; the same for a context-less call; an explicit objects= naming it equals the answer for a nonexistent object;
  • a disabled package's object as a reference title target lends no title (hit keeps case_5);
  • CONTROLS: re-enabled, the record is a hit again and the reference title reads through; an enabled object's answer is byte-equal with and without the disable; a registry without isObjectPackageDisabled hides nothing.
Ablation (both guards, source import, restore proven by blob)
  • Sweep guard deleted via scripts/ablation-replace.mjs (anchor 1 → 0, blob e880bb73d891 → b9abfc1b7690): Tests 3 failed | 5 passed (8): THE PIN, the context-less case and the objects= case red, title and controls green. Restored: blob == HEAD, git diff HEAD empty.
  • Title-target guard deleted (anchor 1 → 0, blob e880bb73d891 → 99290a4a9d50): Tests 1 failed | 7 passed (8): expected [ [ 'note_1', 'PDF export fails' ] ] to deeply equal [ [ 'note_1', 'case_5' ] ]. Restored: blob == HEAD, git diff HEAD empty.

The test imports ./protocol.js relatively (source), so no dist/ leg applies.

Package suite and typecheck

All at head cc13fef3.

  • pnpm --filter @objectstack/metadata-protocol build && … typecheck (tsc --noEmit, tsconfig includes src/**/*, so the new test file is compiled): lock VERDICT command-exit 0.
  • pnpm --filter @objectstack/metadata-protocol exec vitest run --maxWorkers=2 (whole package): Test Files 359 passed | 9 skipped (368), Tests 23226 passed | 45 skipped (23271), lock VERDICT command-exit 0.
  • The new file plus the four neighbouring search suites (api-exposure, title-lookup, skip-unreadable, published-pages): Test Files 5 passed (5), Tests 57 passed (57).

Acceptance notes

  • searchAll's method docblock in protocol.ts (its stated contract) has no paragraph for the disabled-package skip; the reasoning sits at the guard in protocol-record-reads.ts. protocol.ts was outside this card's file fence, so the docblock was left alone.
  • Read-only observation, not measured through a door: servesExpansionTarget (protocol-query-validation.ts) judges an $expand target only by its declared exposure, not by isObjectPackageDisabled. Whether a data-route $expand into a disabled package's object serves its fields was not measured here.
  • protocol-meta-list-reads.ts cites protocol.package-disable-enforcement.test.ts, which does not exist under that name in packages/metadata-protocol/src.

Verification

Head cc13fef3 (git rev-parse --short HEAD), merge base 81c09477.

Derived gate families (dispatch-gates --commands, 67)
  • 67 derived, 67 run; --ran reconciliation: 67 derived famil(ies) accounted for — 67 run, 0 NOT-MEASURED.
  • 63 exited 0 on the first pass.
  • check-plugin-teardown-shape.mjs --self-test exited 3 on the shallow clone (pinned fixture commit unreachable); after fetching that one commit: exit 0, 48 cases pass.
  • check:lean-entry-closure exited 3 (objectql dist absent); after the dogfood closure build: exit 0, Admitted set held exactly (15 packages).
  • check:type-check-debt exited 3 while the lock was held by the dogfood run; rerun with the lock free: exit 0, 0 raw tsc error(s) total, none above its recorded number.
  • check:dual-build-cjs-loads: exit 3, NOT MEASURED (needs every package built; 77 dist trees absent). CI's Lint & Repo Gates carries it.
  • node scripts/check-platform-checklist.mjs --changed-from origin/main: exit 0, 0 anchored files in the change set — nothing judged.
  • node scripts/pm/overlap-check.mjs --branch=HEAD before each push: VERDICT clean exit 0.
Dogfood battery (narrowing arm), final head cc13fef

pnpm --filter '@objectstack/dogfood^...' build && pnpm --filter @objectstack/dogfood test under the lock: Test Files 482 passed | 3 skipped (485), Tests 4092 passed | 68 skipped (4160), VERDICT command-exit 0. No failures.

test:repo was not run locally (no file of that project in the diff); CI's Test Core carries it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Utp6CbP6iSEGkWb5fn8yqd

@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 19, 2026
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/metadata-protocol, touching 2 documentable anchor(s).

⛔ 1 release-owned page(s) name something this change touched. These are read-only:

  • content/docs/releases/v17/17-1.mdx (via searchAll (symbol, a top-level function))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 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; 123 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 — 10 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 8b550f8193962a18091b79b8bc890cd63a91dc67 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 7e7e69c86b1942a03ea65c7c2a58ef6706254030 — the merge of head 7e8e4e8aa12129e28635c1f2ade5c552c2b963cc into base 8b550f8193962a18091b79b8bc890cd63a91dc67, 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 7e7e69c86b1942a03ea65c7c2a58ef6706254030 && git checkout 7e7e69c86b1942a03ea65c7c2a58ef6706254030
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 8b550f8193962a18091b79b8bc890cd63a91dc67 7e8e4e8aa12129e28635c1f2ade5c552c2b963cc && git checkout -B drift-repro 8b550f8193962a18091b79b8bc890cd63a91dc67 && git merge --no-ff 7e8e4e8aa12129e28635c1f2ade5c552c2b963cc

node scripts/docs-audit/affected-docs.mjs --json 8b550f8193962a18091b79b8bc890cd63a91dc67

⚠️ 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 8b550f8193962a18091b79b8bc890cd63a91dc67 → 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#5 · os-bill · session_01Utp6CbP6iSEGkWb5fn8yqd

2026-11-19T07:01Z Final head for review: cc13fef36fce6ee8eed1c69f3c0eb5c848f44df8. CI on this head: 37 success, 16 skipped, 0 failed. Clause-②: yes (narrowing), dogfood battery green on this head (os-dev-report 7001651530). L1 requested from L1-a.

Area notes for the reviewer:

  • Dev reads Metadata-protocol as none on the diff (no authored key moves; a runtime door's object set narrows); the claim said semantic, which the body and changeset carry. L1 to rule which; none drops the changeset to patch.
  • Out of scope, noted only: $expand into a disabled package's object (servesExpansionTarget) is not judged by the disabled-package predicate; unmeasured. Area pkg-2 measures it before filing anything.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4

维护者速读

  • 用户能看到什么变化:某个应用包被停用后,全局搜索不再搜出它的记录,跟打开列表、打开详情时的表现一致。
  • 为什么做:以前停用后列表和详情都打不开,但全局搜索还能看到这些记录的标题和匹配内容,等于停用没停干净。
  • 出错会怎样:最坏情况是停用包的记录仍出现在搜索里,和修之前一样。没有停用任何包的环境完全不受影响;重新启用后就能再次搜到。
  • 要你做什么:不需要你做任何事。它收窄了对外接口的返回结果,席位会安排一次约定审核,然后由区域落地。

席位核对 — ACCEPT (L1-a) · repo:objectstack#5 · head cc13fef36fce6ee8eed1c69f3c0eb5c848f44df8 · 2026-11-19T07:03Z

  • 形态 — 3 files, +212/−0: metadata-protocol/src/protocol-record-reads.ts (+17), a new card-named test, and one changeset. check-governed-merges.mjs --pr 35367: not governed, under the 3000-line limit. Clause-②: yes (narrowing) — an L2 face; see routing below.
  • Fixes vs card runtime: GET /api/v1/search returns a disabled package's records while its data routes answer 404 OBJECT_PACKAGE_DISABLED #35195 — the searchAll sweep now asks isObjectOfDisabledPackage(registry, obj.name) beside the exposure decision, before any query. A disabled package's object is therefore never queried, named or counted in totalObjects. An explicit ?objects= naming it reads as one naming no object. readReferenceTitles asks the same predicate of a title target, so an enabled hit that points into a disabled package keeps the bare id, the same answer an unreadable target already gets. The helper is the one protocol-authoring-refusals.ts already exports, and it optional-calls registry.isObjectPackageDisabled, the predicate the data routes and meta-object-state-routes ask. A registry that cannot answer hides nothing.
  • Changeset — read sentence by sentence against the diff. The BREAKING banner, the data-route 404 comparison, "never queried, never named, never counted", the ?objects= reading, the title-target paragraph, the re-enable fix and "pages already filtered" all match. The ADR-0087 marker is present (not-required (no-migration-prescription)), and its reason holds: no key, value or type moves, and nothing stored is rewritten.
  • Ruling asked: Metadata-protocol → none — AGENTS.md defines the line as the change to what a metadata author can write. Disabling a package is an install-state operation by an administrator, not authored metadata, and no authored key changes meaning or default here. The moved answer belongs to a runtime door. The precedents for the same family, disabled-package narrowings, all declare none: the resolveItem / MetadataFacade change, the /auth/me/permissions change, the engine function reads and the currency-code message (see the objectql / rest CHANGELOGs). With none, the level is patch: "a non-protocol change, widening or breaking, ships patch and keeps its BREAKING banner and ADR-0087 disposition". Change required: in the changeset, Metadata-protocol: semantic → none and minor → patch, and the same in the PR body. Banner, marker and text stay.
  • Pins — new protocol.search-disabled-package-35195.test.ts covers:
    • THE PIN: not queried, named or counted;
    • a context-less in-process call;
    • objects= naming it equals naming no object;
    • a disabled title target lends no title;
    • CONTROLs: re-enabled, it is a hit again and the title reads through again; an enabled object's hits are identical with and without the disable; a registry without the predicate hides nothing.
      The dogfood battery is green on this head (os-dev-report 7001651530).
  • 门禁 — 53 check-runs on this head: 37 success, 16 skipped, 0 failure.
  • 接受的偏差 — none.
  • 范围外去向 — none found.
  • L2 owed (routing) — Clause-②: yes (narrowing) → a contract review at CONTRACT_REVIEW_TIER before queue. Routed to seat 5, which also confirms the Metadata-protocol ruling above.
  • 落地条款 — base 81c09477, main moved K=17 first-parent commits (≥ 15) → merge main and wait for a green re-run. git merge-tree against current main is clean, and main has not touched the two source files. Put the merge and the two changeset/PR-body line changes in one push. This ACCEPT carries over to that head if it contains nothing else. After the seat's L2 record, pkg-2 lands.

@objectstack-fleet objectstack-fleet Bot added the needs:contract-review Marker only — PR awaits its at-tier Contract review PASS; no check reads it, the record decides label Nov 19, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbP6iSEGkWb5fn8yqd

2026-11-19T07:47Z Final head for L2: 7e8e4e8aa12129e28635c1f2ade5c552c2b963cc (changeset Metadata-protocol: none at patch per L1-a 7002253154, plus a clean merge of main; nothing else). CI: every check-run green except one stale Check Changeset (job 135401677731, started 07:10:26Z from the push event, read the PR body before the body patch landed). The same check from the body-edit event (job 135402106349, 07:11:28Z, same head) is success, and its gate text accepts none at patch. The relay will not re-run pr-automation.yml, so the stale row stays. L1-a ACCEPT carries; contract review requested from seat 5.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 7e8e4e8aa12129e28635c1f2ade5c552c2b963cc
Local-runs: none
Scope: packages/metadata-protocol/src/protocol-record-reads.ts, packages/metadata-protocol/src/protocol.search-disabled-package-35195.test.ts + packages/metadata-protocol/src/protocol-authoring-refusals.ts, packages/metadata-protocol/src/protocol-query-validation.ts, packages/metadata-protocol/src/protocol-meta-list-reads.ts, packages/metadata-protocol/src/protocol.ts, packages/objectql/src/registry.ts, packages/objectql/src/registry-package-addressing.ts, packages/spec/src/kernel/package-registry.zod.ts, content/docs/deployment/marketplace-handbook.mdx (all cited, outside the diff: read, not reviewed)

PR #35367 for card #35195. Net diff against main: 3 files, +212/−0 (one source file +17, one new test file, one changeset). Read: the card and all 5 comments, the PR body and its 4 comments, the net diff, and the 57 check-runs on this head.

① Derived judgments

  • Accept-set of GET /api/v1/search / searchAll — narrowed, right. The record sweep skips an object for which isObjectOfDisabledPackage(registry, obj.name) is true, right after the canServeApiOperation(enable, 'search') decision and before canReadObject, getQueryableFields, objectsScanned++ and engine.find. So the object is never queried, never named, never counted in totalObjects, and the security service is not asked about it. This is what the changeset states.
  • ?objects= naming a disabled package's object — right. It falls to the same continue, so it answers as a name with no object behind it. No 404 OBJECT_PACKAGE_DISABLED is raised. That is consistent with the door's stated contract in protocol.ts ("An explicit objects= naming an unreadable object answers exactly as one naming an object that does not exist"); search is a sweep, and the by-name refusal belongs to assertObjectRegistered.
  • Reference titles — narrowed, right. readReferenceTitles asks the same predicate of the lookup target before any read, so an enabled hit whose nameField points into a disabled package keeps the bare id. The only caller is the sweep; no other title path in searchAll reads a second object.
  • Same predicate as the data door — confirmed in the cited code. protocol-query-validation.ts (assertObjectRegistered) throws objectPackageDisabledError on the same helper; the helper optional-calls registry.isObjectPackageDisabled, which resolves the name through resolveObjectKey and asks about the OWNING package only. Search and the data routes therefore cannot disagree about which objects a disable hides, including the overlay case (an extension from a disabled package does not take the enabled owner's object out of search, as it does not take it off the data routes).
  • Pages — no change, claim holds. The page sweep reads this.getMetaItems({ type: 'page' }), and getMetaItems filters with isItemOfDisabledPackage on every layer except per-package.
  • Response shape, public exports, schemas — none moved. No spec file, no exported signature, no generated baseline is in the diff.
  • A registry without the method hides nothing — the existing optional-call disposition of the helper, pinned by a control. Right for a test double; the real SchemaRegistry always answers.

② Semver level

Clause-②: yes (narrowing) — confirmed. A caller of the search door on an environment with a disabled package gets fewer hits than before; the ! in the title and the BREAKING banner are owed and present.

Metadata-protocol: none, level patch — the L1 ruling is CONFIRMED; the claim's semantic / minor is rejected. Grounds, checked here and not taken from L1:

  • AGENTS.md (Post-Task Checklist step 3) defines the line as "the change to what a metadata author can write"; semantic is "a changed meaning or default"; "all else is none".
  • No authorable key, value, type or default is in the diff. The search-related authored keys (enable.searchable, enable.apiMethods, searchableFields, nameField) keep their meaning for every enabled package.
  • The state the guard reads is install state: enabled / status: 'disabled' live on the installed-package registry record (packages/spec/src/kernel/package-registry.zod.ts) and are set through PATCH /api/v1/packages/:id/disable, not written in a manifest. Its published meaning ("hidden, refused on the data plane, and its data is kept", marketplace-handbook.mdx) does not change; one more door now honours it.
  • Precedent in the same family: 66f6638 in the metadata-protocol CHANGELOG, "a name only disabled packages hold answers 404 at _env", ships Clause-②: no (narrowing) with Metadata-protocol: none.
  • Level: "none takes patch; a non-protocol change, widening or breaking, ships patch and keeps its BREAKING banner and ADR-0087 disposition." The changeset is '@objectstack/metadata-protocol': patch, carries both declaration lines, the banner, and exactly one ADR-0087 marker (not-required (no-migration-prescription)), whose reason holds: nothing an author writes moves and nothing stored is rewritten. The only moved package is the one named.

Check Changeset on this head — two check-runs of that name, one red; the gate IS satisfied. Verified from the runs, not from the area's account:

  • Job 135401677731 (workflow run 44477560875, PR Automation, event pull_request): failure. Its log: "The metadata-protocol declaration and the changeset level disagree, inside one PR … metadata-protocol line: Metadata-protocol: semantic", against the committed changeset already at patch. In the same run Auto Label and Check PR Size ran, which pr-automation.yml skips on labeled / unlabeled / edited, so this is the code-event (push) run.
  • Job 135402106349 (workflow run 44477688867, same workflow, same head, created about a minute later): success. Its log: "LEVEL AXIS: this PR declares clause-② yes (narrowing) and metadata-protocol none, and it introduces no changeset entry graded minor or above … metadata-protocol line: Metadata-protocol: none". Auto Label and Check PR Size are skipped in this run, so it is a metadata-event run (the body edit).
  • Limit of the evidence: the check-run and run objects expose event=pull_request for both, not the event action; the push-versus-edit reading is inferred from which sibling jobs ran. It is consistent on every point.
  • The red run judged a PR body that no longer exists. The newer run of the same check on the same head judged the body and changeset as they are now and passed; the PR's mergeable_state reads clean. The red row is stale, not a finding. It stays visible on the head until that run is re-run; nothing in the tree needs to change for it.

All other check-runs on this head: success or skipped, no other failure.

③ Boundary flags

  • Dev flag — Metadata-protocol read as none against the claim's semantic: answered in ②, none / patch.
  • Dev flag — searchAll docblock in protocol.ts has no paragraph for the disabled-package skip (file outside the card's fence): accepted as N1 below; follow-up, not this head.
  • Dev flag — $expand into a disabled package's object (servesExpansionTarget judges declared exposure only): read here: the function is canServeApiOperation(schema?.enable, …) and asks nothing about the package. Whether the expansion sub-read is refused further down was not established by reading and is not this card's door. Escalated to area pkg-2: measure it through GET /api/v1/data/:object?$expand= and file a card if it serves; it is the same class of leak as this card and must not rest on a note.
  • Dev flag — stale test-file citation in protocol-meta-list-reads.ts: polish, outside the diff; a follow-up at the area's discretion.
  • Dev deviation — no model identifier in commit trailers: correct per AGENTS.md.
  • open_questions: empty in all three os-dev-reports.
  • SQL push-down: no finding. The diff adds no query, no id materialisation and no in-app join; the new check is an in-memory registry predicate per object, and it removes reads. The title read keeps its existing single id $in batch.
  • Dogfood battery (narrowing arm) — NOT pinned to this head; owed before --land, no head change needed. The battery ran at cc13fef3 (482 files / 4092 tests passed). This head differs from it by (a) the changeset's two lines (minor → patch, semantic → none), which no test reads, and (b) a merge of main bringing 89 files, +3116/−309. The PR's two source files are byte-identical between the two heads, so the battery's evidence about the narrowing itself stands. What it does not cover is the merged tree, and CI did not cover it either: on this head the Dogfood Regression Gate shard jobs are skipped (the row still carries the unexpanded matrix name) and the aggregate row is a vacuous success. The rule is "全量 dogfood 只在终 head 跑一次" (os-dev.md) and --land refuses a (narrowing) PR unless the latest trusted os-dev-report pins the battery to the head; the latest report says "not re-run at 7e8e4e8". Main's delta touches nothing under packages/metadata-protocol and nothing in the registry's package addressing, so the risk is low, but low risk is not the pin. The area re-runs the battery at this head and reports it; that moves no file, so this record keeps covering the head. This is a landing precondition, not a defect of the contract.

④ Design judgment

The narrowing makes the published refusal real; it takes no declared capability away. The published meaning of a disable on main is one sentence: "Disabled has one meaning: the module is hidden, refused on the data plane, and its data is kept" (content/docs/deployment/marketplace-handbook.mdx), and the data routes and by-name metadata reads already answer 404 OBJECT_PACKAGE_DISABLED. Nothing in the spec, the searchAll contract docblock or the docs declares that search serves a disabled package's records; the sweep served them only because getAllObjects() keeps the schema resolvable and the sweep never asked. So this is not a capability narrowed at a consumer; it is the last record door brought under the rule the others enforce. The capability a caller loses is restored by the declared route, re-enabling the package.

Attempts to break it, all in the cited code:

  • A second read path inside searchAll. The record loop has one engine.find per swept object and one title read through readReferenceTitles; both are guarded. The page sweep goes through getMetaItems, already filtered. No third path.
  • Disclosure by count or name. The guard precedes objectsScanned++ and every push to hits; a skipped object contributes to neither totalObjects nor totalHits nor truncated.
  • Disclosure by an oracle on objects=. A disabled object and a nonexistent one give the same answer, pinned by deep equality. No refusal code distinguishes them on this door. (The data door distinguishes them on purpose; that is its by-name contract, not a leak created here.)
  • Guard order. It runs before canReadObject, so a permission outage or a denying security service cannot change what a disabled object answers.
  • Name resolution drift. The sweep passes obj.name to the registry's own resolveObjectKey-based predicate, the one the read path uses, owner-only. An overlay from a disabled package does not hide the object it decorates; same answer as the data routes.
  • Data of a disabled record inside an enabled hit. The hit's record is the enabled object's own row; a lookup column holds the bare id, which the data route for the enabled object also returns. The only borrowed text was the title, now withheld.
  • The pin. The test drives the real searchAll over a registry double for the predicate; both guards were ablated red and restored. The real registry's predicate has its own pins at the data door.

No must-fix, no should-fix.

  • N1 (nit) — searchAll's contract docblock in protocol.ts enumerates each skip (exposure, read admission) and now omits the disabled-package one; the reasoning sits only at the guard. Accepted deviation on this head (a fix moves the head); follow-up card for the docblock.
  • N2 (nit) — the handbook's "Data plane" bullet names the data routes and by-name metadata reads but not search. It is no longer wrong by omission in the harmful direction, and it is a prose face: a follow-up docs line ("global search leaves the module's records out") is welcome, in a docs PR, not required here.
  • N3 (nit) — no pin runs the search door over the real SchemaRegistry with a really disabled package (the card's own reproduction: disable, then GET /api/v1/search). The unit pin plus the registry's own predicate pins cover the logic; a dogfood case would cover the wiring. Follow-up card at the area's discretion.

Implemented-by: claude/issue-35195-search-disabled-package
Reviewed-by: isolated-l2-35367

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbP6iSEGkWb5fn8yqd

2026-11-19T08:32Z Landing PR #35367 (card #35195) at head 7e8e4e8aa12129e28635c1f2ade5c552c2b963cc. L1-a ACCEPT 7002253154 (carried to this head: changeset fix + clean main merge only); contract review PASS 7003145171 at this head; dogfood battery pinned to this head, 0 failures (os-dev-report 7003944529).

Probe Reading
Check-runs on 7e8e4e8a all success/skipped except the stale push-event Check Changeset (job 135401677731); the body-edit run on the same head (job 135402106349) is success, per 7003059399 and the L2 record
check-governed-merges.mjs --pr 35367 NOT governed; 212 changed lines ≤ 3000 · K = 8

State: ready + auto-merge armed by area pkg-2. On MERGED the area closes #35195 and clears its labels.

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.

runtime: GET /api/v1/search returns a disabled package's records while its data routes answer 404 OBJECT_PACKAGE_DISABLED

2 participants