Give session titles a single masked writer - #61
Merged
Merged
Conversation
The reviewer found a writer the sweep missed: dsh set a title through its own inline UPDATE, so it never picked up maskText. Inert on the append path, but the truncation reset in poll() re-reads a whole file against an existing session and would write the raw title back over the masked one. Patching the one line would leave the trap for the next adapter, so titles have a single named writer now - renameSession in emit.ts, which masks - and Claude Code's overwrite moved onto it too. Grepping for the UPDATE returns emit.ts and nothing else. Also drops a db.prepare that ran inside the poll loop per title record. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZDHk4yVYP4jMZkTUMQ1Lw
gengwg
added a commit
that referenced
this pull request
Sep 8, 2026
Give session titles a single masked writer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #60. The reviewer found a writer the sweep missed: dsh set a session title through its own inline
UPDATE, so it never picked upmaskText. It is inert on the append path, where the title arrives before the session row exists, but the truncation reset inpoll()re-reads a whole file against an existing session and would write the raw title back over the masked one.Patching that one line would leave the same trap for the next adapter. Titles now have one named writer —
renameSessioninemit.ts, which masks — and Claude Code's overwrite moved onto it as well.rg "UPDATE sessions SET title" srcnow returnsemit.tsand nothing else.Also removes a
db.preparethat was being re-created inside the poll loop on every title record.93 tests, one new: a rename carrying an AWS key is masked while the rest of the title survives.
https://claude.ai/code/session_01NZDHk4yVYP4jMZkTUMQ1Lw