Skip to content

release: promote DG-R R01 and R02 (legacy-day rebuild) to main - #532

Merged
NeoNix-Lab merged 9 commits into
mainfrom
implement/fid
Oct 25, 2026
Merged

NeoNix-Lab merged 9 commits into
mainfrom
implement/fid

Conversation

@NeoNix-Lab

Copy link
Copy Markdown
Owner

release: promote DG-R R01 and R02 (legacy-day rebuild) from implement/fid to main

Promotes the two post-version DG-R atoms merged on implement/fid since the last promotion (#529, 87930b3). Code, tests, a runbook section and CI jobs only: no governance, schema, ADR or contract file changes, and nothing runs on the server by being merged.

What is promoted

Evidence

Not claimed

  • No run on the server and none on real data. The real 2026-10-20 rebuild, the 31-date inventory and the real manifests of the legacy days are the operator's, from a reviewed plan.
  • Governance credit of R01/R02 is a separate governance issue, not part of this promotion.

After the merge

A tag on the merge commit, then the server promotion by the operator (clean tree, fast-forward only), as in docs/engineering/.

🤖 Generated with Claude Code

NeoNix-Lab and others added 9 commits October 25, 2026 10:12
… (ADR-0074 A2.3) (#519)

Appends one new quality report (a fail that retires a valid revision, or a pass that restores it)
for the current live revision of one natural partition, then runs the existing A16 lifecycle seam.
The report is filed under the same suite and profile as the assessment it supersedes, copies its
bound evidence unchanged, carries metrics.supersedes_assessment_signature = the exact signature of
the current leaf, and must pass current_partition_report before anything is written. Idempotent;
refuses a superseded, writing or closed revision, foreign evidence, a different dataset or key.
Two short transactions (report, then the seam); a crash between them converges on a repeat.

Tests: unit (argument rules), real-PostgreSQL gate (retire/restore, supersession link, evidence
copy, reads exclude the retired revision under every policy, bytes/manifests/reports untouched,
refusals write nothing, a concurrent S13 publication waits for the writer, no lock held after,
crash window), a CI job, mutation: 22 mutants, 0 survivors.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…seding-reassessment

data: R01 - superseding reassessment writer for a live revision (ADR-0074 A2.3)
… days (ADR-0074 A2) (#520)

Plan (read-only, with a digest), execute (one day at a time: retire with R01, import the archive
day as revision 1 of dt=<day>/seg=000000.000 through S13/S14, verify) and verify, restore, as
tools/rebuild_bybit_legacy_days.py over application/bybit_legacy_day_rebuild.py.

- Importer variant: the invalid live revision of the exact key dt=<day> does not occupy the day;
  any other partition of the day still refuses; the key is fixed; the lock is the day's.
- Refusals: open day (< 24 h), live slice, checkpoint binding, open gap, incumbent not valid (or
  invalid but not retired by this operation for the same archive), failed strict parsing, and
  conservation (every incumbent record exists in the archive file of its own day with equal
  fields, and that day is readable afterwards). Nothing changes for a refused day.
- The digest binds what the operation depends on, not its progress: a crash between steps is
  recovered by running the same plan; anything changed makes it stale.
- Runbook section 6. Real-PostgreSQL gate and CI job; 34 mutants, 0 survivors; the rebuild of a
  pilot-sized synthetic day (1,568,861 rows) measured.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… plan digest (#520)

tests/test_canonical_v1.py inventories every canonical_bytes call site; the plan digest of the
R02 rebuild (sorted-compact-ascii-v1, allow_nan False) is declared there like the other
application codecs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…in the plan, refuse a duplicated trade id (#520 review)

- The live publisher before the slices (#510) wrote partition-manifest-<HHMMSS>.json and coverage-manifest-<HHMMSS>.json in the
  dataset root, not beside the Parquet. The rebuild now looks beside the artifact and then in the root, and the catalog's manifest
  hash chooses the location, so a root file that a later day overwrote in the same second is never taken for this revision's.
- The plan loads the incumbent's manifests with the S13 loader and compares the coverage hashes and ids with those its quality
  reports certified; the coverage and assertion ids are part of the plan's identity. A manifest that does not load or is not the
  certified one refuses the day in the plan, not at the retire.
- A trade id that the incumbent holds twice with different content refuses the day instead of keeping the last row.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…the restore, bind the import to the approved archive hash (#520 review)

- The records of the incumbent that belong to another day must stay served: a valid partition of that day must hold those very records,
  or that day must be in the same plan and not refused (a refused day contributes nothing; the refusal propagates). Decided in the plan,
  before the retire. The plan also binds the hash of every neighbouring archive file it read.
- The restore takes the day's import lock and decides under it: it cannot slip in between the import's check and its publication, so the
  two cannot leave both partitions valid.
- The rebuild import and the verification check the SHA-256 of the bytes they parse against the plan's: a file replaced after the plan is
  refused (SOURCE), a file replaced after the import fails the verification. `verify --plan` binds a standalone verification too.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…digest (#520 review)

`outside_held` (whether a valid partition of another day holds the incumbent's records of that day) turns true when the plan itself
rebuilds that day, so it was progress inside the digest and a crash before the second day's verification made the original plan STALE.
It is left out of the digest; its consequence for the plan is in the refusals, which stay bound, so a change from outside still changes
the digest.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…oo (#520 review)

`outside_held` is out of the digest because the plan's own progress changes it, but the digest then relied on the refusals to notice a
dependency lost from outside, and `_resolve_dependencies` skipped the days already retired or rebuilt. A day retired by something else
between the retire of the first day and its retry therefore left the digest unchanged and the retry completed. Every day that is not
refused is now judged on each planning: the progress of the days of the plan is allowed, the loss of an external dependency is a
refusal, so the digest changes (STALE) before any further change.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
data: R02 - operator-run rebuild of selected closed legacy live days (ADR-0074 Amendment 2)
@NeoNix-Lab
NeoNix-Lab added this pull request to stack #535 October 25, 2026 20:04
@NeoNix-Lab
NeoNix-Lab merged commit 691974b into main Oct 25, 2026
19 checks passed

This branch was successfully deployed

1 active deployment
github-pages — 47ad6123 Deployed Oct 25, 2026 by NeoNix-Lab via deploy #108
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant