Skip to content

ci(checks): run the full e2e and coverage on every PR; drop the diff-aware section selector - #409

Merged
Vivswan merged 1 commit into
mainfrom
wt/e2e-always
Sep 22, 2026
Merged

Vivswan merged 1 commit into
mainfrom
wt/e2e-always

Conversation

@Vivswan

@Vivswan Vivswan commented Sep 22, 2026 •

Copy link
Copy Markdown
Owner

Before

e2e-smoke                                          endpoint-coverage
  checkout (fetch-depth: 0)                          checkout (fetch-depth: 0)
  setup, setup-node                                  setup, setup-node
  Select sections from the diff (BASE_SHA)           Check whether the diff can affect route coverage
  Run scenarios and fuzz    if sections != none      Endpoint-coverage tripwire if sections != none
    all      -> run.ts; fuzz.ts --iterations 25
    <keys>   -> run.ts --sections; fuzz.ts --sections

After

e2e-smoke                                          endpoint-coverage
  checkout                                           checkout
  setup, setup-node                                  setup, setup-node
  Run scenarios and fuzz                             Endpoint-coverage tripwire
    run.ts; fuzz.ts --iterations 25

How

  • Selector deleted: .github/scripts/changed-sections.ts, its test, and the workflow test that pinned its all/none tokens in checks.yml.
  • arch-lint.ts absorbs the scanner: importSpecifiers reads every module-load form (static imports and re-exports, import(), require(), import("./x.js").T, import X = require()) from the one oxc parse it already makes; resolveImport moves in unchanged. Bun.Transpiler and the shebang regex go.
  • Layout census moves: test/layout.test.ts keeps the one non-selector fact the deleted test pinned (src/ holds no tests, mocks, generators, scenarios, or docs prose) and adds the flat-file rule: a file named after a section lives in the section mirror directory, never flat beside the directories.
  • One owner for the mirror root: test/e2e/schema.ts exports SECTIONS_TEST_ROOT, the default scenarioRoots() already used; the census imports it, so a mirror move edits that one line. The census reads the root directly (readdirSync fails by path on a missing root) and asserts it holds at least one section directory; there is no fallback between roots.
  • Prose: CONTRIBUTING.md and three src/sections/shared/*.ts headers no longer name the selector.

Proof

  • Gates: typecheck, knip, lint, lint:arch, lint:yaml, actionlint on checks.yml all clean.
  • Targeted tests: test/layout.test.ts, test/architecture, test/docs, test/schema-corpus.test.ts green.
  • Census red-then-green: a stray src/sections/labels/x.test.ts and a flat test/sections/labels-x.test.ts each fail the census by name; removed, green. Control: SECTIONS_TEST_ROOT pointed at a missing directory fails the file with ENOENT naming the path. The src/ census matches basenames, so a top-level src/mock.ts fails it too (proved red with a temporary file).
  • Scanner parity: of the six wrapper forms the review found, the two argument-wrapped ones (require(("x")), require("x" as string)) were red against the prior scanner (it threw "computed specifier") and resolve now; the four callee-wrapped ones ((require)(x), require!(x), (require as any)(x), require<T>(x)) resolved before and after, and are pinned as parity cases.
Technical details
  • Reviewer note: stacked on chore(test): take the OpenAPI and GraphQL schemas from the Octokit packages instead of fetching them #406 (wt/octokit-schemas), which deletes the fetch-test-artifacts action and its two steps in the same checks.yml jobs this change edits; the base is that branch so the diff shows only this change, and GitHub retargets to main when chore(test): take the OpenAPI and GraphQL schemas from the Octokit packages instead of fetching them #406 merges. PR refactor(test): fold the section test mirror into test/sections #402 moves the mirror to test/sections; it edits the SECTIONS_TEST_ROOT line and the census follows.
  • Guards retired with the selection, deliberately: the shared-file fan-out derivation, the dead-shared-file check, ALL_SELECTING_PREFIXES and the "every top-level src entry is all-selecting" test, the section-path classifiers, the name-status parser, and the checks.yml token pins. The parse, computed-specifier, dangling-import, and layout guards survive in arch-lint.ts and test/layout.test.ts.
  • Line accounting by kind (numstat against main): scripts +104/-497, workflows +6/-45, docs +1/-1, source comments +2/-5, tests +116/-532; total +229/-1080, a net deletion of 851 lines.
  • Review: codex rubber-duck converged in 1 round (no findings).
  • Not edited: CHANGELOG.md still names the selector in one release-please history line; generated history is not hand-edited.

Reviewer note

  • The census found one stray on main at the time, test/sections/webhooks-events.test.ts; its move to test/sections/webhooks/events.test.ts has since landed on main, so the census here starts clean.

BEGIN_COMMIT_OVERRIDE
ci(checks): run the full e2e and coverage on every PR; drop the diff-aware section selector

Every pull request now runs the whole scenario corpus, 25 fuzz iterations, and the endpoint-coverage tripwire; the e2e-smoke and endpoint-coverage jobs lose their diff step, their skip conditions, and the full-history checkout only the diff needed.
The selector script and its test are deleted, and the workflow test that pinned its printed tokens goes with them.
arch-lint.ts absorbs the import scanner and resolver it shared with the selector, reading every load form from the one oxc parse it already makes, so Bun.Transpiler and the shebang special case go.
The layout census the selector's test carried moves to test/layout.test.ts: src/ holds code only, and a file named after a section lives in the mirror directory of its key, never flat beside the directories.
The mirror root has one owner, SECTIONS_TEST_ROOT in test/e2e/schema.ts, which scenarioRoots() defaults to and the census imports.
CONTRIBUTING.md and the three shared-module headers that named the selector are updated.
END_COMMIT_OVERRIDE

Copilot AI balanced review requested due to automatic review settings September 22, 2026 07:55
@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

File size check

0 over a hard cap (fails), 30 warning(s).

File Size Tier Cap
.github/scripts/release-pipeline.ts:6 156 chars warn 150
.github/scripts/release-pipeline.ts:453 151 chars warn 150
.github/scripts/release-pipeline.ts:1247 153 chars warn 150
.github/scripts/release-pipeline.ts:1 34 comment lines (header) warn 25
.github/scripts/release-pipeline.ts:449 14 comment lines warn 10
.github/workflows/post-green.yml:29 153 chars warn 150
.github/workflows/update-release-pr.yml:109 14 comment lines warn 10
docs/upgrading/v2-to-v3.md 1276 lines warn 1040
src/engine/layers.ts:217 157 chars warn 150
src/flows/settings-write.ts:142 159 chars warn 150
src/flows/settings-write.ts:30 11 comment lines warn 10
src/flows/snapshot.ts:189 13 comment lines warn 10
src/github/secret-scan.ts:42 11 comment lines warn 10
src/schema.ts:186 153 chars warn 150
src/schema.ts:197 176 chars warn 150
src/sections/contract/errors.ts:14 14 comment lines warn 10
src/sections/contract/module.ts:963 185 chars warn 150
src/sections/contract/module.ts:627 12 comment lines warn 10
src/sections/contract/module.ts:897 12 comment lines warn 10
src/sections/secret_scanning_custom_patterns/compilable-form.ts:382 161 chars warn 150
src/sections/shared/roles.ts:43 13 comment lines warn 10
src/types.ts:16 156 chars warn 150
test/docs/guides.test.ts:451 155 chars warn 150
test/e2e/generators.ts 2633 lines warn 2560
test/e2e/generators.ts:1703 166 chars warn 150
test/e2e/generators.ts:1857 161 chars warn 150
test/e2e/generators.ts:1666 12 comment lines warn 10
test/engine/execute.test.ts:617 152 chars warn 150
test/flows/merge-parity.test.ts:63 164 chars warn 150
test/scripts/auto-fix-allowlist.test.ts:8 12 comment lines warn 10

Split the file, wrap the line, shorten or exempt the comment, or list the path in .file-size-allow.local with a # reason.

5 managed file(s) skipped; repo-platform owns them.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The implementation is coherent and tested; only a non-blocking stale nightly workflow comment remains.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
What changed in this PR

Runs complete e2e, fuzz, and endpoint coverage checks for every PR while consolidating import scanning into the architecture lint.

Changes:

  • Removes diff-aware section selection and workflow gates.
  • Runs the complete test corpus on every event.
  • Adds architecture scanner and repository-layout coverage.
File Description
.github/​scripts/​arch-lint.ts Absorbs import scanning and resolution.
.github/​scripts/​changed-sections.ts Removes the section selector.
.github/​workflows/​checks.yml Runs complete PR checks unconditionally.
CONTRIBUTING.md Documents the expanded PR checks.
src/​sections/​shared/​repo-secrets.ts Removes obsolete selector reference.
src/​sections/​shared/​repo-variables.ts Removes obsolete selector reference.
src/​sections/​shared/​schema-helpers.ts Removes obsolete selector reference.
test/​architecture/​architecture.test.ts Expands import scanner coverage.
test/​docs/​checks-sections-gate.test.ts Removes obsolete workflow-token tests.
test/​layout.test.ts Adds repository-layout census tests.
test/​scripts/​changed-sections.test.ts Removes selector tests.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/checks.yml
@Vivswan
Vivswan changed the base branch from main to wt/octokit-schemas September 22, 2026 09:00
@Vivswan
Vivswan force-pushed the wt/e2e-always branch 2 times, most recently from 9d30930 to 1baad6f Compare September 22, 2026 09:08
@Vivswan Vivswan added the merge-when-green Owner approved: merge once every gate is green label Sep 22, 2026
@Vivswan
Vivswan force-pushed the wt/e2e-always branch 2 times, most recently from a074e0c to d594a11 Compare September 22, 2026 09:30
Base automatically changed from wt/octokit-schemas to main September 22, 2026 09:42
Copilot AI review requested due to automatic review settings September 22, 2026 09:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The layout census fails to detect top-level mock and generator helpers under src/.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
Resolved since last review (1)

Comment thread test/layout.test.ts
@Vivswan
Vivswan marked this pull request as ready for review September 22, 2026 09:59
…aware section selector

Every pull request now runs the whole scenario corpus, 25 fuzz iterations, and the endpoint-coverage tripwire; the e2e-smoke and endpoint-coverage jobs lose their diff step, their skip conditions, and the full-history checkout only the diff needed.
The selector script and its test are deleted, and the workflow test that pinned its printed tokens goes with them.
arch-lint.ts absorbs the import scanner and resolver it shared with the selector, reading every load form from the one oxc parse it already makes, so Bun.Transpiler and the shebang special case go.
The layout census the selector's test carried moves to test/layout.test.ts: src/ holds code only, and a file named after a section lives in the mirror directory of its key, never flat beside the directories.
The mirror root has one owner, SECTIONS_TEST_ROOT in test/e2e/schema.ts, which scenarioRoots() defaults to and the census imports.
CONTRIBUTING.md and the three shared-module headers that named the selector are updated.
Copilot AI review requested due to automatic review settings September 22, 2026 10:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The selector removal is complete, and its remaining architectural and layout safeguards have appropriate coverage.

Review effort: Balanced
Findings: None

Resolved since last review (1)

@Vivswan
Vivswan merged commit 7bf74a3 into main Sep 22, 2026
31 checks passed
@Vivswan
Vivswan deleted the wt/e2e-always branch September 22, 2026 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-when-green Owner approved: merge once every gate is green

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants