Skip to content

feat(TP-194): code-quality gates flip — typecheck/lint/format:check now required at PR time#574

Merged
HenryLach merged 15 commits into
mainfrom
feat/tp-194-cq-gates-flip
May 10, 2026
Merged

feat(TP-194): code-quality gates flip — typecheck/lint/format:check now required at PR time#574
HenryLach merged 15 commits into
mainfrom
feat/tp-194-cq-gates-flip

Conversation

@HenryLach
Copy link
Copy Markdown
Owner

Fifth and final packet of the code-quality-gates spec sequence. This is the gate flip — the moment typecheck/lint/format:check become required CI gates.

What this PR does

CI workflow (.github/workflows/ci.yml)

  • Adds Typecheck step (runs npm run typecheck)
  • Removes continue-on-error: true from existing Lint (Biome) step
  • Adds Format check (Biome) step (runs npm run format:check)
  • Order: Typecheck → Lint → Format check → Run tests → CLI smoke checks → Verify docs links (cheapest to most-expensive gates run first)

Reviewer agent activation

  • Removes the temporary "Issues Found but no REVISE downgrade" activation note from templates/agents/task-reviewer.md (added in TP-191 as a guard during the cleanup phase)
  • TP-188's quality-check verification section is now fully active: ANY failing typecheck/lint/format:check from a reviewer-agent run downgrades APPROVE → REVISE

Documentation

  • AGENTS.md: validation checklist now includes npm run typecheck / lint / format:check
  • docs/maintainers/release-process.md: pre-release checklist updated
  • docs/maintainers/development-setup.md: gate commands documented for new contributors

Bonus DX

  • New lint:fix script in package.json (biome lint --write --no-errors-on-unmatched .) for one-command auto-fix of fixable lint issues

Validation

Gate Result on this branch
npm run typecheck exit 0
npm run lint exit 0, 0 errors / 280 warnings / 671 infos
npm run format:check exit 0, "Checked 176 files. No fixes applied."
npm run test:fast 3627 / 1 skipped / 0 failed
Reviewer agent end-to-end Verified organically — R005 code-review of Step 4 of THIS task explicitly ran the three quality-check commands as part of its discovery loop. The downgrade rule is now unconditional in the template.

Branch-protection operator handoff

This PR flips three CI gates from advisory to required by removing continue-on-error: true and adding two new steps to the existing ci job. No branch-protection changes are required — the existing required ci status check (verified via gh api repos/HenryLach/taskplane/branches/main/protection returning ["ci"]) already blocks merge when any step in the ci job fails.

Operator action (verification-only):

  • After this PR's CI run completes, run gh pr checks <this PR #> and confirm the rendered check-context name is still ci.
  • (Optional) Open repo Settings → Branches → main branch protection rule and confirm Require status checks to pass still lists ci.

If at some future point you want per-gate visibility in branch protection (e.g., to require Typecheck independently of Lint), the follow-up is to split the gates into separate jobs. Currently out of scope per the spec's Tier-1.5 follow-up list.

Full code-quality-gates sequence — now complete

# Packet Mission Status
1 TP-191 Prep: scripts + tool pinning + pi-shims + reviewer discoverability ✅ merged
2 TP-192 Lint cleanup: 9 errors → 0 ✅ merged
3 TP-193 Format adoption: biome format --write + .git-blame-ignore-revs + .gitattributes ✅ merged
4 TP-195 Typecheck cleanup: 264 errors → 0 (inserted post-TP-191 per sage's review) ✅ merged
5 TP-194 Gate flip: this PR ← here

Sage post-merge review summary

Sage reviewed this PR before opening and validated: CI gate wiring is correct, reviewer activation removal is clean, docs alignment is consistent. One important nuance — branch protection requires job contexts, not step names — was already correctly handled by the worker's R001 plan-review (caught and fixed in design before implementation; the operator-handoff text above reflects this). Verdict: looks solid and shippable.

After this merges

v0.30.0 release. This is a meaningful semver event — CI gating change is operator-observable, and the public/repo-watcher signal is "taskplane now has real static-analysis gates at PR time." CHANGELOG entries from all five packets ship together.

Suggested release flow (same pattern we've used 7 times this week):

  1. Merge this PR
  2. Branch release/v0.30.0 from main
  3. CHANGELOG: rename [Unreleased][0.30.0] - 2026-05-10, insert fresh empty [Unreleased]
  4. npm version minor
  5. Push release branch, open release PR
  6. CI green, merge with --merge
  7. Push tag → Trusted Publishing workflow publishes to npm + creates GitHub release

Closes

(implicit — completes the code-quality-gates spec sequence)

HenryLach added 15 commits May 10, 2026 17:51
…required

- Add Typecheck step (npm run typecheck) before Lint
- Remove continue-on-error: true from Lint (Biome) step
- Add Format check (Biome) step (npm run format:check) after Lint
- Order: typecheck → lint → format:check → tests → CLI smoke → docs links
Removes the temporary activation note added in TP-191 from
templates/agents/task-reviewer.md. The Quality-check verification
section returns to its TP-188 as-shipped form: failing
typecheck/lint/format:check downgrades APPROVE → REVISE
unconditionally.
…e gates

- AGENTS.md: add typecheck/lint/format:check to the validation checklist
- docs/maintainers/release-process.md: add gate commands to section 2
  pre-release checks + add three checkboxes to the Pre-release checklist
- docs/maintainers/development-setup.md: add new "Code-quality gates
  (required for every PR)" section before the existing Biome section,
  with a relative link to the code-quality-gates spec
The development-setup.md doc references npm run lint:fix in both the
pre-existing Biome section and the new Code-quality-gates section,
but the script did not exist. Adds:
  "lint:fix": "biome lint --write --no-errors-on-unmatched ."
This is Biome's documented lint-autofix invocation. Verified all
three CI gates (typecheck, lint, format:check) still exit 0.
@HenryLach HenryLach merged commit 5535a07 into main May 10, 2026
1 check passed
@HenryLach HenryLach deleted the feat/tp-194-cq-gates-flip branch May 10, 2026 23:06
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