Skip to content

Test recovery from snapshots produced with expired node certificates - #8175

Merged
Amaury Chamayou (achamayou) merged 10 commits into
mainfrom
copilot/add-test-check-snapshots
Aug 24, 2026
Merged

Test recovery from snapshots produced with expired node certificates#8175
Amaury Chamayou (achamayou) merged 10 commits into
mainfrom
copilot/add-test-check-snapshots

Conversation

Copilot AI commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Recovery must accept snapshots produced after the issuing node's certificate expires. Existing coverage could fall back to an older snapshot or ledger replay.

  • Expired-certificate scenario
    • Backdates the primary's certificate and confirms it is expired.
    • Forces and waits for a subsequent committed snapshot.
  • Isolated recovery
    • Supplies only the post-expiry snapshot.
    • Removes ledger input to prevent fallback.
  • Recovery helper
    • Accepts an explicit snapshot directory for focused recovery cases.

Closes #6553

Co-authored-by: achamayou <4016369+achamayou@users.noreply.github.com>
Copilot AI changed the title [WIP] Add test to check snapshots with expired node cert for recovery Test recovery from snapshots produced with expired node certificates Aug 18, 2026
@achamayou
Amaury Chamayou (achamayou) requested a balanced review from Copilot August 19, 2026 07:10
@achamayou
Amaury Chamayou (achamayou) marked this pull request as ready for review August 19, 2026 07:15
@achamayou
Amaury Chamayou (achamayou) requested a review from a team as a code owner August 19, 2026 07:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Adds a regression test to ensure service recovery accepts snapshots created after the issuing node’s TLS certificate has expired, and updates the recovery helper to support recovering from an explicit snapshots directory (preventing fallback to older snapshots/ledger replay).

Changes:

  • Extend test_recover_service to accept an explicit snapshots_dir override.
  • Add an end-to-end test that backdates a node cert to be expired, forces a committed snapshot, and recovers from that snapshot alone.
  • Register the new recovery scenario in the test runner.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tests/recovery.py
Comment thread tests/recovery.py
Comment thread tests/recovery.py Outdated
Comment thread tests/recovery.py Outdated
Capture the isolated snapshot after the recovery requirement issues its tracked transactions, and scope temporary state and CA verification changes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Skip historical range verification when shutting down the recovery network because this test intentionally provides no pre-snapshot ledger.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 66397969-1156-4f98-ac66-f9acef8dc11b
@achamayou
Amaury Chamayou (achamayou) merged commit 2fdc051 into main Aug 24, 2026
19 checks passed
@achamayou
Amaury Chamayou (achamayou) deleted the copilot/add-test-check-snapshots branch August 24, 2026 14:24
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.

Add test to check snapshots issued by nodes with expired node cert can be used for recovery

4 participants