Skip to content

Tower registry divergence after workspace drop/re-registration: afx cleanup and afx status disagreed about registered builders #1544

Open

Description

@amrmelsayed

Split from #1543 (its incident 2; the acute misrouting half of that issue was refuted by forensics and #1543 was rescoped to the recipient-attribution defect).

Observed (2026-07-28, shannon workspace field report)

  1. Tower dropped / re-registered a workspace: afx send returned NOT_FOUND for ~45 minutes, then self-recovered without intervention.
  2. Post-recovery, afx cleanup -p <id> disagreed with afx status about which builders were registered — two instruments reading what should be one registry gave different answers.

Why it matters

The disagreement is a registry-state divergence symptom: some component held state (in-memory workspace-terminals map, known_workspaces, global.db rows) that another component did not see. A divergence window like this is exactly where real misrouting or misattribution could occur — the #1543 investigation cleared the routing layer in the steady state, not during a re-registration window. Related priors: #1176 (registry wipe on restart), #1445 (afx cleanup -i false not-found; lacks -p's name fallback — possibly the same read-path split).

Investigation shape

  • Identify which read paths afx status and afx cleanup -p use (DB vs in-memory vs Tower API) and whether they can diverge during/after workspace re-registration.
  • Reproduce the drop/re-register cycle (workspace deactivate → activate, or Tower-side connection loss) and diff the two instruments' outputs during the window.
  • The 45-minute NOT_FOUND self-recovery suggests a reconnection/registration retry loop worth mapping while there.

Evidence bar: this is one field observation from July with no captured artifacts — first step is reproduction, not fix.

Activity

  1. added
    area/tower
    on Aug 22, 2026
  2. amrmelsayed commented on Aug 26, 2026

    @amrmelsayed
    CollaboratorAuthor

    Captured repro candidate for this investigation (this issue is repro-first, and this is raw instrument data, not testimony):

    2026-08-26T01:59Z, codev workspace: afx status listed builder-pir-1552 Owner: vscode while, at the same moment, that builder's architect-addressed message was delivered to main (mailbox row 536759ba-..., to_agent=main, main's terminal id) and the vscode architect attests non-receipt. The same row records from_agent=architect instead of builder-pir-1552, so sender identity was rewritten or lost in the same transaction.

    Two instruments disagreeing about the same builder at the same instant — the status registry's owner column vs the affinity routing's resolution — with the persisted mailbox row as evidence. Full detail and a healthy-row contrast logged on #1406 (comment of 2026-08-26). Likely overlap: #1406's spawn-time misattribution (CODEV_ARCHITECT_NAME absent → owner falls back to main) would explain the routing while leaving the question of why afx status still shows vscode — which is precisely the divergence this issue exists to explain: which store does each reader consult?

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

    area/tower

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions