Skip to content

fix: resolve rig-scoped mayor/deacon to town-level address (gt-te23)#3291

Merged
steveyegge merged 1 commit intogastownhall:mainfrom
seanbearden:fix/resolve-rig-scoped-mayor
Mar 27, 2026
Merged

fix: resolve rig-scoped mayor/deacon to town-level address (gt-te23)#3291
steveyegge merged 1 commit intogastownhall:mainfrom
seanbearden:fix/resolve-rig-scoped-mayor

Conversation

@seanbearden
Copy link
Copy Markdown
Contributor

Summary

  • gt mail send gastown/mayor silently lost mail — bead created with assignee gastown/mayor but mayor inbox checks mayor/
  • Fix: normalizeAddress now resolves <rig>/mayormayor/ and <rig>/deacondeacon/ since these are town-level singletons
  • Two mails from laser/crew/happy (hq-wisp-50yd2, hq-wisp-1be1q) were lost due to this bug

Changes

  • internal/mail/types.go: normalizeAddress resolves 2-part addresses where the second part is mayor or deacon to their town-level canonical form
  • internal/mail/types_test.go: Added test cases for gastown/mayor, gastown/deacon, laser/mayor, laser/deacon

Test plan

  • go build passes
  • go test ./internal/mail/ — all pass including new address resolution tests
  • TestAddressToIdentity covers all new cases

🤖 Generated with Claude Code

"gastown/mayor" passed validation (workspace dir exists) but mail was
never delivered because mayor's inbox uses "mayor/" not "gastown/mayor".
Fix: normalizeAddress resolves "<rig>/mayor" → "mayor/" and
"<rig>/deacon" → "deacon/" since these are town-level singletons.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions bot added the status/needs-triage Inbox — we haven't looked at it yet label Mar 26, 2026
@codecov-commenter
Copy link
Copy Markdown

❌ 5 Tests Failed:

Tests completed Failed Passed Skipped
9323 5 9318 48
View the top 3 failed test(s) by shortest run time
github.com/steveyegge/gastown/internal/cmd::TestBuildRefineryPatrolVars_FullConfig
Stack Traces | 0s run time
=== RUN   TestBuildRefineryPatrolVars_FullConfig
    patrol_helpers_test.go:166: expected 5 vars, got 7: [target_branch=main integration_branch_refinery_enabled=true integration_branch_auto_land=false run_tests=true delete_merged_branches=true judgment_enabled=false review_depth=standard]
--- FAIL: TestBuildRefineryPatrolVars_FullConfig (0.00s)
github.com/steveyegge/gastown/internal/cmd::TestRunHooksSyncNonClaudeAgent
Stack Traces | 0.01s run time
=== RUN   TestRunHooksSyncNonClaudeAgent
Syncing hooks...
  ✓ mayor/.claude/settings.json (created)
  ✓ deacon/.claude/settings.json (created)
  ✓ myrig/crew/.claude/settings.json (created)
warning: role_agents[crew]=opencode - agent "opencode" binary "opencode" not found in PATH, falling back to default

Synced 3 targets (3 created, 0 updated, 0 unchanged)
    hooks_sync_test.go:366: opencode plugin not created in worktree alice
--- FAIL: TestRunHooksSyncNonClaudeAgent (0.01s)
github.com/steveyegge/gastown/internal/doctor::TestHooksSyncCheck_Fix_TemplateAgent
Stack Traces | 0.01s run time
=== RUN   TestHooksSyncCheck_Fix_TemplateAgent
warning: role_agents[crew]=opencode - agent "opencode" binary "opencode" not found in PATH, falling back to default
    hooks_sync_check_test.go:219: expected StatusWarning before fix, got OK
--- FAIL: TestHooksSyncCheck_Fix_TemplateAgent (0.01s)
github.com/steveyegge/gastown/internal/doctor::TestHooksSyncCheck_TemplateAgent_Missing
Stack Traces | 0.01s run time
=== RUN   TestHooksSyncCheck_TemplateAgent_Missing
warning: role_agents[crew]=opencode - agent "opencode" binary "opencode" not found in PATH, falling back to default
    hooks_sync_check_test.go:193: expected StatusWarning for missing template agent file, got OK: All 3 hook targets in sync
--- FAIL: TestHooksSyncCheck_TemplateAgent_Missing (0.01s)
github.com/steveyegge/gastown/internal/doctor::TestHooksSyncCheck_TemplateAgent_OutOfSync
Stack Traces | 0.02s run time
=== RUN   TestHooksSyncCheck_TemplateAgent_OutOfSync
warning: role_agents[crew]=opencode - agent "opencode" binary "opencode" not found in PATH, falling back to default
    hooks_sync_check_test.go:172: expected StatusWarning for out-of-sync template agent, got OK: All 3 hook targets in sync
--- FAIL: TestHooksSyncCheck_TemplateAgent_OutOfSync (0.02s)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@steveyegge steveyegge merged commit 138a592 into gastownhall:main Mar 27, 2026
4 of 8 checks passed
@seanbearden seanbearden deleted the fix/resolve-rig-scoped-mayor branch March 29, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/needs-triage Inbox — we haven't looked at it yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants