refactor(errors): type launch, dedup, and add-on refusal surfaces - #112
Open
mfw78 wants to merge 2 commits into
Open
refactor(errors): type launch, dedup, and add-on refusal surfaces#112mfw78 wants to merge 2 commits into
mfw78 wants to merge 2 commits into
Conversation
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
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
Types the remaining anyhow refusal surfaces in the boot and launch path: launch failures in
builder.rs, extension-namespace dedup inhost/extension.rs, and add-on install failures inaddons.rsnow carry typed variants instead ofanyhow!/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
anyhowas a library error vocabulary forces every caller and test to match on a formatted string instead of a variant, and drops theError::source()chain.The reference pattern already in the tree (
ChainErrorinnexum-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-runtimeontypes/t4-typed-errors(rebased ontypes/t3-topic-parity): 437 tests run, 437 passed, 0 skipped.crates/nexum-runtime/src/supervisor/tests/boot_refusals.rsextended 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.