Skip to content

ci: add PR verification workflow, patch prod deps, fix build without Clerk creds#153

Merged
aicoder2009 merged 3 commits into
mainfrom
claude/happy-dijkstra-o04h9l
Jun 8, 2026
Merged

ci: add PR verification workflow, patch prod deps, fix build without Clerk creds#153
aicoder2009 merged 3 commits into
mainfrom
claude/happy-dijkstra-o04h9l

Conversation

@aicoder2009

@aicoder2009 aicoder2009 commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Summary

Tier 1 hardening: restores an automated PR gate, patches production dependency advisories, and fixes the build so it succeeds without Clerk credentials.

1. PR-time CI gate

Previously the only workflow was release.yml (tag-triggered); nothing ran lint/test/typecheck/build on PRs, so nothing enforced that the 652 tests pass.

  • New .github/workflows/ci.yml: runs lint → typecheck → test:run → build on every PR and push to main.
  • Added a typecheck script (tsc --noEmit).

2. Dependency security (npm audit fix, non-breaking)

Patched the criticals/highs in the production runtime tree (lockfile only, no range changes):

  • @clerk/nextjs 6.36 → 6.39.5 (critical)
  • next 16.0 → 16.2.7 (high)
  • fast-xml-parser5.7.3 (critical)

Total advisories 38 → 16; the remainder are dev/build-only chains (vitest UI, electron-builder) requiring major bumps, plus a transitive postcss advisory bundled inside next with no fix available.

3. Build fix

release.yml injected pk_test_placeholder (invalid format), which overrode the build script's valid fallback key and broke static prerender of /_not-found.

  • Removed the bogus placeholder keys from release.yml.
  • ClerkProvider now falls back to a valid-format demo key when NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY is unset, so next build succeeds in CI/local builds. Production is unaffected (real key always supplied via env).

4. Docs

Corrected the stale "225 tests" → 652 in CLAUDE.md and README.md.

Verification

  • lint — 0 errors
  • typecheck — clean
  • test:run — 652 passed
  • build — passes with no Clerk env (fallback works)

https://claude.ai/code/session_019tCTyU5MpR5qdcnjV8UHfu


Generated by Claude Code

Summary by CodeRabbit

Release Notes

  • Documentation

    • Updated test count documentation from 225 to 652 tests.
  • Chores

    • Added continuous integration workflow with automated linting, type checking, testing, and building.
    • Simplified release workflow configuration.
    • Added TypeScript type-checking script to the build process.

claude added 3 commits June 8, 2026 20:57
Adds a CI workflow that runs lint, typecheck, tests, and build on every
pull request and push to main, restoring an automated gate (previously
only CodeRabbit reviewed PRs; nothing enforced that the 652 tests pass).

- new .github/workflows/ci.yml (lint + typecheck + test:run + build)
- add `typecheck` script (tsc --noEmit)
- ClerkProvider now falls back to a valid-format demo publishable key
  when NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY is unset, so `next build`
  succeeds during static prerender of /_not-found in CI/local builds
- drop the invalid pk_test_placeholder/sk_test_placeholder from
  release.yml, which overrode the build script's valid fallback and
  broke the release build

https://claude.ai/code/session_019tCTyU5MpR5qdcnjV8UHfu
Resolves the critical/high advisories in the production runtime tree
without dependency-range changes (lockfile only):
- @clerk/nextjs 6.36 -> 6.39.5 (critical)
- next 16.0 -> 16.2.7 (high)
- fast-xml-parser -> 5.7.3 (critical)

Brings total advisories 38 -> 16; the remainder are dev/build-only
chains (vitest UI, electron-builder) requiring major bumps, plus a
transitive postcss advisory bundled inside next with no fix available.
Tests (652), typecheck, and build all pass on the updated lockfile.

https://claude.ai/code/session_019tCTyU5MpR5qdcnjV8UHfu
CLAUDE.md and README.md both claimed 225 tests; the suite now has 652.

https://claude.ai/code/session_019tCTyU5MpR5qdcnjV8UHfu
Copilot AI review requested due to automatic review settings June 8, 2026 21:03
@vercel

vercel Bot commented Jun 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
opencitation Ready Ready Preview, Comment Jun 8, 2026 9:03pm

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 was unable to review this pull request because the user who requested the review has reached their quota limit.

@aicoder2009 aicoder2009 merged commit 26467f9 into main Jun 8, 2026
5 of 6 checks passed
@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 66d9c5ef-a01d-4fac-a369-b4dc96fa37cf

📥 Commits

Reviewing files that changed from the base of the PR and between b872925 and a8badb1.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (6)
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • CLAUDE.md
  • README.md
  • package.json
  • src/app/layout.tsx

📝 Walkthrough

Walkthrough

This PR establishes CI/CD infrastructure with automated type checking and testing, configures Clerk authentication to work without environment credentials via a fallback key, streamlines the release workflow, and updates documentation test counts from 225 to 652.

Changes

CI/CD and Build Infrastructure Setup

Layer / File(s) Summary
TypeScript type checking and CI workflow
package.json, .github/workflows/ci.yml
New typecheck npm script runs TypeScript without emitting output. New GitHub Actions verify job runs on pull requests and main branch pushes, executing lint, typecheck, test:run, and build commands sequentially with Node 20 and npm cache.
Clerk configuration and release workflow cleanup
src/app/layout.tsx, .github/workflows/release.yml
RootLayout introduces a publishableKey constant that reads NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY or falls back to a demo test key, ensuring builds succeed without external Clerk credentials. Release workflow removes the now-unused Clerk placeholder environment variables from the build-electron job.
Documentation test count updates
README.md, CLAUDE.md
Test count documentation updated from 225 to 652 in Tech Stack sections and command descriptions across both files.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A CI job takes flight,
Type-checking guards the night,
Clerk's key falls back with grace,
Tests now number six-five-two at pace,
Build success without a secret trace! ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/happy-dijkstra-o04h9l

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment thread .github/workflows/ci.yml
Comment on lines +15 to +29
name: Lint, typecheck, test, build
runs-on: ubuntu-latest
env:
NEXT_TELEMETRY_DISABLED: '1'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
- run: npm ci
- run: npm run lint
- run: npm run typecheck
- run: npm run test:run
- run: npm run build
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.

4 participants