Repository navigation
fix(flaky-scan): skip dynamic workflows, read runs per day, retry a 5xx read (T801 t2) - #195
Merged
Merged
Conversation
…etry a 5xx read once The first live dry run (39 repositories, 2026-11-04) showed 3 defects: - Dependabot runs (path dynamic/...) have 1 run per ecosystem on 1 SHA, all with the job name Dependabot: a false flaky event in trimlights. - frostyard/lab reached the 1,000-run limit of 1 runs query in 7 days. - 1 HTTP 502 on a runs list made frostyard/frostread an error. Skip dynamic/ runs, list runs per UTC day (truncatedDays names a day that still reaches the limit), and retry a 5xx read once after 2 s. Writes are never retried.
bketelsen
approved these changes
Nov 4, 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.
Summary
Follow-up to #192 (plan T801, task t2, section "Gap 2"). The first live dry run of
scripts/flaky-scan.mjs(2026-11-04,--profiles, 39 repositories, 7 days) found 3 defects. The--applyrun and the weekly schedule wait for this fix.path: dynamic/dependabot/dependabot-updates). 1 SHA gets 1 run per ecosystem, all with the job nameDependabot; 1 ecosystem failing and another passing looked like a flaky test (bketelsen/trimlights, SHA11815ec). Runs whosepathstarts withdynamic/are now skipped and not counted.frostyard/labhas 1,214 runs in 7 days, so events were lost. Runs are now listed 1 UTC day at a time (created=YYYY-MM-DD), deduped by id. A day that still reaches 1,000 is listed in the newrepos[].truncatedDaysfield and printed as awarnline on stderr.frostyard/frostreadan error. A read that fails with a 5xx is now retried once after 2 s. A write is never retried: a 5xx on a POST can still have created the issue.The spec
docs/specs/flaky-test-scan.mdstates the 3 rules and the new field..memory/corrections.jsonlgets 2 lines (the #192 review blockers and this live-run lesson), as the blocker-to-guard rule asks.Risk tier
Risk tier: 2 — the tool can open issues and comments with
--apply; this change narrows what it reports (skips dynamic runs) and only adds reads. No risk path is touched (scripts/flaky-scan.mjs,scripts/lib/flaky-scan.mjs,test/,docs/specs/,.memory/are not in.github/risk-paths.json).Docs housekeeping
Verification
make cigreen locally: 217 tests pass (17 intest/flaky-scan.test.mjs, 4 new);check-corrections --base origin/main: 5 lines, append-only.--now 2026-11-04T15:00:00Z, exit 0):bketelsen/trimlights201 runs, 0 flaky (the Dependabot key is gone);frostyard/lab1,214 runs,truncatedDays: [];frostyard/frostread89 runs, no error, 1 key.Revert tests (scratch worktree at
2806aef,node --test --test-reporter=tap test/flaky-scan.test.mjs, 1 revert at a time, restored after each):dynamic/filter removedGitHub-generated dynamic runs (Dependabot) are no flaky events and are not countedcreated=>=FROMquery--out JSON shape is pinned in the CLI output;runs are read 1 day at a time, deduped by id, and a day with 1000 runs is reported;a 5xx read is retried once; a 5xx write is not retrieda 5xx read is retried once; a 5xx write is not retriedAfter merge: 1 dry run and 1
--applyrun over the profiles,scan.jsonin~/agents/odrade/reports/<date>-flaky-scan/, then the weekly Monday 05:30 schedule.Cross-review
Coder
claude-opus-5.5; revieweropenai/gpt-6.1-sol. Initial review at88b9228(base1b02a12): Ready, Blocking: none, no findings. CI green at that head (docs-gate, risk-paths, fleet-conventions, scaffold-e2e); norisk:highmatch.