Skip to content

feat(bin): never day-pause the local Jev backend, switch it to Rizzo's native decisions API - #46

Merged
alandomio merged 2 commits into
mainfrom
fm/jev-local-decisions-no-pause
Sep 27, 2026
Merged

alandomio merged 2 commits into
mainfrom
fm/jev-local-decisions-no-pause

Conversation

@alandomio

Copy link
Copy Markdown
Owner

Intent

Follow-up to the just-merged local Rizzo Flow backend for bin/fm-jev.sh's shadow wake classifier (PR #45): (1) the local backend must never pause classification for the rest of the day for any reason - a high load reading, a timeout, or an API/transport error - unlike the OpenRouter backend, which keeps its existing day-long pause on timeout, API/transport error, missing cost, or reaching its daily spend cap; the local backend only skips the one affected row (logged with the reason) and the very next drain tries again; the sole exception, which still pauses the local backend for the day, is an invalid (non-loopback or path-carrying) config/jev-endpoint, since that is a configuration mistake to surface rather than a transient condition to retry. (2) Switch the local backend from the Jev-compatible /v1/systemone endpoint to Rizzo Flow's native /v1/decisions API (see the rizzo-flow skill, references/api.md), requesting the three-way handling question as an options array with policy.allow_abstain=true and policy.min_top_probability=0.6 (matching the existing report --min-confidence default of 0.6); a response the server itself could not decide (status insufficient_evidence) or answered under that confidence floor (status uncertain) carries no choice and must be logged as doubt, exactly like a low-confidence OpenRouter answer. The OpenRouter backend is unaffected by either change and keeps using /v1/systemone. Update docs/configuration.md's Jev shadow wake triage section and bin/fm-jev.sh's own header to match, and update/add bats-style shell tests in tests/fm-jev.test.sh (stubbed HTTP server) proving both behaviors, plus prove the local backend live against a real rizzo serve.

What Changed

  • The local backend no longer pauses for the day. In bin/fm-jev.sh, a local-backend timeout, transport error, non-2xx HTTP response, or unreadable response now skips only that one row (logged as why=timeout/api-error, and a high load reading is still logged as why=load). Nothing is written to state/jev/disabled, so the next drain tries again. After a timeout, the rest of that drain's rows are also skipped as why=timeout without being sent, so a stuck server costs one timeout per drain. An invalid (non-loopback or path-carrying) config/jev-endpoint still pauses for the day. The OpenRouter backend still pauses for the day on a timeout, an API error, a missing cost, or hitting the spend cap, same as before.
  • The local backend now uses Rizzo Flow's native /v1/decisions instead of /v1/systemone. It sends the three-way handling question as an options array with policy.allow_abstain=true and policy.min_top_probability=0.6 (JEV_LOCAL_MIN_TOP_PROBABILITY), and no model field. A response without a valid choice (server status insufficient_evidence or uncertain) is logged as doubt. When there's no confidence field, confidence is read from uncertainty.top_probability, and an object-shaped model is logged as source/weights/precision. OpenRouter keeps its /v1/systemone request shape; its question text now comes from the same shared constants.
  • Docs and tests updated to match. The script header and the Jev shadow wake triage section of docs/configuration.md now describe both behaviours. tests/fm-jev.test.sh, which runs against a stubbed HTTP server, and the live tests/fm-jev-local-rizzo-live.test.sh are updated to cover the new request body, the no-pause behaviour and the doubt mapping.

🤖 Generated with Claude Code

Risk Assessment

✅ Low: The change is bounded to the local shadow-only classifier, which never holds or changes a wake. The /v1/decisions request and response mapping matches the documented Rizzo Flow API, the OpenRouter paths are unchanged, and the remaining concerns are a confirmation on intent wording and an overstated doc sentence.

Testing

No baseline commands had run before this step. I ran the targeted stubbed suite tests/fm-jev.test.sh (all 24 pass) and the opt-in live test against the real rizzo serve on 127.0.0.1:8017 (passes). I also ran a scenario script by hand through the real wake drain. It recorded the actual native request sent to /v1/decisions and showed server-side uncertain answers logged as doubt. It showed that a hung server, a refused port, an HTTP 500 and a high load each skip with why=timeout, api-error or load, never write state/jev/disabled, and are classified again on the next drain. The invalid-endpoint case is the only one that pauses for the day. I saved the evidence as CLI transcripts in the evidence directory. There is no UI surface, so no screenshots. The overall result is a pass, and the temporary directories were removed with the worktree left clean.

Evidence: Live rizzo serve test transcript

Source: Live rizzo serve test transcript

ok - classified live against http://127.0.0.1:8017 in 376ms: model=XHToken/Spark-X2.5-1.7B/flow/q8_0 choice=doubt cost=null
Evidence: Hand-run scenarios against real rizzo, hung, refused, HTTP 500, load and invalid endpoint (shadow log rows plus the captured /v1/decisions request)

Source: Hand-run scenarios against real rizzo, hung, refused, HTTP 500, load and invalid endpoint (shadow log rows plus the captured /v1/decisions request)

=== 1. Real rizzo serve: native /v1/decisions, three wakes ===
{"id":"1790000000:1","outcome":"classified","choice":"doubt","confidence":0.5298676058813676,"model":"XHToken/Spark-X2.5-1.7B/flow/q8_0","reason":"signal: w1.status: working: implementing the fix"}
{"id":"1790000000:2","outcome":"classified","choice":"captain","confidence":0.9868675896073382,"model":"XHToken/Spark-X2.5-1.7B/flow/q8_0","reason":"signal: w2.status: blocked: need the captain to approve forc"}
{"id":"1790000000:3","outcome":"classified","choice":"doubt","confidence":0.5429402625944475,"model":"XHToken/Spark-X2.5-1.7B/flow/q8_0","reason":"signal: w3.status: done: PR ready for review, all CI green"}
state/jev/disabled: (absent - no day pause)
--- request URL(s) the local backend dialed:
http://127.0.0.1:8017/v1/decisions
--- request body sent (first row):
{"top_level_keys":["questions","state"],"options":["firstmate","absorbable","captain"],"policy":{"allow_abstain":true,"min_top_probability":0.6},"state":{"wake_reason":"signal: w1.status: working: implementing the fix","worker_last_status":"working: implementing the fix"}}
--- raw rizzo /v1/decisions answer to that same body:
{"model":{"source":"XHToken/Spark-X2.5-1.7B","requested_revision":"14d6e83c13c7add2b62a7c39b2131f4ed1cddcf8","gguf_source":"rizzoaiacademy/rizzo-flow-1.7b","gguf_revision":"532e1586cc60787375ec7d86a5a302deb9a1adec","source_files":{"spark-x2.5-1.7b-rizzo-flow-lora-q8_0.gguf":"685403da9c62e0745cb77817ee2d66418e3ce85002ef403cf2680481e22bf16d"},"precision":"q8_0","device":"gpu","backend":"mtl","runtime":"llama.cpp","llama_cpp_release":"b11081","llama_cpp_commit":"161755f29e415e2c33efe906e91843c068efd664","prompt_version":"spark-decisions-v3","weights":"flow","fingerprint":"b613c11f9fd888510dfb46e71ddd377919ff6dae45111cdc09ca07c383b2ccc9","device_name":"Apple M3 Pro","context_cells":10240,"load_seconds":4.604736209003022},"handling":{"type":"choice","status":"uncertain","choice":null,"top":0.5298676058813676}}

=== 2. Hung loopback server (accepts, never answers), jev-timeout=2 ===
drain+classify wall time: 5s (one timeout for the whole drain, not one per row)
requests dialed: 1
{"id":"1790000000:1","outcome":"skipped","why":"timeout","reason":"signal: w1.status: working: step 1"}
{"id":"1790000000:2","outcome":"skipped","why":"timeout","reason":"signal: w2.status: working: step 2"}
{"id":"1790000000:3","outcome":"skipped","why":"timeout","reason":"signal: w3.status: working: step 3"}
state/jev/disabled: (absent - no day pause)
--- very next drain, endpoint now pointed at the real server (same home):
{"id":"1790000000:4","outcome":"classified","choice":"absorbable","confidence":0.7327654809645442,"model":"XHToken/Spark-X2.5-1.7B/flow/q8_0","reason":"signal: w4.status: working: step 4"}
state/jev/disabled: (absent - no day pause)

=== 3. Refused loopback port (nothing listening) ===
requests dialed: 2 (each row tried)
{"id":"1790000000:1","outcome":"skipped","why":"api-error","reason":"signal: w1.status: working: a"}
{"id":"1790000000:2","outcome":"skipped","why":"api-error","reason":"signal: w2.status: working: b"}
state/jev/disabled: (absent - no day pause)
--- very next drain against the real server:
{"id":"1790000000:3","outcome":"classified","choice":"absorbable","confidence":0.6889835856838491,"model":"XHToken/Spark-X2.5-1.7B/flow/q8_0","reason":"signal: w3.status: working: c"}
state/jev/disabled: (absent - no day pause)

=== 4. HTTP 500 from a stub loopback server ===
requests dialed: 2
{"id":"1790000000:1","outcome":"skipped","why":"api-error","reason":"signal: w1.status: working: a"}
{"id":"1790000000:2","outcome":"skipped","why":"api-error","reason":"signal: w2.status: working: b"}
state/jev/disabled: (absent - no day pause)

=== 5. Load at/above ceiling (config/jev-max-load=0.01, real load reading) ===
requests dialed: 0
{"id":"1790000000:1","outcome":"skipped","why":"load","reason":"signal: w1.status: working: a"}
state/jev/disabled: (absent - no day pause)
--- very next drain with the ceiling back at 1000:
{"id":"1790000000:2","outcome":"classified","choice":"absorbable","confidence":0.6174105806296936,"model":"XHToken/Spark-X2.5-1.7B/flow/q8_0","reason":"signal: w2.status: working: b"}
state/jev/disabled: (absent - no day pause)

=== 6. Invalid endpoint (non-loopback / path-carrying) - the sole day pause ===
endpoint http://10.0.0.5:8017 -> requests dialed: 0
{"id":"1790000000:1","outcome":"skipped","why":"invalid-endpoint","reason":"signal: w1.status: working: a"}
{"why":"invalid-endpoint","reason":"null"}
{"id":"1790000000:2","outcome":"skipped","why":"disabled","reason":"signal: w2.status: working: b"}
state/jev/disabled: 2026-09-27	invalid-endpoint
endpoint http://127.0.0.1:8017/v1 -> requests dialed: 0
{"id":"1790000000:1","outcome":"skipped","why":"invalid-endpoint","reason":"signal: w1.status: working: a"}
{"why":"invalid-endpoint","reason":"null"}
{"id":"1790000000:2","outcome":"skipped","why":"disabled","reason":"signal: w2.status: working: b"}
state/jev/disabled: 2026-09-27	invalid-endpoint

=== status (local backend) ===
Jev shadow triage: on, local backend (config/jev-endpoint = http://127.0.0.1:8017)
load ceiling: 1000 (1-minute average)
request timeout: 5s
shadow log: /tmp/fm-jev-e2e.QuTlY2/real/state/jev/shadow.jsonl
Evidence: Script that produced the scenario transcript

Source: Script that produced the scenario transcript

#!/usr/bin/env bash
# Manual E2E: drive bin/fm-wake-drain.sh (FM_JEV_FOREGROUND=1) against a real
# `rizzo serve` on 127.0.0.1:8017, a hung loopback server, a refused loopback
# port, a high load reading, and a non-loopback endpoint.
set -u
ROOT=${ROOT:?}
DRAIN="$ROOT/bin/fm-wake-drain.sh"; JEV="$ROOT/bin/fm-jev.sh"
T=$(mktemp -d /tmp/fm-jev-e2e.XXXXXX)
REALCURL=$(command -v curl)
mkdir -p "$T/shim" "$T/cap"
cat > "$T/shim/curl" <<SH
#!/usr/bin/env bash
# records each request's URL + body, then runs the real curl
n=\$(ls "$T/cap" | wc -l | tr -d ' ')
prev=; for a in "\$@"; do
  [ "\$prev" = --data-binary ] && cp "\${a#@}" "$T/cap/body.\$n.json"
  case "\$a" in http*) echo "\$a" > "$T/cap/url.\$n";; esac; prev=\$a; done
exec "$REALCURL" "\$@"
SH
chmod +x "$T/shim/curl"

mkhome() { local h="$T/$1"; mkdir -p "$h/state" "$h/config"; printf '%s\n' "$2" > "$h/config/jev-endpoint"; printf '1000\n' > "$h/config/jev-max-load"; echo "$h"; }
q() { printf '1790000000\t%s\tsignal\t%s.status\tsignal: %s.status: %s\n' "$2" "$3" "$3" "$4" >> "$1/state/.wake-queue"; printf '%s\n' "$4" > "$1/state/$3.status"; }
drain() { local h=$1; shift; env PATH="$T/shim:$PATH" FM_HOME="$h" FM_STATE_OVERRIDE="$h/state" FM_JEV_FOREGROUND=1 "$@" "$DRAIN" >/dev/null 2>"$h/drain.err" || echo "DRAIN FAILED: $(cat "$h/drain.err")"; }
show() { jq -c 'select(.ev=="jev" or .ev=="disabled") | {id,outcome,choice,confidence,model,why,reason:(.reason//null|tostring|.[0:60])} | with_entries(select(.value!=null))' "$1/state/jev/shadow.jsonl"; echo "state/jev/disabled: $( [ -f "$1/state/jev/disabled" ] && cat "$1/state/jev/disabled" || echo '(absent - no day pause)')"; }

echo "=== 1. Real rizzo serve: native /v1/decisions, three wakes ==="
h=$(mkhome real http://127.0.0.1:8017)
q "$h" 1 w1 "working: implementing the fix"
q "$h" 2 w2 "blocked: need the captain to approve force-pushing main and rotating the prod API key"
q "$h" 3 w3 "done: PR ready for review, all CI green"
drain "$h"
show "$h"
echo "--- request URL(s) the local backend dialed:"; sort -u "$T"/cap/url.* ; rm -f "$T"/cap/url.*
echo "--- request body sent (first row):"; jq -c '{top_level_keys:keys, options:(.questions.handling.options|map(.id)), policy:.questions.handling.policy, state}' "$T/cap/body.0.json"
echo "--- raw rizzo /v1/decisions answer to that same body:"
"$REALCURL" -sS --max-time 10 -H 'Content-Type: application/json' --data-binary "@$T/cap/body.0.json" http://127.0.0.1:8017/v1/decisions | jq -c '{model, handling:(.answers.handling|{type,status,choice,top:.uncertainty.top_probability})}'
rm -f "$T"/cap/*

echo; echo "=== 2. Hung loopback server (accepts, never answers), jev-timeout=2 ==="
python3 -c 'import socket,time;s=socket.socket();s.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR,1);s.bind(("127.0.0.1",18917));s.listen(50);c=[]
while True: c.append(s.accept())' & HUNG=$!
sleep 0.5
h=$(mkhome hung http://127.0.0.1:18917); printf '2\n' > "$h/config/jev-timeout"
q "$h" 1 w1 "working: step 1"; q "$h" 2 w2 "working: step 2"; q "$h" 3 w3 "working: step 3"
start=$(date +%s); drain "$h"; echo "drain+classify wall time: $(( $(date +%s)-start ))s (one timeout for the whole drain, not one per row)"
echo "requests dialed: $(ls "$T"/cap/url.* 2>/dev/null | wc -l | tr -d ' ')"; rm -f "$T"/cap/*
show "$h"
kill $HUNG 2>/dev/null; wait $HUNG 2>/dev/null
echo "--- very next drain, endpoint now pointed at the real server (same home):"
printf 'http://127.0.0.1:8017\n' > "$h/config/jev-endpoint"
q "$h" 4 w4 "working: step 4"; drain "$h"
show "$h" | tail -2; rm -f "$T"/cap/*

echo; echo "=== 3. Refused loopback port (nothing listening) ==="
h=$(mkhome refused http://127.0.0.1:18918)
q "$h" 1 w1 "working: a"; q "$h" 2 w2 "working: b"
drain "$h"; echo "requests dialed: $(ls "$T"/cap/url.* 2>/dev/null | wc -l | tr -d ' ') (each row tried)"; rm -f "$T"/cap/*
show "$h"
echo "--- very next drain against the real server:"
printf 'http://127.0.0.1:8017\n' > "$h/config/jev-endpoint"; q "$h" 3 w3 "working: c"; drain "$h"; show "$h" | tail -2; rm -f "$T"/cap/*

echo; echo "=== 4. HTTP 500 from a stub loopback server ==="
python3 -c 'import http.server as H
class R(H.BaseHTTPRequestHandler):
  def do_POST(s): s.send_response(500); s.end_headers(); s.wfile.write(b"boom")
  def log_message(s,*a): pass
H.HTTPServer(("127.0.0.1",18919),R).serve_forever()' & E500=$!
sleep 0.5
h=$(mkhome http500 http://127.0.0.1:18919)
q "$h" 1 w1 "working: a"; q "$h" 2 w2 "working: b"; drain "$h"
echo "requests dialed: $(ls "$T"/cap/url.* 2>/dev/null | wc -l | tr -d ' ')"; rm -f "$T"/cap/*
show "$h"; kill $E500; wait $E500 2>/dev/null

echo; echo "=== 5. Load at/above ceiling (config/jev-max-load=0.01, real load reading) ==="
h=$(mkhome load http://127.0.0.1:8017); printf '0.01\n' > "$h/config/jev-max-load"
q "$h" 1 w1 "working: a"; drain "$h"; echo "requests dialed: $(ls "$T"/cap/url.* 2>/dev/null | wc -l | tr -d ' ')"; rm -f "$T"/cap/*
show "$h"
echo "--- very next drain with the ceiling back at 1000:"
printf '1000\n' > "$h/config/jev-max-load"; q "$h" 2 w2 "working: b"; drain "$h"; show "$h" | tail -2; rm -f "$T"/cap/*

echo; echo "=== 6. Invalid endpoint (non-loopback / path-carrying) - the sole day pause ==="
for ep in http://10.0.0.5:8017 http://127.0.0.1:8017/v1; do
  h=$(mkhome "inv$RANDOM" "$ep"); q "$h" 1 w1 "working: a"; q "$h" 2 w2 "working: b"; drain "$h"
  echo "endpoint $ep -> requests dialed: $(ls "$T"/cap/url.* 2>/dev/null | wc -l | tr -d ' ')"; rm -f "$T"/cap/*
  show "$h"
done
echo; echo "=== status (local backend) ==="
env FM_HOME="$T/real" FM_STATE_OVERRIDE="$T/real/state" "$JEV" status
rm -rf "$T"
Evidence: Native request body and real rizzo answer (excerpt)
request: {"top_level_keys":["questions","state"],"options":["firstmate","absorbable","captain"],"policy":{"allow_abstain":true,"min_top_probability":0.6}}
rizzo answer: handling {type:choice, status:uncertain, choice:null, top:0.53} -> logged choice=doubt
hung server (timeout=2): 1 request, 3 rows skipped why=timeout, state/jev/disabled absent; next drain -> classified absorbable
invalid endpoint http://10.0.0.5:8017: 0 requests, why=invalid-endpoint, state/jev/disabled = 2026-09-27 invalid-endpoint

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 2 issues (1 warning, 1 info)
  • ⚠️ bin/fm-jev.sh:375 - This change removes the local backend's only circuit breaker, so a server that hangs can now keep a pile of classifier processes alive with no limit. Before, the first timeout wrote state/jev/disabled and every later row and drain skipped quickly. Now a rizzo serve that accepts connections but never answers (model stuck, or its one-at-a-time queue backed up behind abandoned requests) costs JEV_TIMEOUT seconds (default 5) per row. The detached observe-drain holds JEV_LOCK for the whole time. Every later drain spawns another detached observer that spins in fm_lock_acquire_wait (bin/fm-wake-lib.sh:886), polling every 0.1s with no upper bound. If wakes arrive faster than one row per timeout, the waiting processes and their backlog grow without limit. Also, curl giving up does not cancel the server-side work, which can keep the server's serial queue saturated and make every later request time out too. The only thing that stops the growth is the load ceiling, and only once the pile-up itself pushes the 1-minute load to 8. The intent explicitly requires 'never pause ... for a timeout', so the behaviour is authorized. Any remedy changes that behaviour and needs the author's decision, for example: skip the rest of the current spool after the first local timeout (logged with why=timeout, next drain retries), or make the local observer give up if it cannot get JEV_LOCK within a bounded time.
  • ℹ️ docs/configuration.md:620 - The docs still describe the local backend as working with 'a Jev-compatible server, such as Rizzo Flow's rizzo serve'. The same wording is in the bin/fm-jev.sh header at lines 3 and 20, and in the tests/fm-jev.test.sh fake-curl comment at line 35. The backend now only calls Rizzo Flow's native POST /v1/decisions, which uses a strict schema: an options array plus policy. A Jev/TypeSafe-compatible server that only has /v1/systemone would answer 404/422 on every row, and each row would be skipped silently as api-error with no pause and no status hint. Change the wording to say a Rizzo Flow server (native /v1/decisions) is required.
  • ℹ️ tests/fm-jev.test.sh:400 - The intent requires the local backend to skip the affected row 'logged with the reason'. test_local_backend_timeout_and_api_errors_skip_without_a_day_pause only checks that the next row was attempted (calls == 2) and that state/jev/disabled is absent. It never checks that the log has a skipped row with why=timeout (for mode timeout) or why=api-error (for http500 and refused). Add a jev_events check, e.g. select(.outcome == &#34;skipped&#34; and .why == &#34;timeout&#34;), so the test proves the logged-reason half of the requirement.

🔧 Fix: Skip rest of local drain after timeout; fix docs and tests
2 issues (1 warning, 1 info) still open:

  • ⚠️ bin/fm-jev.sh:496 - The fix round changed a local timeout from skipping one row to skipping the rest of that drain. The intent says the local backend "only skips the one affected row (logged with the reason) and the very next drain tries again". The new hunk (if [ -n &#34;$JEV_LOCAL_TIMED_OUT&#34; ]; then jev_log_skip &#34;$id&#34; timeout &#34;an earlier row in this drain got no answer...&#34;; continue; fi) makes one timeout skip every later row in the same spool without dialing. The test now asserts calls == 1 for two queued rows. This is one of the two remedies the round-1 finding suggested, and the user chose to fix that finding. But it changes the literal row-level contract, and the user did not pick between the two remedies. Please confirm that skipping the rest of the drain is acceptable. The other option was a bounded wait on JEV_LOCK, which keeps per-row skipping.
  • ℹ️ docs/configuration.md:633 - The docs say detached drains "never pile up" behind a stuck server, and the header says the lock is "never held long enough" for them to pile up (bin/fm-jev.sh:66-68). Neither claim is true. Every new drain still dials first, so each one spends a full JEV_TIMEOUT (5s by default) holding JEV_LOCK. Other detached observers still wait on it with no time limit in fm_lock_acquire_wait (bin/fm-wake-lib.sh:886). Example: while the server hangs, drains arrive every 2s. Each holds the lock for about 5s, so waiting observers pile up without limit, just more slowly than before. Reword both places to say what the fix actually guarantees: at most one timeout per drain instead of one per row. Fully bounding the pile-up across drains would need new cross-drain backoff state or a bounded lock wait, which is a separate decision.
✅ **Test** - passed

✅ No issues found.

  • bash tests/fm-jev.test.sh: all 24 stubbed-HTTP tests pass. This includes the new test_local_backend_uncertain_maps_to_doubt and test_local_backend_timeout_and_api_errors_skip_without_a_day_pause, the updated native-request assertions, and the unchanged OpenRouter day-pause tests (timeout, API error, cap)
  • FM_JEV_RIZZO_LIVE=1 bash tests/fm-jev-local-rizzo-live.test.sh against a real rizzo serve on 127.0.0.1:8017: passes, classified in about 400ms with model=XHToken/Spark-X2.5-1.7B/flow/q8_0 and cost=null
  • Hand-run scenario ROOT=$PWD bash ~/.no-mistakes/evidence/01M3G279V6NYZF9PS0HW79TEVC/live-scenarios.sh. It drives the real bin/fm-wake-drain.sh with a curl wrapper that records each request (1) against the real rizzo server: dials /v1/decisions, the body has no model field, sends options [firstmate, absorbable, captain] and policy {allow_abstain:true, min_top_probability:0.6}; answers under the confidence floor (the raw answer shows status=uncertain, choice=null) are logged as doubt, and a captain-worthy wake is classified as captain at 0.99
  • Hand-run scenario (2) a hung loopback server with jev-timeout=2: one request, all 3 rows logged as skipped why=timeout, no state/jev/disabled; the very next drain in the same home classified
  • Hand-run scenario (3) a refused loopback port and (4) a stub server returning HTTP 500: every row was tried and logged as skipped why=api-error, no day pause, and the next drain classified
  • Hand-run scenario (5) the real load reading above config/jev-max-load=0.01: no request sent, logged why=load, no day pause; the next drain with the ceiling raised classified
  • Hand-run scenario (6) endpoints http://10.0.0.5:8017 and http://127.0.0.1:8017/v1: never dialed, logged why=invalid-endpoint, state/jev/disabled was written, and the later row was skipped why=disabled (the only day pause)
  • fm-jev.sh status on the local-backend home: reports the endpoint, load ceiling and timeout
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Alan Domio added 2 commits September 27, 2026 01:53
…s native decisions API

The local backend has no monotonic quota to protect the way OpenRouter's
daily spend cap does, so a load spike, a timeout, or an API/transport
error now only skips that one row instead of pausing classification
until the next calendar day; the very next drain tries again. Only an
invalid config/jev-endpoint still pauses for the day, since that is a
configuration mistake to surface rather than a transient condition to
retry. The OpenRouter backend's day-pause behavior is unchanged.

Also switch the local backend from the Jev-compatible /v1/systemone to
Rizzo Flow's native /v1/decisions, with allow_abstain and a
policy.min_top_probability of 0.6 (matching report's own
--min-confidence default): a response the server itself could not
decide, or answered under that confidence floor, carries no choice and
is logged as doubt exactly like a low-confidence OpenRouter answer.
@alandomio
alandomio merged commit 1b45664 into main Sep 27, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant