Skip to content

Promote canary f2acb4a to main - #553

Closed
joelteply wants to merge 8 commits into
mainfrom
canary
Closed

joelteply wants to merge 8 commits into
mainfrom
canary

Conversation

@joelteply

@joelteply joelteply commented May 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Promote canary f2acb4a to main after focused mesh validation across Mac, Windows WSL2, Codex, Claude Code, and cross-scope agents.

Included since the last main promotion:

Live validation

  • Codex local slice on Mac: f2acb4a on canary, doctor --health healthy, gh governor no active backoff, #cambriantech + #general fresh, logs/whois/peers usable
  • Mac Claude continuum slices: f2acb4a on canary, Monitor streaming live, markers delivered, failures none
  • authenticator + vHSM: received validation markers single-arrival, ACKed over AIRC
  • Windows WSL2 continuum: VERSION=f2acb4a on canary, Monitor streaming live, cold-start phase markers t+0/0/1/4/9/11/19s, bidirectional marker, failures none

CI before promotion

Known non-blocking follow-ups

  • /whois does not yet expose broadcast-only peers like paired peers
  • Codex live mid-turn interrupts require a future Codex-side event surface; current hook digest is prompt-boundary only

joelteply and others added 8 commits May 6, 2026 21:58
Codex-spec'd UX follow-up to #545/#546: emit "→ [t+Ns] phase…"
lines at the top of slow operations so a user staring at a Monitor
task can tell "still working" from "hung." Without this, Windows
Monitor cold-starts produced 30-60s of total silence followed by
a flood of host-setup output — indistinguishable from a hang.

Helper: `_join_phase` (in cmd_connect.sh)

  - t0 anchored via $AIRC_WRITE_DIR/.cold_start_t0; survives across
    `_reexec_into host` (same scope, no env passing required).
  - Output goes to BOTH stdout (so Monitor surfaces it as a user-
    facing event) AND $AIRC_WRITE_DIR/airc-transport.log (so
    post-mortem traces show where the time went).
  - `_join_phase_done` clears the marker once the monitor stream
    attaches — the next `airc join` against an already-warm scope
    starts from t0=0 again, not "minutes since last boot."

Phase markers added at the slow points:

  - querying gh for mesh on this account (#X)
  - resolving room gist contents (<id>)
  - taking over stale host (re-exec into host mode)
  - hosting as 'NAME' — bootstrapping room gist
  - publishing host lease to existing room gist  /
    creating new room gist on this gh account
  - subscribing to #general (sidecar)
  - monitor stream attached — cold start complete

cmd_status: distinguish "starting" from "not running"

Pre-fix `airc status` reported `airc process: not running` whether
airc was genuinely absent OR mid-cold-start. Post-fix:

  - If `.cold_start_t0` exists AND age <= 600s, status reports
    `starting (airc join cold-start in progress, t+Ns)`.
  - Stale-marker guard: anchors >10min old are treated as orphaned
    (a join crashed without cleanup) and ignored, so the user gets
    the actionable "not running" message instead of a perpetually-
    rising "starting (t+86400s)".
  - cmd_connect entry-point also self-cleans stale anchors so a
    fresh join starts from a clean clock.

Verified locally on Windows WSL2 with isolated AIRC_HOME:

  $ bash test/smoke-coldstart
  → [t+0s]  querying gh for mesh on this account (#general)
  → [t+15s] resolving room gist contents (c68640ec...)
  → [t+17s] taking over stale host (re-exec into host mode)
  → [t+21s] hosting as 'win-continuum-8e97' — bootstrapping room gist
  → [t+25s] publishing host lease to existing room gist
  → [t+25s] subscribing to #general (host-mode sidecar)
  → [t+26s] monitor stream attached — cold start complete

  $ airc status
  airc process: starting (airc join cold-start in progress, t+34s)

  airc-transport.log includes per-phase timing entries for
  post-mortem of slow cold-starts.

Doesn't change any control-plane behavior — pure observability
addition. Single-source PATH invariant from #545 preserved.

Related — Windows Monitor cold-start surface trail:
  #533/#538/#541/#542/#543/#544/#545/#546 — correctness fixes
  THIS — UX/observability for the cold-start latency that remains
         after correctness is solid.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
docs: tighten README for main release
docs: align Codex runtime with join flow
…o-miss

fix(install): fail when cryptography is unavailable
feat(connect,status): cold-start phase telemetry (Windows UX)
@joelteply

Copy link
Copy Markdown
Contributor Author

Superseded by #554. #553 had the right canary head and green CI, but GitHub marked it DIRTY because README.md conflicted with the previous main merge topology. #554 is the resolved merge of origin/main + origin/canary, with README resolved to the reviewed canary README; tree matches origin/canary after resolution.

@joelteply joelteply closed this May 7, 2026
Copilot AI review requested due to automatic review settings May 7, 2026 06:55

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

Promotes canary f2acb4a to main, bundling recent documentation/integration updates plus installer hardening and improved join/status cold-start observability across supported runtimes (Claude Monitor, Codex, Windows WSL2, etc.).

Changes:

  • Refresh docs/skills to align around the public airc join lifecycle (including --attach in Monitor contexts) and updated Codex guidance.
  • Harden installation by making cryptography a hard dependency (fail-fast if unavailable).
  • Add cold-start phase telemetry in airc join and a status “starting” state keyed off a .cold_start_t0 anchor.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
skills/update/SKILL.md Updates update/restart instructions, especially for Codex/non-Monitor flows.
skills/resume/SKILL.md Adjusts resume guidance to use airc join --attach under Monitor.
skills/msg/SKILL.md Updates messaging notes for Codex/non-Monitor join + polling expectations.
skills/canary/SKILL.md Updates canary/rollback instructions and Monitor invocation.
README.md Rewrites README into a shorter install/quickstart/reference flow.
lib/airc_bash/cmd_status.sh Adds “starting” state when cold-start anchor exists but pidfile doesn’t.
lib/airc_bash/cmd_connect.sh Emits cold-start phase markers and manages .cold_start_t0 lifecycle.
integrations/openai-codex/README.md Updates Codex integration docs to rely on airc join (no manual nohup).
install.sh Adds fail() and makes cryptography importability a hard install requirement.
Comments suppressed due to low confidence (1)

skills/update/SKILL.md:49

  • In the Codex / non-Monitor flow, the instructions now only run airc join after an update but still claim the “airc process restarted on new code”. airc join short-circuits when a scope already has a live process, so it won’t reliably restart onto the newly pulled code without an explicit stop (e.g., airc teardown) or some other restart trigger. Adjust the steps and the success message so they reflect how restart actually happens.
### Codex / non-Monitor flow

Codex has no `Monitor` or `TaskStop`. Do not call those tools. Use the same public join lifecycle; the CLI detaches the local transport owner when needed:

```bash
airc join

After the bounce, run airc status and airc inbox for missed messages. Report one short sentence: Updated to <new-sha>; airc process restarted on new code.

</details>



---

💡 <a href="/CambrianTech/airc/new/main?filename=.github/instructions/*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.

Comment thread README.md
Comment on lines +29 to +35
The installer:

AIRC fixes that. The mechanics that make it work — auto-#general, cross-account share, and join-based recovery — are described in **The Magic** above. The properties that make it production-trustworthy:
- installs or checks `gh`, `python3`, and `openssl`
- runs `gh auth login -s gist` when needed
- creates airc's local Python environment
- puts `airc` on your PATH
- installs agent skills for detected tools such as Claude Code and Codex
Comment thread README.md
A GitHub account. install.sh handles the rest — installs `gh` if you don't have it, drops the airc binary on your PATH, sets up the local Python venv for the encryption library. `gh auth login` once and you're done.
- GitHub account with gist scope through `gh`
- `python3`
- `openssl`
Comment thread README.md
Comment on lines +190 to +196
## Security

```bash
airc version # short sha, branch, commit subject, install dir
airc update # git-pull install dir + refresh skill symlinks (idempotent)
```
- Direct messages between paired peers use X25519 + ChaCha20-Poly1305.
- Every message envelope is Ed25519-signed.
- Broadcast room messages are plaintext on the private gist so every subscribed peer can read them.
- Treat a room gist id as a room secret. Anyone with access to that gist can read plaintext broadcasts.
- Private identity files are stored locally and should be user-readable only.
Comment thread skills/canary/SKILL.md
Comment on lines 41 to 66
If canary breaks something:

```bash
airc update --channel main
airc join
```

That's it. Branch switch + restart monitor on the new code. Identity, peers, room state all persist (they're in `$AIRC_HOME`, not `$AIRC_DIR`).

## After switching

Tell the user:

> "Switched to canary (sha `<short-sha>`). Running airc process still uses old code — restart this scope to pick up the new binary."

Then if they had a paired session you should restart the current scope for them.

Claude Code:
```
Monitor(persistent=true, description="airc", command="airc join")
Monitor(persistent=true, description="airc", command="airc join --attach")
```

Codex / non-Monitor runtimes:
```bash
airc teardown
airc join
```
Comment on lines +42 to +55
_join_phase() {
local _t0_file="${AIRC_WRITE_DIR:-}/.cold_start_t0"
local _now _t0 _elapsed
_now=$(date +%s 2>/dev/null) || _now=0
if [ -n "${AIRC_WRITE_DIR:-}" ] && [ ! -f "$_t0_file" ]; then
mkdir -p "$AIRC_WRITE_DIR" 2>/dev/null || true
printf '%s\n' "$_now" > "$_t0_file" 2>/dev/null || true
_t0="$_now"
elif [ -f "$_t0_file" ]; then
_t0=$(cat "$_t0_file" 2>/dev/null || echo "$_now")
else
_t0="$_now"
fi
case "$_t0" in ''|*[!0-9]*) _t0="$_now" ;; esac
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