Skip to content

perf(ci): plan worker lanes before allocating runners - #342

Merged
ScriptedAlchemy merged 1 commit into
masterfrom
codex/ci-plan
Sep 29, 2026
Merged

ScriptedAlchemy merged 1 commit into
masterfrom
codex/ci-plan

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Why

Fixed CI matrices allocate a runner for every lane even when no PR is ready. A read-only preflight can identify execution and queued-check maintenance before the caller expands its worker matrix.

Scope

Add Action mode plan with JSON lanes and numeric count outputs. Planning and draining share admission checks for trusted PRs, exact merge parents, delegation receipts, repository gates, completed verdicts and retryable work. The planner reads each PR's checks and receipt once across its lanes. Drains retain all mutations and revalidate after acquiring their existing lane lock.

Update the caller example to use the planned matrix, add a patch Changeset, and regenerate the committed plugin artifacts.

Tradeoffs

The planner itself needs one lightweight job. Its result is advisory, and in_progress checks remain eligible for recovery because check state alone does not establish whether a prior worker still exists. This does not introduce an ownership protocol or claim a measured CI speedup.

Blast Radius

Existing drain callers keep their interface and admission rules. Planning includes queued conflict and native-fallback cleanup, but cannot create checks, cancel checks, start Docker, or run PR code. API failures fail the plan instead of claiming that the pool is empty.

Verification

  • pnpm build: passed, including host validation.
  • pnpm check: passed (artifact freshness, validation, build, typecheck, diagnostics, unit, route and browser suites).
  • Action tests: 46 passed, one unchanged opt-in Docker test skipped. Coverage includes empty/mixed plans, maintenance, stale plans, retries, explicit manual selection, trust/gate/receipt failures and the real plan entrypoint without worker state or image files.

@changeset-bot

changeset-bot Bot commented Sep 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8e3d776

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
cargo-hauler Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-29T04:32:04.372253Z 8e3d776 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ScriptedAlchemy
ScriptedAlchemy merged commit d09af46 into master Sep 29, 2026
3 checks passed
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