Repository navigation
test(e2e): cover publish CLI chain writes (#1073) - #1273
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (1)
WalkthroughAdds a pending-assignment binding, a gated Anvil-backed ChangesPublish CLI end-to-end flow
Redemption accounting validation
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant E2ETest
participant DecdnCLI
participant NodeFixture
participant PublisherRegistry
participant OriginAssignment
E2ETest->>DecdnCLI: Create namespace
DecdnCLI->>NodeFixture: Submit transaction
NodeFixture->>PublisherRegistry: Create namespace
PublisherRegistry-->>E2ETest: Return namespace_id
E2ETest->>DecdnCLI: Submit claim
DecdnCLI->>NodeFixture: Submit claim transaction
E2ETest->>PublisherRegistry: Verify ownership and claim mapping
E2ETest->>DecdnCLI: Assign operator
DecdnCLI->>NodeFixture: Submit assignment proposal
E2ETest->>OriginAssignment: Read pending assignment and active origins
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
Coverage reportTotal: 81.73% (was 81.84%, ▼ 0.11%) — 49682/60791 lines No coverage data for changed Rust files. History
|
Review —
|
The docs/superpowers/ plan and design files were per-PR agent-workflow scaffolding rather than project documentation, and were the sole cause of the markdownlint (MD032/blanks-around-lists) CI failure. Removing them keeps the PR to its actual deliverable -- the publish-CLI e2e test and the getPendingAssignment binding -- and turns CI green with no code changes. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01AcyKTsWWEM4hdSWiVGWBKq
The smoke test's served-bytes cross-layer check polled until the on-chain counter advanced past zero, then asserted it equalled the 2 MiB payload. But the paid client pays a cumulative voucher at each `voucher_interval_mb` boundary plus a closing voucher, so a multi-interval payload is redeemed on-chain in more than one step. Served-bytes is briefly observable at an intermediate boundary (1 MiB) before it climbs to the 2 MiB total, and under CI load the poll caught that intermediate value and failed the exact -equality assertion (left: 1048576, right: 2097152). Poll until served-bytes *reaches* the expected total instead of merely past zero, then keep the exact-equality assertion so accounting drift that overshoots the payload size is still caught. Correct the stale comment that claimed a single-blob fetch redeems exactly one cumulative voucher. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Gas snapshotNo gas changes vs base. |
Contracts coverageLine coverage: 88.95% (2495/2805 lines) |
Summary
decdn publish namespace create,claim, andassignbinary pathsnamespaceOfclaim state, the pending assignment, and the still-empty active origin setgetPendingAssignmentin the e2e binding and make CLI subprocesses async/kill-on-drop so the overall timeout is authoritativeImpact
CI now covers the publish control-plane submit path against the deployed fixture contracts instead of relying only on output-formatting unit tests.
Validation
cargo check -p decdn-e2e --features anvil-e2e --test cli_publishcargo clippy -p decdn-e2e --features anvil-e2e --test cli_publish -- -D warningscargo test -p decdn-cli publish(15 passed)cargo test -p decdn-e2e --lib(3 passed)cargo build -p decdn-node -p decdn-clicargo fmt -- --checkgit diff --checkThe live Anvil/Forge journey was compile-checked locally; this machine does not have
anvil,forge, orcargo-nextest, so CI performs the live execution.Closes #1073
Summary by CodeRabbit
New Features
publishCLI.Bug Fixes
Tests
anvil-e2efeature.