Repository navigation
docs(testing): close the measurement traps in the #1766 soak set before the flip - #2124
Merged
Merged
Conversation
…re the flip Three defects in §9 would let the soak return a confident wrong answer, and all three are only fixable BEFORE the pilot is flipped — afterwards the evidence needed to catch them no longer exists. 1. M6 over-credits pull, invisibly. Under push a caller that gives up writes the row `failed` with "Task execution timed out after N seconds". Under pull that budget no longer governs the row — the lease is execution_timeout_seconds + SLOT_TTL_BUFFER — so the work runs to its natural end and the row lands `success` while the caller still got nothing in time. The failure moves off the row rather than going away. schedule_executions never records the caller's timeout budget, so no query over it can separate "pull fixed it" from "pull outran the caller". On a pilot whose baseline carries a meaningful caller-timeout share, M6 books a large, entirely fake improvement — and §9 told the reader to watch for a failed share ABOVE baseline, so a lower one reads as a pass. M9 adds the caller-side counter-check ([Chat Timeout Recovery], the #914 receipt), which is the only observable that survives the flip, plus the divergence table that makes the two counts interpretable together. 2. The baseline was specified as a single percentage. The failure classes move independently and only one of them is about pull: subscription-quota rows are exogenous, caller-timeout rows are the trap above, and watchdog-recovered rows ("completed on agent but status not reported") are the class pull exists to remove. Collapsed into one number, a treatment window landing in a fresh quota week looks like a win. §9 now specifies the breakdown query and what each class means for the comparison, and the abort criterion excludes quota — reverting pull cannot fix a subscription limit. 3. M6's query was a rolling `interval '7 days'`, which straddles the flip and blends control rows into the treatment number. Now bound on :flip_ts, defined as the pilot agent's RECREATE (the flag only bakes in at create/recreate; a backend restart alone leaves the agent not pulling). Also: M3 and M4 need sampling, not one run at the end. M3 counts concurrent leased rows, so a daily run lands off-peak and never sees the overbooking it exists to catch. M4 is worse — its predicate is status IN ('queued','running'), and cleanup_service's stale sweep eventually fails stranded rows to `failed`, at which point they leave the predicate. A soak that genuinely lost executions reports zero rows if M4 runs only at the end. The set table now carries a cadence column. Abort criteria gain the pre-existing-violation rule: a candidate pilot already red on a critical invariant has to be resolved or carved out before the flip, or the soak trips its own abort at t=0. Docs only — no code, no schema, no behaviour change. Refs #1766, #946, #914, #1871
6 tasks
vybe
approved these changes
Aug 12, 2026
vybe
left a comment
Contributor
There was a problem hiding this comment.
Validated via /validate-pr: security scans clean, required checks green, scope minimal.
5 tasks
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.
Why now
All three defects below are only fixable before the pilot is flipped. Afterwards the evidence needed to catch them no longer exists —
schedule_executionsdoes not record what the caller asked for, so the distinction is unrecoverable from the row.What was wrong
1. M6 over-credits pull, invisibly.
Under push, a caller that gives up kills the turn and the row is written
failedwithTask execution timed out after N seconds. Under pull that budget no longer governs the row — the lease isexecution_timeout_seconds + SLOT_TTL_BUFFER— so the work runs to its natural end and the row landssuccess, while the caller still got nothing in time. The failure moves off the row rather than going away.No query over
schedule_executionscan separate "pull fixed it" from "pull outran the caller." And §9 told the reader to watch for afailedshare above baseline — so a lower one reads as a pass.Adds M9, the caller-side counter-check (
[Chat Timeout Recovery], the #914 receipt) — the only observable that survives the flip — plus the divergence table that makes M6 and M9 interpretable together.2. The baseline was specified as a single percentage.
The classes move independently and only one is about pull:
lost_resultcaller_timeoutquotaCollapsed into one number, a treatment window landing in a fresh quota week looks like a win. §9 now carries the breakdown query and what each class means; the abort criterion excludes
quota(reverting pull cannot fix a subscription limit).3. M6's query was a rolling
interval '7 days', which straddles the flip and blends control rows into the treatment number. Now bound on:flip_ts, defined as the pilot agent's recreate — the flag only bakes in at create/recreate, so a backend restart alone leaves the agent not pulling.Also
status IN ('queued','running'), andcleanup_service's stale sweep eventually fails stranded rows tofailed, at which point they leave the predicate — a soak that genuinely lost executions reports zero rows. The set table gains a cadence column.Scope
Docs only — one file, no code, no schema, no behaviour change. The baseline measurements that motivated this are posted on #1766.
Refs #1766, #946, #914, #1871
🤖 Generated with Claude Code