Skip to content

refactor(errors): type launch, dedup, and add-on refusal surfaces - #112

Open
mfw78 wants to merge 2 commits into
types/t3-topic-parityfrom
types/t4-typed-errors
Open

refactor(errors): type launch, dedup, and add-on refusal surfaces#112
mfw78 wants to merge 2 commits into
types/t3-topic-parityfrom
types/t4-typed-errors

Conversation

@mfw78

@mfw78 mfw78 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

What

Types the remaining anyhow refusal surfaces in the boot and launch path: launch failures in builder.rs, extension-namespace dedup in host/extension.rs, and add-on install failures in addons.rs now carry typed variants instead of anyhow!/bail! strings.
The registered-kind and configured-chain lists move from pre-joined strings to typed fields on their error variants.
Capability violations and digest mismatches are now counted under the boot-refusal counter alongside the other refusal kinds.
The boot refusal taxonomy itself (supervisor/mod.rs, supervisor/admission.rs, supervisor/load.rs, supervisor/prepass.rs, supervisor/artifact.rs) was typed in the first commit as the base this work builds on.

Why

Closes #51

anyhow as a library error vocabulary forces every caller and test to match on a formatted string instead of a variant, and drops the Error::source() chain.
The reference pattern already in the tree (ChainError in nexum-sdk/src/host.rs) shows a fully typed seam letting callers aggregate with bare ?.
This PR brings the launch, extension-dedup, and add-on install refusals up to that pattern, and stops pre-joining the kind/chain lists into strings so downstream matching (including the test-side work in #52) can bind to real data instead of parsing text.

Testing

cargo nextest run -p nexum-runtime on types/t4-typed-errors (rebased on types/t3-topic-parity): 437 tests run, 437 passed, 0 skipped.
crates/nexum-runtime/src/supervisor/tests/boot_refusals.rs extended to cover the newly typed refusal variants and the capability-violation/digest-mismatch counter cases.

AI Assistance

Implement claude-fable-5, red-team claude-opus-5, PR claude-sonnet-5.

mfw78 added 2 commits August 6, 2026 13:31
AI Assistance: Claude Fable 5 used for implementation
…nter holes

Type the launch, extension-dedup, and add-on install refusals that still
spoke anyhow, carry the registered-kind and configured-chain lists as typed
fields rather than pre-joined strings, and count capability violations and
digest mismatches under the boot-refusal counter.

AI Assistance: Claude Opus 4.5 used for red-team review and the fixes
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