Skip to content

feat(formula): add swarm + task monorepo formulas with in_progress convoy safety#3300

Closed
dannomayernotabot wants to merge 1 commit intogastownhall:mainfrom
dannomayernotabot:feat/swarm-task-formulas
Closed

feat(formula): add swarm + task monorepo formulas with in_progress convoy safety#3300
dannomayernotabot wants to merge 1 commit intogastownhall:mainfrom
dannomayernotabot:feat/swarm-task-formulas

Conversation

@dannomayernotabot
Copy link
Copy Markdown
Contributor

Summary

  • Split mol-polecat-work-monorepo into two explicit formulas: -task (PRs against main with CI/AI review) and -swarm (feature branch work via MQ, no PRs)
  • Add bd update {{issue}} --status=in_progress as first action in ALL polecat formulas (mol-polecat-work, mol-polecat-work-monorepo, and both new formulas)
  • This is the critical convoy safety fix: without in_progress, the convoy dispatch loop sees working beads as open/unassigned and force-steals them from polecats (root cause of 70% of polecat session deaths)

Test plan

  • go build ./... passes
  • go test ./internal/formula/ passes (including TestAllEmbeddedFormulas_VariableValidation)
  • Sling a bead with swarm formula, verify in_progress status transition
  • Sling a bead with task formula, verify PR creation flow

Generated with Claude Code

…nvoy safety

Split mol-polecat-work-monorepo into two explicit formulas:

- mol-polecat-work-monorepo-task: For standalone tasks creating PRs against
  main. Includes CI validation and AI review handling steps.

- mol-polecat-work-monorepo-swarm: For feature branch work via merge queue.
  No PR/CI/AI-review steps. Polecats rebase on feature branch, run gates
  locally, submit via gt done --pre-verified --target.

Both formulas (plus the base mol-polecat-work) add
`bd update {{issue}} --status=in_progress` as the FIRST action in
load-context. This is the critical convoy safety fix — without it, the
convoy dispatch loop sees working beads as open/unassigned and
force-steals them from polecats (root cause of 70% of polecat deaths).

The original mol-polecat-work-monorepo is preserved for backward
compatibility (rig configs may reference it) and also gets the
in_progress fix.

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
9321 5 9316 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.01s 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.01s)

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

description = """
Initialize your session and understand your assignment.

**0. IMMEDIATELY mark your bead as in-progress (convoy safety):**
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feel free to tell me not to do this, i know its the formula for all polecats by default so its precious, but as far as i can tell this is a real issue and helpful fix

@steveyegge
Copy link
Copy Markdown
Collaborator

Closing ahead of v1.0.0 — Gas Town is transitioning to Gas City. If still relevant, please re-file against the new project.

@steveyegge steveyegge closed this Mar 29, 2026
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