Commit 06be54e
* fix(objectql): a lax-admitted value withdraws the irreversible half of an ADR-0104 certificate (#4797)
`recordDataMigrationRun` documents that a deployment whose data has regressed
since it last verified closes its own gate — but that only happened when a
migration was re-run. Nothing told the ledger when the data actually regressed.
Normally nothing has to: once `sys_migration` records a verified ADR-0104
migration the write path is strict and a non-conforming value cannot land. The
`OS_ALLOW_LAX_*` escape hatches are the exception, and they exist precisely to
relax a deployment that has already verified. With one on, the value is admitted
and persisted while the row still reads `verified_at` non-null, `blocking: 0` —
so strict rejects that same data the moment the switch goes off, and the reap
guard keeps deleting released field files on a certificate that is no longer
true.
A lax-admitted write now stamps `sys_migration.deviation_observed_at` (with a
`deviation_detail` naming the counterexample) on the migration whose contract it
broke, from the same admit-path sink that already tallies counterexamples for
#4769. The marker does NOT clear `verified_at`: one admitted write is not
evidence of the same order as the full-store scan that earned the certificate,
and revoking on it would turn an explicitly temporary switch into a one-way
door.
Instead authority is withdrawn in proportion to reversibility. Strict
enforcement and tombstoning keep reading `isDataMigrationFlagVerified` and carry
on — a rejected write is retried, a tombstone is lifted on re-attach. The reap
guard's byte delete, which cannot be undone, now reads the stronger
`authorisesIrreversibleAction` / `mayActIrreversibly` and refuses while a
deviation stands. A real `os migrate … --apply` run walks the whole store again
and clears the marker.
Additive and backward compatible: a row written before these columns exist reads
as "no deviation observed", so upgrading never retroactively closes a gate a
deployment earned.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015KREcaEs85dphzUUqdYfX6
* chore: regenerate spec + i18n artifacts for the deviation-marker columns (#4797)
`sys_migration` gained two fields, so the generated baselines follow: the spec
api-surface and export-origins snapshots (0 breaking, 2 added — the new
`authorisesIrreversibleAction` / `hasObservedDeviation` predicates), the
authorable-surface shard, the system reference page, and the four platform-object
translation bundles.
Also pins the new service-storage engine doubles to `assertEngineUpdateDispatch`,
so neither fake is looser than `ObjectQL.update` about what counts as a by-id
write (check:engine-double-contract).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015KREcaEs85dphzUUqdYfX6
* test(service-storage): annotate the reap-engine double's parameters (#4797)
The fake is cast `as any` at the end, so its object-literal members were not
contextually typed and each `object` parameter landed on an implicit any —
three new TS7006s against a package whose type-check DEBT is a shrink-only
ratchet. Annotating them keeps the entry moving in the direction the ratchet
allows (52 recorded, 51 measured).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015KREcaEs85dphzUUqdYfX6
* fix(service-storage): the reap guard's kept-files line no longer mis-diagnoses a deviation (#4797)
The guard is handed a boolean, so it cannot tell WHICH condition closed the
gate — and naming only "migration is not verified" became wrong the moment a
second condition existed. A deployment whose `verified_at` is plainly set would
be told its migration was never verified and sent hunting for a row that says
otherwise.
Both causes are now named, with the pointer to the two columns that distinguish
them. They share one remedy, so the instruction stays unambiguous either way.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015KREcaEs85dphzUUqdYfX6
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 88154be commit 06be54e
19 files changed
Lines changed: 1088 additions & 17 deletions
File tree
- .changeset
- content/docs/references/system
- packages
- objectql/src
- platform-objects/src
- apps/translations
- system
- services/service-storage/src
- spec
- api-surface
- authorable-surface
- export-origins
- src/system
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
103 | 105 | | |
104 | 106 | | |
105 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
280 | 286 | | |
281 | 287 | | |
282 | 288 | | |
| |||
288 | 294 | | |
289 | 295 | | |
290 | 296 | | |
291 | | - | |
| 297 | + | |
292 | 298 | | |
293 | 299 | | |
294 | 300 | | |
| 301 | + | |
295 | 302 | | |
296 | 303 | | |
297 | 304 | | |
| |||
0 commit comments