deploy: wait for the miner to connect before judging its metrics #13

Merged
grenade merged 2 commits from deploy/validate-readiness into main 2026-09-03 10:38:22 +00:00
Owner

Fix for the first deploy-mode run (actions/runs/15). The deploy itself was correct: both hosts reported miner-cli 4.0.2 (95b6420...) after the restart. Validate then sampled /metrics one second later, before the miner had connected to the node. miner_gpu_devices is exported only on connection and miner_hashes_total only after the first hash, so both were absent, validate failed, and the rollback step restored the previous binary. The rollback path therefore got exercised for real on its first outing.

Validate now:

  1. waits up to 90 s for miner_gpu_devices to appear (the miner has connected), then compares it to the matrix row;
  2. takes the first non-empty miner_hashes_total as the baseline and requires a larger sample within 120 s.

Merging this redeploys (the binary carries the new commit) and is the second real deploy.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CBgs2nSi4H2mdh8kD8vMX5

Fix for the first deploy-mode run (actions/runs/15). The deploy itself was correct: both hosts reported `miner-cli 4.0.2 (95b6420...)` after the restart. Validate then sampled `/metrics` one second later, before the miner had connected to the node. `miner_gpu_devices` is exported only on connection and `miner_hashes_total` only after the first hash, so both were absent, validate failed, and the rollback step restored the previous binary. The rollback path therefore got exercised for real on its first outing. Validate now: 1. waits up to 90 s for `miner_gpu_devices` to appear (the miner has connected), then compares it to the matrix row; 2. takes the first non-empty `miner_hashes_total` as the baseline and requires a larger sample within 120 s. Merging this redeploys (the binary carries the new commit) and is the second real deploy. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01CBgs2nSi4H2mdh8kD8vMX5
grenade added 1 commit 2026-09-03 10:37:41 +00:00
deploy: wait for the miner to connect before judging its metrics
All checks were successful
ci / fmt (pull_request) Successful in 20s
ci / clippy (pull_request) Successful in 1m49s
ci / doc (pull_request) Successful in 2m40s
ci / test (pull_request) Successful in 8m1s
b10f2f0099
The first deploy-mode run sampled /metrics one second after the restart.
miner_gpu_devices is exported only once the miner has connected to the node
and miner_hashes_total only once it has hashed, so both were absent, validate
failed, and rollback restored the previous binary on a good deploy.

Validate now waits up to 90 s for miner_gpu_devices to appear (readiness),
then takes the first non-empty miner_hashes_total sample as the baseline and
requires a larger one within 120 s.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CBgs2nSi4H2mdh8kD8vMX5
grenade added 1 commit 2026-09-03 10:38:15 +00:00
deploy: restore the previous binary with install, not cp
All checks were successful
ci / fmt (pull_request) Successful in 22s
ci / clippy (pull_request) Successful in 1m51s
ci / doc (pull_request) Successful in 2m10s
ci / test (pull_request) Successful in 6m56s
40b4ea32ca
The first rollback failed with "cp: cannot create regular file
'/usr/local/bin/quantus-miner': Text file busy": cp writes in place and the
binary was executing. install unlinks the destination first, the same reason
rsync's temp-file-and-rename push works. Sudoers grant updated and applied
to benjy and quadbrat.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CBgs2nSi4H2mdh8kD8vMX5
grenade merged commit f1064345e5 into main 2026-09-03 10:38:22 +00:00
grenade deleted branch deploy/validate-readiness 2026-09-03 10:38:22 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: blackbeard/miner#13