Skip to content

chore(repo): close the remaining engineering-practices gaps - #7

Merged
masaok merged 3 commits into
mainfrom
chore/engineering-practices
Oct 4, 2026
Merged

masaok merged 3 commits into
mainfrom
chore/engineering-practices

Conversation

@masaok

@masaok masaok commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Why

Husky with the pre-commit and pre-push hooks landed in #5. This is the rest of an audit of the repo against the engineering practices guide. Most of the guide was already in place; these are the gaps.

Scope

  • One Node major: engines goes from >=22 to 22.x, matching .nvmrc and @types/node.
  • Entry-point smoke test: the migrations CI job now runs pnpm seed (SEED_DAYS=1) against its Postgres, so a script that dies on import fails in CI.
  • Guide matches the code: the env error in apps/web/src/lib/env.ts no longer cites docs/SELF_HOSTING.md, which does not exist yet.
  • Human process: new CONTRIBUTING.md (setup, what each hook runs, pull requests), linked from the README.
  • docs/guardrails.md: rows for the above, a "Waiting on a person" section, and a "Not adopted" table with the reason for each declined practice and what would change it.

Not in this change: branch protection on main is still unset. It is a repository setting. Require lint, docs, typecheck, test, build and migrations, then prove it with one deliberately failing pull request.

Verification

pnpm verify on this branch, exit 0:

Checked 99 files in 29ms. No fixes applied.
# pass 2
# fail 0
check-docs: 13 files, 0 problems
check-feature-map: 13 routes, 0 missing
typecheck  Tasks: 7 successful, 7 total
@copper/tracker:test  Tests  6 passed (6)
@copper/core:test     Tests  21 passed (21)
@copper/web:test      Tests  6 passed (6)
@copper/ingest:test   Tests  25 passed (25)
@copper/db:test       Tests  15 passed (15)
build  Tasks: 3 successful, 3 total
Route (app)
┌ ƒ /
├ ○ /_not-found
├ ƒ /api/auth/[...all]
├ ƒ /api/health
├ ƒ /c.js
├ ƒ /dashboard
├ ƒ /new
└ ƒ /p/[siteKey]/settings

The seed step was run locally before the rebase onto main, against a throwaway PGlite database: Seeded 5 projects and 73 new flush units over 1 days. It has not been re-run since; the migrations job on this pull request is its first run against real Postgres.

Both hooks ran for this change: pre-commit formatted the staged files, and pre-push ran pnpm check and pnpm build before the push left.

https://claude.ai/code/session_01SgUkaSu7ND42hgs4GvmnoQ

- Pin engines to Node 22.x so it matches .nvmrc and @types/node
- Run the seed script in the migrations CI job as an entry-point smoke test
- Stop the env error citing docs/SELF_HOSTING.md, which does not exist yet
- Add CONTRIBUTING.md for the human process and link it from the README
- Record new guardrails, the pending branch protection and the practices not adopted
Copilot AI balanced review requested due to automatic review settings October 4, 2026 08:09
@vercel

vercel Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
copper-analytics Ready Ready Preview Oct 4, 2026 8:20am UTC

Request Review

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.

@masaok
masaok merged commit 63f67da into main Oct 4, 2026
8 checks passed
@masaok
masaok deleted the chore/engineering-practices branch October 4, 2026 17:35

This branch was successfully deployed

1 active deployment
Preview — e74a1902 Deployed Oct 4, 2026 by vercel[bot]
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