← Back to Pull requests

Main Health: recover exact-main qualification #153

Closed
unknown closed this pull request without merging on Sep 25, 2026 07:13 UTC
View on GitHub
unknown unknown commented on Sep 24, 2026 16:44 UTC
Author

Outcome

Problem

Two retained protected-main failures prevent truthful qualification of exact main 93639767dec3dee2b361d1692a2172a440d3fdca:

  • Main Health intermittently receives an empty branch-filtered CI inventory even though canonical exact-SHA push run 35983465326 remains available. This caused the broker to consume PR #151 review 5305166499 fail-closed without merging.

  • External Source-Family Matrix run 35983465418, job 107580564583, failed because the release-artifact clean-tree scan allowed only five seconds for git status --porcelain --untracked-files=all on macOS Python 3.12.
  • The first one-time candidate activation also exposed a third, independent compatibility defect before any review or merge: the deployed broker's intentionally stdlib-only Python environment could not import current metriplane.strict_parsing because PyYAML was imported eagerly. The activation stopped fail-closed with ModuleNotFoundError: No module named 'yaml'; the protected broker was restored to deploy 57f0784445d1cbfd77d006ae2c112cefd0557df2, and no owner request or merge was created.

    User-visible behavior

    Broker admission remains fail-closed. If the primary branch-filtered inventory lacks exact current-main CI, the broker performs one exact-head-SHA readback and accepts only the canonical CI / .github/workflows/ci.yml push run bound to main and the exact protected-main SHA.

    Release builds still require an exact clean checkout. Only the expensive full untracked-status scan receives a bounded 30-second window; repository-root, commit, and tree identity commands retain their five-second bounds.

    JSON-only broker paths now preserve the documented stdlib-only deployment boundary. YAML parsing remains available when PyYAML is installed and fails closed with StrictYamlError when it is absent.

    Changes

    Scope

  • Adds the bounded exact-SHA fallback in HealthReconciler._current_ci and revalidates workflow name, path, event, ref, and SHA for every governed same-ID attempt.

  • Separates the five-second identity timeout from the 30-second status timeout and applies the longer bound only to the clean-tree scan.

  • Makes the PyYAML dependency lazy for YAML-only parsing while preserving existing public loader signatures and installed-PyYAML behavior.

  • Adds positive and negative broker, release-artifact, and stdlib-only import regressions.

  • Updates only directly required test census and mechanically generated functional, public-surface, and traceability currentness records.
  • Compatibility

    The primary CI lookup, attempt chronology, required workflow/job evidence, merge admission, App-only state writer, owner-normal semantics, Python 3.12/3.13 support, dirty-checkout rejection, release failure semantics, strict YAML duplicate-key behavior, and all public strict-parsing signatures remain unchanged.

    Evidence and research impact

    The original broker failures, consumed review 5305166499, exact-main failure run 35983465418, job 107580564583, and failed candidate activation remain retained. No provider result, Main Health history, publication evidence, or frozen research evidence is rewritten or relabelled.

    Validation

    Tests

  • Combined focused strict-parsing and broker regressions: 495 passed.

  • Traceability graph suite on a same-filesystem temporary root: 19 passed.

  • Exact collection: 6,117 tests.

  • Broad local profile: 6,089 passed, 16 expected skips, and one pre-existing host-sensitive launcher test deselected; the 11 initially reported traceability failures were caused by a cross-filesystem temporary directory and the complete traceability file subsequently passed 19/19.

  • Ruff check and formatting passed; mypy passed for metriplane/strict_parsing.py.

  • Functional, public-surface, and traceability currentness checks passed; public API census remains 2,601.

  • The actual deployed Python 3.12 interpreter imports tools.main_health_broker with -S; JSON parsing succeeds and YAML parsing rejects fail-closed without site packages.

  • Independent review approved exact commit eb3e81b60e8cb151e9331c7e6ac1367ded68000a against base 93639767dec3dee2b361d1692a2172a440d3fdca.

  • Complete hosted qualification remains mandatory for exact head eb3e81b60e8cb151e9331c7e6ac1367ded68000a before any renewed activation or merge.
  • Documentation

    Updates only the canonical collection/pass-count contract and mechanically generated currentness records.

    Boundaries

    Privacy and security

    No credentials, private paths, personal data, new trust root, repository-setting mutation, workflow change, publication authority, state-writing path, dependency installation in the broker runtime, or generic unmerged-code execution capability is added.

    Checklist

  • The pull request is focused and its diff has been reviewed.

  • New or changed behavior has tests, including relevant failure paths.

  • Focused checks pass locally; required complete qualification must be green for the exact candidate before activation or merge.

  • User-facing commands, support boundaries, and documentation remain truthful.

  • Third-party material has compatible licensing and required attribution.

  • No credentials, private recordings, personal data, or identifying workcell data were added.

  • Frozen v0.2.0 evidence, checksums, measurements, tag, and DOI metadata were not rewritten.

  • Current package capabilities are not attributed to the v0.2.0 SoftwareX evidence or the TIM v0.1.3 measurements.
  • Diff: 650 lines (+487 / -163) across 8 files Reviewer: Miko997 Review duration: 868m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 650 lines diff across 8 files
    0.52
    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%
    60%
    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.388
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #153"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% 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: 52% (MEDIUM) · Higher = larger blast radius
    52%
    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: 60.5% · Lower = rushed or shallow review
    60.5%
    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.5% · Safe to merge
    20.5%