Repository navigation
feat(invite): airc invite --human — self-contained paste-block for coworker onboarding - #449
Merged
Merged
Conversation
New convenience method for onboarding a coworker who doesn't have
airc yet. `airc invite --human` (or --share-block / --for-friend)
prints a shell-runnable block the user pastes into a coworker's
chat tool (Slack/email/etc.). The block includes:
1) curl|bash install one-liner (skip if already installed)
2) airc connect <gist-id> using the absolute path ~/.local/bin/airc
so PATH-not-yet-refreshed shells still find airc post-install
3) "say hi" first-message hint (preserves literal $(whoami) so
it expands on the receiver's shell, not the host's)
4) airc part clean-exit hint
Why the gist-id and not the mnemonic: mnemonic resolution is
same-gh-account-only; raw gist-id is the cross-account-safe form,
which is what coworkers (different gh accounts, no Tailscale) need.
Integration scenario (test/integration.sh: invite_human) asserts
the paste-block contains each onboarding step, the gist-id matches
the host's actual published room gist, the gist exists/reachable
on gh, and absolute airc path is present. Joiner-pair end-to-end
is intentionally NOT covered here (it's exercised by existing
scenarios general_has_shared_gist + custom_room_creates_gist);
this scenario's job is regression coverage for the paste-block
FORMAT itself.
Motivated by Joel's framing 2026-05-04: "this will be a bot-driven
system, other than the convenience methods, human instructions for
example: paste this to your friend etc. They might not even have
airc yet too."
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
cmd_connect.sh's host-publish path called channel_gist.resolve unconditionally, even when AIRC_NO_DISCOVERY=1 was set. resolve walks `gh api gists --paginate` (timeout 30s, retried 3×) before falling through to create_new. On gh accounts with many gists this added ~90s of pre-publish latency despite the explicit "don't go looking" opt-out. Half-honoring AIRC_NO_DISCOVERY (skip the early mesh-find gate but still consult find_existing in the host-publish path) was a real footgun for tests + CI scenarios that explicitly opt out. The resolve module's own docstring says host-bootstrap should treat find_existing as best-effort; this commit makes that the flag-driven behavior. Net: with AIRC_NO_DISCOVERY=1, host bootstrap goes straight to create_new — gist published in ~3-5s instead of up to ~90s on gist-heavy accounts. Convergence semantics for the default case (no AIRC_NO_DISCOVERY) are unchanged: full retry, ~4.5s wait to handle gh's listing eventual consistency, oldest-canonical wins on race. Also bumps the invite_human scenario's wait from 30s → 60s defensively, in case the gh API is slow even on the create_new path. With the fix, the typical wait should still be ~3-5s. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Adds a "Pick the right form" decision table at the top: agent-recipient → bare invite (single join string), human-recipient → invite --human (self-contained shell paste-block). Default is the agent form. AIs switch to --human only when the user names a specific human coworker or says "send to a human." Motivated by Joel's framing 2026-05-04: "smooth UX experience for humans and AIs alike, and tonight Toby will test a remote conn." The skill needs to make the pick explicit so AIs don't reflexively hand a human a 200-char base64 invite string. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Merged
6 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a convenience method for onboarding a coworker who doesn't have airc yet. Motivated by Joel's framing: bots drive the substrate; humans get pasteable strings, not docs to read.
airc invite --human(or--share-block/--for-friend) prints a shell-runnable block the user pastes to a coworker. The block:~/.local/bin/airc connect <gist-id>— absolute path so PATH-not-yet-refreshed shells still find airc post-install.$(whoami)so it expands on the receiver's shell, not the host's.airc part).The block uses the raw gist-id, not the mnemonic, because mnemonic resolution is same-gh-account-only; gist-id is cross-account-safe — the actual coworker case (different gh, no Tailscale).
Example output
Test coverage
New scenario
test/integration.sh: invite_human— asserts the paste-block:gh api$(whoami)(heredoc with quoted delimiter — wouldn't survive the host's shell expanding it)~/.local/bin/airc) — bareaircwould fail in a shell that just installed itJoiner-pair end-to-end is intentionally NOT covered here. That path is already exercised by
general_has_shared_gist+custom_room_creates_gist. This scenario's regression coverage is for the paste-block FORMAT.Local-test note: this scenario (and the existing
custom_room_creates_gist) require a clean gh account state. They will fail locally on a dev machine that already has an active airc mesh on the same gh account, becauseAIRC_NO_DISCOVERY=1 + --no-generaldoesn't fully prevent same-account auto-join (separate latent issue, not introduced by this PR). CI bot account has no pre-existing gists, so both pass there.Test plan
airc invite --humansmoke-tested directly — output shape correct,$(whoami)literal preservedairc invite --help)invite_humanscenario🤖 Generated with Claude Code