perf(ci): drop unbudgeted cache automation and duplicate draft planning

Keep producer and benchmark storage behavior unchanged from main. Do not add a daily 1.42 GiB cache generation to a near-quota cache store without retention and eviction evidence. Reuse existing draft selection artifacts instead of rebuilding the graph twice.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Neil
2026-11-02 23:20:13 -08:00
co-authored by Copilot
parent 0f5dc98940
commit 3be8a205dd
4 changed files with 36 additions and 43 deletions
+1 -1
View File
@@ -906,7 +906,7 @@ jobs:
if: ${{ !cancelled() && (needs.test.result == 'success' || needs.test.result == 'failure') }}
uses: ./.github/workflows/unit-selection-evidence.yml
with:
rebuild_plan: true
rebuild_plan: ${{ !(vars.ORCA_UNIT_SELECTION_MODE == 'selected' && github.event.pull_request.draft == true) }}
# Isolate two browser/mobile files to avoid every unit shard paying for their installs; test the same shipped bundle plus render/census.
mobile_web_app:
@@ -11,31 +11,23 @@ concurrency:
cancel-in-progress: true
jobs:
unit_plan:
uses: ./.github/workflows/unit-plan.yml
with:
defer_shadow: true
baseline:
needs: unit_plan
uses: ./.github/workflows/unit-tests.yml
with:
node_versions: '["24"]'
node_versions: '["24.22.1"]'
runner: ubuntu-24.04-arm
shards: ${{ needs.unit_plan.outputs.shards }}
download_selection_plan: false
shards: '[{"index":1,"count":5},{"index":2,"count":5},{"index":3,"count":5},{"index":4,"count":5},{"index":5,"count":5}]'
artifact_prefix: baseline-unit
phase_diagnostics: true
run_relay_integration: false
producer:
needs: [unit_plan, baseline]
needs: baseline
uses: ./.github/workflows/unit-tests.yml
with:
node_versions: '["24"]'
node_versions: '["24.22.1"]'
runner: ubuntu-24.04-arm
shards: ${{ needs.unit_plan.outputs.shards }}
download_selection_plan: false
shards: '[{"index":1,"count":5},{"index":2,"count":5},{"index":3,"count":5},{"index":4,"count":5},{"index":5,"count":5}]'
artifact_prefix: producer-unit
module_cache: cold
module_cache_namespace: ${{ github.run_id }}-${{ github.run_attempt }}
@@ -44,13 +36,12 @@ jobs:
run_relay_integration: false
warm:
needs: [unit_plan, producer]
needs: producer
uses: ./.github/workflows/unit-tests.yml
with:
node_versions: '["24"]'
node_versions: '["24.22.1"]'
runner: ubuntu-24.04-arm
shards: ${{ needs.unit_plan.outputs.shards }}
download_selection_plan: false
shards: '[{"index":1,"count":5},{"index":2,"count":5},{"index":3,"count":5},{"index":4,"count":5},{"index":5,"count":5}]'
artifact_prefix: warm-unit
module_cache: warm
module_cache_namespace: ${{ github.run_id }}-${{ github.run_attempt }}
+3 -25
View File
@@ -1,32 +1,13 @@
name: Unit transform cache producer
# Cold full unit run on main that publishes per-shard Vitest transform caches.
# Match PR architecture and GitHub's cache store; Vitest invalidates edited source modules.
# Dispatch only: PR shards run on hosted runners, which cannot read this Blacksmith-store cache.
on:
workflow_dispatch:
schedule:
- cron: '23 3 * * *'
push:
branches: [main]
paths:
- 'package.json'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
- '.npmrc'
- 'config/.bun-version'
- 'config/pnpmfile.cjs'
- 'config/patches/**'
- 'config/vitest.config.ts'
- 'config/tsconfig*.json'
- 'config/scripts/vitest*'
- 'config/scripts/ci-unit-*'
- 'config/scripts/run-vitest.mjs'
- '.github/workflows/unit-module-cache.yml'
- '.github/workflows/unit-tests.yml'
concurrency:
group: unit-module-cache-${{ github.ref }}
cancel-in-progress: false
cancel-in-progress: true
permissions:
contents: read
@@ -35,8 +16,6 @@ jobs:
unit_plan:
if: github.ref == 'refs/heads/main'
uses: ./.github/workflows/unit-plan.yml
with:
defer_shadow: true
test:
needs: unit_plan
@@ -44,9 +23,8 @@ jobs:
with:
# Match the PR unit matrix so the cache key's runtime and shard fields line up.
node_versions: '["24"]'
runner: ubuntu-24.04-arm
runner: blacksmith-8vcpu-ubuntu-2404
shards: ${{ needs.unit_plan.outputs.shards }}
module_cache: cold
download_selection_plan: false
artifact_prefix: cache-producer-unit
run_relay_integration: false
@@ -5,11 +5,35 @@ import { describe, expect, it } from 'vitest'
const workflow = parse(readFileSync('.github/workflows/pr.yml', 'utf8'))
const unitTestWorkflow = parse(readFileSync('.github/workflows/unit-tests.yml', 'utf8'))
const planWorkflow = parse(readFileSync('.github/workflows/unit-plan.yml', 'utf8'))
const evidenceWorkflow = parse(
readFileSync('.github/workflows/unit-selection-evidence.yml', 'utf8')
)
describe('PR workflow parallelism', () => {
it.each([
['shadow', false, true],
['shadow', true, true],
['selected', false, true],
['selected', true, false],
['', true, true]
])('plans only once for mode %s, draft %s', (mode, draft, deferred) => {
const evaluate = (expression, context) => runInNewContext(expression.slice(3, -2), context)
const context = {
vars: { ORCA_UNIT_SELECTION_MODE: mode },
github: { event: { pull_request: { draft } } }
}
const inputs = {
defer_shadow: workflow.jobs.unit_plan.with.defer_shadow,
selection_mode: evaluate(workflow.jobs.unit_plan.with.selection_mode, context)
}
expect(evaluate(planWorkflow.jobs.plan.env.DEFER_SHADOW, { ...context, inputs })).toBe(deferred)
expect(evaluate(workflow.jobs.test.with.download_selection_plan, context)).toBe(!deferred)
expect(evaluate(workflow.jobs.unit_selection_evidence.with.rebuild_plan, context)).toBe(
deferred
)
})
it('enforces import boundaries in the required static-analysis checks', () => {
const guard = workflow.jobs.preflight.steps.find((step) =>
step.run?.includes('bun config/scripts/check-import-boundaries.mjs')