Skip to content

Fix multi-user inbox routing#4

Merged
tjb-tech merged 1 commit intoHKUDS:mainfrom
fancyboi999:fancy/fix-inbox-routing
Mar 18, 2026
Merged

Fix multi-user inbox routing#4
tjb-tech merged 1 commit intoHKUDS:mainfrom
fancyboi999:fancy/fix-inbox-routing

Conversation

@fancyboi999
Copy link
Copy Markdown
Contributor

@fancyboi999 fancyboi999 commented Mar 18, 2026

Summary

  • fix multi-user inbox delivery by resolving logical agent names to the real on-disk inbox directory before transport delivery
  • make CLI inbox receive/peek/watch and task wait default to the resolved member inbox instead of the bare agent name
  • add regression tests covering lifecycle idle delivery and default inbox peek behavior under CLAWTEAM_USER

Root Cause

Team members are stored with user-scoped inbox names like alice_leader, but several workflows still sent to or listened on the bare logical name leader. That split the control plane in two: the board counted one inbox, while lifecycle and inbox-related commands used another.

What Changed

  • introduced inbox resolution in TeamManager
  • applied inbox resolution to transport delivery plus CLI inbox defaults
  • switched task wait to monitor the leader's real inbox by default
  • added regression coverage for inbox routing under multi-user mode

Validation

  • python -m pytest -q
  • python -m compileall clawteam tests
  • ruff check clawteam/team/mailbox.py clawteam/team/manager.py tests/test_inbox_routing.py
  • manual repro before/after fix with:
    • CLAWTEAM_USER=alice clawteam team spawn-team demo
    • CLAWTEAM_USER=bob clawteam lifecycle idle demo --last-task task-1 --task-status blocked
    • before fix: board showed leader inboxCount=0 while a stray teams/demo/inboxes/leader directory was created
    • after fix: board shows inboxCount=1, default clawteam inbox peek demo reads the leader inbox correctly, and only teams/demo/inboxes/alice_leader exists

Notes

  • full-repo ruff check clawteam tests still reports pre-existing baseline issues outside this change set

@tjb-tech tjb-tech merged commit 8f530f7 into HKUDS:main Mar 18, 2026
@fancyboi999 fancyboi999 changed the title Fix multi-user inbox routing Fix inbox routing and TaskStore races Mar 18, 2026
@fancyboi999 fancyboi999 changed the title Fix inbox routing and TaskStore races Fix multi-user inbox routing Mar 18, 2026
a24ibrah pushed a commit to a24ibrah/ClawTeam that referenced this pull request Mar 30, 2026
juntaochi added a commit to novix-science/ClawTeam-gstack that referenced this pull request Apr 20, 2026
…st_command + deploy_url

- 13 failing tests cover presence, frontmatter schema, stub detection (sections + blacklist), test-report rerun + cache-hit + exit-1 + timeout, and ship-notes deploy_url 2xx/non-2xx/URLError paths
- Test-local schema fixtures (DesignDoc/TestReport/ShipNotes) inherit from ArtifactFrontmatterBase; Phase 3 GstackSprintPlugin ships the real subclasses
- Pitfall HKUDS#4 proof: subprocess_runner injection seam asserted with shell-free list cmd + cwd pin + 300s timeout
- Pitfall HKUDS#6 proof: unregistered artifact_type surfaces 'Phase 3 plugin must register' message
- Pitfall HKUDS#10 proof: deploy_url_checker injection seam covers URLError offline-safety path
- RED: all tests fail with ModuleNotFoundError on clawteam.harness.evidence_gate
juntaochi added a commit to novix-science/ClawTeam-gstack that referenced this pull request Apr 27, 2026
Closes ROADMAP Phase 4 Success Criterion HKUDS#4. Exercises the full flow
against a REAL tmp_path git repo (no subprocess mocks):

- test_mid_review_push_integration_end_to_end: real git init + baseline
  commit, dispatch_review_phase with spawn_fn that injects a mid-dispatch
  commit, asserts MidReviewThrash fires with (review_sha, new_sha,
  diff_paths_added) payload and reviewer report carries thrash_decision
  field per D-19.
- test_mid_review_push_no_thrash_when_head_stable: HEAD-stable control
  (no thrash, no thrash_decision).
- test_mid_review_push_thrash_decision_field_enforced: reviewer picks
  'superseded' — asserts the D-19 enum constraint holds both ways.

Consumes clawteam.sprint.review_phase.dispatch_review_phase (Plan 10) and
MidReviewThrash event (Plan 02) verbatim; no source code modifications.
juntaochi added a commit to novix-science/ClawTeam-gstack that referenced this pull request Apr 27, 2026
SUMMARY.md + STATE.md advance + ROADMAP plan checkbox + REQUIREMENTS
annotations for SPRINT-04/05 + QUALITY-07/09/13 + deferred-items log.

- 4 D-18 deferral markers removed from pm/designer/reviewer prompts
  (INTERACTIVE-RUNTIME-DEFERRED x3 + SHA-PIN-DEFERRED x1)
- 2 inverse-assertion regression tests added (test_markers_removed +
  test_markers_removed_and_runtime_present)
- 4 existing deferral-marker assertions inverted in test_gstack_role_prompts.py
- tests/test_mid_review_push_integration.py added (329 LOC, 3 tests,
  REAL subprocess against tmp_path git repo)
- ROADMAP Phase 4 Success Criterion HKUDS#4 closed by the new end-to-end test
- Task 3 ISS-06 no-op per plan pre-check (Plan 13 absorbed the mandate)
- 68/68 plan-scoped tests green
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.

2 participants