feat(phased-execution): harness commits each completed phase atomically
Children never commit (their prompts forbid git add/commit, overriding project instructions) so the commit is deterministic. At the phase commit point (00_phase.md final pass) the harness makes ONE atomic commit: the phase's code changes, the todo→complete file move, and the executor reports, together. - Scoped staging: a worktree snapshot taken at the phase's first unit (phase-sessions/dirty-<phase>, always kept) is subtracted, so the owner's pre-existing uncommitted work is left alone; runtime artifacts are never staged. The commit prints exactly what went in. - Verified: the moved phase file (and report, unless gitignored) must be in the index before committing. - Loud on failure: a commit failure prints the git error + hand-fix and stops the run; the phase stays complete, the miss is never swept into a later phase. - PHASE_COMMIT_SUBJECT (default 'phase: <phase>'); the executor's final report becomes the commit body; --no-gpg-sign always passed. - PHASE_COMMIT defaults to 1: completed phases are committed by default. Explicit PHASE_COMMIT=0 opts out with a loud warning that the phase is complete but uncommitted — a completed phase is never left uncommitted silently (that gap let four phases pile up uncommitted in brain_of_reese).
This commit is contained in:
@@ -29,8 +29,10 @@ delivered=()
|
||||
while unit="$(next_unit)"; do
|
||||
[[ -n "$unit" ]] || break
|
||||
if ! execute_unit "$unit"; then
|
||||
echo "✗ ERROR: pipeline stopped — $unit FAILED after $MAX_FIX_ATTEMPTS attempts" >&2
|
||||
echo " fix the issues above, then re-run this script to continue where it stopped" >&2
|
||||
# execute_unit printed the failure detail (task failure: errors, logs,
|
||||
# resume command — or phase-commit failure: the hand-fix command).
|
||||
echo "✗ ERROR: pipeline stopped — $unit did not complete (see the error output above)" >&2
|
||||
echo " re-run this script to continue where it stopped" >&2
|
||||
exit 1
|
||||
fi
|
||||
delivered+=("$unit")
|
||||
|
||||
Reference in New Issue
Block a user