Skip to content

[codex] Add full manual repair workflows for completed runs#2

Open
CKwin26 wants to merge 2 commits intomainfrom
codex/full-repair-feature
Open

[codex] Add full manual repair workflows for completed runs#2
CKwin26 wants to merge 2 commits intomainfrom
codex/full-repair-feature

Conversation

@CKwin26
Copy link
Copy Markdown
Owner

@CKwin26 CKwin26 commented Mar 31, 2026

Summary

  • add a companion autoresearchclaw CLI for manual paper-repair and research-repair workflows on completed AutoResearchClaw runs
  • package the new repair CLI alongside the existing researchclaw entrypoint so users can initialize, publish, roll back, and relaunch repair workspaces from the same repo
  • document the new repair workflows in the main README
  • include the previously prepared repair hardening under the hood: ACP recovery/debug support, runtime asset/env forwarding, and stronger Stage 10 safety gates for reruns

Why

AutoResearchClaw already has in-pipeline rollback and auto-repair loops, but it did not ship a manual repair workflow for the cases humans actually hit in practice:

  • a run completed, but the exported paper package still needs bounded cleanup
  • a run completed, but the human reviewer wants a child rerun from Stage 9/10/12 without destroying the parent run
  • a repaired rerun needs better ACP recovery, runtime asset injection, and stronger experiment safety checks to make that manual loop viable

This PR adds the missing operator-facing repair feature instead of only relying on internal rollback behavior.

What Changed

New manual repair CLI

Adds a new companion package and entrypoint:

  • autoresearchclaw paper-repair-init
  • autoresearchclaw paper-repair-apply
  • autoresearchclaw paper-repair-rollback
  • autoresearchclaw research-repair-init
  • autoresearchclaw research-repair-run

These commands let a user:

  • create an editable paper-repair workspace from a completed run
  • publish repaired paper artifacts back into the source run with rollback snapshots
  • create a research-repair workspace that preserves the parent run and prepares a child rerun from a later authoritative stage
  • generate a child-run config, repair brief, launch script, and metadata without immediately launching a long job

Packaging and docs

  • package the new autoresearchclaw module in the wheel
  • add an autoresearchclaw console script alongside researchclaw
  • document manual paper repair and research repair in the main README

Repair hardening included in the same branch

This branch also carries the repair/rerun hardening needed to make the feature practical:

  • ACP reconnect/debug instrumentation and failed-prompt capture
  • sandbox entrypoint arg/env forwarding so repaired experiments can receive runtime asset paths cleanly
  • stronger Stage 10 validation for self-contained generated projects, placeholder/demo code, and ablation distinctness checks

Validation

  • python3 -m compileall autoresearchclaw pyproject.toml
  • python3 -m autoresearchclaw --help
  • python3 -m autoresearchclaw paper-repair-init --run-dir <existing-run> --output-dir .tmp_repair_smoke/paper
  • python3 -m autoresearchclaw research-repair-init --run-dir <existing-run> --output-dir .tmp_repair_smoke/research --config config.researchclaw.example.yaml --target-stage EXPERIMENT_DESIGN --reason smoke --feedback 'smoke feedback' --upstream-root .
  • python3 -m autoresearchclaw research-repair-run --repair-json .tmp_repair_smoke/research/research-repair.json --skip-preflight
  • plus the earlier repair-hardening checks on ACP/debug instrumentation, Stage 10 distinctness validation, and sandbox arg/env forwarding

Notes

  • This is intentionally a companion CLI rather than a deep rewrite of the main researchclaw command surface.
  • The manual repair workflows are additive: they complement existing gate rollback and auto-repair loops instead of replacing them.
  • The branch includes the prior repair-hardening commit because the manual rerun workflow depends on those lower-level reliability improvements to be useful in practice.

@CKwin26 CKwin26 marked this pull request as ready for review March 31, 2026 05:44
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