Repository navigation
fix(app): keep distinct identities for cell-backed crew helpers - #1964
Merged
Merged
Conversation
Cell transcripts live in .cell, so the immediate transcript parent collapsed every helper into the same app agent. Reuse session.DirOf instead. Laziness Protocol keeps layout knowledge in its existing authority; Test Behavior Not Implementation covers public proposal acceptance and replay. Focused proposal acceptance tests: 6 passing. The new cell-layout regression first failed with repeated agent .cell. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
LaterInbox searched only live conversation asks even though crew proposals belong to the crew layer. Preserve the proposal with a durable Later mark, emit the updated ask, and restore it through Inbox Back. No proposal answer or deletion occurs. Test Behavior Not Implementation covers public LaterInbox, ListInbox, reopen and acceptance. Red regression returned not_found. Seven focused proposal tests now pass. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Later could publish AskOpened after a concurrent keep answer deleted the proposal and emitted AskClosed. A public-seam paused-publication regression reproduced the answered item returning to Later. Use one proposal lifecycle lock for durable Later/Back updates through event publication and for dropProposal. Keep the formation lock separate. Test Behavior Not Implementation checks final Inbox state; a fresh backend now verifies the saved Later mark. Eight focused proposal tests pass. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Fail each channel wait after five seconds and release paused publication during early cleanup. Wait for the answer goroutine to start before its 100 ms interleaving allowance. Eight focused proposal tests pass. The scheduling allowance remains documented in the PR. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A proposal changed while the app closes, before its crew run started, has no run to order it: Later refuses instead of crashing, and an answer still forgets the saved proposal. Co-Authored-By: Claude Opus 5.5 <[email protected]>
santoshkumarradha
marked this pull request as ready for review
November 2, 2026 17:18
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
Crew proposal helpers backed by cell transcripts now keep distinct conversation identities.
The cause is
appAgentIDderiving identity from the immediate transcript parent. The fix reusessession.DirOf, which already understands cell and legacy layouts. The public proposal regression checks the original manager, six distinct helpers, their briefs and reporting relationships, and replay without duplicate membership.Evidence
TestAppCrewProposalSeatsCellHelpersBeforeReturningfails with repeated agent.cell.go test ./cmd/codeaf -run '^TestAppCrewProposal(SeatsCellHelpersBeforeReturning|SeatsSixHelpersBeforeReturning|ReservedManagerHandle|RejectsDuplicateHelpersBeforeCreating|ResumesFailedHelper|CanCorrectNameBeforeCrewExists)$' -count=1 -timeout=90s.Merge Danger
Door: two-way.
Blast Radius: identity.
This changes cell-backed app agent IDs to their actual session IDs. Legacy transcript IDs retain their existing spelling. Existing broken
.celldesktop state is not migrated.Proposal Later
inbox.laterpreviously searched live conversation asks, but crew proposals live in the crew layer. A focused regression first failed withnot_foundforagent/crewprop:prop1. The route now persists the proposal's Later mark and emitsask.openedwithlater: true.inbox.backuses the same route to restore it. Reopening proposals preserves the mark. The test verifies Later, reopen, Back and acceptance without answering or deleting the proposal.Review correction
An independently reviewed interleaving could close a proposal after Later saved it but before Later published its open ask. The paused-publication regression reproduced the answered item returning to Later. A proposal-only lifecycle lock now orders durable Later/Back updates and ask events with proposal dismissal. Crew formation keeps its separate lock. Eight focused proposal tests pass. The persistence regression now creates a fresh backend and layer reader against the saved state rather than reopening with cached memory.
The concurrency regression bounds each channel wait at five seconds and releases paused publication on early test failure. It waits for the answer goroutine to start before giving it 100 ms to complete while publication is paused. That scheduling allowance remains a test limitation: an exceptionally descheduled answer goroutine could miss the pre-fix interleaving. The initial failing run did observe the resurrection directly. Eight targeted tests pass after the bounded-wait update.
While the app closes
The proposal lock lives on the crew run, and a closing app can have none.
TestAppCrewProposalLaterWhileClosingRefusescrashed the engine with a nil dereference before this was handled, andTestAppCrewProposalAnsweredWhileClosingStaysForgottenleft an answered proposal saved to reopen at the next launch. Later now refuses and the answer still forgets the proposal.