Skip to content

wit: rename the intent contract to videre#428

Open
mfw78 wants to merge 1 commit into
feat/host-opaque-status-decouplefrom
feat/videre-rename-reshape
Open

wit: rename the intent contract to videre#428
mfw78 wants to merge 1 commit into
feat/host-opaque-status-decouplefrom
feat/videre-rename-reshape

Conversation

@mfw78

@mfw78 mfw78 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

What

Renames the pre-release intent WIT packages and their Rust symbols into the videre namespace: nexum:intent/nexum:value-flow become videre:types, videre:value-flow, videre:venue; nexum:adapter folds into videre:venue. Splits the fused pool face into a worker face (videre:venue/client) and a provider face (videre:venue/adapter). Renames PoolRouter to VenueRegistry, AdapterActor to VenueActor, GuardPolicy/AllowAllGuard to EgressGuard, and introduces a VenueId newtype. 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:host and shepherd:cow are untouched.

Testing

cargo check --workspace clean.

AI Assistance

Implemented and reviewed with AI assistance.

Closes #369

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.
@mfw78 mfw78 linked an issue Jul 16, 2026 that may be closed by this pull request

@lgahdl lgahdl left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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> {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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.

wit: rename the intent packages to videre

2 participants