Skip to content

ci: run check:changed on pre-push and skip ARC workers on drafts - #181

Merged
nullStack65 merged 1 commit into
release/native-0.1.10from
ci/shift-left-pre-push-draft-gate
Nov 23, 2026
Merged

nullStack65 merged 1 commit into
release/native-0.1.10from
ci/shift-left-pre-push-draft-gate

Conversation

@nullStack65

Copy link
Copy Markdown
Owner

Moves CI's fast checks to git push and stops draft PRs from using ARC runners. Part of Kameron's CI shift-left and waste-elimination request (CLO-694, the CI hardening tracking issue).

Deploy: none

What changes

  1. Pre-push hook .vite-hooks/pre-push. pnpm install already wires it through vp config (core.hooksPath=.vite-hooks/_). It runs vp run check:changed <base>, the format, lint, knip, typecheck and nearby-test checks that AGENTS.md already asks for before a push.
    • The base is the closest release/* or main branch on the push remote.
    • It checks only branch pushes made from HEAD.
    • If Node is older than the engines version, it warns and skips, because check:changed needs Node 26 to run .ts files.
    • Skip once with --no-verify or VP_GIT_HOOKS=0. Override the base with T3_PRE_PUSH_BASE.
  2. Closura ARC CI draft gating (closura-arc-ci.yml).
    • The workflow now also runs on ready_for_review.
    • The core, web and mobile ARC workers skip draft PRs.
    • On a draft, the required aggregator check "Voice + founder inbox (Linux ARC)" runs on free hosted ubuntu-latest and fails with "Draft pull request: the ARC workers run when it is marked ready for review." The required check therefore never shows a false green and never uses an ARC runner. Marking the PR ready reruns the full set.
    • The concurrency groups were already PR-keyed with cancel-in-progress. deploy-line already runs on ready_for_review and is unchanged.
  3. AGENTS.md: one sentence saying the hook runs check:changed.

This PR does not touch the Closura donor PR on permanent hold (pingdotgg#2053) or the already-merged Closura PR (pingdotgg#2068).

Found on the base, needs a fix before or at merge

check:changed finds two failures on release/native-0.1.10 at 1f8a0720 that the required check misses:

  • @t3tools/evals typecheck has 4 errors at evals/mcp-tool-use/run.ts:2768 and run.test.ts:1152: ProviderRegistry is missing from the Effect context.
  • apps/server/src/provider/AgentContextBudget.test.ts: mcpToolListJsonBytes is 56852, but the budget in agentContextBudget.json is 55827.

A .github or hook change makes check:changed run everything, so the hook will block almost every push until both are fixed. This branch was pushed with --no-verify for that reason only. I left both unfixed because they are outside this PR's scope.

Provenance

Model: claude-opus-5-5
Task: implementation
Agent: CI shift-left implementation sub-agent
Harness: t3/claude-code

Testing

Tested with Node 26.13.1 against base 1f8a0720:

  • actionlint passes; the only warning is the existing unknown t3code-ci-arc label.
  • .github/scripts/arc-ci-coverage.cjs passes (48 tests, 3 workers).
  • Hook with Node 22: warns and exits 0.
  • Non-HEAD ref, tag and delete pushes: no-op, exits 0.
  • Injected lint and type error: exit 1, and lint and knip catch it.
  • Real git push --dry-run: blocked only by the two failures already on the base listed above. Format passes.
  • The pre-commit hook passed on the commit.
  • CI results for this head are pending.

Risk

A draft PR's required check now shows red until the PR is marked ready, where before ARC workers ran on it. The hook adds check:changed time to git push.

How to revert

Revert this commit. To turn the hook off for a push, set VP_GIT_HOOKS=0.

🤖 Generated with Claude Code

Shift-left and waste elimination for the fork's ARC CI:

- .vite-hooks/pre-push runs `vp run check:changed` against the release or
  main line the branch is closest to, so format, lint, knip, typecheck and
  nearby-test failures stop before a push reaches ARC. `pnpm install`
  already wires .vite-hooks through `vp config`; `--no-verify` skips once.
  A Node older than package.json engines warns and skips instead of
  blocking.
- closura-arc-ci.yml skips the three ARC workers on draft pull requests
  and runs on `ready_for_review`. The required "Voice + founder inbox
  (Linux ARC)" check fails fast on a free hosted runner for drafts, so it
  is never green without the tests and never wakes ARC for a parked draft.

Model: claude-opus-5-5
Task: implementation
Agent: CI shift-left implementation sub-agent
Harness: t3/claude-code
Model-family: claude
Model-generation: 5.5
Skills-SHA: none loaded; followed bot-baseline.md and repo AGENTS.md; installed identity unverified

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@nullStack65

Copy link
Copy Markdown
Owner Author

Independent review of head 71d9ced: 0 blocking findings.

Checked: (1) The draft skip is only !github.event.pull_request.draft ANDed into the pull_request branch of the three worker ifs, so ready PRs and workflow_dispatch are unaffected. ready_for_review is added to the trigger types, so a draft marked ready gets the full run. (2) The aggregator voice-and-inbox still runs on drafts (!cancelled()) and fails on purpose, so the required check can't go green on a draft with skipped workers. Its runs-on expression resolves to t3code-ci-arc for non-draft and dispatch events. (3) pre-push hook is POSIX sh and safe under sh -e. It ignores tags and deletes and skips with a visible warning on an old Node. --no-verify is the documented bypass.

Non-blocking notes: converting a ready PR back to draft doesn't re-trigger (converted_to_draft isn't a type), so an in-flight run just finishes. Draft failures use a hosted ubuntu-latest runner, which fits the public-repo assumption in the comment. The hook checks the working tree, not only the pushed commit; it prints a note when the tree is dirty.

@nullStack65
nullStack65 merged commit 5712032 into release/native-0.1.10 Nov 23, 2026
6 checks passed
@nullStack65
nullStack65 deleted the ci/shift-left-pre-push-draft-gate branch November 23, 2026 04:55
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