Skip to content

The CI watch hands each Inherited failure its Base branch checks, and the Base fix reads none itself - #364

Merged
JacobStephens2 merged 3 commits into
mainfrom
issue-362
Oct 4, 2026
Merged

JacobStephens2 merged 3 commits into
mainfrom
issue-362

Conversation

@JacobStephens2

Copy link
Copy Markdown
Owner

Summary

The CI watch reads the Base branch commit's checks once, decides the Inherited failures by its one name rule, and hands back the Base branch's own checks behind them. The Base fix module builds its issue body and its Base check: advice from those, and reads no checks from GitHub.

 Repair loop
   ci::watch(head, base_commit)
     github::checks_on(head)
     github::checks_on(base_commit)
-    partition → FailedChecks { own, inherited }
+    split(failed, on_base) → FailedChecks { own, inherited, on_base }
-  base_fix.fix(…, base_commit, &failed.inherited)
-    failed_on_base: github::checks_on(base_commit) again, second name rule
-    advice_on: "could not read the checks on <base>" on error
+  base_fix.fix(…, base_commit, &failed)
+    issue_body(failed.on_base)
+    advice_on(failed.on_base), which can't fail

FailedChecks.on_base is documented with its invariant: every check in it failed on the Base branch commit and shares its name with an Inherited failure, and it is empty exactly when inherited is.

Evidence

  • Before: the name rule had no unit tests, and the Base fix module read the Base branch commit a second time.
    After: five unit tests on ci::split use plain check lists:
    red check with no same-name check on the Base branch      → own
    every same-name check failed on the Base branch           → inherited, on_base has the Base branch URLs
    only some same-name checks failed on the Base branch      → own
    Base branch check named as no red check                   → not carried
    no Base branch commit given                               → every red check own, nothing carried
    
  • cargo test: all 32 test binaries pass. tests/ci.rs, tests/base_fix.rs, tests/spec_run.rs and tests/architect_run.rs were not edited.
  • UPDATE_PROMPTS=1 cargo test prompts_page leaves prompts/ unchanged.
  • cargo clippy --all-targets is clean.

Merge Danger

Door: two-way

An in-process refactor. It changes nothing written on GitHub, and the Base fix issue's title and body are the same as before.

Blast Radius: small

A Run that fails on Inherited failures no longer reads the Base branch commit's checks a second time. That removes the "could not read the checks on " progress line, and nothing reads that line.

Unaddressed findings

Standards

  • Data Clump: inherited and on_base as a nested Inherited { on_head, on_base } type. Skipped because the issue's Decisions explicitly chose "a third list on the existing failed-checks result, rather than a new nested type", so that every current reader keeps reading own and inherited as they are. The invariant is documented on the field.
  • Feature Envy: BaseFix::fix takes the whole FailedChecks but reads only inherited and on_base. Skipped because the issue decided that "Starting a Base fix takes the whole failed-checks result, not two slices", so the invariant between the two stays inside one value.

Spec

  • The prompts page sample's on_base check reuses the head-style URL helper. Skipped because it is harmless: the CI-fix Repair prompt never reads on_base, and the generated page is unchanged.

Closes #362

🤖 Generated with Claude Code

JacobStephens2 and others added 3 commits October 4, 2026 14:16
The CI watch reads the Base branch commit's checks once and returns,
beside the branch's own and the Inherited failures, the Base branch's
checks behind them. The Base fix module builds its issue body and the
`Base check:` advice from those, and reads no checks itself. The split
is one function in the CI watch, with unit tests on plain check lists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The split takes the Base branch checks as a plain list, empty with no
Base branch commit, and the Base fix's doc comment reads cleanly again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JacobStephens2
JacobStephens2 merged commit 29c219b into main Oct 4, 2026
13 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-362 branch October 4, 2026 18:35
@JacobStephens2 JacobStephens2 mentioned this pull request Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The CI watch hands each Inherited failure its Base branch checks, and the Base fix reads none itself

1 participant