Skip to content

Harden .gitignore for runtime data#97

Open
chansg wants to merge 1 commit into
mainfrom
chore/gitignore-hardening
Open

Harden .gitignore for runtime data#97
chansg wants to merge 1 commit into
mainfrom
chore/gitignore-hardening

Conversation

@chansg

@chansg chansg commented Jul 2, 2026

Copy link
Copy Markdown
Owner

What

Close the runtime-data leak permanently with a single blanket ignore rule, and untrack the runtime files still tracked in the index — without deleting any local data.

Why

Runtime files leaked into commits three times (data/broker/, data/trading/, data/notifications.jsonl) because data/ was only partially ignored, and data/personality.json showed as modified every session (Aria rewrites it at runtime).

Changes

  • .gitignore: replaced the scattered per-path rules with one blanket rule — ignore everything under data/, except a .gitkeep placeholder.
  • data/.gitkeep: placeholder so the folder survives a fresh clone.
  • Untracked (index only, --cached — still on disk): data/personality.json (runtime mood/interaction state) and the stale data/market/.gitkeep.

Safety

  • No files deleted from disk — every removal used git rm --cached. Confirmed data/personality.json and all runtime files still physically present.
  • Secrets remain ignored: git check-ignore config.py .env returns both.

Leak test

Recreated the exact failure scenario (create a fake notifications.jsonl, then git add -A). Result: nothing staged — the runtime file is silently ignored. Leak closed.

🤖 Generated with Claude Code

Runtime data leaked into commits three times (data/broker, data/trading,
data/notifications.jsonl) because data/ was only partially ignored. Replace the
scattered rules with one blanket rule and untrack the runtime files still in the
index. Files are removed from the git index only (--cached); they remain on disk.

- .gitignore: data/* + !data/.gitkeep (covers all current and future runtime files)
- data/.gitkeep: placeholder so the folder survives a fresh clone
- Untracked: data/personality.json (runtime mood/interaction state) and the stale
  data/market/.gitkeep — both kept on disk.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant