Repository navigation
The CI watch owns its rules, tested in-process behind a seam - #399
Merged
Merged
Conversation
The CI watch reaches GitHub, the poll interval, the grace deadline and progress lines only through a private Outside, with a gh adapter and an in-memory one. Its rules, the Check re-run's included, are tested through the watch; the direct tests of the split are replaced by tests through it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One start_grace gives the grace period and its deadline, so the gh adapter reads the grace period once and the seam has one method fewer; test helpers named for what they return. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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
The CI watch's rules now reach GitHub, the poll interval, the grace deadline and progress lines only through a private
Outside, the way the Claim, the Base fix and the Delivery already do. Callers see no change.The split, de-duplicating workflow runs, spotting the new attempt and the running-count lines all stay on the module's side. The module runs its own small
until/withinloops over the seam, andpoll.rsis untouched. The only change outsidesrc/ci.rsis#[derive(Clone)]ongithub::Check, which the in-memory adapter needs.Evidence
splithad tests (5 direct tests). Nothing tested the polling, the grace period or ADR 0010's Check re-run.After: 14 in-process tests run through
watch_through/rerun_throughagainstInMemory. They never sleep and don't read environment variables. They cover every acceptance-criteria case, and the five split cases now run through the watch. They assert on the result, the re-run requests and the progress lines.I checked that this test catches the bug it is meant for: when I dropped the Inherited failures from the attempt before, the test failed.
cargo testpasses in full, and so docargo clippy --all-targets -- -D warningsandcargo fmt --check. One full run had a single failure intests/architect_run.rs, which doesn't touch the CI watch. It passed on the four full runs after that, so I take it to be a timing flake on a busy machine.Merge Danger
Door: two-way
A refactor plus tests, which reverts cleanly.
Blast Radius: CI-watch
The watch and Check re-run behave as before: the same progress lines, the same polling order (probe, then check the deadline, then pause), and the same
ghcalls.Unaddressed findings
Standards
until/withincopypoll::until/poll::within. Skipped: the issue's Decisions call for this. The poll helpers would hold the adapter borrowed while the probe needs it, and changingpoll.rsis out of scope.#[derive(Clone)]onCheckwidens a production type for tests. Skipped: the reviewer judged it acceptable. It's harmless, and the in-memory adapter needs it.Spec
Closes #390
🤖 Generated with Claude Code