Skip to content

Free Tests plans its shards beside the reuse and docs checks (GST-3303) - #4570

Merged
capy-ai[bot] merged 3 commits into
mainfrom
ci/free-plan-parallel
Nov 20, 2026
Merged

capy-ai[bot] merged 3 commits into
mainfrom
ci/free-plan-parallel

Conversation

@garrytan

@garrytan garrytan commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

Free Tests on a pull request now starts its test shards after one round of small GitHub-hosted jobs instead of two, because the planner no longer waits for the reuse and docs-only checks.
Why: faster PR feedback on the required free-tests check.
Nothing to do: no check is renamed, and the same tests run.

What changed

Every Free Tests run on a pull request used to wait for a GitHub runner twice before any test ran. The first wait was for the reuse and docs-only checks, and the second was for the planner that sat behind them. The planner now runs at the same time as those two checks, so the shards start after a single round.

  • free-plan has no needs and no condition, so it runs beside reuse and docs-scope.
  • free-suite now needs free-plan, reuse and docs-scope, and skips on a verified reuse or a docs-only pull request, as free-plan used to make it do. The free-tests aggregate is unchanged.
  • A reused main push now uploads the free-plan artifact, so reuseChecker (scripts/lib/ci-history.ts) treats a run whose only artifact is free-plan as one that may have reused, and checks its reuse job as before. The flake counts in test:health and the factory scorecard still leave reused pushes out.
  • Because free-plan now runs on docs-only pull requests too, it leaves the skippable list of the ci-reuse/free-tests run profile in .gstack/pregate.json, so /ship can still reuse a docs-only run's CI result instead of asking for tests that were never owed. A new wiring test checks that every job on that list waits for docs-scope and skips on a docs-only change.
  • docs/TESTING_INTERNALS.md now says a reused main push uploads only the planner's artifact.
Why

Before, over 11-06 to 11-20: in 213 sampled first-attempt pull request runs, the time from the reuse and docs-only checks finishing to the first shard job being created was 21 s at the median, 192 s at p90 and 363 s at p95; in 244 sampled runs (every sampled run that ran shards), the time from the run being created to the first shard job being created was 45 s at the median, 297 s at p90 and 850 s at p95. After, on that second measure: this PR's two Free Tests runs took 29 s and 43 s, and #4572's run on the same afternoon without this change took 51 s. Three runs are too few to show a difference at p95, so the real measure is a window of pull request runs after this lands.

Blast radius

The change touches the required Free Tests workflow, the CI-reuse run profile in .gstack/pregate.json and the flake-count reuse check. Every shard still waits for reuse and docs-scope and skips on either (read at .github/workflows/free-tests.yml:595-596, and covered by the new wiring tests). The run profile takes effect only once it lands on main, because /ship reads main's copy. This PR's own CI result was accepted at its final head (run 44803532677).

Test Coverage

The coverage audit (audit only, no tests written by it) rated 8 of 9 changed paths covered, 89% value-weighted. The one gap: a run whose only artifact is free-plan and whose reuse job did not succeed should still count as a real run; the fixture's job listing always reports a green reuse job.
Tests ran: test 1719 (files, from the CI run at this head)

Pre-Landing Review

The first full review found one blocker, now fixed: the run profile still listed free-plan as skippable, so after this change /ship could never reuse a docs-only run's CI result. A second full review of the fix and a second-model review found nothing blocking.

Review notes

Below the blocking floor, recorded here and not fixed in this PR.

  • INFORMATIONAL scripts/lib/ci-history.ts:284 The reuse check treats a run whose only artifact is free-plan and whose reuse job succeeded as reused; a real main run whose shards uploaded nothing would drop out of flake counts.
  • INFORMATIONAL .github/workflows/free-tests.yml:217 free-plan now also runs on reused and docs-only runs; if it fails there, the run concludes failure while the free-tests check stays green, and /ship can't reuse any CI result for that head.
  • INFORMATIONAL test/ci-reuse-workflow-wiring.test.ts:184 The new test checks one direction only: it would not catch a docs-gated profile job left out of the skippable list, and its string match does not check which way the condition points.
Exploratory QA

No runnable surface: this is a CI workflow and run-profile change. Smoke checks were the focused tests below, plus a control run showing the new wiring test fails against the pre-fix run profile.

Eval Results

No prompt-related files changed — evals skipped.

TODOS

No TODO items completed in this PR.

Documentation

Status: updated. One stale sentence was corrected; no blockers.

Scope: base a529769..08c7220 on ci/free-plan-parallel, 11 committed files, nothing staged, unstaged or untracked. The change makes the Free Tests planner (free-plan) run beside the reuse and docs-scope checks instead of after them. Every shard still waits on both checks, and the flake-count reuse check now treats a run whose only artifact is free-plan as one that ran no shard.

Documentation health:

  • docs/TESTING_INTERNALS.md: updated. The Flake ledger section now says a reused main push has no shard artifacts (only free-plan), which matches the new reuseChecker behavior.
  • docs/pregate.md: current. The docs-only CI section's gating guidance still holds.
  • crew/docs/recommended-harness.md: current. Already updated in the diff ("no shard artifacts").
  • changelog.d/ci-free-tests-plan-in-parallel.md: current. It matches the workflow change.

Coverage debt: the free-plan scheduling change is covered in reference docs (docs/TESTING_INTERNALS.md, docs/pregate.md) and in the changelog fragment. There are no new commands, flags or settings, so no critical gaps.

Diagram drift: none found.

Tests
  • Free Tests CI at this head (run 44803532677): 1719 test files, green; macOS and Windows launcher and regression jobs green in the same run.
  • 11 focused test files that read the run profile, the CI-result reuse code and the workflow (ci-reuse-workflow-wiring, docs-only-carry, docs-only-policy, ship-ci-carry, ci-carry, ci-carry-rerun, pregate-carry-gate, ci-tree-reuse, evidence-reuse, free-tests-workflow-wiring, pregate-selection): 288 pass, 0 fail.
  • Before /ship: 48 test files that read free-tests.yml or ci-history, 842 pass, 0 fail (24 skipped by their own platform guards); actionlint 1.7.7 clean on free-tests.yml.
Agent notes

Open in Capy

Refs GST-3303 (fast CI, change 1 of the audit).

Approvals

No approvals recorded for branch ci/free-plan-parallel.
Plan: exempt: audited-list
Plan check: exempt audited-list

REVIEW_LOOP: passes=2 blocking_found=1 deferred=0 noted=3 fixed=1 scope=frozen dispatches=4 est_input_tokens=15101
Gate edits: none detected (9 listed, 8 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
Second-model review: openai/gpt-6.1-sol, CLEAN.

{
  "schema_version": 1,
  "pr": 4570,
  "head": "ecc0eed7eeec6f003a683fae7bcba6cbd98c92dc",
  "version": "1.102.0.0",
  "base": "main",
  "gate": {
    "test": {
      "pass": 1719,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "test",
      "run": 44803532677,
      "attempt": 1,
      "tree": "5ac7620f3e3c962b47aaaf938e7692d9911bb166"
    }
  ],
  "calls": 28,
  "session_kind": "unattended",
  "run": "ship-4570",
  "head_tree": "5ac7620f3e3c962b47aaaf938e7692d9911bb166",
  "product_patch_id": "c1a2ec2d2f877d316b450dd7e454582fc42b5520",
  "gstack_version": "1.102.0.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 30,
    "rules": "3e7e9d5d0a0d8879",
    "base": "a529769efd989ac5e83e4ee09f1ac7b199e686d3",
    "registry": "a529769efd989ac5e83e4ee09f1ac7b199e686d3",
    "gate_scan": {
      "tagged": 0,
      "head": "ecc0eed7eeec6f003a683fae7bcba6cbd98c92dc"
    },
    "reasons": [
      "gate-class",
      "runtime=30"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @5ac7620f3e3c (8 checks, current for ecc0eed7eeec)",
  "requires_remote": [
    "free-tests.yml/cso-macos-launcher: https://github.com/garrytan/gstack/actions/runs/44803532677/attempts/1",
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/44803532677/attempts/1",
    "free-tests.yml/cso-windows-launcher: https://github.com/garrytan/gstack/actions/runs/44803532677/attempts/1"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "updated",
    "scope": "docs/, crew/docs/, README.md, CONTRIBUTING.md, ARCHITECTURE.md, AGENTS.md, CLAUDE.md"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 1,
    "deferred": 0,
    "noted": 3,
    "fixed": 1,
    "scope": "frozen",
    "rounds": 2,
    "est_input_tokens": 15101,
    "dispatches": {
      "specialist-batched": 2,
      "red-team": 2
    }
  },
  "gate_dispositions": []
}
{
  "schema_version": 1,
  "pr": 4570,
  "head": "ecc0eed7eeec6f003a683fae7bcba6cbd98c92dc",
  "version": "1.102.0.0",
  "base": "main",
  "gate": {
    "test": {
      "pass": 1719,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "test",
      "run": 44803532677,
      "attempt": 1,
      "tree": "5ac7620f3e3c962b47aaaf938e7692d9911bb166"
    }
  ],
  "calls": 28,
  "session_kind": "unattended",
  "run": "ship-4570",
  "head_tree": "5ac7620f3e3c962b47aaaf938e7692d9911bb166",
  "product_patch_id": "c1a2ec2d2f877d316b450dd7e454582fc42b5520",
  "gstack_version": "1.102.0.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 30,
    "rules": "3e7e9d5d0a0d8879",
    "base": "a529769efd989ac5e83e4ee09f1ac7b199e686d3",
    "registry": "a529769efd989ac5e83e4ee09f1ac7b199e686d3",
    "gate_scan": {
      "tagged": 0,
      "head": "ecc0eed7eeec6f003a683fae7bcba6cbd98c92dc"
    },
    "reasons": [
      "gate-class",
      "runtime=30"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @5ac7620f3e3c (8 checks, current for ecc0eed7eeec)",
  "requires_remote": [
    "free-tests.yml/cso-macos-launcher: https://github.com/garrytan/gstack/actions/runs/44803532677/attempts/1",
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/44803532677/attempts/1",
    "free-tests.yml/cso-windows-launcher: https://github.com/garrytan/gstack/actions/runs/44803532677/attempts/1"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "updated",
    "scope": "docs/, crew/docs/, README.md, CONTRIBUTING.md, ARCHITECTURE.md, AGENTS.md, CLAUDE.md"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 1,
    "deferred": 0,
    "noted": 3,
    "fixed": 1,
    "scope": "frozen",
    "rounds": 2,
    "est_input_tokens": 15101,
    "dispatches": {
      "specialist-batched": 2,
      "red-team": 2
    }
  },
  "gate_dispositions": []
}

The free-suite shards waited for two rounds of small GitHub-hosted jobs before starting. The planner now runs beside reuse and docs-scope, and the shards wait for all three, so a reused main push or a docs-only pull request still runs no shard.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@trunk-io

trunk-io Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 2 commits November 20, 2026 19:22
free-plan no longer skips on a docs-only pull request, so it leaves the ci-reuse/free-tests profile's skippable jobs; a test checks every skippable job is gated on docs-scope.

Review-Finding: p1/specialist-batched#1 reader=state-machines
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ting guide

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot merged commit 69e67e2 into main Nov 20, 2026
54 checks passed
@capy-ai capy-ai Bot mentioned this pull request Nov 20, 2026
capy-ai Bot added a commit that referenced this pull request Nov 20, 2026
- Two /ship approval records stop needing workarounds. (#4549)
- For contributors: the paid auto-decide check counts a start step that ran while the skill loaded. (#4543)
- The destructive-command check closes three ways past its disk-wipe and force-push blocks. (#4534)
- A green CI run still counts when the repository's artifact storage is full. (#4536)
- `/cso` now audits repositories that track symlinks. (#4567)
- A doc-sync eval stops failing when the audit child drops one field from its result line. (#4555)
- The browse daemon no longer picks port 10080, which Chromium refuses to open. (#4554)
- Opted-in telemetry now says why a skill run ended, which coding agent and model family ran it, and whether an upgrade worked. (#4542)
- A preregistration with only its write-up and plain data now gets the write-up review: one reviewer, one round. (#4544)
- When owner rulings don't clear a stopped review, `gstack-review-read` now says which findings are left. (#4553)
- The prompt-routing hook now names your installed bug-fix skill on bug reports, alone, and never puts /verify ahead of it. (#4539)
- Owner rulings now close a stopped review whose findings were logged in a findings file. (#4568)
- /ship can finish after the owner accepts a stopped review's findings as open notes. (#4552)
- /ship no longer starts the full test suite on your machine when CI's earlier run can't be reused (GST-3277). (#4565)
- The prompt-routing hook no longer acts on words inside backticks. (#4566)
- In Claude Code, a gstack skill's start step now runs when the skill loads, so the model can't skip it. (#4509)
- gstack's telemetry backend only accepts writes through its own validated endpoint, and the community dashboard now counts real use. (#4537)
- gstack now says what it's adding before it adds a background job or a browser extension. (#4538)
- For contributors: every flaky pass in Free Tests is now recorded. (#4572)
- For contributors: Free Tests on pull requests starts its test shards one round of small jobs sooner. (#4570)
- Secret values written as `name=value` at the end of a path are now hidden. (#4571)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant