Repository navigation
feat(process_health): add application health aggregation - #1009
martinhavelka (wukchung) wants to merge 63 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1009 +/- ##
=========================================
Coverage 99.9% 100.0%
=========================================
Files 854 10 -844
Lines 75041 631 -74410
=========================================
- Hits 75032 631 -74401
+ Misses 9 0 -9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
cargo-gamma found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…progress Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ransitions Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Clarify startup readiness and HTTP example requirements, register the crate for workspace consumers, and synchronize the worker-failure test with its intended publication. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…_http Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Posted by an AI agent Warning: Incomplete review No current source-supported findings remain. The mutation-test watchdog exemptions are restored in both integration helpers. I reviewed all 19 cumulative changed paths using matching baseline-first evidence. Two output-only API areas remain unreviewed because a source-free inherited-input boundary could not be established. No overall verdict is given. Full-review attempt, assessed head and revalidated head:
Production behavior, documentation, package discovery and dependency configuration are unchanged from the preceding source assessment. New private tests cover registration ID agreement and publisher replacement scheduling. Existing tests strengthen registration and receiver-teardown checks. Hint changes select package-owned tests without changing other packages or generalized scheduling. No build, test, API capture, measurement or target-runtime validation was run by this reviewer. Context-only refresh: 2026-11-27T22:12:08.952476+00:00. The head and merge base are unchanged. Current head CI: 45 successful checks, 1 neutral, 0 still running and 0 failed or cancelled. This refresh does not extend source coverage, validate the advanced target at runtime, retry blocked API work or start a completed-review cooldown. Public API changesCould not assess No matching API captures, output-only classification, saved design draft or matching scoped rustdoc check was produced. The required source-free input boundary remains unproved. Source-based API observations, not a complete API classification: the Cargo package is API human-review signal: undetermined. Integration testsIntegration Test Additions Only Compared with the merge base, where the package is absent, this head adds 26 integration tests across two targets. Existing state and lifecycle assertions remain. Both receive helpers restore unbounded waits during mutation runs and retain their native or Miri safety deadlines otherwise. No target, test or execution selector was removed. Integration-test human-review signal: not required. Combined BenchmarksNot applicable: complete base/head package inventory contains no benchmark targets or metabench registrations in the only changed package. Selected crates: none. Measured cases: zero. No benchmark owner or work remains pending. Source performance review is complete without measured regression claims. Current unresolved findingsNo unresolved findings. The mutation-watchdog finding is source-fixed and provider-resolved. The duplicate-notification test finding and final-publisher shutdown finding also remain source-fixed and provider-resolved. Historical declined or deferred proposals retain their separate dispositions. At the source-review cutoff, 112 roots and 235 comments were assessed. This context refresh read all 112 current roots and 235 comments without new source adjudication. Later discussion remains separate unassessed context. Both existing COMMENT review submissions remain pinned to their original commits. No new review, vote, inline comment, reply or thread-state change was submitted. |
martintmk
left a comment
There was a problem hiding this comment.
Posted by an AI agent
One non-blocking test-harness finding. See the rolling review report for coverage and the two missing output-only API areas. No overall verdict is given.
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved worker-failure paths can leave change observers pending indefinitely and cause unbounded queued-slot retention, while quadratic snapshot rebuilding can delay updates across components.
3 open issues
What changed in this PR
Adds oxidizer_health to the Oxidizer workspace so services can combine subsystem health signals, inspect diagnostics, and expose readiness without choosing a specific HTTP server.
Changes:
- Adds publishers, named components, aggregate health, and independent change observers.
- Provides filtered diagnostic reports and optional Tower and
http_extensionsreadiness adapters. - Adds contract tests, API examples, and workspace integration.
| File | Description |
|---|---|
README.md |
Lists the new health aggregation crate. |
crates/oxidizer_health/tests/worker.rs |
Tests worker ordering and snapshot updates. |
crates/oxidizer_health/tests/http.rs |
Tests readiness status, bodies, and headers. |
crates/oxidizer_health/tests/aggregation.rs |
Tests aggregation, notifications, lifetimes, and concurrency. |
crates/oxidizer_health/src/worker.rs |
Runs background aggregation and manages worker shutdown. |
crates/oxidizer_health/src/signal.rs |
Defines health signals and attribute equality. |
crates/oxidizer_health/src/report.rs |
Adds snapshots, diagnostic filters, and report iterators. |
crates/oxidizer_health/src/lib.rs |
Exports the public API and documents usage. |
crates/oxidizer_health/src/kubernetes_http.rs |
Implements optional HTTP readiness adapters. |
crates/oxidizer_health/src/health.rs |
Defines health states and worst-state selection. |
crates/oxidizer_health/src/component.rs |
Implements components, publishers, and queued updates. |
crates/oxidizer_health/src/attribute.rs |
Defines typed diagnostic attributes. |
crates/oxidizer_health/src/aggregator.rs |
Adds component registration and process-level monitoring. |
crates/oxidizer_health/README.md |
Provides generated crate documentation. |
crates/oxidizer_health/Cargo.toml |
Declares crate metadata, dependencies, and optional features. |
Cargo.toml |
Adds workspace dependency entries. |
Cargo.lock |
Records the new crate’s dependencies. |
Review effort: Balanced
…dogs Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ovals Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The first-release readiness API’s reservation, waker, and shutdown contracts warrant human concurrency and ownership review before publication, with full validation reported as incomplete.
No open issues 🎉
Review effort: Balanced
Cover degraded reason metadata and nested diagnostic panic cleanup, suppress one equivalent multiset mutation, and adopt the canonical process-health Gamma hints. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Merge the current target branch and preserve the validated process-health mutation hints alongside main. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The new readiness API’s multi-atomic reservations, coalesced queues, and worker-exit notifications warrant human concurrency review because runtime validation of key interleavings was unavailable.
No open issues 🎉
Review effort: Balanced
Use a later component turn to prove the repeated equal publication was processed before asserting that no notification was emitted. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The new public readiness API combines multi-atomic reservations, coalesced queues, and panic/shutdown handling whose ordering guarantees require human concurrency review beyond the supplied fixed-order tests.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The public readiness API’s atomic reservation transfers, coalesced scheduling, and reentrant waker shutdown warrant independent concurrency review, with full runtime-analysis validation still pending.
No open issues 🎉
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The first-release API relies on a multi-counter concurrency protocol and callback-driven shutdown, but the supplied tests do not systematically cover reservation interleavings, warranting human concurrency and API review before publication.
No open issues 🎉
1 resolved since last review
Review effort: Balanced

Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
c6698f22e9558228c4caaf5376a36229c0bbb6fe↓ The full
just anvil-container just anvil-prrerun is still in progress.🤖 The new
process_healthpackage provides framework-neutral application health reporting through thehealthlibrary target. HTTP readiness adapters remain in the dependentoxidizer_health_probepull request.Summary
Publishers write health contributions to named components.
ComponentandMonitorexpose aggregate state, change notification, and immutable reports.Public contract
process_health, incrates/process_healthhealth; install withcargo add process_health --rename healthAggregator::new(observed::Sink)Aggregatorhas no no-argumentDefaultpath.Monitorownsstate,changed, andreports. It keeps the process root and worker alive after allAggregatorhandles are dropped.reportsreturns an opaqueIterator.ComponentandMonitor. Dropping normally queues removal without waiting for aggregation; releasing the final process owner waits for worker shutdown.Signalis an immutable publisher contribution in a report.state()returnsHealth;attributes()returns an opaque iterator.observedevents. Readiness fails closed if the worker stops.process_healthEvidence
Passed on revision
7c31c2548a720400ad083356e93ba32deb4ba5bf:cargo clippy -p process_health --all-targets --all-features --locked -- -D warningscargo test -p process_health: 66 unit and integration tests passed; 11 doctests passedjust anvil-miri --package process_healthjust anvil-mutants-diff: 337 mutants killed, 0 survived, 0 timed out, 100.0% scorejust anvil-readme --fixjust anvil-spellcheckgit diff --checkThe full native
just anvil-prgate remains blocked by the local Visual Studio installation, which lacksMicrosoft.VisualStudio.Component.VC.14.51.x86.x64.Spectre. The failure occurs in the unchangedmsvc_spectre_libspackage. GitHub CI is validating the complete matrix for the final revision.Risk Assessment
Door: One-way
This defines a new public API before its first release.
Blast Radius: Consumers
Callers install
process_health, import it ashealth, supply anobserved::Sink, and use the separate probe package for HTTP adapters.