Repository navigation
Make validator restart waits visible and bounded - #446
Conversation
POPPIN-FUMI
left a comment
There was a problem hiding this comment.
Independent security/operations integration review: PASS for commit ea855a6.
Reviewed the complete restart change and the follow-up fixes. The two earlier blockers are resolved: the observed runtime and startup ledger must match the fixed exit target, and equivalent ledger spellings no longer hide existing exit controllers. The target additionally requires matching Linux admin-socket peer PID/UID; this is enforced for both the normal and sync-only thresholds, with a final target check even when public RPC observation fails.
The bounded owned-child cleanup, lock, conservative eligibility checks, check-mode refusal to execute, nonzero CLI failure status, and all three packaged copies were reviewed. No additional blocking findings were found in this scope.
Independent validation on this head: 16 policy/process tests passed; the one Linux-only real-socket test was skipped on macOS. Five real-Ansible local fixture tests passed. Three additional synthetic cases verified that RPC failure keeps the normal threshold only for an unchanged target, and rejects a changed process or socket. All six distribution files are byte-identical to their source counterparts.
This review does not claim live-node validation. Required CI, including the Linux-specific socket test, must pass before merge.
POPPIN-FUMI
left a comment
There was a problem hiding this comment.
Tests-only follow-up review: PASS for commit 5618ebb.
The delta from reviewed ea855a6 is confined to test_unstaked_start.py; all production code is unchanged, with source and packaged restart-controller/playbook bytes verified equal. The temporary fixture now provides the controller dependency, isolates its profile/async paths, records both observation and execution, and checks the forwarded process metadata and normal threshold. Existing staked/ambiguous identity assertions still require an empty call log and untouched ledger, so running even the observation before the identity guard would fail the test.
Independently ran eight real-Ansible local scenarios: both validator networks with standard, staked, duplicate-identity, and unavailable-public-key layouts. All passed; standard layouts reached exactly the synthetic observation and exit, while unsafe/unknown layouts made no calls. Syntax and diff checks passed.
The earlier production review remains applicable. This does not establish completion of the full CI run; all required checks on this head must pass before merge.
A non-voting testnet node can wait indefinitely inside
slv v restartwhen the cluster's delinquent stake exceeds the normal 10% threshold. Ansible's synchronous task hid the wait, and a failed restart could still leave the CLI with exit status zero.The restart play now reports its policy and observed cluster delinquency, polls progress, and limits its owned exit controller to 600 seconds. Only explicitly non-voting testnet validators with matching live/startup unstaked identity, no vote accounts or active stake, and no leader slots qualify for a 100% cluster-stake threshold. Other or incomplete observations retain 10%; the installed client's health, snapshot and leader checks remain unchanged, with no force or added snapshot-skip flag.
Every request binds the runtime and startup ledger to the exit target and verifies the Linux admin socket belongs to the observed service PID/UID. Equivalent ledger paths, including trailing slashes, symlinks and paths relative to a controller’s working directory, identify an existing exit controller; unresolved targets are refused. The controller revalidates PID/start time/startup hash and policy under a per-host lock, refuses an existing exit controller, and terminates/reaps only the child it starts on timeout or interruption. Ambiguous outcomes fail and are not automatically retried. An outer Ansible deadline covers failed cleanup. Validator restart rejects unknown networks, propagates failure, and distinguishes request completion from runtime acceptance. Matching skill copies and their new dependency are included.
Validation: 955 CLI unit tests passed (one existing test ignored), including 38 focused tests. Linux Python 3.12 / Ansible 2.16.3: 17 policy/process tests (including a real Unix peer-credentials socket), 5 Ansible flow tests and the 4-test identity-layout matrix passed. The identity-guard fixtures provide an isolated restart controller and still require zero controller observations or actions for rejected identities. CLI type check, Ansible syntax check, native macOS CLI smoke tests and whitespace checks passed. A read-only probe also verified all eligibility and target checks on a sync-only test host. Required CI checks on the final head remain pending.
Upstream reference: restart-window checks, Ansible async polling.