Skip to content

repo(opencode-config): 34 backup files (3.2 MB) are tracked on main — 24 dated opencode.jsonc snapshots, bin/ proxy .bak copies and a 0-byte .new — a recurrence of #367 that the 2026-10-29 residue cleanup never reached #3151

Closed

Description

@dezren39

What

34 editor/tooling backup files — 3,233,450 bytes — are tracked on main at 9d8e191c (verified this run, 2026-10-31, via git ls-files). This is a recurrence of #367 (closed 2026-10-20): that cleanup covered the .bak files of its day, and a fresh generation has been committed since.

The set

  • .opencode/ — 25 files: 24 dated snapshots of the live config (opencode.jsonc.bak-2026-10-24-*, opencode.jsonc.bak-2026-10-25-*, opencode.jsonc.bak-20261024*, opencode.jsonc.bak-20261025*, each ~4,100–5,100 lines) plus opencode.jsonc.backup (189,518 B, the largest single file).
  • bin/ — 6 files: codex-proxy.mjs.pre-warm-20261024, codex-proxy.mjs.resume-build.bak, commandcode-proxy-start.sh.bak-20261025003957-netfix, muse-proxy.mjs.bak-20261024-flag-tolerance, muse-proxy.mjs.bak-20261024121323-laptop-deploy, and proxy-supervise.mjs.new (0 bytes — an empty placeholder).
  • Root — opencode.json.bak (the live file is opencode.jsonc; the .json config no longer exists).
  • doc/2026-10-11T03-44-33Z_design_groups_events_delegation/spikes/s11-relay/certs/live/ — leaf.key.bak-20261011T122827Z and leaf.pem.bak-20261011T122827Z, duplicates of the spike's own tracked leaf.key/leaf.pem fixtures sitting next to them.

How they landed

  • 11fc50d2 "chore(config): snapshot local working state on amd" (2026-10-25) added most of them in one commit: 122,147 insertions across 35 files, including all 24 .opencode dated backups and the bin/ copies.
  • 8e06e88f (2026-10-28, the sanctioned parked-dirt commit) carried opencode.jsonc.backup in with the live config edits.

Why the obvious fix is the wrong fix here

The root .gitignore tail (2026-10-29 note) records Drew's explicit call: config backups (.opencode/*.bak-*) are NOT to be gitignored — they are audit references, and hiding them behind .gitignore loses work; they are cleaned by moving them to dated residue dirs (e.g. ~/primary-residue-2026-10-29). So this issue is not "add ignore rules". It is: the residue move prescribed on 2026-10-29 has never been applied to the copies already committed to main, so every clone still carries 3.2 MB of superseded config snapshots, and the snapshot-commit path that swept them in is still the way the next generation will arrive.

Verified this run: git check-ignore matches none of the 34 paths (exit 1), and git grep finds no reference to any of these filenames anywhere else in the tree — nothing builds, runs, or documents from them; the live files (opencode.jsonc, the bin/*.mjs proxies) are all present separately.

Why it matters

Acceptance criteria

  • The 34 listed backup files are preserved outside the repo first (dated residue dir on the laptop, per the 2026-10-29 policy), then removed from tracking on main; the live files (opencode.jsonc, bin/*.mjs, the spike's leaf.key/leaf.pem) are untouched.
  • No .gitignore rule is added for *.bak / *.bak-* / *.backup / *.new — the 2026-10-29 decision stands; the fix is the residue move, not hiding.
  • A lightweight guard exists that names this class at commit/snapshot time (e.g. the snapshot/keeper path refuses or flags tracked paths matching .bak, .bak-*, .backup, .pre-warm*, *.mjs.new), so the next snapshot commit cannot silently re-add a generation — or the issue documents why the existing keeper already does and this set predates it.
  • After removal, a repo-wide search for a key that only exists in the live config returns exactly one config file, and git ls-files | grep -E '\.backup$|\.bak|pre-warm|resume-build|\.mjs\.new$' is empty.

Activity

  1. added
    kind/infrastructureInfrastructure / host-portability work
    priority/lowNice to have; do when convenient
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    app/opencode-configOpenCode configuration under .opencode/ and the root config
    effort/sSmall: expected under 2 hours of work
    on Oct 31, 2026
  2. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

  3. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed (addendum, same run)

    • Agent: new-issue-creator job (new-issue-creator-code-a)
    • Session / ID: new-issue-creator-code-a run, 2026-10-31 12:05 CDT
    • Found via: filed this run
    • Task: Addendum to the filed set: a 35th instance of the same class, committed today. bin/sessions.json (15,884 B) is tracked on main — the claude-code-proxy key→CLI-session map (session IDs, model names, hashes, lastUsedAt timestamps). The proxy no longer writes there: provider proxies keep session state in the repo tree (bin/sessions.json) — move to ~/.local/state #3067 moved the session file to the shared state root (~/.local/state/cli-proxies/sessions.json, see the comment at bin/claude-code-proxy.mjs:56-63 — "bin/ is the tracked checkout, and every write there dirtied the primary clone"). The tracked copy is stale residue from before that move, swept into git by today's repo-keeper snapshot c1ad41e5 ("repo-keeper: snapshot code 2026-10-31 09:26 CDT"). It belongs in this issue's removal set, and it is the evidence for the guard acceptance criterion: the snapshot path is still sweeping residue into main as of this morning.
    • Expectation: same as the issue — preserve-then-untrack; the guard should flag live runtime-state filenames (sessions.json) as well as backup patterns.
    • Links: provider proxies keep session state in the repo tree (bin/sessions.json) — move to ~/.local/state #3067 (the state-root move this file predates)
  4. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 1, 2026
  5. 11 remaining items

  6. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  7. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code)
    • Session / ID: OpenCode session ses_e5e644c661fffeuD3bCrNgstVB; queue task 5648
    • Found via: queue claim · OpenChamber scheduled lane
    • Task: Preserve and untrack the residue set and guard keeper snapshots.
    • Result: PR repo: preserve backup residue and guard snapshots (#3151) #4320 is open at commit 82225058b689498fcdf8ccefd1248f40535b6113; issue remains open.
    • Preservation: 34 files copied and hash-verified before untracking at /home/user/primary-residue-2026-11-02/code (3,275,487 bytes on current main; packet byte figure differed).
    • Verification: focused keeper integration test, bash -n, shellcheck warning threshold, and post-cleanup path/live-file checks passed. No CI checks are configured; CodeRabbit skipped.
    • Links: repo: preserve backup residue and guard snapshots (#3151) #4320
  8. added a commit that references this issue on Nov 2, 2026
  9. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

  10. removed
    status/readyTriaged and ready for queued implementation work
    on Nov 3, 2026
  11. developing-today commented on Nov 3, 2026

    @developing-today
    Contributor

    agent-note:v1
    state: triaged (coverage pass)
    Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 30 (priority/low). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
    Found via: coverage pass 2026-11-03

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/opencode-configOpenCode configuration under .opencode/ and the root configeffort/sSmall: expected under 2 hours of workkind/infrastructureInfrastructure / host-portability workpriority/lowNice to have; do when convenientqueue/queuedHas a queued queue tasksource/creatorFiled by the new-issue-creator jobtask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions