Skip to content

Remove a tool's local config that a git add -A swept into the release - #333

Merged
MongLong0214 merged 1 commit into
devfrom
fix-stray-serena
Jul 31, 2026
Merged

Remove a tool's local config that a git add -A swept into the release#333
MongLong0214 merged 1 commit into
devfrom
fix-stray-serena

Conversation

@MongLong0214

@MongLong0214 MongLong0214 commented Jul 31, 2026

Copy link
Copy Markdown
Owner

.serena/ is written by an MCP server into whatever directory it is pointed at, and it records that directory's name. A copy committed from a worktree ships that worktree's label — v0.5.0 carries project_name: "t1124", which is meaningless to anyone who clones it and wrong for anyone who uses the same tool.

It entered at 51abef8 (the T-1124 merge), because the commit before it staged with git add -A in a worktree where the server had left the directory untracked.

Why nothing caught it

test/manifest.test.ts asserts every declared file parses in a clean clone. A file nobody declared is invisible to that check. Distribution here is a clone (ADR-0011), so an undeclared file ships as surely as a declared one.

Filed as #334 — a guard belongs in a file this change does not own.

Not a patch release

The file is inert: it changes no behaviour and breaks no install. It is recorded rather than quietly dropped because the tag that carries it is immutable, and a later reader comparing the v0.5.0 tree against this one should find the reason instead of an unexplained absence.

Verification

  • test/manifest.test.ts, test/install-script.test.ts — 34 passed
  • npm run typecheck clean
  • .gitignore now excludes it, which is the part that lasts: the directory is recreated in every worktree the server touches, so the next -A would otherwise put it back

`.serena/` is written by an MCP server into whatever directory it was pointed at,
and it records that directory's name. A copy committed from a worktree therefore
ships that worktree's label: v0.5.0 carries `project_name: "t1124"`, which is
meaningless to anyone who clones it and wrong for anyone who uses the same tool.

It entered at `51abef8` -- the T-1124 merge -- because the commit before it staged
with `git add -A` in a worktree where the server had left the directory
untracked. Nothing failed, because nothing looks: the manifest test asserts that
every *declared* file parses in a clean clone, and a file nobody declared is
invisible to that. Distribution here is a clone (ADR-0011), so an undeclared file
ships as surely as a declared one.

Removed and ignored. Ignoring it is the part that lasts: the file will be
recreated in every worktree the server is pointed at, so the next `-A` would
otherwise put it back.

Not a functional defect, and not worth a patch release on its own -- the file is
inert. It is recorded here rather than quietly dropped because the release that
carried it is tagged, and a later reader comparing the v0.5.0 tree against this
one should find the reason rather than a silent deletion.

Record-Id: r-strayserena
Limit: a clean clone is the distribution, so an undeclared file ships; the manifest test checks declared files parse and cannot see a file nobody declared
Ruled-out: Cutting 0.5.1 for this | the file is inert -- it changes no behaviour and breaks no install -- and a release exists to move something a user needs
Ruled-out: Deleting it without a record | the tag that carries it is immutable, and a later reader comparing the two trees deserves the reason rather than an unexplained absence
Ruled-out: Adding a stray-file assertion in this commit | test/manifest.test.ts belongs to another ticket's scope, and the guard is worth its own issue rather than a drive-by edit here
Certainty: firm
Blast: local
Undo: easy
Verified: the manifest and install-script suites pass at 34 with the directory gone; typecheck clean; the tree no longer carries .serena and .gitignore now excludes it
Unverified: nothing executable changed
@github-actions

Copy link
Copy Markdown

CommitLore — record lint

Trailers: clean — 1 commit in origin/dev..5c7c57a4e8fd49cc7251112eb73a1678a58fb3a3
Active constraints: 4 limits · 16 ruled-out · 5 warnings — from 7 records over 3 changed paths

Active constraints for the paths this PR touches

Limits (4)

  • r-strayserena 5c7c57a — a clean clone is the distribution, so an undeclared file ships; the manifest test checks declared files parse and cannot see a file nobody declared
  • r-winsupported1124 6333251 — repositories that installed the hook before Windows: the commit-msg hook hangs instead of returning, and #71's containment can never match there #321 keep the old stub and must re-run commitlore hooks install; a corrected release does not reach them, and this row's claim is about a working install
  • r-c0f4e2 3d249cd — npm gitlore is held by an active same-domain CLI, so the owner's first-choice name was not available
  • r-b2e7f1 00d348d — Parsing must delegate to git interpret-trailers -- reimplementing the block rules would drift from the rest of the git ecosystem

Ruled out (16)

  • r-strayserena 5c7c57a — Cutting 0.5.1 for this | the file is inert -- it changes no behaviour and breaks no install -- and a release exists to move something a user needs
  • r-strayserena 5c7c57a — Deleting it without a record | the tag that carries it is immutable, and a later reader comparing the two trees deserves the reason rather than an unexplained absence
  • r-strayserena 5c7c57a — Adding a stray-file assertion in this commit | test/manifest.test.ts belongs to another ticket's scope, and the guard is worth its own issue rather than a drive-by edit here
  • r-winsupported1124 6333251 — Flipping the cell on the throwaway verification head | the ticket requires the attacks to pass in a required job in this ticket's own pull request, and a head that exists to be discarded is not that
  • r-winsupported1124 6333251 — Leaving the assertion pinned and editing only the document | the two contradict each other, so the suite would fail; a guard that blocks the change it was guarding for is a defect in the guard
  • r-winsupported1124 6333251 — Widening this ticket to the hook fix so it could be self-contained | the stop condition sent that to T-1127 for good reason, and this ticket's job was to measure and then say the word once measurement allowed it
  • r-nobin284 ab2f08f — Keeping the binary classification arm for the installer's wrapper | the wrapper is a shell script that execs node, so trusting it by name would re-admit any extensionless executable called commitlore while the bundle it runs is the thing with an interpreter to check
  • r-nobin284 ab2f08f — Relaxing the dogfood Evidence check to allow a missing path | it exists to catch a citation nobody can follow, and dropping the check to accommodate a deletion would retire the guarantee instead of correcting the question it asked
  • r-nobin284 ab2f08f — Leaving src/core/paths.ts alone because ADR-0026's inventory did not name it | it was the only remaining code that read files out of a compiled artifact, so leaving it would have left the invariant false while the test asserting it passed
  • r-nobin284 ab2f08f — Keeping /dist/commitlore in gitignore in case a binary returns | an ignore rule for an artifact nothing produces is a claim that something might, and the ADR says otherwise
  • r-8e15c2 70f6bcf — hashing only the files the entry point transitively imports | it is the same judgement call that produced this bug, made with more machinery
  • r-c0f4e2 3d249cd — GitLore published as git-lore | the binary and search results still collide with the existing gitlore tool
  • r-c0f4e2 3d249cd — keep Annals | the sound problem does not decay, and with code near zero this is the cheapest moment the project will ever have
  • r-c0f4e2 3d249cd — rename code and spec first, documents later | the drift window makes every artifact written in it wrong
  • r-b2e7f1 00d348d — line-matching Key: prefixes | prose containing a colon line parses as a record and feeds agents false context (verified B3)
  • r-b2e7f1 00d348d — content-hash Record-Id | must survive rebase and squash, which a hash of the commit does not

Warnings (5)

  • r-nobin284 ab2f08f (claim) — an extensionless COMMITLORE_BIN is now ignored rather than honoured -- the hook falls through to the recorded install and to PATH, so a caller who pointed it at the wrapper still gets a working hook, by a different route
  • r-8e15c2 70f6bcf (claim) — this is the second time in two commits that a fix for the M3 failure did not actually cover the M3 failure. The first was caught by testing the fix against the incident rather than against its own tests
  • r-c0f4e2 3d249cd (claim) — ADR-0008 and ADR-0009 keep the literal string Annals on purpose -- mechanical substitution there destroys the decision trail
  • r-c0f4e2 3d249cd (claim) — the residual grep for lore_query reports a false positive because commitlore_query contains it as a substring, so check the prefix
  • r-b2e7f1 00d348d (claim) — spec/fixtures and spec/contract-cases are the contract -- prose in SPEC.md explains them, it does not define them

git log --follow accepts exactly one pathspec, so renames are not followed for 3 paths; query one path at a time to follow its rename chain

Trailer violations fail this check. Active constraints are informational — they are what the repository already decided, not a verdict on this PR.

@MongLong0214
MongLong0214 merged commit ec93ac6 into dev Jul 31, 2026
8 checks passed
@MongLong0214
MongLong0214 deleted the fix-stray-serena branch July 31, 2026 19:33
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