Skip to content

fix: stop tracking the runtime control channel, and keep it that way - #1337

Merged
suleimansh merged 1 commit into
mainfrom
suleimansh/fix/untrack-control-channel
Jul 28, 2026
Merged

fix: stop tracking the runtime control channel, and keep it that way#1337
suleimansh merged 1 commit into
mainfrom
suleimansh/fix/untrack-control-channel

Conversation

@suleimansh

Copy link
Copy Markdown
Contributor

The regression

#1311 untracked .the-framework/control.jsonl and added nothing to hold the line. Eighteen hours later a run's own branch committed an empty one straight back onto main, riding in with #1309.

Tracking it is what #1298 is about: the daemon rewrites the control channel on every steer, so a tracked copy dirties every checkout it exists in and becomes a delete-vs-modify conflict between two machines.

This untracks it again, plus the copy under packages/the-framework/.the-framework/ that a run executing inside the package directory left behind at the #1092 rename. Both files are zero bytes.

The guard is the actual fix

A second untracking with no guard would just be waiting for the third one. The invariant is wider than one filename: .the-framework/ is transient except the committed DB (#313/#857), so a tracked run.json or events.jsonl would churn a checkout the same way.

The new test in control.test.ts asserts that every tracked path under a .the-framework/ directory is one of the four committed kinds:

  • .gitignore
  • LOGS.md
  • conversations/**
  • <user>/sessions/**

Anything else fails the test and names the offending paths. It skips itself when git rev-parse fails, so an installed package outside a git checkout still tests clean.

Verification

Proof-by-revert is built in: on main as it stands the test fails, naming both files.

✖ no runtime state under .the-framework is tracked in git (#1298/#1311)
  runtime state is tracked:
  .the-framework/control.jsonl
  packages/the-framework/.the-framework/control.jsonl

With the two removals, the framework suite is 1551 pass / 0 fail (1 skipped).

No changeset

Nothing here ships in dist, so the published package is byte-identical. This is checkout hygiene, not a release.

#1311 untracked `.the-framework/control.jsonl` and added nothing to hold
the line, so eighteen hours later a run's own branch committed an empty
one straight back onto main (#1309). Tracking it is what #1298 is about:
the daemon rewrites the control channel on every steer, so a tracked copy
dirties every checkout and turns into delete-vs-modify conflicts between
machines.

Untracks it again, plus the copy under `packages/the-framework/` that a
run executing inside the package directory left behind at the #1092
rename and that nothing has touched since.

The guard is the point. The invariant is wider than one filename:
`.the-framework/` is transient except the committed DB (#313/#857), so a
tracked `run.json` or `events.jsonl` would churn a checkout exactly the
same way. The new test asserts that every tracked path under a
`.the-framework/` directory is one of the four committed kinds: the
ignore file, LOGS.md, a conversation, or a user's session history. It
skips itself outside a git checkout, so an installed package still tests.

No changeset: nothing here ships in `dist`, so the published package is
byte-identical.
@suleimansh suleimansh added the bug Something isn't working label Jul 28, 2026
@suleimansh suleimansh self-assigned this Jul 28, 2026
@suleimansh
suleimansh merged commit 556c5d4 into main Jul 28, 2026
1 check passed
@suleimansh
suleimansh deleted the suleimansh/fix/untrack-control-channel branch July 28, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant