Skip to content

Commit e3de50b

Browse files
committed
feat(freeze): SupervisionOutcome derives Clone/PartialEq/Eq + decision-record refinements (overall-review)
1 parent f8101aa commit e3de50b

4 files changed

Lines changed: 26 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ to a dated version section.
1313

1414
### Added
1515

16+
- `SupervisionOutcome` now derives `Clone`, `PartialEq`, and `Eq` — consistent
17+
with the other result types (`ProcessResult`, `Finished`, `Outcome`,
18+
`RunProfile`), so a supervision report can be stored, compared, and logged.
1619
- `Outcome` gained accessor methods — `code() -> Option<i32>`,
1720
`signal() -> Option<i32>`, `timed_out() -> bool` — so code holding a bare
1821
`Outcome` (e.g. from `RunningProcess::wait` or `Finished::outcome`) needn't

decisions/interface-freeze-2026-06.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@
4646
bound and accepts strictly more closures. Crucially this is the *freeze-safe*
4747
side: loosening a bound later is non-breaking, tightening is breaking — so the
4848
permissive state is the right one to lock.
49+
- **Keep the batch free-fn argument order `output_all(commands, concurrency,
50+
runner)`** (and `output_all_bytes`). It reads "what to run, how many at once,
51+
who runs them"; the three arguments are distinctly typed so a mis-order won't
52+
compile, and the order has been stable across many releases. The runner trails a
53+
scalar (unlike the receiver-style `runner.checked(..)`), but these are
54+
free-function batch helpers with no receiver, so there is no convention to
55+
violate. Frozen as-is.
4956
- **Keep `Copy` on the small scalar value types** (`Outcome`,
5057
`OutputBufferPolicy`, `ResourceLimits`, `ProcessGroupStats`, `RunProfile`, and
5158
the unit-ish enums). They are all-scalar; `Copy` is a real ergonomic and the
@@ -86,8 +93,14 @@
8693
- Features are additive; default set is `process-control` only; the `mock`
8794
expectation surface is semver-exempt and feature-gated. MSRV 1.88 / edition 2024.
8895

96+
## Additive polish landed this round (not freeze-critical, done for day-one consistency)
97+
98+
`SupervisionOutcome` now derives `Clone`/`PartialEq`/`Eq` (was `Debug`-only) — it
99+
was the lone result type without them. Additive, but shipped now so the result-type
100+
surface is uniform on release.
101+
89102
## Genuinely deferred (additive — safe to add after 1.0, not freeze-critical)
90103

91-
`Clone`/`PartialEq` on `SupervisionOutcome`; builder methods on `ResourceLimits`;
92-
more crate-root free fns (`output_bytes` / `run_unit`); an `Outcome::signalled() ->
93-
bool` companion. All purely additive — no freeze pressure.
104+
Builder methods on `ResourceLimits`; more crate-root free fns (`output_bytes` /
105+
`run_unit`); an `Outcome::signalled() -> bool` companion. All purely additive — no
106+
freeze pressure.

public-api.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,8 +856,14 @@ pub processkit::SupervisionOutcome::final_result: processkit::ProcessResult<allo
856856
pub processkit::SupervisionOutcome::restarts: u32
857857
pub processkit::SupervisionOutcome::stopped: processkit::StopReason
858858
pub processkit::SupervisionOutcome::storm_pauses: u32
859+
impl core::clone::Clone for processkit::SupervisionOutcome
860+
pub fn processkit::SupervisionOutcome::clone(&self) -> processkit::SupervisionOutcome
861+
impl core::cmp::Eq for processkit::SupervisionOutcome
862+
impl core::cmp::PartialEq for processkit::SupervisionOutcome
863+
pub fn processkit::SupervisionOutcome::eq(&self, &processkit::SupervisionOutcome) -> bool
859864
impl core::fmt::Debug for processkit::SupervisionOutcome
860865
pub fn processkit::SupervisionOutcome::fmt(&self, &mut core::fmt::Formatter<'_>) -> core::fmt::Result
866+
impl core::marker::StructuralPartialEq for processkit::SupervisionOutcome
861867
impl core::marker::Freeze for processkit::SupervisionOutcome
862868
impl core::marker::Send for processkit::SupervisionOutcome
863869
impl core::marker::Sync for processkit::SupervisionOutcome

src/supervisor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ pub enum StopReason {
8181
///
8282
/// Non-exhaustive: a read-only report the crate produces — new telemetry can
8383
/// be added without a breaking change.
84-
#[derive(Debug)]
84+
#[derive(Debug, Clone, PartialEq, Eq)]
8585
#[non_exhaustive]
8686
pub struct SupervisionOutcome {
8787
/// The result of the final run (the one that ended supervision).

0 commit comments

Comments
 (0)