Repository navigation
A blank conversation a collection holds is kept, never resumed, and shown as live - #2337
Merged
Merged
Conversation
Launch resumed a never-spoken conversation that a collection references, ahead of the last spoken one, because "kept" and "spoken" shared one predicate. The emptiness check now reads only content; references keep a blank out of both the resume and the reuse piles, and every removal path still refuses it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The resolver built its view from agents.list, which leaves named blanks out, so collections.open and collections.expand called them deleted. A missing id is now looked up once on disk before it is called deleted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The on-disk fallback found the metadata a permanent deletion keeps, so the resolver would have shown a deleted conversation as live and allowed a relink to it. A row pending deletion, or a folder with the deletion marker, now stays deleted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A blank found on disk shared the listing cache that task and process members use to find their owner, so a collection read could open a crew member's conversation to look for a child that does not exist. The fallback now serves conversation members only, from its own cache. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
The integration branch keeps a never-spoken conversation that a collection references instead of reaping it. That rule leaked into two other decisions:
v3EmptySession,v3ReapEmpty,reapBlank, the background sweep) still refuses it.collections.open/collections.expandresolved agents only fromagents.list, which leaves named blanks out, so a held blank agent read asdeletedafter a restart althoughagents.openfinds it. A missing id is now looked up once on disk (appRowOnDisk) before it is called deleted; blanks stay out ofagents.listand nothing is opened.Found by the stability review after the Workstreams plan's architecture move (STAB2, findings E-B1 and E-M1).
Validation contract
cmd/codeaf/appcollectionkeep_test.go)TestACollectionHeldBlankIsNeverTheConversationALaunchResumesTestABlankConversationCanBeReapedAfterItsLastCollectionReferenceIsRemovedcollections.openand counted incollections.expandafter a restart;agents.liststill excludes it; an id with no folder is deletedTestACollectionHeldBlankAgentIsLiveAfterRestart| A permanently deleted conversation (or one pending deletion) stays deleted in its collection; relink to it is refused |
TestAPermanentlyDeletedConversationStaysDeletedInItsCollection|| A collection read never opens a held blank crew member to resolve its task/process children |
TestACollectionReadNeverOpensAHeldBlankToResolveItsChildren|No wire contract change. Nothing stubbed.
Review and CI
Three fresh review rounds: round 1 found that the disk fallback revived permanently deleted conversations (fixed: rows pending deletion or carrying the deletion marker stay deleted); round 2 found the fallback shared the owner cache, so a collection read could open a crew member to look for a missing child (fixed: the fallback serves conversation members only, from its own cache); round 3 found no blocker or major.
CI:
touched codeafandtouched packagesgreen.light gate(and socheck) red only onTestNoRoadInTheMemoryEngineHasMoreEndingsThanTheCeilingandTestNoRoadInTheTaskEngineHasMoreEndingsThanItsLedgerRow, both also failing on the currentapp/v3tip (79c8a94, Full check run 41735053886).🤖 Generated with Claude Code