Repository navigation
Conversation
β¦ailover card, gHashTag/t27#10403) Wire specs/queen/key_failover.t27 (t27#9998) into the live dispatcher the way dispatch_exit is wired: the card is vendored byte-identical, its wasm built with t27c gen-c + zig, its constants from t27c gen-ts; the host only carries numbers in and out. - drain: a 429, 5xx or Z.ai 1302/1305 stream error closes the row as "provider overloaded (http N | zai code N)" via error_kind; no response body, no credential in the label. - dispatchBee: a key whose closed rows are inside cooldown_seconds counts as full, so availableKeyIndex skips it and the bee takes the next key. - beeEndOfRow: the new label ends as EF_PROVIDER, not charged to the issue. - The Z.ai quota-code Set is deleted; classifyQuotaExhaustion asks the card's is_quota_code. The 14-code test keeps the same assertions, plus 1302/1305. - Behind TRIOS_QUEEN_KEY_FAILOVER=on; off is the previous behaviour. Foreign-line budget: 70 added, 70 deleted (no file over 40, no new foreign file). Not in this change: pool-level next-pool failover, keyed_batch admission. Refs gHashTag/t27#10403 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Summary by t27-beesChecked by the t27 compilert27c parse, parse-complete and typecheck on each changed .t27 file at
Read by the modelThis PR wires the Worth a look
Read: 8 files, +520 -70, the whole diff. Head |
β Tests passed β 3915/3988
|
Wires
specs/queen/key_failover.t27(gHashTag/t27#9998) into the live Queen dispatcher, the waydispatch_exitis wired. Tracking issue: gHashTag/t27#10403 (a closing keyword cannot work across repos and this PR does not target the default branch, so the issue is closed from the t27 evidence PR).What it does
drain(queen-dispatch.ts): a 429, 5xx or Z.ai 1302/1305 stream error closes the row asprovider overloaded (http N | zai code N), chosen by the card'serror_kind. The label carries no response body and no credential.dispatchBee: a key whose closed rows are still insidecooldown_seconds(15 s doubled per strike, cap 240 s; quota 1800 s) counts as full, soavailableKeyIndexskips it and the bee takes the next key. The reading of the closed rows isrestingKeysin queen-contributor-keys.ts.beeEndOfRow(actors path): the new label ends asEF_PROVIDER, so a key refusal is not charged to the issue.Setis deleted;classifyQuotaExhaustionasks the card'sis_quota_code. The 14-code test keeps its assertions and adds 1302/1305 as non-quota.TRIOS_QUEEN_KEY_FAILOVER=on. Off is the previous behaviour (restingKeysreturns[],classifyOverloadreturnsnull).Own-language budget
Hand-written TS: 70 added, 70 deleted (shrink-only holds), no file over 40 added lines, no new foreign file. The card, its wasm (831 bytes, two builds, one hash) and
queen-key-failover-card.gen.tsare tool-written; PIN lines added. Noowner-approved-foreignlabel is needed.Evidence and what is not verified
Run on the Railway lab (details in the t27 evidence PR): the vendored card passes its tests, and two mutations that restore the old behaviour each fail a named test. The TypeScript wiring itself has not been executed: the lab has no bun and the repo tests are
bun test, and nothing heavy runs on the Mac. CI on this PR is the first run of the changed TS.Not in this PR
pool_overloaded).keyed_batch(t27#10051): admission batching exists only on the actors path (off in production) and needs a restructure, not a thin edit.π€ Generated with Claude Code