Skip to content

Test the Base fix's rules in-process behind a seam for its outside effects - #379

Merged
JacobStephens2 merged 2 commits into
mainfrom
issue-378
Oct 4, 2026
Merged

JacobStephens2 merged 2 commits into
mainfrom
issue-378

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

The Base fix's rules now reach the outside world only through a private Outside seam. There are two adapters: the production one over the Launch directory and GitHub, and a scripted fake used in the module's own tests. The public interface is unchanged.

 BaseFix::fix(launch, issue, …)
-  launch.lock / github::open_issues_labelled / Mark::of / github::create_issue
-  Running::mark / child_run::start+wait / poll::until(issue_is_open) / progress::step
+  fix_through(&mut LaunchAndGitHub { launch, issue }, issue, …)
+    outside.look / open_fixes / mark / create_issue / mark_running
+    outside.run_base_fix / merged
+    wait_on: loop { has_ended (mark first); issue_is_open; pause }
+    open_fix_covering(listed issues, …)   # pure
  • poll::pause() is new: a public sleep of one poll interval, which poll::until now uses as well.
  • Left detection, meaning the mark file is there and its lock is free on first open, stays in the production adapter. The rule that a Left issue is started again is in the core.
  • One change you can see: waiting on Base fix #n is now printed just before the child Run starts. So if the start fails, the line comes before the error instead of not at all.

Evidence

  • Before: none of the Base fix's rules had a unit test. Each was checked only end to end, through the fake gh and claude, in 20 tests in tests/base_fix.rs.
    After: 19 unit tests in src/base_fix.rs check the order of Did events and the exact error text. For example:
    covering issue #8 marked Running, issue open → open → closed
      did: Look, ListFixes, ReadMark(8), LookReleased, "waiting on Base fix #8, already open: …",
           ReadEnded(8), ReadIssue(8), Pause, ReadEnded(8), ReadIssue(8), "Base fix #8 closed; …"
    
    The 8 end-to-end tests that only checked a rule were deleted. The 12 that need real processes, locks or the whole Run are kept. cargo test passes in full and cargo clippy --all-targets -- -D warnings is clean.

Merge Danger

Door: two-way

This only changes tests and the internal structure, so a revert undoes it cleanly.

Blast Radius: Base fix

If the production adapter differed from the old code, the Runs that take a Base fix would be affected. The kept end-to-end tests run the happy path, a Left mark restarted across processes, and the Spec run's shared Base fix through the real adapter.

Unaddressed findings

Standards

  • Rename Outside::step to progress, as in the Repair loop: skipped, because the issue's seam shape names it step.
  • Data clump issue, pr_url, base, base_commit, failed: skipped. It was there before this change, and bundling it would change fix's public signature, which the issue keeps.
  • Outside has 11 methods, and create_issue's labels parameter always gets the same value: skipped, because both match the issue's seam shape and its decision to keep labels in the core so the tests can check them.

Spec

  • The fake's open_fixes and marks are fixed Vecs, not per-call VecDeques: skipped. A Run lists open fixes and reads each mark once, so per-call scripting would add nothing. The answers that do vary per call (ended, open, children) are VecDeques.

Closes #378

🤖 Generated with Claude Code

JacobStephens2 and others added 2 commits October 4, 2026 19:20
…fects (#378)

The Base fix's rules now reach the look lock, the open Base fix issues,
the mark files, the child Run, the poll interval and its progress lines
only through a private Outside seam, with a production adapter over the
Launch directory and GitHub and a scripted fake for unit tests. Finding
the covering issue is a pure function over the listed issues, and the
poll module gains a one-interval pause for the core's own wait loop.
End-to-end tests that only checked a rule or a line's wording are
replaced by the unit tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One arm for a found Base fix that is not Left, the covering issue's
finder keeps its old name, and the fake scripts marks as Mark and gives
its running mark its own type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JacobStephens2
JacobStephens2 merged commit a08aea7 into main Oct 4, 2026
13 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-378 branch October 4, 2026 23:32
@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.

Test the Base fix's rules in-process behind a seam for its outside effects

1 participant