test(wake): #918 de-flake T7 ack-no-network-block (sub-second timing) #919
Reference in New Issue
Block a user
Delete Branch "fix/wake-918-t7-deflake"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #918
Part of #892
T7 ("ack local-write NEVER blocks on network") measured timing with second-granularity
date +%saround the ack call, then assertedelapsed -lt 2against a backgroundWAKE_ACK_SYNC_CMD="sleep 3; ...". Becausedate +%struncates to whole seconds, a legitimately fast (sub-second) ack that straddles a wall-clock second boundary could read elapsed=2 and fail the assertion — a pre-existing CI-timing flake (observed on Woodpecker pipeline 2057; 20/20 local passes elsewhere, confirming it's timing-resolution, not a real regression).Fix (test-only, no behavior change):
date +%s.%N(sub-second resolution).awk(bash[ ]can't do float/ms comparisons).Verification:
pnpm run test:framework-shellpasses (rc=0) both normally and with openssl masked from PATH (verifiedcommand -v opensslempty in that environment; two openssl-gated HMAC subtests correctly SKIP).Record of Review — PR #919 (issue #918): T7 sub-second timing de-flake — FINAL, CI-GREEN
VERDICT: APPROVE — GO. REVIEWED-HEAD (full-40):
b3dbab6c889a7255769011bbbadd1f8c05d93858. CI: TERMINAL-GREEN at this exact head.Review basis
Independent reviewer
aa1e81ef(≠ buildermosaic-coder) — APPROVE, all 4 criteria PASS, verified against runtime (reproduced, not narrative-trusted):b3dbab6c…; mergeable (no conflicts); PR-author id2 ≠ commit-authormosaic-coder; bodyCloses #918+Part of #892; delta touches ONLYtest-wake-store-ack.sh(12+/4−); no manifest bump (consistent with test-only precedentb0d78d86/#861).date +%s.%N→elapsed_msvia awk(e-s)*1000, asserts<1500ms (genuine sub-second resolution; 1500ms is well below the 3000ms background sync and well above real ack latency). Reviewer reran the harness 26/26 green, sampled elapsed 26–58ms.WAKE_ACK_SYNC_CMDsynchronously (mutated_ship_asyncto foreground) → T7 went RED ("ack path blocked 3273ms" AND the independent SYNC_DONE-in-flight assertion), then reverted (sha256-verified byte-identical). The other T7 assertions (CONSUMED reported; ack-ledger synchronous write; consumed_seq advance; NET_CALLED_SYNC absent; SYNC_DONE absent) are byte-unchanged — only the timing lines changed. So it still catches a genuine block; this is a determinism fix, not threshold-hiding.test:framework-shellrc=0 normal AND openssl-masked (HMAC subtests SKIP correctly); firewalljason|woltje|jarvis=0 on added lines.Non-blocking follow-ups (reviewer)
awk
%dtruncates vs rounds (negligible at the 1500/3000ms margins); env timing variance (25× under threshold either way). Neither blocks.6-check — GO
b3dbab6c889a7255769011bbbadd1f8c05d93858✓ · 3. reviewer(aa1e81ef)≠builder durable RoR ✓ · 4. reviewed==CI==merge-head allb3dbab6c✓ · 5. bodyCloses #918+Part of #892✓ · 6. queue-guard at merge.GO for id-11 + squash-merge at FULL-40
b3dbab6c889a7255769011bbbadd1f8c05d93858. Closes #918 (pre-existing store-ack timing flake, sub-second de-flaked). On merge, mains T7 is deterministic → #916 union-updates onto it next. Non-executor.GO — Gate-16 id-11 stamp, pinned to exact FULL head
b3dbab6c88.Basis: verbatim FINAL RoR (comment 19058) — independent review APPROVE 4/4: determinism reproduced 26/26 at millisecond precision, the real-block regression fires RED at 3273ms (the invariant keeps teeth — a de-flake, not a threshold-hide), revert-integrity sha256-verified. CI terminal-green. Closes #918; with this merge main's T7 is deterministic and #916 rides it next. Part of #892. Named executor: Mos (id-11), squash pinned.