repositories / smith

smith

There are many coding harnesses - but this one is fast

owned by bugabinga

Bound primary backlog providers before fallback (#148)

3c43af370db0bc587a3decd006aa19038d8a1127

Oliver Jan Krylow <oliver@bugabinga.net> ·

SSH signature · not checked

Browse filesCompare with HEAD

## What forced this
Until Phase 5 cutover, the authoritative legacy planner and surveyor can
stall before their existing fallback becomes eligible.

## The call
Bound each Claude primary to five minutes and structurally bind that
timeout to its exact workflow step.

## What we deliberately didn't do
The Codex fallback remains unbounded; this does not enable an MJS writer
or cut over ADW.

## Evidence
Run `30389374255` shows Claude completed in about 159 seconds before the
later Codex fallback was cancelled; the corrected contract now proves
each primary owns its timeout.

## Surface touched
Planner/surveyor workflows and `.github/adw/workflow-contract.test.sh`.

## If this ages badly
Raise the primary ceiling only when successful Claude backlog runs
demonstrably require more than five minutes.

Changed files (3)

+26 / −0 text lines

Diff layout

.github/adw/workflow-contract.test.sh

Modified

+22 / −0 text lines

1515 fi
18require_claude_timeouts() {
19 local file=$1
20 local expected=$2
21 local message=$3
22 if awk -v expected="$expected" '
23 function finish() { if (claude) { count++; if (!timeout) bad=1 } }
24 /^ - / { finish(); claude=($0 ~ /- id: claude$/); timeout=0; next }
25 /^[[:space:]]+id: claude$/ { claude=1 }
26 /^[[:space:]]+timeout-minutes: 5$/ { timeout=1 }
27 END { finish(); exit !(count == expected && !bad) }
28 ' "$file"; then
29 echo "PASS $message"
30 else
31 echo "FAIL $message"
32 fail=1
33 fi
34}
1836require .github/workflows/adw-review.yml 'Assert a verdict was cast' \
1937 'review workflows assert verdict labels instead of trusting action exit status'
2038require .github/workflows/adw-review.yml 'attempt 1 ended without a verdict' \
105123 'Codex reducer receives the failed-provider state in a clean downstream job'
106124require .github/workflows/adw-codex-review.yml 'advisory' \
107125 'ordinary Codex review remains advisory'
126require_claude_timeouts .github/workflows/adw-plan.yml 3 \
127 'every planner primary is time-bounded'
108128if [ "$(grep -c 'continue-on-error: true' .github/workflows/adw-plan.yml)" -lt 3 ]; then
109129 echo "FAIL every planner mode permits provider fallback"
110130 fail=1
121141 'planner fallback uses the assigned Codex model'
122142require .github/workflows/adw-plan.yml '.claude/agents/planner.md' \
123143 'planner fallback keeps the canonical charter'
144require_claude_timeouts .github/workflows/adw-survey.yml 1 \
145 'surveyor primary is time-bounded'
124146require .github/workflows/adw-survey.yml 'continue-on-error: true' \
125147 'surveyor permits provider fallback'
126148require .github/workflows/adw-survey.yml "steps.claude.outcome == 'failure'" \

.github/workflows/adw-plan.yml

Modified

+3 / −0 text lines

9393 private-key: ${{ secrets.APP_PRIVATE_KEY }}
9494 - id: claude
9595 continue-on-error: true
96 timeout-minutes: 5
9697 uses: anthropics/claude-code-action@be7b93b1907a4abad570368f3c74b6fe3807510b
9798 with:
9899 github_token: ${{ steps.token.outputs.token }}
143144 private-key: ${{ secrets.APP_PRIVATE_KEY }}
144145 - id: claude
145146 continue-on-error: true
147 timeout-minutes: 5
146148 uses: anthropics/claude-code-action@be7b93b1907a4abad570368f3c74b6fe3807510b
147149 with:
148150 github_token: ${{ steps.token.outputs.token }}
197199 private-key: ${{ secrets.APP_PRIVATE_KEY }}
198200 - id: claude
199201 continue-on-error: true
202 timeout-minutes: 5
200203 uses: anthropics/claude-code-action@be7b93b1907a4abad570368f3c74b6fe3807510b
201204 with:
202205 github_token: ${{ steps.token.outputs.token }}

.github/workflows/adw-survey.yml

Modified

+1 / −0 text lines

3232 private-key: ${{ secrets.APP_PRIVATE_KEY }}
3333 - id: claude
3434 continue-on-error: true
35 timeout-minutes: 5
3536 uses: anthropics/claude-code-action@be7b93b1907a4abad570368f3c74b6fe3807510b
3637 with:
3738 github_token: ${{ steps.token.outputs.token }}