Skip to content

scan-all pollutes characterization fixtures (tests/fixtures/char_graphbuffer) with README_AI #135

Description

@dreamlx

Problem

codeindex scan-all at the repo root uses the root .codeindex.yaml, whose
include: lists tests/. That makes scan-all walk test fixtures
including tests/fixtures/char_graphbuffer/, the #101 characterization fixture
that must stay byte-identical — and generate README_AI.md inside them.

Those generated files are not gitignored (README_AI isn't in .gitignore),
so a careless git add -A commits them. That drifted the #101 baseline goldens
and broke test_structural_readmes /
test_enrich_prompts_and_frozen_ai_readmes on CI in PR #134.

Why cb803b8 didn't prevent it

cb803b8 force-added tests/fixtures/char_graphbuffer/project/.codeindex.yaml
so the characterization test's own scan (copytree + stub ai_command) behaves
identically locally and in CI. But that config only governs the project/
subtree when the test runs it — it does not stop the repo-root scan-all
from indexing char_graphbuffer/ from the outside.

Repro

```bash
codeindex scan-all
git status --short | grep char_graphbuffer # README_AI.md generated at 4 levels
```

Fix options (need a decision)

  1. Exclude characterization fixtures from the root scan — but the root
    .codeindex.yaml is gitignored (per cb803b8), so a local exclude won't
    reach CI. Would need a tracked exclude mechanism.
  2. gitignore README_AI under fixture dirs — e.g. add
    tests/fixtures/**/README_AI.md to .gitignore so generated fixture READMEs
    can never be committed. Lowest-risk; the fixtures' own READMEs (where they
    exist as legit test assets) would need ! un-ignore exceptions.
  3. Mark the fixture as scan-all-immune via a sentinel (empty .noindex or
    similar) that scan-all respects.

Current workaround (applied in #134): manually delete the polluted READMEs
before committing. Not durable — the next scan-all + git add -A re-breaks.

Priority

Low-maintenance landmine: only fires when someone runs scan-all and commits
the result. But it silently breaks CI with a confusing characterization-drift
failure, so worth a real fix.

Discovered while dogfooding codeindex + loomgraph (#132/#133 PR).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions