|
24 | 24 | # 3 hit --max-sessions before terminal (driver-declared INCOMPLETE). |
25 | 25 | # 4 hit --max-minutes before terminal (driver-declared INCOMPLETE). |
26 | 26 | # 5 NO_PROGRESS: two consecutive sessions with no change in the composite |
27 | | -# progress fingerprint (round | issues | converged_streak | runs count+bytes). |
| 27 | +# progress fingerprint (round | issues | converged_streak | runs count+bytes | |
| 28 | +# round-0 bootstrap bytes). |
28 | 29 | set -u |
29 | 30 |
|
30 | 31 | PROJECT="" |
@@ -90,10 +91,16 @@ runs_sig() { # "<file-count>:<total-bytes>" of runs/*.md — evidence-growth sig |
90 | 91 | b=$(cat "$d"/*.md 2>/dev/null | wc -c | tr -d ' ') |
91 | 92 | echo "$n:$b" |
92 | 93 | } |
93 | | -progress_sig() { # composite progress fingerprint: round|issues|streak|runsN:runsB |
| 94 | +bootstrap_sig() { # bytes of round-0 artifacts (PLAN + FEATURE_MATRIX) |
| 95 | + # Round 0 fills PLAN.md + FEATURE_MATRIX.md BEFORE any runs/round-N.md exists, so |
| 96 | + # without this a round 0 that spans sessions on a large target fingerprints as |
| 97 | + # static (round/issues/streak/runs all 0) and false-trips NO_PROGRESS (audit PL-2). |
| 98 | + cat "$LT/PLAN.md" "$LT/FEATURE_MATRIX.md" 2>/dev/null | wc -c | tr -d ' ' |
| 99 | +} |
| 100 | +progress_sig() { # composite fingerprint: round|issues|streak|runsN:runsB|bootstrapB |
94 | 101 | local s |
95 | 102 | s="$(state_field converged_streak)"; [ -n "$s" ] || s=-1 |
96 | | - printf '%s|%s|%s|%s' "$(round_of)" "$(issue_count)" "$s" "$(runs_sig)" |
| 103 | + printf '%s|%s|%s|%s|%s' "$(round_of)" "$(issue_count)" "$s" "$(runs_sig)" "$(bootstrap_sig)" |
97 | 104 | } |
98 | 105 |
|
99 | 106 | mkdir -p "$LT" |
@@ -182,17 +189,18 @@ while true; do |
182 | 189 | fi |
183 | 190 |
|
184 | 191 | # 4. No-progress circuit breaker. Progress = ANY change in the composite signal |
185 | | - # (round, issue count, converged_streak, or runs/ evidence bytes+count). The |
186 | | - # last two catch a long round that spans sessions appending evidence before |
187 | | - # `round` ticks, and progress made by advancing convergence — cases the old |
188 | | - # round+issues-only signal misread as stuck (audit A3). |
| 192 | + # (round, issue count, converged_streak, runs/ evidence bytes+count, or round-0 |
| 193 | + # bootstrap bytes). These catch a long round that spans sessions appending |
| 194 | + # evidence before `round` ticks, progress made by advancing convergence, and a |
| 195 | + # round 0 filling PLAN/FEATURE_MATRIX before any runs/ file exists — cases the |
| 196 | + # old round+issues-only signal misread as stuck (audit A3 / PL-2). |
189 | 197 | if [ "$cur_sig" = "$prev_sig" ]; then |
190 | 198 | no_progress=$(( no_progress + 1 )) |
191 | 199 | else |
192 | 200 | no_progress=0 |
193 | 201 | fi |
194 | 202 | prev_sig="$cur_sig" |
195 | 203 | if [ "$no_progress" -ge 2 ]; then |
196 | | - summary_exit 5 "NO_PROGRESS: 2 consecutive sessions with no change in round/issues/streak/runs (stuck)" |
| 204 | + summary_exit 5 "NO_PROGRESS: 2 consecutive sessions with no change in round/issues/streak/runs/bootstrap (stuck)" |
197 | 205 | fi |
198 | 206 | done |
0 commit comments