Skip to content

fix(browser): use upstream queue deadlines for background QA - #740

Merged
lastobelus merged 3 commits into
lastcode/mainfrom
lastcode/reconcile-background-qa
Nov 16, 2026
Merged

lastobelus merged 3 commits into
lastcode/mainfrom
lastcode/reconcile-background-qa

Conversation

@lastobelus

@lastobelus lastobelus commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Background QA carried two queue-deadline designs side by side: upstream's numeric deadline and LastCode's signal-aware overload of SessionControl.agent. This goes back to upstream's API and keeps cancellation at the existing native-operation boundary.

🔎 Why

🛠 What changed

  • SessionControl.agent(agentId, run, deadlineMs?): restored to upstream's signature. The number-or-AbortSignal overload is gone.
  • ServerBrowser call sites: the 2 signal arguments are removed.
  • Cancellation: unchanged. The existing withNativeSurface abort gate and page/broker cancellation stay.
  • Tests: in the existing suites.
    • Restored upstream's numeric-deadline regression case.
    • Removed the obsolete signal-only case.
    • Kept the handoff regression.
    • Extended the existing queued recording-stop case to show that expired input is skipped before the numeric deadline, cleanup drains, and fresh input still works.
  • Not touched: initial-navigation tracking and the recording-stop exception already match upstream. No frontend or contract changes.

📌 Still carried beyond upstream

Upstream's deadline only stops expired queued work from starting. It doesn't cover hidden painting or work that is already running, so these stay:

  • Native rendering leases, unthrottling and measured viewport.
  • Root host subscriptions across thread switches, with epoch fencing. Provenance: https://redirect.github.com/pingdotgg/t3code/pull/16620 at pinned head 1722a7ae9060883d71d3ba06872c54076dec6bf1. This is carried separately and is not part of this overlap.
  • Broker request retirement without disconnecting unrelated tabs.
  • Stalled CDP/page cancellation and late recording-resource cleanup.

✅ Proof

  • Changed-file checks: 407 tests passed, scoped format/lint, both unused-code checks, generated GraphQL check, and affected typechecks passed.
  • Quick local CI: passed for 6678ee249474e65cab44dff5a8bed1eeb3e1e16f against 6cd814fceafb68cfd26d475e2a1f038b88f2c534.
  • Exact same-base carry replay: passed; compiled tree equals the PR tree.
  • Direct Node runtime transcript: running -> finished -> expired-skipped -> recording-cleanup -> fresh-input.

Local review: 1 rounds with gpt-6.1-terra (xhigh), approved.

CI fixture repairs

CI also exposed two failures already present on the base. The browser dialog mock intercepted background title watches as well as the dialog expression; it now blocks only that expression. The dev-runner shutdown fixture invoked Cargo on cold checkouts before reaching its fake process tree; it now stubs Cargo and includes captured output in startup failures. Neither repair changes production behavior.

🔗 Tracking

Partial audit work for #720. That issue also covers other ongoing audit decisions, so this PR does not close it.

Implemented with GPT-6.1 Sol through the Codex harness in T3 Code.

Restore upstream's numeric dispatch deadline API and remove the signal/deadline overload. Keep active cancellation at the existing native-operation and page boundaries, plus native rendering and background host subscriptions that upstream's queued-expiry fix does not cover.

Carry-Group: upstream-bugfixes
Carry-Fix: #720; reconciles #325
Carry-Upstream: https://redirect.github.com/pingdotgg/t3code/pull/16941 merge=8f947a313b29c30c1deb9960ea0450482cb6e19f original-head=f88dc5fb4c6b91bd5715d3aacf5f931bb1fba6b9
Carry-Observation: Deadline-only SessionControl API matches upstream. Native rendering, root subscriptions, broker retirement and page cancellation remain necessary for broader background QA behavior.
@lastobelus
lastobelus marked this pull request as ready for review November 16, 2026 18:03
@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T18:42:36.080819Z 6678ee2 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 592c73d4ec

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@lastobelus

Copy link
Copy Markdown
Owner Author

#325 vs upstream pingdotgg#16941: reconciled in PR #740; open, blocked by existing CI failures.

Upstream https://redirect.github.com/pingdotgg/t3code/pull/16941, merge 8f947a313b29c30c1deb9960ea0450482cb6e19f, is already an ancestor of both origin/main and the LastCode base 6cd814fceafb68cfd26d475e2a1f038b88f2c534.

PR #740 restores upstream's numeric queue-deadline API and removes the duplicate signal-aware overload. The broader native-rendering, background-subscription, broker-isolation and page/recording-cancellation behavior stays because upstream's dispatch check does not cover it. Cancellation remains at the existing native-operation seam. Four server files changed: 45 lines added, 63 removed.

Validation: changed-file checks passed, including 354 tests and affected typechecks; exact-head Quick CI passed. One local Terra xhigh review approved, and one exact-head GitHub Codex review found no issues. Zero unresolved review threads.

Merge blocker: CI failed twice on head 592c73d4ec80387a2d38566dfbc1f1e8ba2a73ce. The server-browser test worker exhausts its JavaScript heap, and the dev-runner process fixture fails to start. Both failures already occur on the unchanged base in https://github.com/lastobelus/lastCode/actions/runs/43871192455; PR attempts are at https://github.com/lastobelus/lastCode/actions/runs/43924831969. No guard was bypassed and no merge occurred.

Next: diagnose the existing server-test worker memory exhaustion and dev-runner process-fixture startup failures, then obtain green CI before guarded merge. This is incomplete until #740 merges. #720 remains open because it also tracks other audit decisions.

@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 9f6a30609e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Block only the dialog expression rather than every Runtime.evaluate command. A late title watch must remain pending until its title changes instead of repeatedly treating the dialog answer as a title-change notification.

Carry-Group: incubator
Carry-Fix: #740
Carry-Observation: Repairs the existing browser dialog fixture after CI exhausted its worker heap; production behavior is unchanged. The dialog fixture is introduced by the incubator group and the repair must replay after that fixture exists.
Stub Cargo in the process-tree fixture so a cold checkout cannot compile the resource monitor before reaching the shutdown assertion. Include captured output in startup failures so the cause is visible.

Carry-Group: incubator
Carry-Fix: #740
Carry-Observation: Shutdown fixture repair; no production behavior changed. The process-tree fixture is introduced by the incubator group, so its feature-specific test repair must replay with that group.
@lastobelus
lastobelus force-pushed the lastcode/reconcile-background-qa branch from 9f6a306 to 6678ee2 Compare November 16, 2026 18:40
@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 6678ee2494

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@lastobelus
lastobelus merged commit 006e9d3 into lastcode/main Nov 16, 2026
31 checks passed
@lastobelus
lastobelus deleted the lastcode/reconcile-background-qa branch November 16, 2026 18:50
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