# Read-only adversarial audit R1 — PR [#16941](https://github.com/pingdotgg/t3code/pull/16941)

Verdict: MERGE candidate on the reviewed local source; no confirmed code blocker or worthwhile simplification found. The integrated head still needs the primary agent's real-browser proof, publication, and checks on that published head before a final merge recommendation.

Reviewed target: pingdotgg/t3code, base main at [5569a42bff](https://github.com/pingdotgg/t3code/commit/5569a42bff98f06b297115542b25c942f8607c16); fork head hogeheer499-commits/t3code, branch fix/preview-timeout-isolation-16921, original [102deab30a](https://github.com/hogeheer499-commits/t3code/commit/102deab30a01e955345c4f8f9bcdb2e97d2d5d31). Reviewed worktree /home/ubuntu/wt/terminal-preview-21 at local [8edce26a56](https://github.com/pingdotgg/t3code/commit/8edce26a56e193a38d446d0ebeb74321bc18aa2b), which includes the history-preserving main merge [30354ec5d6](https://github.com/pingdotgg/t3code/commit/30354ec5d69f9e1263957971e44574ee3ce19415). The supplied fresh GitHub feedback still describes the original remote head, not this unpublished local commit.

Scope: read the complete origin/main...HEAD diff in all four changed files, both required skills and worktree AGENTS.md, provided PR feedback and the initial PR JSON, historical inline feedback, tests and implementation reports. Traced current broker delivery, timeout and response paths; server request handling, tab creation, initial navigation, reads, status, close and dialog; SessionControl queue, epoch, ownership and handoff; and recording start, capture lock and stop. No other PR was audited.

Findings: none confirmed.

Evidence and edge cases:
- [SessionControl.ts](/home/ubuntu/wt/terminal-preview-21/apps/server/src/preview/SessionControl.ts:76) checks closure and the captured ownership epoch and permission before comparing performance.now() with the deadline; the check is immediately before run(). Started work retains the existing tail reservation. A queued expired action cannot touch the page, and the following fresh action can dispatch.
- [ServerBrowser.ts](/home/ubuntu/wt/terminal-preview-21/apps/server/src/preview/ServerBrowser.ts:2015) captures one monotonic deadline when handling the request; open and ordinary agent-queued operations pass it to SessionControl. Status, observe reads, close and dialog keep their existing routing. Browser timeout mapping remains [ServerBrowserPage.ts](/home/ubuntu/wt/terminal-preview-21/apps/server/src/preview/ServerBrowserPage.ts:42).
- [ServerBrowser.ts](/home/ubuntu/wt/terminal-preview-21/apps/server/src/preview/ServerBrowser.ts:1858) intentionally exempts recordingStop from dispatch expiry while retaining ownership and queue checks. The stop still waits behind in-flight capture work. A stop rejected after a human ownership change follows the existing ownership rule and is outside this deadline fix.
- [ServerBrowser.ts](/home/ubuntu/wt/terminal-preview-21/apps/server/src/preview/ServerBrowser.ts:895) tracks already-started initial navigation even if the open callback later expires. This makes subsequent queued work and human input drain the navigation; current-main trackUntilHandoff remains at viewer navigation call sites, preserving responsive viewer input.
- Historical CodeRabbit advice to cap navigation by remaining request budget would change the accepted rule that an action started before expiry keeps its normal operation timeout. It is not a current defect. The Macroscope human-approval note is a review gate, not a source finding.
- The four retained added tests exercise queue boundary/continuation, broker-visible suppressed click, late recording cleanup after caller timeout, and expired open/human navigation ordering. The tests report 64 green cases in the two focused files, two failures against main production, and two failures against deliberate navigation/stop mutants. The implementation report records targeted lint, formatting and server typecheck passing. I did not rerun these checks or add mirrored tests.

Verification limits and handoff: No browser, server, live client, packaged desktop, native macOS, or remote-mode run was performed in this read-only review. The primary agent is doing the real-browser proof. Server-side queue logic is shared by browser clients, but native platform behavior is not established by the source audit. The remote PR body still reports older counts and heads; update it to the integrated head and collect CI/review feedback after publication. No edits, commits, checkout, push, comments or delegates were made; only this report was written outside the worktree.
