Skip to content

[AI:zf-builder] chore: RTCPeerConnection iceCandidatePoolSize config is inert and inconsistent between sender and receiver peers - #146

Merged
ntsd merged 1 commit into
mainfrom
task/zf-zs-7c491e86
Nov 6, 2026
Merged

ntsd merged 1 commit into
mainfrom
task/zf-zs-7c491e86

Conversation

@ntsd

@ntsd ntsd commented Nov 6, 2026

Copy link
Copy Markdown
Owner

[AI:zf-builder] Task: zf-zs-7c491e86

RTCPeerConnection iceCandidatePoolSize config is inert and inconsistent between sender and receiver peers

Automated PR for task zf-zs-7c491e86

Completed by: @zf-builder

…onsistent between sender and receiver peers

Task: zf-zs-7c491e86

RTCPeerConnection iceCandidatePoolSize config is inert and inconsistent between sender and receiver peers

@ntsd ntsd left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

[AI:zf-reviewer] [Reviewer Feedback] Round 1: Approved for human review.

Verdict

Clean, minimal, correct. This is option (b) from the task: the inert iceCandidatePoolSize: 4 line and the // somehow this doesn't work hand-wave are removed, replaced at both sites with an accurate rationale; bundlePolicy: 'balanced' (spec default — zero behavior change) is pinned on the receiver so the two RTCConfiguration objects stay key-symmetric. No signaling, chunk pipeline, teardown, or resolveIceServer changes — diff is exactly the three intended files.

Root-cause analysis — verified sound

The rationale is technically correct: the JSEP/RFC 9429 candidate pool is consumed by the first gathering phase. This app has exactly one ICE component (a single bundled data channel) and setLocalDescription/createAnswer runs within milliseconds of the constructor, so there is no idle window in which the pool can pre-gather; a non-zero size would only hold STUN/TURN allocations for the page's lifetime. 4 was therefore inert, not a browser bug — the old comment's diagnosis was wrong, and the new comment fixes it at both sites.

What I ran (all green)

  • npm run test → 74/74 pass, including the new tests/rtc-peer-config.test.mjs (verified it fails if iceCandidatePoolSize or an asymmetric key is re-introduced — key-symmetry check is real, not decorative)
  • npm run typecheck → clean
  • npm run lint → clean (prettier + eslint)
  • npm run build → 2 pages, complete
  • Mergeability guard: PR #146 is MERGEABLE against main; gh pr diff confirms only OfferPage.svelte, ReceivePage.svelte, and the new test file

Ponytail audit (7-Rung)

  • Rung 7 (diff scope): clean — no drive-by reformatting, no unrelated churn, no debug leftovers. Exactly the files the task names.
  • Rungs 3 & 5 (dependency veto): no new dependencies; the guard uses only node:assert/node:fs/node:path/node:url and matches the repo's existing static-source-guard convention (tests/ice-server-consistency.test.mjs, tests/ci-pipeline.test.mjs).
  • Rungs 1 & 6 (simplicity): chose the minimal path (remove inert knob + document + mirror default) instead of wiring up a config abstraction shared by both pages. Correct call — a two-line mirror with a guard beats a premature shared-config module.

Minor notes (non-blocking, no changes requested)

  1. configKeys() regex-picks-up nested keys if iceServers were ever reformatted across multiple lines (urls would appear as a "top-level" key). It's symmetric on both sides today so the guard can't misfire, but a future multi-line reformat of the literal could change the key set. The symmetry assertion would still hold as long as both sides reformat alike — acceptable for a static guard.
  2. The guard asserts the rationale comments contain specific phrases (pre-gather, allocat, setLocalDescription, …). Rephrasing the comment will break the test. That's intentional pinning and consistent with how this repo guards comments; just be aware when touching these comments.

CONVENTION: Static regression guards for source-invariant config fixes in zero-share follow the top-level-assert-over-readFileSync pattern (no node:test import) in tests/*.test.mjs — the new tests/rtc-peer-config.test.mjs follows it, and it also pins rationale-comment phrases, so rewording guarded comments must update the guard in the same commit.

@ntsd
ntsd merged commit 87938d3 into main Nov 6, 2026
1 check passed
@ntsd
ntsd deleted the task/zf-zs-7c491e86 branch November 6, 2026 20:53
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.

1 participant