Skip to content

doctor: skip validator checks on non-validators; show warnings as ! - #24

Open
abhijitkrm wants to merge 1 commit into
mainfrom
fix/doctor-non-validator
Open

abhijitkrm wants to merge 1 commit into
mainfrom
fix/doctor-non-validator

Conversation

@abhijitkrm

Copy link
Copy Markdown
Owner

Found while testing primium-scripts' new --post-setup mode: cometcli doctor on an archive node showed two ✗ lines (signing health, jail status), saying it "can't tell which validator this node is".

Two bugs

  • Validator checks ran on every node. Signing health and jail status now run only when the profile:

    • is a validator,
    • has no role set (it could be one), or
    • is saved with a valoper.

    Archive, RPC and sentry nodes skip them.

  • Warnings were drawn as failures. The icon switch checked !OK && Detail != "" before Warn, so any warning with detail text showed ✗. That affected the "skipped" lines above and others such as "upgrade pending". Warnings now always show !. The failure and warning counts were already right; only the mark was wrong.

Tested live (primium-6)

Node Before After
archive (v6-arch) ✗ signing health, ✗ jail status ("can't tell which validator") signing and jail lines are gone
validator (v6-val2) ✓ signing health, ✓ jail status unchanged: missed 0/1000, not jailed

go test ./... passes. New tests: TestSignsBlocks (each role, plus the valoper override) and TestDoctorIcon.

The remaining ✗ key file perms on both nodes is a real finding: the node's config/ and data/ folders are 0755.

🤖 Generated with Claude Code

Archive, RPC and sentry nodes don't sign, so doctor no longer runs the
signing-health and jail checks on them (a profile with no role, or one
saved with a valoper, still gets them). Their "skipped" result was also
drawn as a failure: a warning with detail text got the ✗ mark. Warnings
now always show "!".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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