Repository navigation
fix(lint)!: three publish-time checks for seeds, flow nodes and actions that save and do not work - #37807
Conversation
Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK Co-authored-by: Claude <noreply@anthropic.com>
…ecks Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK Co-authored-by: Claude <noreply@anthropic.com>
…eds-actions-checks
Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK Co-authored-by: Claude <noreply@anthropic.com>
…task Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK Co-authored-by: Claude <noreply@anthropic.com>
…declares the showcase package Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK Co-authored-by: Claude <noreply@anthropic.com>
…ure; pin it 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>
📓 Docs Drift CheckThis PR changes 3 package(s): 50 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 17 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 188 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # 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
|
|
repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK Contract reviewServed-tier: 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 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
② Semver level
③ Boundary flags
④ Design judgmentAgainst 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.
S1 (should-fix) —
S2 (should-fix) — line 1 refuses
Is a regex the right instrument for line 3 at a publish gate: yes, as an error.
Nits, none with an effect on correctness or the contract:
Open at this head: M1, S1, S2. Each earns a delta read of its fix by this reviewer. Implemented-by: VERDICT: FAIL |
|
repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK 席位核对 — REVISE · repo:objectstack#6 · head
|
…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>
Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK Contract reviewServed-tier: Delta round by the reviewer of record 7209862537 (FAIL at ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentFindings of record 7209862537, re-judged at this head: M1 (must-fix): closed.
S1 (should-fix): closed.
S2 (should-fix): closed.
New at this head: S3 (should-fix) — the declaration line is
Nits, none with an effect on correctness or the contract:
Open at this head: S3. No must-fix. Implemented-by: 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
|
repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK Contract reviewServed-tier: Delta round by the reviewer of record 7211486008 (PASS at ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentFindings of the earlier records, at this head: M1 (must-fix): closed.
Nits, none with an effect on correctness or the contract, unchanged from 7211486008:
No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
…eds-actions-checks
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK
|
repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK Contract reviewServed-tier: Delta round by the reviewer of records 7211531167 (PASS at ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentFindings of the earlier records, at this head: M1 (must-fix): closed. Nits, none with an effect on correctness or the contract, unchanged from 7211531167:
No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#6 · hotlong · session_01Q4EjjQkY5yXZrN9BEA3rEK 席位核对 — ACCEPT · repo:objectstack#6 · head
|
…ows by whole checkpoints (ADR-0154 D8, D10) (objectstack-ai#37605) <!-- claude-projects-attribution: {"github_login":"os-sales"} --> _Requested by **Sales** · [project thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuWkuYc3V797qxZSYHo5QzBw)_ Part of objectstack-ai#31908 Clause-②: yes (narrowing) — narrowed: `sys_audit_log` now declares `lifecycle.seal` on every deployment, so `os migrate audit-key-material`, `audit-mail-bodies`, `audit-metadata-bodies` and `audit-side-copies` with `--apply` refuse on SQLite or Turso without `--sealer-stopped`, and on Postgres or MySQL take the audit seal lock and refuse after ten minutes, where 18.6.0 ran them unlocked on a deployment that sealed nothing; `os audit verify` exits 1 on a row it reads `late` and unsealed (the S4 arm); `os audit verify` refuses with `archive_not_connected` and exits 2 where the `archive` datasource is declared and not connected on its own boot (fix: `autoConnect: true`, or make it reachable), where 18.6.0 printed that nothing is sealed and exited 0; `verifyAuditLedger` throws for `sys_audit_log` when its `archive` datasource is not connected and no `archive` is passed; on a sealed object with no `archive` whose lifecycle is declared in packaged metadata, a retention override below the declared window, global or for one organization, is rejected (reported at `error`, the declared window applies), where 18.6.0 applied it. An object created at runtime is outside the override arm and outside signed expiry: it keeps the 18.6.0 row-cutoff retention sweep, and a settings override applies to it; the `os audit verify` arms hold for it as for any sealed object. This breaks the bound changeset `35c9a30` (objectstack-ai#33675) set ("a deployment that did not opt in sees no change"). Widened: `LifecycleService.registerExpiryPrefix` and the `LifecycleExpiryPrefix*` types (the request with `tenants` and `tenantColumn`), `takesSignedExpiry` and `SignedExpiryRegistryLike`, three optional owner reads on `LifecycleEngineLike.registry`, `policy: 'expiry'`, the skip reasons `seal-expiry-pending` and `seal-delete-unsupported`. Metadata-protocol: semantic — beside `lifecycle.seal`, the authored `retention.maxAge`, `ttl.expireAfter` and `archive.keep` no longer delete a row at its row cutoff: rows leave by whole checkpoints under a signed expiry amendment (seat ruling on review 7198128323 S2; the changeset moves all four packages `minor`) Skills-docs: objectstack-ai#37881 — this claim's second PR (amendment 7193137455) rewrites `skills/objectstack-data/rules/lifecycle.md`, which says the sweeper deletes sealed rows until it lands (hence `Part of`, not `Fixes`) ## 维护者速读 - 每个部署的审计日志从此默认带防篡改封印:管理员跑审计校验时,被改、被删、被脱敏、按策略到期的记录都能分辨出来,热库和归档库都算。 - **这是对运维可见的破坏性变化**:SQLite 和 Turso 部署下次跑 `os migrate audit-*`(包括升级流程里的 `audit-side-copies --apply`)会被拒,要先停掉服务再带 `--sealer-stopped`;Postgres 和 MySQL 会先等封存锁,最多等 10 分钟。 - **过期删除不可撤回**:过了保留期的审计记录按整段检查点删除,删之前先签一份到期说明,校验时读作“到期”而不是“丢失”,但删掉的行找不回来。 - **宿主没有传加密服务时**,`sys_audit_log` 过了 `archive.keep` 也会一直留着,封存器每小时报一次 error。出错时只会多留、不会多删:链条有缺口、签名不可信、检查点或到期说明不属于这条链、前后接不上,都一律保留并告警一次。 - **没有 archive 的封存对象上,保留期覆盖不能把窗口缩短到声明值以下**:运维在设置里把这类对象的保留期改短(全局或某个组织)会被拒绝并报 error,按对象声明的窗口执行;改长照常生效。想留得更短,只能改对象自己的声明。带 archive 的对象(比如 `sys_audit_log`)上,覆盖仍然决定什么时候转入归档。 - **签名到期只覆盖打包元数据里声明的对象**:运行时创建的封存对象(在 Studio 等处建的、存在数据库里的)照旧按保留期清扫(被清掉的行在校验里读作“丢失”)、覆盖照样生效,和现在一样,不受“覆盖下限”和“签名到期”这两条收窄影响;但 `os audit verify` 的两条收窄对它一样适用,比如有 late 未封存的行时同样 exit 1。让运行时对象也支持签名到期另开卡。 - **按租户设的保留期**设在对象的 `organization_id` 列上,所以只有链列也是 `organization_id`(`seal.chainField: 'organization_id'`)的对象,才按这个组织自己的保留期过期;其他链(不属于任何组织的链,以及保留期设在另一列上的对象的所有链)一律按所有保留期里最长的那个保留。代价是:保留期设在非链列上的对象,租户设的更短保留期对它的封存记录不起作用,记录会留到最长的保留期。 **Tier:** Tier H (declared narrowing: the Clause-② line above; seat ruling on review 7202871622). About 2,996 changed lines (under 3,000). No governed path: `packages/spec/src/data/object.zod.ts` changes one `.describe()` sentence only, and the `skills/**` wording fix is split into this claim's second PR (amendment 7193137455), Tier H on its own. The release page `content/docs/releases/v18/18-6.mdx` is release-owned and is not edited here (AGENTS.md "Documentation Guardrails"). ## What changes ADR-0154 D8 + D10, slice P4c, the last slice of objectstack-ai#31908. - **`sys_audit_log` is sealed by default.** Its lifecycle now declares `seal: { valueFields: ['old_value', 'new_value', 'metadata'] }` (`packages/plugins/plugin-audit/src/objects/sys-audit-log.object.ts`). The chain column is the default `tenant_id` (a lookup, one text value on every store). - **LifecycleService: sealed objects expire only through a registered seam** (`packages/objectql/src/lifecycle/lifecycle-service.ts`). Signed expiry covers objects whose lifecycle is declared in packaged metadata; an object created at runtime keeps the row-cutoff retention sweep. Extending signed expiry to runtime-created objects is a separate card. The test is one predicate, `takesSignedExpiry` (new, `lifecycle/signed-expiry-scope.ts`, exported), which the routing, the audit floors and the sealer's expiry all ask; it answers yes only for an object the registry places in packaged metadata. Any other sealed object keeps the row-cutoff path, and the sealer's expiry answers no run for it (seat ruling 7209154881). New public `registerExpiryPrefix(expiry)` (the name slice plan 6759503769 ruled) (one slot; a later registration replaces it; the disposer clears only its own) and the types `LifecycleExpiryPrefix`, `LifecycleExpiryPrefixRequest`, `LifecycleExpiryPrefixRun`. For an object with `lifecycle.seal`: - the `retention.maxAge` / `ttl.expireAfter` legs and the archive's `keep` prune never delete by a row cutoff; each asks the seam to `plan({ object, policy, policyValue, cutoff, tenants?, tenantColumn? })`; - each run's `rowIds` are deleted by id (hot and archive for an archiving object; through the engine, reap guards asked, for the rest), and `run.complete()` is called only when every one is gone; - with no seam registered, rows are kept, the archive copy still runs, the sweep reports `seal-expiry-pending`, and one `warn` says so; - a tenant-scoped window (on the partition `reap()` uses, through the same floors) travels as `tenants`, with the column it is set on (`tenantColumn`), which need not be the chain column (review 7202871622 S4); - an archive store with no `bulkDelete` is never planned (`seal-delete-unsupported`), so no amendment is signed over rows it could not delete. - **plugin-audit: the expiry writer** (new `audit-seal/expiry.ts`, `AuditSealer.expire`, registration in `audit-plugin.ts`): - per chain, from the first remaining checkpoint (which must follow and link to the last admitted expiry, or be sequence 0), take consecutive checkpoints whose window ended at or before the chain's cutoff aligned down to a UTC day, each the chain's own, linked to the one before and admitted by a trusted signature, at most 10,000 rows a sweep; a chain holding a checkpoint or stored expiry that is not its own, or one that does not link, is not expired at all and is said once (review 7202871622 M3); - each chain's window: where `tenantColumn` is the object's chain column, an organization's chain takes its own tenant window (else the global one); every other chain, the chain of rows about no organization and every chain of an object whose windows sit on another column, takes the longest window configured; its amendment signs it (seat rulings on S1 and on review 7202871622 S4). No row is read to pick a window; - sign and store the chain's `expiry` amendment (the S1 key-id loop, then the sink, best-effort), then answer the run; `complete()` removes each checkpoint's seed, then the checkpoint, oldest first (review n5), and removes a seed only when it is the secret sealed under that checkpoint's own coordinate; - a stored, admitted amendment that still covers the first remaining checkpoint is resumed (no second amendment); the resume branch admits each checkpoint as the fresh branch does (the chain's own, linked to the one before, a trusted signature), requires them consecutive from the amendment's first sequence to its last sequence and digest, reads them a page at a time, and removes them oldest first; otherwise nothing in the range is deleted; an unadmitted amendment deletes nothing; - a gap or an untrusted checkpoint stops the chain there and is said once; - planning holds the `audit.sealer` lock and the DB seal-pass lock, so two replicas never sign two amendments over one range; a fully drained plan is memoised for the day; - registered only when the plugin has a crypto provider (otherwise nothing could be signed); - on a sealed object with no `archive`, a retention override cannot shorten the declared window (review 7207510869): beside the expiry, the plugin registers a retention floor (`LifecycleService.registerRetentionFloor`, the mechanism the job queue uses) for every object whose packaged metadata declares `lifecycle.seal` and no `archive`, at its declared `retention.maxAge` and `ttl.expireAfter` (new `audit-seal/retention-floor.ts`), and registers it again before every sealer pass (new `AuditSealerOptions.beforePass`) so it follows the registry; a lifecycle service with no retention floors is given no expiry, so its sealed rows are kept, and the plugin says so at `error`. An archiving sealed object expires only past `archive.keep`, which takes no override; - the sealer's head falls back to the last admitted expiry (the chain's own, its signature verified) when a chain has no checkpoint left (`last_sequence`, `last_removed_digest`), and the object floor to the newest admitted `covered_to`; both, like the expiry, read stored amendments page by page until an admitted one answers. - **Verifier: the S4 arm** (seat ruling 6885452378, ADR-0154 D3 as amended in objectstack-ai#33489): a window that starts at or before the newest window a trusted `window` checkpoint names is sealed, so a lagging chain's rows read `late` and unsealed. It also holds an honoured expiry to what it signed: an amendment stored under another chain than its signed organization is a `chain_key` fault, as a checkpoint is, and a checkpoint in an honoured range reads `expired` only within the window the range covers (review 7202871622 M3). - **verify harness** (`packages/verify/src/harness.ts`, ruling 6884540128 item 4): an `AuditPlugin` that `bootStack` mounts (extra, stack `plugins`, or `requires: ['audit']` provider) adopts `harnessCryptoProvider()`, the instance settings and the engine get; an instance with its own provider keeps it. - **Docs:** the `lifecycle.seal` describe sentence (and the regenerated `content/docs/references/data/object.mdx`), `content/docs/data-modeling/objects.mdx` (the sentence at :277, the day alignment, the row budget and tenant windows, plus one line that `sys_audit_log` declares the block), `content/docs/deployment/cli.mdx` (the audit seal lock and `--sealer-stopped` for every run covering the audit log), `content/docs/upgrading.mdx` (the 18.5.0 line now holds on every deployment), `content/docs/deployment/production-readiness.mdx`. ## Tests - `packages/objectql/src/lifecycle/lifecycle-service.sealed-expiry.test.ts` (new, 13): a sealed object created at runtime keeps the row-cutoff sweep, retained and archiving, and never asks the expiry (seat ruling 7209154881); against a real `SchemaRegistry`, a sealed object the registry does not place in an installed package's metadata keeps the row-cutoff sweep, while one it does takes the signed expiry; pending skip and the once-only warning; `archive.keep` plan on both stores and complete-after-delete; `retention.maxAge` per-id engine deletes; `ttl.expireAfter`; a partial guard veto leaves its run uncompleted; a failing plan deletes nothing; slot replacement and disposer; a malformed registration; an unsealed object keeps the row-cutoff path; an archive store with no `bulkDelete` is never planned; a tenant-scoped window travels to the expiry with the column it is set on (review S1, S4, n3). - `packages/objectql/src/lifecycle/signed-expiry-scope.test.ts` (new, 3): `takesSignedExpiry` answers yes only when the registry places the object in packaged metadata: a registry that cannot be asked answers no; an installed `code` or `marketplace` source answers yes, an `authored` or unknown one no; a plain registration from code answers yes, an owner under no installed package or a tenant-authored one no. - `packages/plugins/plugin-audit/src/audit-seal/audit-seal-expiry-live.integration.test.ts` (new, 10): the real-kernel end-to-end over SQLite with an `archive` datasource. `sys_audit_log` sealed by its own declaration; the plugin's sealer seals; an interrupted expiry (amendment stored, rows still there) reads `expired`; the kernel's own LifecycleService sweep archives, resumes, deletes exactly the expired rows from both stores and then their checkpoints and seeds; a second same-day sweep signs nothing; verify then reads no gap and the untouched windows `unmodified` in hot and in archive; a fully expired chain's next checkpoint links to `last_removed_digest`; `modified`, `missing` and `redacted` are still told apart. A second boot: a sound chain expires whole, a chain stops at a checkpoint no trusted key signed, a chain with a gap is kept, each said once; a stored expiry is never resumed over a checkpoint no trusted key signed (no row and no seed it lists is deleted); a chain head never follows an expiry amendment no trusted key signed (review M1). - `audit-seal-expiry-window.test.ts` (new, 7): each chain's window — its organization's own where the windows are set on the chain column, the global one, the longest for a chain of no one organization (review S1) and for every chain where the windows are set on another column (S4); and the `policy_change_log` shape over the sealer itself (declared `tenant_id`, injected `organization_id`, the two values differing): windows on `tenant_id` expire each organization's chain under its own window, windows on `organization_id` keep every row to the longest (S4). - `audit-seal-expiry-admission.test.ts` (new, 14, review 7202871622 M3 and n6, review 7205485052): one pin per check an expiry or the sealer's head makes before it acts — a fresh run's checkpoints bound to the chain and linked, the first linked to the last expiry; a resumed range's checkpoints bound, consecutive, linked, each signature trusted, ending at the amendment's digest, none before its first sequence; a stored expiry bound to the chain; the newest admitted expiry found past more stored ones than one page; and the sealer's head under the same two rules; and a checkpoint whose seed handle names another secret drops nothing but its own row. - `audit-seal-verifier.test.ts` (+2): an amendment stored under another chain is a `chain_key` fault; a checkpoint whose window ends past its honoured range's `covered_to` is judged, not read `expired` (M3). - `audit-seal-sealer.test.ts` (+1): the S4 sole-chain window reads `late` unsealed and `ok` false. - `audit-seal-retention-floor.test.ts` (new, 10, review 7207510869, S7 of 7209130288 and seat rulings 7209154881, 7210805783): over a real `LifecycleService` and the plugin's own registration, an object created at runtime, and one owned under a package id no installed code or marketplace package answers, take no floor and no expiry while a packaged one takes both, and the sealer's expiry answers no run for a runtime object before it resolves a seam; a global and a tenant override below the declared window are rejected and the expiry is asked for the declared window, with both rejections on the sweep report; an override above it still applies and is what the expiry signs; a lengthened declaration is the floor from the next sealer pass on; a lifecycle service without floors gets no expiry; and which windows a sealed object is floored at. - `audit-plugin.test.ts` (+3): the expiry is registered with a crypto provider, unregistered on destroy, not registered without one, and boot survives a lifecycle service without the seam. - Existing pins adjusted for the seal default (not loosened): `packages/cli/src/commands/audit/verify.integration.test.ts` and `verify.ownership-queue.integration.test.ts` now expect `sys_audit_log` beside the fixture ledger in `objects` and in the unreachable-archive message, and case 4 reads that a project with no seal of its own still checks the platform's sealed audit log (exit 0); the four `os migrate audit-*` archive and preview integration files (`audit-mail-bodies.archive`, `audit-key-material.archive`, `audit-side-copies.archive`, `preview-read-only`) pass `--sealer-stopped` on their SQLite `--apply` runs (and `preview-read-only`, now judged by the test-source alias gate's source reach, pays its twelve dynamic imports at module top); the two `os migrate audit-*` dogfood files (`packages/qa/dogfood/test/audit-key-material.dogfood.test.ts`, `audit-mail-bodies.dogfood.test.ts`) pass the same flag on their `--apply` runs; and in plugin-audit, `audit-seal-chain-field-34164.test.ts` passes `archive: () => 'none'` (its boot connects no archive datasource, as `os audit verify` establishes), and `audit-seal-host-seam-resolve-34280.integration.test.ts` forgets what the loop's own first pass reported before each pin counts its own passes. <details><summary>Ablations (each restored, blob == HEAD)</summary> - Verifier S4 arm `|| start <= this.newestSealedWindow()` → `|| false`: the new sole-chain pin goes red (`expected [] to deeply equal [ Array(1) ]`), 1 failed | 57 passed. - Lifecycle routing `if (lc.seal) return this.reapSealed(…)` disabled: 5 of the 9 new lifecycle pins go red. - Archive keep branch `if (lc.seal) {` disabled: the two archive pins go red. - Resume admission (signature check and the last-sequence/digest match) disabled, and the sealer's expiry signature check disabled: the two M1 pins go red, 2 failed | 8 passed. - Reviews 7202871622 and 7205485052, one check at a time (each its own pin red, 1 failed, every other selected pin skipped): the fresh run's binding, link and first link; the resumed range's binding, sequence continuity, link, signature, last digest and first-sequence floor; the stored expiry's binding and paging; the sealer head's binding and paging; the verifier's `chain_key` fault on an amendment and its window bound on an honoured range (15); S4's own-window branch and its longest-elsewhere branch (2); the seed coordinate check (1); review 7207510869: the floor registration, its refresh before each sealer pass, and the no-floors refusal (3); seat ruling 7209154881: the lifecycle routing, the floor and the sealer's expiry each scoped to packaged objects (3); the packaged-metadata predicate's installed-source answer and its default when the registry cannot answer (2). 26 of 26 red. </details> ## Acceptance notes - **Rows are kept, never over-deleted, whenever something is off.** No crypto provider, a one-shot boot, a gap, an untrusted checkpoint, a reap guard veto, or a failing plan all keep the rows. A deployment whose `AuditPlugin` has no crypto provider now keeps `sys_audit_log` rows past `archive.keep` instead of pruning them, says so once per process at `warn`, and its sealer reports the missing provider hourly at `error`. An expiry, once run, deletes for good. - **`os migrate audit-* --apply` on SQLite or Turso now needs `--sealer-stopped`** whenever it rewrites `sys_audit_log`: the 18.6.0 rule for a sealed object (ADR-0154 D3 amended, B, seat ruling 6885005594) now meets every deployment. On Postgres and MySQL every such run now takes the audit seal lock and waits up to ten minutes; dry runs are unchanged. Declared as the narrowing arm with a BREAKING banner and an ADR-0087 marker (review M2). - **The day-aligned cutoff** keeps a row up to one day past its policy, on top of D8's bound, so a drained chain gains at most one expiry amendment a day; amendments are never removed. **10,000 rows a sweep per sealed object**, across its chains; a backlog keeps rows longer, and a cut run continues in the next amendment. Both exceed D8's stated bound in the safe direction; the seat kept them and the add-only ADR-0154 note follows in its own governed PR, beside the skills PR. - **On a sealed object with no `archive`, a retention override cannot shorten the declared window** (review 7207510869, S7 of 7209130288): an override may lengthen it, one below it is rejected at every sweep (`floorViolations`, `error`), and the declared window applies. On an object that archives (`sys_audit_log` among them), an override still sets when rows move to the archive, and `archive.keep` takes no override. - **Signed expiry covers objects whose lifecycle is declared in packaged metadata** (seat ruling 7209154881): an object created at runtime keeps the 18.6.0 row-cutoff retention sweep (its expired rows read as missing), its overrides apply, and it takes no floor. Extending signed expiry to runtime-created objects is a separate card. - **Tenant-scoped retention windows** are set on the object's `organization_id` column, and apply as the seat ruled on S1 and S4: where the windows are set on the chain column an organization's chain expires under its own window; every other chain under the longest of all, never shorter than a window set for a row in it; each amendment signs the value its chain expired under. The cost: on an object whose windows sit on another column than its chain column, a shorter tenant window has no effect on its sealed rows, which are kept to the longest. `sys_audit_log` itself archives, and `keep` has no override. - `os audit verify` on a deployment with no `archive` datasource anywhere already reads the hot store alone (`'none'`); a library caller of `verifyAuditLedger` that composes no archive must now pass `archive` for `sys_audit_log`, as the adjusted test does. - **File surface past the claim:** the two CLI `os audit verify` integration pins, the four CLI `os migrate audit-*` integration files and the two dogfood files above (expectations, the flag and module-top imports only), `content/docs/deployment/production-readiness.mdx`, `content/docs/upgrading.mdx`, the new `audit-seal-expiry-window.test.ts` and `audit-seal-expiry-admission.test.ts`, `seal-store.testkit.ts` (the in-memory store double judges `$lte`), `packages/verify/vitest.config.ts` (one anchored alias the source-alias gate asks for), `scripts/engine-double-contract.pinned.json` and the plugin-audit tenant-audit census page (both regenerated by their own `--write`). Named here for the seat's claim amendment. - The CLI `os serve` composition is unchanged (it already hands its host provider to `AuditPlugin`, P4b). - The `skills/objectstack-data/rules/lifecycle.md` "not built yet" wording follows in this claim's second PR (Tier H, amendment 7193137455); until then this PR is `Part of objectstack-ai#31908`. - **Small decisions:** the seam is `registerExpiryPrefix` as ruled, and its three types now share that stem (`LifecycleExpiryPrefix`, `LifecycleExpiryPrefixRequest`, `LifecycleExpiryPrefixRun`), so a reader finds them beside the method. A chain of no one organization takes the longest window rather than the global one, the safe reading of the S1 ruling. Under S4 no row is read to pick a window (seat ruling on review 7205485052). Stored expiry amendments are read 50 a page until an admitted one answers, in place of the 10-row scans (review minor). The in-memory store double now judges `$lte`, which the expiry's queries use. A resumed range is read 20 checkpoints a page, as a fresh run is; the chain walk never takes a row with no `chain_key` as its key. These last two have no pin of their own: neither changes a result on a store the platform writes. - **Owed before queueing:** the delta contract-review-tier L2 over this head (round 7, after review 7210787318 PASS with S8, S9, n17, n19 and n20 to close), done by the seat. ## Verification Two-minute check: `cd packages/plugins/plugin-audit && pnpm exec vitest run src/audit-seal/audit-seal-expiry-live.integration.test.ts` — expect `Tests 10 passed (10)`. Read first (risk order): `packages/plugins/plugin-audit/src/audit-seal/expiry.ts` (`chainRun`: resume, gap, admission, budget), `packages/objectql/src/lifecycle/lifecycle-service.ts` (`sweepSealed` / `deleteSealedRows`: complete only after every row is gone), `packages/plugins/plugin-audit/src/audit-seal/sealer.ts` (`expire`: locks around planning; the head fallback). <details><summary>Local runs at ff14eb2 (each under os-verify-lock, exit captured before any pipe)</summary> - `pnpm turbo run build` over spec, objectql, plugin-audit and verify: exit 0. - plugin-audit full: Tests 1879 passed (1879), exit 0. - objectql full: Tests 14449 passed (14449), exit 0. - verify full: Tests 503 passed (503), exit 0. - cli `src/commands/audit/`, `serve-audit-registration.contract`, `app-audit-plugin-host-crypto`, `schema-migrate.one-shot-family.integration`: Tests 221 passed (221), exit 0. - `tsc --noEmit` of plugin-audit (with its test-typecheck layer) and objectql, and `eslint` on the changed sources: exit 0. - `gen:schema && gen:docs` regenerated `content/docs/references/data/object.mdx`. - `dispatch-gates --commands`: 142 derived, 141 exit 0. One NOT MEASURED: `check-plugin-teardown-shape --self-test` exits 3, PREREQUISITE NOT MET (needs an unshallow clone). - dogfood_battery at ff14eb2: `turbo run build --filter='@objectstack/dogfood^...'` 73 of 73 tasks, then `pnpm --filter @objectstack/dogfood test`: Test Files 488 passed | 3 skipped (491), Tests 4135 passed | 68 skipped (4203), exit 0. - Ablations at ff14eb2: 26 single-check ablations, each its own pin red, each file restored byte for byte. - `overlap-check` at ff14eb2: merges cleanly with origin/main c826e8a and the PR heads sharing `content/docs/deployment/cli.mdx` (objectstack-ai#37807, objectstack-ai#37366). - Earlier heads: 51ba1c1, 5860216, 4deab94, 46e272e (review 7198128323), 48e81f3 and c05884d (review 7202871622; CI green), 65a5d7d (reviews 7205485052 and 7207510869; CI green), 71bb12a (review 7209130288; CI green), 05e6a57 (review 7210787318; CI green). </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01L6bhgUd6hon2o34LQSLbZt)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L6bhgUd6hon2o34LQSLbZt <!-- signed: repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…dbox installs; app-dependencies lists the closure-judged bindings (objectstack-ai#38628) <!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9JeHmqv6CKCkW8ewrPBLekk)_ Refs objectstack-ai#37815 (items c, d) Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:应用作者在构建检查里看到的「记录改动被丢弃」提示,现在给出一种在沙箱里真能运行的写法;应用依赖文档补上了保存时按依赖关系判定的完整绑定清单。 - 为什么做:原提示让作者照抄一个沙箱里根本不存在的方法,照做后动作第一次运行就报错;属于脚本动作写入的检查跟进工作。 - 出错会怎样:只改提示文字和文档,检查结论不变,不影响任何已保存的应用;有问题可直接撤回。 - 要你做什么:无。 ## What changes - **Item (c), the `action-record-write-discarded` hint.** It prescribed `ctx.api.object('OBJECT').updateById(ctx.recordId, { … })`. Probed for real (below): a sandboxed action body or hook body has no `updateById` on `ctx.api.object(…)`, so following the hint throws `TypeError: not a function` and writes nothing. The hint now prescribes `ctx.api.object('OBJECT').update({ id: ctx.recordId, FIELD: … })`, the single-record form the sandbox installs and `HookObjectApi.update` documents (the id travels inside the payload). The method name lives in one constant, `ACTION_RECORD_WRITE_REMEDY_METHOD` (not re-exported from the package index), pinned to `SANDBOX_API_WRITE_METHODS`, which is itself pinned to the runner's `WRITE` list. - **The `os explain action-body-write-unknown-field` text** said an action body persists "only through `insert / create / update / updateById`". `create` and `updateById` are not installed in the sandbox either. It now names `insert({ … })` and `update({ id, … })`. Same defect class, same file, bounded fix. - **Item (d), `content/docs/deployment/app-dependencies.mdx`.** The page said the save door judges "a list view" against the package closure. It now has a table of the bindings that door judges, including the two that PR objectstack-ai#37807 added: a standalone action's `objectName` and a flow `get_record` / `create_record` / `update_record` / `delete_record` / object-form `screen` node's `objectName`. Sources: `validateObjectReferences` runs on the `flow`, `dataset` and `action` runtime doors (`packages/lint/src/reference-integrity-suite.ts`, member `runtimeTypes: ['flow', 'dataset', 'action']`, handed `ctx.packageScope`), and the flow-node and action sites are in `packages/lint/src/validate-object-references.ts` (`OBJECT_BOUND_FLOW_NODE_TYPES`, `actions[i].objectName`). The form and knowledge-source rows come from `form-object-outside-closure` (`validate-form-items.ts`) and `knowledge-source-object-unknown` (`validate-knowledge-source.ts`). The table says "include" because other closure-aware rules exist (email template holes, AI tool and context references) that this PR did not audit. - What lint judges is unchanged: an `updateById` payload in a body is still graded (`API_WRITE_METHODS`, the ledger's `api-crud-literal` syntax line and example, and the explanations that say what is judged), because a body can still contain the call. - The ADR-0141 D1 note is not in this diff. It goes to the weekly ADR revisions card. ## Tests - `validate-action-body-writes.test.ts`: the existing case that pinned `hint` to contain `updateById` now pins the remedy method. A new case asserts the method the hint calls is in `SANDBOX_API_WRITE_METHODS` and that the payload is addressed by `id: ctx.recordId`. Subjects, not prose. - Ablation (hint put back to `updateById(ctx.recordId, …)` via `scripts/ablation-replace.mjs`, anchor 1 to 0, blob 262ceea to a2f3f908): 2 cases red (`expected [ 'updateById' ] to deeply equal [ 'update' ]`), 50 passed. Restored: `git diff HEAD` empty, 0 hits of the mutation. <details><summary>Sandbox probe (throwaway test, not committed): real ObjectQL, real better-sqlite3 SqlDriver, real QuickJSScriptRunner and body-runner factories</summary> ``` PROBE ACTION updateById (old hint) :: {"err":{"name":"SandboxError","message":"action 'close_deal' threw: TypeError: not a function","inner":"TypeError: not a function"}} :: stage after = open PROBE ACTION update({ id }) (new hint) :: {"ok":"ok"} :: stage after = won PROBE ACTION typeof updateById :: {"ok":"undefined"} :: stage after = open PROBE HOOK updateById :: {"err":{"name":"SandboxError","message":"hook 'note_closes_deal' threw: TypeError: not a function"}} :: stage after = open PROBE HOOK update({ id }) :: {"ok":true} :: stage after = won Test Files 1 passed (1) Tests 5 passed (5) ``` Hook bodies run in the same sandbox and fail the same way. </details> <details><summary>Local runs (head c2b9cff)</summary> - `pnpm --filter @objectstack/lint exec vitest run --maxWorkers=2` (the whole package) at c2b9cff: lock VERDICT command-exit 0, Test Files 246 passed (246), Tests 9959 passed (9959). The first whole-package run, at 0dfeeda, had 1 red in `rule-id-barrel-exports.test.ts`: it reads an unannotated exported string constant as a rule id. The constant is now annotated `string` (second commit). - `pnpm --filter @objectstack/lint typecheck`: VERDICT command-exit 0. - eslint on the three edited lint files: exit 0. - `dispatch-gates.mjs --commands` derived 100 families; all 100 run locally: 97 exit 0; 3 exit 3 PREREQUISITE NOT MET, so NOT MEASURED here and left to CI (`check-plugin-teardown-shape --self-test` needs an unshallow clone; `spec check:skill-examples` and `check:dual-build-cjs-loads` need packages this worktree did not build). None of the three reads a file this PR changes. `--ran` reconciliation: 100 derived, 100 run, 0 UNRUN. Re-run on c2b9cff after the second commit: `check:doc-authoring`, `check:issue-citations`, `check:nul-bytes`, `check:adr-anchors`, `check:cross-package-test-inputs`, `check:undeclared-dep-imports`, `check:type-check-debt`, `check:closed-ceremony-text`, all exit 0. - `test:repo` not run locally (CI's `Test Core`). </details> ## Acceptance notes - **Not fixed here, reported for filing (outside this PR's file surface):** `content/docs/automation/hook-bodies.mdx` (the "exactly one way an action body persists anything" snippet) still teaches `updateById(ctx.recordId, …)` in an action body. The spec contract (`HookObjectApi.updateById` in `packages/spec/src/data/hook-api.ts`, `IScopedObjectRepository.updateById`) declares the member a body cannot call, and `objectstack build` does not refuse `.updateById(` at lowering the way it refuses `.create(`. Whether the sandbox should install the leaf or the body-facing contract should drop it is a decision; it is raised in the report. - The hook ledger's `api-crud-literal` syntax line and example still name `updateById`: they mirror the extractor's graded verbs (`validate-readonly-hook-writes.test.ts` reads the syntax line as that mirror) and are not shown to authors. ## Verification Read first: `packages/lint/src/validate-action-body-writes.ts` (the hint and `ACTION_RECORD_WRITE_REMEDY_METHOD`), then the new test case, then the docs table. Two-minute check: `pnpm --filter @objectstack/lint exec vitest run src/validate-action-body-writes.test.ts` shows all cases passing, and the `prescribes a write the sandbox installs` case among them. --- _Generated by [Claude Code](https://claude.ai/code/session_01ADHkmSwS4mQyXWrddL4r6B)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01ADHkmSwS4mQyXWrddL4r6B <!-- signed: repo:objectstack#3 · os-steve · session_01ADHkmSwS4mQyXWrddL4r6B --> --------- Co-authored-by: Claude <noreply@anthropic.com>
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/mainfirst (probe configs underexamples/app-todo, removed afterwards).data: [{ object, records }]entry and for aseedsaved at the runtime door:os validatepassed a misspelt key and the runtime gate dispatched nothing forseed.defineSeedalready refused it when it ran.seed-record-unknown-fielddefineStackrefuses 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 inprotocol.seed-external-id-refusal.test.ts); a platform-prefixedsys_nothing_hereseed built clean. An action:defineStackrefuses a missingobjectNameon the CLI; the runtimeactiondoor judged nothing. A flowcreate_recordnode topr_nopepassed everywhereobject-reference-unknownladder (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 #34864ctx.api.object(…).update(…)withcapabilities: []passed. The declaration key exists (body.capabilities, enumHookBodyCapability,api.write), so the line was not stoppedaction-body-write-capability-undeclaredpackages/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 withsystemFields: falseis refusedcreated_at, exactly asdefineSeedrefuses it.columnskeys are both judged. A key is reported once per dataset.seeddoor.validate-object-references.ts). New sites:object(CLI only, see below);config.objectNameonget_record/create_record/update_record/delete_recordand object-formscreennodes, nested nodes included;objectName.object-reference-unregistered-platform.actiondoor as well. The suite entry dispatches onaction, but only the member that declares the type runs. It does not run on theseeddoor: Seed: the runtime save door accepts a seed whoseobjectnames no object, and the publish probe then tells the author to "Publish again" #34864's save-door refusal already answers it there, accepting a draft of the object in the same package and leaving the publish promotion and restore doors to the load. A snapshot of served objects cannot reproduce those carve-outs, so a second verdict there would contradict them. Found by the metadata-protocol suite and corrected in e5a226a.validateListViewFieldRefsskips it and no other rule judges aviewwrite's binding #24668): a host that hands over no objects supplied no universe. Under a closure an empty set is still a verdict (A list view bound to an object outside the writing package's dependency closure skips the field-reference check: unknowncolumnsfields are accepted (200 active, draft → publish) where the same body is refused 422list-view-field-unknown#24563). Both directions are pinned.?package=) is judged against that package's closure, as a flow saved there already was. An object another package owns resolves only when the manifest declares that package independencies. Three fixtures (one dogfood, one runtime, one protocol) had an authored package bind another package's object without declaring it, and each now declares the dependency. This is the part of the change most likely to meet a real author; see Acceptance notes.validate-action-body-capabilities.ts). The write set is the sandbox runner'sWRITElist (insert,update,delete,updateMany,deleteMany,upsert). A test pins it againstquickjs-runner.ts.ctx.apidirect,const api = ctx.api(or its destructured form) bound once, and a handleconst repo = ctx.api.object(…).actionandobjectdoors.ScriptCapabilitiesFieldlets the author tickapi.write.os buildlowers a handler throughextract-hook-body.ts, which infers the grant. Measured: a handler whose only write wasupdateManyordeleteManyinferred no grant, so it was lowered into exactly the shape S3 refuses.packages/cli, commit ee0969c), with a two-caseit.eachpin.Commits outside the claim's
packages/lintsurfacefix(cli): the extractor's write regex, named above (packages/cli/src/utils/extract-hook-body.tsplus its test).docs: the rule count 81 → 83 on four pages, and thevalidating-metadata.mdxrows (two new, two extended).chore: the changeset and the upgrade-guide entrypackages/spec/src/migrations/entries/semantic/19.publish-refuses-seeds-and-actions-that-save-and-do-not-work.ts(notice only, no conversion).chore:turbo.jsonandscripts/cross-package-test-inputs.mjsdeclarepackages/runtime/src/sandbox/quickjs-runner.tsas an input of the lint test task, which reads it (check:cross-package-test-inputswent red without it).test: the fixtures named above, inpackages/qa/dogfood,packages/runtimeandpackages/objectql. The objectql orphan-action pin is the one whose FROM this PR changes: the save is now refused 422.packages/metadata-protocolfixtures that save under a package closure, so that they serve the objects their actions and flow nodes bind.origin/main. It touched nothing underpackages/lint.Rework after contract review 7209862537 (head
6361589d)object-reference-unknownis a warning when no closure and no whole collection is stated (the CLI case: a binding to a dependency's object the build cannot see), and an error at the publish door, asflow-trigger-unknown-objectsplits. The changeset, the ADR-0087 entry, the explanation and the docs row no longer claim the step "fails the run on every execution" unconditionally.os buildextractor infersapi.writethrough a bound handle,?.before the leaf, and an.object(...)argument holding a call; pinned shape by shape; the rule header names the shapes.seed-record-unknown-fieldadmitsid/created_at/updated_at(the engine's provisioned columns, pinned to the objectql source) and gives the engine's door as the reason.os explainentries for both new ids;@objectstack/lintnow exports the two rule-id constants (and only those) so the explanation table can carry them.updateByIdadvice, ADR-0141 D1 binding list). Skills follow-up: skills: objectstack-ui actions rule teaches the api.write grant as prose; the trap is now refused at validate and publish (after #37807) #37814.Tests
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 invalidate-object-references.test.ts. Each rule has a positive and a negative pin through the registry and at the runtime door.runtime-gate.inert-type-writes.test.ts: anactionwrite now reaches onlyvalidateObjectReferencesfrom the suite; ahookwrite 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.git checkout HEAD:api.writeskip): 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 oneobject-reference-unknown.@objectstack/cli: the extractor test plusmigrate-meta-engine-guidance63/63; theunittier 446/446 files, 6395/6395 tests. Theintegrationtier is left to CI.@objectstack/objectql: whole package 6 failed before the fixtures (allobject-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/mcp1589/1589,@objectstack/plugin-approvals1966/1966,@objectstack/example-showcase554/554.lint,objectql,runtime,metadata-protocol,dogfood,cli. The test layers compile undertsconfig.test.json. It caught a stray gate-input key in three new lint tests, fixed in 72b7cec.Dogfood battery (the PR narrows)
VERDICT command-exit 0, Test Files 490 passed + 3 skipped (493), Tests 4144 passed + 68 skipped (4212).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)
node scripts/check-plugin-teardown-shape.mjs --self-testexits 3 because its positive control is pinned to a commit this shallow clone cannot reach. It is a checker-health self-test.--ranreconciliation: 141 accounted for, 0 unrun.check:cross-package-test-inputswas red at 4ba19b7 and is green at head (0a916bb).check-nul-bytesOK.check-platform-checklist --changed-from origin/mainOK (4 anchors judged, 0 lost).Acceptance notes
os validateandos buildonapp-crm,app-multi-package,app-starter,app-todoandapp-showcaseall exit 0 with "Running author-time rules (83)" and no new finding.api.write; its 45 flows bind only declared or platform-provided objects; its seeds usedefineSeed.create-objectstacktemplate is not affected.flow-trigger-unknown-objectstays a warning. The divergence is noted here, not changed.actionwrite is now also judged for its params'reference/objectOverrideobjects, asos validatealready judged them. The changeset says so.body.capabilitieson a hook has the same gap);ctx.api.transactionwithoutapi.transaction;updateByIdis not installed by the sandbox, yet lint'sAPI_WRITE_METHODSgrades it, and theaction-record-write-discardedhint recommendsctx.api.object(…).updateById(…). Reported for the seat to measure; not touched here.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.tsExpect
Test Files 3 passed (3)andTests 114 passed (114).Read first, by risk:
packages/lint/src/validate-action-body-capabilities.ts: the masked regex scanner. A false positive here refuses a publish. The hunk to read isbodyApiWriteCallsand its alias /boundOncehandling.packages/lint/src/authoring-rules.tswithreference-integrity-suite.ts: the suite entry now dispatches onseedandaction. The hunk to read is theruntimeTypeswidening and the member filter it relies on.packages/lint/src/validate-object-references.ts: the new binding block. The hunk to read is theextendedexemption and the flow-node type list.🤖 Generated with Claude Code
https://claude.ai/code/session_01Q4EjjQkY5yXZrN9BEA3rEK