Add node-local snapshot inspection to test infrastructure - #8317
Merged
Amaury Chamayou (achamayou) merged 9 commits intoSep 9, 2026
Merged
Amaury Chamayou (achamayou) merged 9 commits into
Amaury Chamayou (achamayou) merged 9 commits into
Conversation
Add node-local committed snapshot listing and passive target-seqno waiting. Migrate timing, election, and persistence callers without changing generation or recovery-copy behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove the helper-only snapshot file tests and their CMake registration. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use the existing snapshot trigger's target when reading governance history. Compare recovery snapshot files in place, including read-only inputs, without copying into common_dir. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The migrated end-to-end scenarios remain unexecuted, including the passive governance snapshot wait.
Pull request overview
Adds node-local snapshot inspection and waiting helpers, migrating tests away from unnecessary copying and transaction generation.
Changes:
- Adds sorted snapshot listing and passive waiting to
Node. - Updates governance, recovery, timing, and persistence tests.
- Preserves checks across writable and read-only snapshot directories.
File summaries
| File | Description |
|---|---|
tests/recovery_snapshot_endorsements.py |
Verifies snapshot bytes in writable and read-only directories. |
tests/infra/node.py |
Adds node-local snapshot listing and waiting helpers. |
tests/governance_history.py |
Selects the snapshot covering the target sequence number. |
tests/e2e_operations.py |
Migrates snapshot timing, election, and persistence checks. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
cjen1-msft
marked this pull request as ready for review
September 9, 2026 08:58
Amaury Chamayou (achamayou)
left a comment
Member
There was a problem hiding this comment.
No actionable issues found.
Custom instructions used
.github/copilot-instructions.md.github/instructions/reviewing.instructions.md
Amaury Chamayou (achamayou)
approved these changes
Sep 9, 2026
Amaury Chamayou (achamayou)
enabled auto-merge (squash)
September 9, 2026 13:52
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.
Network.get_committed_snapshots()combines snapshot generation, waiting, and copying intocommon_dir. Tests that only inspect files or wait for a snapshot do not need those copies: the nodes' directories are already accessible locally.Add two helpers on
Node:get_snapshots()returns committed file paths sorted by snapshot seqno. Read-only startup snapshots requireinclude_read_only=True.wait_for_snapshot(target_seqno)waits in that node's writable directory for a committed snapshot whose state seqno covers the target.Neither helper sends requests, generates transactions, or copies files. Returned paths remain node-owned; callers needing durable or mutable copies must copy them explicitly.
Migrate readers in three files:
e2e_operations.py: election and time-based snapshot waits, plus per-node persistence inventory. Callers sample the commit target explicitly, and counts still deduplicate by filename.governance_history.py: read the snapshot covering the target from the existing ledger-chunk setup, rather than the arbitrary last entry fromos.listdir(). This removes the old helper's additional ack transactions and relies on normal signature progress to commit the snapshot.recovery_snapshot_endorsements.py: compare snapshot bytes in place, including read-only inputs. If a filename exists in both directories, check both copies rather than merging them.First part of the replacement for #7783. Explicit generation, recovery, joins, and corruption/LTS migrations follow separately; the old helper remains for those callers.
scripts/ci-checks.shpasses. The targeted timing and persistence runs were blocked at startup by the missingloggingexecutable. The migrated end-to-end scenarios still need execution, particularly the governance reader's passive snapshot wait.