feat(phased-execution): push each phase commit after it is made

The harness now pushes the phase commit right after committing it
(PHASE_PUSH=1 default, new push_phase in lib.sh): upstream when set,
else 'git push -u <first remote> <branch>'; no remote = skip with a
notice. A push failure keeps the commit local, prints the same loud
ERROR contract as a commit failure, and stops the run — the next
phase's push sweeps the unpushed commit in. PHASE_PUSH=0 opts out with
a loud notice. SKILL.md (Commits + config table + exit codes) and the
executor prompts document the new behavior.
This commit is contained in:
2026-09-10 07:56:30 -04:00
parent f6cbb2d664
commit b88fbaec62
8 changed files with 80 additions and 22 deletions
+2 -2
View File
@@ -12,7 +12,7 @@
# continue where it stopped.
#
# Env: see SKILL.md (MAX_FIX_ATTEMPTS, PHASE_MODEL, PHASE_THINKING,
# PHASE_COMMIT, PI_TRUST, FRESH_FIX).
# PHASE_COMMIT, PHASE_PUSH, PI_TRUST, FRESH_FIX).
set -uo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/lib.sh"
@@ -30,7 +30,7 @@ while unit="$(next_unit)"; do
[[ -n "$unit" ]] || break
if ! execute_unit "$unit"; then
# execute_unit printed the failure detail (task failure: errors, logs,
# resume command — or phase-commit failure: the hand-fix command).
# resume command — or phase commit/push 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