fix(e2e): ground-truth pool verdict + earned Tari lag tolerance (#746)#747
Merged
Conversation
Two Tor-timing flakes hit 2 of 4 runs during the v1.12.0 cut; neither was a code defect (same ref passed 374/0 and 380/0 on the clean runs): - pool type: after a sidechain switch the dashboard's peer-port classifier can keep reporting the PRE-switch pool — determinate, wrong, and transient — and both assert_scenario and assert_pool_switched hard-failed it as a "render bug". New shared assert_pool_type consults the ground truth the harness never checked: the rendered P2POOL_FLAGS (--mini/--nano; main carries neither). Correct flags -> classifier-lag WARN (same class as Unknown, #454/#687); wrong flags -> FAIL. The mismatch path now verifies actual flags, so the check is stronger than before, not looser. - tari synced (required): every per-scenario restart sends Tari back through "discovering the target height" ('loading'), which can outlast wait_tari_synced over Tor; the bare assert_eq then fired on an in-progress state — the same cold-read anti-pattern the #687 comment describes. New assert_tari_synced_required earns its tolerance: "done" passes and records TARI_SEEN_DONE; loading/syncing AFTER that proof warns as re-discovery lag; a Tari that never syncs still fails the gate. Both helpers live in lib.sh so the selftest covers every branch (stubbed emitters; 148/0): flags ground truth per pool, all four pool verdicts, and the earned-tolerance matrix including first-look-loading -> FAIL. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Collaborator
Author
|
Live validation complete: targeted e2e with this branch on gouda + borrowed miner-1 — 380 passed / 0 failed / 3 skipped, |
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.
Closes #746. The two Tor-timing flakes that hit 2 of 4 e2e runs during the v1.12.0 cut (neither a code defect — the same ref passed 374/0 and 380/0 on clean runs).
Pool type — check the ground truth, not just the classifier
After a sidechain switch, p2pool runs the NEW
--mini/--nanoflags while the dashboard's peer-port classifier can still report the pre-switch pool — determinate, wrong, and transient. Bothassert_scenarioandassert_pool_switchedhard-failed that as a "render bug". New sharedassert_pool_typeadds the check the harness never made: the renderedP2POOL_FLAGS.The mismatch path now verifies actual flags, so this is a stronger check than the old hard-fail.
Tari — earned lag tolerance
Every per-scenario restart sends Tari back through "discovering the target height" (
loading), which can outlastwait_tari_syncedover Tor; the bareassert_eqthen fired on an in-progress state (the cold-read anti-pattern the harness's own #687 comment describes — it passed in 3 of 4 scenarios of the failing run). Newassert_tari_synced_required:donepasses and recordsTARI_SEEN_DONE;loading/syncingafter that proof warns as re-discovery lag; a Tari that never syncs still fails the gate — the tolerance is earned, not free.Validation
TARI_SEEN_DONEside effect).make lint-shclean.