Skip to content

feat(docker): airc grid-join overlay — persona-in-Docker-as-grid-peer - #1661

Merged
joelteply merged 2 commits into
canaryfrom
feat/docker-airc-grid-join
Jun 20, 2026
Merged

joelteply merged 2 commits into
canaryfrom
feat/docker-airc-grid-join

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

What

A docker-compose.airc.yml overlay that stands up a node-local airc daemon and wires continuum-core to it, so the node's personas attach_as distinct peers and join the grid room as citizens. This is the remaining build from DOCKER-NODE-ARCHITECTURE.md §8.5 — the Docker equivalent of the proven native path (continuum #1645 / airc #1216).

Usage

GH_TOKEN=ghp_... docker compose -f docker-compose.yml -f docker-compose.airc.yml up
# 5090 GPU node:
GH_TOKEN=ghp_... docker compose -f docker-compose.yml -f docker-compose.gpu.yml -f docker-compose.airc.yml up

Overlay (not base) so the first-run docker compose up stays GH_TOKEN-free.

No code change needed

continuum-core already honors AIRC_DAEMON_SOCKET + AIRC_DEFAULT_ROOM_NAME (src/airc/discovery.rs), and airc/docker/airc-node.Dockerfile already exists. This is pure compose wiring.

Robustness (the "less flaky" contract)

  • No hardcoded socket version. The daemon binds daemon-v<N>.sock; hardcoding v5 breaks silently on an IPC bump. airc-node resolves the live socket via airc ipc-endpoint (the same resolver core's discovery uses) and publishes a stable symlink /node/.airc/airc.sock that core points at. The two halves can't desync.
  • Healthcheck gates on the exact socket core will dial (stable symlink → live socket) + daemon status — so depends_on: service_healthy means "ready to dial", not "process started".
  • Fail loud. Daemon down → no symlink → healthcheck never passes → full-citizen core refuses to boot. No silent grid-less half-citizen.
  • CONTINUUM_DISABLE_AIRC_AUTOINSTALL=1 so core never spins a second daemon.
  • Inline script $$-escaped; validated with docker compose config.

Validation (be honest)

Per the §8.5 matrix, prove on the Linux/NVIDIA box (5090) where grid-join AND capable inference both hold. A Mac container is CPU-only (LCD 0.5B) and Mac prod runs core native — don't judge persona quality from a Mac container, only grid-join provability. CI can't run docker compose up with a real token; docker compose config parses clean.

🤖 Generated with Claude Code

joelteply added a commit that referenced this pull request Jun 17, 2026
… (BigMama #1661 review)

Per BigMama's transport-grounded #1661 review: the default dial-out converges
without inbound reachability (one TLS connection carries both directions, keyed
by PeerId), so same-LAN (the 5090 validation) works as-is. The only residual is
a bounded latency window when a peer dials the container before its route-refresh
cycle. Document the optional `network_mode: host` toggle for lowest-latency
cross-host + both-behind-NAT, left off by default. Comment-only; config validates.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
joelteply and others added 2 commits June 19, 2026 20:11
Implements the remaining build from DOCKER-NODE-ARCHITECTURE.md §8.5: a node-
local airc daemon wired to continuum-core so the node's personas attach_as
distinct peers and join the grid room as citizens — the Docker equivalent of the
proven native path (continuum #1645 / airc #1216).

Two services in one overlay (opt-in; base `docker compose up` first-run stays
GH_TOKEN-free):
- airc-node: runs `airc daemon` from the existing airc/docker/airc-node.Dockerfile,
  carries the owner identity via GH_TOKEN (same account = same grid), advertises
  via AIRC_ADVERTISE_IP, shares its airc home on a named volume.
- continuum-core override: AIRC_DAEMON_SOCKET + AIRC_DEFAULT_ROOM_NAME (both
  already honored by core's discovery), mounts the shared home, depends_on the
  daemon being healthy. No code change — the env contract already exists.

Robustness (the "less flaky" contract):
- NO hardcoded socket version. The daemon binds daemon-v<N>.sock (N = IPC
  protocol); hardcoding v5 breaks silently on a bump. Instead airc-node resolves
  the live socket via `airc ipc-endpoint` (the SAME resolver core's discovery
  uses) and publishes a STABLE symlink /node/.airc/airc.sock that core points at.
  Version changes can't desync the two halves.
- Healthcheck gates on the EXACT socket core will dial (stable symlink resolving
  to a live socket) + daemon status, so depends_on:service_healthy means "the
  thing core needs is ready", not "a process started".
- Fail loud: daemon down -> no symlink -> healthcheck never passes -> full-citizen
  core refuses to boot. No silent grid-less half-citizen.
- CONTINUUM_DISABLE_AIRC_AUTOINSTALL=1 so core never spins a second daemon.
- Inline script $-escaped ($$) so compose passes it through verbatim; validated
  with `docker compose config`.

Validation: prove on the Linux/NVIDIA box (5090) per the §8.5 matrix — grid-join
AND capable inference both hold there. A Mac container is CPU-only (LCD) and Mac
prod runs core native; don't judge persona quality from a Mac container.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
… (BigMama #1661 review)

Per BigMama's transport-grounded #1661 review: the default dial-out converges
without inbound reachability (one TLS connection carries both directions, keyed
by PeerId), so same-LAN (the 5090 validation) works as-is. The only residual is
a bounded latency window when a peer dials the container before its route-refresh
cycle. Document the optional `network_mode: host` toggle for lowest-latency
cross-host + both-behind-NAT, left off by default. Comment-only; config validates.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@joelteply
joelteply force-pushed the feat/docker-airc-grid-join branch from 85cf9d8 to 88a241c Compare June 20, 2026 01:12
@joelteply
joelteply merged commit 91521a4 into canary Jun 20, 2026
3 checks passed
@joelteply
joelteply deleted the feat/docker-airc-grid-join branch June 20, 2026 01:20
joelteply added a commit that referenced this pull request Nov 7, 2026
…d it: continuum's airc pin moves past #1660 (card c3504a71) (#5824)

* A resident's submission records her commit, so the merge gate can land it: continuum's airc pin moves past #1660 (card c3504a71)

Fable's #5821 refusal table: every resident submission carried no head, and airc #1660's merge gate
(a passed independent review at a recorded head) refuses a headless submission, so no resident's work
could ever merge, blocking goal 2 (a resident's first merged PR). continuum pinned airc at b158a7e93,
which predates #1660, so work/submit could not record one.

- Cargo.toml: every airc crate b158a7e93 -> 22c9c0ee0 (airc canary: #1660 recorded heads, #1661
  latest_submission, #1663 the stacked-PR gate).
- work/submit records her checkout's committed HEAD (committed_head) as the submission's head, and
  the patch is that commit's diff against the base. While she holds changes the commit does not carry
  (tracked or untracked, outside the substrate paths the patch excludes) it is refused by name, naming
  code/git/commit: a submission is a commit, never her working tree, and the substrate never commits
  for her. A typed artifact names its head too (`head` param).
- One owner of "newest": continuum's card_holder::latest_submission (a copy of submissions.first())
  is deleted; its six callers read airc's WorkCard::latest_submission().
- Touched files leave with no self-sized sites: handoff.rs's five hand-cut ids render through
  airc_core::shown_id::shown_form; the build shas compare by prefix either way and render whole; the
  dirty paths, the diff sha256 and the obligations she resumes from render whole; work_similar's card
  text gives the embedder the whole body. latest_submission.rs runs git through one git_in helper
  (three spawn sites become one).
- Test literals of WorkSubmission/SubmitWork carry a head (Unrecorded where heads are not the subject).

Tests: continuum-mind work:: 86 pass, continuum-rooms handoff 8 pass, rooms lib 30 pass; mind/rooms/core
--tests check clean; ratchets vs origin/canary 87/87. a_worktree_with_no_base_is_refused_by_name now
proves an uncommitted change is refused naming code/git/commit and the derived head is the commit.
Mutation: without the dirty-tree refusal, it fails.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* A submission's patch is exactly its commit, base..head; a commit carrying an unpublished path is refused (Fable on #5824)

Fable: the gate merges the HEAD commit, but the artifact was candidate_diff (her checkout's diff minus
SOLUTION_PATH_EXCLUDES), so anything in her commit that the diff dropped would merge unreviewed; airc's
CLI submit enforces patch == git diff --binary base head for this reason. commit_patch now returns
exactly `git diff --binary base..head` (the same flags the patch was always rendered with), and a commit
that touches a path a submission never publishes (substrate or build byproducts) is refused by name.

Tests: continuum-mind work:: 84 pass; ratchets vs origin/canary 87/87. a_worktree_with_no_base_is_refused_by_name
now also commits .continuum/state.json and expects the refusal naming it. Mutation: without the refusal it
fails.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* protocol: WorkSubmitParams carries head (the regenerated ts-rs binding for #5824)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* work/submit passes the validated base to commit_patch (an unused variable was a new continuum-mind warning; CI's warning ratchet 13 -> 14)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* work/submit fixtures type their head; head's doc cut to one clause

A typed submission is complete only with the commit it ends at (the gate refuses one without),
so the training_credit fixtures that typed base and artifact but no head fell through to
deriving from a checkout and cloned acme/ordinary-project in CI. They now type head.
head's tool doc is cut to 'Omit: your checkout's committed HEAD.' (+42 surface tokens at
bce9206 with the longer text; the exact figure is pinned from this commit's CI).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* The agentic surface ceiling is re-pinned at 17956: work/submit's head param (measured in CI at 6b5069c)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant