Skip to content

fix(server): a poll is not a double submit - #753

Closed
kushals256 wants to merge 4 commits into
reticlehq:mainfrom
kushals256:fix/duplicate-request-poll
Closed

kushals256 wants to merge 4 commits into
reticlehq:mainfrom
kushals256:fix/duplicate-request-poll

Conversation

@kushals256

@kushals256 kushals256 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #673

A camera loop or an analytics beacon was counted as a double submit, so every proved assertion on those pages came back unknown — including ones that never named the looping URL.

  • A regular cadence (N identical writes, gaps ≥ 250ms and within 2.5× of each other) is a poll, not a burst.
  • On assert / act_and_wait, duplicate-request only fires for a write the predicate named. Observe still uses the old rule.
  • A burst of two on a named write is still a finding, so the existing "duplicate-request still downgrades a declared pass" tests stay valid.

Test plan

  • contradictions.test.ts — poll silent, burst still a finding, unnamed write does not impeach, named write still does
  • declared.test.ts — success net and text-only populate namedNets
  • act-verdict-parity.test.ts — assert and act_and_wait both pass namedNets

kushals256 and others added 3 commits September 4, 2026 15:23
A camera loop or unnamed analytics write was counted as a double
submit, so every proved assertion on those pages came back unknown.

Signed-off-by: Kushal S <skushal.mys@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Kushal S <skushal.mys@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
CI recorded hidden-api-500 and broken-form-validation as NOT MEASURED after Playwright MCP initialize/click timeouts, which shrank coverage and tripped the gate while catch-rate stayed 1.0. Replay-detect already retries that rig noise; Layer A now does too.

Signed-off-by: Kushal S <skushal.mys@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@kushals256

Copy link
Copy Markdown
Contributor Author

Same coverage-floor flake as #750 / #755, not this change. This run lost two extra cells (46 vs 48): hidden-api-500 timed out on MCP initialize for both Playwright and DevTools, and broken-form-validation/playwright hung on browser_click. Catch-rate stayed 1.0.

Cherry-picked the one-retry from #750 (the same rule replay-detect already uses for a flaky baseline). A missing tool is still a miss.

50ms expired the idle socket on a loaded Windows runner before the second dial landed, so the cap never fired and both closes were 1008.

Signed-off-by: Kushal S <skushal.mys@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@kushals256

Copy link
Copy Markdown
Contributor Author

Windows unit failure was unrelated to the poll change. caps and expires unauthenticated pending handshakes used a 50ms hello timeout; on a loaded runner the idle socket expired before the second dial landed, so the pool had a free slot and both closes were 1008 (hello timeout) instead of 1013 then 1008.

Gave that test the same kind of window the sibling already uses (2s) so the cap can still fire, then idle still expires. Pushed as 54c496e.

@divshekhar

Copy link
Copy Markdown
Contributor

Superseded by #754, which landed the same fix (a steady cadence is a poll, not a double submit) — thank you both for converging on it. Nothing here is wrong; #754 was simply the narrower diff (2 files) and was green first.

Worth keeping from this PR if you want to follow up: the declared.ts / act-tools.ts half is not covered by #754.

@divshekhar

Copy link
Copy Markdown
Contributor

Closing — #754 landed the same fix (a steady cadence is a poll, not a double submit), and the defect it addresses is now fixed on main.

For the record, since you got there independently: yours was the broader diff, and the part of it that #754 did NOT cover is the declared.ts / act-tools.ts half. If you still think there is something live there, a fresh PR scoped to just that half would be welcome and would not be a duplicate of anything.

@divshekhar divshekhar closed this Sep 6, 2026
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.

duplicate-request has no notion of an app that polls, so a camera or analytics loop makes every verdict unknown

2 participants