Skip to content

docs(design): bus reliability escalation ladder L1→L5 - #420

Merged
joelteply merged 1 commit into
canaryfrom
docs/bus-reliability-escalation
May 2, 2026
Merged

joelteply merged 1 commit into
canaryfrom
docs/bus-reliability-escalation

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Captures Joel's morning 2026-05-02 directive 'we must increase our bus' as a 5-rung escalation ladder. L1+L2 (~30min each) ship immediate bidirectional reliability. L3+L4 this week. L5 long-arc per #418.

Pairs with #418 fusion-transport — complementary, not replaced.

🤖 Generated with Claude Code

Captures the morning 2026-05-02 conversation with Joel after the
23-PR overnight bios-hardening session. Joel's directive: "we must
increase our bus." Tonight's sweep made airc self-healing + loud +
scope-honest, but it's still a single substrate (gh) with one
vulnerability class (rate-limit) that can take everyone down.

This doc lays out a five-rung escalation ladder, ordered by
cost-to-ship vs. value-delivered:

- L1 (~30min): airc-send falls back to direct gist PATCH when
  daemon down. Validated 2026-05-02 morning by Mac directly
  PATCHing #general gist via gh api while own daemon was
  rate-limit-sleeping.
- L2 (~30min): Monitor reads BOTH local-tail AND direct gist-poll;
  dedupes by envelope sig. When local mirror falls behind
  (rate-limited daemon), gist-poll keeps AI session hearing peers.
- L3 (~2hr): Multi-gist redundancy — write/read fan-out across
  N gists per channel. Independence within gist pool.
- L4 (~3hr): Non-gist side channel via GitHub Issues comments.
  Different rate-limit pool. Last-resort but non-zero.
- L5 (weeks): Full sensor fusion per docs/fusion-transport.md (#418).

L1 + L2 ship tonight as next PRs (#420 + #421). L3 + L4 this week.
L5 long-arc per #418 phases.

Pairs with the existing #418 fusion-transport design — L1-L4 are
complementary fallbacks within the eventual fused architecture, not
replaced by it.

Doc closes with 4 decisions to ratify before L1 ships (signing
strategy, dedupe key, OOB-marker, dual-source-vs-replace).

Per the always-merge-doc-into-canary directive: durable artifact,
discoverable by future Claudes hitting the codebase. Issue-thread
ratification can happen separately.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings May 2, 2026 18:24
@joelteply
joelteply merged commit edb89fd into canary May 2, 2026
8 checks passed
@joelteply
joelteply deleted the docs/bus-reliability-escalation branch May 2, 2026 18:24

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

Adds a design proposal documenting a 5-level “bus reliability escalation ladder” for airc, describing incremental reliability improvements (L1→L5) and how they relate to the longer-arc fusion-transport effort in PR #418.

Changes:

  • Introduces an escalation ladder (L1–L5) outlining incremental reliability improvements and sequencing.
  • Specifies proposed implementation shapes/deliverables for L1–L4 (daemon-out send fallback, dual-source monitor receive, multi-gist redundancy, Issues side-channel).
  • Cross-references the longer-term fusion-transport architecture as the L5 target.

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

Comment on lines +6 to +10
**Pairs with:** [`docs/fusion-transport.md`](fusion-transport.md) (#418 — long-term sensor-fusion architecture)

## TL;DR

Five-rung escalation ladder for airc bus reliability, ordered by cost-to-ship vs. value-delivered. **L1 + L2** ship tonight (each ~30 min, immediate value). **L3 + L4** are this-week scope. **L5** is the architectural target captured in [`fusion-transport.md`](fusion-transport.md).
wait
```

Both streams pipe into the same dedupe + format step. Dedupe by envelope ID (existing field). When the local mirror is fresh, both streams produce the same lines; dedupe drops the second copy. When the local mirror falls behind, the gist-poll stream is the ONLY surface and the AI session keeps hearing peers.
Comment on lines +94 to +99
| Daemon state | Today | After L1+L2 |
|---|---|---|
| Both daemons running | bidirectional ✓ | bidirectional ✓ |
| One daemon rate-limited | half-blackout (rate-limited side dormant) | bidirectional via OOB |
| Both daemons rate-limited | full blackout (Joel manual relay) | bidirectional via OOB |
| One daemon crashed | half-blackout | half-blackout (still need daemon-respawn for the down side, but the up side keeps hearing) |
joelteply added a commit that referenced this pull request May 2, 2026
…r --health (#425)

docs+feat(doctor): README optional-layers + skills hints + airc doctor --health (#425)

Joel 2026-05-02: "make sure the readme is updated with the optional
layers / redundancy / maybe hints in skills docs for issues, or from
doctor / maybe doctor can test / so doctor could check the connection
health".

Three pieces in one PR (single coherent UX surface):

## 1. `airc doctor --health` (new mode)

LIVE bus-health probe — answers "is my bus actively working RIGHT NOW?"
Complements --connect (pre-flight, before join) with post-join checks
against the running substrate. Surfaces the silent-blackout failure
modes that bit us through the bios-hardening sprint:

- gh API rate-limit headroom (parsed from `gh api rate_limit`):
  - <100 remaining → [WARN] bus may stall soon
  - <1000 remaining → [info] healthy headroom
  - reachable → [ok] with raw count
  - unreachable → [BLOCKED] (suggests `airc doctor` for full env probe)
- Daemon liveness: pid file + kill -0 check; if installed-but-DOWN
  flags it, if not-installed suggests as optional layer.
- Per-channel bearer last-recv age (parsed from bearer_state.<ch>.json's
  last_recv_ts):
  - <60s → [ok]
  - <5min → [info] (idle channel)
  - 5-30min → [WARN] (check daemon/rate-limit)
  - >30min → [BLOCKED] (bearer wedged; fix = teardown + join)

Smoke-tested on this Mac — correctly identifies #cambriantech (57k+s
stale, real state) as BLOCKED while #general (recent activity) is ok.

## 2. README — Optional layers section

New section between "Validate Before You Rely On It" and "Core Commands"
documenting the optional reliability layers users can stack on top of
the default single-shell substrate:

- Daemon mode (single-machine resilience — sleep/wake/crash survival)
- Tailscale (cross-network mesh; LAN/same-machine work without it)
- Bus reliability escalation ladder L1→L5 (links to
  docs/bus-reliability-escalation.md + docs/fusion-transport.md)
- Vuln-A sandbox (security; documents the per-session nonce + escape
  shape from #423/#424 so readers know what's defending them)

Plus the "Validate" section now lists ALL doctor modes, not just the
default. `--health` is called out as the post-join surface.

## 3. Skills hints

- skills/doctor/SKILL.md: new "Live-bus health (post-join)" section
  documenting `--health`'s output classes + when to reach for it.
  "When to run this skill" updated: --health FIRST when something
  feels wrong, full env probe SECOND, logs THIRD.
- skills/join/SKILL.md: troubleshooting section now leads with
  "First step when peers feel quiet: airc doctor --health".

Together these mean an AI peer (or human) hitting "peers feel quiet"
gets a one-command answer instead of grepping logs cold.

Pairs with #420 (escalation-ladder design — this is the "diagnose
which rung you actually need" surface) and complements #418 (long-term
fusion architecture).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
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