-
Notifications
You must be signed in to change notification settings - Fork 0
perf(ci): stage expensive checks without removing qualification #2865
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
0304402
perf(ci): stage expensive checks behind cheap prerequisite failures
Chris0Jeky 2d0dce1
test(ci): align E2E contract with staged failure barriers
Chris0Jeky 46e7b7f
Merge branch 'codex/2336-adapter-review' into codex/2336-staging-review
Chris0Jeky 49711f1
Normalize checkout line endings in workflow contracts
Chris0Jeky e9a78e3
Merge branch 'main' into ci/continuation-03-staging
Chris0Jeky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # Required-workflow staging | ||
|
|
||
| Date: 2026-09-10. Owners: #2327 and #2332. Parent: [engineering contract](README.md). | ||
|
|
||
| This slice applies the `minimal` transform to `.github/workflows/ci-required.yml`. It changes scheduling dependencies only. It does not select fewer checks on a healthy candidate, remove Windows coverage, alter security enforcement, change permissions, or reuse earlier test results. | ||
|
|
||
| | Work | New prerequisite | | ||
| | --- | --- | | ||
| | Backend Unit and API Integration | Backend Architecture and Release Workflow Contract | | ||
| | Migration Validation | Backend Architecture | | ||
| | Frontend Unit | Release Workflow Contract and Paper Color Audit | | ||
| | Container Images | Release Workflow Contract | | ||
| | E2E Smoke | Frontend Unit, Release Workflow Contract and Paper Color Audit, in addition to every existing dependency | | ||
|
|
||
| The short control checks can prevent launching dependent expensive work after a known failure. The API job deliberately does not wait for the entire Backend Unit matrix: the `compute` proposal is optional, not adopted here. Security jobs remain independent. In particular, Secret Scan only runs on PR events and must not become an unconditional dependency on push/merge-group events. | ||
|
|
||
| The original workflow was read at immutable base `6c51b09bcdcefbc7a852a7047aa9ab8ee5eb10b7`. Its source blob `f056d76a0c1b4ecabd95783d47131dfe096121c5` was reproduced byte-for-byte before transformation. The transform checks that removing `needs` from each changed job leaves identical bytes. It preserves the complete header/comments, existing check names, reusable callees, commands, action pins, matrices, event/concurrency rules and permissions. The historical header's advisory/enforcing shorthand is deliberately not edited by a dependency-only PR; executable settings remain the authority. | ||
|
|
||
| ## Qualification | ||
|
|
||
| Run the checked-in topology regressions through the existing self-test bridge: | ||
|
|
||
| ```sh | ||
| node --test scripts/ci/smart-ci/continuation.test.mjs | ||
| ``` | ||
|
|
||
| Local result for this slice: **257 passed, 0 failed/skipped/cancelled**, Node 22.16.0/Linux. Four regressions exercise the actual checked-in workflow; the existing transformer suite covers unknown shapes, cycles, duplicate dependencies, idempotence and preservation. Local PyYAML parsing is only a syntax sanity check, not GitHub workflow semantic validation. | ||
|
|
||
| Configured-Node hosted Smart CI, Actionlint, full required CI and independent/maintainer reviews remain required on this PR head. Do not equate a successful core fixture with product qualification. No cancellation API is called: the transform prevents dependent jobs from starting after failed prerequisites but cannot stop work already running. | ||
|
|
||
| ## Measurement and rollback | ||
|
|
||
| Compare matched change/risk strata and include failed/cancelled attempts, not just green runs. Record total runner seconds and healthy-candidate latency separately; a dependency barrier can reduce failed-run cost while increasing green latency. Include queue/setup time and collector overhead when available; do not fill missing data with zeros. | ||
|
|
||
| The retained August baseline is historical and is not an after-measurement. Capture a fresh window using the existing estate measurement tool only after the topology is deployed. No numerical savings are claimed in this PR. | ||
|
|
||
| Rollback is the inverse of these `needs` additions. Keep every newer concurrent hardening change. Do not restore an entire old workflow file over subsequent edits. The canonical policy remains shadow and all human settings/review gates remain unchanged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import test from 'node:test'; | ||
| import assert from 'node:assert/strict'; | ||
| import { readFileSync } from 'node:fs'; | ||
| import { stageWorkflow } from '../tools/stage-taskdeck.mjs'; | ||
|
|
||
| const workflow = () => readFileSync(new URL('../../../../../.github/workflows/ci-required.yml', import.meta.url), 'utf8').replaceAll('\r\n', '\n'); | ||
| function block(text, id) { | ||
| const start = text.indexOf(`\n ${id}:\n`); assert.ok(start >= 0, `missing ${id}`); | ||
| return text.slice(start + 1).split(/\n [a-z][a-z0-9-]*:\n/)[0]; | ||
| } | ||
| test('checked-in required workflow satisfies minimal dependency staging', () => { | ||
| const text = workflow(), staged = stageWorkflow(text); assert.deepEqual(staged.changes, []); assert.equal(staged.text, text); | ||
| }); | ||
| test('E2E waits for frontend and existing backend prerequisites', () => { | ||
| const b = block(workflow(), 'e2e-smoke'); | ||
| for (const id of ['frontend-unit', 'backend-unit', 'api-integration', 'migration-validation', 'backend-architecture', 'docs-governance']) assert.ok(b.includes(` - ${id}\n`)); | ||
| }); | ||
| test('API does not wait for the full backend unit platform matrix', () => { | ||
| const b = block(workflow(), 'api-integration'); assert.ok(b.includes(' - backend-architecture\n')); assert.ok(!b.includes(' - backend-unit\n')); | ||
| }); | ||
| test('PR-only secret scan remains independent of push and merge-group barriers', () => { | ||
| const text = workflow(); assert.ok(block(text, 'secret-scan').includes("if: ${{ github.event_name == 'pull_request' }}")); | ||
| assert.ok(!text.includes(' - secret-scan\n')); assert.match(text, /^ push:/m); assert.match(text, /^ pull_request:/m); assert.match(text, /^ merge_group:/m); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.