Skip to content

fix(lint)!: three publish-time checks for seeds, flow nodes and actions that save and do not work - #37807

Merged
os-zhuang merged 19 commits into
mainfrom
claude/issue-35143-seeds-actions-checks
Nov 27, 2026
Merged

os-zhuang merged 19 commits into
mainfrom
claude/issue-35143-seeds-actions-checks

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Part of #35143

Clause-②: yes (narrowing)
Metadata-protocol: narrowed
Skills-docs: follow-up #37814

维护者速读

  • 搭应用的人在发布种子数据、流程和按钮动作以及本地校验时,会被拦下三类“保存成功却不工作”的写法:种子数据里写了对象没有的字段、种子/流程步骤/按钮绑到不存在的对象、按钮脚本要写数据却没勾写权限。
  • 属于“发布期作者规则第二批”中的种子与动作一族,替搭应用的人在保存时就发现启动后少记录、流程每次运行都失败、按钮一点就报无权限这类问题。
  • 已经存好的配置不会被改写也不会在启动时被拒,只是下次发布被拦并给出改法;误拦时撤回这次合并即可恢复。
  • 无

What changes

The Seeds and actions family of the card's second batch of publish-time checks, three lines, each verified on origin/main first (probe configs under examples/app-todo, removed afterwards).

Line Verdict on main This PR
S1 seed key that is not a field of its object holds for a plain data: [{ object, records }] entry and for a seed saved at the runtime door: os validate passed a misspelt key and the runtime gate dispatched nothing for seed. defineSeed already refused it when it ran. new error seed-record-unknown-field
S2 seed, flow node or action bound to an object that does not exist partly covered. A seed: defineStack refuses an unprefixed miss on the CLI, and the runtime save door already refuses a seed over an object neither the registry nor a draft answers for (#34864, pinned in protocol.seed-external-id-refusal.test.ts); a platform-prefixed sys_nothing_here seed built clean. An action: defineStack refuses a missing objectName on the CLI; the runtime action door judged nothing. A flow create_record node to pr_nope passed everywhere extends the existing object-reference-unknown ladder (validateObjectReferences) to the three bindings, as the card asks; no second rule. The seed binding is judged on the CLI only: the runtime seed door stays with #34864
S3 action body that writes without declaring the write holds: an L2 body calling ctx.api.object(…).update(…) with capabilities: [] passed. The declaration key exists (body.capabilities, enum HookBodyCapability, api.write), so the line was not stopped new error action-body-write-capability-undeclared
  • S1 (packages/lint/src/validate-seed-record-keys.ts). The column set is the object's fields as served, including fields an object extension adds, plus the system columns the platform injects on that object (injectedColumnsFor). So an object built with systemFields: false is refused created_at, exactly as defineSeed refuses it.
    • Record keys and seed columns keys are both judged. A key is reported once per dataset.
    • A dataset whose object is unknown is left to S2.
    • Runs on the runtime seed door.
  • S2 (validate-object-references.ts). New sites:
  • S3 (validate-action-body-capabilities.ts). The write set is the sandbox runner's WRITE list (insert, update, delete, updateMany, deleteMany, upsert). A test pins it against quickjs-runner.ts.
    • The scan is a regex over a copy of the source with comments and strings masked. The runtime gate must not load a parser: the tier-1 lazy-deps fence still holds, and the PR adds an action-write leg to that fence.
    • It recognises three call shapes: ctx.api direct, const api = ctx.api (or its destructured form) bound once, and a handle const repo = ctx.api.object(…).
    • Runs on the runtime action and object doors.
  • M1 check (the platform's own UI producing the refused shape). Studio's ScriptCapabilitiesField lets the author tick api.write.
    • os build lowers a handler through extract-hook-body.ts, which infers the grant. Measured: a handler whose only write was updateMany or deleteMany inferred no grant, so it was lowered into exactly the shape S3 refuses.
    • Fixed here (packages/cli, commit ee0969c), with a two-case it.each pin.

Commits outside the claim's packages/lint surface

  • ee0969c fix(cli): the extractor's write regex, named above (packages/cli/src/utils/extract-hook-body.ts plus its test).
  • cd83ed8 docs: the rule count 81 → 83 on four pages, and the validating-metadata.mdx rows (two new, two extended).
  • 4ba19b7 chore: the changeset and the upgrade-guide entry packages/spec/src/migrations/entries/semantic/19.publish-refuses-seeds-and-actions-that-save-and-do-not-work.ts (notice only, no conversion).
  • 0a916bb chore: turbo.json and scripts/cross-package-test-inputs.mjs declare packages/runtime/src/sandbox/quickjs-runner.ts as an input of the lint test task, which reads it (check:cross-package-test-inputs went red without it).
  • 04d056b, a683a7d test: the fixtures named above, in packages/qa/dogfood, packages/runtime and packages/objectql. The objectql orphan-action pin is the one whose FROM this PR changes: the save is now refused 422.
  • e5a226a also edits two packages/metadata-protocol fixtures that save under a package closure, so that they serve the objects their actions and flow nodes bind.
  • c670495: one merge of origin/main. It touched nothing under packages/lint.

Rework after contract review 7209862537 (head 6361589d)

Tests

  • New: validate-seed-record-keys.test.ts, validate-action-body-capabilities.test.ts (19 scanner shapes, write set pinned to the runner), and a [#35143] block in validate-object-references.test.ts. Each rule has a positive and a negative pin through the registry and at the runtime door.
  • Re-pinned fences:
    • runtime-gate.inert-type-writes.test.ts: an action write now reaches only validateObjectReferences from the suite; a hook write still dispatches nothing.
    • runtime-gate.object-writes.test.ts: the object-door rosters.
    • runtime-lazy-deps.test.ts: the action leg, with no parser loaded.
  • Ablation, with the source mutated on disk and restored with git checkout HEAD:
    • The CLI regex: the two new cases go red.
    • Three lint guards (the extended-object exemption, the injected columns, the api.write skip): four tests go red.

Readings at head a683a7d

Scoped suites (all at a683a7d or at e5a226a, whose lint and metadata-protocol sources a683a7d does not change)
  • @objectstack/lint, whole package: Test Files 241/241, Tests 9760/9760. The three new or extended files: 3/3, 114/114 at a683a7d.
  • @objectstack/metadata-protocol, whole package: Test Files 371 passed + 9 skipped, Tests 23450 passed + 45 skipped. Before the fixes it read 84 failed across 8 files, every one object-reference-unknown.
  • @objectstack/cli: the extractor test plus migrate-meta-engine-guidance 63/63; the unit tier 446/446 files, 6395/6395 tests. The integration tier is left to CI.
  • @objectstack/objectql: whole package 6 failed before the fixtures (all object-reference-unknown); the four touched files 68/68 after.
  • @objectstack/runtime: whole package 1 failed before the fixture (object-reference-unknown); the touched file 2/2 after.
  • @objectstack/mcp 1589/1589, @objectstack/plugin-approvals 1966/1966, @objectstack/example-showcase 554/554.
  • Typecheck, each exit 0: lint, objectql, runtime, metadata-protocol, dogfood, cli. The test layers compile under tsconfig.test.json. It caught a stray gate-input key in three new lint tests, fixed in 72b7cec.
Dogfood battery (the PR narrows)
  • a683a7d: VERDICT command-exit 0, Test Files 490 passed + 3 skipped (493), Tests 4144 passed + 68 skipped (4212).
  • An earlier run at 72b7cec went red, 3 failed in action-save-packageless-other-object.dogfood.test.ts. Its package bound an action to a showcase object without declaring the showcase package. Fixed in 04d056b; the battery above is the rerun on the final head.
Derived gates (dispatch-gates at a683a7d)
  • 141 derived, 140 run with exit 0. One is NOT MEASURED: node scripts/check-plugin-teardown-shape.mjs --self-test exits 3 because its positive control is pinned to a commit this shallow clone cannot reach. It is a checker-health self-test.
  • --ran reconciliation: 141 accounted for, 0 unrun.
  • check:cross-package-test-inputs was red at 4ba19b7 and is green at head (0a916bb).
  • check-nul-bytes OK. check-platform-checklist --changed-from origin/main OK (4 anchors judged, 0 lost).
  • Every CI-only family (type-check lanes, Build Core, Test Core shards, the merge-queue dogfood shards) is left to this PR's check-runs.

Acceptance notes

  • Pins sweep.
    • os validate and os build on app-crm, app-multi-package, app-starter, app-todo and app-showcase all exit 0 with "Running author-time rules (83)" and no new finding.
    • hotcrm, read at 99a4279: every action body that writes grants api.write; its 45 flows bind only declared or platform-provided objects; its seeds use defineSeed.
    • The create-objectstack template is not affected.
  • Severity. A flow node's object miss is an error, because that is the ladder's rule. The existing CLI flow-trigger-unknown-object stays a warning. The divergence is noted here, not changed.
  • Widened door. An action write is now also judged for its params' reference / objectOverride objects, as os validate already judged them. The changeset says so.
  • Package closure on the action door (for contract review). A package authored in Studio that adds an action to an object another package owns is now refused until its manifest declares that package. Flows have already been held to this. It comes with the ladder the card said to extend, and three in-repo fixtures needed the declaration. If actions should be judged against the whole served collection even under a closure, that is a one-line change in the member's options. The report raises it as an open question.
  • Not judged, same family:
    • hook bodies (body.capabilities on a hook has the same gap);
    • ctx.api.transaction without api.transaction;
    • the other capability tokens.
    • These are listed in the report for the seat.
  • updateById is not installed by the sandbox, yet lint's API_WRITE_METHODS grades it, and the action-record-write-discarded hint recommends ctx.api.object(…).updateById(…). Reported for the seat to measure; not touched here.
  • Contract review is owed. The seat runs it.

Verification

Two-minute check:

pnpm --filter @objectstack/lint exec vitest run --maxWorkers=2 src/validate-seed-record-keys.test.ts src/validate-action-body-capabilities.test.ts src/validate-object-references.test.ts

Expect Test Files 3 passed (3) and Tests 114 passed (114).

Read first, by risk:

  1. packages/lint/src/validate-action-body-capabilities.ts: the masked regex scanner. A false positive here refuses a publish. The hunk to read is bodyApiWriteCalls and its alias / boundOnce handling.
  2. packages/lint/src/authoring-rules.ts with reference-integrity-suite.ts: the suite entry now dispatches on seed and action. The hunk to read is the runtimeTypes widening and the member filter it relies on.
  3. packages/lint/src/validate-object-references.ts: the new binding block. The hunk to read is the extended exemption and the flow-node type list.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK

…declares the showcase package

Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK
Co-authored-by: Claude <noreply@anthropic.com>
…empty object set without a closure

The runtime seed save door already refuses a seed over an object nothing
resolves (#34864), with the draft and publish-promotion carve-outs a snapshot
of served objects cannot see, so the ladder stays off the seed door. An
empty object set with no closure in force is no universe (#24668), as at the
list-view member. Two closure-scoped protocol fixtures serve the objects
their actions and flow nodes bind.

Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK
Co-authored-by: Claude <noreply@anthropic.com>
… brought to the action and flow-node checks

An authored package that binds the host package's object declares the host;
the conformance engines register the object their advisory flow deletes from;
the orphan-action pin now reads the refusal its save meets.

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

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

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

50 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json 02ed8408450291fd22777fe9ba51a9ec9fcc9135.

⛔ 17 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/lint/src/index.ts) — pages documenting those are invisible to this run
  • 1 anchor(s) matched too much of the corpus to be a work list: created_at (literal, 49 pages)
  • 13 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 — 188 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 02ed8408450291fd22777fe9ba51a9ec9fcc9135 → packageMentionDocs.

Which tree this was computed on

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

node scripts/docs-audit/affected-docs.mjs --json 02ed8408450291fd22777fe9ba51a9ec9fcc9135

⚠️ 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 02ed8408450291fd22777fe9ba51a9ec9fcc9135 → 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#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: a683a7d47dbf239c0c999a6f787100e239c090f8
Local-runs: none
Scope: packages/spec/src/migrations/entries/semantic/19.publish-refuses-seeds-and-actions-that-save-and-do-not-work.ts, packages/lint/src/authoring-rules.ts, packages/lint/src/reference-integrity-suite.ts, packages/lint/src/rule-explanations.ts, packages/lint/src/validate-object-references.ts, packages/lint/src/validate-seed-record-keys.ts, packages/lint/src/validate-action-body-capabilities.ts, packages/lint/src/validate-action-body-writes.ts, packages/lint/src/validate-object-references.test.ts, packages/lint/src/validate-seed-record-keys.test.ts, packages/lint/src/validate-action-body-capabilities.test.ts, packages/lint/src/runtime-gate.inert-type-writes.test.ts, packages/lint/src/runtime-gate.object-writes.test.ts, packages/lint/src/runtime-lazy-deps.test.ts, packages/cli/src/utils/extract-hook-body.ts, packages/cli/test/extract-hook-body.test.ts, packages/metadata-protocol/src/protocol-publish-drafts-advisories.test.ts, packages/metadata-protocol/src/protocol.packageless-save-address.test.ts, packages/objectql/src/bound-action-foreign-object.test.ts, packages/objectql/src/publish-meta-response-conformance.test.ts, packages/objectql/src/publish-package-drafts-response-conformance.test.ts, packages/objectql/src/save-meta-response-conformance.test.ts, packages/qa/dogfood/test/action-save-packageless-other-object.dogfood.test.ts, packages/runtime/src/domains/packages-uninstall-handlers-withdrawn.test.ts, scripts/cross-package-test-inputs.mjs, turbo.json + read, not reviewed: packages/objectql/src/engine-top-level.ts, packages/objectql/src/engine-insert.ts, packages/objectql/src/declared-read-columns.ts, packages/objectql/src/action-governance.ts, packages/spec/src/data/seed.zod.ts, packages/spec/src/data/injected-system-columns.ts, packages/spec/src/data/field-group-layout.ts, packages/spec/src/stack.zod.ts, packages/spec/src/ui/action.zod.ts, packages/spec/src/system/constants/platform-object-names.ts, packages/lint/src/system-fields.ts, packages/lint/src/validate-flow-trigger-readiness.ts, packages/lint/package.json, packages/metadata-protocol/src/runtime-authoring-gate.ts, packages/metadata-protocol/src/seed-loader.ts, packages/metadata-protocol/src/protocol-customization-package.ts, packages/runtime/src/sandbox/quickjs-runner.ts, packages/runtime/src/app-artifact-handlers.ts, packages/cli/src/utils/lower-callables.ts, packages/cli/src/commands/compile.ts, packages/cli/src/commands/validate.ts, packages/cli/src/commands/lint.ts, packages/services/service-automation/src/builtin/crud-nodes.ts, docs/adr/0141-inter-app-dependency-declared-checked-before-install.md, content/docs/deployment/app-dependencies.mdx, content/docs/deployment/validating-metadata.mdx, skills/objectstack-ui/rules/actions.md, AGENTS.md
Security-touching: yes
Rule-change-verified: none

Face: the file list (31 paths) holds one published-schema path (the ADR-0087 entry, first on the Scope line), and the PR body and the changeset both declare Clause-②: no (narrowing). The floor is every path of the diff outside the prose faces, 26 files. Inputs: card #35143, the claim 7206244272, the report 7209661255, the PR body, the net diff against merge base ce4d8c7d7486fa5ab1fe4f33066a273c59a6b9f7, the precedent records 7190867118 and 7194461560 for form, and the check-runs on this head. Everything below was read in the tree at this head; nothing was built or run.

The PR's three lines are called line 1 (seed keys), line 2 (object bindings) and line 3 (write grant) here, so that they are not confused with the finding ids.

① Derived judgments

  • Line 1, seed-record-unknown-field (error; CLI and the seed door): RIGHT for a declared-field miss, with one remainder (S2).
    • The seed loader hands each record to the engine's insert with its keys as authored (seed-loader.ts strips only roll-up fields), and the engine's declared-field door refuses an undeclared key per row (undeclaredWriteFieldErrors, engine-top-level.ts:2201), so the row is culled in partial mode. The rule's set is the served field map plus injectedColumnsFor, which is resolveInjectedSystemColumns, the plan the registry's own injection reads. id, the tenant column, the audit family, the owner tier, queue and the sync columns are in it by the object's own flags.
    • Lookup keys are the field's own name, so there is no _id form to refuse. The loader gives no translation or companion key a pass the engine does not give.
    • Package-extended fields: counted on the CLI through objectsAsServed (the stack's extensions folded) and at the door through the served objects plus the batch's pending extension drafts (runtime-authoring-gate.ts, foldPendingObjectExtensions). Pinned.
    • CLI and door run one registry entry over one function. The universes differ as they must: the stack on the CLI; the served objects, the batch's drafts and, under ?package=, the closure at the door. A dataset whose object the universe does not hold is not judged at either, so a draft object published alone, or an object outside the closure, yields no finding here.
    • Parity with defineSeed (assertSeedKeysDeclared, seed.zod.ts:601) is exact on the set. The engine's set is wider by two names: see S2.
  • Line 2, object-reference-unknown at three more bindings: RIGHT at the runtime door; WRONG on the CLI for the flow-node site (M1).
    • Seed object, CLI only: adds a finding only for a platform-prefixed miss (a warning), since defineStack already refuses the unprefixed miss. Leaving the seed door to the Seed: the runtime save door accepts a seed whose object names no object, and the publish probe then tells the author to "Publish again" #34864 refusal is right: that door accepts a draft of the object in the same package, and a served-object snapshot would contradict it.
    • Standalone action objectName: on the CLI defineStack already refuses the miss with the same two exemptions (stack.zod.ts:6729-6738: extended, known platform name), so nothing new is refused there. At the action door it is new and right: the pin it replaces recorded an action registered against no object and listed nowhere.
    • Flow CRUD and object-form screen nodes: the executors take config.objectName as written (crud-nodes.ts:681, :773, :945). At the door the universe is the served collection or the stated closure, and a miss there is a step that fails every run. On the CLI the universe is one stack, and that is M1.
    • The noUniverse guard and the extended exemption apply to the three new sites only. No existing site moved.
    • The action door now also runs the member's param reference / objectOverride check. Declared in the changeset. Right.
    • Drafts are not gated (runtime-authoring-gate.ts, D1), and a batch publish folds the batch's pending objects into the universe, so an object and the action or flow bound to it publish together.
  • Line 3, action-body-write-capability-undeclared (error; CLI, action and object doors): RIGHT against the sandbox.
    • The runner passes body.capabilities ?? [] (quickjs-runner.ts:143) and installs the six leaves behind api.write (:754-756); a denied call throws at the call site. The rule's list equals the runner's WRITE, and the pin reads the runner's source, with that file declared as a lint test input in turbo.json and cross-package-test-inputs.mjs. They cannot drift without a red.
    • Only type: 'script', language: 'js' bodies are read, the set the runtime binds.
    • What the CLI lowers into that shape is S1.
  • The extractor change (extract-hook-body.ts:519): RIGHT. update\b and delete\b could not match inside updateMany / deleteMany. The only build output that changes is api.write added to the capabilities of a lowered hook, action or job body whose only write was one of the two. No other reader in packages/ keys on that token; the sandbox checks a grant only at a call.
  • Public surface: no new export. packages/lint exports ., ./runtime and ./rule-explanations; neither index.ts nor runtime.ts is in the diff, and the new symbols and the added ActionBodySite.capabilities are module-internal. ./rule-explanations changes text only.
  • Clause-②: no (narrowing) and Metadata-protocol: narrowed: RIGHT. Publishes that were accepted are refused, nothing an author can write is added, no export is added.

② Semver level

  • @objectstack/lint minor, @objectstack/spec patch, @objectstack/cli patch. One moved package at minor discharges narrowed, as in PR fix(lint)!: four publish-time checks for data-model metadata that saves and does not work #37513 and fix(lint)!: ten publish-time checks for flows that save and do not run #36691. The cli entry is a bug fix. No major.
  • The changeset carries both declaration lines, the BREAKING banner, a FROM and TO section with three pairs, and the marker adr-0087: registered publish-refuses-seeds-and-actions-that-save-and-do-not-work, which is the entry's id.
  • The entry is well formed (notice only, no conversion). Two of its sentences, and the same two in the changeset, are too wide: "a flow step bound to one fails the run on every execution" (M1) and "the seed load refuses a record with a key its object does not have" (S2).
  • packages/metadata-protocol, packages/objectql, packages/runtime and packages/qa/dogfood are touched by test files only. No entry is owed for them.
  • Skills-docs: follow-up owed: present and true. skills/objectstack-ui/rules/actions.md:15-16 teaches the grant as prose ("without it the sandbox throws on a write"). The card is to be filed and the line rewritten to its number before ACCEPT; that is L1's item on a prose face.
  • Check Changeset is success on this head.

③ Boundary flags

  • Open question in report 7209661255 (closure judgment on the action door): A, keep it.
    • ADR-0141 D1: "A dependency opens the reference", an undeclared cross-app reference is refused at the save door with 422, "the fix it prints is the declaration", and no second reference mechanism. B would make an action the one binding exempt from that.
    • The paired customization package declares its base (protocol-customization-package.ts:501), so the Studio customize route publishes an action on a base object as before. A package-less save is judged against the whole served collection.
    • What is refused under A: an authored package with no declaration that adds an action (or an action param reference) to another package's object. That is D1's rule, and the hint is the closure prescription. A stored action of that shape keeps running and is refused at its next publish, as the changeset says.
  • Severity divergence the dev noted (flow node an error, flow trigger a warning): not accepted on the CLI. It is M1. At the door it is consistent, since the trigger is also an error under a closure.
  • Hook bodies, ctx.api.transaction without api.transaction, the other tokens: not this family's lines. Cards for the seat.
  • updateById in lint's API_WRITE_METHODS and in the action-record-write-discarded hint, with no such leaf in the runner's WRITE: outside this diff, the seat's to measure and file. The new rule's own list is the pinned one.
  • Claim surface: the claim names packages/lint/**, the gate wiring, docs and one changeset. The diff also holds packages/cli (two files), the spec entry, turbo.json, scripts/cross-package-test-inputs.mjs and eight test files in four other packages. The PR body lists them commit by commit. The seat's scope line has to admit them, as 7190889569 did on fix(lint)!: four publish-time checks for data-model metadata that saves and does not work #37513.
  • Fixtures, each read:
    • Seven serve what the new rule asks for and change no assertion: the two metadata-protocol stubs and the three objectql conformance hosts now serve the object their flows and actions bind; the dogfood and the runtime uninstall fixture declare the package whose object the authored package binds. The subject of each test is untouched.
    • The eighth, bound-action-foreign-object.test.ts, is the one whose FROM moves: the orphan save was 200 and is now 422. Its assertions got stricter (code, status, issue rule and path, nothing registered) and the two that held before still hold. No pin was weakened.
    • runtime-gate.inert-type-writes.test.ts re-pins a fence from "an action write never reaches the suite" to "it reaches one member". The fence's reason (no parser at the door) is still enforced by the member filter and by the spawned-child probe added to runtime-lazy-deps.test.ts.
  • Security-touching: yes is meant in one sense only: the rule's hint, the entry, the changeset and the docs row teach when a body must be granted the api.write sandbox capability, and the remedy raises a body's grant. The diff changes no enforcement, no permission check and no credential path. Whether that earns the security label is the seat's call.
  • SQL push-down: the diff reads no data and adds no query. Nothing to report.
  • Main is at 44ccf94a; the head merges with it without conflict (merge-tree, no checkout). Main touched authoring-rules.ts and validating-metadata.mdx since the merge base and still registers 81 rules, the head 83.
  • Check-runs on this head, read at 2026-11-27T04:29:03Z: 67 runs, 27 success, 9 skipped, 31 in progress, none failed, cancelled or timed out. In progress: Build Core, Test Core 1 to 10, Test UI 1 to 16, Build & E2E UI, Type Check UI, Type Check · workspace, Type Check · consumer gates. Success includes Check Changeset, Dogfood Regression Gate, Governed Surface Queue Guard, PR-body guards, Spec property liveness, the Lint families, Type Check · source gates and · debt ledger, Build Docs. There is no red to give a cause for; the test and build families had not answered, so "all green" is not established on this head.

④ Design judgment

Against card #35143, Seeds and actions family only.

M1 (must-fix) — on the CLI the flow-node site refuses a binding to a declared dependency's object, which a build cannot see and the published contract says is not refused there.

  • validate-object-references.ts:604-610: with no closure (the CLI never states one) and at least one own object, a get_record / create_record / update_record / delete_record / screen node whose config.objectName is an unprefixed name the stack does not carry lands on rung ② (:315), an error that fails os validate, os lint and os build.
  • The same package's own rule on the same question hedges, on purpose: validate-flow-trigger-readiness.ts:149-155 ("may be defined by another installed package, and this rule cannot see that package's objects. The hedge is real"), its explanation in rule-explanations.ts ("can be ignored when such a package declares the object"), and its hint ("or ignore this if another installed package declares it"). A flow in a dependent app now gets that advice on its start node and a build failure on the step next to it, for one object.
  • Published: content/docs/deployment/app-dependencies.mdx:174-179, "Build-time validation cannot see a dependency's objects ... a binding to one is neither admitted nor refused there. The runtime save door is where a cross-app reference is judged". validating-metadata.mdx says the CLI doors skip such a binding "because there it may be a dependency package's object". ADR-0141 D1 puts the judgment at the save door.
  • The diff's own comment grants the case: :601-602, "an app that declares none binds objects its dependencies own". So a stack with no objects is not judged and a stack with one object is refused for the same binding.
  • The hint on the CLI ("Point it at one of this stack's objects, or at a platform object by its full name") names no fix for it. The only way through is an objectExtensions entry on the object.
  • For that stack the changeset's and the entry's "fails the run on every execution" is false: with the dependency installed the step runs.
  • The seed and action sites do not add this on the CLI (defineStack refused both before). The door is right as written. No pin covers a stack that declares a dependency it does not carry.
  • Closing condition: with no closure stated, a flow node bound to an unprefixed object the stack does not carry does not fail the build (the trigger rule's split, advisory with no closure and an error under one, or an equivalent that reads the manifest's dependencies); a pin for that stack on the CLI beside the existing door pins; the changeset, the entry and the explanation say what is then true.

S1 (should-fix) — os build still lowers a handler into the shape line 3 refuses, and the hint does not apply to a handler.

  • The CLI lowers before it lints (compile.ts:392 then :678; validate.ts:446 then :719; lint.ts:814 then :820), and a lowered action body carries the inferred capabilities alone (lower-callables.ts:572). At run time the body wins over the bundled function (app-artifact-handlers.ts:2076).
  • The extractor's write pattern needs the leaf directly after .object(...) and an argument with no ) in it (extract-hook-body.ts:519). It infers no api.write for three shapes the new rule reads: a bound handle (const repo = ctx.api.object('x'); await repo.update(...), the shape the extractor's own finding: objectstack build lowers a hook body calling ctx.api.object('x').create() although the QuickJS sandbox installs no create leaf — the extractor ledger advertises the verb, the lint rules read it as a live write, and the body throws TypeError: not a function on its first run #16249 test treats as ordinary), ?. before the leaf, and an object argument that contains a call.
  • For each, os build now fails on a target function whose source is correct, with "Add 'api.write' to the action's body.capabilities", a key a function-valued target does not have. Before, the same handler built and answered 403 at every call, so this is the old defect surfacing at build, not working authoring refused. That is why it is not a must-fix.
  • The rule's header says "a body os build lowers from a handler gets the grant inferred from its calls" (validate-action-body-capabilities.ts:20-21), which is untrue for those three. The dev closed the same class for updateMany / deleteMany and stopped there.
  • Closing condition: the extractor infers api.write for every shape bodyApiWriteCalls reads, pinned shape by shape; or the finding on a lowered body names the handler-side fix and the header sentence is corrected.

S2 (should-fix) — line 1 refuses created_at / updated_at on an object that opts out of the audit columns, and gives a reason the engine does not bear out.

  • The engine's door tolerates id, created_at and updated_at on every object, declared or not (PLATFORM_PROVISIONED_COLUMNS, declared-read-columns.ts:82, added at :98; the insert door's own note says the wildcard audit stamp relies on it). The seed loader does not touch the two keys.
  • The rule's set is injectedColumnsFor (validate-seed-record-keys.ts:68), which drops the audit family under systemFields: false, systemFields.audit: false and managedBy: 'better-auth'. A plain data[] seed, or a seed saved at the door, that writes created_at on such an object is refused with "the seed load refuses this record ... and drops it". By the cited code the record is not dropped.
  • The same sentence is published in the changeset and in the entry's reason. The pin "refuses an injected column the object opts out of, as defineSeed does" fixes the behaviour without asking the engine.
  • Parity with defineSeed is a fair design, and defineSeed refuses the key for its own reason. The defect is that this rule's stated reason is the engine's refusal, and for these two names there is none. Read, not run.
  • Closing condition: the rule admits the engine's provisioned names, or it keeps the refusal and the message, the changeset and the entry give the reason that is true for them.

Is a regex the right instrument for line 3 at a publish gate: yes, as an error.

  • A false refusal needs a whole ctx.api.object(...).LEAF( spelled in text the mask exposes, or a shadowed alias (N1), and the named remedy clears it every time at the cost of a grant the body does not use.
  • A miss leaves the author where main leaves every author today.
  • The write list is pinned to the runner.
  • A parser is barred at the door by the tier-1 fence, and a parser on the CLI alone would make the two doors disagree about one body.
  • An advisory would let the publish through to a body that fails at every call, which is the card's complaint.

Nits, none with an effect on correctness or the contract:

  • N1. The mask has two remainders the header does not list beside the regex literal: a nested template literal inside ${ } (the inner text is read as code) and a regex literal that holds a quote (the rest of the line is read inverted). A parameter that shadows a bound alias is not counted by boundOnce. Each needs a whole write call spelled in the exposed text.
  • N2. The two new ids have no os explain entry; the sibling action-body-does-not-compile has one.
  • N3. ADR-0141 D1 and app-dependencies.mdx list the bindings the save door judges against the closure (a flow trigger, a dataset base, a list view). An action's objectName and a flow node now join them. The ADR note is Tier H: a card.
  • N4. The re-pinned fence in runtime-gate.inert-type-writes.test.ts spells the member filter and its ['flow'] default a second time instead of asking the suite's dispatch.
  • N5. ActionSchema.objectName admits the literal global, the object-less key (action-governance.ts:76-84). Written out, it is now refused at the action door as an unknown object, as defineStack already refuses it on the CLI. No producer in ui/, packages/ or examples/ writes it.
  • N6. The flow-node list reads config.objectName on five node types. Other node types and the legacy config.object spelling are not read. A miss, never a false finding.

Open at this head: M1, S1, S2. Each earns a delta read of its fix by this reviewer.

Implemented-by: claude/issue-35143-seeds-actions-checks
Reviewed-by: session_01Q4EjjQkY5yXZrN9BEA3rEK

VERDICT: FAIL

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK

席位核对 — REVISE · repo:objectstack#6 · head a683a7d47dbf239c0c999a6f787100e239c090f8

  • Contract review FAIL 7209862537: M1, S1, S2 open; each gets a delta read by the same reviewer after the fix.
  • Open question in report 7209661255 (closure judgment on the action door): A, keep it — ADR-0141 D1 ("A dependency opens the reference"; the fix it prints is the declaration), parity with flows, confirmed by the contract review ③. No maintainer decision needed.
  • Scope widening (claim 7206244272 named packages/lint/**, the gate wiring, docs and one changeset): the seat admits the extra paths the diff holds — packages/cli/src/utils/extract-hook-body.ts and its test (the M1-class extractor fix the rule needs), the ADR-0087 spec entry, turbo.json and scripts/cross-package-test-inputs.mjs (the runner-source test input), and the eight test fixtures in metadata-protocol / objectql / runtime / dogfood (read by the contract review: no assertion weakened).
  • Skills-docs: the follow-up card is skills: objectstack-ui actions rule teaches the api.write grant as prose; the trap is now refused at validate and publish (after #37807) #37814; the PR body and changeset line become Skills-docs: follow-up #37814.
  • Out of scope, filed: hook bodies, other capability tokens, the updateById advice and the ADR-0141 D1 binding list → lint: action-body capability family follow-ups after #37807 (hook bodies, other capability tokens, updateById advice, ADR-0141 D1 binding list) #37815.
  • Rework asked of the dev: M1 (no build failure for a flow node bound to an unprefixed object the stack does not carry when no closure is stated — follow the trigger rule's split — with a CLI pin and corrected changeset/entry/explanation text); S1 (the extractor infers api.write for every shape the rule reads, pinned per shape, or the finding on a lowered body names the handler-side fix and the header sentence is corrected); S2 (admit the engine's provisioned id / created_at / updated_at, or keep the refusal with a reason that is true); N2 (os explain entries for the two new ids) rides along.

…engine's provisioned seed columns; explain both new ids

M1: with no closure and no whole collection a dependency the build cannot
see may define a flow node's object, so the miss is a warning there and an
error at the publish door, as flow-trigger-unknown-object splits it. S2: a
seed key the engine's insert door accepts (id, created_at, updated_at on
every table) is admitted, and an object with no field map is not judged.
N2: os explain entries for seed-record-unknown-field and
action-body-write-capability-undeclared, whose ids the barrel now exports.

Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK
Co-authored-by: Claude <noreply@anthropic.com>
…and a nested object argument

S1: every write shape the publish check reads is now inferred when os build
lowers a handler, so the build does not refuse a handler it just lowered.

Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 6361589d746372e3860456fa8555824a80197b40
Local-runs: none
Scope: packages/spec/src/migrations/entries/semantic/19.publish-refuses-seeds-and-actions-that-save-and-do-not-work.ts, packages/lint/src/index.ts, packages/lint/src/authoring-rules.ts, packages/lint/src/reference-integrity-suite.ts, packages/lint/src/rule-explanations.ts, packages/lint/src/validate-object-references.ts, packages/lint/src/validate-seed-record-keys.ts, packages/lint/src/validate-action-body-capabilities.ts, packages/lint/src/validate-action-body-writes.ts, packages/lint/src/validate-object-references.test.ts, packages/lint/src/validate-seed-record-keys.test.ts, packages/lint/src/validate-action-body-capabilities.test.ts, packages/lint/src/runtime-gate.inert-type-writes.test.ts, packages/lint/src/runtime-gate.object-writes.test.ts, packages/lint/src/runtime-lazy-deps.test.ts, packages/cli/src/utils/extract-hook-body.ts, packages/cli/test/extract-hook-body.test.ts, packages/metadata-protocol/src/protocol-publish-drafts-advisories.test.ts, packages/metadata-protocol/src/protocol.packageless-save-address.test.ts, packages/objectql/src/bound-action-foreign-object.test.ts, packages/objectql/src/publish-meta-response-conformance.test.ts, packages/objectql/src/publish-package-drafts-response-conformance.test.ts, packages/objectql/src/save-meta-response-conformance.test.ts, packages/qa/dogfood/test/action-save-packageless-other-object.dogfood.test.ts, packages/runtime/src/domains/packages-uninstall-handlers-withdrawn.test.ts, scripts/cross-package-test-inputs.mjs, turbo.json + read, not reviewed: packages/objectql/src/declared-read-columns.ts, packages/objectql/src/engine-top-level.ts, packages/lint/src/validate-flow-trigger-readiness.ts, packages/lint/src/runtime-gate.ts, packages/lint/package.json, packages/lint/CHANGELOG.md, packages/cli/src/utils/lower-callables.ts, packages/runtime/src/sandbox/quickjs-runner.ts, content/docs/deployment/validating-metadata.mdx, content/docs/deployment/app-dependencies.mdx, docs/adr/0141-inter-app-dependency-declared-checked-before-install.md, .claude/skills/pm-dispatch/references/execution-duties.md, AGENTS.md
Security-touching: yes
Rule-change-verified: none

Delta round by the reviewer of record 7209862537 (FAIL at a683a7d4). This head is a substantive head, so this is a whole record for it. Inputs: the delta a683a7d4..6361589d (three commits, sixteen files, main not merged), the dev's report 7211409685, the PR body's declaration lines, and the check-runs on this head. Files the delta does not touch keep the judgments of the first record. Nothing was built or run.

① Derived judgments

  • Flow-node site of object-reference-unknown: RIGHT now.
    • validate-object-references.ts: flowNodeAdvisory is true only with no closure and no wholeCollection. The suite member states wholeCollection when ctx.runtimeWriteType is set and no packageScope is, the same signal the list-view member already reads (reference-integrity-suite.ts:441, :515). The CLI sets neither, so a flow node's unprefixed miss is a warning there. At the door it is an error under a closure and against the whole served collection.
    • The warning keeps the id, says "If no installed package defines it, the step fails the run every time it executes", and its hint names the dependencies declaration. One id at two severities is what flow-trigger-unknown-object already does.
    • The seed and action sites keep the error. Right: defineStack already refuses both misses on the CLI.
  • seed-record-unknown-field: RIGHT now. The set is the served fields, the injected plan and id / created_at / updated_at, which is the engine door's set (declaredColumnSet, declared-read-columns.ts:82-98). An empty field map is not judged, as that function gives no opinion on one. created_by on an opted-out object is still refused, and the engine refuses it too. The rule is now wider than defineSeed by the three names, and the header says so.
  • The extractor (extract-hook-body.ts, callsObjectWriteThroughHandle): RIGHT. It reads a leaf chained after a balanced .object(...), with ?. allowed, and a handle bound to .object(...) and then called. Together with the receiver-loose pattern above it, that covers every shape bodyApiWriteCalls reads. It masks no strings, so it can over-infer; an unused grant is never checked by the sandbox. Build output changes only by api.write added to bodies of those shapes.
  • Public surface: WIDENED by this delta. packages/lint/src/index.ts now exports ACTION_BODY_WRITE_CAPABILITY_UNDECLARED and SEED_RECORD_UNKNOWN_FIELD on .. The rules, the scanner and the write list stay unexported. validateObjectReferences gains an optional wholeCollection option; it is exported, and the option is additive.
  • Metadata-protocol: narrowed: RIGHT, unchanged.
  • Clause-②: no (narrowing): WRONG at this head. See S3.

② Semver level

  • @objectstack/lint minor, @objectstack/spec patch, @objectstack/cli patch: still right. Minor covers both the narrowing and the two added exports. No major.
  • The changeset keeps the BREAKING banner, the FROM and TO pairs and the marker adr-0087: registered publish-refuses-seeds-and-actions-that-save-and-do-not-work. Its last paragraph now names the two exports. Its Skills-docs: line reads follow-up #37814, as does the PR body.
  • The entry's surface and reason now carry the CLI warning and the engine-door wording. Its id and file name are unchanged.
  • The declaration line in the changeset and the PR body is S3.

③ Boundary flags

  • Report 7211409685 raises no new open question. Its note that the PR body rewrite was owed is discharged: the body's first lines carry the new Skills-docs: value.
  • The claim-surface admission (cli, the spec entry, turbo.json, scripts/cross-package-test-inputs.mjs, the test files in four other packages) is still the seat's scope line to write. The delta adds one more input line to each of the two build-graph files, for the lint test that reads packages/objectql/src/declared-read-columns.ts.
  • Security-touching: yes in the same narrow sense as before: the hunks teach when a body needs the api.write capability, and the extractor now grants it in more shapes. No enforcement changes.
  • No test was weakened. The first record's flow-node pin was split into a CLI pin (warning), a door pin (error, both ways) and a registry-level pin for a stack with an uncarried dependency on all three commands. The created_at pin was replaced by the engine-list pin with a created_by control.
  • SQL push-down: no query in the delta. Nothing to report.
  • Main: the head still merges without conflict (merge-tree, no checkout).
  • Check-runs on this head, read at 2026-11-27T06:22:27Z: 74 runs, 62 success, 11 skipped, 1 in progress, none failed. The one in progress is a second Check Changeset run (140347441041, started 06:20:58Z, after the body rewrite); the first on this head (140322935586) is success. Test Core 1 to 10, Test UI 1 to 16 (13/16 included), Build Core, Build & E2E UI and the Type Check families are success. Nothing is red.

④ Design judgment

Findings of record 7209862537, re-judged at this head:

M1 (must-fix): closed.

  • With no closure and no whole collection the flow-node miss no longer fails the build, by the trigger rule's split.
  • Pinned on the CLI for a stack that declares com.acme.billing and does not carry it: no error and one advisory on validate, build and lint. Door pins hold the error both ways.
  • The changeset, the entry, the explanation and the docs row now condition "fails the run" on no installed package defining the object.

S1 (should-fix): closed.

  • The extractor infers api.write for the bound handle (direct and through a ctx.api alias), ?. before the leaf, and an argument holding a call. Four it.each pins and a read-only handle control.
  • The rule header and the new explanation name the shapes.

S2 (should-fix): closed.

  • The rule admits the engine's three provisioned names through a module-local mirror. The test reads PLATFORM_PROVISIONED_COLUMNS from the objectql source, and that file is declared as a lint test input.
  • The published sentences give the engine's door as the reason.

New at this head:

S3 (should-fix) — the declaration line is Clause-②: no (narrowing) while the diff enlarges a published surface.

  • The criterion is "widens the accept set or enlarges the public surface", and the public surface is what the built entry declarations reach (execution-duties.md:75-76). Two new exports on the . entry of @objectstack/lint meet it. The changeset's own last paragraph states them.
  • The first record judged no (narrowing) right because no export was added, as record 7194461560 did on fix(lint)!: four publish-time checks for data-model metadata that saves and does not work #37513, where the ids stayed module-local. The Flows family of this card, which exported, declared yes (narrowing).
  • A wrong no is the audited false declaration. It hides nothing from this review, since the narrowing face already set the tier, which is why it is not a must-fix.
  • Closing condition: the PR body and the changeset both read Clause-②: yes (narrowing), and the seat notes the change against the claim's line; or the two exports are withdrawn. The first is a prose-face edit, so this record keeps governing the code under a Regen-provenance: line, and the line itself gets a delta read.

Nits, none with an effect on correctness or the contract:

  • N1 (open, accepted). The mask's two unlisted remainders and the shadowing parameter.
  • N2: closed. Both ids have an os explain entry, each pinned.
  • N3 (open, a card). ADR-0141 D1 and app-dependencies.mdx list the bindings judged against the closure without the action and flow-node sites. The docs page's "neither admitted nor refused" is now also short of the CLI advisory.
  • N4 (open). The fence test's second spelling of the member filter.
  • N5 (open). objectName: 'global' written out is refused at the action door.
  • N6 (open). Node types and the legacy config.object spelling not read.
  • N7 (new). The extractor's closingParen and leaf list and the lint's closeParen and write list are two spellings of one reading in two packages, tied only by each side's own pins. The extractor's list is the wider one, which is the safe direction.

Open at this head: S3. No must-fix.

Implemented-by: claude/issue-35143-seeds-actions-checks
Reviewed-by: session_01Q4EjjQkY5yXZrN9BEA3rEK

VERDICT: PASS

…t now exports two rule-id constants

Contract review 7211486008 S3: the two added exports enlarge the published surface.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 1f2599c0fff4548fc1c5a98674ccc675635ac5b5
Local-runs: none
Scope: packages/spec/src/migrations/entries/semantic/19.publish-refuses-seeds-and-actions-that-save-and-do-not-work.ts, packages/lint/src/index.ts, packages/lint/src/authoring-rules.ts, packages/lint/src/reference-integrity-suite.ts, packages/lint/src/rule-explanations.ts, packages/lint/src/validate-object-references.ts, packages/lint/src/validate-seed-record-keys.ts, packages/lint/src/validate-action-body-capabilities.ts, packages/lint/src/validate-action-body-writes.ts, packages/lint/src/validate-object-references.test.ts, packages/lint/src/validate-seed-record-keys.test.ts, packages/lint/src/validate-action-body-capabilities.test.ts, packages/lint/src/runtime-gate.inert-type-writes.test.ts, packages/lint/src/runtime-gate.object-writes.test.ts, packages/lint/src/runtime-lazy-deps.test.ts, packages/cli/src/utils/extract-hook-body.ts, packages/cli/test/extract-hook-body.test.ts, packages/metadata-protocol/src/protocol-publish-drafts-advisories.test.ts, packages/metadata-protocol/src/protocol.packageless-save-address.test.ts, packages/objectql/src/bound-action-foreign-object.test.ts, packages/objectql/src/publish-meta-response-conformance.test.ts, packages/objectql/src/publish-package-drafts-response-conformance.test.ts, packages/objectql/src/save-meta-response-conformance.test.ts, packages/qa/dogfood/test/action-save-packageless-other-object.dogfood.test.ts, packages/runtime/src/domains/packages-uninstall-handlers-withdrawn.test.ts, scripts/cross-package-test-inputs.mjs, turbo.json + read, not reviewed: .changeset/35143-seeds-actions-checks.md, .claude/skills/pm-dispatch/references/execution-duties.md, AGENTS.md
Security-touching: yes
Rule-change-verified: none
Regen-provenance: 6361589d746372e3860456fa8555824a80197b40 to 1f2599c0fff4548fc1c5a98674ccc675635ac5b5 is one commit that changes one line of .changeset/35143-seeds-actions-checks.md, a prose face. Every path on the Scope line is byte-identical to the head record 7211486008 reviewed, and that record's code judgments are carried here unchanged.

Delta round by the reviewer of record 7211486008 (PASS at 6361589d, S3 open) and 7209862537 (FAIL at a683a7d4). Inputs: git diff 6361589d 1f2599c0, the PR body's declaration lines, and the check-runs on this head. Nothing was built or run.

① Derived judgments

  • The delta: one file, one line. Clause-②: no (narrowing) became Clause-②: yes (narrowing) in the changeset. No code, test, entry, docs or build-graph path moved.
  • The accept-set and public-surface judgments of 7211486008 stand as written there:
    • the flow-node site of object-reference-unknown is a warning on the CLI and an error at the publish door;
    • seed-record-unknown-field reads the engine door's set;
    • the extractor infers api.write for every shape the write-grant rule reads;
    • @objectstack/lint gains two exported rule-id constants on . and an additive option on validateObjectReferences.
  • Clause-②: yes (narrowing): RIGHT. The diff enlarges a published surface (the two exports) and narrows the accept set (BREAKING). The pair is a legal spelling under AGENTS.md Post-Task step 3.
  • Metadata-protocol: narrowed: RIGHT, unchanged.

② Semver level

  • @objectstack/lint minor, @objectstack/spec patch, @objectstack/cli patch: right, unchanged. Minor covers the narrowing and the added exports. No major.
  • The changeset and the PR body now carry the same three lines: Clause-②: yes (narrowing), Metadata-protocol: narrowed, Skills-docs: follow-up #37814.
  • The BREAKING banner, the FROM and TO pairs and the marker adr-0087: registered publish-refuses-seeds-and-actions-that-save-and-do-not-work are unchanged.

③ Boundary flags

  • The seat's note of this change against claim 7206244272, whose line reads Clause-②: no, was not on the card or the PR when this was read (06:25Z). It belongs in the seat's L1 record, which follows this one. It is bookkeeping on the claim, not a condition on the diff.
  • The claim-surface admission from the first record is still the seat's scope line to write.
  • Security-touching: yes in the same narrow sense as before: the diff teaches when a body needs the api.write capability and changes no enforcement.
  • SQL push-down: nothing in the delta. Nothing to report.
  • Main: the head merges without conflict (merge-tree, no checkout).
  • Check-runs on this head, read at 2026-11-27T06:25:32Z: 41 runs, 7 success, 11 skipped, 22 in progress, 1 cancelled, none failed.
    • The cancelled run is PR-body guards (140348672576). A second run of the same check on this head (140348869794) is success, so the cancel is the supersede from the body rewrite, not a verdict.
    • Success so far: Governed Surface Queue Guard, Dogfood Regression Gate, PR-body guards, Check Documentation Links, Check PR Size, Auto Label, filter.
    • Not yet answered: Check Changeset (two runs), the Lint and Type Check families, Build Core, the shard plans, and every test shard, which had not been created. The previous head, identical outside this one changeset line, read 62 success and none failed.
    • "All green" is not established on this head.

④ Design judgment

Findings of the earlier records, at this head:

M1 (must-fix): closed.
S1 (should-fix): closed.
S2 (should-fix): closed.
S3 (should-fix): closed.

  • The changeset line 9 and the PR body line both read Clause-②: yes (narrowing). The seat's note against the claim is recorded as owed in ③.

Nits, none with an effect on correctness or the contract, unchanged from 7211486008:

  • N1 (open, accepted). The mask's two unlisted remainders and the shadowing parameter.
  • N2: closed.
  • N3 (open, a card). ADR-0141 D1 and app-dependencies.mdx do not list the action and flow-node sites, nor the CLI advisory.
  • N4 (open). The fence test's second spelling of the member filter.
  • N5 (open). objectName: 'global' written out is refused at the action door.
  • N6 (open). Node types and the legacy config.object spelling not read.
  • N7 (open). The extractor's and the lint's readings of a write call are two spellings in two packages.

No must-fix, no should-fix.

Implemented-by: claude/issue-35143-seeds-actions-checks
Reviewed-by: session_01Q4EjjQkY5yXZrN9BEA3rEK

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK

维护者速读

  • 发布元数据时再多拦三类「能保存但不生效」的错误:种子数据里写了对象没有的字段;种子数据、流程里的增删改查步骤、动作绑定了不存在的对象;动作脚本里写数据却没声明写权限(运行时每次都会被沙箱拒绝)。
  • 属于发布前检查第二批的「种子数据与动作」一组。命令行构建时,流程步骤绑定的对象如果可能来自依赖包,只提醒不报错;真正发布时才严格拦截。
  • 已存的旧元数据不会被改写,下次发布时才会被拦;报错里写明怎么改。
  • 要你做的:用 os-zhuang 账号批准本 PR(收窄类改动需授权批准)。契约审核 PASS 记录 7211531167,Head-sha 1f2599c0fff4548fc1c5a98674ccc675635ac5b5。

席位意见:契约审核第一轮未过(1 必改 2 应改),返工后全部关闭,又补正了一处声明行;CI 全绿;剩余小问题立卡 #37838,相关后续 #37814、#37815。建议批准。

席位核对 — ACCEPT · repo:objectstack#6 · head 1f2599c0fff4548fc1c5a98674ccc675635ac5b5

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK

Review requested: this narrowing PR (Clause-②: yes (narrowing)) lands by an authorized APPROVED review or an enqueue by an approver.

Records at head 1f2599c0fff4548fc1c5a98674ccc675635ac5b5:

After merge the seat releases #35143 back to pm:queue (it is Part of); remaining families stay on that card.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 27, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 27, 2026 07:05
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 27, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 27, 2026
@os-zhuang
os-zhuang enabled auto-merge November 27, 2026 08:10
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 27, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 27, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: d2a38064eaaf69041dfa336855c26866c6f88c38
Local-runs: none
Scope: packages/spec/src/migrations/entries/semantic/19.publish-refuses-seeds-and-actions-that-save-and-do-not-work.ts, packages/lint/src/index.ts, packages/lint/src/authoring-rules.ts, packages/lint/src/reference-integrity-suite.ts, packages/lint/src/rule-explanations.ts, packages/lint/src/validate-object-references.ts, packages/lint/src/validate-seed-record-keys.ts, packages/lint/src/validate-action-body-capabilities.ts, packages/lint/src/validate-action-body-writes.ts, packages/lint/src/validate-object-references.test.ts, packages/lint/src/validate-seed-record-keys.test.ts, packages/lint/src/validate-action-body-capabilities.test.ts, packages/lint/src/runtime-gate.inert-type-writes.test.ts, packages/lint/src/runtime-gate.object-writes.test.ts, packages/lint/src/runtime-lazy-deps.test.ts, packages/cli/src/utils/extract-hook-body.ts, packages/cli/test/extract-hook-body.test.ts, packages/metadata-protocol/src/protocol-publish-drafts-advisories.test.ts, packages/metadata-protocol/src/protocol.packageless-save-address.test.ts, packages/objectql/src/bound-action-foreign-object.test.ts, packages/objectql/src/publish-meta-response-conformance.test.ts, packages/objectql/src/publish-package-drafts-response-conformance.test.ts, packages/objectql/src/save-meta-response-conformance.test.ts, packages/qa/dogfood/test/action-save-packageless-other-object.dogfood.test.ts, packages/runtime/src/domains/packages-uninstall-handlers-withdrawn.test.ts, scripts/cross-package-test-inputs.mjs, turbo.json + read, not reviewed: .changeset/35143-seeds-actions-checks.md, .claude/skills/pm-dispatch/references/execution-duties.md, AGENTS.md
Security-touching: yes
Rule-change-verified: none
Regen-provenance: 1f2599c0fff4548fc1c5a98674ccc675635ac5b5 to d2a38064eaaf69041dfa336855c26866c6f88c38 is two commits. ce21beea merges main 02ed8408 with no conflict. d2a38064 changes four lines under content/docs/**, a prose face. On every path of the Scope line the PR's own diff against its merge base is the one record 7211531167 judged, and that record's code judgments are carried here unchanged.

Delta round by the reviewer of records 7211531167 (PASS at 1f2599c0), 7211486008 and 7209862537. Inputs: git diff ce4d8c7d 1f2599c0 and git diff 02ed8408 d2a38064 per Scope path, git diff ce4d8c7d 02ed8408 on the paths main moved, the PR body's declaration lines, and the check-runs on this head. Nothing was built or run.

① Derived judgments

  • The PR's file list is the same 32 paths at both heads. Merge base moved from ce4d8c7d to 02ed8408.
  • 24 of the 30 Scope paths are the same blob at 1f2599c0 and d2a38064, and main did not touch them.
  • Six Scope paths carry main's edits as well: packages/lint/src/index.ts, authoring-rules.ts, reference-integrity-suite.ts, rule-explanations.ts, scripts/cross-package-test-inputs.mjs, turbo.json. On each, the PR's added and removed lines against the new base equal those against the old base (compared with hunk offsets and blob ids dropped). The merge changed no PR-side line.
  • What main brought to those six: the ADR-0159 form rules (two registry rows, one reference-integrity member, four explanations, the exports), validateRollupSourceVisibility crossing onto permission writes, one prose rename in an explanation, and two examples/app-crm test inputs. None edits a row, member, export or input this PR adds. validate-object-references.ts is untouched by main, so the object-reference-unknown sites are as reviewed.
  • The accept-set and public-surface judgments of 7211486008 stand as written there.
  • Clause-②: yes (narrowing): RIGHT, unchanged. Metadata-protocol: narrowed: RIGHT, unchanged.
  • The count: AUTHORING_RULES at this head holds 85 rows; 83 declare commands: ALL and 2 declare ['validate', 'build'], so authoringRulesFor answers 85 for validate and for build. Per ref: ce4d8c7d 81, 1f2599c0 83, 02ed8408 83, d2a38064 85. Main's two are the form rows; this PR's two are validateSeedRecordKeys and validateActionBodyCapabilities. The four docs lines sit in os-validate and os-build transcripts, so 85 is right. Both sides had written 83, which is why the merge raised no conflict there.

② Semver level

  • @objectstack/lint minor, @objectstack/spec patch, @objectstack/cli patch: right, unchanged.
  • .changeset/35143-seeds-actions-checks.md is the same blob as at 1f2599c0. It and the PR body carry the same three lines: Clause-②: yes (narrowing), Metadata-protocol: narrowed, Skills-docs: follow-up #37814.
  • The changeset states no rule count, so the move to 85 leaves it correct.

③ Boundary flags

  • The seat's note against claim 7206244272 (recorded as owed in 7211531167) was not re-read this round. It is bookkeeping on the claim, not a condition on the diff.
  • Security-touching: yes in the same narrow sense as before: the diff teaches when a body needs the api.write capability and changes no enforcement.
  • SQL push-down: nothing in the delta. Nothing to report.
  • Main: tip was b620c4b2 when read, 11 commits past 02ed8408. None of the 83 files those commits change is among this PR's 32. One of them adds another 19. semantic entry under a different slug; the entries are slug-named and several 19. files already sit side by side.
  • Check-runs on this head, read at 2026-11-27T08:42:17Z: 70 runs, 61 success, 9 skipped, none failed, none pending.
    • Success includes Governed Surface Queue Guard, Check Changeset, PR-body guards, Lint & Repo Gates and its eight Lint jobs, the four Type Check jobs, Build Core, Build Docs, Test Core and its 10 shards, Test UI and its 16 shards, Dogfood Regression Gate, Spec property liveness.
    • Skipped are the opt-in and queue-only jobs: the 18.x upgrade harness, Packed-tarball smoke, Queue verdict, Borrowed queue verdict, Schedule gate, the Dogfood shard matrix and Verify CLI, Temporal Conformance, UI Published Artifacts.
    • "All green" is established on this head.
  • PR state when read: open, not draft, mergeable_state clean, auto-merge not armed.

④ Design judgment

Findings of the earlier records, at this head:

M1 (must-fix): closed.
S1 (should-fix): closed.
S2 (should-fix): closed.
S3 (should-fix): closed.

Nits, none with an effect on correctness or the contract, unchanged from 7211531167:

  • N1 (open, accepted). The mask's two unlisted remainders and the shadowing parameter.
  • N2: closed.
  • N3 (open, a card). ADR-0141 D1 and app-dependencies.mdx do not list the action and flow-node sites, nor the CLI advisory.
  • N4 (open). The fence test's second spelling of the member filter.
  • N5 (open). objectName: 'global' written out is refused at the action door.
  • N6 (open). Node types and the legacy config.object spelling not read.
  • N7 (open). The extractor's and the lint's readings of a write call are two spellings in two packages.

No must-fix, no should-fix.

Implemented-by: claude/issue-35143-seeds-actions-checks
Reviewed-by: session_01Q4EjjQkY5yXZrN9BEA3rEK

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK

席位核对 — ACCEPT · repo:objectstack#6 · head d2a38064eaaf69041dfa336855c26866c6f88c38

  • Delta from the ACCEPT at 1f2599c0 (7212014422): merge of main 02ed8408 (clean) plus four docs transcript lines author-time rules (83) → (85). The first queue run failed check:docs-transcript-drift on the merged tree because main and this PR each added two author-time rules.
  • Contract review at this head: PASS 7213858131, no must-fix or should-fix; the PR-side diff of every reviewed path is unchanged by the merge.
  • Gates: check-runs at head 61 success, 9 skipped, 0 failed.
  • The second queue run failed only the Governed Surface Queue Guard, which needs a contract review naming the current head; 7213858131 is that record. Re-enqueue by an approver (os-zhuang) is what remains.

@os-zhuang
os-zhuang added this pull request to the merge queue Nov 27, 2026
Merged via the queue into main with commit c42a045 Nov 27, 2026
70 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-35143-seeds-actions-checks branch November 27, 2026 09:51
@objectstack-fleet objectstack-fleet Bot removed the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 27, 2026
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/xl 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.

3 participants