Validate C++ disaster recovery traces with Lean - #8282
Draft
Amaury Chamayou (achamayou) wants to merge 6 commits into
Draft
Validate C++ disaster recovery traces with Lean#8282Amaury Chamayou (achamayou) wants to merge 6 commits into
Amaury Chamayou (achamayou) wants to merge 6 commits into
Conversation
Amaury Chamayou (achamayou)
force-pushed
the
achamayou-fluffy-parakeet
branch
from
September 4, 2026 18:47
a443db8 to
89872d7
Compare
Amaury Chamayou (achamayou)
force-pushed
the
achamayou-fluffy-parakeet
branch
from
September 4, 2026 22:18
89872d7 to
7721ba2
Compare
Request host restart only from the committed JOINING state hook so aborted recovery transactions cannot trigger a restart. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Gate versioned RDP_TRACE records behind CCF_RECOVERY_TRACE and publish receive, timeout, effect, and retry-send events only at their required commit boundaries. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replay strict version 1 recovery traces against the canonical model through a local package dependency, with focused rejection tests, no-sorry checks, documentation, and a shallow workflow. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Validate trace identity, per-node sequences, message IDs, and causal edges before producing a deterministic NDJSON linearization for the isolated Lean validator. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Build the isolated validator in Milan and Genoa trace-enabled jobs, validate quorum, failover, and repeated-timeout recoveries, and retain generated NDJSON artifacts on failure. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Exercise the focused Python extraction and causal-ordering suite in the dedicated trace workflow. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Amaury Chamayou (achamayou)
force-pushed
the
achamayou-fluffy-parakeet
branch
from
September 4, 2026 23:31
7721ba2 to
b49f888
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part 4/4 of the replacement stack for #8241. This PR validates real C++ recovery-decision-protocol executions against the permanent Lean model introduced below it.
Stack:
This PR depends on draft deletion PR #8280 and must remain gated until the lower layers are ready.
Approach
JOININGstate transaction globally commits in both default and trace-enabled builds. In trace-enabled builds, the committedjoin_restartobservation is emitted before restart is requested. This is a commit-before-restart guarantee, not an exactly-once guarantee.CCF_RECOVERY_TRACEoption, a commit-aware trace table, versionedRDP_TRACErecords, per-node sequences, message IDs, causal IDs, exact ordered retry-send batches, accepted receives, committed timeouts, and one-shot effects.lean/disaster-recovery-trace/. It depends locally on../disaster-recoveryand imports onlyDisasterRecovery.Protocol.Model; no trace modules or targets are added to the canonical package.ccf.recovery_decision_protocol.trace/1NDJSON contract. The validator rejects the shortest incompatible prefix and checks parser/replay behavior without treating synthetic tests as implementation evidence.*.recovery.ndjson, and invokes the isolated validator.Evidence and isolation
Real captured C++ SNP traces are the implementation conformance evidence. Small in-memory Lean and Python tests cover rejection, extraction, and ordering only.
lean/disaster-recovery/remains byte-for-byte unchanged. This PR does not recreatelean/disaster-recovery-migration/ortla/disaster-recovery/, and contains no migration, Rust, or Stateright code.Validation
node_frontend_testwithCCF_RECOVERY_TRACEboth OFF and ON.node_frontend_testthrough each build'stests.shwrapper.lake exe cache get,lake build, warnings-as-errors/no-sorry checks, andlake exe trace-checksfor the isolated package from a shorter temporary checkout. The generated Copilot worktree path is long enough to expose a local Lake output-directory issue; the same committed package builds successfully at the shorter path used by normal CI checkouts.scripts/ci-checks.sh -fsuccessfully.Gates
Keep this PR in draft while #8280 remains gated. The coordinator will add GitHub preview stack metadata after all four PRs pass preflight.