Skip to content

fix(providers): split parked and terminal failures - #2198

Merged
justinhelmer merged 1 commit into
fix/provider-failure-seamfrom
fix/provider-failure-seam-ci
Sep 22, 2026
Merged

justinhelmer merged 1 commit into
fix/provider-failure-seamfrom
fix/provider-failure-seam-ci

Conversation

@coreplane-switchboard

Copy link
Copy Markdown
Contributor

Separates recoverable provider outages from failures that must end immediately, while preserving operator diagnostics and safe requester wording. One-shot CLI asks now fail with exit 1 instead of silently succeeding.

Why: PR #2195 exposed four branch-local CI regressions while implementing issue #2170. The fix preserves record 0075's typed seam without erasing operator context or parking permanent failures.

Where to look

  1. Per-surface provider diagnostics Keeps provider and key-variable context on typed errors while requester renderers continue to receive only cause-owned safe sentences. ⚠ Diagnostic text must never absorb a provider payload or URL.
  2. Operator refusal split Retains safe requester wording, logs the operator diagnostic, and marks a provider-refused request as failed before any run exists. ⚠ Missing the failure signal makes one-shot asks exit successfully.
  3. CLI 401 process contract Proves a key-invalid one-shot ask exits 1, hides provider prose on stdout, and keeps provider plus variable context on stderr.
  4. Park/end conformance matrix Declares the control-flow disposition beside representative credit, absent-key, invalid-key, and unknown-model causes. ⚠ A wrong disposition can hold permanent failures or terminate recoverable work.
  5. Living provider-failure contract Documents requester-versus-operator rendering and the live-lease boundary that separates parked causes from terminal ones.
  6. Regenerated decision index Adds accepted record 0075 to the generated design-decisions table so docs validation matches the record set.

Feedback wanted: Please check the no-run request-failure signal and confirm the matrix's three park causes versus five terminal causes match every consumer.

Risk: The split affects provider errors at the operator and CLI boundaries. A wrong signal can change process status; rollback is this single commit. The executor required a stacked branch because PR #2195's head is this run's protected base.

Verified: Eight focused files (521 tests), root TypeScript, changed-file ESLint/Prettier, docs, hygiene, and specs checks passed; CI remains the final gate.

Decisions (3)
  • Keep diagnostics on the typed error. Rejected replacing Error.message with requester wording everywhere. Config loading, deploy validation, and operator logs need the provider and configured variable; renderProviderFailure remains the only requester text.
  • Signal pre-run failures through ChannelIO. Rejected parsing reply prose in the CLI and inventing a run receipt for a request that never created a run. An optional typed requestFailed callback keeps transport status separate from rendering.
  • Make disposition matrix data. Rejected a second list in prose or status-based branching. Each closed cause now carries an explicit expected park/end disposition checked against providerFailureParks.
Validation (6 criteria)
Criterion Proof
All reported provider and CLI regressions are fixed npx vitest run src/config.test.ts src/cli.ask.test.ts src/cli.test.ts src/core/providerConformance.test.ts ... passed: 8 files, 521 tests.
Provider, proxy, operator, CLI, and wrapper types compile NODE_OPTIONS=--max-old-space-size=6144 npx tsc --noEmit -p tsconfig.json passed with no output.
Changed TypeScript satisfies lint npx eslint over the 10 changed TypeScript files passed with no output.
Generated docs and reference docs are current npm run docs:gen wrote design-decisions.md; npm run docs:check passed: 12 files match.
Formatting and repository consistency gates pass Changed-file npx prettier --check, npm run hygiene:check, and npm run specs:check all passed.
PR title follows release vocabulary npm run check:pr-title -- "fix(providers): split parked and terminal failures" passed.
For agents

Head 0c53bb5 is rebased on origin/main 714dbd3. Direct pushes to fix/provider-failure-seam were refused twice because that ref is this run's protected PR target, so this commit was pushed to fix/provider-failure-seam-ci as a stacked fix. PR #2195 itself remains at be89b85 until this stack lands. No generated file was hand-edited; docs/explanation/design-decisions.md came from npm run docs:gen.
Requested by @justinhelmer in slack:C0BRRHKFLCB

🤖 Generated with Claude Code

Co-Authored-By: coreplane-switchboard[bot] <318072483+coreplane-switchboard[bot]@users.noreply.github.com>
@justinhelmer
justinhelmer merged commit bc2a134 into fix/provider-failure-seam Sep 22, 2026
29 checks passed
@justinhelmer
justinhelmer deleted the fix/provider-failure-seam-ci branch September 22, 2026 08:03
coreplane-switchboard Bot added a commit that referenced this pull request Sep 22, 2026
Co-authored-by: justinhelmer <1403438+justinhelmer@users.noreply.github.com>
Co-authored-by: coreplane-switchboard[bot] <318072483+coreplane-switchboard[bot]@users.noreply.github.com>
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