Skip to content

fix(experiment): judge preflight + failed-run data preservation - #68

Merged
pixelstrade-dev merged 1 commit into
mainfrom
claude/caims-consciousness-framework-2EOiI
Aug 24, 2026
Merged

fix(experiment): judge preflight + failed-run data preservation#68
pixelstrade-dev merged 1 commit into
mainfrom
claude/caims-consciousness-framework-2EOiI

Conversation

@pixelstrade-dev

Copy link
Copy Markdown
Owner

Post-mortem of run-002 attempt 1 — and the two fixes so it can never happen again

Attempt 1 failed with OPENWEIGHT_API_KEY present but invalid (Together returned 401 invalid_api_key on every call). Diagnosis from the logs: the base URL was correct — the 401 is Together's own response body, so the endpoint was reached; only the key is bad. Two design gaps turned one bad secret into a lost run:

1. Judge preflight (preflightJudges)

--skip-missing only checked that env vars exist. The broken judge then burned 1 252 failed calls, pushed the failure rate to 33 % > 20 %, and the CLI (correctly, per its honesty threshold) refused to bless the run. Now: one live probe call per judge before its ~1 250 scoring calls. Any preflight failure — invalid key, wrong model id, unreachable endpoint — skips that judge and records it as a protocol deviation (same mechanism as Run 001's missing-key skip); the run proceeds with the judges that work. All judges failing → loud refusal with a checklist message. Cost: one ~8-token call per judge. 3 new tests.

2. Failed-run data preservation

The workflow's publish step didn't run after a failed experiment step, so attempt 1's ~2 500 paid Anthropic+OpenAI calls were written to the runner disk and lost. Now the publish step runs if: always(): a failed run's data is pushed to an experiment/<run>-FAILED-<id> branch for diagnosis — with no automatic PR (a failed run must never be offered as results) and a guard for runs that die before writing anything.

Validation

web 414/414, core 213/213, cold tsc clean, sync-core no drift. Workflow changes are dispatch-only paths; no CI-path changes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Y7wiMwFa2D4P8zD9RhCgsv


Generated by Claude Code

…002 attempt-1 post-mortem)

Run-002 attempt 1 failed: OPENWEIGHT_API_KEY present but INVALID
(Together 401 on every call). Two design gaps let that sink the run:

1. --skip-missing only checked env-var PRESENCE, so the broken judge
   burned 1252 failed calls, pushed the failure rate to 33% > 20%, and
   the CLI (correctly) refused to bless the run. NEW: preflightJudges()
   makes ONE live probe call per judge before its ~1250 scoring calls;
   any preflight failure (invalid key, wrong model id, unreachable
   endpoint) skips that judge and records it as a protocol deviation —
   the run proceeds with the judges that actually work. All-fail →
   loud refusal with a checklist message. 3 new tests.

2. The workflow's publish step did not run after a failed experiment
   step, so the ~2500 PAID Anthropic+OpenAI calls of attempt 1 were
   written to the runner disk and lost. NEW: publish runs if: always();
   a failed run's data is pushed on an experiment/<run>-FAILED-<id>
   branch for diagnosis — with NO automatic pull request (a failed run
   must never be offered as results), and a no-output guard when the
   run died before writing anything.

Diagnosis note recorded: OPENWEIGHT_BASE_URL was CORRECT (the 401 is
Together's own response body — the endpoint was reached); the API key
secret itself is invalid and must be replaced.

Validation: web 414/414, core 213/213, cold tsc clean, sync no drift.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7wiMwFa2D4P8zD9RhCgsv
@pixelstrade-dev
pixelstrade-dev merged commit 1135db5 into main Aug 24, 2026
10 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.

2 participants