Skip to content

[BUG] Missing --buildDir not caught until inside storage phase (preflight gap) #267

@ottovlotto

Description

@ottovlotto

Severity: Missing spec requirements (P1)
Reported by: DevEx Audit External
Source: DevEx Audit (External), 3 June 2026

Symptom

Bug: Missing buildDir not caught until inside storage phase
Spec reference: CLAUDE.md › "Preflight validation"; plan Task 6 Step 2

When --buildDir points to a non-existent path, the CLI starts the storage phase (▸ storage-and-dotns) before detecting the missing directory. The spec intent is that all input validation happens in preflight before any on-chain or storage operations begin.

Actual output:

Checking availability of e2epreflight00.dot…
✔ e2epreflight00.dot is available

Deploying e2epreflight00.dot

 Build dir  /tmp/definitely-does-not-exist/dist
 ...
 No phone approvals required.

▸ storage-and-dotns…
 ✖ storage-and-dotns: Path not found: /tmp/definitely-does-not-exist/dist

✖ Path not found: /tmp/definitely-does-not-exist/dist
Exit: 1

Reproduction

DOT_DEPLOY_VERBOSE=1 DOT_MEMORY_TRACE=1 playground deploy \
 --signer dev --domain e2epreflight00 \
 --buildDir /tmp/definitely-does-not-exist/dist \
 --playground --private --suri //Alice --no-build 2> >(tee dot.log >&2)

Recommended fix / next steps

  • Move buildDir existence check into preflight, before ▸ storage-and-dotns starts and ideally before the deploy summary block is rendered.
  • Add the same preflight pattern for any other path-typed flags (--manifest, --config, etc.).
  • Spec reference: CLAUDE.md › "Preflight validation"; plan Task 6 Step 2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Defer to V1.x — not blocking V1 shipbugSomething isn't working

    Type

    No type
    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