You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fact-identity hash domains (ledger.*.v2) — renaming changes every fact hash; needs an explicit identity-migration story (dual-hash window or v3 domains) coordinated with the witnessed journal
R2 buckets ledger-raw/ledger-derived and storage.r2 manifest keys; ledger.db artifact filename
Each frozen surface is load-bearing in one of three different ways, so this is three migrations, not one rename. Historical bytes migrate nowhere under any of them — witnessed history keeping ledger-era names is a feature, the same way the immutable releases/README.md is: the record shows what things were called when they were recorded.
1. Fact identity — migrate by epoch, never in place
The hash domains (ledger.aggregate_fact.v2, ledger.semantic_fact.v2, assertion ids av2:) sit inside every fact key, golden, witnessed row, and registered-target binding. Renaming in place invalidates all of them simultaneously; the correct move is the av1→av2 precedent:
Introduce chronicle.*.v3 domains for newly emitted facts at a declared cutover release.
Dual-domain acceptance in every validator, landed in lockstep before the cutover: chronicle build/load, microcosm require_pins row validation, the brier append gate (which recomputes keys byte-identically with the chronicle side — both move together or neither), and the vidimus append_gate/release_chain spec pins. The vidimus change requires a pins update plus a fresh byte-equivalence re-proof at chronicle's then-current pin, per the standing rule in the shims.
ledger.*.v2 hashes stay valid as history forever. No golden regenerates; no witnessed row rewrites. Consumers distinguish era by domain prefix, which is the point.
Schema ids (ledger.bundle*.v1, ledger.consumer_fact.v1, …) ride the same mechanism: v2 schema ids are chronicle-named, v1 stays parseable, emit flips at cutover.
2. The journal — migrate by witnessed continuation
The codex/thesis-ledger-facts branch, journal data paths, and pin bindings can move only the way the journal itself moves: append-forward, witnessed.
Repoint the brier pin and the site in lockstep. The pin validator accepts the historical branch string for historical v3 registration snapshots — their contract hashes contain thesis-ledger-facts and remain true statements about the past — and requires the new name from the continuation release forward.
Thesis session owns the canonical-URL and witness-pin halves (already noted in the issue body); coordinate the cutover release with them so both land in one witnessed step.
3. Operational stores — migrate by dual-run
R2 buckets, ledger.db, the Supabase "ledger" schema and mirror tables, env names, role ids, concept authorities: new chronicle-named homes for new writes, backfill, repoint consumers, retire the old — with one hard exception: archived witness records pin raw R2 URLs by hash. ledger-raw/ledger-derived go read-only-preserved forever; nothing archived is rewritten or moved. Env names get a dual-read window (CHRONICLE_* preferred, LEDGER_* honored with a deprecation warning) so María's publish flow and the microcosm build scripts migrate on their own schedule; the CLI ledger alias retires last, after both are confirmed off it.
Sequencing and gates
Epoch (1) first — it unblocks nothing else but touches the most validators, so it wants the longest bake. Journal continuation (2) second, as a single witnessed step. Infra (3) third, piecewise and boring. Each phase behind the existing gates: dual-domain validators land with adversarial tests before any emit flips; the continuation release is judged by the append gate like any other; vidimus equivalence re-proof precedes the consumption bump.
Out of scope, deliberately: microcosm-dynamics (its own repin ceremony, microcosm-dynamics#373, dynamics lane owns it — "ledger" there is generic vocabulary inside registered keys); all committed goldens, fixtures, and recorded traces; anything under releases/ (byte-immutable post-genesis).
Open context worth tracking alongside: residuals R2/R5/R9 from the July hardening reviews (feed-dir publication, typed periods on US-fiscal paths, allowedHosts provenance), and Thesis's USAspending contract-controls-outcome fix, which must land before any registration references those templates.
Execution started 2026-09-02, per the three-mechanism spec above. Three PRs are in preparation and will link back here:
Mechanism 1, step 1 (this repo): dual-domain acceptance — chronicle-era hash domains (chronicle.*.v3) and chronicle-named schema ids accepted by every reader/validator, emit unchanged. The emit flip is a later PR gated on the consumer validators.
Mechanism 3, slice 1 (this repo):CHRONICLE_* env names with LEDGER_* fallback and deprecation warning, chronicle.db for new suite outputs (ledger.db still read), R2 bucket names configurable with defaults unchanged, plus a documented bucket-cutover checklist. Supabase schema/table names and the ledger CLI alias stay for later slices.
Consumer side (PolicyEngine/microcosm): accept both consumer-artifact schema ids and both key epochs; CHRONICLE_* env names.
Gates that are not code:
Creating chronicle-raw / chronicle-derived on the pinned Cloudflare account needs an R2-scoped login (the current wrangler token has user:read only).
Thesis-side pins (scripts/pin_ledger.py, verify_custody.py, witness_upstream_ledger.py, three workflows) hard-compare the branch string; they move with the continuation release, owned by the Thesis lane.
Mechanism 3 progress (2026-09-02): chronicle-raw and chronicle-derived now exist on the pinned account. Backfill of ledger-raw → chronicle-raw is complete: all 156 manifest-declared raw objects are present in the new bucket at their recorded keys, each verified against the sha256 in the key, with a hash-verified readback. Twelve of them had never been uploaded to ledger-raw at all despite manifests recording a URI there; they were recovered from publishers (8, byte-exact) or tracked repo copies (4) and written to both buckets at the recorded keys, so nothing archived was rewritten and the recorded URIs are now true. Details and the three follow-ups (R2-verify in inventory, IRS re-publication of the 2022 IRA tables, OBR blocking unattended fetch) are in #225.
ledger-derived cannot be enumerated with the current tooling (no object-list command in wrangler; remote dev needs a workers.dev subdomain on the account), so its dual-run starts with new writes only; backfill follows once listing is possible. Bucket defaults stay on ledger-* until the slice-1 PR lands and the consumers repoint.
Consumer side, mechanism 1 step 1 (2026-09-07): PolicyEngine/microcosm#849 merged to main (396df96f), rebased onto current main with CI green (23/23).
What landed:
Consumer-artifact manifests load under every id a producer stamps: Microcosm's own minted policyengine_ledger.consumer_artifact.v1, the policyengine_ledger.consumer_artifact.v2 Chronicle emits today, and policyengine_chronicle.consumer_artifact.v3 after the flip. Per-row ledger.consumer_fact.v1 / chronicle.consumer_fact.v2 alike. Only the manifest id is gated; row ids and fact keys are carried as published.
The declared identity table (microcosm.build.chronicle_epoch) matches chronicle/epoch.py from Epoch prep: accept chronicle-era fact domains and schema ids; emit unchanged (#143, mechanism 1) #228 pair for pair. Provenance and the UK run's build record now witness which era resolved the targets (schema_epoch, fact_key_epochs, undeclared_fact_key_domains, fact_schema_versions); an undeclared chronicle.* spelling is reported, never counted as an era.
Verified on the real UK feed (128,717 rows, v2 manifest): loads on the branch, refused on main, no undeclared domains.
The env half reduces to nothing on this side: Microcosm reads no Chronicle env names and never invoked the ledger CLI. The only ledger-named variables were the Logbook store's POPULACE_LEDGER_*, which the branch moves to LOGBOOK_* (microcosm#632), per the correction on #849.
Next: the emit-flip PR, gated on #849 merging and on the Thesis-side validators — the pin scripts compare the journal branch string and bytes rather than fact keys, so the brier append-gate half of that gate still needs its dual acceptance confirmed. #226 (mechanism 3, slice 1) awaits re-gate. Mechanism 2's gates are met (#182/#183 closed, OTS proofs 0000–0019 committed, daily anchor green) but the continuation release is not cut. Supabase schema and mirror tables, governance role ids, and the ledger CLI alias are untouched.
Activity
MaxGhenis commentedon Aug 20, 2026
Migration spec: three mechanisms, strict order
Each frozen surface is load-bearing in one of three different ways, so this is three migrations, not one rename. Historical bytes migrate nowhere under any of them — witnessed history keeping ledger-era names is a feature, the same way the immutable
releases/README.mdis: the record shows what things were called when they were recorded.1. Fact identity — migrate by epoch, never in place
The hash domains (
ledger.aggregate_fact.v2,ledger.semantic_fact.v2, assertion idsav2:) sit inside every fact key, golden, witnessed row, and registered-target binding. Renaming in place invalidates all of them simultaneously; the correct move is the av1→av2 precedent:chronicle.*.v3domains for newly emitted facts at a declared cutover release.require_pinsrow validation, the brier append gate (which recomputes keys byte-identically with the chronicle side — both move together or neither), and the vidimusappend_gate/release_chainspec pins. The vidimus change requires a pins update plus a fresh byte-equivalence re-proof at chronicle's then-current pin, per the standing rule in the shims.ledger.*.v2hashes stay valid as history forever. No golden regenerates; no witnessed row rewrites. Consumers distinguish era by domain prefix, which is the point.ledger.bundle*.v1,ledger.consumer_fact.v1, …) ride the same mechanism: v2 schema ids are chronicle-named, v1 stays parseable, emit flips at cutover.2. The journal — migrate by witnessed continuation
The
codex/thesis-ledger-factsbranch, journal data paths, and pin bindings can move only the way the journal itself moves: append-forward, witnessed.thesis-ledger-factsand remain true statements about the past — and requires the new name from the continuation release forward.3. Operational stores — migrate by dual-run
R2 buckets,
ledger.db, the Supabase"ledger"schema and mirror tables, env names, role ids, concept authorities: new chronicle-named homes for new writes, backfill, repoint consumers, retire the old — with one hard exception: archived witness records pin raw R2 URLs by hash.ledger-raw/ledger-derivedgo read-only-preserved forever; nothing archived is rewritten or moved. Env names get a dual-read window (CHRONICLE_*preferred,LEDGER_*honored with a deprecation warning) so María's publish flow and the microcosm build scripts migrate on their own schedule; the CLIledgeralias retires last, after both are confirmed off it.Sequencing and gates
Epoch (1) first — it unblocks nothing else but touches the most validators, so it wants the longest bake. Journal continuation (2) second, as a single witnessed step. Infra (3) third, piecewise and boring. Each phase behind the existing gates: dual-domain validators land with adversarial tests before any emit flips; the continuation release is judged by the append gate like any other; vidimus equivalence re-proof precedes the consumption bump.
Out of scope, deliberately: microcosm-dynamics (its own repin ceremony, microcosm-dynamics#373, dynamics lane owns it — "ledger" there is generic vocabulary inside registered keys); all committed goldens, fixtures, and recorded traces; anything under
releases/(byte-immutable post-genesis).Open context worth tracking alongside: residuals R2/R5/R9 from the July hardening reviews (feed-dir publication, typed periods on US-fiscal paths, allowedHosts provenance), and Thesis's USAspending contract-controls-outcome fix, which must land before any registration references those templates.
MaxGhenis commentedon Sep 2, 2026
Execution started 2026-09-02, per the three-mechanism spec above. Three PRs are in preparation and will link back here:
chronicle.*.v3) and chronicle-named schema ids accepted by every reader/validator, emit unchanged. The emit flip is a later PR gated on the consumer validators.CHRONICLE_*env names withLEDGER_*fallback and deprecation warning,chronicle.dbfor new suite outputs (ledger.dbstill read), R2 bucket names configurable with defaults unchanged, plus a documented bucket-cutover checklist. Supabase schema/table names and theledgerCLI alias stay for later slices.CHRONICLE_*env names.Gates that are not code:
chronicle-raw/chronicle-derivedon the pinned Cloudflare account needs an R2-scoped login (the current wrangler token hasuser:readonly).scripts/pin_ledger.py,verify_custody.py,witness_upstream_ledger.py, three workflows) hard-compare the branch string; they move with the continuation release, owned by the Thesis lane.MaxGhenis commentedon Sep 2, 2026
Mechanism 3 progress (2026-09-02):
chronicle-rawandchronicle-derivednow exist on the pinned account. Backfill ofledger-raw→chronicle-rawis complete: all 156 manifest-declared raw objects are present in the new bucket at their recorded keys, each verified against the sha256 in the key, with a hash-verified readback. Twelve of them had never been uploaded toledger-rawat all despite manifests recording a URI there; they were recovered from publishers (8, byte-exact) or tracked repo copies (4) and written to both buckets at the recorded keys, so nothing archived was rewritten and the recorded URIs are now true. Details and the three follow-ups (R2-verify in inventory, IRS re-publication of the 2022 IRA tables, OBR blocking unattended fetch) are in #225.ledger-derivedcannot be enumerated with the current tooling (no object-list command in wrangler; remote dev needs a workers.dev subdomain on the account), so its dual-run starts with new writes only; backfill follows once listing is possible. Bucket defaults stay onledger-*until the slice-1 PR lands and the consumers repoint.Merge pull request #228 from PolicyEngine/epoch-dual-domain
Accept chronicle-era Chronicle schema ids and add the CHRONICLE_* env…
juaristi22 commentedon Sep 7, 2026
Consumer side, mechanism 1 step 1 (2026-09-07): PolicyEngine/microcosm#849 merged to
main(396df96f), rebased onto currentmainwith CI green (23/23).What landed:
policyengine_ledger.consumer_artifact.v1, thepolicyengine_ledger.consumer_artifact.v2Chronicle emits today, andpolicyengine_chronicle.consumer_artifact.v3after the flip. Per-rowledger.consumer_fact.v1/chronicle.consumer_fact.v2alike. Only the manifest id is gated; row ids and fact keys are carried as published.microcosm.build.chronicle_epoch) matcheschronicle/epoch.pyfrom Epoch prep: accept chronicle-era fact domains and schema ids; emit unchanged (#143, mechanism 1) #228 pair for pair. Provenance and the UK run's build record now witness which era resolved the targets (schema_epoch,fact_key_epochs,undeclared_fact_key_domains,fact_schema_versions); an undeclaredchronicle.*spelling is reported, never counted as an era.main, no undeclared domains.ledgerCLI. The only ledger-named variables were the Logbook store'sPOPULACE_LEDGER_*, which the branch moves toLOGBOOK_*(microcosm#632), per the correction on #849.Next: the emit-flip PR, gated on #849 merging and on the Thesis-side validators — the pin scripts compare the journal branch string and bytes rather than fact keys, so the brier append-gate half of that gate still needs its dual acceptance confirmed. #226 (mechanism 3, slice 1) awaits re-gate. Mechanism 2's gates are met (#182/#183 closed, OTS proofs 0000–0019 committed, daily anchor green) but the continuation release is not cut. Supabase schema and mirror tables, governance role ids, and the
ledgerCLI alias are untouched.Narrow the retirement record's claim about the rename plan