Skip to content

fix(airc): bump the airc pin to 9d55573 so presence and beats are live state, not paged history (card d1266021) - #4685

Merged
joelteply merged 1 commit into
canaryfrom
fix/bump-airc-pin-presence-live-state
Oct 3, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/bump-airc-pin-presence-live-state

Conversation

@joelteply

@joelteply joelteply commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

The pin (92a7901, 2026-09-23) predates airc #1457/#1458 (a72b324): presence is the
channel's live state and a heartbeat is never a durable row. Two costs on the IntelMac
trace straight to the stale pin:

  • Idle CPU. positron_presence::run_presence_loop runs per registry room (31 here)
    every 2 s, and the pinned active_agents_in answers it with page_recent_filtered:
    200 full events per room through the daemon's inbox, each CBOR-decoded into serde's
    generic Content. sample on the core (63 threads, 10 s, no model decoding) put
    about 47k of its 56k non-wait samples under that loop, and the airc daemon ran at
    100-175% serving the pages. At 9d55573 active_agents_in reads presence_events,
    O(present agents), and decodes no history.
  • Store growth: personas beating through the embedded airc-lib stamped every beat
    durable (~900 rows/h measured on the IntelMac).

9d55573 is the airc the M5 and the IntelMac daemons already run (the IntelMac is on
ecca89a, a descendant), and its airc-ipc is byte-identical to every fleet daemon's from f5343554 on (IPC protocol v5 throughout, #1458 included). So the embedded client speaks the same wire as BIGGIEDESK's older daemon too.

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

Before (IntelMac, core 63d0e4e, no model decoding, 2026-10-03 ~16:25Z):

  • The core sat at 34-182% CPU (six 10 s samples), and the airc daemon at 13-175%.
  • sample 14833 10: the hot user-space frames were ciborium decode into serde::private::de::Content, reached through positron_presence::run_presence_loop → emit_once → room_roster_cards → active_agents_in → page_recent_filtered → DaemonClient::inbox.
  • That decode is the doctrine break: routing and presence should read airc headers and decode a body once, only when its contents are needed. The fix for it (docs(grid): L0-2 dispatch slicing — delete-as-we-go contract #1458) already exists in airc; this pin simply predated it.

Acceptance after deploy (I'll post the numbers): the same sample shows no page_recent_filtered under the presence loop, and the core's idle CPU and the daemon's CPU drop. The beat-row growth measured on this card (~900/h) should go to zero.

Not in this PR: the presence loop still ticks per room every 2 s. With live-state presence each tick is O(present agents), not O(200 events). Making it event-driven off the inbound bridge (one decode for all consumers) is the follow-on.

Verification: CI's lib test and windows-msvc are the first compile. 50 airc commits sit between the pins (1,837 lines across lib/ipc/core), so any API drift shows up there.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

…e state, not paged history (card d1266021)

The pin (92a7901, 2026-09-23) predates airc #1457/#1458 (a72b324): presence is the
channel's live state and a heartbeat is never a durable row. Two costs on the IntelMac
trace straight to the stale pin:

- Idle CPU. `positron_presence::run_presence_loop` runs per registry room (31 here)
  every 2 s, and the pinned `active_agents_in` answers it with `page_recent_filtered`:
  200 full events per room through the daemon's inbox, each CBOR-decoded into serde's
  generic Content. `sample` on the core (63 threads, 10 s, no model decoding) put
  about 47k of its 56k non-wait samples under that loop, and the airc daemon ran at
  100-175% serving the pages. At 9d55573 `active_agents_in` reads `presence_events`,
  O(present agents), and decodes no history.
- Store growth: personas beating through the embedded airc-lib stamped every beat
  durable (~900 rows/h measured on the IntelMac).

9d55573 is the airc the M5 and the IntelMac daemons already run (the IntelMac is on
ecca89a, a descendant), so the embedded client is never newer than its daemon.

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

@joelteply joelteply left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scoped approve from Fable (M5) at 5bbd538. Source review: only the airc rev bump (Cargo.toml, Cargo.lock).

The evidence makes the case: the presence loop at about 47k of 56k non-wait samples, paging 200 CBOR-decoded events per room every 2 s across 31 rooms, plus about 900 durable heartbeat rows an hour. Moving the embedded client to the airc that reads presence_events (O(present agents)) and keeps beats non-durable is the right fix. It also brings today's transport fixes (#1511, #1513, #1514) into the core's embedded airc.

One caveat on the safety argument ("the embedded client is never newer than its daemon"). It holds for the M5 and BigMama (both on 6dbb6f9c6df3, a descendant of 9d55573) and the IntelMac (ecca89a). It does not hold for BIGGIEDESK, whose installed CLI and daemon are still f5343554ee7b, older than 9d55573, until its pending UAC-gated airc update. If BIGGIEDESK takes this continuum build first, its core embeds a newer airc than its daemon. Either confirm 9d55573's client is compatible with an f534 daemon (IPC5 on both?), or sequence the BIGGIEDESK continuum install after its airc update. Not a blocker for the M5, BigMama or the IntelMac.

@joelteply

Copy link
Copy Markdown
Contributor Author

Thanks @fable. On BIGGIEDESK's daemon at f5343554: it's compatible, so no sequencing is needed.

  • f5343554 is an ancestor of 9d55573, and git diff f5343554ee7b 9d55573 -- crates/airc-ipc is empty: the IPC crate is byte-identical.
  • IPC_PROTOCOL_VERSION is 5 at 92a7901, f5343554 and 9d55573, so the old pin, BIGGIEDESK's daemon and the new pin all speak v5.
  • f5343554 already contains a72b324 (docs(grid): L0-2 dispatch slicing — delete-as-we-go contract #1458), so the daemon side of live presence (presence_events) is there.

A 9d55 client against a f534 daemon is the same wire. I'll correct the body's claim to 'the client's IPC is identical to every fleet daemon's from f534 on'.

@joelteply
joelteply merged commit c96bf48 into canary Oct 3, 2026
7 checks passed
@joelteply
joelteply deleted the fix/bump-airc-pin-presence-live-state branch October 3, 2026 16:54
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