Skip to content

E2E Phase 5f — rust-cdm fixture upgrade + re-add pr-deploy-cdm cell #108

Description

@EnderOfWorlds007

Summary

Per the master plan (docs-internal/2026-05-02-e2e-test-suite-design.md §3a), the original PR-tier matrix included a pr-deploy-cdm cell exercising the PVM/CDM (Rust ink!) backend full-deploy. It was dropped in Phase 4 (#85) pending fixture upgrade and is currently describe.skip'd in e2e/cli/deploy.test.ts. This phase un-skips it.

Why it's blocked today

The current e2e/cli/fixtures/projects/rust-cdm/ fixture has:

  • An incomplete Cargo.toml (no [[bin]] or [lib] target). cargo metadata (called by @dotdm/contracts::detectContracts) errors with "no targets specified in the manifest."
  • A stub target/flipper.contract containing literal {"source":{"hash":"0xabc"}} — fake, not real PolkaVM bytecode.
  • No target/<crate>.release.polkavm (which is what compileCdmSkipBuild actually reads after PR feat(deploy): --no-contract-build flag for CI without contract toolchains #86's --no-contract-build work).

A real CDM contract needs to be compiled once with cargo-contract build and the artefact committed.

What needs to ship

Two paths — pick one:

Path A (recommended, smaller): commit a pre-built target/<crate>.release.polkavm artefact + add a real src/lib.rs so cargo metadata succeeds.

  • Maintainer runs cargo-contract build once locally on a minimal flipper contract
  • Commit Cargo.toml (with proper [lib] target), src/lib.rs (a minimal flipper or contract), target/<crate>.release.polkavm (raw bytecode)
  • Un-skip the describe.skip block in deploy.test.ts
  • Add pr-deploy-cdm back to the test-publish matrix in .github/workflows/e2e.yml

Path B (CI-side, larger): install the rust toolchain + cargo-contract in the CI matrix step that runs the cdm cell.

  • Adds 2-5 min per cell run (rust install + cargo cache miss)
  • Doesn't require committing build artefacts
  • Closer to bulletin-deploy's nightly pattern but at PR-tier cost

Open questions for you

  1. Path A or Path B? Path A is operationally cheaper but requires you (a maintainer with the toolchain) to run cargo-contract once. Path B is automation-only but slows every cdm cell run.

  2. Contract source: a minimal flipper (canonical ink! example, ~30 lines) is fine, OR a contract that exercises a more realistic deploy path (e.g. constructor-args, multi-message) if you want the test coverage. Recommendation: minimal flipper for parity with the foundry/hardhat fixtures (which use trivial bytecode stubs).

  3. Crate name + domain pinning: the existing fixture uses Cargo.toml package name e2e-flipper. The E2E_DOMAINS.cdm is e2e-cli-cdm. The artefact path will be target/e2e-flipper.release.polkavm — verify compileCdmSkipBuild's glob matches this naming (or rename the crate to match).

  4. Toolchain version: pin a specific cargo-contract version when running locally so the bytecode is reproducible. @dotdm/contracts likely targets a specific minor — check its package.json.

  5. detectContracts bypass option: the simplify reviewer on PR feat(deploy): --no-contract-build flag for CI without contract toolchains #86 noted that compileCdmSkipBuild calls detectContracts which spawns cargo metadata even on the skip-build path. That requires Rust toolchain at runtime even though we're "skipping" build. Worth a follow-up to either glob target/*.release.polkavm directly, or accept the cargo-runtime requirement. Affects whether Path A's commit-only approach actually works without rust on CI.

Tracking

Spec reference

docs-internal/2026-05-02-e2e-test-suite-design.md §3a (pr-deploy-cdm cell), §15 phase 5f.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions