#4832·gastown

doctor treats the town events/refinery channel directory as an unregistered rig

Author: jlrigauCreated Sep 8, 2026Updated Sep 8, 2026
Labelsstatus/needs-triage

Bug Description

Some gt doctor checks treat the town-level events directory as a registered rig after a refinery starts waiting for events. This produces configuration errors for a nonexistent events/refinery agent.

Steps to Reproduce

  1. Create a town with one registered rig, for example example_rig.
  2. Let the refinery run gt mol step await-event --channel refinery .... This creates <town>/events/refinery.
  3. Run gt doctor.
  4. Compare its reported rig paths with the registered rigs in <town>/mayor/rigs.json: events is not registered.

Expected Behavior

The town's event-channel directory is not a rig. Doctor should not expect rig settings, Claude settings, hooks, or a rig gitignore there.

Actual Behavior

Doctor reports missing configuration under events, even though only the real rig is registered. Observed diagnostics include:

  • claude-settings: missing <town>/events/refinery/.claude/settings.json
  • rig-settings: missing events/settings/
  • land-worktree-gitignore: missing .land-worktree/ entry for events
  • hooks-sync: missing settings for events/refinery

The directory contained no files when inspected. These diagnostics appeared after startup; they were absent from the initial doctor run.

Environment

  • Linux guest in Lima on macOS
  • Gas Town: 1.1.0 (ebef3c851e5e)
  • Beads: 1.0.3
  • Observed in two independently provisioned towns

Additional Context

The relevant code paths also remain in v1.2.1 and the main branch inspected:

  • molecule_await_event.go creates the channel directory with filepath.Join(townRoot, "events", awaitEventChannel).
  • claude_settings_check.go scans town subdirectories as candidate rigs but does not exclude events. Finding its refinery child triggers a missing-agent-settings report.

Runtime reproduction above was on v1.1.0; the newer-version observation is source inspection, not a separate runtime reproduction.

Using registered rigs for these checks, or consistently excluding town infrastructure directories, should avoid the false diagnostics.