Repository navigation
fix(bin): count Jev transport failures in the timeout streak instead of a day pause - #64
Merged
Merged
Conversation
…of a day pause Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
alandomio
pushed a commit
that referenced
this pull request
Oct 20, 2026
Conflicts resolved keeping both sides: - bin/fm-brief.sh: upstream's shared infra rule, wait block and inbox section kept; the Haiku subagent section from #66 added after them. - bin/fm-spawn.sh: --teleport from #65 ported onto upstream's record-backed launch brief; the arrival note is published as the launch record and the Claude launch resumes the teleported session. - bin/fm-supervise-daemon.sh: wedge alarm helpers live in bin/fm-alert-lib.sh (#65); they were unchanged on our side since the merge base, so nothing is lost. Upstream's delivery-failure fields kept. - tests/fm-teleport.test.sh: covers the teleported Claude launch on the record-backed brief path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Fix bin/fm-jev.sh so Jev shadow wake triage no longer pauses classification until midnight on any api-error. On 16/10 a single transient transport failure (curl exit 6, could not resolve host) disabled classification for the rest of the day. Treat transport-level failures (curl network exits such as 6, 7, 28, 35, 52, 56, i.e. no HTTP response received) the same way timeouts are handled: count them in the existing timeout streak and use the existing timed pause that doubles per repeat and never passes midnight, instead of the day-long api-error pause. Keep the day-long pause for genuine API errors that come back as an HTTP response (auth failure, 4xx/5xx, malformed response, missing usage.cost), and leave the spend cap untouched. Acceptance: colocated tests in tests/fm-jev.test.sh cover a single curl exit 6 (no day pause, streak 1), three in a row (timed pause), and an HTTP API error (day pause as today); docs/configuration.md 'Jev shadow wake triage' and the script header describe the new rule; shellcheck clean. Delivery mode no-mistakes.
What Changed
bin/fm-jev.sh: when curl fails with no HTTP response (DNS, connection or reset errors), Jev now adds one to the timeout streak (jev_timeout_note) instead of pausing OpenRouter classification for the rest of the day. This applies to both backends, so repeated transport failures now lead to the same timed pause as timeouts: it doubles each time it repeats and never runs past midnight. API errors that come back as an HTTP response, responses missingusage.cost, and the spend cap still pause until the next day, as before.docs/configuration.mdnow describe this rule.tests/fm-jev.test.sh: a new test checks that a single curl exit 6 (DNS failure) only logsapi-errorand sets the streak to 1, with no day pause.🤖 Generated with Claude Code
Risk Assessment
✅ Low: The change is small: transport failures now go to the existing timeout-streak path, and the fix round only added a fake-curl mode that exits 6, as the user asked.
Testing
I ran tests/fm-jev.test.sh and every case passed, including the new transport test and the existing HTTP and missing-cost day-pause test. The new transport test covers a single curl exit 6 (no day pause, streak 1 of 3) and three refused connections in a row (timed pause, no further calls). To confirm it is a real regression test, I swapped in the base commit's script: the new case fails there with 'one transport error paused Jev', and passes with the fix. Logs are saved as evidence, and the worktree is clean.
Evidence: Jev tests with the fix (all pass)
Source: Jev tests with the fix (all pass)
Evidence: Same tests against the base script (new case fails: one transport error paused Jev)
Source: Same tests against the base script (new case fails: one transport error paused Jev)
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 2 issues found → auto-fixed ✅
tests/fm-jev.test.sh:468- The intent asks for a test of "a single curl exit 6 (no day pause, streak 1)", but the new test uses the fake curl'srefusedmode, which exits 7 (line 64). The fix sends every nonzero curl exit other than 28 down the same path, so exit 7 shows the same behavior. Even so, the 16/10 case (exit 6, could not resolve host) is not reproduced literally. Suggested fix: add a fake-curl mode that exits 6 (e.g.dns) exit 6 ;;) and use it in the single-failure case.bin/fm-jev.sh:705- Every nonzero curl exit other than 28 now counts toward the timeout streak. That includes exits that are not network failures, such as 23 (write error) or 26 (read error) from local temp files. These used to start a day pause and now get the timed pause instead. This is within the intent's "no HTTP response received" wording and is low impact. The same rule also now applies a timed pause to local-backend transport failures after N in a row; the docs cover this with "on either backend".🔧 Fix: Test single curl exit 6 DNS failure in Jev
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
bash tests/fm-jev.test.sh(full colocated Jev test file, rc=0)Regression check: ran the same tests against the base commit'sbin/fm-jev.sh(18ed09c). The new case fails there with 'not ok - one transport error paused Jev'. The fixed script was restored afterwards.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.