docs(wit): freeze WIT clarifications, fix macro nits#257
Open
mfw78 wants to merge 4 commits into
Open
Conversation
b94e368 to
5e26fdd
Compare
5e26fdd to
edd352a
Compare
edd352a to
3820c21
Compare
3820c21 to
f11ba28
Compare
f11ba28 to
28887ff
Compare
28887ff to
1f65126
Compare
1f65126 to
3f8c32b
Compare
3f8c32b to
64c47a3
Compare
64c47a3 to
9743625
Compare
9743625 to
c469a9b
Compare
c469a9b to
43e266c
Compare
43e266c to
39a3de9
Compare
39a3de9 to
8696e02
Compare
8696e02 to
4e63518
Compare
4e63518 to
84cc8eb
Compare
2e26b5c to
cabc179
Compare
cabc179 to
ac900b2
Compare
ac900b2 to
4c0f712
Compare
4c0f712 to
fe80890
Compare
fe80890 to
baa7cea
Compare
baa7cea to
8ad52b6
Compare
8ad52b6 to
f3ab7fa
Compare
f3ab7fa to
f3aa963
Compare
jean-neiverth
approved these changes
Jul 8, 2026
jean-neiverth
left a comment
Collaborator
There was a problem hiding this comment.
nitpick: crates/nexum-runtime/src/host/pool_router.rs - the new charge-asymmetry doc explains that forwarded submissions are charged once the guard admits them, and decode failures are charged to prevent garbage-feeding. It is silent on whether guard denials consume quota (they do not - the charge happens after the guard). Worth stating explicitly so a reader does not have to trace the control flow to confirm.
7fec137 to
801b244
Compare
801b244 to
d458e05
Compare
d458e05 to
34ae51c
Compare
…chain) Mandate minimal-length big-endian for asset-amount and require decoders to compare by value, so the same amount has one canonical wire form across the binding targets. Document native-token(offchain) as representable-but-invalid: an off-chain settlement domain has no gas token, so consumers must reject the pairing rather than interpret it.
…venue packages The shared missing-[capabilities] error named #[nexum_sdk::module] even on the venue path; make it macro-neutral so a venue crate is not told to use the wrong attribute. Mirror synthesize's package-accumulation loop in synthesize_venue so a future venue capability carrying an extra WIT package reaches the resolve path (all venue capabilities are packageless today, so the base set is unchanged).
Align the authorise/authorisation prose in the intent WIT and the conformance kit with the British spelling used elsewhere and with the authorisation identifier itself. Doc comments only; no identifier, wire format, or API name changes.
State the deliberate rule that a forwarded submission is charged once the guard admits it regardless of the venue outcome, while a derive-stage non-decode venue error is left uncharged so the caller may retry.
34ae51c to
6be460b
Compare
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.
Summary
Stacked fixes from the M1 QA sweep against
feat/m1-echo-venue: a WIT freezeclarification for
nexum-value-flowamount encoding and thenative-tokenvariant, a macro correctness fix for venue manifests, and a doc-comment
spelling normalisation, plus documentation of a deliberate charging asymmetry
in the pool router. No wire format, identifier, or behavioural change to the
base set introduced by this stack.
Changes
asset-amount'samountfield and require decoders to compare amounts byvalue, not by byte equality [finding wit: author the nexum:value-flow types package (0.1) with an identifier-hygiene gate #226/amount, minor]
native-token(offchain)as representable-but-intentionally-invalid; consumers MUST reject that pairing since an
off-chain settlement domain has no gas token [finding wit: author the nexum:value-flow types package (0.1) with an identifier-hygiene gate #226/native-token,
minor]
[capabilities]error macro-neutralso a venue crate is no longer told to use
#[nexum_sdk::module][finding sdk: add the #[nexum::venue] proc-macro (adapter cdylib glue + per-component world) #232, nit]
synthesize's package-accumulation loop insynthesize_venueso a future non-packageless venue capability reaches theresolve path (the base package set is unchanged today, since all
venue-permitted capabilities are currently packageless) [venue-authoring,
nit]
spelling across
nexum-intent/types.wit,header.rs,reference.rs, andworld.rs(recognises); doc comments only, no identifier or API namechanges [integration-hygiene, nit]
submit()'s doc comment: a forwarded submission is charged once the guardadmits it regardless of venue outcome, while a derive-stage non-decode
venue error is left uncharged so the caller may retry
Test plan
All five ran inside
nix develop --commandwith--lockedand--config 'build.target-dir="/code/nxm/runtime/target"'(
RUSTFLAGS/RUSTDOCFLAGS=-D warnings, mirroringjust ci):cargo fmt --all -- --check= PASScargo clippy --workspace --all-targets --all-features -- -D warnings= PASS (exit 0)cargo doc --workspace --no-deps(RUSTDOCFLAGS=-D warnings) = PASS (exit 0)cargo build --release --target wasm32-wasip2(example, twap-monitor, ethflow-watcher, price-alert, balance-tracker, stop-loss, flaky-bomb, fuel-bomb, memory-bomb) = PASS (exit 0)cargo test --workspace --all-features --no-fail-fast= PASS (exit 0), 42 suitestest result: ok, zero failed/ignored-as-failureDelta sweep (
4cff6f2...HEAD): no em-dashes and no#NNNissue references in.rs/.witfiles; commit range4cff6f2..HEADcarries no attributionstrings; the four new fix commits likewise carry none.
Notes for reviewer
Part of #137.
Stacked on
feat/m1-echo-venue; merges bottom-up after the fault train,retarget to
developthen.