wit: rename the intent contract to videre#428
Conversation
Rename the pre-release intent packages into the videre namespace and
reshape them to the pinned 0.1.0 surface: nexum:value-flow becomes
videre:value-flow, nexum:intent splits into videre:types and the
two-faced videre:venue (worker client, provider adapter), and
nexum:adapter retires with its venue-adapter world folded into
videre:venue. nexum:host and shepherd:cow are untouched.
The 0.1 shapes are EVM-only and thin: single-asset gives/wants,
auth-scheme {eip1271, eip712}, settlement {chain}, uint amounts
(big-endian, minimal-length), asset {native, erc20{token}}, plain-enum
intent-status, the seven-case venue-error with rate-limit, unsigned-tx
{chain, to, value, data}, and the quotation record. Dropped cases
return as additive 0.2+ variants; quote functions land separately.
Rust follows the wire: PoolRouter is VenueRegistry, AdapterActor is
VenueActor, GuardPolicy/AllowAllGuard collapse into EgressGuard (the
unit guard allows every egress), IntentPool is VenueClient, PoolQuota
is SubmitQuota, and a VenueId newtype keys the registry. Quota
exhaustion now reports rate-limited with the window; adapter traps
project onto unavailable. The module capability is client; goldens
and the conformance mirrors follow the single-asset header.
lgahdl
left a comment
There was a problem hiding this comment.
Well-executed mechanical rename overall — exhaustive check found zero stale references to the old names (PoolRouter, AdapterActor, GuardPolicy, AllowAllGuard, nexum:intent, nexum:adapter) anywhere in the repo, the client/adapter face split is a clean 1:1 mapping of worker/provider roles with no leaked coupling, and the regenerated goldens genuinely reflect the new WIT shape. One real behavior change riding along with the rename, plus a smaller validation gap:
| // first status poll, with no venue-side settlement proof. | ||
| Ok(IntentStatus::Settled(None)) | ||
| } | ||
| fn status(_receipt: Vec<u8>) -> Result<IntentStatus, VenueError> { |
There was a problem hiding this comment.
This isn't purely mechanical: status/cancel previously rejected an empty receipt with VenueError::InvalidReceipt; that check (and the InvalidReceipt variant itself) is dropped here, and the corresponding test (disowned_receipt_is_dropped_from_the_watch) was deleted rather than adapted rather than updated to the new shape. Both paths now unconditionally succeed on any receipt, including empty ones. Worth an explicit call-out in the PR description that this validation was intentionally dropped (and why), rather than it reading as a side effect of the rename.
| /// Venue identifier: the id an adapter registers under and a submission | ||
| /// names. Opaque beyond equality. | ||
| #[derive(Clone, Debug, Eq, Hash, PartialEq)] | ||
| pub struct VenueId(String); |
There was a problem hiding this comment.
VenueId's From<String>/From<&str> wrap any string unchecked — nothing rejects empty or whitespace-only input. An adapter manifest with a blank name would install under VenueId(""), silently colliding with any other misconfigured adapter, or a keeper calling client::submit("", body) would resolve to a venue instead of failing with a clear config error. Consider a VenueId::new(id) -> Result<Self, _> that rejects empty/whitespace, used at the manifest/host-import boundary.
What
Renames the pre-release intent WIT packages and their Rust symbols into the videre namespace:
nexum:intent/nexum:value-flowbecomevidere:types,videre:value-flow,videre:venue;nexum:adapterfolds intovidere:venue. Splits the fusedpoolface into a worker face (videre:venue/client) and a provider face (videre:venue/adapter). RenamesPoolRoutertoVenueRegistry,AdapterActortoVenueActor,GuardPolicy/AllowAllGuardtoEgressGuard, and introduces aVenueIdnewtype. Regenerates goldens for echo-venue/echo-client.Why
Pins the videre contract shape ahead of the 0.1.0 freeze: a venue-neutral namespace, separate worker/provider faces, and Rust symbols that match.
nexum:hostandshepherd:coware untouched.Testing
cargo check --workspace clean.
AI Assistance
Implemented and reviewed with AI assistance.
Closes #369