Repository navigation
feat(plugin-audit): seal the audit log by default and expire sealed rows by whole checkpoints (ADR-0154 D8, D10) - #37605
Conversation
…154 D8) Claude-Session: https://claude.ai/code/session_01L6bhgUd6hon2o34LQSLbZt Co-authored-by: Claude <noreply@anthropic.com>
…ned expiry amendments (WIP) ADR-0154 D8/D10 P4c: sys_audit_log seals by default; the sealer writes an expiry amendment before the lifecycle service deletes a covered prefix. Claude-Session: https://claude.ai/code/session_01L6bhgUd6hon2o34LQSLbZt Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgUd6hon2o34LQSLbZt Co-authored-by: Claude <noreply@anthropic.com>
…sealed expiry (WIP) Claude-Session: https://claude.ai/code/session_01L6bhgUd6hon2o34LQSLbZt Co-authored-by: Claude <noreply@anthropic.com>
…l default (WIP) Claude-Session: https://claude.ai/code/session_01L6bhgUd6hon2o34LQSLbZt Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 4 package(s): 37 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 15 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 183 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 4ed65ccc9f59c91c42ae470468af817f31468825 && git checkout 4ed65ccc9f59c91c42ae470468af817f31468825
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin e69fa46dd326c4dcbbce206f35c8b3398776e76e 2a45517cfa6d738d31cd3b8278b43d3444be6f86 && git checkout -B drift-repro e69fa46dd326c4dcbbce206f35c8b3398776e76e && git merge --no-ff 2a45517cfa6d738d31cd3b8278b43d3444be6f86
node scripts/docs-audit/affected-docs.mjs --json e69fa46dd326c4dcbbce206f35c8b3398776e76e
|
…expiry window Claude-Session: https://claude.ai/code/session_01L6bhgUd6hon2o34LQSLbZt Co-authored-by: Claude <noreply@anthropic.com>
…pins; type the sealed-expiry test's veto sys_audit_log now declares lifecycle.seal, so an `os migrate audit-* --apply` run on SQLite needs --sealer-stopped (ADR-0154 D3 amended, B). The four archive/preview integration files pass it; the changeset names the operator change. The lifecycle sealed-expiry test's partial-veto double returns string ids. Claude-Session: https://claude.ai/code/session_01L6bhgUd6hon2o34LQSLbZt Co-authored-by: Claude <noreply@anthropic.com>
…ule load The edited test file is now judged by the test-source alias gate's source reach: each dist-resolved dependency its served boot reaches through a dynamic import gets a module-top side-effect import. Claude-Session: https://claude.ai/code/session_01L6bhgUd6hon2o34LQSLbZt Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: Inputs: card #31908 (body and all 62 comments), PR #37605 (body, 28 files, net diff against merge base ① Derived judgments
② Semver levelThe changeset moves M2 (must-fix) — the declaration carries no narrowing, and this diff narrows. This card's own precedent is changeset
S2 (should-fix) — ③ Boundary flags
④ Design judgment
S1 (should-fix) —
M1 (must-fix) — S3 (should-fix) — the resumed range is read with no
Nits:
Implemented-by: VERDICT: FAIL |
…pply tenant windows per chain Review 7198128323 and its seat rulings: - a resumed expiry admits each checkpoint left in its range under a trusted key, consecutively to the amendment's last sequence and digest, or deletes nothing; a chain head and the object floor follow only an admitted expiry; - a tenant-scoped retention window travels to the sealed expiry and applies to its organization's chain; a chain of no one organization takes the longest window; - the resumed range is removed oldest first; an archive store with no bulkDelete is never planned; - the seam is registerExpiryPrefix, as the slice plan ruled; - the changeset declares the narrowing and the semantic change (minor), with the BREAKING banner and the ADR-0087 marker; cli.mdx and upgrading.mdx name the audit seal lock for every deployment. Claude-Session: https://claude.ai/code/session_01L6bhgUd6hon2o34LQSLbZt Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: Delta record over review 7198128323 (FAIL at ① Derived judgmentsItems 1, 2, 4 and 7 to 13 of the earlier record stand as judged there. What the delta changes:
② Semver levelM2: closed. Both carriers declare S2: closed. S5 (should-fix) — the narrowed list and the banner leave one change out. Because ③ Boundary flags
④ Design judgment
S4 (should-fix) — the tenant windows are computed on one column and matched on another.
M1: closed. Its two pins: this round ran nothing, so by reading, and by the ablation the PR body reports, both go red with the fix's checks removed together. Read singly, the head pin goes red with its one check removed; the resume pin does not go red with either one of its branch's checks removed alone (n6). S3: closed. The resumed range is read ascending by M3 (must-fix) —
Nits:
Implemented-by: VERDICT: FAIL |
- M3: the expiry writer and the sealer's chain head check that each checkpoint and stored expiry amendment they use belongs to the chain and links in order, and page through stored amendments; the verifier adds two matching checks. New audit-seal-expiry-admission.test.ts plus two verifier tests, one per check. - S4: a chain expires under the longest tenant window among the owners of its rows (by the column the windows are set on, hot store then archive); `tenantColumn` travels on the request. - S5: the `os audit verify` exit 2 change is in the narrowed list and the BREAKING banner. - Rename the seam types to LifecycleExpiryPrefix, LifecycleExpiryPrefixRequest, LifecycleExpiryPrefixRun. - n4, n5, n7. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgUd6hon2o34LQSLbZt
… --apply runs sys_audit_log is sealed by default, so an --apply run over SQLite needs the flag (ADR-0154 D3 amended, B), as the CLI integration tests already do. No server seals these fixtures while the command runs. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgUd6hon2o34LQSLbZt
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: Delta record, round 3 (record 7202871622: FAIL at ① Derived judgmentsThe items of the two earlier records stand as judged there. What this delta changes:
② Semver levelS5: closed. Both carriers now name The level stands: four packages at The narrowed list names every affected command. Four commands take the audit seal lock ( ③ Boundary flags
④ Design judgmentAdmission: M3: closed. Every part of its off-thread statement was read against this tree, the lesser variants and the paged reads that replace the two bounded scans included. The design consequence: an expiry acts only on checkpoints and amendments that are the chain's own by their signed content, in unbroken linked order, each under a trusted key; the sealer's head and floor pass over a stored expiry that is not; a stored row that fails any of this deletes nothing, is said once, and is left to n6: closed. The resumed range's checks are pinned one at a time, each fixture refused by its one check. The tenant window: S4 (should-fix) — closed in part: the column mismatch is gone and no row leaves before its own window, but the rule built is not the rule ruled, and the published sentences state the ruled one. Closed: the request carries the column the windows are set on; a chain takes its own organization's window only when that column is its chain column; where it is not, each row's owner is read by that column, and a checkpoint is judged by the longest window among the owners of its rows and of the rows taken before it (a row neither store holds takes the longest of all). Pinned on the Open: ruling 7202915675 gives the window to the chain ("a chain whose rows span several owners, expires under the longest window among them", "resolved from the owners of the rows the chain holds"). The code gives it to the checkpoint, growing along the walk. The two differ on the PR's own pin: chain
One further consideration bearing on this choice is handed to the seat off the public thread. S6 (should-fix) — The walk's comment says "The window only lengthens as owners join, and windows end in order: every checkpoint taken ended by it." Windows do not end in sequence order: the sealer appends a
n5: closed (each seed goes before its checkpoint, oldest first, so a stop leaves no seed whose checkpoint is gone, and the rest is resumed). Nits:
Implemented-by: VERDICT: PASS |
- S4 (seat ruling, option 3): a tenant's own window applies to a chain only where the windows are set on the chain column; every other chain takes the longest window configured. No row is read to pick a window. Every sentence stating the rule says so, with its cost: on an object whose windows sit on another column, a shorter tenant window has no effect on its sealed rows. - An expiry drops a seed only when it is the secret sealed under that checkpoint's own coordinate. - The resumed range is read a page at a time; the chain walk never takes a row with no chain_key as its key. - n9, n10, and the jsdoc of the stored-expiry read. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgUd6hon2o34LQSLbZt
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: Delta record, round 4 (record 7205485052: PASS at ① Derived judgmentsThe items of the three earlier records stand as judged there. What this delta changes:
② Semver levelUnchanged and it stands: four packages at The new rule adds no item to the narrowed list. It refuses nothing and deletes nothing sooner; like the host with no crypto provider, it keeps rows longer than a setting asks. The ruling asks for that cost in words on three carriers, and all three carry it: the changeset's tenant bullet ("On such an object a shorter tenant window has no effect on its sealed rows: they are kept to the longest"), the PR body (维护者速读 and the acceptance notes), and ③ Boundary flags
④ Design judgmentThe tenant window: S4: closed. Both arms were read against the ruling and against the code that feeds them.
S6: closed. A chain's window no longer changes during a walk. Every checkpoint a run takes ended at or before the one cutoff its amendment's value belongs to, so the signed No must-fix, no should-fix. The seed check: The walk and the resume:
n8: closed. The read it named no longer exists.
Nits:
What is left before ACCEPT. On the tree: nothing. The seat's own acts: the superseding S4 ruling on the card (③), the L1 call on the dogfood battery, and the approval a declared narrowing takes. Implemented-by: VERDICT: PASS |
…horten the declared window AuditPlugin registers a retention floor for every object that declares lifecycle.seal and no archive, at its declared retention.maxAge and ttl.expireAfter, beside the sealed expiry, and again before every sealer pass so the floors follow the registry. A lifecycle service without retention floors is given no expiry. Docs say which column a tenant window is set on. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgUd6hon2o34LQSLbZt
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: Delta record, round 5 (record 7207510869: PASS at ① Derived judgmentsThe items of the four earlier records stand as judged there. What this delta changes:
② Semver levelThe level stands: four packages at The narrowed list gains one arm and the BREAKING list one bullet, and both are owed: an override that 18.6.0 applied is now rejected. Checked against The arm is true for a sealed object that declares no ③ Boundary flags
④ Design judgmentThe floor:
The bound this buys: no sealed row expires under a window shorter than the one its object declares. Fail closed, where the host cannot register a floor: right. The alternative is an expiry that runs with the rule unenforced, and the cost of the choice made is rows kept, said at The refresh: right. The pins. Over a real S7 (should-fix) — the changeset (the new No must-fix.
Nits:
What is left before ACCEPT. On the tree: S7, prose in the changeset and Implemented-by: VERDICT: PASS |
…adata An object created at runtime (a tenant-authored definition) keeps the row-cutoff retention sweep: the lifecycle service does not route it to the sealed expiry, AuditPlugin registers no retention floor for it, and the sealer's expiry answers no run for it. Docs and changeset say the override floor applies to sealed objects with no archive. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgUd6hon2o34LQSLbZt
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: Delta record, round 6 (record 7209130288: PASS at ① Derived judgmentsThe items of the five earlier records stand as judged there. What this delta changes:
② Semver levelThe level stands: four packages at The scope makes the declared narrowing smaller, never larger: the override arm and the ③ Boundary flags
④ Design judgmentThe scope:
The pins. S7: closed. "And no S8 (should-fix) — the changeset's S9 (should-fix) — No must-fix.
Nits:
What is left before ACCEPT. On the tree: S8 and S9, prose in the changeset, the description with its regenerated page, and Implemented-by: VERDICT: PASS |
…; round-6 wording One predicate, takesSignedExpiry, decides whether a sealed object takes the signed expiry and its retention floor: the lifecycle routing, the audit floors and the sealer's own expiry all ask it. It answers yes only when the registry places the object in packaged metadata; any other sealed object keeps the row-cutoff retention sweep. Docs, describe and changeset wording follow review 7210787318 (S8, S9, n17, n19, n20). Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgUd6hon2o34LQSLbZt
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: Delta record, round 7 (record 7210787318: PASS at ① Derived judgmentsThe items of the six earlier records stand as judged there. What this delta changes:
② Semver levelThe level stands: four packages at The widened list now names the predicate, its type and the three optional reads, which is all the delta adds to the surface. The narrowed list changes by wording alone (S8), and the positive default makes the set of objects the override arm reaches smaller, never larger. ③ Boundary flags
④ Design judgmentThe predicate:
The pins. S8: closed. The S9: closed. The description, both tables of the reference page and No must-fix, no should-fix.
Nits:
What is left before ACCEPT. On the tree: nothing. The seat's own acts: the one sentence of record on how "packaged metadata" is read (③), the L1 call on the dogfood battery, and the approval a declared narrowing takes. Implemented-by: VERDICT: PASS |
An owner under a package id that no installed code or marketplace package answers keeps the row-cutoff sweep, and takes no floor and no expiry. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgUd6hon2o34LQSLbZt
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Contract reviewServed-tier: Delta record, round 8 (record 7212916843: PASS at ① Derived judgmentsNothing to derive. The delta rewrites one comment in each of two test files, ② Semver levelUnchanged and it stands: four packages at ③ Boundary flags
④ Design judgmentThe two comments now say what the pins beneath them decide, in the words of the predicate's own jsdoc. Holds. No must-fix, no should-fix. Nits, carried as they stand:
What is left before ACCEPT. On the tree: nothing. The seat's own acts: the L1 call on the dogfood battery, and the approval a declared narrowing takes. Implemented-by: VERDICT: PASS |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA 席位核对 — ACCEPT · head 2a45517 · card #31908 · area s2-data · 2026-11-27T09:16ZL1 checklist
Tier: H. Landing: hand-off to the maintainer follows this record. |
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA Tier H hand-off · 2026-11-27T09:17Z · head 2a45517 · approver 维护者速读
|
…the retention floor of a packaged sealed object (objectstack-ai#37913) <!-- claude-projects-attribution: {"github_login":"os-sales"} --> _Requested by **Sales** · [project thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuCEahzFts17HReXUCv1LZP1)_ Fixes objectstack-ai#37881 Clause-②: no Metadata-protocol: none Related: objectstack-ai#31908, objectstack-ai#37605, objectstack-ai#33773 ## 维护者速读 - 是什么:对外发布的技能包里,讲「带防篡改封印的审计对象数据留多久」的那一页改成和现在的平台一致:随包发布的封印对象到期后按整段检查点清理,设置里把保留期改得比对象声明的更短会被拒绝;运行时创建的封印对象照旧按保留期清扫。只改教 AI 的文字,用户无感。 - 为什么:平台行为今天已经合入(审计防篡改专题的最后一块),技能包还在教「到期没做完、设置里可以随意缩短保留期」,照着做的 AI 和实施人员会给客户错误的预期。 - 出错会怎样:只动技能包文字,写错了最多是 AI 学到一句不准的话,可以直接撤回这次修改。 - 要你做的:无,座位复核后交审批人。 ## What changes One published skill page and one eval case of the same bundle, prose only. No code, no ceiling row. **`skills/objectstack-data/rules/lifecycle.md`** - *Sealing (`seal`)*. The last sentence said expiry is not built, "so the sweeper still deletes sealed rows, which then read as missing". After PR objectstack-ai#37605 that holds only for some sealed objects. The section now ends with one paragraph, in the wording the merged changeset, `content/docs/data-modeling/objects.mdx` and the `lifecycle.seal` description use: - **The scope.** Signed expiry covers objects whose lifecycle is declared in packaged metadata: their sealed rows leave only by whole checkpoints and read as `expired`. - **The floor.** On such an object with no `archive`, a retention override below the declared window is rejected and the declared window applies; to keep rows for less time, shorten the declared window. - **Every other sealed object** (one created at runtime): the sentence the page carried, kept for that case only. The sweeper still deletes sealed rows, which then read as missing. - *Operations*, the `retention_overrides` row points at that paragraph ("sealed objects: see § Sealing"), so a reader who starts from the settings table meets the floor. - The same sentence also said no verifier is built ("a break is recorded but not reported"). `os audit verify` has shipped and reads the checkpoints back, and the new paragraph says how rows read, so that clause is removed. See *Decided in the thread*. The page teaches behaviour only: what an author declares and what then happens to the rows. It says nothing about how a checkpoint or an expiry is signed. **`skills/objectstack-data/evals/objects-fields-relationships.json`** (case 16 only; S1 of contract review 7216914110, claim amendment 7216941615) - The case graded the two statements the page no longer makes for an object an author declares: `must_contain` held `not reported` and `read as missing`, and the grader passes an answer only when every token appears. It now holds `expired` in their place. - `expected_output` ended with "Two limits today: no verifier ... until expiry ships ...". It now ends with the three sentences of the new paragraph, and says the prompt's object is one declared in packaged metadata. - Nothing else in the case moves: the prompt, the other four tokens, `must_not_contain`, and the one-checkpoint-per-organization wording (card 33773's). **Paid for in the same file (token ratchet, no ceiling moves).** Each cut is restatement, rationale or filler, and what an author needs stays on the page: | Cut | Where it still lives | |:--|:--| | "That's correct for business records — and a guaranteed disk leak for anything append-only." (*Why This Exists*) | the `record` row of *Lifecycle Classes* ("permanent; policies FORBIDDEN") and the rule sentence that follows | | "— grows forever, exactly the bug" (first *Validation Rules* example comment) | the comment still names the refusal ("Non-record class with no bounding policy"); the reason is the first sentence of *Why This Exists* | | "(event log, run history, delivery outbox, ephemeral tokens)" in the rule sentence | the *Typical use* column of *Lifecycle Classes*, one use per class | | "(`beforeInsert` / `afterUpdate` …)" in the intro | the sentence still tells the two meanings of "lifecycle" apart; the hook names are taught on the hooks pages | | "is atomic-ish and safe by default" (the *Archive-then-delete* bullet lead) | the bullet's own sentence states the guarantee: never hot-deleted before the archive copy succeeded | | "— telemetry bloat can't touch the business DB" (the *Separation* bullet) | rationale only; the behaviour (the objects move onto that datasource) stays | | "simply", "physically" (*Safety Semantics*) | filler | Skill size readings, against `main` @ `f7f9345e`: | | lines before | lines after | tokens before | tokens after | |:--|--:|--:|--:|--:| | `skills/objectstack-data/rules/lifecycle.md` | 199 | 200 | 1931 | 1931 (ceiling 1931) | | `skills/objectstack-data/evals/objects-fields-relationships.json` (eval fixture, measured and not ratcheted) | 521 | 520 | 9184 | 9241 | | every published `SKILL.md`, summed | 4959 | 4959 | | | | ratcheted (authored) bundle | | | 199685 | 199685 | Net lines across `skills/**`: 0 (the page +1, the eval case -1; the claim's budget is +12). Decided in the thread (small, listed per the standing rule): - **The "no verifier" clause is removed here.** It is the `lifecycle.md` :164-166 item of card 33773 (queued, unclaimed). It shares one sentence with the expiry clause this card rewrites, and leaving it would put "no verifier" beside "read as `expired`". The seat agreed in the thread to take that one item here and not to fold the card; a deletion only, which also pays part of the ratchet. Everything else of card 33773 stays with it: the one-checkpoint-per-organization wording (page :131-133 and the eval case's `expected_output`) and the `chainField` teaching. The seat notes this on that card after the merge. - **Eval case 16 follows the page** (added after the contract review, see *What changes*). `expired` is the token the review named: it is the one word the new paragraph teaches for an object an author declares that the old page did not carry. - **"(one created at runtime)"** names the other case the way the merged texts do ("an object created at runtime"); the card's own words are "any other sealed object", and both are on the page. - **Not added, to stay inside the card's three items and the file's ceiling:** that the window is counted to the start of a UTC day and at most 10,000 rows leave per sweep; that rows are kept while no sealer runs; and how a tenant-scoped window applies per chain. `content/docs/data-modeling/objects.mdx` carries all three. - No `Skills-docs:` line: the kind is `none` and there is no `(narrowing)` arm. - Branch name: the platform assigned `claude/project-thread-zjjrt8`, so it does not carry the issue number. ## Why PR objectstack-ai#37605 (merged 2026-11-27) made sealed rows of packaged objects expire by whole checkpoints and floored their retention overrides at the declared window. It declared the skill text as a follow-up because `skills/**` is governed. Until the page changes, an agent that writes a sealed object from it expects a settings override to shorten the window, and tells its user that expired sealed rows read as missing. ## Tests Prose only, so no unit test changes and no ablation. Local gates, run on the final head `c68dc00c` (`main` @ `f7f9345e` merged in, full `pnpm build` 123 of 123 tasks before the eval commit, which touches no built file): `node scripts/pm/dispatch-gates.mjs --commands` derives 48 families for this diff, all 48 ran with exit 0, and `--ran` answers: ```text ✓ dispatch-gates --ran: 48 derived famil(ies) accounted for — 48 run, 0 NOT-MEASURED (a DERIVED zero — all 48 recorded an exit code and none of them is 3). ``` The ones that read the page: <details><summary>verdict lines</summary> ```text ✓ check-skills-token-ratchet: 61 authored bundle file(s) within their ceilings; 11 generator-owned file(s) and 42 eval fixture(s) measured, not ratcheted. skills/objectstack-data/rules/lifecycle.md 1931 / 1931 (+0) skills/objectstack-data/evals/objects-fields-relationships.json 9241 / — (eval fixture) ratcheted (authored) 199685 / 199685 (+0) ✓ check-skill-served-sections: 24 served section(s), each heading exactly once in its file (6 json, 2 json+ts, 16 neutral); 10 JSON fence(s) parse and pass their spec validators. ✓ check-skill-links: 272 relative link(s) in 76 published skill file(s) resolve; 140 fragment(s) name a real heading under GitHub's slug rule. ``` `check:skill-compatibility`, `check:skill-frame-sync`, `check:skill-identifier-liveness`, `check:doc-authoring`, `check:pm-skill-id-lint`, `check:nul-bytes`, `check:dual-build-cjs-loads`, `check:lean-entry-closure` and lint `check:doc-formula-expressions`: exit 0. The same 48 also ran with exit 0 on the two earlier heads: `66fa70d6`, before `main` was merged in, and `ca1303b9`, the head the contract review read. </details> Everything else is CI's run: the check-runs on this PR are the record. ## Acceptance notes - Premise re-read on `main` @ `1e721fdb` before writing: `lifecycle.md` :164-166 and the `retention_overrides` row (:173) still carried the old text, and the blocker is merged (`0296d972`). `main` moved one commit while the branch was open (`f7f9345e`, `packages/metadata-protocol` and one docs page, nothing under `skills/`); it is merged in and the gates above ran on the merged head. The wording was read from the merged changeset (`.changeset/31908-p4c-sealed-expiry.md`), `content/docs/data-modeling/objects.mdx` (*Sealed audit objects*), the `lifecycle.seal` description in `packages/spec/src/data/object.zod.ts`, and the floor's own remedy text in `packages/plugins/plugin-audit/src/audit-seal/retention-floor.ts` ("to keep its rows for less time, shorten the window the object declares"). - Which objects take signed expiry is one predicate on `main` (`takesSignedExpiry`, `packages/objectql/src/lifecycle/signed-expiry-scope.ts`); the page says "declared in packaged metadata" and "created at runtime", as the public docs do, and names no internal. - The *Save Notice* section is served by exact heading (`packages/spec/scripts/skill-served-sections.json`) and is byte-identical to `main`. ## Verification Read first: `skills/objectstack-data/rules/lifecycle.md`, the last paragraph of *Sealing (`seal`)*, then the `retention_overrides` row of *Operations*, then case 16 of the eval file. The risk hunk is the new paragraph: each of its three sentences should match what PR objectstack-ai#37605 merged. Two-minute check: `node scripts/check-skills-token-ratchet.mjs` prints `skills/objectstack-data/rules/lifecycle.md 1931 / 1931 (+0)` and exits 0. Tier H: `skills/**`. Contract review 7216914110 (PASS, one should-fix) read head `ca1303b9`; the eval commit answers its S1, and the delta review over `c68dc00c` is the seat's. ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; `pnpm lint` passes. - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` touched: its generated artifacts are regenerated and committed. - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L6bhgXcjUDyiKHv8oX32ik --- _Generated by [Claude Code](https://claude.ai/code/session_01L6bhgXcjUDyiKHv8oX32ik)_ <!-- signed: repo:objectstack#2 · os-sales · session_01L6bhgXcjUDyiKHv8oX32ik --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…g, 56 changesets added) and state what npm publishes (objectstack-ai#38645) <!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9St4eUWHFcCKuRUrCZPperJ)_ Fixes objectstack-ai#38189 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:v19 发布页的 breaking 清单补上 11 月 26 日之后合进来的 56 条改动(其中 30 条还在 main 上、下一次预发布才带上,页上逐条标明),计数和页头的发布状态也改成现在 npm 上的真实情况。 - 为什么做:升级到 19 的人把这页当完整清单用;原清单只数到 19.0.0-next.0 的输入,之后 next.1、next.2 和 main 上的 breaking 改动大多没列。 - 出错会怎样:只改一个文档页,不影响任何代码或发布;某条写错了,读者会被误导,但直接撤回这个改动即可恢复原页。 - 要你做的:无。 ## What changes `content/docs/releases/v19/index.mdx` only. - **Header.** The publication sentence now states what npm answers: `latest` is 18.6.0, `next` is `19.0.0-next.2`; the line's versions on npm are `19.0.0-next.0` (2026-11-26) and `19.0.0-next.2` (2026-11-28). `19.0.0-next.1` was versioned on `main` (30a8047) and is not on npm, so its changes first ship in `next.2`. - **How this list was built.** Re-measured at `6eb23c87` (origin/main at start, 2026-11-29) with the method the page states: `classifyReleaseBullet` over every changeset on `main` — the 1,185 in `.changeset/pre/` (consumed by the next.0, next.1 and next.2 version passes) and the 219 still pending. 159 breaking from 155 PRs: 98 to act on, 61 registered. - **56 new lines' worth of changesets**, each sorted by the classifier into 需手动处理 (27) or 自动迁移 (29), placed under the page's existing topic headings, with three new ones: 需手动处理 → Knowledge; 自动迁移 → Knowledge sources, Sharing and permissions. The 30 still pending carry "— on `main`". - **自动迁移 intro** and **Coming from 18.x step 3**: the registered split restated in changesets (31 on the protocol-19 step, 30 on the protocol-18 step, of 61). - **Callout**: no longer says no prerelease was published. ## Tests The classifier run (script in the dev's scratchpad; it imports `classifyReleaseBullet` from `scripts/release-github-releases.mjs` and feeds each changeset body as a CHANGELOG bullet, `- ` on the first line and two-space indent on the rest), at `b03fd5f5`'s parent tree `6eb23c87` (the diff touches no changeset): <details><summary>Raw counts</summary> ``` ALL 1404 {"manual":98,"migrated":61,"other":830,"added":403,"semantic":12} OLD (in a46efa8 set) 950 {"migrated":31,"manual":71,"other":563,"added":278,"semantic":7} NEW (after a46efa8) 454 {"manual":27,"other":267,"added":125,"migrated":30,"semantic":5} NEW next.0 45 {"other":27,"added":13,"migrated":1,"semantic":2,"manual":2} NEW next.1 138 {"manual":9,"other":80,"migrated":12,"added":36,"semantic":1} NEW next.2 52 {"added":11,"other":38,"manual":3} NEW pending 219 {"added":65,"other":122,"migrated":17,"manual":13,"semantic":2} missing-from-tree of a46 set: none ``` The same function over the 950 files as they stood at `a46efa8c` (`git show a46efa8:.changeset/FILE`): `{"migrated":31,"manual":71,"other":563,"added":278,"semantic":7}`, and 0 of the 950 changed section between `a46efa8c` and `6eb23c87` — the page's first count reproduces exactly. </details> <details><summary>The 57 breaking changesets added after a46efa8 (pass · section · PR · file)</summary> ``` next.0 manual 37477 37004-retire-knowledge-ragflow.md next.0 manual 37491 36964-flow-option-label-filters.md next.0 migrated 37437 35827-data-table-staged-edit-retired.md (already on the page) next.1 manual 37605 31908-p4c-sealed-expiry.md next.1 manual 37640 37604-platform-record-followups.md next.1 manual 37668 37104-knowledge-settings-readers.md next.1 manual 37720 37682-i18n-retire-build-chat-keys.md next.1 manual 37720 37682-retire-build-chat-frontend.md next.1 manual 37818 37608-disabled-holder-publish-rollback-refused.md next.1 manual 37883 37575-first-render-grid-shell-passes.md next.1 manual 37900 36689-mcp-stdio-disabled-package-every-caller.md next.1 manual 37902 37678-knowledge-turso-settings-group.md next.1 migrated 37366 37086-define-metadata-form-rename.md next.1 migrated 37366 37086-form-metadata-type.md next.1 migrated 37371 36055-view-all-stops-voting-on-fields.md next.1 migrated 37513 35143-data-model-publish-checks.md next.1 migrated 37584 37499-disabled-holder-unbound-row-bare-write-refused.md next.1 migrated 37600 36595-related-list-key-under-arrangement.md next.1 migrated 37676 37304-knowledge-source-governed-type.md next.1 migrated 37783 37712-agent-model-provider-retired.md next.1 migrated 37807 35143-seeds-actions-checks.md next.1 migrated 37840 36377-flow-bare-ordering-record-date-arithmetic.md next.1 migrated 37870 37613-book-audience-one-gate.md next.1 migrated 37910 37717-lookup-depends-on-param-computed-field.md next.2 manual 37948 37851-disabled-holder-own-row-publish-rollback-refused.md next.2 manual 38028 managed-email-password-held-off.md next.2 manual 38042 36679-secret-rewrap-confirmation-exit.md pending manual 37896 runtime-object-less-action-no-record.md pending manual 37963 37467-knowledge-title-arm-retired.md pending manual 37982 37907-knowledge-turso-test-connection.md pending manual 38038 38019-knowledge-source-review-follow-ups.md pending manual 38085 37622-related-list-keys-agree-under-arrangement.md pending manual 38180 auth-switches-read-declaration.md pending manual 38209 35879-served-schema-platform-stamped-keys.md pending manual 38268 sec2-wf9p-f12.md pending manual 38269 37752-app-list-edit-with-ai-removed.md pending manual 38310 38041-knowledge-source-closure-system-object.md pending manual 38431 36987-auth-updateuser-returns-void.md pending manual 38452 38377-retire-split-algorithm-version.md pending manual 38580 36057-scenarios-delete-agent-confirmation-names.md pending migrated 37924 37856-ask-ai-action-type-retired.md pending migrated 37929 36495-action-locations-acted-on.md pending migrated 37971 37307-knowledge-source-references.md pending migrated 38001 automation-variable-keys-reserved-segments.md pending migrated 38013 37983-knowledge-source-save-needs-the-service.md pending migrated 38060 37961-knowledge-source-unmounted-adapter-refused-at-save.md pending migrated 38096 34562-record-structural-lint.md pending migrated 38107 35143-views-dashboards-checks.md pending migrated 38145 37214-chart-series-measure-format-refused.md pending migrated 38168 36544-form-view-modal-size-retired.md pending migrated 38216 33912-share-unknown-recipient-ledger.md pending migrated 38216 33912-share-unknown-recipient.md pending migrated 38273 33806-pending-confirmation-service-one-seam.md pending migrated 38299 35924-publish-reparses-object-draft.md pending migrated 38398 37753-build-progress-frame-retired.md pending migrated 38470 38369-knowledge-held-without-embedder-or-store.md pending migrated 38545 38150-adopt-orphans-door-retired.md ``` PR = the `(#N)` of the commit that added the changeset (`git log --diff-filter=A`). The pass is the version commit that moved the file into `.changeset/pre/`: next.0 33a31dc, next.1 30a8047, next.2 9d111a7 (`packages/spec/package.json` reads `19.0.0-next.0/1/2` at each). </details> <details><summary>Page cross-checks</summary> - Every one of the 155 PRs behind a breaking changeset is linked on the page (0 missing), and the page links no PR outside that set. - Each of the 30 pending changesets sits on a line carrying "— on `main`", and no published one does. - `!`-titled first-parent commits since 18.6.0 (958ee03) to `6eb23c87`: 135 (87 to `a46efa8c`, as the page said); all 135 are in the list. - Registered markers resolved to their entry files (`packages/spec/src/migrations/entries/*/N.*`, `packages/spec/src/conversions/entries/N/`, and metadata-core's forward conversion for `permission-view-all-fields-beside-record-bypass`): the 30 registered changesets added after `a46efa8c` name 39 ids, all on step 19; the 31 before it name 33 ids, 32 on step 18 and `protocol-18-range-refused` on step 19. </details> ## Acceptance notes - **Pending changesets are in the list.** The card's done-when covers every changeset between `a46efa8c` and the measurement sha; 30 of those are still in `.changeset/` and ship in the next cut, so their lines are marked "on `main`" and the intro says so. - **`19.0.0-next.1` is not on npm.** `npm view PKG versions` for `@objectstack/spec`, `core`, `cli`, `runtime` and `@object-ui/i18n` lists `19.0.0-next.0` and `19.0.0-next.2` only. The header states that fact and no more. - **The registered split is now counted in changesets, not entries.** The old page said 41 registered entries, 39 on protocol 18. Counting the ids in the registered markers gives 33 at `a46efa8c` (32 on step 18), so the 41/39 could not be reproduced from any stated method. The rewritten intro and step 3 count changesets (31 on step 19, 30 on step 18, of 61), which match the bullets one to one. - **Followed the classifier where a title has no `!`:** objectstack-ai#37605, objectstack-ai#37883, objectstack-ai#37963, objectstack-ai#38209 and objectstack-ai#38269 are breaking by their banner or their `(narrowing)` arm; objectstack-ai#38209's Clause-② reads "no (narrowing …)", which the classifier counts as breaking although the body says nothing a client sends is refused. Listed as classified; no changeset changed. - **objectstack-ai#37513** merged before the next.0 cut but its changeset was consumed by next.1 (its body says the next.0 CHANGELOG missed it). - **One line, several changesets**: objectstack-ai#37720, objectstack-ai#37366 and objectstack-ai#38216 each carry two changesets; objectstack-ai#37818 with objectstack-ai#37948, objectstack-ai#38038 with objectstack-ai#38310 and objectstack-ai#38013 with objectstack-ai#38060 share a line. The existing 102 lines were not rewritten. - **Counts on a release page**: each is anchored to a named measurement sha, the snapshot the card asks for; it is not a count kept in sync with the tree. - **objectstack-ai#37437** (closed card objectstack-ai#37922's bullet) is not added twice. - **Check Changeset** will be red: this docs-only PR publishes nothing from any package, the `skip-changeset` case, and the dispatch opens it without labels, so that label is the seat's to apply. ## Verification Read first, by risk: the method paragraph and header (`index.mdx` lines 6-47), the 自动迁移 intro, then the new 需手动处理 → Knowledge block. Two-minute check: `git show 6eb23c8:.changeset/pre/37851-disabled-holder-own-row-publish-rollback-refused.md | head -12` shows the `fix(metadata-protocol)!` summary and the BREAKING banner behind the objectstack-ai#37948 line; `npm view @objectstack/spec dist-tags` prints `{ latest: '18.6.0', next: '19.0.0-next.2' }`. <details><summary>Local gate readings at b03fd5f</summary> ``` dispatch-gates --commands at b03fd5f: 52 commands (1 path changed) first pass: 47 exit 0; 5 exit 3/1 = PREREQUISITE NOT MET (lint, spec, client-react unbuilt), re-run after building the closures under os-verify-lock (VERDICT command-exit 0 both): pnpm --filter '@objectstack/lint...' build ; pnpm --filter '@objectstack/client-react...' build final: 52 of 52 :: exit 0 ✓ dispatch-gates --ran: 52 derived famil(ies) accounted for — 52 run, 0 NOT-MEASURED (a DERIVED zero — all 52 recorded an exit code and none of them is 3). check-release-page-status: OK — 3 GA major(s) in scope (v16, v17, v18) ``` </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01ADHkmRar3Kkg6SpwVgaaVE <!-- signed: repo:objectstack#3 · os-steve · session_01ADHkmRar3Kkg6SpwVgaaVE --> Co-authored-by: Claude <noreply@anthropic.com>
Requested by Sales · project thread
Part of #31908
Clause-②: yes (narrowing) — narrowed:
sys_audit_lognow declareslifecycle.sealon every deployment, soos migrate audit-key-material,audit-mail-bodies,audit-metadata-bodiesandaudit-side-copieswith--applyrefuse 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 verifyexits 1 on a row it readslateand unsealed (the S4 arm);os audit verifyrefuses witharchive_not_connectedand exits 2 where thearchivedatasource 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;verifyAuditLedgerthrows forsys_audit_logwhen itsarchivedatasource is not connected and noarchiveis passed; on a sealed object with noarchivewhose lifecycle is declared in packaged metadata, a retention override below the declared window, global or for one organization, is rejected (reported aterror, 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; theos audit verifyarms hold for it as for any sealed object. This breaks the bound changeset35c9a30(#33675) set ("a deployment that did not opt in sees no change"). Widened:LifecycleService.registerExpiryPrefixand theLifecycleExpiryPrefix*types (the request withtenantsandtenantColumn),takesSignedExpiryandSignedExpiryRegistryLike, three optional owner reads onLifecycleEngineLike.registry,policy: 'expiry', the skip reasonsseal-expiry-pendingandseal-delete-unsupported.Metadata-protocol: semantic — beside
lifecycle.seal, the authoredretention.maxAge,ttl.expireAfterandarchive.keepno 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 packagesminor)Skills-docs: #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 (hencePart of, notFixes)维护者速读
os migrate audit-*(包括升级流程里的audit-side-copies --apply)会被拒,要先停掉服务再带--sealer-stopped;Postgres 和 MySQL 会先等封存锁,最多等 10 分钟。sys_audit_log过了archive.keep也会一直留着,封存器每小时报一次 error。出错时只会多留、不会多删:链条有缺口、签名不可信、检查点或到期说明不属于这条链、前后接不上,都一律保留并告警一次。sys_audit_log)上,覆盖仍然决定什么时候转入归档。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.tschanges one.describe()sentence only, and theskills/**wording fix is split into this claim's second PR (amendment 7193137455), Tier H on its own. The release pagecontent/docs/releases/v18/18-6.mdxis release-owned and is not edited here (AGENTS.md "Documentation Guardrails").What changes
ADR-0154 D8 + D10, slice P4c, the last slice of #31908.
sys_audit_logis sealed by default. Its lifecycle now declaresseal: { valueFields: ['old_value', 'new_value', 'metadata'] }(packages/plugins/plugin-audit/src/objects/sys-audit-log.object.ts). The chain column is the defaulttenant_id(a lookup, one text value on every store).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 publicregisterExpiryPrefix(expiry)(the name slice plan 6759503769 ruled) (one slot; a later registration replaces it; the disposer clears only its own) and the typesLifecycleExpiryPrefix,LifecycleExpiryPrefixRequest,LifecycleExpiryPrefixRun. For an object withlifecycle.seal:retention.maxAge/ttl.expireAfterlegs and the archive'skeepprune never delete by a row cutoff; each asks the seam toplan({ object, policy, policyValue, cutoff, tenants?, tenantColumn? });rowIdsare deleted by id (hot and archive for an archiving object; through the engine, reap guards asked, for the rest), andrun.complete()is called only when every one is gone;seal-expiry-pending, and onewarnsays so;reap()uses, through the same floors) travels astenants, with the column it is set on (tenantColumn), which need not be the chain column (review 7202871622 S4);bulkDeleteis never planned (seal-delete-unsupported), so no amendment is signed over rows it could not delete.audit-seal/expiry.ts,AuditSealer.expire, registration inaudit-plugin.ts):tenantColumnis 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;expiryamendment (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;audit.sealerlock 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;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 declareslifecycle.sealand noarchive, at its declaredretention.maxAgeandttl.expireAfter(newaudit-seal/retention-floor.ts), and registers it again before every sealer pass (newAuditSealerOptions.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 aterror. An archiving sealed object expires only pastarchive.keep, which takes no override;last_sequence,last_removed_digest), and the object floor to the newest admittedcovered_to; both, like the expiry, read stored amendments page by page until an admitted one answers.windowcheckpoint names is sealed, so a lagging chain's rows readlateand unsealed. It also holds an honoured expiry to what it signed: an amendment stored under another chain than its signed organization is achain_keyfault, as a checkpoint is, and a checkpoint in an honoured range readsexpiredonly within the window the range covers (review 7202871622 M3).packages/verify/src/harness.ts, ruling 6884540128 item 4): anAuditPluginthatbootStackmounts (extra, stackplugins, orrequires: ['audit']provider) adoptsharnessCryptoProvider(), the instance settings and the engine get; an instance with its own provider keeps it.lifecycle.sealdescribe sentence (and the regeneratedcontent/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 thatsys_audit_logdeclares the block),content/docs/deployment/cli.mdx(the audit seal lock and--sealer-stoppedfor 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 realSchemaRegistry, 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.keepplan on both stores and complete-after-delete;retention.maxAgeper-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 nobulkDeleteis 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):takesSignedExpiryanswers yes only when the registry places the object in packaged metadata: a registry that cannot be asked answers no; an installedcodeormarketplacesource answers yes, anauthoredor 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 anarchivedatasource.sys_audit_logsealed by its own declaration; the plugin's sealer seals; an interrupted expiry (amendment stored, rows still there) readsexpired; 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 windowsunmodifiedin hot and in archive; a fully expired chain's next checkpoint links tolast_removed_digest;modified,missingandredactedare 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 thepolicy_change_logshape over the sealer itself (declaredtenant_id, injectedorganization_id, the two values differing): windows ontenant_idexpire each organization's chain under its own window, windows onorganization_idkeep 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 achain_keyfault; a checkpoint whose window ends past its honoured range'scovered_tois judged, not readexpired(M3).audit-seal-sealer.test.ts(+1): the S4 sole-chain window readslateunsealed andokfalse.audit-seal-retention-floor.test.ts(new, 10, review 7207510869, S7 of 7209130288 and seat rulings 7209154881, 7210805783): over a realLifecycleServiceand 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.packages/cli/src/commands/audit/verify.integration.test.tsandverify.ownership-queue.integration.test.tsnow expectsys_audit_logbeside the fixture ledger inobjectsand 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 fouros migrate audit-*archive and preview integration files (audit-mail-bodies.archive,audit-key-material.archive,audit-side-copies.archive,preview-read-only) pass--sealer-stoppedon their SQLite--applyruns (andpreview-read-only, now judged by the test-source alias gate's source reach, pays its twelve dynamic imports at module top); the twoos 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--applyruns; and in plugin-audit,audit-seal-chain-field-34164.test.tspassesarchive: () => 'none'(its boot connects no archive datasource, asos audit verifyestablishes), andaudit-seal-host-seam-resolve-34280.integration.test.tsforgets what the loop's own first pass reported before each pin counts its own passes.Ablations (each restored, blob == HEAD)
|| start <= this.newestSealedWindow()→|| false: the new sole-chain pin goes red (expected [] to deeply equal [ Array(1) ]), 1 failed | 57 passed.if (lc.seal) return this.reapSealed(…)disabled: 5 of the 9 new lifecycle pins go red.if (lc.seal) {disabled: the two archive pins go red.chain_keyfault 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.Acceptance notes
AuditPluginhas no crypto provider now keepssys_audit_logrows pastarchive.keepinstead of pruning them, says so once per process atwarn, and its sealer reports the missing provider hourly aterror. An expiry, once run, deletes for good.os migrate audit-* --applyon SQLite or Turso now needs--sealer-stoppedwhenever it rewritessys_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).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_logamong them), an override still sets when rows move to the archive, andarchive.keeptakes no override.organization_idcolumn, 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_logitself archives, andkeephas no override.os audit verifyon a deployment with noarchivedatasource anywhere already reads the hot store alone ('none'); a library caller ofverifyAuditLedgerthat composes no archive must now passarchiveforsys_audit_log, as the adjusted test does.os audit verifyintegration pins, the four CLIos 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 newaudit-seal-expiry-window.test.tsandaudit-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.jsonand the plugin-audit tenant-audit census page (both regenerated by their own--write). Named here for the seat's claim amendment.os servecomposition is unchanged (it already hands its host provider toAuditPlugin, P4b).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 isPart of #31908.registerExpiryPrefixas 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 nochain_keyas its key. These last two have no pin of their own: neither changes a result on a store the platform writes.Verification
Two-minute check:
cd packages/plugins/plugin-audit && pnpm exec vitest run src/audit-seal/audit-seal-expiry-live.integration.test.ts— expectTests 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).Local runs at ff14eb2 (each under os-verify-lock, exit captured before any pipe)
pnpm turbo run buildover spec, objectql, plugin-audit and verify: exit 0.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 --noEmitof plugin-audit (with its test-typecheck layer) and objectql, andeslinton the changed sources: exit 0.gen:schema && gen:docsregeneratedcontent/docs/references/data/object.mdx.dispatch-gates --commands: 142 derived, 141 exit 0. One NOT MEASURED:check-plugin-teardown-shape --self-testexits 3, PREREQUISITE NOT MET (needs an unshallow clone).turbo run build --filter='@objectstack/dogfood^...'73 of 73 tasks, thenpnpm --filter @objectstack/dogfood test: Test Files 488 passed | 3 skipped (491), Tests 4135 passed | 68 skipped (4203), exit 0.overlap-checkat ff14eb2: merges cleanly with origin/main c826e8a and the PR heads sharingcontent/docs/deployment/cli.mdx(fix(lint)!: three publish-time checks for seeds, flow nodes and actions that save and do not work #37807, refactor(spec)!: rename the Studio helper defineForm to defineMetadataForm and its modules to *.metadata-form.ts #37366).Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgUd6hon2o34LQSLbZt