← Back to Pull requests

Say in ctx that no Server is reached when the config picks no context #3193

Closed
unknown closed this pull request without merging on Oct 23, 2026 06:29 UTC
View on GitHub
unknown unknown commented on Oct 23, 2026 05:40 UTC
Author

Fixes #3186

Summary

Signed out, with a config file that sets no current context, ployz ctx printed servers = via local. But commands only dial the local socket when there is no config file at all. With one, they fail with "current context is not set" (exit 2) or "no contexts found" (exit 1, next: ployz login). So ctx described a connection no command would make.

Rebuilt on #3183's servers(). With a config file and no current context, ctx now asks select_connections, the same choice commands make, and reports what it says:

| Config state | servers before | servers after | next after |
|---|---|---|---|
| file sets no current context | via local | (none: no current context) | ployz ctx use CONTEXT |
| file has no contexts | via local | (none: no contexts) | ployz login |
| no config file | main's local socket display | unchanged | unchanged |
| the config file can't be parsed | error | error (unchanged) | unchanged |

Signed in to Cloud, --connect, --context and a current context all show what they did before. Connection resolution itself is unchanged.

Bets

  • Stable promise. No RPC, stored-format or daemon change, and no --json shape change. servers.via can take a new value, "none", and next names the step for these two states. Nothing in dashboard/, the SDK or the docs enumerates via values.

  • Bet 8, evidence over claims. ctx now says only what a command would actually do.
  • Evidence

    Tests. Each failed first and passes now:

  • ctx_names_no_servers_when_the_config_picks_no_context: both states, human and --json. It also checks that server ls fails there too.

  • ctx_refuses_a_malformed_config: guards the round 2 finding below.
  • On the head, config_cli passes 134 and the handlers::link unit tests pass 9. cargo clippy -p ployz --tests and fmt are clean.

    Review. Codex:

  • Rounds 1 and 2, on the version before #3183. An error inspecting the local socket made ctx fail. Then the catch-all fix for it turned a malformed config into via local. Both cases are kept: the local path is main's own, and a parse error still fails, with a test.

  • Round 3, read-only on the rebuilt version: no findings. It checked that every main output path is unchanged, the hints don't conflict, config errors are unchanged, and select_connections does no I/O.
  • Diff: 296 lines (+222 / -74) across 3 files Reviewer: nick-potts Review duration: 48m
    All Vouch review confidence checks passed
    Residual risk 0.27 = Change Risk (0.63) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.63 · 296 lines diff across 3 files
    0.63
    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.341
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.063
    Real PR Conversation Timeline
    1 comments
    "Review active on #3193"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed sensitive_module
    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: 63.2% (MEDIUM) · Higher = larger blast radius
    63.2%
    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: 27.3% · Safe to merge
    27.3%
    Repository