Repository navigation
release(45.3.0): calls through a capped uplink stay live and come back - #1035
Merged
Merged
Conversation
A netem-like shaper for the harness (NetemUplink): one FIFO for everything a node sends, cut at HDLC frames, tail drop at 1000 packets, 28 B of IP/UDP per packet, at the server's 300 kbit/s, unscaled. topo_shaped builds a full mesh with one node's whole uplink behind it. whole_uplink_cap runs the server matrix's capped-uplink cell in process: every member publishes framed single-layer video (~190 kbit/s a copy) and m0 audio as a host packetizes it; m0's identity links carry bulk at the server's share; per-second tables break m0's egress down by class and link. Bars (uplink_cap_bars): audio within 800 ms >= 0.95 after a 2 s settle, audio gap <= 1 s, delivered video within 800 ms >= 0.95, no teardowns, recovery after the lift. W6/W4 are #[ignore] (2-minute capped runs; red until the scheduler). Witness of the pipe itself: the_netem_pipe_cuts_the_stream_at_hdlc_frames_and_keeps_every_byte. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012q7dLdkP5wzJXrqz2tEsf8
…ver the legs The stall verdict ages the oldest unproved Channel message from the first tick it was the oldest, which restarts at every proof: under a standing queue it reads near zero however deep the queue is. SendClock ages it from its SEND, from the watch tick's reading of each leg's newest sent sequence (wrapping 16-bit). The reading is the least of those ages past each leg's RTT floor, over every leg with something outstanding, and only with at least two such legs (the verdict's rule): a leg's age is a round trip, so one slow leg is that peer's queue, and only a backlog every leg sees is this node's. Once backlogged the kept leg alone counts. Read alone, the kept leg made every member of a room whose publisher was capped read the publisher's queue as its own. UplinkDrain (row DR) folds the readings into backlog episodes (in at 400 ms, out after a second under 200 ms) and keeps the last reading; while backlogged the own stream's offer goes to each kept leg every tick so the backlog stays visible. Gauge alm_uplink_backlog_ms; label alm_drain_entered; Call::uplink_drain(); a test seam turning the 45.3 queue rules off (the bench's W_NO_DRAIN baseline). Witnesses: the_drain_enters_at_400_ms_and_leaves_after_a_second_under_200, a_send_clock_ages_the_oldest_unproved_message_from_its_send. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012q7dLdkP5wzJXrqz2tEsf8
One sending rate R for everything edge hands the uplink, set from the backlog reading by delay-based AIMD (over 400 ms x0.7, at most once per the backlog's depth clamped to 0.5-1 s; under 100 ms +R/32 (floor 8 kbit/s), +R/8 after 5 s clear; lifted after 3 s clear while under 60 % used). A token bucket at R serves control (never held, counted), then audio, then video, then bulk. Own media is admitted per frame, whole (every fragment to every leg) or not at all; a relay admits per CHUNK: the fragment marker that says where a frame ends is inside the end-to-end AEAD, so a relay cannot see a frame's extent. Video resuming after held frames is counted (av_video_keyframe_wanted: the point a host would be asked for a keyframe). Gauge alm_media_budget_bps, the rate a host's encoder sizes itself to; Call::media_budget_bps(). From the CC review: - FIRST class. An identity-plane send is charged like control and never held unless the code that built it knows it is bulk (a task-local send class read at Transport::send). Replication messages are classed from their row family (replication::egress_class): key, revocation, accord (halts and carriage), membership/roster, epoch (key_grant), session, consent and moderation rows are FIRST; chat, file, scores and the directory planes are BULK; a dimension, kind or envelope edge cannot place is FIRST. Content and blob-chunk replies and swarm holding claims are BULK. - The floor. Bulk has a guaranteed share of R (10 %, at least 8 kbit/s) paced by its own bucket; its bits come out of R so media yields it; waiters are FIFO; nothing is held to be released as a burst. On the faithful W6 bench the floor costs audio nothing measurable (0.322-0.354 within 800 ms with it, 0.313-0.316 without; bulk 27 vs 10 kbit/s). Witnesses: no_budget_until_the_backlog_reads_over_400_ms, the_rate_falls_while_backlogged_climbs_when_clear_and_lifts_when_unused, control_always_then_audio_then_video_then_bulk, bulk_gets_its_floor_under_full_media_and_never_bursts, a_removal_rides_first_and_a_chat_row_bulk, what_edge_cannot_place_rides_first, and on the bench a_room_removal_leaves_at_once_while_video_is_held (mid-cap, video held: a removal in 110-450 ms, a chat row 6.7-8.2 s behind queued bulk; 3/3). The bench host packetizes 60 ms audio while the media budget is under what 20 ms audio costs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012q7dLdkP5wzJXrqz2tEsf8
While the uplink backlog reads over the live-media staleness budget (MEDIA_STALE_BUDGET, 800 ms) a media chunk handed to the uplink would be dropped at every receiver, so the sender drops it instead, audio included, own and relayed alike, and counts it (av_chunk_dropped_stale_at_sender). Control is never touched. The queue drains even when audio alone does not fit. Scope: the live push path, profile-0 streams (all edge publishes). Witness: media_is_dropped_at_the_sender_once_the_backlog_is_past_800_ms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012q7dLdkP5wzJXrqz2tEsf8
A receiver (and a relay) drops media more than MEDIA_STALE_BUDGET above its AGE floor: the least wall-minus-source_ts seen for the stream in this epoch, so clock skew between hosts cancels. Dropped and counted, never delivered, never relayed on. Judged at the pump per chunk and again per whole frame at hand-out to the host (a frame waiting on its other fragments or the reorder window reached the host 837-918 ms above its floor on the capped bench). From the CC review: the floor lives one (stream, epoch) and restarts at each roll, keeping RM1's drift re-anchor; RM2 keeps the stream's own floor. Scope: the live push path, for presentation, profile-0 streams (a profile-1 accountable stream is exempt when edge publishes one). The capped-shed witness is re-barred to what AGE makes true (its 70 % heard bar held only while relays passed on whatever reached them, however late): no listener parentless after the settle; no frame handed out more than 800 ms above its floor; relayed listeners get >= 0.9 of the direct child's fresh frames (13 runs: worst 0.964); shed to one child; no teardowns. 10/10 alone, 3/3 under taskset -c 0. Witnesses: media_is_stale_past_800_ms_above_its_floor_whatever_the_clock_skew, a_stream_that_starts_late_is_judged_from_its_first_on_time_chunk, a_publisher_clock_step_for_one_chunk_is_forgotten_at_the_roll, a_capped_publisher_sheds_to_one_child_and_the_rest_are_relayed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012q7dLdkP5wzJXrqz2tEsf8
…ot dead A relay offers a stream only while it forwards it (its upstream healthy), and under AGE it drops stale media rather than pass it on: a child of such a relay saw an offering parent send nothing and failed over. A subscribed parent is now not charged silence while its offer for the stream is fresh (2.5 s), says forwarding, and advertises an upstream past the 800 ms budget. When that ends it owes chunks from then (the excused span is not charged at once), under the unchanged bound; a parent offering an on-time upstream and sending nothing is still a black hole and is failed over. The offers say how late they are: the publisher's own offer carries its send-clock backlog; a relay's upstream latency is at least its parent's advertised one plus half the RTT, and at least what it drops as stale in the last 2.5 s (its smoothed meter lagged a building queue). No wire change. A debug line (target ciris_edge::c3_rx) logs each C3 frame received, with an offer's advertised upstream latency. Witnesses: a_parent_that_still_offers_is_alive_and_one_that_stops_is_not, and a_capped_publishers_children_move_themselves_and_come_back with its bars unchanged (no parentless listener, <= 2 moves), 5/5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012q7dLdkP5wzJXrqz2tEsf8
…e stalled (a) The stall verdict stops detecting within seconds under a standing queue (its age restarts at each proof), and every stall behaviour (one direct child, standbys get nothing, offers to non-children at the liveness minimum) lapsed with the queue still full. A backlog episode now counts as a detection. (b) A stalled node relays one stream's room at most and has none to offer; its relay offers were 4 of the 5 offers a second m0 sent every member under the W6 cap. They are not sent while stalled; the own stream's offer, each leg's liveness, goes on. Witness: a_draining_uplink_is_stalled_and_offers_nothing_it_relays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012q7dLdkP5wzJXrqz2tEsf8
Unreleased entry: the backlog reading, the egress budget with FIRST class and the bulk floor, rows STALE and AGE, offer-as-life, the stall fixes; known: a relay drops and admits per chunk (the fragment marker is inside the end-to-end AEAD), and audio on the faithful bench is still under its bar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012q7dLdkP5wzJXrqz2tEsf8
…5 schedules the uplink; keyframes, NAT observer, peer reach, one address rule Calls (models R24-R33, CIRISEdge branch model/45.3-rules): - Offer-as-life on the publisher's signed word only. A backlog STAMP (C3 0x08, 124 B, CAP_BACKLOG_STAMP; stream, epoch, send time, declared backlog, highest chunk sealed; the stream's bound chunk key signs it) sent from a 300 ms queue word and whenever the publisher withholds media, to every member each second; a relay forwards the latest it verified byte for byte and never mints one. A verified stale chunk is the publisher's word too: forwarded one a stream per second, usable once by seq and under 6 s late, never delivered, never an arrival; stale chunks alone excuse at most 5 s until the parent delivers. The excuse needs a stamp declaring > 800 ms fresh net of it, or a fresh stale chunk; a first chunk's grace is a stamp's backlog. A relay's own claim excuses nothing. - leviculum v0.34.0+ciris.5: the transport's egress scheduler follows the budget at 2x R (at 1.10x it bound first and the call never came back); media carries its kind; Channel sends their class; its queue joins the backlog reading; FIRST envelopes ride the Channel before any Resource. - AGE floors need a confirming pair (R27); the most late stale drop is advertised (R29b); one leg's backlog is read and a drain ends on every leg (R25); the bulk floor is debited only by what it serves (R28); G8 reads the send clock (R24); withdraws, duty and ownership ride FIRST, counted by family. - CallEvent::KeyframeWanted, at most once a second per stream. - Logs: ciris_edge::alm_decision and ciris_edge::stamp at debug, key ids only. NAT and reach: - The second NAT observer (the bundle facilitator's dial port + 1). - Edge::peer_reach (Live / Dialable / Unreachable / Unknown), PyO3 and UniFFI; bindings regenerated. - One address predicate on both sides of a direct link (a known peer sharing a room or named as a contact, never while anonymous), re-read on every standing change; a link whose peer no longer passes is retired and its background re-proposals dropped. identified_only now follows the rule. Gates: wide clippy -D warnings; lib 3068 passed; alm_mesh_stage2 44 passed (3 ignored) in 8 batches; av_call_805 11; av_call_nat_805 12; direct_links_805 42; link_stall_926 3; log_citations; observability_metrics 7; uniffi drift clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012q7dLdkP5wzJXrqz2tEsf8
Version 45.3.0 (MINOR: additive API, one additive capability-gated C3 frame). leviculum v0.34.0+ciris.5 by tag; persist and Verify unchanged. Evidence rows, README (and its plain-language P2P section) and MISSION status, CHANGELOG and release notes. Operations: the bridge publishes the canonical's dial port + 1 over UDP, with canonical-1's firewall allow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012q7dLdkP5wzJXrqz2tEsf8
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
… pool witness sends bulk The backlog stamp lives in av_chunk_auth, which only the Reticulum module builds: the C3 STAMP variant, its encoder and decoder arm are gated the same way (core, packet-radio and the uniffi drift lane compile without it). The cancelled-send pool witness holds Resource ships; an unclassed send is FIRST and now rides the Channel first, so its send is BULK. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012q7dLdkP5wzJXrqz2tEsf8
…; hand-out AGE allows for the hand-off; FIRST no longer rides the Channel on dialled lanes - R34 ShedMovers.tla: the movers spare the lowest-ranked direct child they hear offering the stream on; the publisher shed by rank over its whole ledger and could keep a lower-ranked child the movers could not see, shedding the relay they had moved to (the come-back witness, ~1 run in 3: three primary changes). The publisher now records its children's relay offers of its own stream and sheds that spared child last. Witness: an_over_commit_shed_keeps_the_relay_the_movers_chose. - Hand-out staleness is judged 20 ms inside the budget, for the hand-off. - A FIRST envelope on a dialled lane goes as a Resource again: on the Channel it counted Delivered once handed to leviculum, so a send over a link the far side refused read as delivered (link_seal_e1). - The ALM decision trace carries the stream; one witness line per period. Gates: come-back witness 5/5; shed, removal, kept-child-lost; link_seal_e1 53; link_pool_819 6; lib av_call + realtime_av_alm 315; wide clippy clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012q7dLdkP5wzJXrqz2tEsf8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
45.3.0 (MINOR): calls through a capped uplink send what will arrive in time, keep relays only on the publisher's signed word, and come back after the cap lifts. Plus the second NAT observer,
peer_reach, and one address rule on both sides of a direct link. leviculum v0.34.0+ciris.5 by tag; persist and Verify unchanged.Calls (models R24–R33, branch
model/45.3-rules)The uplink backlog reading, the egress budget (control > audio > video > bulk, with a bulk floor), and rows STALE and AGE.
Offer-as-life on the publisher's word only. Two signed sources excuse a silent parent:
STAMP: a new capability-gated C3 frame, signed by the stream's chunk key;Stale chunks alone excuse at most 5 s. A relay's own claim excuses nothing.
leviculum ciris.5's scheduler follows the budget at 2× R. FIRST envelopes ride the Channel.
CallEvent::KeyframeWanted, at most once a second per stream.Debug logs
ciris_edge::alm_decisionandciris_edge::stamp, carrying key ids only.NAT / reach
Edge::peer_reach, via PyO3 and UniFFI; bindings regenerated.identified_onlynow behaves asroom_peers.Ops: the bridge publishes the canonical's dial port + 1/udp, plus canonical-1's firewall allow.
Gates, run locally on this tree
-D warningsalm_mesh_stage2(8 batches)av_call_805av_call_nat_805direct_links_805link_stall_926log_citationsobservability_metricsKnown limits are in CHANGELOG.md:
🤖 Generated with Claude Code