Repository navigation
[AI:zf-builder] chore: RTCPeerConnection iceCandidatePoolSize config is inert and inconsistent between sender and receiver peers - #146
Conversation
…onsistent between sender and receiver peers Task: zf-zs-7c491e86 RTCPeerConnection iceCandidatePoolSize config is inert and inconsistent between sender and receiver peers
ntsd
left a comment
There was a problem hiding this comment.
[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 newtests/rtc-peer-config.test.mjs(verified it fails ificeCandidatePoolSizeor an asymmetric key is re-introduced — key-symmetry check is real, not decorative)npm run typecheck→ cleannpm run lint→ clean (prettier + eslint)npm run build→ 2 pages, complete- Mergeability guard: PR #146 is
MERGEABLEagainstmain;gh pr diffconfirms onlyOfferPage.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:urland 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)
configKeys()regex-picks-up nested keys ificeServerswere ever reformatted across multiple lines (urlswould 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.- 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.
[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