Skip to content

ci: per-PR fast lane — a dispatchable guard run (repo_tests + pipeline-scripts tests, types, cheap scans) that reports every failure before a PR boards a train #21359

Closed
1 of 1 issue completed

Description

@mrveiss

Problem

Parent #18499 AC4 asks for a per-PR fast lane: the cheap mechanical checks produce a non-cancelled result on each approved head before it boards a merge train. Nothing does today. On one train in the last 24 h, four consecutive red cycles came from four different guards (file-size ratchet, a hand-rolled-pattern pin, the reach floors, an env-registry parser), each costing a full 30-60 min suite. All of them live under repo_tests/ or pipeline-scripts/. The full python suite runs them inside 8 shards together with about 50 000 backend tests, and the watcher cancels a train on the first red shard, so the other shards' guard failures stay hidden until the next cycle.

The owner approved the standing boarding step on 2026-11-12: the guard tests plus the generated-types job, run on each member's head before it boards, outside the merge-train CI slots, with no shortcuts for quality.

Acceptance criteria

  • A workflow dispatch-preboard-guards.yml exists and is dispatch-only (no pull_request / push trigger), with its own concurrency group keyed by ref.

  • It runs the same guard set as the python suite (everything the suite collects from the repo_tests and pipeline-scripts roots) with the suite's interpreter setup, env and pytest options, from one definition of the roots.

  • It reports every failure: no fail-fast, no -x, no --maxfail.

  • It reuses the generated-types composite action, so the types check has one definition.

  • A machine-readable result artifact (ref, sha, base sha, per-check status, failed node ids with their one-line message) is uploaded and its fields documented in the workflow header.

  • A collected-test-count floor derived from the suite's own duration record fails the run when it is not met.

  • The boarding rule is documented in the merge-train section of docs/developer/CLAUDE_REVIEW.md: a member boards only with a non-cancelled green fast-lane result at its approved head.

  • A repo test pins the lane's own shape (dispatch-only, roots from one source, no fail-fast, concurrency group, artifact, floor).

  • The AC4 checks that are inline steps today (--audit-baseline, Semgrep at ERROR severity, the real-ChromaDB session, the promtool install) are either wired in through a shared definition or listed in a follow-up issue with the refactor each needs.

  • Design change after review: the lane's roots are every pytest.ini root except the named product trees (a test requires the two lists to cover testpaths exactly), superseding "the repo_tests and pipeline-scripts roots" above.

  • The collected-test floor applies to EXECUTED tests (passed, failed, errored), not collected ones.

  • Skips are classified against a reviewed allowlist (file and reason, each naming ci: move the inline cheap checks (baseline audit, Semgrep ERROR, real-ChromaDB session, promtool) into composite actions so the pre-board lane can call them #21360); a skip off the list makes the lane red; allowlisted skips give a distinct overall value green_with_skips; every skipped node id and reason is in result.json and summary.md.

  • Every recorded test file under the lane's roots that still exists must produce at least one executed or allowlisted-skipped test, else the lane is red and names the file.

  • The head is tested merged with the current base tip (a local commit, never pushed); a conflict is a red lane; merged, base_sha and behind_base are in the artifact (schema 2).

  • AUTOBOT_REACH_AUDIT=1 is set in the lane (it tests the merged head), and the docs list what the lane does not cover (product suites, frontend tests, multi-member interactions, dependency-floor check, promtool and ChromaDB tests).

  • The boarding rule includes behind_base = 0 and reading failed_tests and skipped_tests.

  • The skip allowlist is built from the suite's own -rs evidence and lives in pipeline-scripts/preboard_guard_lane_skips.py: each entry has file, verbatim reason prefix, class (covered-by-suite-only or equivalent-to-suite) and a follow-up (ci: move the inline cheap checks (baseline audit, Semgrep ERROR, real-ChromaDB session, promtool) into composite actions so the pre-board lane can call them #21360, ci: guard tests that skip on every CI run — the rule they enforce is never checked #21371, or by design: <why>); a repo test fails an entry whose file or reason text is gone, and a regression test feeds real -rs lines through the verdict (green_with_skips; one unlisted skip is red).

Parent: #18499 (AC4)

Activity

  1. added
    needs-structureMissing goal milestone, matching phase label or native parent (#19522)
    on Nov 12, 2026
  2. github-actions commented on Nov 12, 2026

    @github-actions
    Contributor

    needs-structure cleared: goal milestone, matching phase label and native parent (or sub-issues) are all present (#19522).

  3. added
    area: ci-gatesWave 0 · cluster P — CI gates & merge integrity
    phase:M4.5Delete dead copies and facades
    enhancementNew feature or request
    on Nov 12, 2026
  4. removed
    needs-structureMissing goal milestone, matching phase label or native parent (#19522)
    on Nov 12, 2026
  5. 5 remaining items

  6. github-actions commented on Nov 12, 2026

    @github-actions
    Contributor

    Landed in #21361, merge cf3e53f8b8

  7. mrveiss commented on Nov 12, 2026

    @mrveiss
    OwnerAuthor

    PR #21361 merged to main as cf3e53f. Checked against origin/main (2026-11-12, Riga time).

    All 17 acceptance criteria are ticked on the strength of code on main. The issue stays open for one runtime fact: the first dispatched run of the lane on main (run 43227337453) was still queued when I looked, with only pin base listed, so there is no green run yet.

    AC Status Evidence on main
    Dispatch-only workflow, own concurrency group by ref verified .github/workflows/dispatch-preboard-guards.yml: on: workflow_dispatch only; concurrency.group: ${{ github.workflow }}-${{ github.ref }}
    Same guard set, suite setup, one definition of roots verified uses: ./.github/actions/setup-python-suite; roots live only in GUARD_ROOTS / PRODUCT_ROOTS in pipeline-scripts/preboard_guard_lane.py; test_it_restates_no_test_root pins this
    No fail-fast verified fail-fast: false; no -x or --maxfail in the workflow; test_it_reports_every_failure_and_never_stops_early
    Reuses the types composite action verified uses: ./.github/actions/generated-types-autofix
    Result artifact with documented fields verified preboard-guards-result upload; schema 2 fields documented in the workflow header
    Floor from the suite's duration record verified floor_for and FLOOR_RATIO in preboard_guard_lane.py (reads .test_durations)
    Boarding rule in CLAUDE_REVIEW.md verified ### Pre-board fast lane (#21359) at line 329; boarding rule includes behind_base and failed_tests / skipped_tests
    Repo test pins the lane's shape verified repo_tests/preboard_guard_lane_21359_test.py (dispatch-only, concurrency, no fail-fast, roots, artifact)
    Inline AC4 checks wired in or listed in a follow-up verified Follow-up #21360 is open; the workflow header's "Not covered" block names each check and #21360
    Roots = every pytest.ini root except the product trees verified test_every_pytest_root_is_run_by_the_lane_or_named_as_left_to_the_suite
    Floor counts executed tests verified the header states executed excludes skips; repo_tests/preboard_guard_lane_junit_21359_test.py
    Skips classified against an allowlist, green_with_skips verified pipeline-scripts/preboard_guard_lane_skips.py; repo_tests/preboard_guard_lane_verdict_21359_test.py
    Every recorded test file produces a test verified listed under "red" in the docs and in the header
    Head tested merged with the base tip; schema 2 fields verified merged, base_sha, behind_base in the header; test_nothing_the_lane_runs_pushes
    AUTOBOT_REACH_AUDIT=1; docs list what is not covered verified the workflow sets it; the "NOT covered" bullet in CLAUDE_REVIEW.md
    Boarding rule includes behind_base and failed_tests / skipped_tests verified CLAUDE_REVIEW.md Pre-board fast lane section
    Allowlist built from the suite's -rs evidence, with tests verified preboard_guard_lane_skips.py; repo_tests/preboard_guard_lane_observed_skips_21359_test.py

    What remains:

    • A completed, green dispatched run on main. CLAUDE_REVIEW.md itself says not to rely on the lane for boarding until one exists. The issue closes once run 43227337453, or a later one, ends green or green_with_skips.
    • Not verified: behaviour of the lane under real CI (timing, whether the allowlist matches the runner's actual skips). The ticks cover code and test shape only.
  8. mrveiss commented on Nov 12, 2026

    @mrveiss
    OwnerAuthor

    Proof run on main (2026-11-12, run 43227337453): red, so the lane is not yet usable as a boarding gate and this issue stays open.

    Base pin and the types job passed; guard shard 2/6 passed; shards 1, 3, 4, 5 and 6 failed although every test in them passed (2628–4066 passed per shard) — the only failure is the sys.modules leak guard reporting kombu left installed by 8 test files. That is the known defect #15169, which the regular suite hides because of how it is collected; the lane runs the guard roots without the backend tree and exposes it. No defect was found in the lane's own logic (floor, skip allowlist, junit parsing, base pin).

    Next: #15169 is fixed at the cause, then the lane is dispatched on main again; a green run is the evidence this issue needs.

  9. mrveiss commented on Nov 12, 2026

    @mrveiss
    OwnerAuthor

    The lane has produced a non-red result on main, the one thing this issue was held open for (all 17 ACs were already ticked on code evidence).

    Run: https://github.com/mrveiss/AutoBot-AI/actions/runs/43280952189 (head 923b9e902e, completed 2026-11-12 21:07 Riga, conclusion success).

    ## Pre-board guard lane: green_with_skips
    | guards (18989 executed, floor 16255, 0 failed, 53 skipped) | success_with_skips |
    Skips by class: covered-by-suite-only 6, equivalent-to-suite 47, unreviewed 0.
    overall=green_with_skips; behind_base=0; skips: covered-by-suite-only=6, equivalent-to-suite=47, unreviewed=0; executed=18989
    

    Jobs: pin base, types and all six guards shard N/6 success. This also shows the leak-guard blocker (#15169, fixed in #21388) and the six unlisted skips (#21389, closed) cleared. Closing: the follow-ups (#21360, #21371) are tracked on their own issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions