Skip to content

chore: untrack results/session-*.json (repo bloat)#2

Draft
cloudygeek wants to merge 1 commit into
mainfrom
chore/untrack-session-dumps
Draft

chore: untrack results/session-*.json (repo bloat)#2
cloudygeek wants to merge 1 commit into
mainfrom
chore/untrack-session-dumps

Conversation

@cloudygeek

Copy link
Copy Markdown
Owner

Summary

Before: 1,450 tracked results/session-*.json files; results/ folder ~2.5 GB on disk.
After: 0 tracked results/session-*.json files; all 43 results/adversarial-judge-*.json research files remain tracked and untouched.

What this does

  • Runs git rm --cached results/session-*.jsonuntracks only, files stay on disk.
  • Adds results/session-*.json to .gitignore so future dumps are never accidentally committed.
  • Future git clones will get a clean working tree (no session dumps); the local dashboard fallback (results/*.json) continues to work on machines that already have the files.

What this does NOT do

  • Does not delete any files from disk.
  • Does not rewrite git history — the ~2.5 GB remains in past commits (see Option 2 below if history compaction is ever needed).
  • Does not touch results/adversarial-judge-*.json (43 files, deliberate research data).

Options for Adrian

Option 1 — This PR (safe, reversible)

Merge this draft when ready. Untracks the 1,450 session dumps, stops future commits from re-adding them. Does not shrink the git history or clone size — the blobs remain reachable from past commits.

Option 2 — History rewrite (DO NOT execute without coordination)

Use git filter-repo or BFG Repo Cleaner to purge the session-dump blobs from all past commits. This would reclaim the ~2.5 GB from clone size and git log history. Destructive: rewrites all SHAs, requires a coordinated force-push, and every collaborator must re-clone or rebase. Only worth it if clone / CI checkout time is a real pain point. Steps on request.


Scheduled maintenance — no functional code changes.


Generated by Claude Code

Removes 1,450 per-session state dumps from git tracking.
Files stay on disk so the local dashboard fallback continues to work;
future clones will not include them (working-tree-clean after clone).

Before: 1,450 tracked session-*.json files, results/ ~2.5 GB on disk.
After:  0 tracked session-*.json files; adversarial-judge-*.json (43)
        and all other results/ files remain tracked.

Session state is Dynamo-backed in production — these files are
local-dev / legacy fallback artefacts with no production value.
The .gitignore rule results/session-*.json is also added here
(it was planned for 2026-05-25 but was missing from the index).

This commit only untracks files; it does NOT rewrite history.
The ~2.5 GB remains in past commits. See Option 2 in the PR description
if history compaction is ever needed.

https://claude.ai/code/session_01Nt16Y181p8uwiWXfc5Q4Mi
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.

2 participants