Repository navigation
feat(ipc): typed AttachStart — the flood-by-default footgun dies at the type level (card c0cb6cdc) - #1114
Conversation
|
Adversarial review — VERDICT: APPROVE (card c0cb6cdc, commit aca9eeb, delta vs fix/join-live-edge-bf0b5790) Wire compat (the critical claim): verified empirically. Built a throwaway crate against the branch's airc-ipc and printed actual encodings:
Precedence: all 8 (from_now, from, coalesce) combos preserved. Call sites: monitor attach.rs covers all 4 CLI combos with identical wire bytes (coalesce builder applied independent of start). airc-lib daemon.rs initial attach and reconnect (cursor→After, none→Live) byte-identical to base. 10 daemon-test sites migrated; 6 of them intentionally moved from implicit full-replay to Tests: Minor notes (non-blocking): no test pins the exact serialized JSON for |
aca9eeb to
5a93b78
Compare
GitHub-hosted windows-latest has been queue-starved for days, blocking sentinel-approved merges (#1114) on a job that never starts. The 5090 grid node now runs a registered self-hosted runner (name=bigmama, labels=self-hosted,windows,x64, user-mode run.cmd; service install is queued for the next operator session). Scope: ONLY the cargo-test matrix leg moves. The clean-install smoke jobs in ci.yml stay on windows-latest on purpose — they perform real machine-wide winget installs and are only meaningful on a virgin box, which a persistent self-hosted runner is not. Security posture for self-hosted on a public repo: the repository's fork-PR approval policy has been set to all_external_contributors (verified via the actions/permissions API), so workflow runs from fork PRs require an explicit maintainer approval before any code reaches the runner. Co-Authored-By: Claude Fable 5 <[email protected]>
* ci(rust): route the Windows test leg to the self-hosted bigmama runner GitHub-hosted windows-latest has been queue-starved for days, blocking sentinel-approved merges (#1114) on a job that never starts. The 5090 grid node now runs a registered self-hosted runner (name=bigmama, labels=self-hosted,windows,x64, user-mode run.cmd; service install is queued for the next operator session). Scope: ONLY the cargo-test matrix leg moves. The clean-install smoke jobs in ci.yml stay on windows-latest on purpose — they perform real machine-wide winget installs and are only meaningful on a virgin box, which a persistent self-hosted runner is not. Security posture for self-hosted on a public repo: the repository's fork-PR approval policy has been set to all_external_contributors (verified via the actions/permissions API), so workflow runs from fork PRs require an explicit maintainer approval before any code reaches the runner. Co-Authored-By: Claude Fable 5 <[email protected]> * ci(rust): name the matrix legs explicitly — '(Array)' was the self-hosted leg's rendered job name Co-Authored-By: Claude Fable 5 <[email protected]> * ci(rust): self-hosted leg refuses fork-PR events in-workflow Sentinel residual-risk ask #1 on #1116: the fork-PR approval policy is a mutable repo setting; this guard makes the workflow refuse fork-origin PR events on the self-hosted leg regardless of settings drift. Hosted legs unaffected. Co-Authored-By: Claude Fable 5 <[email protected]> * ci: same-repo guard moves to step level — matrix context is unavailable in job-level if (fixes zero-jobs startup failures) Co-Authored-By: Claude Fable 5 <[email protected]> --------- Co-authored-by: Claude Fable 5 <[email protected]>
5a93b78 to
5e0632f
Compare
…he type level (card c0cb6cdc) bf0b5790 existed because AttachRequest's DEFAULT was the dangerous behavior: '..Default::default()' silently meant full-transcript replay, and three interacting fields (from, from_now, coalesce_backlog) carried precedence rules documented in a server-side comment. PR #1113 fixed the symptom at one call site; any of the 11 construction sites could re-create the flood by forgetting a flag. The protocol now states intent in one type: - AttachStart { Live (#[default]), After(IpcCursor), FromTranscriptStart }. Live is the only start that can never flood a consumer; both replaying variants must be named at the call site. - AttachRequest fields go private. Construction only via AttachRequest::new(channel, start) / ::live(channel) plus with_* builders; '..Default::default()' literals are impossible outside airc-ipc. - Wire encoding unchanged (from + from_now encode the enum), so version-skewed daemon/client pairs interoperate; a legacy bare request still decodes as FromTranscriptStart. The from_now-overrides-from precedence now exists in exactly ONE place (AttachRequest::start) instead of a comment, pinned by unit tests. - Daemon stream_attach matches on the typed start via into_parts() (moves filter vectors, no clone); 'Live + coalesce' is structurally a no-op rather than a documented caveat. - airc-lib daemon_subscribe + monitor CLI + 9 daemon-test sites move to constructors. Tests: 5 new unit tests pin wire round-trip per variant, legacy bare-request decode, precedence, Live-by-default, and into_parts. Full workspace suite green (81 test binaries); fmt + clippy clean. Co-Authored-By: Claude Fable 5 <[email protected]>
5e0632f to
793b429
Compare
|
Merging per tightened doctrine (bd61836b): ALL hosted legs COMPLETED green including the production no-silent-fallback gate; windows-self-hosted leg pending under the documented SAC-enforcement exception (NeedsOperator item 0 — OS policy on the runner box, not code signal). Sentinel record: full adversarial review at PR open (wire-compat verified empirically, 8 flag-combination enumeration, byte-identical TS encodings) — verdict comment 4673581570. This PR closes the arc that opened the session: AttachStart makes the flood-by-default unwritable at the type level. |
…ruth + name the gaps (#1338) * feat(backfill): peer-to-peer transcript backfill request/response (S1 of #47) A message published while a peer is unreachable is LOST, not queued — measured three times on 2026-08-08, once inside the investigation of it. Replay resumes from the RECEIVER's cursor against the RECEIVER's store, so a frame that never arrived cannot be replayed and the receiver cannot know it missed one. PULL, not an outbox. An outbox needs new per-event durable state AND an eviction decision (a queue growing while a peer is away a week is its own incident). Pull needs neither: the sender already has the events in its durable transcript, the receiver already holds a per-room cursor. Backfill is the daemon's existing resume, crossing a peer boundary instead of a process one. DeliveryLedger cannot serve this — it is per-peer COUNTERS, so it knows a peer has not acked but not WHICH events it missed. Carried on the existing command bus (request/reply/await_reply over FrameKind::Command); nothing new invented on the wire. Receive-side dedup already exists, so an overlapping page costs bandwidth, never correctness — which is what lets the asker be sloppy about its cursor. Extracted command_bus::reply_addressing: every responder needs (reply_to, correlation_id) off a request, and each one re-deriving it from raw headers is how they drift. `truncated` is on the response because a bounded page presented as a complete one lets the gap survive the mechanism built to close it — worse than no backfill, because it looks fixed. NOTHING CALLS THIS YET. The reconnect watcher is S2; landing them separately keeps this slice incapable of changing existing behaviour. Validated on ALL targets per [[validate-lib-tests-before-push]], not just --lib. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc * fix(ci): the windows leg was a phantom; docs: lead with delivery truth, name the gaps ## CI: a check that never ran, for months `cargo test (windows-self-hosted)` has been reporting a permanently-pending check on every PR. Not slow, not offline — the runner does not exist: gh api repos/CambrianTech/airc/actions/runners -> total_count 0 and bigmama itself has no runner service, no Runner.Listener process, and no actions-runner directory. On #1336 the job sat `pending` at 0s. It came one check away from blocking the canary->main release, while reporting Windows coverage that never ran a single test. The #1114 rationale for moving off hosted Windows (queue starvation) is stale: ci.yml's clean-install-windows and clean-install-windows-ps5 run on windows-latest and passed in 9m10s / 8m42s the same day. So the leg moves back to windows-latest, where it actually executes. This RESTORES Windows coverage rather than removing it. The fork-PR guard stays for the day a real self-hosted runner is registered. ## README: it never mentioned the one thing that makes airc different In 366 lines the word "ack" did not appear once. The lead was an inventory of plumbing ("channels, peers, presence, messages, typed headers, replay, and transport routing") — true, and no reason to care. The property that actually matters is delivery truth: most surfaces say "sent", airc says "delivered", with a count. That distinction did real work this week — a daemon at 21h uptime told us nothing, and `1305 of 1305 acked, rtt ~134ms` told us everything. Now it is the lead and a first-class part of Reliability, with the real command output. ## README: an honest gaps section There was none. Added "What Doesn't Work Yet" for four things hit while building ON airc, each of which reads as inattention or a broken peer when you meet it cold: `@Name` in a body is decorative (every send is MentionTarget::All, so a peer is structurally unable to see it was addressed), long bodies clip on the receiving side, an offline peer gets no store-and-forward, and the ACK proves transport delivery rather than that any agent read it. Verified rather than recalled: the MentionTarget::All hardcoding was re-grepped across the send sites, and the truncation was reproduced live in a two-part message whose second half never arrived. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
bf0b5790 existed because AttachRequest's DEFAULT was the dangerous
behavior: '..Default::default()' silently meant full-transcript
replay, and three interacting fields (from, from_now,
coalesce_backlog) carried precedence rules documented in a server-side
comment. PR #1113 fixed the symptom at one call site; any of the 11
construction sites could re-create the flood by forgetting a flag.
The protocol now states intent in one type:
FromTranscriptStart }. Live is the only start that can never flood
a consumer; both replaying variants must be named at the call site.
AttachRequest::new(channel, start) / ::live(channel) plus with_*
builders; '..Default::default()' literals are impossible outside
airc-ipc.
version-skewed daemon/client pairs interoperate; a legacy bare
request still decodes as FromTranscriptStart. The
from_now-overrides-from precedence now exists in exactly ONE place
(AttachRequest::start) instead of a comment, pinned by unit tests.
(moves filter vectors, no clone); 'Live + coalesce' is structurally
a no-op rather than a documented caveat.
to constructors.
Tests: 5 new unit tests pin wire round-trip per variant, legacy
bare-request decode, precedence, Live-by-default, and into_parts.
Full workspace suite green (81 test binaries); fmt + clippy clean.
Co-Authored-By: Claude Fable 5 [email protected]