Parent
Execution
AFK. Start only after every issue in Blocked by is merged, required CI is green for the resulting dev SHA, and the worktree is created from a freshly fetched origin/dev.
Outcome
Define one bounded product-command/daemon error projection from existing safe engine faults and protocol errors without leaking raw diagnostics.
Authoritative contracts/current state
#684 owns EngineFault; protocol errors remain authoritative for protocol methods. The native product currently lacks stable CLI/control error categories and must not expose EngineFault JSON or raw provider/process text directly.
Satisfied prerequisites
Owned scope
- Define a closed product error code, bounded safe message/action, deterministic exit status, and daemon-control response mapping.
- Map protocol validation/CAS/idempotency/capability/not-found conditions without reclassifying them as engine faults; map
EngineFault only through its validated safe fields.
- Keep raw diagnostics, source frames beyond the approved projection, provider codes, paths, URLs, commands, stderr, session IDs, and credentials out of command/control output.
- Provide deterministic text/JSON renderers and round-trip tests with strict bounds/unknown-field rejection.
Acceptance criteria
Verification
cargo test -p zeroshot-rust --test product_errors
cargo test -p zeroshot-rust --test fault_contract
cargo test -p zeroshot-rust --test architecture
npm run rust:check
npm run protocol:check
npm run typecheck
npm run lint
npm run test:unit
opcore check --changed
Every named focused target is an issue-owned deliverable and must execute non-zero tests before the common gates.
Non-goals
- Daemon routing or CLI commands.
- A second fault taxonomy, raw diagnostic serialization, or automatic retry.
- Product export construction.
Blocked by
- None; all prerequisites are already merged.
Unblocks
Parent
Execution
AFK. Start only after every issue in Blocked by is merged, required CI is green for the resulting
devSHA, and the worktree is created from a freshly fetchedorigin/dev.Outcome
Define one bounded product-command/daemon error projection from existing safe engine faults and protocol errors without leaking raw diagnostics.
Authoritative contracts/current state
#684 owns
EngineFault; protocol errors remain authoritative for protocol methods. The native product currently lacks stable CLI/control error categories and must not exposeEngineFaultJSON or raw provider/process text directly.Satisfied prerequisites
Owned scope
EngineFaultonly through its validated safe fields.Acceptance criteria
Verification
Every named focused target is an issue-owned deliverable and must execute non-zero tests before the common gates.
Non-goals
Blocked by
Unblocks