fix(cli): wait for resumed enrollment readiness #3173
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.47) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.47 · 348 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.350
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #3173"
general
weight: 0.35
nick-potts
Summary
A restarted founder can reach Participating before its Machine row is published. Its resumed enrollment deployed the Ingress Proxy immediately and failed against an empty Deploy Snapshot.
Move the existing bounded readiness wait after both branches in
enroll_founderandenroll_join. The joiner had the same gap before Global catch-up. No wire, RPC, schema, or stored-format change.DESIGN bets touched are Observer-relative truth (check the enrolling Machine's own listing), Bounded imperative commands (reuse the existing deadline), and Client-first, daemon when forced (keep the wait in the CLI). The Stable promise is preserved.
The Cloud-side "No cluster yet" and missing Enroll button, plus Fleet Token recovery copy, are separate issues and are not addressed.
Closes #3157 for the host-side interrupted-enrollment failure.
Evidence
NoEligibleMachines([NoMachines]); joiner starts follow-up without observing its row. After the fix, all six Cloud tests and five neighboring setup tests pass. The Unix-socket fixture uses deterministic publication gates without sleeps and proves the resumed readiness step.server addat the daemon'senrolledlog, then rerun the same enrollment token. Before, exit 1 withno machines available that satisfy all constraints: no Machines in the Deploy Snapshot; no Ingress Proxy. After the same interruption with the fixed CLI, it waits throughCluster network is not published yet, completes enrollment with exit 0, anddocker inspectreportsrunning caddy:2.11.7.initializewithresumed: trueand accepts callbacks. This exercises the real host enrollment and deployment path. Fleet Token authentication and real Cloud callback validation are not exercised.cargo clippy -p ployz --all-targets, formatting, and the CLI build pass. Post-run doctor passes. The Incus project was removed and before/after evidence retained. Codex review has no remaining findings.Merge Danger
Door: Two-way. Reverting restores the old CLI timing. No data or protocol migration.
Blast Radius: Enrollment. Resumed founders and joiners wait for their own Machine row before follow-up. A Machine that never publishes fails at the existing bounded readiness deadline. That includes a resumed founder that doesn't accept ingress: on main it finished without its own row, and now it waits up to 5 minutes for it, as a fresh founder already does.