Compare commits

...
Author SHA1 Message Date
Paul Bakaus ca40a4900f Test gitignore paths independently
Prepared with AI assistance by OpenAI Codex.
2026-09-21 13:49:57 -07:00
Paul Bakaus 107de24e64 Fix nested Impeccable gitignore patterns
Prepared with AI assistance by OpenAI Codex.
2026-09-21 13:42:11 -07:00
2 changed files with 35 additions and 26 deletions
+19 -20
View File
@@ -358,31 +358,30 @@ As you run commands, Impeccable writes working files under `.impeccable/`: criti
```gitignore ```gitignore
# impeccable-ignore-start # impeccable-ignore-start
# Ephemeral output, runtime state, and per-dev overrides. # Ephemeral output, runtime state, and per-dev overrides.
# Unanchored: .impeccable may sit at the repo root or under a nested # The **/ prefix covers .impeccable at the repo root or in a nested workspace.
# workspace (apps/web/.impeccable/...); anchored patterns would miss it.
# Shared artifacts stay tracked: config.json, live/config.json, # Shared artifacts stay tracked: config.json, live/config.json,
# design.json, surfaces/*.md, critique/*.md. # design.json, surfaces/*.md, critique/*.md.
.impeccable/config.local.json **/.impeccable/config.local.json
.impeccable/hook.cache.json **/.impeccable/hook.cache.json
.impeccable/hook.pending.json **/.impeccable/hook.pending.json
.impeccable/*.png **/.impeccable/*.png
.impeccable/review/ **/.impeccable/review/
.impeccable/questions/ **/.impeccable/questions/
.impeccable/live/server.json **/.impeccable/live/server.json
.impeccable/live/sessions/ **/.impeccable/live/sessions/
.impeccable/live/previews/ **/.impeccable/live/previews/
.impeccable/live/annotations/ **/.impeccable/live/annotations/
.impeccable/live/cache/ **/.impeccable/live/cache/
.impeccable/live/manual-edit-apply-transaction.json **/.impeccable/live/manual-edit-apply-transaction.json
.impeccable/live/manual-edit-events.jsonl **/.impeccable/live/manual-edit-events.jsonl
.impeccable/live/manual-edit-evidence/ **/.impeccable/live/manual-edit-evidence/
.impeccable/live/pending-manual-edits.json **/.impeccable/live/pending-manual-edits.json
.impeccable/live/deferred-svelte-component-accepts.json **/.impeccable/live/deferred-svelte-component-accepts.json
.impeccable/live/*.png **/.impeccable/live/*.png
# impeccable-ignore-end # 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`): **Keep these tracked** (they are shared project artifacts, do not add them to `.gitignore`):
+16 -6
View File
@@ -26,15 +26,25 @@ describe('README gitignore block', () => {
writeFileSync(join(tmp, '.gitignore'), block); writeFileSync(join(tmp, '.gitignore'), block);
execFileSync('git', ['init'], { cwd: tmp }); execFileSync('git', ['init'], { cwd: tmp });
const ignored = execFileSync('git', [ for (const rel of [
'check-ignore',
'.impeccable/review/desktop.png', '.impeccable/review/desktop.png',
'.impeccable/questions/fb63f8a6.log', '.impeccable/questions/fb63f8a6.log',
], { cwd: tmp, encoding: 'utf-8' }); 'apps/web/.impeccable/review/desktop.png',
assert.match(ignored, /\.impeccable\/review\/desktop\.png/); 'apps/web/.impeccable/questions/fb63f8a6.log',
assert.match(ignored, /\.impeccable\/questions\/fb63f8a6\.log/); ]) {
const ignored = execFileSync('git', ['check-ignore', rel], {
cwd: tmp,
encoding: 'utf-8',
});
assert.equal(ignored.trim(), rel, `${rel} should be ignored independently`);
}
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 }); const result = spawnSync('git', ['check-ignore', rel], { cwd: tmp });
assert.notEqual(result.status, 0, `${rel} should not be ignored`); assert.notEqual(result.status, 0, `${rel} should not be ignored`);
} }