0%

Post-apply correctness guard + bounded fixpoint

Goal

The correctness guard (re-check + rollback) and convergence loop.

Implementation Sketch

After applying a file’s edits, re-parse + re-type-check; if the buffer fails to compile OR emits any diagnostic absent from the step-1 baseline, roll back the whole file and report; only a clean re-check commits. Iterate to a bounded fixpoint (--max-iterations) with cycle detection; report non-convergence. Atomic per-file write (temp + rename); emit the run report (fixed/unchanged/rolled-back/skipped-on-conflict/non-converged).

Spec References

ori-fix-proposal.md §Suggestion-application protocol steps 6-8, §Convergence, §Error Handling

Work Items

  • Post-apply re-parse + re-type-check vs step-1 baseline; whole-file rollback on regression
  • Bounded-fixpoint iteration + cycle detection + non-convergence report
  • Atomic per-file write (temp + rename) + run report