Add Phase 3 & 4 resilience tests: chaos, data integrity, and concurrency (tests 58–63)#66
Merged
Merged
Conversation
…ncurrency" Co-authored-by: pinodeca <32303022+pinodeca@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add resilience testing plan and 20 E2E tests
Add Phase 3 & 4 resilience tests: chaos, data integrity, and concurrency (tests 58–63)
Mar 14, 2026
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.
Continues executing the resilience testing plan in
docs/resilience-testing.md. Phases 1, 2, and 5 were already complete (tests 38–57). This PR adds Phases 3 and 4.New tests (58–63)
58_kill_worker_mid_executionpg_terminate_backendon the BGW → PG auto-restarts it in ≤5s (epoch sentinel change confirms); in-flight instance must reach a terminal state59_stuck_instancesrunningindefinitely — no idle timeout;df.cancel()is the only exit60_orphaned_nodesdf.instancesrow leavesdf.nodesrows intact (no FK cascade);df.status()returns gracefully61_table_bloatdf/duroxideschemas62_concurrent_sessionsdf.start(); all produce distinct IDs and complete63_shared_variable_racedf.varsdemonstrated and documentedNew key findings
df.instances/df.nodes— orphaned nodes accumulate silentlydf.varsis per-owner-global — concurrent sessions race on the same key (last writer wins)df.cancel()is the only escapeTest runner
Tests 58, 60, 62, 63 added to the superuser (
postgres) override list inscripts/test-e2e-local.sh— they requirepg_terminate_backend, direct RLS-bypassing table access, or dblink with postgres credentials.Remaining gaps (not addressed here)
D2 (PostgreSQL crash recovery), F2/F3 (signal/cancel vs. completion races), and F5 (concurrent
df.status()lock contention) require a shell-level or timing-sensitive test harness beyond what SQL-only E2E tests support.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.