Skip to content

fix: preserve live pane nonce across child claims - #136

Open
Florious95 wants to merge 15 commits into
release/0.5.74-startup-routingfrom
fix/notification-repair-luna-20260905
Open

fix: preserve live pane nonce across child claims#136
Florious95 wants to merge 15 commits into
release/0.5.74-startup-routingfrom
fix/notification-repair-luna-20260905

Conversation

@Florious95

@Florious95 Florious95 commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Claiming a second external workspace used to rotate the live pane nonce and invalidate the first Team's leader notifications. Additional claims now reuse the pane-instance nonce. Concurrent first claims initialize it through tmux's pane-local set-option -p -o; the losing claim reads and persists the winner. Existing owner, workspace, and endpoint guards remain in force.

Fresh leader delivery revalidation no longer treats a Null fallback as matching owner current. States with teams entries go through canonical project_top_level_view. Legacy no-teams top-level receivers stay on the no-team path.

MCP sim nested teams.teamA now carries the same session_name and worker pane/window bindings as the current derived snapshot. Owner-team delivery projects teams.<owner> as the inject view; status-only nested agents persisted broadcast rows but left worker_b/worker_c panes empty.

Validation:

  • Base: release/0.5.74-startup-routing at f2926d467f45d684549054bcc562607a255e6eea.
  • Current head: 55e0ed256146100afdac69f67eea8dcdc4d3c619 (tree 1657b2c390569f66b36bacaa229fac523edbc506). Product projection remains 3a0de905. This head adds the nested teamA delivery seed and lib owner_projection_peer_inject_uses_nested_worker_pane_not_top_level.
  • This revision: 0 new Cargo/remote executions. Unjudgeable until a disposable seat runs the scoped list on this exact SHA.
  • Prior unit gb-dab9e0997c250f2259e3977350b3a4528f21f530-pr136-fixture-a1 (ExecMainStatus=0) covers the previous 4 owner_projection_* cases and explicit_claim_takeover_any_live_pane_red 4/4 only. It does not cover the candidate-full broadcast failure.
  • Candidate full 25170066e3aa204e728679c5e160f2fb7fb5c871 journal: mcp_worker_broadcast_fans_out_to_team_peers_and_leader_excluding_sender failed pane_contains_count("worker_b", canary) >= 1 after recipient rows and leader canary already passed.
  • Zero local Cargo. No merge/tag/publish.

Recommended scoped (disposable seat, this SHA):

cargo test -p team-agent --locked --test mcp_simulated_worker_source_red -- --nocapture --test-threads=$(nproc)
cargo test -p team-agent --locked --lib -- --exact --nocapture owner_projection_peer_inject_uses_nested_worker_pane_not_top_level

Addresses #135.

Drive two independent claim-leader CLIs through empty live-nonce
observation, then tmux set-option -p -o / already-set readback, and
persist the same winner into both receivers.
Keep both claim-leader inventories empty until both set-option -o
clients arrive, publish the winner nonce with an atomic rename under
the lock, and fail the fixture on a bounded wait instead of hanging.
Keep the four-canary physical gate. Before cleanup, journal MCP
status/reason/channel/id, fixture event typed refusals, coordinator
liveness/stdio, and binding-vs-live nonce match hashes.
Claim save derived a sibling team from the workspace directory
because the seed had session_name/team_dir but no team_key. Seed
root and teams.current with team_key=current, assert the canonical
team is the only map entry and the receiver stays on current, and
drop the temporary diagnostic framework. Do not copy a top-level
receiver.
Fresh leader revalidation passed Value::Null, which matched owner
current via team_state_key's default and returned Null as the
projected state. Non-object fallbacks are ineligible, and a state
with teams entries must go through project_top_level_view rather
than a root/active-label shortcut. Legacy no-teams top-level
receivers stay on the no-team path. Missing selected-team receivers
do not borrow a sibling binding.
Projection unit fixtures omit receiver.tmux_socket so delivery borrows
the product OfflineTransport and can assert inject_targets for the
expected pane. Internal in-workspace claims are not required to persist
scope_authority=explicit_claim. Absolute sockets stay on the real
shared-pane target.
Canonical teams projection is the delivery view. MCP sim nested teamA
must carry session_name and worker pane/window so broadcast injects
peer canaries; status-only nested agents left worker_b empty.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant