Skip to content

fix: resolve retry + host bootstrap find-first (auto-resync) - #324

Merged
joelteply merged 1 commit into
canaryfrom
fix-resolve-retry-and-host-bootstrap-find-first
Apr 29, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix-resolve-retry-and-host-bootstrap-find-first

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Two complementary fixes for substrate convergence: channel_gist.resolve retries with backoff to bridge gh's gist-listing eventual consistency; cmd_connect host bootstrap consults find_existing before creating a new gist (was unconditional create → duplicates). Closes the auto-resync gap from #321 follow-up. Test scenario stale_config_auto_resyncs (#323) documents the regression class — currently red on an orthogonal teardown-orphan bug that's tracked separately.

…cture)

Two complementary changes for substrate convergence:

1. channel_gist.resolve() retries find_existing 3× with backoff
   (1.5s, 3s) to bridge gh's gist-listing eventual-consistency window.
   A peer reconnecting moments after another peer hosted previously
   missed the canonical because gh's listing hadn't propagated yet,
   resulting in a 3rd duplicate gist. Retry with backoff catches
   the propagation. AIRC_RESOLVE_NO_RETRY=1 opts out for callers
   that don't want to wait.

2. cmd_connect host bootstrap calls channel_gist.resolve before
   creating a new gist (#321 follow-up). Previously the host path
   bypassed find_existing and unconditionally created a new gist;
   if a canonical already existed on the gh account from a prior
   session, the host created a duplicate. Now adopts existing
   canonical when found.

Test scenario stale_config_auto_resyncs (introduced PR #323)
documents the regression class — pre-seeded bogus channel_gists
must be replaced on bounce. Currently red because of an orthogonal
bug (orphan subshells survive teardown and re-write airc.pid,
blocking the next spawn via #292 stomp guard) that needs its own
fix. The auto-resync mechanism is correct; the test harness needs
better orphan cleanup.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@joelteply
joelteply merged commit c8f3df7 into canary Apr 29, 2026
@joelteply
joelteply deleted the fix-resolve-retry-and-host-bootstrap-find-first branch April 29, 2026 17:00
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