Skip to content

fix(heal): honor explicit runtime state in status#262

Merged
cxymds merged 1 commit into
mainfrom
codex/heal-cli
Jul 18, 2026
Merged

fix(heal): honor explicit runtime state in status#262
cxymds merged 1 commit into
mainfrom
codex/heal-cli

Conversation

@cxymds

@cxymds cxymds commented Jul 18, 2026

Copy link
Copy Markdown
Member

Problem

The RustFS background-heal API now reports an explicit runtime state, but the CLI still derived healing only from legacy scan counters. During a running heal this could make repeated status calls alternate between healing: false and healing: true as counters changed.

Solution

  • Treat explicit state=active as authoritative and report healing=true.
  • Treat explicit disabled, uninitialized, and idle states as authoritative and report healing=false, even if stale legacy counters remain.
  • Preserve the legacy counter heuristic only when the server omits or returns an unknown state.
  • Add regression tests for active state without legacy counters and disabled state with stale counters.

Verification

  • cargo fmt --all --check
  • cargo clippy --workspace -- -D warnings
  • cargo test --workspace

@cxymds
cxymds merged commit 418912f into main Jul 18, 2026
16 checks passed
@cxymds
cxymds deleted the codex/heal-cli branch July 18, 2026 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant