Repository navigation
fix: name the other session by its card's label in the edit guard's note - #43
Merged
Merged
Conversation
The note named the session that edited the file by its lich id, which means nothing to the model or the user. When a note is about to be added, the guard now asks `$LICH_BIN sessions --json` (2 s timeout) and names the session by its label, falling back to the id when the CLI fails, the session is gone or the match is ambiguous. That roster lists no ids, so the session is found by its roster name, which lich derives from the id (folder, dash, first four alphanumerics). A session renamed with /rename falls back to the id; an `id` field in the roster would close that.
…oster name Matching the roster name's tail derived from the id broke on /rename and could collide; lich 0.60.0 lists each session's id in lich sessions --json, so the guard matches on it and names the id only on an older lich. The tests change because the roster they script gains the id field.
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.
The edit guard's note named the other session by its lich id (
1fd224be-…), which means nothing to the model or the user. It now looks the session up inlich sessions --json(only when a note is added, 2 s timeout) and names it by its card's label, matching on theidfield lich 0.60.0 adds (omartelo/lich feat/worker-auto-answer); an older lich, a failing CLI or a gone session fall back to the id. Never fails an edit.Tests: node 300/300,
claude plugin test .22/22, validate ok.