Skip to content

fix(objectql)!: store a code package's action as its ActionSchema parse, so a bound action's requiresFeature is lowered - #25699

Merged
objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/issue-25649-bound-action-schema-parse
Oct 25, 2026
Merged

objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/issue-25649-bound-action-schema-parse

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #25649

Clause-②: no (narrowing) — SchemaRegistry.registerItem, and with it ObjectQL.registerApp and every door that registers a code package's items, now refuses with 422 INVALID_METADATA an action body that does not satisfy ActionSchema. Before, it registered that body as written. Nothing is widened.
Metadata-protocol: none — ActionSchema is unchanged and no key is added, retired or re-shaped. Every body the registry now refuses already fails the same schema at defineStack, os validate and the metadata save door, so what a metadata author can write under the protocol does not move. The runtime door converges on it.

BREAKING for a package that registers an action body ActionSchema does not accept. Such a body used to be stored as written, with its declared gates inert. Now its registration is refused with INVALID_METADATA (422), naming the action and its package, and issues[] locates each failure. An action that passes os validate or a strict defineStack is unaffected. ADR-0087 disposition (in the changeset): not-required (no-migration-prescription). ActionSchema is byte-unchanged, so there is nothing for objectstack migrate meta to rewrite.

What changed

SchemaRegistry.registerItem (packages/objectql/src/registry.ts) now stores a code package's action item as its ActionSchema parse. If the item does not parse, the registry refuses it loudly. Before, the item was stored as the package wrote it.

  • Where. registerItem is the one site every code-package action passes: ObjectQL.registerApp, nested plugins, the metadata facade and the ObjectQL plugin's metadata-service sync all register through it. The new step runs right after applyProtection and before anything is stored. It applies when the type is action, a packageId is passed, and isCodeArtifactBody holds. A registration with no packageId is the bare slot (sys_metadata hydration, the write-through) and is not judged here, the same rule the security-catalog and default-page checks in that method follow.
  • Why the stored item has to be the parse. ActionSchema's transform lowers requiresMembershipReach and requiresFeature into visible and deletes both keys. No runtime code reads either key raw. So an unparsed stored action carried both gates declared and inert, and attachBoundActions served it that way. Platform objects' actions are parsed where they are authored (ObjectSchema.create), which is why rename_organization was lowered and cloud's bound change_slug was not.
  • Identity kept. The attached entry is still the very item the router's rung 2 resolves (toBe pinned). attachBoundActions is unchanged, so rung 1 before rung 2 and dedupe by name both hold.
  • Refusal. An action that fails the parse throws the INVALID_METADATA / 422 envelope (ADR-0112), the code this package already uses for metadata that fails the spec. The message names the action and its package. issues[] gives each failure with path, message and code. No new error code.

What the parse does to a code-package action (measured)

Measured on @objectstack/spec at this branch's base, with a stamped body (applyProtection, package id and version):

  • requiresFeature is lowered: visible: "record.x == 1" with requiresFeature: multiOrgEnabled becomes { dialect: 'cel', source: '(record.x == 1) && features.multiOrgEnabled != false' }, and the key is deleted. requiresMembershipReach is lowered the same way.
  • Defaults are filled, e.g. refreshAfter: false, and type defaults to 'script'.
  • A CEL string shorthand is wrapped as { dialect, source }.
  • An undeclared key is refused (unrecognized_keys; the schema is closed).
  • The ADR-0010 envelope (_packageId, _packageVersion, _provenance, _lock) is declared on the schema and passes through.
  • The parse is idempotent: parse(parse(x)) equals parse(x).

In-repo shipped actions: none refused. The registry door's accept set narrows (above), but every top-level action the in-repo stacks ship goes through a strict defineStack or defineAction, and all of them parse. I ran each stamped action through ActionSchema.safeParse and compared the canonical (key-sorted) JSON before and after:

Stack Actions Bound Refused Changed
examples/app-crm 1 1 0 0
examples/app-todo 8 8 0 0
examples/app-showcase (allActions) 72 71 0 0

No top-level actions: collection exists in packages/plugins/**, packages/services/** or packages/runtime/src/** source. The refusal reaches only the test fixtures triaged below.

Tests

New, in packages/objectql/src/bound-action-foreign-object.test.ts, through the real ObjectQL.registerApp and protocol.getMetaItem({ type: 'object' }), the read behind GET /api/v1/meta/objects/:name:

  • A package-bound action with requiresFeature: 'multiOrgEnabled' and a CEL visible is served with the conjunct lowered, (record.name != '') && features.multiOrgEnabled != false, and with no requiresFeature key. The value equals what the platform object's own action with the same declaration (ObjectSchema.create) is served. The attachment is toBe the registry item.
  • A bound action with no visible of its own is served the gate alone.
  • Control: the platform object's own action is served exactly as ObjectSchema.create produced it.
  • Refusal: a bound action with requiresFeature beside visible: false is refused with INVALID_METADATA / 422. The message names change_slug and com.test.binder, issues[] contains path: 'requiresFeature', and the item is not stored or attached.

Ablation (scripts/ablation-replace.mjs, wrap mode). The test imports ./registry.js from source, so no dist leg applies. The anchor item = parsePackageAction(item, baseName, packageId) as T; hit once and was replaced by a comment; the blob went 0aa44217 to 07883fa6. Result: 3 tests failed and 15 passed. The three red were the lowering, gate-alone and refusal tests; the control stayed green, as intended. Restore: blob 0aa44217 equals HEAD and git diff HEAD is empty.

Fixture triage (the refusal's consumer radius)

Each fixture below registered an off-spec action body. Each one got the missing declaration ("supply the declaration"). Nothing pinned the removed behaviour:

  • objectql/src/package-disable-enforcement.test.ts: the shipped action specimen gains type: 'url' and target.
  • objectql/src/engine-nested-plugin-collections.test.ts: the actions probe gains type: 'url' and target.
  • objectql/src/registry-package-version-stamp.test.ts: the script action gains a target.
  • objectql/src/registry.test.ts: the "generic metadata" cases now use type report; action is no longer a generic item.
  • objectql/src/bound-action-collision-report.test.ts: the owner's object is authored with ObjectSchema.create, as an object is, so its action is the parse of what was written, like the carrier's registered copy.
  • runtime/src/domains/mcp-package-object-discovery.test.ts: the AI description is 40 characters or more, the length ActionSchema requires.
  • runtime/src/stored-metadata-reader-contexts.pin.test.ts: the host-handler script action names its target. The runtime never reads a script action's target server-side, since dispatch is by handler key, so the pin's subject is unchanged.

Local verification

Final head f9330127c2. The rework commit changes only the changeset.

  • Dogfood battery, full, under the verify lock with CI's command (pnpm --filter @objectstack/dogfood test, no OS_TEST_SHARD, no paths), after building the @objectstack/dogfood^... closure: Test Files 295 passed | 3 skipped (298), Tests 2520 passed | 18 skipped (2538), exit 0. Lock: VERDICT command-exit 0.
  • @objectstack/objectql local project, full: Test Files 466 passed (466), Tests 8704 passed (8704), exit 0.
  • @objectstack/objectql typecheck: exit 0, including check:test-typecheck: OK.
  • node scripts/check-adr-0087-registration.mjs --base origin/main: exit 0. It reads one declared-breaking changeset, [BREAKING+bang+clause-②-narrowing], with disposition not-required (no-migration-prescription).
  • node scripts/check-changeset-no-major.mjs --base origin/main: exit 0. With --event carrying this body, it also exits 0 and reads clause-② no (narrowing), metadata-protocol none, no changeset graded minor or above.
  • node scripts/check-empty-changeset.mjs --base origin/main: exit 0.
  • eslint --no-inline-config over the 9 touched .ts files: exit 0.
  • Earlier rounds, on code unchanged since: @objectstack/runtime local project full (441 files; the one red file was triaged, and both triaged files rerun green, 171 tests), runtime typecheck exit 0, @objectstack/rest full (325 files), @objectstack/metadata-protocol full (263 passed, 3 skipped). At 89ecd31788, the 74 families dispatch-gates.mjs --commands derived all exit 0 (--ran: 74 derived, 74 run, 0 NOT-MEASURED).

Acceptance notes

  • Boundary: an object's own actions on a raw manifest stay unparsed. This PR does not change that seam. A raw manifest or a strict: false stack registered with registerApp stores its objects' own actions unparsed, because the object path's validate is a diagnostic only. Measured: a probe registering { objects: [{ …, actions: [{ name: 'gated', …, requiresFeature: 'multiOrgEnabled' }] }] } reads back from protocol.getMetaItem({ type: 'object' }) with requiresFeature raw and no visible. This is the same declared-not-enforced family; the seat carries it, outside this PR.
  • Boundary: tenant overlay rows. A stored overlay of a packaged action is registered in the bare slot and is not parsed here. It is parsed at the metadata save door. Whether that door stores the parsed body or the authored one was not measured.

Generated by Claude Code

Code-package action items reached the registry with no ActionSchema parse,
so requiresFeature / requiresMembershipReach were never lowered into
visible and the bound attachment served them inert. registerItem now
stores the parse, or refuses an action that does not parse with the
INVALID_METADATA envelope.

Claude-Session: https://claude.ai/code/session_01JVTd3PprStGa26aez5omLB
Co-authored-by: Claude <noreply@anthropic.com>
A package's action is now stored as its ActionSchema parse, so the
fixtures that registered off-spec action bodies carry declarations that
parse; the registry's generic-item cases use a type with no parse.

Claude-Session: https://claude.ai/code/session_01JVTd3PprStGa26aez5omLB
Co-authored-by: Claude <noreply@anthropic.com>
@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 Oct 24, 2026
@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/objectql, touching 5 documentable anchor(s).

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

  • content/docs/api/client-sdk.mdx (via httpStatus (symbol, a field of interface PackageActionSchemaError))
  • content/docs/api/error-catalog.mdx (via httpStatus (symbol, a field of interface PackageActionSchemaError), INVALID_METADATA (literal, a string literal in PackageActionSchemaError; a string literal in parsePackageAction))
  • content/docs/api/error-handling-client.mdx (via httpStatus (symbol, a field of interface PackageActionSchemaError))
  • content/docs/api/error-handling-server.mdx (via httpStatus (symbol, a field of interface PackageActionSchemaError))
  • content/docs/api/index.mdx (via httpStatus (symbol, a field of interface PackageActionSchemaError))
  • content/docs/api/wire-format.mdx (via httpStatus (symbol, a field of interface PackageActionSchemaError))
  • content/docs/automation/email-templates.mdx (via INVALID_METADATA (literal, a string literal in PackageActionSchemaError; a string literal in parsePackageAction))
  • content/docs/automation/flows.mdx (via httpStatus (symbol, a field of interface PackageActionSchemaError))
  • content/docs/data-modeling/external-datasources.mdx (via INVALID_METADATA (literal, a string literal in PackageActionSchemaError; a string literal in parsePackageAction))
  • content/docs/deployment/cli.mdx (via httpStatus (symbol, a field of interface PackageActionSchemaError))
  • content/docs/deployment/install-modes.mdx (via INVALID_METADATA (literal, a string literal in PackageActionSchemaError; a string literal in parsePackageAction))
  • content/docs/permissions/authorization.mdx (via INVALID_METADATA (literal, a string literal in PackageActionSchemaError; a string literal in parsePackageAction))
  • content/docs/plugins/development.mdx (via httpStatus (symbol, a field of interface PackageActionSchemaError))
  • content/docs/protocol/kernel/error-handling.mdx (via httpStatus (symbol, a field of interface PackageActionSchemaError), INVALID_METADATA (literal, a string literal in PackageActionSchemaError; a string literal in parsePackageAction))
  • content/docs/protocol/kernel/http-protocol.mdx (via httpStatus (symbol, a field of interface PackageActionSchemaError))

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

  • content/docs/releases/v17/17-0.mdx (via httpStatus (symbol, a field of interface PackageActionSchemaError), INVALID_METADATA (literal, a string literal in PackageActionSchemaError; a string literal in parsePackageAction))
  • content/docs/releases/v17/17-3.mdx (via httpStatus (symbol, a field of interface PackageActionSchemaError))
  • content/docs/releases/v17/17-5.mdx (via INVALID_METADATA (literal, a string literal in PackageActionSchemaError; a string literal in parsePackageAction))
  • content/docs/releases/v17/17-6.mdx (via INVALID_METADATA (literal, a string literal in PackageActionSchemaError; a string literal in parsePackageAction))
  • content/docs/releases/v17/17-7.mdx (via INVALID_METADATA (literal, a string literal in PackageActionSchemaError; a string literal in parsePackageAction))
  • content/docs/releases/v18/18-0.mdx (via INVALID_METADATA (literal, a string literal in PackageActionSchemaError; a string literal in parsePackageAction))
  • content/docs/releases/v18/18-1.mdx (via INVALID_METADATA (literal, a string literal in PackageActionSchemaError; a string literal in parsePackageAction))

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 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 54 of 206 client-bound route-ledger rows — the other 152 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 152: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 55 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 97 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 — 19 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 b77bb37eb2c738c40093acb04f19fa8fc2dd605a → packageMentionDocs.

Which tree this was computed on

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

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

⚠️ 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 b77bb37eb2c738c40093acb04f19fa8fc2dd605a → 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

席位核对

REWORK · domain:server seat 2 · sunhaolin · session_01JVTd3PprStGa26aez5omLB · 2026-10-24T17:43Z · head 89ecd31788 · claim 6385717497 · report 6387444074

  • Behaviour: passes the seat's review. registerItem stores a code package's action as its ActionSchema parse (after applyProtection, only with a packageId and a code-artifact body), so requiresFeature / requiresMembershipReach are lowered into visible on bound actions as on platform actions; the attached item stays the very object rung 2 resolves; rung-1 precedence and dedupe by name hold; the bare slot is not judged. The seven fixture edits supply missing declarations (one generic-item test moves from action to report); none weakens an assertion.
  • The one must-fix, the declaration: registerApp / registerItem (published @objectstack/objectql API) now refuses with 422 INVALID_METADATA an action body it used to register, as the changeset itself says. That is a narrowing of the door's accept set, whether or not an in-repo package ships such a body; the seat's dispatch order framed the test as the in-repo population, and that framing was wrong. Owed: Clause-②: no (narrowing), ! in the title, the BREAKING banner and an ADR-0087 disposition that the gate accepts honestly; the full dogfood battery at the final head.
  • Out of scope, carried by the seat: an object's own actions from a raw manifest are stored unparsed the same way (the dev's finding 1); not widened into this PR.
  • Next: after the rework, this seat's ACCEPT with needs:contract-review hung in the same act; the CONTRACT_REVIEW_TIER review goes to the director seat (maintainer, in this seat's session: 「你没有fable,可以让总监复审」). The PR stays draft until a same-form PASS is on its head.
  • CI on this head: not yet concluded at this read; read again on the rework head.

Generated by Claude Code

… its ADR-0087 disposition

Claude-Session: https://claude.ai/code/session_01JVTd3PprStGa26aez5omLB
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet objectstack-fleet Bot changed the title fix(objectql): store a code package's action as its ActionSchema parse, so a bound action's requiresFeature is lowered fix(objectql)!: store a code package's action as its ActionSchema parse, so a bound action's requiresFeature is lowered Oct 24, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对

ACCEPT (seat review, TIER_DEFAULT) · domain:server seat 2 · sunhaolin · session_01JVTd3PprStGa26aez5omLB · 2026-10-24T18:30Z · head f9330127c2 · claim 6385717497 · REWORK 6387473808

  • Shape: draft, base main, author objectstack-fleet[bot], assignee sunhaolin, Fixes #25649, title fix(objectql)!: …, Clause-②: no (narrowing) and Metadata-protocol: none line-initial in the body and the changeset, patch on @objectstack/objectql with a BREAKING banner and <!-- adr-0087: not-required (no-migration-prescription) … --> (ActionSchema is byte-unchanged; no key retired; the remedy is correcting a body that was already off-contract). 10 files; not governed; 229 changed lines.
  • Rework, read on the diff 89ecd31788..f9330127c2: one file, the changeset; the declaration is as owed. Title and body applied by the seat through the relay, 10,055 bytes read back identical.
  • Behaviour (unchanged from the REWORK record): registerItem stores a code package's action as its ActionSchema parse after applyProtection, only with a packageId and a code-artifact body; an action that does not parse is refused with 422 INVALID_METADATA naming the action and its package, issues[] locating each failure; no new error code. The attached item is still the object rung 2 resolves; rung-1 precedence and dedupe by name hold; the bare slot is not judged. Every in-repo shipped stack's actions parse unchanged (81 actions, 0 refused, 0 changed). The seven fixture edits supply missing declarations.
  • Metadata-protocol: none: kept on the dev's reasoning, which the seat shares: what a metadata author can write under the protocol (ActionSchema) does not move; the runtime door converges on it. The contract-tier review judges it too.
  • CI on head f9330127c2: 34 success, 9 skipped, 0 red; every skip on main's roster. Dogfood battery (owed by the arm), pinned to f9330127c2: os-verify-lock VERDICT command-exit 0, Test Files 295 passed | 3 skipped, Tests 2520 passed | 18 skipped, no failure.
  • Level: patch, per AGENTS.md step 3 (a non-protocol narrowing ships patch with its BREAKING banner); check-changeset-no-major's launch-window line is informational and its verdict is ✓ at patch.
  • Carried by the seat, not here: an object's own actions from a raw manifest stay unparsed (the dev's boundary note); filed next fire.
  • Writes: mcp_calls 0; the dev's relay writes were pr_create and the report comment.

Not landed in this act. The (narrowing) arm owes one CONTRACT_REVIEW_TIER review before the queue; it goes to the director seat (maintainer, in this seat's session: 「你没有fable,可以让总监复审」). needs:contract-review is hung on this PR in this act; the PR stays draft and outside the queue until a same-form ## Contract review PASS at CONTRACT_REVIEW_TIER is on its current head. Then: pr_ready + automerge_enable by this seat.


Generated by Claude Code

@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 Oct 24, 2026

Copy link
Copy Markdown
Collaborator

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: f9330127c2a40594278c9e14e11e096928dc1d43
Local-runs: none
Scope: packages/objectql/src/registry.ts, packages/objectql/src/bound-action-foreign-object.test.ts, packages/objectql/src/bound-action-collision-report.test.ts, packages/objectql/src/engine-nested-plugin-collections.test.ts, packages/objectql/src/package-disable-enforcement.test.ts, packages/objectql/src/registry-package-version-stamp.test.ts, packages/objectql/src/registry.test.ts, packages/runtime/src/domains/mcp-package-object-discovery.test.ts, packages/runtime/src/stored-metadata-reader-contexts.pin.test.ts + packages/spec/src/ui/action.zod.ts (ActionSchema, the requiresFeature / requiresMembershipReach lowering, the ADR-0010 envelope keys), packages/spec/src/kernel/public-auth-features.ts (lowerRequiresFeature), packages/spec/src/api/errors.zod.ts (INVALID_METADATA, 422)

Face: Clause-②: no (narrowing) on the PR body and the changeset; no published schema and no governed path in the diff. Read: the net diff, card #25649 (triage 6385089695, claim 6385717497, report 6387444074), the PR body, the check-runs on f9330127c2.

① Derived judgments

  • The narrowing, as declared — right. SchemaRegistry.registerItem now stores a code package's action as ActionSchema.safeParse(item).data and refuses one that does not parse. The guard is type === 'action' && packageId && isCodeArtifactBody(item), run after applyProtection so the envelope the parse sees is the stamped one. The bare slot (no packageId: sys_metadata hydration, the write-through) is untouched, the same rule the method's other code-artifact checks follow. Every door that registers a code package's items (registerApp, nested plugins, the metadata facade, the plugin's metadata-service sync) converges on the one seam.
  • What the card asked for is what is stored. ActionSchema is a producer as well as a judge: its transform lowers requiresFeature / requiresMembershipReach into visible and deletes both keys (action.zod.ts, the gate composition near the end of the schema), so the registry now serves a bound action exactly as ObjectSchema.create serves a platform object's own action with the same declaration (pinned toEqual across the two, through protocol.getMetaItem). Identity is kept: the attached entry is the very registry item (toBe pinned), attachBoundActions is unchanged, rung-1 precedence and dedupe by name hold.
  • The refusal. INVALID_METADATA / 422 with issues[] (path, message, code), the envelope the same file already answers for the unbound-target boot refusal; INVALID_METADATA ↔ 422 is in the standard ledger. No new code. The message names the action and its package.
  • Served-shape side effects, inside the declaration. The parse also fills defaults (type: 'script', refreshAfter: false), wraps a CEL string as { dialect, source } and refuses undeclared keys (closed schema). All three are stated in the changeset; the parse is idempotent, so an action a strict defineStack already parsed is stored unchanged.
  • Metadata-protocol: none — right. ActionSchema is byte-unchanged; what an author can write under the protocol does not move; defineStack, os validate and the metadata save door already refused every body the registry now refuses. The accept set that narrows is the published @objectstack/objectql programmatic door's, which is the Clause-②: no (narrowing) arm, not a protocol move.
  • Consumer radius. In-repo shipped stacks: 81 top-level actions, 0 refused, 0 changed (the dev's key-sorted comparison; not re-run here). The seven fixture edits each supply a declaration the schema requires (type: 'url' + target, a script action's target, an AI description of 40+ characters, report instead of action as the generic-item specimen, the owner object authored through ObjectSchema.create). None weakens an assertion; the generic-item move retires action as a generic item on purpose.

② Semver level

patch on @objectstack/objectql, title fix(objectql)!:, changeset summary with the bang, BREAKING section (before / now / fix), Clause-②: no (narrowing) and Metadata-protocol: none line-initial in body and changeset, ADR-0087 not-required (no-migration-prescription) with its reasons (check-adr-0087-registration reads [BREAKING+bang+clause-②-narrowing]). Correct for a non-protocol served-set narrowing (AGENTS.md step 3). Check-runs on f9330127c2: 53 in all; Build Core, Test Core 1–6 and the aggregate, Lint & Repo Gates, every Lint · and Type Check · job, Governed Surface Queue Guard, Check Changeset, Check PR Size, the four claim guards, Docs links and drift: success; Build Docs, Dogfood Verify CLI, Console Pin Gate, Temporal Conformance, the dogfood matrix shards and the opt-in harnesses: skipped (main's roster). No red on this head.

③ Boundary flags

  • Dev flag: Clause-② arm and the ! — resolved by the seat's REWORK (6387473808) and present on this head; the in-repo population is not the test, the door's accept set is. Agreed.
  • Dev flag: Metadata-protocol: none kept — answered above, right.
  • Boundary (not filed here): an object's own actions on a raw manifest or a strict: false stack are still stored unparsed, because registerItem('object') only diagnoses against ObjectSchema. Same declared-not-enforced family; the seat carries it as a sibling card (report's out-of-scope finding 1). Outside Code-package bound actions are registered without ActionSchema parse, so their declared requiresFeature is never lowered and never takes effect (declared, not enforced) #25649's wording (package-bound actions). Accepted.
  • Boundary (not filed): a tenant overlay row of a packaged action lives in the bare slot and is parsed at the save door; whether that door stores the parsed body was not measured. Outside this card. Accepted as recorded.
  • Dogfood battery owed by the arm → counts pinned to f9330127c2 in the seat record 6387957272 (no failure). Accepted as reported; not re-run here.
  • open_questions: none on the report.

Implemented-by: claude/issue-25649-bound-action-schema-parse
Reviewed-by: session_01Bf4vhia9fHNXpqC1PCfxie

VERDICT: PASS

needs:contract-review removed in this stroke. Landing (pr_ready + automerge_enable) stays with the domain:server seat; the record governs this head only.


Generated by Claude Code

@os-elon-musk os-elon-musk removed the needs:contract-review Marker only — PR awaits its at-tier Contract review PASS; no check reads it, the record decides label Oct 24, 2026 — with Claude
@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 25, 2026 03:27
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 25, 2026 03:27
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 25, 2026
Merged via the queue into main with commit e44a1ff Oct 25, 2026
57 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-25649-bound-action-schema-parse branch October 25, 2026 03:59
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

3 participants