Skip to content

docs(metadata-protocol): name the disabled-package predicate on the $expand and relation-target checks, and pin its order - #37893

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-wx3lh7
Nov 27, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-wx3lh7

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Tesla · project thread
Fixes #35528
Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:用户无感;只改了代码注释、部署手册里"数据面"一条说明,外加一条测试。
  • 为什么做:停用模块的关联展开与关联条件修好后(上一轮合并的修复),注释和手册仍只讲"接口是否开放",没讲"所属模块已停用"这一条。
  • 出错会怎样:说明写错只会误导读文档的人,不影响运行;这次改动可以直接撤回。
  • 要你做什么:无。

What changes

  • N1 docblocks (packages/metadata-protocol/src/protocol.ts, protocol-query-validation.ts): refuseUnservedRelationTarget, servedExpand and servesExpansionTarget now name the disabled-package predicate (isObjectPackageDisabled) beside the exposure decision, and say the package refusal is asked first. No code change.
  • EXPANSION_TARGET_OPERATION: the card said its "alike on both doors" sentence no longer held for a disabled target. Re-measured on origin/main e69fa46: it holds again. The dataset door's label pass now withholds a disabled package's target too (analytics-service.ts ~1737, wired in service-analytics/src/plugin.ts ~1803). So the sentence stays, and one added sentence says the disabled case renders the stored id on both doors.
  • N2 pin: a top-level describe in the existing harness file protocol.expand-disabled-package-35427.test.ts, which holds the PR fix(metadata-protocol)!: $expand and a relation condition stop serving a disabled package's object #35444 pins. It covers a target that is both package-disabled and unexposed, in two forms: apiEnabled: false, and an apiMethods: ['get'] whitelist that serves $expand but not list. The relation condition answers 404 OBJECT_PACKAGE_DISABLED (code + status + object), the engine is never called, and $expand withholds both entries. A re-enable control shows each target's own exposure answer: OBJECT_API_DISABLED 404, OBJECT_API_METHOD_NOT_ALLOWED 405, and the whitelist target expanded. The whitelist case discriminates in both directions.
  • N3 handbook (content/docs/deployment/marketplace-handbook.mdx, Data plane bullet): a lookup from an enabled object into a disabled module keeps the stored id under $expand, and a condition on the related object's fields is refused 404 OBJECT_PACKAGE_DISABLED.
  • Changeset: @objectstack/metadata-protocol patch.

Tests

metadata-protocol pin files + typecheck at 224d707; full package suite at 13b9b1b (the later commit is docblock-only)
vitest run src/protocol.expand-disabled-package-35427.test.ts src/protocol.expand-target-exposure.test.ts
 Test Files  2 passed (2)
      Tests  30 passed (30)
tsc --noEmit (package typecheck; --listFiles counts the pin file: 1)
os-verify-lock: VERDICT command-exit 0
vitest run (whole @objectstack/metadata-protocol)
 Test Files  372 passed | 9 skipped (381)
      Tests  23579 passed | 45 skipped (23624)
os-verify-lock: VERDICT command-exit 0

Acceptance notes

  • The pin went green on main as written, so this PR adds no fix. The behaviour already held.
  • Deviation from the claim's file surface: the claim named "one new pin test file". AGENTS.md binds a new pin for a component that already has a shared harness file to go into that file as a top-level describe (ruling record 6583487846). The PR fix(metadata-protocol)!: $expand and a relation condition stop serving a disabled package's object #35444 harness (SCHEMAS + makeProtocol) is exactly what this pin needs, so the pin is in that file under a [#35528] describe and the harness is not copied. Two schema rows and two lookups were added to its SCHEMAS.

Verification

Read first: (1) the new describe at the end of protocol.expand-disabled-package-35427.test.ts, (2) the refuseUnservedRelationTarget docblock in protocol.ts, (3) the EXPANSION_TARGET_OPERATION docblock.

Two-minute check: pnpm --filter @objectstack/metadata-protocol exec vitest run src/protocol.expand-disabled-package-35427.test.ts should report 15 passed, 3 of them under [#35528].

Derived gate families, local run at head 224d707

node scripts/pm/dispatch-gates.mjs --commands derived 104 families from the 5 changed paths. All 104 were run after the final commit. Each exit code was captured before any pipe, and the --ran reconciliation over that record says: 104 derived famil(ies) accounted for — 103 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3).

  • 103 exited 0, including pnpm check:facade-delegation-only: packages/metadata-protocol/src/protocol.ts: 11705 lines, ceiling 11705 (0 left).
  • NOT MEASURED: node scripts/check-plugin-teardown-shape.mjs --self-test exited 3. The reason is a shallow clone: it cannot read its positive-control commit 621a4876, and this run did not deepen the shared clone. CI runs it.

Ceiling note: the first head (13b9b1b) grew protocol.ts by 11 lines, and the facade line ceiling (0 margin, ruling 6897467376) went red on that. The second commit rewrites the docblocks so they take exactly the lines they replace, net 0 in protocol.ts. The ceiling was not raised.


Generated by Claude Code

…xpansion and relation-target checks, and pin its order

Docblocks of refuseUnservedRelationTarget, servedExpand, servesExpansionTarget
and EXPANSION_TARGET_OPERATION, the handbook's data-plane bullet, and a pin for
a target both package-disabled and unexposed.

Claude-Session: https://claude.ai/code/session_01L9qibyBJGiLjzCtE4F6HHB
Co-authored-by: Claude <noreply@anthropic.com>
The docblock wording now fits the lines it replaces: the facade-delegation
ceiling on protocol.ts has no margin left.

Claude-Session: https://claude.ai/code/session_01L9qibyBJGiLjzCtE4F6HHB
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/s 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 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/metadata-protocol, touching 1 documentable anchor(s). ⚠️ 1 changed file(s) yielded no anchor (packages/metadata-protocol/src/protocol-query-validation.ts), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

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

  • content/docs/concepts/metadata-lifecycle.mdx (via ObjectStackProtocolImplementation (symbol, a top-level class))
  • content/docs/kernel/cluster.mdx (via ObjectStackProtocolImplementation (symbol, a top-level class))

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

  • content/docs/releases/v16.mdx (via ObjectStackProtocolImplementation (symbol, a top-level class))
  • content/docs/releases/v17/17-0.mdx (via ObjectStackProtocolImplementation (symbol, a top-level class))

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
  • 1 changed file(s) yielded no anchor (packages/metadata-protocol/src/protocol-query-validation.ts) — pages documenting those are invisible to this run
  • 1 anchor(s) matched too much of the corpus to be a work list: /data/{target} (route, 62 pages)
  • 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 f4898bfdc961335935cb9255963405a76005cd32 → packageMentionDocs.

Which tree this was computed on

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

node scripts/docs-audit/affected-docs.mjs --json f4898bfdc961335935cb9255963405a76005cd32

⚠️ 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 f4898bfdc961335935cb9255963405a76005cd32 → 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-tesla · session_01L9qibyBJGiLjzCtE4F6HHB

Final head for L1 2026-11-27T09:47Z · zone o3-package · card #35528

Head-sha: 224d70727eac75ea1c6d5642927a9c153c3a9563

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1

L1-a, the seat's L1 thread · 2026-11-27T09:48Z

席位核对 — L1 ACCEPT @ 224d70727eac75ea1c6d5642927a9c153c3a9563

Verdict: ACCEPT. No L2 is owed. The metadata-protocol hunks are docblocks only, the declarations are Clause-②: no and Metadata-protocol: none, and no spec or governed face is touched.

Read at this head

  • Shape (l1-face.mjs --pr 37893): open, draft, base main, first line Fixes #35528. No closing keyword sits near another card, and the diff has no releases path.
  • Fixes is right. All three items of the card are delivered:
    • N1: the docblocks of refuseUnservedRelationTarget, servedExpand, servesExpansionTarget and EXPANSION_TARGET_OPERATION now name the disabled-package predicate.
    • N2: one pin covers a target that is both disabled and unexposed, through the off switch and through a whitelist. The relation condition answers 404 OBJECT_PACKAGE_DISABLED before the exposure refusal, $expand withholds both, and a re-enabled control answers each target's own exposure (404 / 405).
    • N3: the handbook bullet.
  • The card's own caveat is resolved, not papered over. The card said the EXPANSION_TARGET_OPERATION sentence "renders alike on both doors" would not hold until the analytics door asked the same predicate. It now asks it: service-analytics/src/analytics-service.ts:1742-1747 wraps the label resolver with packageDisabled?.(target) !== true (service-analytics: /analytics/query serves a disabled package's objects (counts, sums, grouped field values, hops) while the data route answers 404 OBJECT_PACKAGE_DISABLED #35525). The new sentence "each door also asks the registry's isObjectPackageDisabled and withholds it" is therefore true on both doors.
  • Sentences read in person, all true at this head:
    • The changeset: the predicate named beside the exposure decision, the stored id under $expand, the 404 OBJECT_PACKAGE_DISABLED refusal before and instead of the exposure refusal, and "no behaviour change; a new pin holds the order".
    • The marketplace-handbook.mdx data-plane bullet: a lookup from an enabled object into a disabled module serves nothing of it.
    • @objectstack/metadata-protocol at patch is right for docblock bytes that ship.
  • Checks: 40 success, 15 expected skip, 0 failed, 0 pending. The floor checks (Lint & Repo Gates, TypeScript Type Check) are green, and mergeable_state is clean.

No nits.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-tesla · session_01L9qibyBJGiLjzCtE4F6HHB

Landing 2026-11-27T09:49Z · zone o3-package · card #35528

  • ACCEPT: L1-a comment 7215129661 at head 224d70727eac75ea1c6d5642927a9c153c3a9563. No L2 is owed.
  • check-governed-merges.mjs --pr 37893: NOT governed, 87 changed lines (≤ 3000).
  • landing-k.mjs --pr 37893: K = 2 < 15, no locale pack, no shared book. OK.
  • Checks at this head: 40 success, 15 skipped, 0 failing.
  • Action: pr_ready + automerge_enable (zone self-landing for a non-governed PR, area-lease.md 区内规则).

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 27, 2026 09:50
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 27, 2026
Merged via the queue into main with commit f7f9345 Nov 27, 2026
56 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-wx3lh7 branch November 27, 2026 10:19
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/s tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants