Skip to content

fix(j5): reconcile archive racing an existing thread’s first Squadron assignment #179

Closed as not planned

Description

@Jacksondr5

A thread archived before it has a Squadron home can acquire an active A2A membership if onboarding assignment or join_squadron races archive. Both paths check the thread before registering, but archive can commit between that check and the join transaction.

The lifecycle reactor currently skips thread.archived for an unregistered thread and advances its replay cursor. If registration commits afterwards, the orchestrator thread is archived while the directory lists active membership. Delivery transport refuses the archived target; this is misleading addressability rather than successful delivery. A later unarchive/delete reconciles the home.

Fix the shared lifecycle/registration boundary for both entry points. Preserve immutable homes, reversible archive, and legacy permanent retirement. Avoid adding a separate lifecycle implementation to the onboarding route. Add a deterministic regression forcing archive consumption before registration, plus the opposite ordering and unarchive/replay coverage. A retained pre-registration lifecycle fact is one possible approach; investigate the smallest shared solution.

Identified in the independent Fable review of the onboarding follow-up on draft PR #178; the existing join_squadron has the same window. Relevant code: LifecycleService.handleStoredEventInternal / replayCommittedEventsRaw, SquadronJoinService.joinExistingThread, and the importer assignment route.

Activity

  1. Jacksondr5 commented on Oct 8, 2026

    @Jacksondr5
    OwnerAuthor

    Closing: Squadrons are retired and their behaviour is folded into projects (#412; merged in #454, #455, #456, #457, #482, #483, #484 and #489). A thread's home is now its project, so the Squadron this issue is about no longer exists. If part of this still applies to projects, reopen it or file it in those terms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions