Repository navigation
test(cron): make transient-conflict grace regression deterministic - #575
Merged
Merged
Conversation
Replace the 150 ms wall-clock assumption with database agreement fixtures. Exercise a transient conflict returning to the same manifest and assert publication clears durable agreement before retirement can resume.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 15 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. CodeRabbit Verify
|
hardbyte
marked this pull request as ready for review
November 3, 2026 02:18
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Fix a timing-dependent assertion in
transient_conflict_resets_grace_between_leader_passes. The old test required database publication and reconciliation to finish within 150 ms. When that real grace period elapsed on a busy runner, correct reconciliation could apply and fail!p.applied.Use a 60-second grace and age only
cron_owners.agreed_sincewith database time, following the neighboring restart/evidence-gap test. Remove both 170 ms sleeps. Exercise an already-mature unanimous empty manifest that briefly conflicts and then returns to the same desired hash without an applying leader pass in between. Verify publication clears all three durable agreement fields, restarts grace, keeps the invoice active before expiry, and actually retires it after agreement evidence is aged. The original!appliedand positive remaining-grace assertions remain.Publication calls
evaluate_locked(..., true, false)under the same protocol transaction lock used by reconciliation. Read-only plans do not persist a reset. Keeping the old mature agreement across the mixed window would fail the direct durable-state assertion and permit immediate retirement, failing!applied. Returning to the same hash prevents a hash change from masking that regression. This sensitivity assessment is from code review; no separate code-mutation run was performed. No runtime or schema change is needed.Validation:
4200851fef34cead0d3f9d76e2f171d5ee9086e9: https://github.com/hardbyte/awa/actions/runs/41124659427git diff --check;./scripts/ci-test-shard.sh check(50 test files). Local Cargo checks could not execute because the cloud image has no Rust toolchain; their hosted equivalents passed.5e66d1a78d4bf85bdea0d071c33327b62845592fmatches the local file.f644f321ad110c6436382b64bdc0d935dcdeba5a: https://github.com/hardbyte/awa/actions/runs/41005608495/job/123900802654 (27 passed, 1 failed, 1 ignored).Scope: only the cron reconciliation regression test. PR #572 is untouched. This PR remains a draft; no merge or release was performed.