Skip to content

chore: stop tracking local agent session state - #567

Merged
lidge-jun merged 1 commit into
devfrom
codex/untrack-codexclaw
Jul 27, 2026
Merged

chore: stop tracking local agent session state#567
lidge-jun merged 1 commit into
devfrom
codex/untrack-codexclaw

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Problem

.gitignore has listed .codexclaw/ since the directory existed, but four files
were tracked anyway on dev, main, and preview:

.codexclaw/goalplans/opencodex-4-pabcd-work-phase-wp1-wp2-dev2-go-pr/goalplan.json
.codexclaw/goalplans/opencodex-4-pabcd-work-phase-wp1-wp2-dev2-go-pr/ledger.jsonl
.codexclaw/goalplans/opencodex-live-unfinished-issues-and-prs-triage/goalplan.json
.codexclaw/goalplans/opencodex-live-unfinished-issues-and-prs-triage/ledger.jsonl

These are per-machine agent state — goalplans and append-only ledgers describing
one operator's local work loop. They are not product code, they carry local
worktree paths and session ids, and no reader of this repository can act on them.

Why the ignore rule did not stop it

Two properties of git combine badly here:

  1. git add -f overrides .gitignore with no warning.
  2. Once a path is tracked, the ignore rule stops applying to it entirely — every
    later edit is staged like any normal file.

So a single forced add is permanent until someone explicitly untracks the path.
That is what happened, and the files then rode along into main and preview
through ordinary promotion.

Changes

  • Untrack the four .codexclaw/ files with git rm --cached. Files stay on
    disk
    ; only the index entry goes away.
  • Untrack devlog/.DS_Store and devlog/_plan/.DS_Store, which reached the repo
    the same way (.DS_Store is also already ignored).
  • Add tests/repo-hygiene.test.ts, which asserts against git ls-files rather
    than against .gitignore. A forced add now fails CI on the commit that
    introduces it, instead of being discovered months later.
  • Drop a comment in src/providers/registry.ts citing
    .codexclaw/evidence/260710_wp9_ollama_cloud_model_ids.md — that file was
    never committed, so the reference cannot be resolved by anyone. The adjacent
    verification date is kept.

devlog/ is deliberately left alone: unlike .codexclaw/, it is referenced from
source comments across src/ and is part of how this project records design
evidence.

Verification

  • bun test tests/repo-hygiene.test.ts → 3 pass / 0 fail
  • The hygiene test was confirmed to actually catch violations: on first run it
    failed and reported the two tracked .DS_Store files, which is how they were
    found.
  • bun x tsc --noEmit → pass
  • pre-push bun scripts/test.ts → full suite pass, privacy scan pass

Summary by CodeRabbit

  • Bug Fixes

    • Prevented local agent and session artifacts from being included in the repository.
    • Removed outdated planning and triage records from version control.
  • Tests

    • Added repository hygiene checks for unwanted tracked files and required ignore rules.
  • Maintenance

    • Expanded ignore rules to cover nested agent-state directories.
    • Updated verification notes for available Ollama Cloud models.

The .codexclaw/ goalplans and ledgers are per-machine agent state. They were
committed with 'git add -f' despite the ignore rule, and once tracked the rule
stopped applying, so they rode along into main and preview.

Untrack them (files stay on disk), drop two .DS_Store files that got in the same
way, and add tests/repo-hygiene.test.ts so a forced add fails CI instead of
landing silently. Also drop a registry.ts comment pointing at a .codexclaw
evidence file that was never committed and cannot be resolved by any reader.
@github-actions github-actions Bot added the chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature). label Jul 27, 2026
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e77344f4-72eb-4306-a2c5-bf36810775fe

📥 Commits

Reviewing files that changed from the base of the PR and between 5f76d58 and 6f1de73.

⛔ Files ignored due to path filters (2)
  • devlog/.DS_Store is excluded by !**/.DS_Store
  • devlog/_plan/.DS_Store is excluded by !**/.DS_Store
📒 Files selected for processing (7)
  • .codexclaw/goalplans/opencodex-4-pabcd-work-phase-wp1-wp2-dev2-go-pr/goalplan.json
  • .codexclaw/goalplans/opencodex-4-pabcd-work-phase-wp1-wp2-dev2-go-pr/ledger.jsonl
  • .codexclaw/goalplans/opencodex-live-unfinished-issues-and-prs-triage/goalplan.json
  • .codexclaw/goalplans/opencodex-live-unfinished-issues-and-prs-triage/ledger.jsonl
  • .gitignore
  • src/providers/registry.ts
  • tests/repo-hygiene.test.ts
💤 Files with no reviewable changes (5)
  • .codexclaw/goalplans/opencodex-live-unfinished-issues-and-prs-triage/ledger.jsonl
  • .codexclaw/goalplans/opencodex-4-pabcd-work-phase-wp1-wp2-dev2-go-pr/goalplan.json
  • .codexclaw/goalplans/opencodex-live-unfinished-issues-and-prs-triage/goalplan.json
  • .codexclaw/goalplans/opencodex-4-pabcd-work-phase-wp1-wp2-dev2-go-pr/ledger.jsonl
  • src/providers/registry.ts

📝 Walkthrough

Walkthrough

The change removes two stored agent goal plans and their ledgers, broadens .gitignore coverage for agent artifacts, adds repository hygiene tests, and updates the Ollama Cloud model verification comment.

Changes

Repository hygiene

Layer / File(s) Summary
Agent state cleanup and hygiene enforcement
.codexclaw/goalplans/..., .gitignore, tests/repo-hygiene.test.ts
Stored goal plans and ledgers are deleted; nested .codexclaw/ and .omo/ directories are ignored; Bun tests verify tracked-file and .gitignore hygiene.

Provider metadata

Layer / File(s) Summary
Ollama Cloud model verification
src/providers/registry.ts
Updates the ollama-cloud model-list comment to indicate live ID verification and qwen3-coder:480b retirement without changing provider fields or model data.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested labels: enhancement

Suggested reviewers: wibias, ingwannu

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: untracking local agent session state and related ignored files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/untrack-codexclaw

Comment @coderabbitai help to get the list of available commands.

@lidge-jun
lidge-jun merged commit 461de39 into dev Jul 27, 2026
12 checks passed
lidge-jun added a commit that referenced this pull request Jul 27, 2026
The .codexclaw/ goalplans and ledgers are per-machine agent state. They were
committed with 'git add -f' despite the ignore rule, and once tracked the rule
stopped applying, so they rode along into main and preview.

Untrack them (files stay on disk), drop two .DS_Store files that got in the same
way, and add tests/repo-hygiene.test.ts so a forced add fails CI instead of
landing silently. Also drop a registry.ts comment pointing at a .codexclaw
evidence file that was never committed and cannot be resolved by any reader.
lidge-jun added a commit that referenced this pull request Jul 27, 2026
The .codexclaw/ goalplans and ledgers are per-machine agent state. They were
committed with 'git add -f' despite the ignore rule, and once tracked the rule
stopped applying, so they rode along into main and preview.

Untrack them (files stay on disk), drop two .DS_Store files that got in the same
way, and add tests/repo-hygiene.test.ts so a forced add fails CI instead of
landing silently. Also drop a registry.ts comment pointing at a .codexclaw
evidence file that was never committed and cannot be resolved by any reader.
lidge-jun added a commit that referenced this pull request Jul 27, 2026
It was committed despite the ignore rule and carries no content. Matches the
same cleanup on dev/main/preview in #567.
@lidge-jun
lidge-jun deleted the codex/untrack-codexclaw branch July 29, 2026 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant