Commit Graph

1699 Commits

Author SHA1 Message Date
mayor
5cc2995345 chore(release): v0.5.0
All checks were successful
Release / goreleaser (push) Successful in 5m32s
Release / publish-npm (push) Has been skipped
Release / update-homebrew (push) Has been skipped
- Mail improvements: numeric index, hook alias, --body alias, bulk delete, parallel queries
- New aliases: gt bd, gt work, --comment, read
- OpenCode agent preset, config-based role system
- Deacon status line display, hook registry
- Squash merge in refinery
- Crew session stability fixes
- Many bug fixes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 23:05:00 -08:00
mayor
e57297cb1b fix(crew): don't kill pane processes when creating new session
KillPaneProcesses was being called on new sessions before respawn,
which killed the fresh shell and destroyed the pane. This caused
"can't find pane" errors on session creation.

Now KillPaneProcesses is only called when restarting in an existing
session where Claude/Node processes might be running and ignoring
SIGHUP. For new sessions, we just use respawn-pane directly.

Also added retry limit and error checking for the stale session
recovery path.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 22:46:00 -08:00
mayor
dff6c3fb3c feat: add aliases and deacon status line display
- Add 'bd' alias for 'gt bead' command
- Add 'work' alias for 'gt hook' command
- Show deacon icon in mayor status line when running

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 22:40:10 -08:00
mayor
fb4c415127 fix(crew): auto-recover from stale tmux pane references
When a session exists but its pane is gone (e.g., after account switch
or town reboot), 'gt crew at' now detects the "can't find pane" error
and automatically recreates the session instead of failing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 22:39:10 -08:00
dementus
b612df0463 feat(mail): add numeric index support to 'gt mail read'
Allow reading messages by their inbox position (e.g., 'gt mail read 3')
in addition to message ID. The inbox display now shows 1-based index
numbers for easy reference.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 21:55:07 -08:00
toast
785d9adfef feat(mail): add gt mail hook as alias for gt hook attach
Adds gt mail hook <mail-id> command that attaches a mail message to
the agents hook. This provides a more intuitive command path when
working with mail-based workflows.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 21:53:18 -08:00
capable
3d7b109395 feat(mail): add --body as alias for --message/-m in gt mail send
Users naturally try --body for the message body content (same semantic
field as --message but more precise - distinguishes body from subject).
Added as an alias following the same pattern as --address/--identity.

Closes: gt-bn9mt

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 21:52:19 -08:00
nux
b14835b140 fix(refinery): pass convoy ID to convoy check command
The runConvoyCheck function was running `gt convoy check` without
the convoy ID, which checked all open convoys. Now it passes the
specific convoy ID to check only the relevant convoy, as specified
in the requirements.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 21:51:21 -08:00
furiosa
35abe21c50 fix(convoy): pass specific convoy ID in ConvoyWatcher check
When an issue closes, the daemon ConvoyWatcher now passes the specific
convoy ID to gt convoy check instead of running check on all open convoys.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 21:48:32 -08:00
mayor
405d40ee4b fix(tmux): KillPaneProcesses must kill pane process itself, not just descendants
Claude Code has no descendants, so only killing descendants left orphans.
Now kills the pane PID itself with SIGTERM+SIGKILL after descendants.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 21:34:21 -08:00
gastown/crew/max
748fa73931 chore(formula): trim verbose witness-patrol description
Remove redundant routing rules and health check documentation
that was duplicating information available elsewhere.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 21:20:45 -08:00
gastown/crew/max
1dc31024ca feat(mail): accept multiple message IDs in delete command
Allow `gt mail delete` to accept multiple message IDs at once,
matching the existing behavior of archive, mark-read, and mark-unread.

Also adds --body as an alias for --message in mail reply.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 21:19:04 -08:00
mayor
94c2d71c13 fix(tmux): kill pane processes before all RespawnPane calls to prevent orphans
## Problem
Claude processes were accumulating as orphans, with 100+ processes piling up
daily. Every `gt handoff` (used dozens of times/hour by crew) left orphaned
processes because `tmux respawn-pane -k` only sends SIGHUP, which Node/Claude
ignores.

## Root Cause
Previous fixes (1043f00d, f89ac47f, 2feefd17, 1b036aad) were laser-focused on
specific symptoms (shutdown, setsid, done.go, molecule_step.go) but never did
a comprehensive audit of ALL RespawnPane call sites. handoff.go was never
fixed despite being the main source of orphans.

## Solution
Added KillPaneProcesses() call before every RespawnPane() in:
- handoff.go (self handoff and remote handoff)
- mayor.go (mayor restart)
- crew_at.go (new session and restart)

KillPaneProcesses explicitly kills all descendant processes with SIGTERM/SIGKILL
before respawning, preventing orphans regardless of SIGHUP handling.

molecule_step.go already had this fix from commit 1b036aad.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 21:09:30 -08:00
Adam Zionts
02390251fc feat: Add configurable polecat branch naming (#825)
feat: Add configurable polecat branch naming

Adds polecat_branch_template configuration for custom branch naming patterns.

Template variables supported:
- {user}: git config user.name  
- {year}/{month}: date (YY/MM format)
- {name}: polecat name
- {issue}: issue ID without prefix
- {description}: sanitized issue title
- {timestamp}: unique timestamp

Maintains backward compatibility - empty template uses existing format.
2026-01-21 20:53:12 -08:00
Julian Knutsen
0dfb0be368 fix(sling): auto-apply mol-polecat-work (#288) and fix wisp orphan lifecycle bug (#842) (#859)
fix(sling): auto-apply mol-polecat-work (#288) and fix wisp orphan lifecycle bug (#842)

Fixes the formula-on-bead pattern to hook the base bead instead of the wisp:
- Auto-apply mol-polecat-work when slinging bare beads to polecats
- Hook BASE bead with attached_molecule pointing to wisp  
- gt done now closes attached molecule before closing hooked bead
- Convoys complete properly when work finishes

Fixes #288, #842, #858
2026-01-21 20:52:26 -08:00
Steve Yegge
1feb48dd11 Merge pull request #460 from sauerdaniel/pr/shutdown-reliability
fix(shutdown): Improve gastown shutdown reliability
2026-01-21 20:33:54 -08:00
Steve Yegge
58d5226f30 Merge pull request #714 from boshu2/fix/mail-inbox-parallel
perf: parallelize mail inbox queries for ~6x speedup
2026-01-21 20:33:00 -08:00
mayor
c42b5db7ab fix(hook): normalize agent ID trailing slash in agentIDToBeadID (gt-az3jjb)
resolveSelfTarget returns "mayor/" with trailing slash per addressToIdentity
normalization, but agentIDToBeadID only checked for "mayor" without slash.

This caused `gt hook --clear` to fail with:
  Error: could not convert agent ID mayor/ to bead ID

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 19:51:19 -08:00
Roland Tritsch
2119841d57 fix(doctor): check patrol formulas instead of placeholder beads (#715)
Changes patrol-molecules-exist check to verify that patrol formulas
are accessible via `bd formula list` instead of looking for placeholder
molecule beads created by `bd create --type=molecule`.

## Problem

The check was looking for molecule-type beads with titles "Deacon Patrol",
"Witness Patrol", and "Refinery Patrol". These placeholder beads serve no
functional purpose because:

1. Patrols actually use `bd mol wisp mol-deacon-patrol` which cooks
   formulas inline (on-the-fly)
2. The formulas already exist at the town level in .beads/formulas/
3. The placeholder beads are never referenced by any patrol code

## Solution

- Check for formula names (mol-deacon-patrol, mol-witness-patrol,
  mol-refinery-patrol) instead of bead titles
- Use `bd formula list` instead of `bd list --type=molecule`
- Remove Fix() method that created unnecessary placeholder beads
- Update messages to reflect that formulas should exist in search paths

## Impact

- Check now verifies what patrols actually need (formulas)
- Eliminates creation of unnecessary placeholder beads
- More accurate health check for patrol system

Co-authored-by: Roland Tritsch <roland@ailtir.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-21 19:50:41 -08:00
Roland Tritsch
2514507a49 Fix GT_ROOT export for beads formula search compatibility (#718)
Problem:
- Gas Town sets GT_TOWN_ROOT environment variable
- Beads searches for formulas using GT_ROOT environment variable
- This naming inconsistency prevents beads from finding town-level formulas
- Result: `bd mol seed --patrol` fails in rigs, causing false doctor warnings

Solution:
Export both GT_TOWN_ROOT and GT_ROOT from `gt rig detect` command:
- Modified stdout output to export both variables (lines 66, 70)
- Updated cache storage format (lines 134, 136, 138)
- Updated unset statement for both variables (line 110)
- Updated command documentation (lines 33, 37)

Both variables point to the same town root path. This maintains backward
compatibility with Gas Town (GT_TOWN_ROOT) while enabling beads formula
search (GT_ROOT).

Testing:
- `gt rig detect .` now outputs both GT_TOWN_ROOT and GT_ROOT
- `bd mol seed --patrol` works correctly when GT_ROOT is set
- Formula search paths work as expected: town/.beads/formulas/ accessible

Related:
- Complements bd mol seed --patrol implementation (beads PR #1149)
- Complements patrol formula doctor check fix (gastown PR #715)

Co-authored-by: Roland Tritsch <roland@ailtir.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-21 19:50:38 -08:00
Julian Knutsen
1e97d1e637 Fix go-19z: updateAgentHookBead uses wrong directory for rig-level beads (#733)
When slinging work to an agent, updateAgentHookBead() was running
bd slot set from townRoot. But agent beads with rig-level prefixes
(e.g., go-) live in rig databases, not the town database. This caused
"issue not found" errors when trying to update the hook_bead slot.

Fix: Use beads.ResolveHookDir() to resolve the correct working directory
based on the agent bead's prefix before calling SetHookBead().

Co-authored-by: furiosa <spencer@atmosphere-aviation.com>
2026-01-21 19:32:13 -08:00
Louis Vranderick
7e5c3dd695 Add comprehensive tests for internal/dog package (#737) 2026-01-21 19:31:57 -08:00
aleiby
0cdcd0a20b fix(daemon): spawn Deacon immediately after killing stuck session (#729)
When checkDeaconHeartbeat detects a stuck Deacon and kills it, the code
relied on ensureDeaconRunning being called on the next heartbeat. However,
on the next heartbeat, checkDeaconHeartbeat exits early when it finds no
session (assuming ensureDeaconRunning already ran), creating a deadlock
where the Deacon is never restarted.

This fix calls ensureDeaconRunning immediately after the kill attempt,
regardless of success or failure, ensuring the Deacon is restarted
promptly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Executed-By: mayor
Role: mayor
2026-01-21 19:31:38 -08:00
Joshua Vial
aba0a5069c fix(seance): add tests and fix race condition in session index (#864)
Co-authored-by: joshuavial <git@codewithjv.com>
2026-01-21 19:30:49 -08:00
aleiby
a8bedd2172 fix(costs): add event to BeadsCustomTypes constant (#731)
* fix(costs): add event to BeadsCustomTypes constant

The gt costs record command creates beads with --type=event, but "event"
was missing from the BeadsCustomTypes constant. This caused stop hooks
to fail with "invalid issue type: event" errors.

Also fixes gt doctor --fix to properly register the event type when
running on existing installations.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(types): add message, molecule, gate, merge-request to BeadsCustomTypes

Extends PR #731 to include all custom types used by Gas Town:

- message: Mail system (gt mail send, mailbox, router)
- molecule: Work decomposition (patrol checks, gt swarm)
- gate: Async coordination (bd gate wait, park/resume)
- merge-request: Refinery MR processing (gt done, refinery)

Root cause: gt mail send was failing with "invalid issue type: message"
because message was never added to BeadsCustomTypes.

Also documents the origin/usage of each custom type in the constant.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Executed-By: mayor
Role: mayor

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 19:11:43 -08:00
aleiby
b9f5797b9e fix(refinery): use role-specific runtime config for startup (#756) (#847)
Use ResolveRoleAgentConfig instead of LoadRuntimeConfig to properly
resolve role-specific agent settings (like ready_prompt_prefix) when
starting the refinery. This fixes timeout issues when role_agents.refinery
is configured with a non-default agent.

Also move AcceptBypassPermissionsWarning before WaitForRuntimeReady to
avoid a race condition where the bypass dialog can block prompt detection.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 19:11:39 -08:00
aleiby
5791cd7e34 feat(doctor): add auto-fix capability to SessionHookCheck (#857)
Add Fix() method to SessionHookCheck to automatically update
settings.json files when 'gt prime' is used without '--hook'.
This enables 'gt doctor --fix' to repair existing installations
that use bare 'gt prime' in SessionStart/PreCompact hooks.

Changes:
- Changed SessionHookCheck to embed FixableCheck instead of BaseCheck
- Added filesToFix cache populated during Run()
- Implemented Fix() method that parses JSON and replaces 'gt prime'
  with 'gt prime --hook' in command strings
- Uses json.Encoder with SetEscapeHTML(false) to preserve readable
  ampersands in command strings

Closes: gt-1tj0c

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 19:11:34 -08:00
The App Agency
3931d10af3 fix(dashboard): use registered rigs for merge queue instead of hardcoded repos (#863)
The FetchMergeQueue function was hardcoded to query PRs from
michaellady/roxas and michaellady/gastown, causing the dashboard
to show unrelated PRs regardless of which rigs are actually registered.

This fix:
- Adds townRoot to LiveConvoyFetcher to access workspace config
- Loads registered rigs from mayor/rigs.json dynamically
- Adds gitURLToRepoPath helper to convert git URLs (HTTPS/SSH) to
  owner/repo format for the gh CLI
- Updates comments to reflect the new behavior

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 19:11:29 -08:00
Advaya Krishna
d67aa0212c feat(refinery): use squash merge to eliminate redundant merge commits (#856)
Replace MergeNoFF with MergeSquash in the Refinery to preserve the original
conventional commit message (feat:/fix:) from polecat branches instead of
creating "Merge polecat/... into main" commits.

Changes:
- Add MergeSquash function to internal/git/git.go
- Add GetBranchCommitMessage helper to retrieve branch commit messages
- Update engineer.go doMerge to use squash merge with original message

Fixes #855

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 18:12:40 -08:00
Erik LaBianca
b333bf8146 fix(install): Makefile uses go install to match docs (#851)
* fix(install): use go install to match docs

Makefile install target now uses 'go install' instead of cp to
~/.local/bin, aligning with documented installation method and
GOPATH/GOBIN conventions.

Closes: hq-93c
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(beads): set BEADS_DIR for config

* test(config,rig): update startup and bd stubs

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 18:12:38 -08:00
aleiby
1a0f2d6b3b fix(formula): clarify WITNESS_PING routing in witness patrol (#854)
Add explicit routing rules to ping-deacon step:
- WITNESS_PING always goes to deacon/, never to mayor/
- Mayor only receives ALERT messages (Step 3)
- Define what 'healthy' looks like (idle at prompt is normal)

This prevents the witness LLM from misinterpreting the formula
and sending raw WITNESS_PING messages to mayor instead of deacon.

Fixes: gt-uvz90
2026-01-21 18:12:20 -08:00
morsov
39b1c11bb6 fix(handoff): use env var fallback when town root detection fails
When the repo is in a broken state (wrong branch, detached HEAD, deleted
worktree), gt handoff would fail with "cannot detect town root" error.
This is exactly when handoff is most needed - to recover and hand off
to a fresh session.

Changes:
- detectTownRootFromCwd() now falls back to GT_TOWN_ROOT and GT_ROOT
  environment variables when cwd-based detection fails
- buildRestartCommand() now propagates GT_ROOT to ensure subsequent
  handoffs can also use the fallback
- Added tests for the fallback behavior

Fixes gt-x2q81.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 18:05:00 -08:00
dag
f6fab3afad feat(cmd): add --comment as alias for --reason in gt close
Add support for --comment flag as an alias for --reason in the
gt close command. This provides a more intuitive option name for
users who think of close messages as comments rather than reasons.

Handles both --comment value and --comment=value forms.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 18:04:58 -08:00
rictus
40cc4c9335 fix(identity): copy all agent fields during polecat identity rename
The rename operation was only copying AgentState and CleanupStatus,
missing HookBead (the primary fix), ActiveMR, and NotificationLevel.
This ensures all agent state is preserved when renaming an identity.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 18:04:55 -08:00
mayor
82079f9715 fix(sling): handle agent bead not found gracefully
Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-21 18:04:15 -08:00
mayor
53fd6bad33 fix(sling): don't show closed convoy tracking
Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-21 18:04:11 -08:00
mayor
6e2169de7f feat(orphans): add gt orphans kill command
Adds command to find and terminate orphan claude processes with PPID=1.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-21 18:04:00 -08:00
beads/crew/lizzy
d0e49a216a feat(hooks): add hook registry and install command (bd-qj9nc)
- Add hooks_registry.go: LoadRegistry(), HookRegistry/HookDefinition types
- Add hooks_install.go: gt hooks install command with --role and --all-rigs flags
- gt hooks list now reads from ~/gt/hooks/registry.toml
- Supports dry-run, deduplication, and creates .claude dirs as needed

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 17:40:05 -08:00
beads/crew/collins
6616a4726c feat(mail): support positional message arg in reply command
Allow `gt mail reply <id> "message"` in addition to `-m` flag.
This is a desire-path fix - agents naturally try positional syntax.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 17:28:47 -08:00
Steve Yegge
f00b0254f2 feat(config): add OpenCode as built-in agent preset (#861)
Add AgentOpenCode as a first-class built-in agent preset, similar to
Claude, Gemini, Codex, Cursor, Auggie, and AMP.

OpenCode preset configuration:
- Command: "opencode"
- Args: [] (uses Env for YOLO mode, no CLI flags needed)
- Env: OPENCODE_PERMISSION='{"*":"allow"}' for auto-approve
- ProcessNames: ["opencode", "node"] (runs as Node.js)
- SupportsHooks: true (uses .opencode/plugin/gastown.js)
- NonInteractive: run subcommand with --format json

Runtime defaults for opencode provider:
- ready_delay_ms: 8000 (delay-based detection for TUI)
- process_names: [opencode, node]
- instructions_file: AGENTS.md

This allows users to simply configure:
  role_agents:
    refinery: "opencode"

Instead of manually configuring agents.json and runtime settings.

Test coverage:
- TestOpenCodeAgentPreset: comprehensive preset validation
- TestOpenCodeProviderDefaults: runtime config defaults
- TestOpenCodeRuntimeConfigFromPreset: Env copying
- TestIsKnownPreset: includes opencode
- TestGetAgentPresetByName: opencode returns preset

Templates added:
- templates/agents/opencode.json.tmpl: agent config template
- templates/agents/opencode-models.json: model delay presets

Co-authored-by: Avyukth <subhrajit.makur@hotmail.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 17:20:57 -08:00
Steve Yegge
e12aa45dd6 feat(config): add Env field to RuntimeConfig and AgentPresetInfo (#860)
Add support for agent presets to specify environment variables that
get exported when starting sessions. This enables agents to use
environment-based configuration.

Changes:
- Add Env field to RuntimeConfig struct in types.go
- Add Env field to AgentPresetInfo struct in agents.go
- Update RuntimeConfigFromPreset to copy Env from preset
- Update fillRuntimeDefaults to preserve Env field
- Merge agent Env vars in BuildStartupCommand functions
- Add comprehensive tests for Env preservation and copy semantics

This is a prerequisite for the OpenCode agent preset which uses
OPENCODE_PERMISSION='{"*":"allow"}' for auto-approve mode.

Co-authored-by: Avyukth <subhrajit.makur@hotmail.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 17:20:09 -08:00
gastown/crew/jack
9f06eb94c4 feat(seance): support cross-account session access
Add ability to access sessions from other accounts when using gt seance --talk.
After gt account switch, sessions from previous accounts are now accessible
via temporary symlinks.

Changes:
- Search all account config directories in accounts.json for session
- Create temporary symlink from source account to current account project dir
- Update sessions-index.json with session entry (using json.RawMessage to preserve fields)
- Cleanup removes symlink and index entry when seance exits
- Add startup cleanup for orphaned symlinks from interrupted sessions

Based on PR #797 by joshuavial, with added orphan cleanup to handle ungraceful exits.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 15:54:36 -08:00
Subhrajit Makur
7a2090bb15 feat(config): add ShellQuote helper for safe env var escaping (#830)
Add ShellQuote function to properly escape environment variable values
containing shell special characters ({, }, *, $, ", etc.).

Changes:
- Add ShellQuote() that wraps values in single quotes when needed
- Escape embedded single quotes using '\'' idiom
- Update ExportPrefix to use ShellQuote
- Update BuildStartupCommand and PrependEnv in loader.go
- Add comprehensive tests for shell quoting edge cases

Backwards compatible: paths, hyphens, dots, and slashes are NOT quoted,
preserving existing agent behavior (GT_ROOT, BD_ACTOR, etc.).

This is a prerequisite for the OpenCode agent preset which uses
OPENCODE_PERMISSION='{"*":"allow"}' for auto-approve mode.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 15:49:39 -08:00
Boden Fuller
a5bbe24444 perf: parallelize mail inbox queries for ~6x speedup
The listFromDir function was making 3-6 serial bd subprocess calls
(one per identity variant × status). This caused gt mail inbox to take
~32 seconds in typical setups.

Change to run all queries in parallel using goroutines, reducing
inbox load time to ~5 seconds.

Implementation notes:
- Pre-allocate results slice indexed by query position (no mutex needed)
- Deduplication happens after wg.Wait() in single-threaded collection
- Existing error handling preserved (partial success allowed)

Fixes #705
2026-01-21 14:15:23 -05:00
gastown/crew/george
87f9a7cfd1 Merge branch 'fix/fresh-install-fixes-v2' 2026-01-21 10:52:05 -08:00
gastown/crew/george
78001d2c01 fix: update patrol_check tests and add cross-filesystem clone support
- Update patrol_check tests to expect StatusOK instead of StatusWarning
  for missing templates (embedded templates fill the gap)
- Add moveDir helper with cross-filesystem fallback for git clones
- Remove accidentally committed events.jsonl file

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 10:51:42 -08:00
gastown/crew/dennis
d96b53e173 Merge branch 'fix/multi-repo-routing-pr811-v2' 2026-01-21 10:44:46 -08:00
gastown/crew/dennis
fa1f812ce9 fix(beads): multi-repo routing for custom types and role slots
Fixes two bugs in multi-repo routing scenarios:

1. "invalid issue type: agent" error when creating agent beads
   - Added EnsureCustomTypes() with two-level caching (in-memory + sentinel file)
   - CreateAgentBead() now resolves routing target and ensures custom types

2. "could not set role slot: issue not found" warning when setting slots
   - Added runSlotSet() and runSlotClear() helpers that run bd from correct directory
   - Slot operations now use the resolved target directory

New files:
- internal/beads/beads_types.go - routing resolution and custom types logic
- internal/beads/beads_types_test.go - unit tests

Based on PR #811 by Perttulands, rebased onto current main.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 10:44:37 -08:00
mayor
77126283dd fix(done): allow completion when work pushed directly to main
Previously, `gt done` would fail with "0 commits ahead; nothing to merge"
if work was pushed directly to main instead of via PR. This blocked
polecats from completing even when their work was done, causing them to
become zombies.

Now, if the branch has no commits ahead of main, `gt done` skips MR
creation but still completes successfully - notifying the witness,
cleaning up the worktree, and terminating the session.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 10:42:07 -08:00
Subhrajit Makur
afc1ff04b1 feat(formula): add verification legs and presets to code-review (#841)
Add three new verification legs to the code-review convoy formula:
- wiring: detects dependencies added but not actually used
- commit-discipline: reviews commit quality and atomicity
- test-quality: verifies tests are meaningful, not just present

Also adds presets for common review modes:
- gate: light review (wiring, security, smells, test-quality)
- full: all 10 legs for comprehensive review
- security-focused: security-heavy for sensitive changes
- refactor: code quality focus

This is a minimal subset of PR #4's Worker → Reviewer pattern,
focusing on the most valuable additions without Go code changes.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 10:38:45 -08:00