Skip to content

feat: build the run's final harness automatically - #15

Merged
3ae3ae merged 1 commit into
general-clifrom
wp/auto-final
Oct 19, 2026
Merged

3ae3ae merged 1 commit into
general-clifrom
wp/auto-final

Conversation

@3ae3ae

@3ae3ae 3ae3ae commented Oct 19, 2026

Copy link
Copy Markdown
Owner

Summary

There is one result to apply, so building it is part of run, not a separate step.

  • At the end of a sweep, run combines the per-task adopted harnesses and lessons into one final harness per mode. The builder moved to harness2/cli/_final.py; the consolidate command and module are removed.
  • apply, diff and eval use the final harness by default. --task still picks a single task's harness.
  • A failure in the final step is reported on stderr and leaves the run's exit code unchanged. Rerunning the same command retries only that step, using the cached sessions.
  • The run summary lists the final harness paths and a Next: line (diff / apply / eval). --json gains final, and the dry-run estimate counts the extra session.
  • A stop because of a provider usage limit tells you to rerun once the limit resets.

Test plan

  • 132 core tests and 13 plugin tests pass after rebasing on the subscriptions PR.
  • Covered: consolidation through run, the retry, cache reuse on rerun, a failure that keeps the exit code, and apply/diff/eval on the final harness.
  • ruff

🤖 Generated with Claude Code

A run now ends by combining the harnesses it adopted per task, with the
lessons it recorded, into one final harness per recursion mode; that is
what `apply`, `diff` and `eval` use, so there is a single result to
review and apply. The separate `consolidate` command is gone. If the
final step fails, the run's exit code is unchanged and rerunning the
same command retries just that step (every earlier step is reused).

The dry-run estimate counts the extra session, and a run stopped by a
provider's usage limit says to rerun once the limit resets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@3ae3ae
3ae3ae merged commit e0d9290 into general-cli Oct 19, 2026
@3ae3ae
3ae3ae deleted the wp/auto-final branch October 19, 2026 13:21
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.

1 participant