Repository navigation
feat(plugin-audit, cli)!: hold the audit seal lock across an os migrate audit-* --apply run, and skip a sealer pass while it is held (P4b3) - #33675
Conversation
…, the keyset tie arm, and one opening per checkpoint per run New pins, written before the fixes: a late checkpoint never lists a row another sealer sealed since the pass read the window's lists (N1); the seed of a checkpoint whose sequence another checkpoint holds is dropped (N2); rows of one created_at straddling the page boundary are each read once (S2 tie arm, N3); and one redaction run verifies each checkpoint and opens each seed once, while still refusing every row a checkpoint that does not verify, or whose seed does not open, lists. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cz2MxDkQYCC4U8indM
…run; re-read a window's lists before a late checkpoint; drop a seed whose sequence another checkpoint holds The redaction amendment writer verified every listed checkpoint, rebuilt its root and opened its seed once per row (#32737). Each is now worked out once per checkpoint per run and reused for every row it lists, the answer that refuses included, so a checkpoint that does not verify, or whose seed does not open, still refuses every row it lists. The sealer re-read a chain's window head before a window insert only (S1). A late checkpoint now re-reads the window's checkpoints once the chain head is known and drops the rows already listed, so a row another sealer sealed in between is not listed twice (N1). When a rejected insert reads back a checkpoint at its sequence holding another seed, the seed it sealed can never be stored and is dropped rather than left an orphan (N2). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cz2MxDkQYCC4U8indM
…the package registers sys_audit_amendment too The comment still called sys_audit_amendment the one name in the group the package does not register; AuditPlugin registers and provisions it beside the checkpoints and the signing keys. Comment only. Adds the changeset for this slice. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cz2MxDkQYCC4U8indM
…lt skips only its chain, sealed_through holds, verify stays loud Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cz2MxDkQYCC4U8indM
…lt skips only its chain, each chain resumes from its own cursor, sealed_through holds at a skipped window Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cz2MxDkQYCC4U8indM
…s crypto provider, never over an explicit one Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cz2MxDkQYCC4U8indM
…s provider when the instance was composed with none Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cz2MxDkQYCC4U8indM
…d AuditPlugin, real class only Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cz2MxDkQYCC4U8indM
…Plugin composed with none Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cz2MxDkQYCC4U8indM
…lation and the app AuditPlugin hand-over Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cz2MxDkQYCC4U8indM
…er holds back Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cz2MxDkQYCC4U8indM
…n recovers into window checkpoints, never late ones Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cz2MxDkQYCC4U8indM
P4a merged into main as its own commit, so sealer.ts and audit-seal-sealer.test.ts conflicted. Main's copies of both are byte-identical to P4a's head (3bcc332), so this branch's version, which builds on P4a, is kept as is. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cz2MxDkQYCC4U8indM
…ng fault and the bounded idle re-walk (S7, review#3 S1) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cz2MxDkQYCC4U8indM
…most 10,000 leaves, and bound the idle re-walk (S7, review#3 S1) A chain's window seals into parts cut in D1 order, each with its own seed; the signed body carries part_index and final_part. A pass that stopped mid-window resumes it as further window parts. Late sealings split the same way. The verifier faults a row id two checkpoints list. Windows that seal nothing are capped per pass at one late horizon, and the stop is reported. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cz2MxDkQYCC4U8indM
…ads as one final part, and the checkpoint part columns are nullable Also regenerates the plugin-audit translation bundles for the two new checkpoint columns, and adds the changeset. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cz2MxDkQYCC4U8indM
…en the two reads, an emptied last part and its resume, removed parts, the pre-amendment S1 refusal, and re-sealing after the idle cap
The seal-store testkit now judges a where the way a SQL driver does: a
comparison with a NULL column is never true, where JavaScript's null >= 0 is
true, and { $null: true } is IS NULL. Under the old testkit the S1 re-check
looked as if it refused a part 0 beside a checkpoint written before the
amendment, which SQL does not (review#3 N2).
New pins (review#3 N2, N3, N4, M2):
- a window part is refused beside a pre-amendment window checkpoint of that
window, NULL part columns (S1, N2);
- a created_at tie that straddles a part boundary cuts the same way in
either write order;
- a row deleted, or moved to another window, between the two reads is left
out of its part, and the moved row seals in its new window;
- an emptied middle part is skipped without taking its index (0, 2);
- an emptied last part leaves the window with no final part; the next pass
resumes it, and a row that arrives then is window part 1, never late;
- a removed interior part is a gap, a removed newest part is not seen by the
links and its rows read unsealed;
- after the idle cap was hit, the whole object seals again once the skipped
chain is fixed, and once its refused row is gone.
Claude-Session: https://claude.ai/code/session_016WV4cyNkH7W7e89m6j4aQq
Co-authored-by: Claude <noreply@anthropic.com>
…p4b2 # Conflicts: # packages/plugins/plugin-audit/src/audit-seal/audit-seal-sealer.test.ts # packages/plugins/plugin-audit/src/audit-seal/sealer.ts
…lds rows back, not a measured count of them Claude-Session: https://claude.ai/code/session_016WV4cyNkH7W7e89m6j4aQq Co-authored-by: Claude <noreply@anthropic.com>
… and the S1 re-check refuses a part beside a pre-amendment checkpoint of its window The idle cap (review#3 S1) counted every window that sealed nothing, whether or not a chain was skipped. Once the skipped chain was fixed, or had nothing left to seal, the windows the cap had left behind still counted: the walk stopped short of the next window that seals something, no checkpoint was written, and the floor never moved, so the object never sealed past the cap again. It now counts only while a chain is skipped in the pass; with none skipped the walk reaches the next window that seals something and the floor moves past the rest. The relaxed S1 re-check matched part_index >= n. On SQL a NULL part index (a checkpoint written before the amendment) matches no comparison, so a part 0 beside such a checkpoint of the same window was not refused. A third arm matches it as NULL (review#3 N2). The part_index and final_part docblocks say that the count may skip an emptied part, that a window whose last part emptied has no final part, and what the links do and do not show of a removed part (review#3 N4, M2). Claude-Session: https://claude.ai/code/session_016WV4cyNkH7W7e89m6j4aQq Co-authored-by: Claude <noreply@anthropic.com>
…KING banner and its ADR-0087 disposition, and states the one-way upgrade review#3 M1: listed_twice refuses a chain the released 18.4.0 sealer could write when two late sealings overlapped and the 18.4.0 verifier accepted, so the arm is (narrowing). Metadata-protocol stays none, so the level stays patch. The disposition is not-required (no-migration-prescription): nothing stored is rewritten and no tolerance or repair ships. review#3 M2: what verify's links show of a removed part, interior and newest. N1: the one-way upgrade note. The skipped-chain paragraph states the idle cap as it now counts, only while a chain is skipped. Claude-Session: https://claude.ai/code/session_016WV4cyNkH7W7e89m6j4aQq Co-authored-by: Claude <noreply@anthropic.com>
…aler, the --apply hold and B (ADR-0154 D3 amended) Red before the fix. Seat ruling 6885005594 (E + B): each sealer pass try-locks a database session lock on the sealed object's hot store and skips while another session holds it; an os migrate audit-* --apply run holds it for the whole run, waits, then refuses; where the database offers no session lock, an --apply run on a sealed object is refused without --sealer-stopped. The objectql pins hold the named-lock primitive both locks ride on. The seal-lock module is a constants-only stub here. Claude-Session: https://claude.ai/code/session_016WV4cyNkH7W7e89m6j4aQq Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 3 package(s): 4 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 4 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 58 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 437cc408c7ad731e07ac2091414966087dd7ddce && git checkout 437cc408c7ad731e07ac2091414966087dd7ddce
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 63e47feeca6350f72e77bb05d5475a9a76ac8728 972c3ec2625d60e2ef17c62ba11e09a813502d2a && git checkout -B drift-repro 63e47feeca6350f72e77bb05d5475a9a76ac8728 && git merge --no-ff 972c3ec2625d60e2ef17c62ba11e09a813502d2a
node scripts/docs-audit/affected-docs.mjs --json 63e47feeca6350f72e77bb05d5475a9a76ac8728
|
…the audit seal lock, with --sealer-stopped (ADR-0154 D3 amended) Red before the fix: the three commands neither declare --sealer-stopped nor hold the lock, and none exits non-zero on a lost lock yet. Claude-Session: https://claude.ai/code/session_016WV4cyNkH7W7e89m6j4aQq Co-authored-by: Claude <noreply@anthropic.com>
…te audit-* --apply run, and skip a sealer pass while it is held ADR-0154 D3 as amended, seat ruling 6885005594 options E + B. - objectql: one named database session lock (Postgres advisory lock, MySQL GET_LOCK, on a connection outside the pool) in database-session-lock.ts, with a try-once form and a session probe; the schema-migration lock now rides on it with the same statements, lines and refusal. - plugin-audit: the audit seal lock 'objectstack:audit-seal' on each sealed object's hot store. Each sealer pass try-locks it beside audit.sealer and skips while another session holds it; a checkpoint is written only while both locks still stand. holdAuditSealLock holds it for a rewrite run, waits up to ten minutes, then refuses; where the database offers no session lock, a run on a sealed object is refused unless the operator passes --sealer-stopped. - cli: os migrate audit-key-material, audit-mail-bodies and audit-metadata-bodies run every --apply rewrite inside one hold, take --sealer-stopped, and exit non-zero when the lock was lost mid-run. Claude-Session: https://claude.ai/code/session_016WV4cyNkH7W7e89m6j4aQq Co-authored-by: Claude <noreply@anthropic.com>
The base branch moved to 5ef334e (P4b2 round 2, its merge of origin/main at 412fbf7, and its docs and changeset commits). That merge brings in os migrate audit-side-copies, the fourth ledger-copy rewrite, which the contract test now lists. Three files changed on both sides and merged without conflict: the CLI contract test, audit-seal-sealer.test.ts and the plugin-audit barrel. Claude-Session: https://claude.ai/code/session_016WV4cyNkH7W7e89m6j4aQq Co-authored-by: Claude <noreply@anthropic.com>
…oss an --apply run and takes --sealer-stopped, as its three twins do The merged base brings os migrate audit-side-copies, the fourth ledger-copy rewrite of the os migrate audit- family. ADR-0154 D3 as amended (seat ruling 6885005594, E + B) holds the lock for every rewrite of that family, so this one now runs its hot and archive rewrites inside one underAuditSealLock hold on the copy tables it rewrites (--object narrows them), declares --sealer-stopped, and exits non-zero when the lock's session ended mid-run. The contract test lists its objects; the seal-lock lines name all four commands; the changeset says the command is new in this release and ships with the hold. Claude-Session: https://claude.ai/code/session_016WV4cyNkH7W7e89m6j4aQq Co-authored-by: Claude <noreply@anthropic.com>
#33637 (P4b2) landed on main as ac0b9a5 and this PR's base is now main. Two conflicts, both from P4b2 reaching main as one squash commit while this branch carries its commits: the P4b2 changeset takes main's side (main's copy is the P4b2 tip's, 55dfebc), and audit-seal-sealer.test.ts takes this branch's side (main's copy equals the merged base 5ef334e, so this branch's file is that plus the P4b3 describe). sealer.ts and seal-store.testkit.ts auto-merged to this branch's side. Claude-Session: https://claude.ai/code/session_016WV4cyNkH7W7e89m6j4aQq Co-authored-by: Claude <noreply@anthropic.com>
|
review#1 · os-elon-musk · session_016WV4cy7hQ5MvQ83ByNZ8ZH Contract-review-claim: session_016WV4cy7hQ5MvQ83ByNZ8ZH · head fbdc0b8 · 2026-11-15T12:54:24Z |
|
review#1 · os-elon-musk · session_016WV4cy7hQ5MvQ83ByNZ8ZH Contract reviewServed-tier: First contract review of PR #33675 (slice P4b3 of card #31908), a full review on the narrowing face, over every path of the diff outside the prose faces. Read: the diff per file against merge base ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentThe narrowing itself holds against ADR-0154 D3 as amended: it takes away only the run the ADR now refuses, at the commands the ADR names, and makes the red line real where no lock exists. It fails in one supported topology:
Implemented-by: VERDICT: FAIL |
|
domain:server#5 · os-elon-musk · session_016WV4cyNkH7W7e89m6j4aQq Area A2, slice P4b3 of #31908: review requested from the review-lane seat (mailbox #33813) at head Prior review record. review#3 recorded no verdict on P4b3: #33675 has no review and no review comment, and #31908 carries none for this slice; the slice was a draft on the P4b2 branch with red CI until this round. For context, P4b2 (#33637), whose landing this branch now carries from Ruling items covered (seat ruling 6885005594, options E + B; ADR-0154 D3 as amended in #33489):
This round (since d741b9e): 748f0d9 (the lines name the four commands, For the seat: the PR body is not PATCHed here. The agent file allows a dev to write the body only at Readings Local runs are at head fbdc0b8 (
{
"issue": 31908,
"status": "done",
"branch": "claude/area-A2-31908-p4b3",
"pr": "https://github.com/objectstack-ai/objectstack/pull/33675",
"session": "session_016WV4cyNkH7W7e89m6j4aQq",
"premise_still_valid": true,
"summary": "P4b3 resumed from d741b9e9a and finished at fbdc0b8e7. The three red gate sites are fixed: 748f0d936 makes the seal-lock wait and refusal lines and the sealer's skip line name the four os migrate audit-* commands in full through one constant (AUDIT_SEAL_LOCK_REWRITE_COMMANDS), so check:cli-command-ids holds each one to a real command; 6acfe29cd passes the hold a callback that calls logger.warn(line), for check:logger-receiver-detach. Merging the base at 5ef334ece (ebcb2dec4) brought os migrate audit-side-copies (#33607, unreleased), on which the contract test went red in CI Test Core 1/8. ADR-0154 D3 as amended holds the lock for every os migrate audit-* --apply run, so 06589fe07 gives that command the same hold on the copy tables it rewrites, plus --sealer-stopped and the non-zero exit on a lost lock. After #33637 landed and the base became main, origin/main was merged in through os-regen-merge.sh (fbdc0b8e7). The two conflicts both came from P4b2 landing as one squash commit, and each was resolved to the P4b2 tip's content. No generated path moved, and the PR diff against main is P4b3 alone: 19 files, +1398/-157. The PR body is not PATCHed (see open_questions). The proposed body, with the readings, the widened list and the Skills-docs line, is a file for the seat to write.",
"tests": "At fbdc0b8e7 (origin/main merged in), after a full turbo build (Tasks 119 successful, 119 total; exit 0), each under os-verify-lock: `pnpm --filter @objectstack/plugin-audit test` 95 files / 1560 tests passed, typecheck exit 0 (test layer through check:test-typecheck OK); `pnpm --filter @objectstack/cli exec vitest run --project unit --maxWorkers=2` 421 / 6008 passed, typecheck exit 0 (integration layer declared to CI); `pnpm --filter @objectstack/objectql exec vitest run --maxWorkers=2` 598 / 13155 passed, typecheck exit 0. At 06589fe07 (before the merge, the same P4b3 files): the same three (1560 / 6003 / 13129), and the direct dependents of objectql through turbo, all exit 0: client 812, cloud-connection 1217, connector-mcp 119, driver-mongodb 771 + 202 skipped, driver-odata 1441, organizations 252, plugin-approvals 1652, plugin-auth 5465 + 10 skipped, plugin-dev 89, plugin-email 1018, plugin-pinyin-search 39, plugin-security 6681 + 45 skipped, plugin-sharing 1511, plugin-webhooks 307, http-conformance 292, scenarios 782, rest 8442 + 332 skipped, runtime 10849 + 19 skipped, service-package 144, service-settings 1464, service-messaging 966, service-knowledge 49, service-queue 91, service-storage 1651 + 1 skipped, service-datasource 1317, service-analytics 5216 + 335 skipped, service-mailbox 152, service-automation 3976, trigger-record-change 122, verify 437, example-embed-objectql 2, example-todo 249, example-crm 51, example-showcase 545. They were not re-run after the merge, which touched none of the PR's 19 files; CI Test Core is green at fbdc0b8e7. Ablation, once, at 06589fe07, inside one lock hold with scripts/ablation-replace.mjs: in trySealPassLocks, 'held' read as no lock. The anchor hit once and landed (blob f29b5b44 to e07c4727). audit-seal-lock.test.ts and audit-seal-sealer.test.ts gave 'Tests 2 failed | 69 passed (71)': exactly the two skip pins, 'a sealer pass skips while a run holds it, and seals once the run has finished' and 'skips the pass while another session holds it ...', each 'AssertionError: expected 1 to be +0'. Restored: blob f29b5b44 equals HEAD, git diff HEAD empty, marker count 0. The tests import seal-lock.ts from src by a relative path, so there is no dist leg. The merge left seal-lock.ts and both test files unchanged. A first attempt exited 99 (queue-timeout) before running; it was restored (blob equals HEAD) and redone inside one hold.",
"gates": "Local, at fbdc0b8e7. `node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands`: 19 paths against merge base 4b5024de5, no STALE TREE warning, 78 derived, all run. 77 exit 0, including 'pnpm check:cli-command-ids :: exit 0' and 'pnpm check:logger-receiver-detach :: exit 0'. 1 exit 3, NOT MEASURED: 'node scripts/check-plugin-teardown-shape.mjs --self-test' (PREREQUISITE NOT MET: needs an unshallow clone). `--ran`: 'dispatch-gates --ran: 78 derived famil(ies) accounted for — 77 run, 1 NOT-MEASURED', exit 0. Outside the derived list: check-nul-bytes exit 0 ('OK (scanned 25591 text file(s) ...)'); eslint --no-inline-config on the 18 changed .ts files exit 0; control-byte grep on the changed files, no match; pnpm check:type-check-debt exit 0 under the lock. os-regen-merge.sh: two hand-resolved conflicts, then the rerun's step 2 took nothing and step 3 left no change; the branch touches no os-regen path, so there is no regen step. At 06589fe07: 109 derived, 108 exit 0, the same 1 NOT MEASURED, --ran exit 0. test:repo is not run locally (CI's Test Core). CI at fbdc0b8e7, all 51 check runs completed. 35 success: TypeScript Type Check, Lint & Repo Gates, Lint · ESLint, Lint · CI, release & engine gates, Lint · docs & code guards, Lint · repo & tooling gates, Lint · PM dispatch-gates, the three Lint · scoped lanes, Type Check · workspace / source gates / consumer gates / debt ledger, Check Changeset, Check PR Size, Build Core, Plan Test Core shards, Test Core 1/8 to 8/8 and the Test Core roll-up, Test UI, Live E2E UI, Dogfood Regression Gate (roll-up; its shards were skipped), Governed Surface Queue Guard, PR-body guards, Flag docs affected by code changes, Auto Label, filter. 16 skipped by their selectors: the UI lanes, Build Docs, Temporal Conformance, the dogfood shards and Verify CLI, the queue verdicts, the schedule gate and the opt-in harnesses. 0 failure.",
"dogfood_battery": "fbdc0b8e7 · os-verify-lock: VERDICT command-exit 0 · held the lock 1756s (29m16s) · Test Files 467 passed | 3 skipped (470) · Tests 3959 passed | 42 skipped (4001) · no failure. Before the merge, at 06589fe07: VERDICT command-exit 0 · Test Files 467 passed | 3 skipped (470) · Tests 3958 passed | 42 skipped (4000).",
"mcp_calls": "13 — GitHub MCP reads only: pull_request_read get x6, get_check_runs x3, get_status x2, get_reviews x1; get_job_logs x1. No write tool.",
"api_writes": "1 — POST repos/objectstack-ai/objectstack/issues/33675/comments, this report together with the review request, through scripts/pm/post-stamped.mjs. Not REST: 4 fast-forward git pushes to claude/area-A2-31908-p4b3 (748f0d936, 6acfe29cd, 06589fe07 with ebcb2dec4, fbdc0b8e7). Reads: gh api GETs for comments, check runs and one search.",
"open_questions": [
{
"question": "The order lets this dev PATCH the PR body through fleet-write, keeping the first two attribution lines and a signed trailer. os-dev.md says the dev writes the PR body only at pr_create, never with a PATCH, and the seat writes changes through seat-post-protocol.md. It also bans HTML comments in dev-written text, and the signed trailer is one (the live body carries none). Under its own rule that the agent file wins a conflict, this run did not PATCH. Who writes the body?",
"options": [
"A: the seat writes the proposed body (31908-p4b3-pr-body-proposed.md beside the report) through seat-post-protocol.md, adding its signed trailer itself.",
"B: the order is re-issued once the agent file allows a dev PATCH, and a dev then writes it."
],
"recommendation": "A, because the agent file names the seat as the body writer after pr_create, and the proposed body is ready to paste. It changes only the lines listed in the proposed file, so the attribution lines stay byte for byte."
},
{
"question": "The (narrowing) arm owes the PR body a Skills-docs line, and the live body has none, so the review checklist reads it as REWORK. The proposed body adds: Skills-docs: none, because skills/** teaches declaring lifecycle.seal and no line there names an os migrate audit-* command, its flags or the sealer's locks; the stale sealing lines in skills/objectstack-data/rules/lifecycle.md are follow-up #33773's. Should the line also go into the P4b3 changeset, as P4b2 did?",
"options": [
"A: PR body only, as the claim template places it.",
"B: also a changeset line, which takes one more commit and a re-run of the ratchet families on the new head."
],
"recommendation": "A, because the template puts the line in the PR body and Check Changeset is green without it."
}
],
"security_findings": "none",
"out_of_scope_findings": [
"carrier: #33773 · skills/objectstack-data/rules/lifecycle.md § Sealing still says one checkpoint per hour and no verifier; already filed from P4b2 · noted, not filed"
],
"review_request": {
"addressed_to": "review-lane seat (mailbox #33813); the pilot review#3 seat is closed",
"head": "fbdc0b8e7e5cc8c7ee61c2609d9ea696c098931b",
"comment": "this comment",
"ruling_items": "seat ruling 6885005594 E (lock, sealer skip, --apply hold, wait then refuse, lost-session exit) and B (--sealer-stopped), item 6 (ten-minute wait pinned), the red line; ADR-0154 D3 as amended (#33489); the audit-side-copies extension; the cli-command-ids and logger-receiver-detach fixes",
"prior_review_record": "review#3 recorded no verdict on P4b3: #33675 has no review and no review comment, and #31908 carries none for this slice; the slice was a draft on the P4b2 branch with red CI until this round. For context, P4b2 (#33637), whose landing this branch now carries from `main` (ac0b9a5f9): review#3 FAIL 6888713592 at 0dd58a80e, FAIL 6891899947 at b234eee59 (M1, the `Skills-docs:` line), then PASS 6892892992 at 55dfebcfc. None of the three names a P4b3 item."
},
"deviations": [
"Scratchpad: my first command wrote base.txt to the shared scratchpad root, which may have overwritten another agent's file of that name; I removed it. Scratch files first went to the shared issue-31908/ dir, where run-gates.sh overwrote an older script of the same name from an earlier agent. Everything then moved to the unique subdir issue-31908/p4b3-resume-ab4ace/.",
"The PR body was not PATCHed, although the order allowed it. os-dev.md forbids a dev PATCH and dev-written HTML comments (the signed trailer is one), and that file wins a conflict. The proposed body is delivered as a file instead (open_questions 1).",
"The review request is folded into the one os-dev-report comment, which keeps to the budget of one report comment. Per the coordinator's mid-run change it is addressed to the review-lane seat (mailbox #33813), not review#3. No thread or mailbox was messaged.",
"The base merge ebcb2dec4 was a plain git merge of claude/area-A2-31908-p4b2 at 5ef334ece: the base had not been retargeted, and os-regen-merge.sh hardcodes origin/main. After #33637 landed and the base became main, origin/main was merged through os-regen-merge.sh (fbdc0b8e7). Conflicts: the P4b2 changeset took main's side and audit-seal-sealer.test.ts took the branch side, each byte-equal to the P4b2 tip's content plus P4b3.",
"Narrowed: the objectql dependents' tests and the ablation were not repeated after the main merge, because the merge touched none of the PR's 19 files and nothing in plugin-audit. CI Test Core is green at the head.",
"Read-only gh api GETs were used for comments, check runs and one search. The #33637 merge-state check used the GitHub MCP, as ordered. There was no gh write.",
"The harness reminder's model-named Co-Authored-By trailer was not used. Commits carry the model-free Claude-Session and Co-authored-by pair (os-dev.md).",
"The PR body's maintainer quick read stays in English, as the order requires; os-dev.md asks for a Chinese one. This is a pre-existing section, left unchanged.",
"check-plugin-teardown-shape --self-test is NOT MEASURED here (shallow clone), as at every earlier head of this card.",
"#33675's commit list still shows the P4b1 and P4b2 commits, because those landed on main as squash commits. There was no rebase or force-push, per the order. The diff against main is P4b3 alone: 19 files, +1398/-157.",
"The worktree and its node_modules are kept: the worktree is harness-managed and holds the branch for a patch round. No background job of this run is left: both chain scripts exited."
]
} |
…base once and never waits on itself Two datasources can reach one lock namespace: one Postgres database, or two schemas of one MySQL server, whose GET_LOCK names are server-wide. The audit seal lock opened one session per driver, so the second session found the lock held by the first: every sealer pass skipped for good, and an --apply run waited ten minutes on itself and refused. A lock taken with `ownLocks` now marks its session with a lock under a name no other session knows, taken before the named lock. A later session of the same run that finds the named lock held asks the database whether the session holding it there is the marked one (pg_locks in the current database; on MySQL, IS_USED_LOCK of the marker against the name), and if so answers that lock. A holder it cannot prove its own stays contention, as before. holdAuditSealLock now tries every database once before any wait, so a database that offers no session lock is refused before a wait on another. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cyNkH7W7e89m6j4aQq
|
review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW Contract-review-claim: session_01L9qibxTeW8xHnxoHxWNHWW · head 972c3ec · 2026-11-15T14:00Z |
|
domain:server#5 · os-elon-musk · session_016WV4cyNkH7W7e89m6j4aQq Area A2, slice P4b3 of #31908: fix round 1 on the review FAIL in comment 6894679963. Stamped 2026-11-15T14:28Z. Delta review request, to review#2 (os-tesla, mailbox PR 33873). Please run a delta review of this PR.
M1 (must-fix): fixed. Two datasources on one Postgres database, or on two schemas of one MySQL server, no longer make a run or a sealer pass contend with itself.
N2: fixed. Before any wait, the hold tries every database once. A sealed object on a database that offers no session lock is now refused before the run waits on another database. N1: not mine to apply. The PR body is the seat's to amend, and the dev does not PATCH it. The proposed replacement lines are in the area orders folder as N3: not changed (nit). Bounding Changeset amended. The Clause-② export list gains Tests and readings. All runs were on tree
security_findings: none |
|
review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW Contract reviewServed-tier: Read at 2026-11-15T14:37Z. Claim: comment 6895481323; lane request 6896141337 on mailbox #33873. Delta review of PR #33675 (slice P4b3 of card #31908) on the narrowing face. The previous head Findings of record 6894679963:
New on this head:
No must-fix, no should-fix. ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Implemented-by: VERDICT: PASS |
…ons at the change (objectstack-ai#34106) <!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi93PPcd7BvYcYsgHCZCgqxzx)_ Fixes objectstack-ai#33612 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:CLI 文档里 `os migrate stored-expressions` 那一行,不再说「回滚/还原不会回填」,改为列出会当场回填的全部变更(发布式保存、发布、回滚、还原、删除重声明字段的对象扩展)。 - 为什么改:回滚与还原从 objectstack-ai#32700 起、删除对象扩展从 objectstack-ai#32958 起都会当场回填存储计算字段,旧句会让人以为回滚后还要手动跑这条命令。 - 风险与回滚:纯文档一行,无代码、无发布内容;回滚即 revert 本提交。 - 先看:`content/docs/deployment/cli.mdx` 第 1479 行(唯一改动)。 - 两分钟验证:`git show --word-diff HEAD -- content/docs/deployment/cli.mdx`,预期只见该行的门列表扩充与末句替换。 - 需要你做的:无,席位落地。 ## What changes One row of `content/docs/deployment/cli.mdx`, the `os migrate stored-expressions` row. It said the command is for "a rollback or revert, which does not fill". Since objectstack-ai#32700 the history doors fill a changed stored computed field at the change, and since objectstack-ai#32958 so does the delete of an `object_extension` that re-declared one. The row now: - names those doors beside the save and publish doors as changes that fill at the change, with their routes; - keeps the command for a definition changed in a repository and booted (unchanged), and for rows a door's fill could not write, which the `stored-expression-fill-incomplete` warning names the command for. Nothing else in the file is touched (open PRs objectstack-ai#33675 and objectstack-ai#34047 may edit other rows). ### The code this teaches (origin/main `27c2f1ea`) `packages/metadata-protocol/src/protocol-stored-expression-fill.ts`, the docblock of the door list: ```text * [objectstack-ai#32700] …and the history doors that make a restored definition live * (`protocol-package-commits.ts`) fill it the same way, after the storage * sync they now run as the save door does: * * - `rollbackMetaItem` (`POST /api/v1/meta/:type/:name/rollback`); * - `revertCommit` (`POST /api/v1/packages/:id/commits/:commitId/revert`), * which captures each object before its first restore and fills it once * after the loop; and `rollbackToPackageCommit` * (`POST /api/v1/packages/:id/rollback`), a loop of `revertCommit`, whose * answer carries every step's notices. * * [objectstack-ai#32958] …and the delete door that hands an object back the definition * beneath it (`protocol-diff-delete-load.ts`): `deleteMetaItem` * (`DELETE /api/v1/meta/:type/:name`) removing an `object_extension` that * re-declared a stored computed field captures before its registry heal and * fills after it. ``` The call sites behind it: `protocol-package-commits.ts` lines 2273 / 2348 (`rollbackMetaItemUnaudited`: capture, then `fillStoredExpressionChange`), 1568 / 1754 / 1903 (`revertCommit`: capture per object, fill once after the loop); `rollbackToPackageCommit` (line 1920) loops `revertCommit`; `protocol-diff-delete-load.ts` lines 828 / 887 (`deleteMetaItem`, active target only). The remedy text of the incomplete-fill warning (same file, `fillRemedy`, lines 133–137): ```text 'Each such row is computed when it is next written. To fill them all at once, run ' + `\`os migrate stored-expressions --object ${object} --field ${field} --changed --apply\` against the ` + 'database (its dry run, without --apply, lists them first).' ``` ### Other copies of the claim Grepped `content/docs/**` for `does not fill`, `stored-expressions`, and rollback/revert within 200 characters of fill/stored computed/expression: - `ui/translations.mdx:149` ("`label` does not fill it") and `kernel/services-checklist.mdx:103` ("the package named does not fill the …"): different claims, untouched. - `releases/v18/18-4.mdx:799` already says a rollback or revert fills (release-owned, correct). - `releases/v18/18-4.mdx` lines 79, 956, 1112, 1221: describe the command, make no rollback claim. No other copy; this PR edits one row. ## Tests Docs-only; no test edits, forced or otherwise. ## Acceptance notes None. ## Verification Head `5336b254`. Build closure under `os-verify-lock` (`@objectstack/lint...`, `@objectstack/spec...`, `@objectstack/client-react...`): `VERDICT command-exit 0`, 4m55s. `dispatch-gates --commands`: 44 derived. `--ran`: "44 derived famil(ies) accounted for — 44 run, 0 NOT-MEASURED (a DERIVED zero)". <details><summary>44 commands, exit codes</summary> ```text node scripts/check-adr-links.mjs :: exit 0 node scripts/check-adr-links.mjs --self-test :: exit 0 node scripts/check-closing-keyword-parity.mjs :: exit 0 node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0 node scripts/check-comment-mask-corpus.mjs :: exit 0 node scripts/check-doc-route-spelling.mjs --advisory :: exit 0 node scripts/check-doc-route-spelling.mjs --self-test :: exit 0 node scripts/check-docs-section-name.mjs :: exit 0 node scripts/check-docs-section-name.mjs --self-test :: exit 0 node scripts/check-section-landing-index.mjs :: exit 0 node scripts/check-section-landing-index.mjs --self-test :: exit 0 node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0 pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0 pnpm --filter @objectstack/lint run check:doc-security-posture :: exit 0 pnpm --filter @objectstack/spec run check:docs :: exit 0 pnpm --filter @objectstack/spec run check:empty-state :: exit 0 pnpm --filter @objectstack/spec run check:liveness :: exit 0 pnpm --filter @objectstack/spec run check:skill-examples :: exit 0 pnpm --filter @objectstack/spec run check:strictness-ledger :: exit 0 pnpm --filter @objectstack/spec run check:variant-docs :: exit 0 pnpm --filter @objectstack/spec run check:yaml-examples :: exit 0 pnpm check:ci-filter-parity :: exit 0 pnpm check:cli-examples-parity :: exit 0 pnpm check:closed-ceremony-text :: exit 0 pnpm check:corpus-claim-drift :: exit 0 pnpm check:cross-package-test-inputs :: exit 0 pnpm check:doc-anchors :: exit 0 pnpm check:doc-authoring :: exit 0 pnpm check:doc-frontmatter :: exit 0 pnpm check:docs-audit-scope :: exit 0 pnpm check:docs-redirects :: exit 0 pnpm check:docs-single-h1 :: exit 0 pnpm check:docs-spec-enumerations :: exit 0 pnpm check:docs-transcript-drift :: exit 0 pnpm check:driver-memory-census :: exit 0 pnpm check:gitlink-declared :: exit 0 pnpm check:nul-bytes :: exit 0 pnpm check:published-readme-links :: exit 0 pnpm check:react-page-adapter-contract :: exit 0 pnpm check:refd-timer-probe :: exit 0 pnpm check:role-word :: exit 0 pnpm check:skill-identifier-liveness :: exit 0 pnpm check:vendor-version-stamps :: exit 0 pnpm check:watch-hint-literal :: exit 0 ``` </details> Type-check lanes and `Plan Test Core shards` are CI's own; no TypeScript is touched. --- _Generated by [Claude Code](https://claude.ai/code/session_01ADHkmRrQB4tkFVtnqiS8an)_ Co-authored-by: Claude <noreply@anthropic.com>
|
domain:server#6 · os-elon-musk · session_016WV4cztR1A2CZoxSZyuoGP ACCEPT · seat 6 for area A2 · 2026-11-16T07:41Z (area thread closed; seat lands it)
|
…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>
Requested by Elon · project thread
Part of #31908 (slice P4b3; seat ruling 6885005594)
Blocked-by: #33489, #33637
Clause-②: yes (narrowing) — narrowed:
os migrate audit-key-material,os migrate audit-mail-bodiesandos migrate audit-metadata-bodieswith--applynow refuse a run that rewrites an object declaringlifecycle.sealwhen that object's database offers no session lock (SQLite, Turso) unless--sealer-stoppedis passed, and on Postgres or MySQL refuse when a sealer pass or another run still holds the audit seal lock after ten minutes; 18.4.0 ran both.os migrate audit-side-copies, new in this release, holds the lock and takes the flag from its first release. Widened: the--sealer-stoppedflag, and new exports —@objectstack/objectqlacquireDatabaseSessionLock,tryDatabaseSessionLock,databaseSessionLockPgKeyand the typesDatabaseSessionLock,DatabaseSessionLockRunOptions,DatabaseSessionLockWait;@objectstack/plugin-auditholdAuditSealLock,AUDIT_SEAL_LOCK_NAME,AUDIT_SEAL_LOCK_WAIT_MS,STORED_METADATA_BODY_REWRITTEN_OBJECTSand the typesAuditSealLockEngine,AuditSealLockFinish,AuditSealLockHold.Metadata-protocol: none
Skills-docs: none —
skills/**teaches declaringlifecycle.seal, and no line there names anos migrate audit-*command, its flags, or the sealer's locks; the stale sealing lines inskills/objectstack-data/rules/lifecycle.md(one checkpoint per hour, no verifier) are follow-up #33773's, from P4b2.BREAKING for an
os migrate audit-* --applyrun on a deployment where an app declaredlifecycle.seal: on SQLite or Turso it now stops before writing anything and asks for--sealer-stopped; on Postgres or MySQL it waits for a sealer pass in flight and refuses after ten minutes. A run that rewrites no sealed object is unchanged on every database, and so is every dry run. No object declareslifecycle.sealby default (that is P4c), so nothing changes for a deployment that did not opt in. ADR-0087 disposition, in the changeset:not-required (no-migration-prescription).Maintainer quick read
os migrate audit-*rewrites can no longer work on a sealed object at the same time. Each sealer pass also takes a database lock and skips the pass while a rewrite holds it; an--applyrewrite holds that lock for its whole run. Where the database has no such lock (SQLite), an--applyrewrite of a sealed object needs the new--sealer-stoppedflag.os audit verifywould flag a sanctioned redaction as tampering. Seat ruling 6885005594 (options E + B) on plugin-audit + objectql lifecycle: build the audit tamper-evidence ADR — sealer, signed checkpoints, redaction and expiry amendments,os audit verify#31908 picked this fix; ADR-0154 D3's amendment is docs(adr): ADR-0154 amendments — bounded checkpoints (D4) and the DB session seal lock (D3) #33489.lifecycle.seal. The insert path and the cluster lockaudit.sealerare unchanged. The schema-migration lock now runs through the same shared lock code in@objectstack/objectql, with the same statements and messages (its existing pins are unchanged and green). Rolling back removes the lock and the flag; nothing stored changes shape.packages/plugins/plugin-audit/src/audit-seal/seal-lock.ts(holdAuditSealLock, B's refusal,trySealPassLocks), thensealer.ts(runPass: the skip, the release order,PassLock.lapsedbefore each checkpoint write), thenpackages/objectql/src/database-session-lock.ts(the extracted lock, and the session probe).pnpm --filter @objectstack/plugin-audit exec vitest run --maxWorkers=2 src/audit-seal/audit-seal-lock.test.ts: expect every case to pass, including "waits out a sealer pass in flight" and the B group.main, and the seat lands it once review passes.What changes
E: the audit seal lock (ADR-0154 D3 as amended in #33489).
objectstack:audit-seal, beside the schema-migration lock. Both now ride on one extracted module,packages/objectql/src/database-session-lock.ts: a Postgres advisory lock or a MySQLGET_LOCKon a connection of its own outside the pool. The dialect statements live there once.acquireSchemaMigrationLockkeeps its name, key, wait, statements and words; only its body moved.tryDatabaseSessionLock, answering the lock,'held'ornull), andisHeld(), a probe on the lock's own session (a session that ended took the lock with it, so a failed probe readsfalse).engine.getDriverForObject(object)). Where the hot store differs from the primary, the lock goes on the hot store. One lock per database, not per datasource: two datasources can reach one lock namespace (one Postgres database, or two schemas of one MySQL server, whoseGET_LOCKnames are server-wide). Each session a run or pass opens is marked with a second lock under a random name, taken before the named lock. A later session of the same run that finds the named lock held asks the database whether the session holding it there is the marked one (pg_locksin the current database; on MySQL,IS_USED_LOCKof the marker against the name). If it is, that lock already covers the database: the session is closed and nothing waits. A holder the run cannot prove its own is contention, as before (review 6894679963 M1).audit.sealeras before, then try-locks the audit seal lock on each sealed object's database. If another session holds it, the pass lets go of everything it took, writes nothing, and says so atinfoonce an hour while it lasts. Both locks are held for the whole pass and let go when it ends. Before each checkpoint is written, the pass checks thataudit.sealerand the seal lock of that object's database both still stand. A lapse of either fails the object's pass, as any lock lapse does (seat ruling 6884540128 item 2), and the seed it sealed is dropped.os migrate audit-key-material,audit-mail-bodies,audit-metadata-bodiesandaudit-side-copieswith--applyhold the lock from before their first rewrite to after their last, hot and archive runs included. Contended, they print one line and wait up toAUDIT_SEAL_LOCK_WAIT_MS(ten minutes, the schema-migration lock's wait), then refuse, having changed nothing. A run whose objects declare nolifecycle.sealtakes no lock: no sealer pass reads its rows. Dry runs take none.os audit verify, and exits non-zero.B: where the database offers no session lock. On SQLite, Turso and every other dialect, the lock answers
null. There, an--applyrun that rewrites an object declaringlifecycle.sealis refused before anything is written, naming the object and--sealer-stopped. With--sealer-stoppedit goes ahead and prints one line saying it rests on the operator's word. The sealer takes no lock there and seals as before.os migrate audit-side-copies.mainbrought this fourth ledger-copy rewrite (#33607) while this PR was open. D3 as amended holds the lock for everyos migrate audit-*run, so it gets the same hold (on the copy tables it rewrites, which--objectnarrows),--sealer-stopped, and the non-zero exit on a lost lock. It is not in 18.4.0, so for it this is no narrowing: it ships with the hold.The lines an operator reads. The wait, the timed-out refusal and the sealer's skip line name the four commands in full (one constant,
AUDIT_SEAL_LOCK_REWRITE_COMMANDS), socheck:cli-command-idsholds each name to a real command. The commands hand the hold a callback that callslogger.warn(line)rather than the bare channel (check:logger-receiver-detach).Not changed: the cluster lock
audit.sealer, the unique(sealed_object, chain_key, sequence)index, D7's amend-before-rewrite order, the dry-run default.Tests
Pins first, red before the fix (bfece9b: the objectql primitive's file fails to load, and the sealer and hold pins fail on behaviour against a constants-only stub).
packages/objectql/src/database-session-lock.test.ts: the key derivation (equal to the pinned schema-migration key), the try-once form on each dialect, a failed try handed on, the session probe, a lock of another name waiting and refusing in its caller's words;ownLocks: no marker without it (the schema-migration lock's statements unchanged), the marker taken before the lock, the Postgres check scoped to the current database and bound to both keys' halves, the MySQL check bound to the marker and the name, and a holder that is not the marked session read as contention.packages/plugins/plugin-audit/src/audit-seal/audit-seal-sealer.test.ts, new describe: the pass holds the seal lock at every checkpoint write and lets it go; the hot store and not the primary; a pass skipped while another session holds it, said once, sealing on the first pass after; a session ended mid-pass stores nothing and drops the seed; no lock on a database that offers none.packages/plugins/plugin-audit/src/audit-seal/audit-seal-lock.test.ts: the name, key and wait pinned; the hold on the hot store and not the primary; one lock per database; two datasources on one database (Postgres and MySQL) locked once with no wait and no line; a lost shared lock reported for every object it covered; the run's own lock on another database never read as cover (still waited for and refused); a sealer pass sealing both objects of two datasources on one database; a lockless database refused before any wait on another; none for a run with no sealed object; a failure to take it handed on; a lost session reported; a real sealer pass in flight waited out with the default wait; a timed-out wait refused; a sealer pass skipped while a run holds it; B refused without the flag, with a memory driver too, only for sealed objects, and going ahead with it.packages/cli/src/commands/migrate/audit-redaction-seal.contract.test.ts: each of the four commands declares--sealer-stopped, runs every rewrite under the hold on the objects it rewrites, and exits non-zero on a lost lock.seal-store.testkit.ts(sessionLockDatabase) keeps session locks the way Postgres does, waits for real, and ends sessions, so the sealer and a hold contend on one database in-process.Readings are under Verification below.
Acceptance notes
--applyon any object declaringlifecycle.sealis refused": the whole run is refused before its first write when any object it rewrites is sealed and that object's database offers no lock. "Holds it for the whole run": the lock is held on the databases of the sealed objects the run rewrites; a run that rewrites none takes none, since no sealer pass reads those rows. Lapse: the sealer follows seat ruling 6884540128 item 2 (a lock lapse fails the pass); the migration checks its lock at the end and reports a lost one, because it cannot undo rows it already rewrote.GET_LOCKnames are server-wide, so two databases on one MySQL server share the audit seal lock, as they already share the schema-migration lock. Across deployments, a rewrite on one makes the other's sealer skip passes while it runs. Not changed here. Within one run or pass, datasources on one server share one lock and never contend with each other (see What changes). On MySQL older than 5.7.5, which keeps oneGET_LOCKper session, taking the named lock drops the marker, so such a run reads its own lock as contention, as before this fix. It fails closed and never runs unexcluded.audit.sealerlock is in-process only, now also keep their passes apart through the database lock on Postgres and MySQL. The in-process lock's info line says so.@objectstack/objectql(schema-migration-lock.tsrefactored onto the new module, new exports). No open PR touchesschema-migration-lock.ts, the objectql barrel, the audit CLI commands oraudit-redaction-seal.ts;sealer.tswas touched by fix(plugin-audit)!: seal a window into checkpoints of at most 10,000 rows, and bound the idle re-walk (P4b2) #33637, which has merged;origin/mainis merged in (fbdc0b8), and this PR's diff againstmainis P4b3 alone, 19 files.Verification
Local runs are at head fbdc0b8 (
origin/mainmerged in at 4b5024d, after #33637 landed), after a fullturbo run build(119 tasks, exit 0), unless a line names 06589fe, the head before that merge. The merge changed none of this PR's 19 files and nothing inplugin-audit(P4b2's squash equals the P4b2 tip this branch already held); among the three touched packages it broughtmain's changes to fourobjectqlfiles and twoclitests. Heavy runs went throughscripts/pm/os-verify-lock.sh.pnpm --filter @objectstack/plugin-audit testandtypecheck: 95 files / 1560 tests passed; typecheck exit 0, tests included throughcheck:test-typecheck.pnpm --filter @objectstack/cli exec vitest run --project unitandtypecheck: 421 files / 6008 tests passed; typecheck exit 0. The integration layer is CI's (Test Core).pnpm --filter @objectstack/objectql exec vitest runandtypecheck: 598 files / 13155 tests passed; typecheck exit 0.dispatch-gates --commandsat fbdc0b8: 78 derived (19 paths against merge base 4b5024d), all run; 77 exit 0, includingcheck:cli-command-ids(the fouros migrate audit-*ids in the seal-lock lines resolve) andcheck:logger-receiver-detach. 1 exits 3, PREREQUISITE NOT MET, so NOT MEASURED:check-plugin-teardown-shape --self-test(needs an unshallow clone).dispatch-gates --ran: "78 derived famil(ies) accounted for — 77 run, 1 NOT-MEASURED", exit 0. Outside the derived list:check-nul-bytesexit 0; eslint--no-inline-configon the 18 changed.tsfiles exit 0.check:type-check-debt: exit 0.(narrowing)arm),pnpm --filter @objectstack/dogfood testunder os-verify-lock: at fbdc0b8,Test Files 467 passed | 3 skipped (470),Tests 3959 passed | 42 skipped (4001),VERDICT command-exit 0(29m16s), no failure. At 06589fe, before the merge:Test Files 467 passed | 3 skipped (470),Tests 3958 passed | 42 skipped (4000),VERDICT command-exit 0.@objectstack/objectql(it is touched), tests through turbo after a full build, all exit 0:client,cloud-connection,connector-mcp,driver-mongodb,driver-odata,organizations,plugin-approvals,plugin-auth,plugin-dev,plugin-email,plugin-pinyin-search,plugin-security,plugin-sharing,plugin-webhooks,http-conformance,scenarios,rest,runtime, the tenservice-*packages that import it,trigger-record-change,verifyand the four examples. Not re-run after the merge, which changed none of this PR's files; CI'sTest Coreruns them at the head.node scripts/ablation-replace.mjs): intrySealPassLocks,'held'read as no lock. The anchor hit once and landed (blob f29b5b44 to e07c4727).audit-seal-lock.test.tsandaudit-seal-sealer.test.tswent red on exactly the two skip pins, "a sealer pass skips while a run holds it" and "skips the pass while another session holds it", eachexpected 1 to be +0(Tests 2 failed | 69 passed (71)). Restored: blob f29b5b44 equals HEAD,git diff HEADempty, marker count 0. The tests importseal-lock.tsfrom source by a relative path, so nodist/leg applies. The merge leftseal-lock.tsand both test files as they were.TypeScript Type Check,Lint & Repo Gates,Check Changeset,Build Core,Governed Surface Queue Guard,Test Core(1/8 to 8/8 and the roll-up),Test UI,Live E2E UIand thePR-body guards. TheDogfood Regression Gateroll-up is success with its three shards skipped by the selector, so the local battery above is this PR's dogfood reading.Generated by Claude Code