Skip to content

ci: make PR check failures self-explanatory and document CI gates - #994

Merged
Yeom-JinHo merged 2 commits into
magicuidesign:mainfrom
Yeom-JinHo:ci/contributor-self-service
Jul 31, 2026
Merged

ci: make PR check failures self-explanatory and document CI gates#994
Yeom-JinHo merged 2 commits into
magicuidesign:mainfrom
Yeom-JinHo:ci/contributor-self-service

Conversation

@Yeom-JinHo

@Yeom-JinHo Yeom-JinHo commented Jul 31, 2026

Copy link
Copy Markdown
Member

Description

Makes CI failures self-explanatory for contributors and documents the CI gates in CONTRIBUTING. The only CI/artifact behavior change is one line: the registry-drift job (and the root build:registry script it calls) now runs the regeneration-only, www-scoped command — the same one the lefthook pre-commit hook already uses (follow-up to #988). Generated artifacts are byte-identical: regenerating with the simplified command leaves git status clean across all six checked paths.

One side effect for local workflows: the root build:registry no longer runs an incidental repo-wide eslint --fix. That auto-fixing is still covered by lefthook's pre-commit hook (staged files), and CONTRIBUTING now documents pnpm lint:fix explicitly.

Changes

  • code-check.yml: the lint / format / registry-deps / registry-drift gates now print the exact fix command (pnpm lint:fix, pnpm format:fix, pnpm registry-deps:fix && pnpm build:registry, pnpm build:registry) as ::error:: annotations on failure — same pattern the drift job already used
  • package.json: build:registry no longer chains repo-wide lint:fix + format:fix (no-op for artifacts; unrelated lint errors could previously fail artifact generation and mask the real drift result); removed the now-unused format:fix:silent; exposed registry-deps:fix at the root
  • sync-example-registry-dependencies.mts: check failure now tells you to run registry-deps:fix && build:registry and to commit registry-examples.ts (which the fix rewrites) along with the regenerated artifacts
  • CONTRIBUTING.md: new "Before Opening a Pull Request" section (pnpm check, production build, committing generated artifacts, Conventional Commits), Node 22 / pnpm 9 prerequisites, and a note that generated artifacts must be committed
  • PULL_REQUEST_TEMPLATE.md: 4-item pre-flight checklist
  • lefthook.yml: comment updated to reflect the simplified root script (command unchanged)

Motivation

Two CI gates were effectively dead ends for external contributors: registry-deps:check failed without mentioning that a fix command exists, and commitlint rejected first commits while Conventional Commits wasn't documented anywhere. Separately, an unrelated lint error could turn the drift job red with no lint output in its log, sending contributors down the wrong path. Every avoided round trip is a full push → wait → search → fix cycle saved, for every contributor.

Breaking Changes

None. Job and step names are unchanged (required status checks unaffected). pnpm build:registry produces byte-identical artifacts.

Screenshots

N/A (no UI changes)

Checklist

  • pnpm check passes locally
  • pnpm build passes locally
  • pnpm build:registry was run and the generated files are committed (CI verifies this on every PR)
  • PR title follows Conventional Commits

🤖 Generated with Claude Code

https://claude.ai/code/session_011wJuxcamc1gSFVu9AcKkGp

- Align the registry-drift job with the lefthook pre-commit hook:
  simplify the root build:registry to the www-scoped regeneration-only
  command, so unrelated lint errors can no longer fail artifact
  generation or mask the drift result (follow-up to magicuidesign#988; generated
  artifacts are byte-identical, verified with a clean git status after
  regeneration)
- Print the fix command when the lint, format, registry-deps, and
  registry-drift gates fail, surfaced as ::error:: annotations
- Expose registry-deps:fix from the root package.json and point out
  that it edits registry-examples.ts, which requires re-running
  build:registry
- Document the CI gates in CONTRIBUTING (pnpm check, production build,
  committing generated registry artifacts, Conventional Commits) plus
  Node/pnpm prerequisites
- Add a pre-flight checklist to the PR template

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011wJuxcamc1gSFVu9AcKkGp
@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

@Yeom-JinHo is attempting to deploy a commit to the product-studio Team on Vercel.

A member of the Team first needs to authorize it.

- registry-deps failure guidance now names registry-examples.ts, which
  registry-deps:fix edits as a source file, not a generated artifact
- Soften "the four fastest CI gates" to "four of the six CI gates"
  (job timings overlap between runs)
- Scope the git-hooks NOTE: artifact regeneration only triggers for
  staged files under registry/, so a config/site.ts-only change needs a
  manual pnpm build:registry
- PR checklist: add a production-build item and make the
  build:registry item conditional
- Unify the drift/registry-deps annotation wording

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011wJuxcamc1gSFVu9AcKkGp
@Yeom-JinHo
Yeom-JinHo merged commit 0bd8b9f into magicuidesign:main Jul 31, 2026
6 of 7 checks passed
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