fix(runtime-host): add numbered suffixes to branch session titles - #4994
Open
sunrioa wants to merge 2 commits into
Open
fix(runtime-host): add numbered suffixes to branch session titles#4994sunrioa wants to merge 2 commits into
sunrioa wants to merge 2 commits into
Conversation
Assign collision-aware numbered names to ordinary branches, preserve literal manual titles, and cover concurrent creation and durable retries. Generated-by: OpenAI Codex
me2seeks
requested changes
Sep 8, 2026
me2seeks
left a comment
Contributor
There was a problem hiding this comment.
Automated review by OpenAI Codex, operated by me2seeks, at 20f83123b2e5a53f37bb76abaf57e7c7aad741f3. This is not an independent human review.
One P2 compatibility finding: the suffix-stripping heuristic cannot distinguish a new generated branch suffix from an inherited title in an existing branch. See the inline exact-source reproduction.
- Optimal for the actual problem: mostly; naming is correctly owned by the Host and cross-source branch reservations are serialized, but existing branch title provenance is misclassified.
- Production code that can be deleted: no closed deletion candidate. Do not repurpose titleIsManual as proof that a numbered suffix was generated by this feature.
- Low-quality tests that can be deleted or replaced: none identified. Current numeric-title coverage uses manual names and misses persisted branches with auto-generated literal numeric endings.
- Deeper refactor: no broad refactor; remove a suffix only when its generated provenance is established, preserving ambiguous existing names.
- Ready to merge: no, pending correction of the existing-data naming case.
- Residual risks / verification: read all three changed files, branch/revision/side-conversation construction, idempotent retries and stored title-update semantics; executed the exact nextBranchName function on a valid legacy header shape. Full Host branch integration suites were not run locally. User-visible title behavior and persisted metadata are affected; material protected-area changes require independent human review under CONTRIBUTING.md.
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.
Summary
Fixes #4978
Ordinary session branches currently inherit the source title, making them difficult to distinguish in the session list.
This change:
Review project (1)andReview project (2).Sprint (2026).Before
After
Verification
Passed:
Known validation limitations
The complete local validation was not entirely green. Intermittent Host process-exit failures occurred in:
an invocation-owned detached Host retires after launcher natural exitan authority-supervised Candidate exits if its launch owner is killedowned Host exits promptly after its first connection closesIssue #4776 tracks the latter two tests, with test-side lifecycle changes proposed in #4814. Additional investigation captured a pending TLS connection from the startup model-metadata refresh remaining alive after
host.closedresolved; see the diagnostic comment. This explains the instrumented authority-supervised failure, but has not been confirmed as the cause of every reported failure. The first test also failed on unmodified main and is not explicitly listed in #4776.Three independent worktrees were created with fresh dependency installations and rebuilt artifacts:
2dd98419af4abd4918Five additional rounds of the three lifecycle tests reproduced all three failure types on unmodified main.
AI use
Tool(s) and scope: OpenAI Codex assisted with implementation, regression tests, ablation experiments, and validation. The author manually tested the user-visible behavior.
Checklist
Static checks and branch-specific tests pass. The complete Host suite encountered the intermittent failures documented above.
Does this PR entail a change in behavior?