Skip to content

Unanchored 'models/' in .gitignore silently ignores src/models additions #20

@bradsmithmba

Description

@bradsmithmba

Summary

.gitignore line 168 has an unanchored rule:

models/

An unanchored directory pattern matches a directory of that name at every level, so it matches src/models/ as well as the intended root-level models/ artifact directory. Any module added under src/models/ is silently ignored by git and never committed.

This is the same class of bug as the data/ rule fixed in #1 (PR anchors it to /data/). The older src/models/ files (regime_detector.py, scoring_engine.py, etc.) predate the rule and remained tracked, which masks the problem.

Impact

  • New modules placed under src/models/ will not be picked up by git add and will appear "missing" to anyone who clones the repo.
  • This is the mechanism that would re-hide src/models/integrated_selector.py (see separate issue) if it were created.

Reproduction

$ git check-ignore -v src/models/integrated_selector.py
.gitignore:168:models/	src/models/integrated_selector.py

Fix

Anchor the rule to the repository root:

/models/

This still ignores the root-level models/ artifact directory but no longer matches src/models/. The same review should be applied to the other unanchored project-specific rules (logs/, checkpoints/) for the same reason.

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