← Back to Pull requests

Bind the channel server to free ports #137

Merged
agriyakhetarpal merged 2 files (67 lines) on Nov 20, 2026 15:18 UTC
View on GitHub
agriyakhetarpal agriyakhetarpal commented on Nov 20, 2026 13:08 UTC
Author

<!-- Hello! Thanks for submitting a PR! To help make things go a bit more
smoothly, we would appreciate it if you follow this template. -->

Description

<!-- Good things to put here include:
- reasons for the change (please link any relevant issues!),
- any noteworthy (or hacky) choices to be aware of,
- or what the problem resolved here looked like. -->

I've been reading the conda-index source code for a bit, especially for the server-side parts as part of my investigation on #113 (unrelated to the changes in this PR). This PR makes our server much closer in behaviour to the conda-index (test suite) server as deemed possible. Particularly:

  • The session-scoped channel server binds 127.0.0.1 on an OS-assigned port instead of a hardcoded localhost:8080

  • The server starts on a daemon thread and is handed back through a queue once it has bound, so the fixture reads the port from the socket and flags shutdown at the end of the session.

  • A port that cannot be bound now fails the fixture with a timeout, instead of leaving a dead daemon thread behind while every test talks to whatever else may happen to be listening on 8080.

  • This means that two sessions, or xdist workers, can now reliably run side by side.


  • The last point essentially helps me a fair bit, and may help others; since I have configured my clone of this repository with a "bare" worktree setup. I often find myself running tests through pixi tasks across multiple worktrees, in parallel.

    <!-- Just as a reminder, everyone in all conda org spaces (including PRs)
    must follow the Conda Org Code of Conduct (link below).

    Finally, once again, thanks for your time and effort. If you have any
    feedback in regards to your experience contributing here, please
    let us know!

    Helpful links:
    - Conda Org COC: https://github.com/conda/pytest-conda-solvers/blob/main/CODE_OF_CONDUCT.md
    - Contributing docs: https://github.com/conda/pytest-conda-solvers/blob/main/CONTRIBUTING.md -->

    Diff: 67 lines (+55 / -12) across 2 files Reviewer: dholth Review duration: 129m
    All Vouch review confidence checks passed
    Residual risk 0.09 = Change Risk (0.30) × (1 − Review Confidence (0.70)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.30 · 67 lines diff across 2 files
    0.30
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.54 · 1 substantive comment(s)
    0.54
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    70%
    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.252
    Real PR Conversation Timeline
    3 items
    dholth dholth approved these changes on Nov 20, 2026 14:37 UTC
    Approved Reviewer

    LGTM

    agriyakhetarpal agriyakhetarpal commented on Nov 20, 2026 15:19 UTC
    Author

    Thanks for reviewing!

    Reviewers
    Assignees
    agriyakhetarpal agriyakhetarpal
    Labels
    risk: low confidence: 70.1% 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: 29.7% (LOW) · Higher = larger blast radius
    29.7%
    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: 70.1% · Lower = rushed or shallow review
    70.1%
    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: 8.9% · Safe to merge
    8.9%