Skip to content

CRITICAL fix(part): honor room arg — pre-fix 'airc part QANAME' silently nuked default-room gist (B8 from b69f) - #441

Merged
joelteply merged 1 commit into
canaryfrom
fix/part-honor-room-arg-bus-stability
May 3, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/part-honor-room-arg-bus-stability

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Bus-stability bug. Mesh-splitting catastrophe.

Repro

airc part qa-test-room
# Expected: only qa-test-room is parted
# Actual: scope's DEFAULT room (e.g. #general) is parted — its gist deleted

Impact

I unknowingly triggered this in my own QA pass at ~21:00Z, deleting #general's gist 9740e0e1. b69f, other-mac, Codex, and Joel were all on that gist. Mesh split. I was on a separate fresh gist. b69f's bug-report message languished for HOURS in the dead gist before I noticed.

That's a 30-minute+ silent outage from a typo. Defeats #415 entirely.

Fix

cmd_part now branches:

  1. Arg given AND ≠ default room: look up gist via channel_gists, delete only if we host, remove from subscribed_channels, clear mapping. DO NOT touch primary scope state.
  2. No arg OR arg matches default: original behavior preserved.

Verification

  • bash -n clean
  • Code review confirms arg honored before any default-room state is touched

Pairs with

Credit to continuum-b69f for the catch.

🤖 Generated with Claude Code

… from continuum-b69f)

CRITICAL bus-stability bug. Pre-fix `airc part QANAME` IGNORED the
room arg and parted the scope's DEFAULT room — meaning a user who
typed `airc part qa-test-room` would actually delete #general's
gist. This split the mesh: every peer on #general was islanded
because the canonical gist disappeared.

Defeats #415's bus-stability principle (preserve gist across
teardown). Reproduced 2026-05-02 in my own self-QA — I ran
`airc part qa-deeper-5086` to clean up a test room and unknowingly
nuked #general's gist (9740e0e1c9...). Other peers (b69f, other-mac,
codex, joel) on the now-deleted gist couldn't reach me for HOURS.
b69f flagged it via the gist's residual write but their message
didn't reach my (now-different) gist until I checked manually.

Fix: cmd_part now branches on whether an arg was passed:

1. Arg given AND ≠ scope's default room name:
   - Look up that channel's gist via channel_gists
   - Try `gh gist delete` (succeeds if we host; ignores if not ours)
   - Remove from subscribed_channels
   - Clear channel_gists mapping
   - Return — DO NOT touch primary scope state

2. No arg, OR arg matches default room name:
   - Original behavior (delete primary host gist, clear primary state)

Net: room-specific part is now safe. Default-room part is unchanged.
A user typing `airc part qa-test` cannot accidentally nuke #general
ever again. Same protection extends to any non-default room arg.

This is a load-bearing fix for the substrate Joel calls our 'BIOS'
+ 'CVL trait'. A 30-min mesh outage from a typo is exactly the
brittleness the airc reliability sprint was meant to eliminate.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: continuum-b69f (caught + reported the bug via gist)
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings May 3, 2026 00:34
@joelteply
joelteply merged commit 9c9196b into canary May 3, 2026
10 checks passed
@joelteply
joelteply deleted the fix/part-honor-room-arg-bus-stability branch May 3, 2026 00:36
@joelteply
joelteply removed the request for review from Copilot May 3, 2026 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant