refactor(manifest): type chain-log filters and gated WASI names - #107
Open
mfw78 wants to merge 2 commits into
Open
refactor(manifest): type chain-log filters and gated WASI names#107mfw78 wants to merge 2 commits into
mfw78 wants to merge 2 commits into
Conversation
AI Assistance: Claude (Fable 5) used for implementation and tests
AI Assistance: Claude Opus 4.5 used for red-team review and 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 two manifest values that stayed stringly-typed past parse time.
Subscription::ChainLogand its serde twinCoreSubscriptionnow carryOption<Address>andOption<B256>instead of raw hex strings, parsed inmanifest/load.rsat manifest load.build_alloy_filterandchainlog_cursor_keytake the typed values directly, so their parse-and-FilterErrorarms are gone and a malformed chain-log address or topic refuses the boot as a manifest error before any compile, not at first log-poller dispatch.The two gated WASI capability names are now a single
enum WasiCap { Sockets, Filesystem }withas_str()and anALLconst.WASI_CAPABILITIESderives fromWasiCap::ALL, andWasiGate::Gatedcarries aWasiCapinstead of an arbitrary&'static str.Why
Closes #28
Two manifest values were parsed twice: once implicitly by the manifest loader accepting any string, and once for real inside the supervisor when a subscription first opened.
That let a malformed address or topic hex sit in a validated manifest and fail only at first dispatch, not at boot.
The gated-WASI name set was duplicated across the
WASI_CAPABILITIESarray and theclassify_wasimatch arms, so adding a namespace meant editing two unlinked sites with no compiler check that they agreed.Testing
cargo nextest run -p nexum-runtime: 434 tests run, 434 passed, 0 skipped.cargo clippy -p nexum-runtime --all-targets: clean.chainlog_cursor_key_matches_the_legacy_string_derivationpins the typed derivation to the same key a pre-typing resume cursor would have written, so an in-flight cursor survives the upgrade.boot_refuses_an_invalid_chain_log_filterasserts the refusal now happens during manifest parse (load module/manifest: parse), before component read or compile, with the pinned operator wording for a bad address and a bad topic.AI Assistance
Claude (Fable 5) used for implementation, Claude Opus 4.5 used for red-team review, Claude Sonnet 5 used for the PR.