Fix nested Impeccable gitignore patterns

Prepared with AI assistance by OpenAI Codex.
This commit is contained in:
Paul Bakaus
2026-09-21 13:42:11 -07:00
parent 83c2c73577
commit 107de24e64
2 changed files with 29 additions and 21 deletions
+19 -20
View File
@@ -358,31 +358,30 @@ As you run commands, Impeccable writes working files under `.impeccable/`: criti
```gitignore
# impeccable-ignore-start
# Ephemeral output, runtime state, and per-dev overrides.
# Unanchored: .impeccable may sit at the repo root or under a nested
# workspace (apps/web/.impeccable/...); anchored patterns would miss it.
# The **/ prefix covers .impeccable at the repo root or in a nested workspace.
# Shared artifacts stay tracked: config.json, live/config.json,
# design.json, surfaces/*.md, critique/*.md.
.impeccable/config.local.json
.impeccable/hook.cache.json
.impeccable/hook.pending.json
.impeccable/*.png
.impeccable/review/
.impeccable/questions/
.impeccable/live/server.json
.impeccable/live/sessions/
.impeccable/live/previews/
.impeccable/live/annotations/
.impeccable/live/cache/
.impeccable/live/manual-edit-apply-transaction.json
.impeccable/live/manual-edit-events.jsonl
.impeccable/live/manual-edit-evidence/
.impeccable/live/pending-manual-edits.json
.impeccable/live/deferred-svelte-component-accepts.json
.impeccable/live/*.png
**/.impeccable/config.local.json
**/.impeccable/hook.cache.json
**/.impeccable/hook.pending.json
**/.impeccable/*.png
**/.impeccable/review/
**/.impeccable/questions/
**/.impeccable/live/server.json
**/.impeccable/live/sessions/
**/.impeccable/live/previews/
**/.impeccable/live/annotations/
**/.impeccable/live/cache/
**/.impeccable/live/manual-edit-apply-transaction.json
**/.impeccable/live/manual-edit-events.jsonl
**/.impeccable/live/manual-edit-evidence/
**/.impeccable/live/pending-manual-edits.json
**/.impeccable/live/deferred-svelte-component-accepts.json
**/.impeccable/live/*.png
# impeccable-ignore-end
```
The block is wrapped in `# impeccable-ignore-start` / `# impeccable-ignore-end` markers so you can recognize and refresh it later. Patterns are unanchored on purpose: in a monorepo the active project (and its `.impeccable/` directory) often lives under a nested workspace path like `apps/web/`, and a root-anchored pattern would miss it.
The block is wrapped in `# impeccable-ignore-start` / `# impeccable-ignore-end` markers so you can recognize and refresh it later. The `**/` prefix makes each pattern match whether the active project's `.impeccable/` directory is at the repository root or under a nested workspace path like `apps/web/`.
**Keep these tracked** (they are shared project artifacts, do not add them to `.gitignore`):
+10 -1
View File
@@ -30,11 +30,20 @@ describe('README gitignore block', () => {
'check-ignore',
'.impeccable/review/desktop.png',
'.impeccable/questions/fb63f8a6.log',
'apps/web/.impeccable/review/desktop.png',
'apps/web/.impeccable/questions/fb63f8a6.log',
], { cwd: tmp, encoding: 'utf-8' });
assert.match(ignored, /\.impeccable\/review\/desktop\.png/);
assert.match(ignored, /\.impeccable\/questions\/fb63f8a6\.log/);
assert.match(ignored, /apps\/web\/\.impeccable\/review\/desktop\.png/);
assert.match(ignored, /apps\/web\/\.impeccable\/questions\/fb63f8a6\.log/);
for (const rel of ['.impeccable/config.json', '.impeccable/critique/report.md']) {
for (const rel of [
'.impeccable/config.json',
'.impeccable/critique/report.md',
'apps/web/.impeccable/config.json',
'apps/web/.impeccable/critique/report.md',
]) {
const result = spawnSync('git', ['check-ignore', rel], { cwd: tmp });
assert.notEqual(result.status, 0, `${rel} should not be ignored`);
}