Skip to content

Make join the recovery surface - #494

Merged
joelteply merged 1 commit into
canaryfrom
fix/join-recovers-irc-surface
May 4, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/join-recovers-irc-surface

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Summary

  • make airc join the public recovery surface for create/join/resume/repair flows
  • update daemon launchers and AI skills/docs to teach join, including doctor --join
  • make join repair a missing daemon monitor for the current scope instead of telling agents to remember daemon commands
  • prevent split-brain on bounce by preferring the durable room marker and by updating the gist-list cache immediately after creating a room gist

Validation

  • bash -n airc lib/airc_bash/*.sh
  • find lib -name '*.py' -print0 | xargs -0 .venv/bin/python -m py_compile
  • git diff --check
  • ./airc doctor --join
  • ./airc doctor --tests invite_human — 10 passed
  • ./airc doctor --tests solo_mesh_warns — 9 passed
  • ./test/integration_smoke.sh stale_config_auto_resyncs — 2 passed
  • ./test/integration_smoke.sh round_trip — 2 passed
  • real continuum scope daemon restart + status: monitor running, 2 fresh channel heartbeats

Notes

connect remains an internal/hidden alias in dispatch so old scripts do not explode during transition, but public help, skills, daemon launchers, invite blocks, and recovery instructions now use join.

Copilot AI review requested due to automatic review settings May 4, 2026 23:53
@joelteply
joelteply merged commit 76be41a into canary May 4, 2026
8 checks passed
@joelteply
joelteply deleted the fix/join-recovers-irc-surface branch May 4, 2026 23:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR promotes airc join to the primary/public recovery surface (create/join/resume/repair) across the CLI, daemon launchers, docs, skills, and tests, while keeping connect as a hidden/back-compat alias in dispatch. It also hardens room convergence to reduce split-brain on bounce by preferring durable local room markers and updating the local gist-list cache immediately after room gist creation.

Changes:

  • Renamed user-facing guidance from connect → join across skills/docs/tests, and updated doctor flows to teach doctor --join.
  • Updated cmd_connect.sh (join/connect implementation) to self-heal missing scope monitor via daemon restart, and to prefer durable room_gist_id markers over potentially stale channel_gists.
  • Added airc_core.channel_gist remember-created to immediately seed the local gist-list cache after creating a room gist to mitigate GitHub list eventual consistency.

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/integration.sh Updates invite paste-block assertions to expect airc join instead of airc connect.
test/integration_smoke.sh Smoke test now validates airc join --help path.
skills/update/SKILL.md Updates bounce/recovery guidance to use airc join.
skills/repair/SKILL.md Reframes /repair as identity/pairing corruption recovery; updates reconnect step to join.
skills/join/SKILL.md Updates troubleshooting guidance to prefer airc join as the recovery action.
skills/invite/SKILL.md Updates invite paste-block documentation and failure-mode guidance to airc join.
skills/doctor/SKILL.md Updates doctor command table and guidance to airc doctor --join.
skills/canary/SKILL.md Updates canary rollback/restart instructions to use airc join.
README.md Updates documentation to doctor --join and reframes join as the public interface.
lib/airc_core/collaboration.py Updates doctor output instructions from connect to join.
lib/airc_core/channel_gist.py Adds cache seeding helper + CLI subcommand to record newly created room gists in the local discovery cache.
lib/airc_bash/lib_auth.sh Updates self-heal guidance to reference airc join.
lib/airc_bash/cmd_update.sh Updates “restart to pick up new code” hint to airc join.
lib/airc_bash/cmd_teardown.sh Updates disconnect messaging to reference airc join.
lib/airc_bash/cmd_status.sh Updates stale pidfile guidance to airc join.
lib/airc_bash/cmd_send.sh Updates monitor-down remediation instructions to airc join.
lib/airc_bash/cmd_rooms.sh Updates rooms/invite UI strings and error messages to airc join.
lib/airc_bash/cmd_rename.sh Updates “not initialized” hint to airc join.
lib/airc_bash/cmd_kick.sh Updates re-pair guidance to airc join.
lib/airc_bash/cmd_identity.sh Updates “no config” hint to airc join.
lib/airc_bash/cmd_doctor.sh Adds/teaches --join while keeping --connect alias; updates output copy.
lib/airc_bash/cmd_daemon.sh Updates daemon launchers and copy to run airc join.
lib/airc_bash/cmd_connect.sh Implements join-as-recovery behavior, durable room marker preference, and gist-cache seeding hook.
airc Updates top-level help text and re-exec to use join; keeps connect as a dispatch alias to cmd_connect.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 1674 to +1682
local _gist_id="${_gist_url##*/}"
local _hh; _hh=$(humanhash "$_gist_id" 2>/dev/null)
if [ "$use_room" = "1" ]; then
"$AIRC_PYTHON" -m airc_core.channel_gist remember-created \
--channel "$room_name" \
--gist-id "$_gist_id" \
--description "$_gist_desc" \
--payload-file "$_gist_tmp" 2>/dev/null || true
fi
Comment on lines +91 to +109
if not gist_id:
return
cached = _load_cached_gist_list(float("inf")) or []
cached = [g for g in cached if g.get("id") != gist_id]
now = datetime.now(timezone.utc).replace(microsecond=0).isoformat().replace("+00:00", "Z")
filename = f"airc-room-{channel}.json"
cached.insert(0, {
"id": gist_id,
"description": description,
"created_at": now,
"updated_at": now,
"files": {
filename: {
"filename": filename,
"content": json.dumps(envelope),
}
},
})
_save_cached_gist_list(cached[:_GIST_LIST_LIMIT])
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.

2 participants