cow: retire the legacy cow-api host cone#471
Conversation
Delete shepherd-cow-host, the shepherd:cow legacy worlds (cow-api, cow-ext, shepherd; cow-events stays as the event-ABI package of record), the shepherd-sdk cow surface, and the shepherd-sdk-test mocks. The shepherd binary composes the core lattice with the videre platform alone. The keeper sweep moves to composable-cow behind the sweep slice; stop-loss migrates onto #[videre_sdk::keeper] and pool submit through the typed CowClient, keyed on the venue-and-body intent-id. twap gates topic-0 on the sol decoder pinned against cow-events; the WIT layering gate moves to cow-venue. ADR-0005/0006 marked superseded.
lgahdl
left a comment
There was a problem hiding this comment.
This is the culmination of the whole venue-platform split tracked across this entire review session, so a few notes at that scale before the line-level findings:
- Process concern: bundling total cone deletion (4242 deletions) with the stop-loss migration and a new enforcement gate into one PR removes the ability to bisect a regression to one of those independently-risky changes. This session found real defects in nearly every predecessor PR in this train — a single atomic diff here is higher-risk for review surface, even if it's the right call for runtime cutover safety. Worth landing this shape as separate PRs next time (migration first, proven stable, then delete).
- Scope clarity: this closes the ADR-0010 (venue-as-adapter-component) half of the original design from #132 cleanly — but grep confirms zero references to
EgressGuard/AllowAllGuardanywhere in this diff. ADR-0012's egress guard pipeline remains the advisory no-op flagged back in #433's review, entirely untouched. Worth being explicit that this PR closes the adapter-boundary half only; the egress-policy half is still open, not implied as done by "cone retirement."
On the code itself: deletion completeness checked out clean (workspace members, README, extensions.toml, engine configs, justfile all consistently updated, no dangling load-time reference found), stop-loss's migration avoids the signature-inclusive dedup bug from #468/#469 (it builds an unsigned order with no re-sign path, so that specific defect doesn't apply here), the journal check-then-act race is inherited unchanged from nexum-sdk::keeper::Journal (untouched by this diff, not newly introduced), and the new wit_layering.rs gate is actually correctly scoped this time — unlike the similar zero-leak scripts in #432/#449/#450/#462, it doesn't have a stale-pattern blind spot (though it's WIT-text-only, so a future Rust-level import of a CoW-specific type from a generic crate with no WIT reference would slip past it — worth pairing with a dependency-graph check eventually).
One real regression in test rigor worth a look:
| ConditionalOrderCreated::SIGNATURE_HASH, | ||
| events::CONDITIONAL_ORDER_CREATED.topic0, | ||
| "sol! topic-0 must match the shepherd:cow/cow-events pin", | ||
| fn topic0_matches_the_cow_events_package_of_record() { |
There was a problem hiding this comment.
The old test compared two independently-sourced values for equality (ConditionalOrderCreated::SIGNATURE_HASH from the sol! macro vs. events::CONDITIONAL_ORDER_CREATED.topic0 from the WIT-derived constant) — a real cross-check that would catch drift between the two sources. This rewrite computes expected from the same SIGNATURE_HASH source and only checks that hex string appears as a substring somewhere in the raw WIT file text — not a parsed/typed comparison against an independent second value. If the WIT-derived constant this used to check against drifted from SIGNATURE_HASH while the WIT file's text still happened to contain the old hex string anywhere (even in a stale comment), this test would still pass. This may be a necessary consequence of the events module being deleted along with the cow client cone rather than a deliberate weakening, but worth restoring an independent second source for the comparison if one is available (e.g. parsing the WIT file's actual const/comment value rather than a raw substring match).
|
Pre-verified ahead of this car reaching the frontier, so it does not need re-deriving at review time. This car deletes Checked that the deletion re-points consumers at the generated constants rather than relocating the literals. On #463 the call sites read So this is the correct end state and no follow-up is needed. Noting for completeness that between #463 and this car the tree carries hash literals whose sole guard is |
What
Deletes the legacy
shepherd-cow-hostextension, theshepherd:cowlegacy WIT worlds (cow-api,cow-ext,shepherd;cow-eventsstays as the event-ABI package of record), theshepherd-sdkcow client cone, andshepherd-sdk-testmocks. Adds asweepslice tocomposable-cow(poll-loop composition over the typedcow-venueclient onvidere:venue/client) and moves stop-loss onto#[videre_sdk::keeper]+ pool submit, keyed on the venue-and-body intent-id. twap gates topic-0 on the sol decoder pinned againstcow-events. Adds a WIT layering gate incow-venueasserting no generic package referencesshepherd:cow. Marks ADR-0005/0006 superseded.Why
Closes out the CoW-on-videre split for M4: the submit/status path is now served entirely by the
cow-venueadapter over the pool, so the interim host-sidecow-apishim is dead weight per the videre-split-plan §4 (the R2 category error resolution and the clean adapter/keeper re-split).Testing
cargo fmt --all --checkcargo check --workspace --all-featurescargo clippy --workspace --all-targets --all-features -- -D warningscargo nextest run --workspace --all-features --no-fail-fastcargo test --docAI Assistance
Implemented with Claude Code assistance; reviewed and gated by mfw78.
Closes #293