Skip to content
Cockpit0.29.0
A snapshot: read at commit 707a04c7ce8 on 2026-10-18T00:06:01Z by majordomus 0.29.0. Nothing on this page is read again. See it live

I0902

The deployment object becomes typed Rust that refuses nonsense

Where it stands

devtask.issue
Readiness
complete completion is recorded and every required evidence token is present
Status
DONE
Can start
not now
Milestone
Milestone status
ACTIVE
Wave
1
Waiting on
none
Holds back
Behind it in all
29
Evidence
3 of 3
A move writes the repository: it stamps one field of this issue's record and appends one event to the ledger, and a commit will carry both.
The same moves from a terminal

majordomus plan start I0902

majordomus plan verify I0902

majordomus plan done I0902

What it is

Objective
Parse the canonical deployment object into strongly typed Rust — enums and newtypes rather than strings — and validate it so that a deployment that cannot work is refused before anything is built.
Why
Generation from an unvalidated document produces a valid-looking Dockerfile pointing at a binary that does not exist. The validation is the point at which a deployment mistake costs a test failure instead of a failed production rollout.
Now
apps/majordomus-cli/src/deploy/ exists and parses the deployment object into typed structures, and apps/majordomus-cli/src/capability/builtin/deploy.rs projects it through the registry. As with I0901 the work reached master without ever being recorded against the issue. Measured on master 6042f4286, 2026-09-10; not marked complete here because this issue's validation has not been rerun against that tree.
Wanted
A deploy module parses the object into typed structures, validates every invariant that can be decided locally, and reports a failure that names the file, the key, what was wrong and what to do.
Done when
unknown: the record declares no `completion`
Risk
Route validation needs the capability registry, which makes the deployment model depend on the index. Reading the registry that already exists is correct; building a second route list to avoid the dependency is not.

Acceptance

  • Ports, memory, CPU class, machine counts and routes are typed rather than strings, and an invalid value cannot be constructed
  • Validation refuses zero memory, an invalid port, a health or readiness route that no capability registers, a package or binary the workspace does not contain, a build input that does not resolve, and a minimum running count above the machine count
  • Every refusal names the source file, the key, the observed value and the correction
  • Property tests cover the invariants that must hold for any accepted object, not merely the examples in the repository
  • Unit tests cover each refusal
Validation
cargo test --workspace --all-featurescargo clippy --workspace --all-targets --all-features -- -D warnings
Evidence required
typed_parsevalidation_refusesproperty_invariants
Evidence present
typed_parsevalidation_refusesproperty_invariants

Scope

Touches
apps/majordomus-cli/src/deploy
Not
Provider projection; that is I0913Any network call, any process spawn, any Fly API accessA generic multi-provider trait hierarchy for a single provider
Depends on
Priority
p0
Profile
implementation
Parallel safe
true
Owner
unknown: the record declares no `owner`

The work so far

Branches
none
Merged
none
Commits
0
Trunk
master
Sessions
none
Created
2026-09-06
Updated
2026-10-14T08:01:10Z
Started
2026-10-14T08:00:59Z
Verified
unknown: the record declares no `verified_at`
Completed
2026-10-14T08:01:10Z

Synchronisation

Adapter
scripts/github-sync
Repository
unknown: the derived plan's header carries no repository
External issue
unknown: a live GitHub state; this executable makes no network call, so only `scripts/github-sync --check` can answer it
State there
unknown: a live GitHub state; this executable makes no network call, so only `scripts/github-sync --check` can answer it

Findings

Nothing is wrong with these records.