Conversation
Model: gpt-6-sol
Keep an initial ID branch until a title is accepted, then rename only when the recorded branch and HEAD are unchanged and unpublished. Persist a one-time intent and reconcile Git state after interruption. Model: gpt-6-sol
This branch has not been deployed
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.
Related issue
Closes #289
Problem / pressure
New worktree sessions begin on an opaque
lody/<session-id>branch. That name is hard to identify in Git, in the session UI, and when preparing a push or PR. A provider-generated title usually arrives after the worktree is created, while speculative preparation can create a worktree before the session is durably claimed.Summary
draftfor upstream design review.Visual explanation
flowchart LR A[Create or adopt new worktree] --> B[Persist initial branch and HEAD] B --> C[First accepted title] C --> D{Same branch and HEAD; unpublished?} D -- no or uncertain --> E[Keep ID branch] D -- yes --> F[Persist rename intent] F --> G[Rename Git branch] G --> H[Reconcile actual branch into Session metadata] H --> I[UI and restore read the same branch]The check and rename happen under the repository lock. Recovery reads Git after a crash between the rename and metadata update.
Before / after
lody/<opaque-id>even after it has a title.lody/<title>-<short-id>branch; unsafe cases keep the ID branch.Test plan
pnpm --filter lody exec vitest run src/session/worktree/worktree-title-branch.test.ts src/session/session-manager.test.ts tests/message-handler-title.test.ts— 48/48 passed on rebased head1555aa42with writableLODY_DATA_DIR.pnpm --filter lody typecheck— passed on that head.pnpm lint— 0 errors (12,922 repository warnings) on that head.git diff --check upstream/main...HEAD— passed.--ignore-scriptscompleted for local validation.Context handoff
Original user prompt
Show original prompt
The user authorized completing the
xxxandxxxxfields for this case. The case-specific interpretation was to follow Lody issue #289, deliver a bounded readable branch implementation, and keep published or modified branches unchanged. This sentence is an assistant-completed scope description, not a verbatim user prompt or a claim of human code review.Sharing refusal (verbatim)
Shared conversation
Status: user-declined
Reason: The user explicitly declined publishing the Lody authoring conversation in the verbatim reply above. No public conversation URL was provided.