Skip to content

Fix validator exit safety and false-success reporting - #1

Merged
AM-979 merged 6 commits into
mainfrom
agent/fix-validator-exit-safety
Jul 17, 2026
Merged

Fix validator exit safety and false-success reporting#1
AM-979 merged 6 commits into
mainfrom
agent/fix-validator-exit-safety

Conversation

@AM-979

@AM-979 AM-979 commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

This PR replaces the unsafe validator-exit execution path and adds validation, auditability, documentation, regression tests, and CI.

Root cause

The previous implementation passed a list containing echo, a sudo password, a pipe token, and the Lighthouse command to subprocess.run(..., shell=True). On Linux this could execute only echo, return status 0, and then record a false successful validator exit without invoking Lighthouse.

Changes

  • remove sudo password collection, shell pipelines, and shell=True
  • invoke Lighthouse with a structured argument list
  • require exact EXIT N VALIDATOR(S) confirmation after displaying all selected public keys
  • reject zero, invalid, negative, and out-of-range counts
  • validate YAML structure, validator public keys, duplicates, keystore files, password files, Lighthouse executable, and custom-network directory
  • support Lighthouse password paths and securely handle legacy inline passwords via temporary mode-0600 files
  • keep Lighthouse waiting for an exiting/exited state before recording confirmed
  • add configurable CLI options and Jibchain defaults
  • replace truncating text logs with append-only mode-0600 JSON Lines audit records
  • correct withdrawal timing guidance and README/schema examples
  • add dry-run and stop-on-error behavior
  • add regression tests and GitHub Actions for Python 3.8, 3.10, and 3.12

User impact

The helper no longer reports a successful exit merely because an unrelated shell command returned zero. Users can inspect the exact validators and generated commands before submitting an irreversible operation, and every attempt is preserved in a private audit log.

Validation

GitHub Actions completed successfully on Python 3.8, 3.10, and 3.12. Each matrix job passed dependency installation, Python compilation, and the complete unit-test suite.

The regression suite covers shell-free invocation, false-success prevention, count validation, YAML handling, Web3Signer filtering, temporary password files, Lighthouse failures, dry-run behavior, and append-only private logs.

@AM-979
AM-979 marked this pull request as ready for review July 17, 2026 04:49
@AM-979
AM-979 merged commit 9edc74b into main Jul 17, 2026
3 checks passed
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