You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
id DoS catalogue: presence boundary oracle contradicts PresenceTable truncation — over-bound heartbeats are accepted with 64 channels, not dropped (PR #7738 review finding) #8063
id DoS catalogue: presence boundary oracle contradicts PresenceTable truncation (over-bound heartbeats are accepted, not dropped)
Finding (from PR review)
On PR #7738 (docs(id): record DoS scenario catalogue for #5892), Codex review comment 4506648818 (chatgpt-codex-connector[bot], 2026-11-08T15:00:03Z, doc/2026-11-08_decision_id5892_dos_scenario_catalogue.md:67):
Match the presence boundary oracle to channel truncation. For a correctly signed heartbeat containing 65 channels, the existing receiver does not drop the heartbeat: PresenceTable::update_at in pkgs/id/src/chat_presence.rs:282-312 deduplicates and membership-filters channels, retains at most 64, and accepts the resulting heartbeat. receive_presence_heartbeat verifies the signature before calling this normalization path. Requiring over-bound heartbeats to be dropped would therefore make the planned regression gate fail against intentional current behavior. Specify bounded retained channels as the oracle, keeping invalid-signature rejection separate, or explicitly identify rejection as a proposed protocol change.
No-response evidence
No replies in the comment thread; the review thread is unresolved (GraphQL reviewThreads verified 2026-11-09: thread for comment 4506648818 has isResolved: false).
PR docs(id): record DoS scenario catalogue for #5892 #7738 head is unchanged at 13935742d16959fa87ef6cfdedf4391c437f0f11 since the comment; no fix commit followed it. The Codex review summary on the PR records has_unresolved_findings: true. The finding is past the 24-hour grace period for open PRs.
Still-live evidence (current PR head)
Raw reads at head 13935742d1 agree:
The catalogue's Presence profile states: "including heartbeat with 64 channels and with 65; the channel bound is 64 (pkgs/id/src/chat_presence.rs). Over-bound/invalid signatures are dropped" — conflating the over-bound case with the invalid-signature case.
pkgs/id/src/chat_presence.rsupdate_at (lines ~282-312): the channel loop breaks once channels.len() >= MAX_HEARTBEAT_CHANNELS, deduplicates and membership-filters, rebuilds the heartbeat with the truncated channel set, inserts it, and returns true (accepted). A correctly signed 65-channel heartbeat is accepted with 64 channels, not dropped.
Acceptance criteria
The catalogue's presence boundary oracle specifies bounded retained channels (truncate to 64 and accept) as the expected behavior for a correctly signed over-bound heartbeat, with invalid-signature rejection specified separately, OR the catalogue explicitly identifies drop-on-over-bound as a proposed protocol change.
Resolving by a documented decision on this issue is also acceptable.
Filed by the pr-comment-review job (run 2026-11-09 15:54 CST) under the queue cutover: labels applied at filing, standard agent note posted after filing, and a repo-task/v1 triage packet (kind: triage, priority 30) enqueued on repo-health-code-pilot.
Task: Triage the validated, unaddressed review finding: DoS catalogue presence boundary oracle contradicts PresenceTable truncation. Verify against current code before any fix.
Expectation: effort class s; done = defect fixed, or resolved by a documented decision on this issue.
Decision (per task 14422 acceptance, second route): the catalogue's presence oracle is truncate-and-accept — a correctly signed over-bound heartbeat is accepted with its retained channel set truncated to 64. Drop-on-over-bound is not current behavior and is not adopted; if it is ever wanted, it must be proposed explicitly as a protocol change. Invalid-signature rejection stays a separate oracle.
Evidence (fresh, 2026-11-09 ~22:10Z, read on the laptop clone / GitHub at PR head):
Catalogue at that head, doc/2026-11-08_decision_id5892_dos_scenario_catalogue.md ("Presence over gossip" profile): "including heartbeat with 64 channels and with 65; the channel bound is 64 (pkgs/id/src/chat_presence.rs). Over-bound/invalid signatures are dropped" — conflates the over-bound case with the invalid-signature case, exactly as the finding states.
pkgs/id/src/chat_presence.rs: MAX_HEARTBEAT_CHANNELS = 64 (line 77); PresenceHeartbeat::new truncates to 64 (line 119); PresenceTable::update_at (lines ~282-312) dedups and membership-filters channels, breaks at 64, inserts the rebuilt heartbeat, and returns true (accepted). Existing tests update_at_dedups_wire_channels_before_the_cap and update_at_keeps_every_distinct_channel_past_duplicate_fill pin dedup-before-cap as intentional.
pkgs/id/src/commands/serve.rs:2190receive_presence_heartbeat: signature verification happens before update_at; a heartbeat whose signature does not verify is dropped (returns false). So invalid-signature = dropped, over-bound-but-valid = truncated + accepted — two different oracles.
Fix (scoped, doc-only): on PR #7738's branch queue/10502-5892-dos-scenario-catalogue, rewrite that profile sentence so the 65-channel correctly signed case specifies bounded retained channels (truncate to 64, heartbeat accepted, valid member heartbeat remains visible and expires normally), with invalid-signature rejection specified separately. If PR #7738 has merged by the time the follow-up is claimed, apply the same edit to the doc on main in a new PR; if the in-branch fix already landed, verify-and-close issue #8063. Replying to / resolving the source Codex thread is out of scope (pr-comment-review job rules, per the task 14422 packet).
Routing: follow-up small_fix task 14424 enqueued from this triage (gated on PR #7738 state as above). Task 14422 completes as triaged. Issue #8063 stays open for the follow-up fix (task 14424).
Agent note - fixed in-branch on PR #7738 - Agent: queue worker (repo-worker-code), lane code-y - Session/ID: task 14424, repo-queue-worker-shift-y 2026-11-09 16:04 CST run. Task 14424 (small_fix, direct lane row 5622) for issue #8063: corrected the DoS catalogue Presence profile in doc/2026-11-08_decision_id5892_dos_scenario_catalogue.md on PR #7738's branch queue/10502-5892-dos-scenario-catalogue, commit aee427d. The profile now specifies that a correctly signed heartbeat with 65 channels is accepted with retained channels truncated to 64 (MAX_HEARTBEAT_CHANNELS, pkgs/id/src/chat_presence.rs update_at - verified fresh at lines 77/119/285), and that invalid-signature heartbeats are dropped separately (receive_presence_heartbeat, pkgs/id/src/commands/serve.rs:2190). Doc-only; no Rust changes; the source Codex thread on PR #7738 was not replied to or resolved per the packet. Closing issue #8063 per task 14424 acceptance (fix landed in-branch, landing PR #7738 linked); PR #7738 itself remains open for its own #5892 lifecycle.
Activity
developing-today commentedon Nov 9, 2026
CODE-2383
dezren39 commentedon Nov 9, 2026
🤖 Agent note · filed
dezren39 commentedon Nov 9, 2026
🤖 Agent note · triage findings — task 14422 (lane code-x)
Verdict: defect CONFIRMED at PR #7738 head; documented decision taken; gated follow-up enqueued.
Decision (per task 14422 acceptance, second route): the catalogue's presence oracle is truncate-and-accept — a correctly signed over-bound heartbeat is accepted with its retained channel set truncated to 64. Drop-on-over-bound is not current behavior and is not adopted; if it is ever wanted, it must be proposed explicitly as a protocol change. Invalid-signature rejection stays a separate oracle.
Evidence (fresh, 2026-11-09 ~22:10Z, read on the laptop clone / GitHub at PR head):
13935742d16959fa87ef6cfdedf4391c437f0f11— unchanged since Codex comment 4506648818.doc/2026-11-08_decision_id5892_dos_scenario_catalogue.md("Presence over gossip" profile): "including heartbeat with 64 channels and with 65; the channel bound is 64 (pkgs/id/src/chat_presence.rs). Over-bound/invalid signatures are dropped" — conflates the over-bound case with the invalid-signature case, exactly as the finding states.pkgs/id/src/chat_presence.rs:MAX_HEARTBEAT_CHANNELS = 64(line 77);PresenceHeartbeat::newtruncates to 64 (line 119);PresenceTable::update_at(lines ~282-312) dedups and membership-filters channels, breaks at 64, inserts the rebuilt heartbeat, and returnstrue(accepted). Existing testsupdate_at_dedups_wire_channels_before_the_capandupdate_at_keeps_every_distinct_channel_past_duplicate_fillpin dedup-before-cap as intentional.pkgs/id/src/commands/serve.rs:2190receive_presence_heartbeat: signature verification happens beforeupdate_at; a heartbeat whose signature does not verify is dropped (returnsfalse). So invalid-signature = dropped, over-bound-but-valid = truncated + accepted — two different oracles.Fix (scoped, doc-only): on PR #7738's branch
queue/10502-5892-dos-scenario-catalogue, rewrite that profile sentence so the 65-channel correctly signed case specifies bounded retained channels (truncate to 64, heartbeat accepted, valid member heartbeat remains visible and expires normally), with invalid-signature rejection specified separately. If PR #7738 has merged by the time the follow-up is claimed, apply the same edit to the doc on main in a new PR; if the in-branch fix already landed, verify-and-close issue #8063. Replying to / resolving the source Codex thread is out of scope (pr-comment-review job rules, per the task 14422 packet).Routing: follow-up small_fix task 14424 enqueued from this triage (gated on PR #7738 state as above). Task 14422 completes as
triaged. Issue #8063 stays open for the follow-up fix (task 14424).docs(id): correct DoS catalogue presence oracle to truncate-and-accept (
dezren39 commentedon Nov 9, 2026
Agent note - fixed in-branch on PR #7738 - Agent: queue worker (repo-worker-code), lane code-y - Session/ID: task 14424, repo-queue-worker-shift-y 2026-11-09 16:04 CST run. Task 14424 (small_fix, direct lane row 5622) for issue #8063: corrected the DoS catalogue Presence profile in doc/2026-11-08_decision_id5892_dos_scenario_catalogue.md on PR #7738's branch queue/10502-5892-dos-scenario-catalogue, commit aee427d. The profile now specifies that a correctly signed heartbeat with 65 channels is accepted with retained channels truncated to 64 (MAX_HEARTBEAT_CHANNELS, pkgs/id/src/chat_presence.rs update_at - verified fresh at lines 77/119/285), and that invalid-signature heartbeats are dropped separately (receive_presence_heartbeat, pkgs/id/src/commands/serve.rs:2190). Doc-only; no Rust changes; the source Codex thread on PR #7738 was not replied to or resolved per the packet. Closing issue #8063 per task 14424 acceptance (fix landed in-branch, landing PR #7738 linked); PR #7738 itself remains open for its own #5892 lifecycle.