Skip to content

chore: add .env.example and ignore rules for env, data and key files - #2

Merged
gaffercode merged 1 commit into
mainfrom
chore/env-contract-and-ignore-rules-2026-11-21
Nov 21, 2026
Merged

gaffercode merged 1 commit into
mainfrom
chore/env-contract-and-ignore-rules-2026-11-21

Conversation

@gaffercode

Copy link
Copy Markdown
Owner

What changed

  • .env.example (new): the four variables the site reads, with empty values.
  • .gitignore: every env file except the example, local databases, dumps, backups and key files are now ignored. Before, only .env*.local was covered, so a plain .env could be committed by accident.
  • app/env-contract.test.mjs (new, 4 tests): fails when the site reads a variable that is missing from .env.example, when a key or token in the example holds a value, or when one of the ignore rules is removed.
  • Docs: README, docs/data.md, docs/development.md and docs/testing.md point to the template; docs/verification.md and .agents/HANDOFF.md record the run.

No application code changed.

Why

Finding SV-03 and SV-04 of the repository data audit (2026-11-21): no environment template, and .env not ignored.

Verification

Check Result
New tests before the change Failed as expected (no template, 13 probe paths not ignored)
test 63/63 (59 existing, 4 new)
install --frozen-lockfile, typecheck, lint, build, deploy:dry-run exit 0
Fresh clone, README steps only Site starts, home page HTTP 200; Vera without a key answers the documented HTTP 500
gitleaks v8.30.1 on the branch 0 findings in history and current files

Not run: test:e2e, live Vera.

Follow-up for the owner

The public tree is published from the monorepo capsule. The same change has to land there, or the next publish drops it.


Generated by Claude Code

The repository had no environment template and its .gitignore only covered
.env*.local, so a plain .env, a database file, a dump or a key file could be
committed by accident.

- .env.example lists the four variables the site reads, with empty values
- .gitignore blocks every env file except the example, local databases,
  dumps, backups and key files
- app/env-contract.test.mjs pins both contracts (4 tests, watched failing first)
- docs point to the template; verification and handoff record the run

Verified: install, typecheck, lint, test 63/63, build, deploy:dry-run exit 0.
Not run: test:e2e, live Vera.

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

vercel Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
sentraverse Ready Ready Preview Nov 21, 2026 7:38am UTC

Request Review

@gaffercode
gaffercode requested a balanced review from Copilot November 21, 2026 07:51
@gaffercode
gaffercode merged commit bc8364e into main Nov 21, 2026
5 checks passed
@gaffercode
gaffercode deleted the chore/env-contract-and-ignore-rules-2026-11-21 branch November 21, 2026 07:51

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.

🟡 Changes recommended

The verification documentation must disclose that the empty SERVER_ONLY list makes the dry-run check report zero findings without actually verifying the server-only boundary.

1 open issue
What changed in this PR

Gaffer, PR ini menambahkan environment template dan memperluas perlindungan Git untuk konfigurasi lokal Sentraverse Neural, menindaklanjuti audit SV-03 dan SV-04 tanpa mengubah kode aplikasi.

Changes:

  • Menambahkan .env.example berisi empat variabel server-only dengan nilai kosong.
  • Memperluas ignore rules untuk file environment, database lokal, dump, backup, dan kredensial.
  • Menambahkan empat contract tests serta memperbarui panduan konfigurasi dan catatan verifikasi.
File Description
README.md Mengarahkan penggunaan template dan memperbarui jumlah tes tercatat.
docs/​verification.md Mencatat hasil verifikasi dan pemeriksaan yang tidak dijalankan.
docs/​testing.md Mendokumentasikan cakupan environment contract tests.
docs/​development.md Menambahkan instruksi konfigurasi dari template.
docs/​data.md Menjelaskan template variabel tanpa nilai.
app/​env-contract.test.mjs Menambahkan tes kelengkapan template, nilai rahasia, dan ignore rules.
.gitignore Memperluas pengecualian file lokal sambil mempertahankan template.
.env.example Menyediakan empat variabel kosong beserta petunjuk konfigurasi.
.agents/​HANDOFF.md Mencatat perubahan, verifikasi, dan tindak lanjut sinkronisasi monorepo.

Review effort: Balanced

Comment thread docs/verification.md
| `lint` | 07:33 | 0 | No findings |
| `test` | 07:33 | 0 | 63/63 (59 existing, 4 new in `app/env-contract.test.mjs`) |
| `build` | 07:33 | 0 | Production build written |
| `deploy:dry-run` | 07:33 | 0 | Artifact present, no server-only names in the client bundle |
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.

3 participants