← Back to Pull requests

fix(cli): report incomplete Server observations consistently #3185

Closed
unknown closed this pull request without merging on Oct 23, 2026 06:32 UTC
View on GitHub
unknown unknown commented on Oct 23, 2026 03:34 UTC
Author

Summary

Group deployment observation warnings by Server identity when a named gap is available. Plain progress holds an unqualified notice through one frame so a later named gap can include its cause. If no named gap arrives, print the notice at the next update or 30-second heartbeat. Print any pending notice when following ends early. Interactive progress shows the notice when the terminal has room and preserves it on abandonment. Track printed causes per Machine so later frames do not repeat them. Keep every wire warning in JSON.

 deploy observation with a named Server gap
- print separate container or volume notices with a raw ID
+ include distinct causes in the named Server notice
 plain progress with an unqualified notice
- print a raw ID before a later name, or hold it until settlement and lose it on early exit
+ wait one frame for a name; print by the next update or heartbeat, and on early exit
 exec with unanswered Servers and no container on those that answered
- return a command failure with exit 1
+ finish the partial result with exit 3

No new refusal or wire warning. Deploy stays at exit 3. Explicit container-selector errors and remote command exit codes stay unchanged. No wire, RPC, or schema changes. exec refuses --json; deployment JSON keeps every warning. If no Server name becomes available, the human notice uses the Machine ID.

core/DESIGN.md bets touched:

  • Stable promise and Client-first, daemon when forced keep this in CLI rendering and existing outcome helpers.

  • Observer-relative truth and Evidence over claims keep unknown Service placement unknown and do not infer Down from a generic omission.

  • Partial results are outcomes gives incomplete exec discovery exit 3. Two-tier identity groups by Machine ID and displays the Server name when known.
  • Evidence

    The original four regressions failed before their fix and passed afterward. Round 1's two-frame regression failed before that fix with the timeout cause twice and a raw ID. It now prints that cause once without a raw ID when a named gap arrives in the next frame.

    Round 2's drop regression failed before this fix with left: 0, right: 1: progress printed its rows but lost volume query timed out. It now passes. A process test follows a Cloud Deployment, receives that warning, then loses a Store read; the built CLI prints the cause once. A second progress test covers the next-frame deadline, and an interactive test covers abandonment.

    Focused checks after the round 2 fix: 34 progress tests passed; the Cloud follow failure, deploy JSON-warning, and exec CLI process tests passed. The deploy process test asserts the complete JSON warning list is unchanged. cargo clippy -p ployz and cargo fmt --check passed.

    Deploy with a named gap, exit 3:

    ! Server machine-2: deployment observations are incomplete (observed Down by this Entry)
    

    The restart warning still prints. Without a named gap, an unqualified failure prints by the next update or heartbeat, or when following ends early. A later named gap does not repeat its cause.

    Exec before, exit 1:

    ! machine-3 did not answer; its rows are missing.
    error: No running container of "db" on the Servers that answered; machine-3 did not answer.
    

    Exec after, exit 3:
    No running container of "db" on the Servers that answered.
    ! machine-3 did not answer; its rows are missing.
    

    Closes #2850.
    Addresses #2862's observation-warning cases. Its separate ingress-ID and hostname-disclaimer examples remain unchanged because they use other result paths.

    Review. Independent reviews: round 1 by Codex and Opus on the full diff, round 2 by Codex on the full diff, round 3 by Codex on the fix diff. Round 3 found no BUG-class issue. Two known limits predate this PR. In an interactive terminal too short to show a notice, the notice has no time bound. A Cloud follow that shows only warnings has no progress display to flush when it stops early. Rebased on main at 64577d7ccd; the conflict with #2879's "still waiting" detail keeps both changes. After the rebase, 35 progress tests and 23 deploy_follow tests pass.

    Merge Danger

    Door: Two-way. Revert the CLI change; no stored data changes.

    Blast Radius: CLI. Scripts must treat incomplete exec discovery as exit 3 rather than 1. Deploy JSON still carries each individual warning.

    Diff: 548 lines (+411 / -137) across 6 files Reviewer: nick-potts Review duration: 177m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.48) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.48 · 548 lines diff across 6 files
    0.48
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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.377
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3185"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 48.1% (MEDIUM) · Higher = larger blast radius
    48.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 20.8% · Safe to merge
    20.8%
    Repository