You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(rig): wire WorkloadSpec.lifecycle and report the lifecycle_snapshots drift class (#10553)
* feat(rig): give WorkloadSpec.lifecycle a reader and repair a snapshot class
Closes the two residual gaps in #10317 and #10319 after the pipeline
lifecycle step, snapshot state, and shared-path/service repair landed.
#10317 — `WorkloadSpec.lifecycle` had zero readers anywhere in the
workspace: no `.lifecycle()` call site, no `.lifecycle` field read
outside its own accessor, no cross-crate use. It was parsed, defaulted
in four test constructors, serialized, documented — and never executed.
Wire it rather than delete it: `PipelineStep::Lifecycle` can now take
its contract from a `workload` reference instead of an inline payload.
Exactly one source is legal, and resolution is fail-closed — unknown
extension, unmatched `path`, ambiguous selection, and a workload with no
contract all fail before a phase runs. One declaration on the workload
now governs every op the rig runs against it, instead of an `up` copy
and a `down` copy drifting apart.
Inline `lifecycle` becomes optional, which serde no longer rejects at
load time, so `rig lint` gains the "exactly one contract source" check
plus shape validation of the reference.
#10319 — `repair` now reports the `lifecycle_snapshots` class it had no
row for. Deliberately report-only: the handle is opaque, so deleting the
record does not reap the environment behind it, it only strands one. A
handle a declared step still owns is `skipped` with the op that reaps
it; a handle no declared step owns is `blocked`.
* test(rig): update lifecycle step spec tests for the optional contract body
CI caught the one consumer my grep missed: I searched `crates/` for
`PipelineStep::Lifecycle` but the `#[path]`-included test modules live
under `tests/`, so `tests/core/rig/spec_test.rs` was never in scope.
Also extends the round-trip coverage to the `workload` reference form:
the reference carries no inline body, and does not grow an empty one on
serialize.
---------
Co-authored-by: chubes-bot <266378653+homeboy-ci[bot]@users.noreply.github.com>
"lifecycle step declares both `lifecycle` and `workload`; declare the contract inline or reference a workload, not both",
83
+
)),
84
+
(None,None) => Err(step_error(
85
+
rig,
86
+
"lifecycle step declares neither `lifecycle` nor `workload`; provide an inline `homeboy/lifecycle-contract/v1` payload or reference a workload that declares one",
87
+
)),
88
+
}
89
+
}
90
+
59
91
/// Stable ownership key for the handles a step captures.
0 commit comments