Skip to content

docs: ConduitError + structured-output design (v0.16 foundation)#2523

Merged
devarismeroxa merged 1 commit into
mainfrom
docs/conduit-error-design
Jul 5, 2026
Merged

docs: ConduitError + structured-output design (v0.16 foundation)#2523
devarismeroxa merged 1 commit into
mainfrom
docs/conduit-error-design

Conversation

@devarismeroxa

Copy link
Copy Markdown
Contributor

Design doc for the v0.16 linchpin — a uniform, machine-actionable error model + structured --json output that the MCP server, CLI, React UI, and conduit generate all consume.

Reviewed and corrected

An independent technical review verified it against the codebase. Headline: the load-bearing compatibility claim is CONFIRMED live — adding a google.rpc.ErrorInfo detail to the existing Status is preserved through grpc-gateway into the HTTP JSON body with no error-handler change (the marshal was run and verified). So the core bet holds; no public-contract fork.

Corrections folded in:

  1. Mandatory NewConduitError constructor — a leaf error otherwise carries zero stack frames (*ConduitError isn't an xerrors type).
  2. Explicit GRPCCode per registry entry, not inferred by string-matching the code name.
  3. Stated no-nested-ConduitError invariant (errors.As returns the outermost, shadowing inner codes).
  4. Honest --json re-cost: framework wiring is O(1), but per-command Result extraction across ~16–23 commands is not eliminated.
  5. configPath scoped correctly: the existing YAML line/column data covers only the provisioning-file boundary; JSON-pointer generation for API/CLI + semantic-validation errors is net-new work.
  6. schemaVersion is its own minimal mechanism, not the config-YAML version machinery (different problem).
  7. Concrete CI-guard: a runtime UnaryServerInterceptor that's CI-fatal; static analysis / handler refactor is later hardening.
  8. Explicit gap: plugin-originated errors (bad credentials, missing table) can't carry a code without a versioned conduit-connector-protocol change — breaking territory, gets its own ADR before rollout touches it.

Tier 3 (docs). Scopes v0.16 §1.1.

🤖 Generated with Claude Code

Design doc for the v0.16 linchpin: a uniform, machine-actionable error model
(ConduitError, dual Go-error/proto encoding) and structured `--json` output that
the MCP server, CLI, React UI, and `conduit generate` all consume.

Reviewed against the codebase. The load-bearing compat claim is verified: adding
a google.rpc.ErrorInfo detail to the existing status is preserved through
grpc-gateway into the HTTP JSON body with no error-handler change (purely
additive). Corrections folded in: mandatory NewConduitError constructor (leaf
errors otherwise carry no stack trace); explicit GRPCCode per registry entry (not
string-inferred); a no-nested-error invariant; honest re-costing of the ecdysis
--json work (framework wiring O(1), per-command Result extraction O(n)); correct
scoping of configPath (real only for the provisioning-YAML boundary, JSON-pointer
generation is net-new elsewhere); a concrete CI-guard mechanism (runtime
interceptor, CI-fatal); and an explicit gap — plugin-originated errors need a
versioned conduit-connector-protocol change and their own ADR.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@devarismeroxa devarismeroxa requested a review from a team as a code owner July 5, 2026 18:55
@devarismeroxa devarismeroxa merged commit 843cba6 into main Jul 5, 2026
6 checks passed
@devarismeroxa devarismeroxa deleted the docs/conduit-error-design branch July 5, 2026 19:07
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