Skip to content

ci(checks): run knip in the check gate and name the e2e job for what it runs - #420

Merged
Vivswan merged 1 commit into
mainfrom
wt/knip-gate
Sep 24, 2026
Merged

Vivswan merged 1 commit into
mainfrom
wt/knip-gate

Conversation

@Vivswan

@Vivswan Vivswan commented Sep 23, 2026

Copy link
Copy Markdown
Owner

What this changes

checks.yml  check job   lint -> knip -> lint:arch -> typecheck -> compat markers -> test
package.json check      lint && knip && lint:arch && check:compat && typecheck && test && build:check
checks.yml  job id      e2e-smoke -> e2e   (it runs every scenario plus fuzz on every PR)

Why

  • knip ran nowhere in CI and outside bun run check, which CONTRIBUTING.md calls the whole local gate, so a dead export could land unseen.
  • The job named e2e-smoke runs the whole corpus, so the name misled.

Proof

  • The knip gate is live. Green on the branch; a planted unused export flips it red, then reverted:
$ bun run knip
(exit 0)

$ printf '\nexport const knipProbeUnused = 1;\n' >> src/sections/registry.ts && bun run knip
Unused exports (1)
knipProbeUnused  src/sections/registry.ts:376:14
error: script "knip" exited with code 1
  • The rename is safe. No needs: in any workflow names the job, and all-green sees only the checks caller's aggregate. The rulesets require only all-green (ruleset main) and pr-title (ruleset pr-title), read from gh api repos/Vivswan/github-settings-as-code/rulesets.
  • Gates: bun run lint:yaml, actionlint .github/workflows/checks.yml, and bun run typecheck green; bun test test/docs 383 pass.
Technical details
  • Line accounting: +4/-2 over two files. .github/workflows/checks.yml +3/-1 (the knip step, the job id). package.json +1/-1 (the check chain).
  • Not touched: ci.yml is managed by the platform sync. e2e-smoke appeared nowhere else in the repository (workflows, actionlint config, CONTRIBUTING.md, docs, tests).
  • Codex rounds: 1, no findings.

BEGIN_COMMIT_OVERRIDE
ci(checks): run knip in the check gate and name the e2e job for what it runs

knip ran nowhere in CI and sat outside bun run check, so a dead export could land unseen; it now runs after lint in both.
The checks.yml job e2e-smoke has run the full scenario corpus plus fuzz on every PR, so it is renamed e2e.
No needs: names the job and the rulesets require only all-green and pr-title, so the rename changes no required check.
END_COMMIT_OVERRIDE

…it runs

knip ran nowhere in CI and sat outside `bun run check`, so a dead export could land unseen; it now runs after lint in both.
The checks.yml job `e2e-smoke` has run the full scenario corpus plus fuzz on every PR, so it is renamed `e2e`.
No `needs:` names the job and the rulesets require only all-green and pr-title, so the rename changes no required check.
Copilot AI balanced review requested due to automatic review settings September 23, 2026 20:51
@github-actions

Copy link
Copy Markdown
Contributor

File size check

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

File Size Tier Cap
.github/scripts/gen-inputs-table.ts:54 11 comment lines warn 10
.github/scripts/generated.ts:28 191 chars warn 150
.github/scripts/release-pipeline.ts:7 156 chars warn 150
.github/scripts/release-pipeline.ts:458 151 chars warn 150
.github/scripts/release-pipeline.ts:1252 153 chars warn 150
.github/scripts/release-pipeline.ts:1 35 comment lines (header) warn 25
.github/scripts/release-pipeline.ts:454 14 comment lines warn 10
.github/workflows/post-green.yml:29 153 chars warn 150
.github/workflows/update-release-pr.yml:110 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:43 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 2634 lines warn 2560
test/e2e/generators.ts:1704 166 chars warn 150
test/e2e/generators.ts:1858 161 chars warn 150
test/e2e/generators.ts:1667 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:12 12 comment lines warn 10
test/sections/refusal-messages.test.ts:61 19 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 validation addition is correctly configured, and the job rename has no remaining internal references.

Review effort: Balanced
Findings: None

What changed in this PR

Adds knip to local and CI validation while accurately naming the full e2e job.

Changes:

  • Runs knip in the check gate.
  • Renames e2e-smoke to e2e.
File Description
package.json Adds knip to the local check chain.
.github/​workflows/​checks.yml Adds the CI knip step and renames the e2e job.

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

@Vivswan
Vivswan marked this pull request as ready for review September 23, 2026 20:54
@Vivswan
Vivswan merged commit 1a25adb into main Sep 24, 2026
31 checks passed
@Vivswan
Vivswan deleted the wt/knip-gate branch September 24, 2026 00:28
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.

2 participants