Skip to content

ci: add format check and pr autofix - #368

Merged
nsheaps merged 4 commits into
mainfrom
claude/bold-volta-qfy4mg
Oct 8, 2026
Merged

nsheaps merged 4 commits into
mainfrom
claude/bold-volta-qfy4mg

Conversation

@nsheaps

@nsheaps nsheaps commented Oct 8, 2026

Copy link
Copy Markdown
Owner

Phase 1 plan, M0 PR 6 (REQ-ENG-006). Builds on #367, which formatted the repo and added .prettierignore.

Changes

  • mise run lint checks formatting. A new lint:format task runs prettier --check ., and lint depends on it, so the lint job fails on unformatted files.
  • .github/workflows/format.yml autofixes PRs from this repo.
    • It checks out the PR head with the automation App token (checkout-as-app, SHA-pinned), runs mise run format, and pushes any changes as style: apply prettier formatting via scripts/ci/commit-format-fixes.sh.
    • The push uses the App token rather than GITHUB_TOKEN, so CI re-runs on the autofix commit. It never adds [skip ci].
    • Concurrency is per PR.
  • Fork PRs can't receive pushes. A separate job warns the author to run mise run format, and their lint job still fails.
  • Docs:
    • REQ-ENG-006 moves to partial; eslint --fix is still missing.
    • Open question 2 is decided: Prettier is the formatter of record.
    • CLAUDE.md and CONTRIBUTING.md no longer claim that bun run lint runs Prettier, and they list mise run lint:format and mise run format.

Test plan

  • Locally, a deliberately misformatted file made mise run lint:format fail, and it passed once the file was removed.
  • mise run lint:workflows passes (actionlint, shellcheck, single-command run: steps).
  • mise run check passes.
  • Plan acceptance, on this PR: push a commit with a formatting violation. Lint should fail, Format should push an autofix commit, and the PR should go green.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GA968hkqa7CsMeYAhzV4Dz


Generated by Claude Code

claude added 2 commits October 8, 2026 06:22
mise run lint now runs prettier --check (lint:format), and format.yml runs
mise run format on same-repo PRs with the automation App token and pushes
the fixes as a new commit, so CI re-runs on it. Fork PRs get a warning.
REQ-ENG-006 moves to partial (eslint --fix still missing); the docs no
longer claim bun run lint runs Prettier.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GA968hkqa7CsMeYAhzV4Dz
Prettier should fail lint on this commit, and format.yml should push a fix
that restores the original line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GA968hkqa7CsMeYAhzV4Dz
@nsheaps nsheaps added the request-review Force an AI code review on a draft PR (open non-draft PRs review automatically) label Oct 8, 2026 — with Claude
@nsheaps nsheaps self-assigned this Oct 8, 2026
@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Release Version Check

🟢 PATCH version bump

Version
Current 0.7.42
Next 0.7.43

This version will be released automatically when this PR is merged to main.

Changelog preview

0.7.43 (2026-10-08)

Tests

  • deliberately misformat pr-title.ts to exercise the format autofix (cfef16b)

CI/CD

  • add format check and pr autofix (44d4af6)
  • commit untracked files in format autofix; clarify contributing note (c68427a)

Styles

  • apply prettier formatting (17aabf1)

@automation-nsheaps automation-nsheaps Bot removed the request-review Force an AI code review on a draft PR (open non-draft PRs review automatically) label Oct 8, 2026
github-actions Bot added a commit that referenced this pull request Oct 8, 2026
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Preview Deployment

The web app for this PR has been deployed:

Open Preview

Use this to verify the app works correctly, especially for dependency updates.

github-actions Bot added a commit that referenced this pull request Oct 8, 2026

nsheaps commented Oct 8, 2026

Copy link
Copy Markdown
Owner Author

Autofix acceptance check: passed.

  1. cfef16b deliberately misformatted scripts/ci/pr-title.ts.
  2. The Format workflow then pushed 17aabf1 (style: apply prettier formatting, authored by automation-nsheaps[bot]) as a new commit. 17aabf1 restores the file, so the PR has no net change to pr-title.ts.
  3. CI is now running on 17aabf1.

deploy-preview failed on cfef16b, but not because of this PR. Its git push to gh-pages was rejected because the remote had moved on. 44d4af6 and cfef16b were pushed about a minute apart, and preview-deploy.yml has no concurrency group, so the two preview runs raced on gh-pages. That commit is now superseded, so I'm not re-running it; the preview runs again on 17aabf1. Autofix commits will make back-to-back pushes more common. Serialising gh-pages writers with a shared concurrency group belongs in a separate CI PR, not this one.


Generated by Claude Code

henry-nsheaps[bot]

This comment was marked as outdated.

Addresses review: the autofix guard now also checks untracked files and
stages everything before committing, and the CONTRIBUTING.md formatting
bullet is split into sentences.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GA968hkqa7CsMeYAhzV4Dz
@nsheaps nsheaps added the request-review Force an AI code review on a draft PR (open non-draft PRs review automatically) label Oct 8, 2026 — with Claude
@automation-nsheaps automation-nsheaps Bot removed the request-review Force an AI code review on a draft PR (open non-draft PRs review automatically) label Oct 8, 2026
github-actions Bot added a commit that referenced this pull request Oct 8, 2026
henry-nsheaps[bot]

This comment was marked as outdated.

@nsheaps
nsheaps marked this pull request as ready for review October 8, 2026 06:36
@nsheaps
nsheaps merged commit 11dc06b into main Oct 8, 2026
19 of 20 checks passed
@nsheaps
nsheaps deleted the claude/bold-volta-qfy4mg branch October 8, 2026 06:36
github-actions Bot added a commit that referenced this pull request Oct 8, 2026

@henry-nsheaps henry-nsheaps Bot 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.

### ✅ Post-merge re-review — no new content since prior APPROVE

Quality Security Simplicity Confidence

  • ✅ PR is already merged (merge commit 11dc06b) at head SHA c68427a.
  • ✅ My prior APPROVED review (PRR_kwDORdvHSc8AAAABRP8tnQ) was against this exact SHA; the diff hasn't changed since.
  • ✅ All four previous inline threads are resolved (3× P2 addressed by author, 1 info note confirmed).
  • ✅ No new findings in a fresh pass over format.yml, commit-format-fixes.sh, .mise.toml, and the REQ-ENG-006 doc edits.

Click to expand for full details

Why this is a comment, not an approve

A fresh APPROVE on a merged PR adds noise; my previous APPROVE already stands against the merged SHA. Posting as COMMENT here just records that this re-review run found nothing new.

How I re-checked

  • gh pr view 368 confirmed state: MERGED, headRefOid: c68427a…, mergeCommit.oid: 11dc06b….
  • gh pr diff 368 matched the diff I reviewed previously — zero new commits since c68427a1.
  • Verified all four review threads (PRRT_kwDORdvHSc6qOsmn, …sw6, …s8H, …tK8) are already isResolved: true.
  • Minimized my two prior review bodies as OUTDATED so the thread view stays clean. The APPROVE verdict for c68427a remains in the review history.

Nothing re-opened

  • .github/workflows/format.yml: still pull_request (not _target), App token gated by head.repo.full_name == github.repository, SHA-pinned checkout-as-app.
  • scripts/ci/commit-format-fixes.sh: untracked-files guard + git add --all from c68427a present.
  • Docs: REQ-ENG-006 is partial / documented / current with eslint --fix called out as the remaining gap; CLAUDE.md and CONTRIBUTING.md no longer claim bun run lint runs Prettier; Open Question 2 is marked decided.

Follow-ups: none for this PR.

  • (Tracked separately, not for this PR.) eslint --fix wiring once REQ-ENG-007 extends ESLint coverage — already captured in REQ-ENG-006 "Gap".

References

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