Skip to content

fix: sling retry noise, convoy cross-rig routing, mail error detection#3511

Open
maloferriol wants to merge 2 commits intogastownhall:mainfrom
maloferriol:main
Open

fix: sling retry noise, convoy cross-rig routing, mail error detection#3511
maloferriol wants to merge 2 commits intogastownhall:mainfrom
maloferriol:main

Conversation

@maloferriol
Copy link
Copy Markdown

Summary

  • Sling retries: Reduce SetAgentStateWithRetry from 10 retries (~2min) to 3 (~3.5s). Agent state is monitoring-only; caller treats errors as warn-only.
  • Convoy cross-rig routing: Fix bdListChildren to use resolveBeadDir (returns parent of .beads) instead of beadsDirForID (returns .beads itself, causing bd to look for .beads/.beads/). Also strip BEADS_DIR and fix raw exec.Command in createStagedConvoy.
  • Mail error detection: Add "no issue found" match to all ContainsError checks. bd returns "no issue found matching" but mail only checked for "not found", preventing cross-rig wisp fallback from triggering.

Test plan

  • bd show sh-wisp-xxx works from both town and shipyard contexts
  • gt mail read sh-wisp-xxx returns wisp content
  • bd create from town root generates hq- prefix (not sh-)
  • bd show, bd close work for both prefixes
  • gt convoy create --from-epic with cross-rig dependencies
  • gt sling completes without 2-minute retry delay

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 [email protected]

1. SetAgentStateWithRetry: reduce retries from 10 (2min) to 3 (3.5s).
   Agent state is monitoring-only; caller already treats errors as
   warn-only. Avoids blocking interactive `gt sling` on persistent
   Dolt failures. (hq-bfp7, hq-htfi)

2. bdListChildren: use resolveBeadDir instead of beadsDirForID. The
   latter returns the .beads directory itself, causing bd to look for
   .beads/.beads/ which doesn't exist. Also strip BEADS_DIR from env,
   consistent with bdShow/bdDepList. (hq-db5)

3. createStagedConvoy: replace raw exec.Command with BdCmd builder
   using Dir()+StripBeadsDir(), preventing inherited BEADS_DIR from
   routing bd to the wrong database. (hq-db5)

Co-Authored-By: Claude Opus 4.6 <[email protected]>

Executed-By: mayor
bd returns "no issue found matching" for missing beads, but the mail
package only checked for "not found" substring. This prevented the
cross-rig fallback from triggering when looking up wisps (sh-wisp-*)
that route to shipyard but live in hq.

Add "no issue found" as an additional match pattern in all
ContainsError checks across mailbox.go and delivery.go.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

Executed-By: mayor
@github-actions github-actions bot added the status/needs-triage Inbox — we haven't looked at it yet label Apr 3, 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.

1 participant