Repository navigation
feat: typed errors, fault-injection upstream, dev deploy canaries, PR template - #2368
Merged
Merged
Conversation
… deploy canaries, PR template Bugs from 30 Nov passed CI and were found by using the app. This adds the guards that catch that class before users do. - Typed errors: `Orb.ErrorCode` is the one registry of error codes (transient reason or permanent); `OrbCore.ErrorClass` reads a harness's error text by `[orb:<code>]` tags, error JSON code fields and the HTTP status, never phrases. The proxy tags every error message whose body names a registered code, stream-cut frames carry their tag, and the Pi driver's exit error carries `harness_exited`. Replaces the substring classifier. Shared vectors: shared/orb-spec/fixtures/error-classes.json, replayed by orb-spec-runner. - Fault-injection upstream: `/__fault/v1/*` in Core, on only when ORB_FAULT_UPSTREAM_KEY is set (dev, tests), speaking Chat Completions, Responses and Anthropic Messages; models fault-ok, fault-503, fault-503x<n>, fault-cut, fault-stall-<ms>, fault-late429-<ms>. - Deploy canaries: scripts/ops/orb-deploy-canary, run by orb-deploy before prod promotion: restart dev and launch at once, harness x placement missions on the fault upstream to a real first turn, Pi 503 recovery, proxy cut/stall/late-429 probes, Mythos 403 no_cyber_access_account, no ghost missions. Reports via `orb-monitor --report`. ORB_DEPLOY_CANARY=warn|skip overrides. - PR template: "Not verified live" is a checklist closed by a named canary or follow-up.
…storf-87de8d # Conflicts: # AGENTS.md # scripts/ops/orb-deploy
…rity test ignores it
…e the tagged cut messages
…ds the message so the 1000-char cut keeps it
1 task
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.
What and why
Five bugs on 30 Nov passed CI and were found by Thomas using the app (#2352, #2354, #2355, #2358, and an outdated desktop build). This PR adds the Core and ops guards against that class of bug. Sibling PRs: launch admission matrix #2366; client state lint and version-skew notice #2362.
Typed errors (docs/specs/typed-errors.md).
Orb.ErrorCodeis now the one registry of error codes. Each code is either transient (with a reason) or permanent.OrbCore.ErrorClass.classifyText?classifies a harness's error text from three sources only:[orb:<code>]tags, the error JSON's code fields, and the HTTP status (503/504/529). It never matches phrases.[orb:<code>]to every/v1/*error message whose body names a registered code (tagProxyErrorResponse). Stream-cut frames carry their code, and the Pi driver's exit error carriesharness_exited.shared/orb-spec/fixtures/error-classes.json;orb-spec-runner --fixtureschecks that the registry and the fixture match both ways.Fault-injection upstream (docs/specs/fault-upstream.md). Core serves
/__fault/v1/*only whenORB_FAULT_UPSTREAM_KEYis set (dev and tests) and the caller presents that key.fault-ok,fault-503,fault-503x<n>,fault-cut,fault-stall-<ms>,fault-late429-<ms>.Deploy canaries (docs/operations/deploy-canaries.md).
orb-deployrunsscripts/ops/orb-deploy-canaryon dev and promotes prod only if it passes. The canary:/api/healthanswers;uruk) on the fault upstream, each to a real first turn;fault-503x1recovers;403 no_cyber_access_account;It reports PASS or FAIL to the Orb monitor (new
orb-monitor --report).ORB_DEPLOY_CANARY=warn|skipoverrides the gate.orb-deploycreates/etc/orb/fault-upstream.envand adds it to the dev unit only.PR template: the "Not verified live" section is now a checklist. Each box must be closed by a named canary check or a linked follow-up.
How it was tested
Built on ashur with
scripts/build_orb_bins.sh --only orb-core-test --only orb-spec-runner: build OK.orb-spec-runner --fixtures shared/orb-spec/fixtures:6 passed(includes the new error-classes replay).New tests in
orb-core-test:ProxyRoutingTests.faultUpstreamFixture: every mode and protocol, the key gate, and the 503 status classification.dispatchCoreRequest) returns[orb:model_not_found]in the message, and that classifies as permanent.orb-core-testitself ran on ashur, but SSH to the fleet dropped (YubiKey agent) before I could read its result, so CI is the source of truth for it.Not verified live
orb-deploy-canary --no-restarton dev after the dev deploy, before the first prod promotion with the gate on (ORB_DEPLOY_CANARY=warnfor that first run if needed).<harness>@core/<harness>@remote.sandboxed-nodeupdate. Until then, a Pi exit on an old node is no longer classified transient.Notes
[done]data:glued-frame match: the proxy now sends a taggedstream_incompleteframe instead.handleFaultUpstream?andtagProxyErrorResponseout ofdispatchCoreRequestRaw, which is at its heartbeat budget.