Skip to content

test: judge the capsule's own .gitignore alone, not the enclosing repository's - #3

Merged
gaffercode merged 3 commits into
mainfrom
fix/capsule-local-ignore-tests-2026-11-21
Nov 21, 2026
Merged

gaffercode merged 3 commits into
mainfrom
fix/capsule-local-ignore-tests-2026-11-21

Conversation

@gaffercode

@gaffercode gaffercode commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

What changed

Test-only. app/env-contract.test.mjs now judges the capsule's own .gitignore alone, in an empty temporary repository, instead of asking Git in place.

Why

Asked in place, Git also applies the rules of any repository that encloses this folder. Inside a larger repository, a gap in the capsule's own .gitignore could therefore pass unnoticed, and the proof leaned on something outside the capsule. A capsule must stand on its own.

Verification

Scenario Before After
Capsule nested in a bigger repository, SQLite rules removed from the capsule passed (wrong) fails and names data.sqlite, local.sqlite3
Nested, capsule rules intact passed passes
Tree without .git 4 of 4 4 of 4

Suite 63/63, lint 0, typecheck 0. No runtime file changed, so build and deploy:dry-run were not re-run locally.

Follow-up commits (wording only)

  • 035638c — AGENTS.md and docs/neural-journey.md said the tests live only under components/. The test script has run app/**/*.test.mjs too since the initial import; both now say so. Handoff and verification notes updated.
  • 9dd8012 — the same correction in a comment in .github/workflows/ci.yml. No step changed.

Re-run locally after these commits: lint exit 0, test 63/63.

https://claude.ai/code/session_012ta9C9QGH3qLAAqc7fEucC


Generated by Claude Code

…ository's

The two ignore-rule tests asked Git in place. Inside a larger repository Git
also applies that repository's rules, so a gap in the capsule's own .gitignore
could pass unnoticed, and the proof depended on something outside the capsule.

The tests now copy the capsule's .gitignore into an empty temporary repository
and judge it there, with global excludes off and GIT_* variables dropped. They
no longer need a Git checkout, so they also run in an exported tree.

Reproduced first: nested in a bigger repository with the SQLite rules removed
from the capsule, the old test passed; the new one fails and names the paths.
Verified: suite 63/63, lint 0, typecheck 0.

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 10:33am UTC

Request Review

AGENTS.md and docs/neural-journey.md said the tests live only under
components/. The test script has run app/**/*.test.mjs too since the
initial import. Wording only; no runtime file changes.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ta9C9QGH3qLAAqc7fEucC
Comment only: the step runs every *.test.mjs under components/ and app/.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ta9C9QGH3qLAAqc7fEucC
@gaffercode
gaffercode merged commit e8ca1ac into main Nov 21, 2026
5 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.

2 participants