Skip to content

Fix v3 KYC lookup with validated registry cell reads - #109

Draft
shrey150 wants to merge 1 commit into
productionfrom
codex/fix-playground-kyc-v3
Draft

Fix v3 KYC lookup with validated registry cell reads#109
shrey150 wants to merge 1 commit into
productionfrom
codex/fix-playground-kyc-v3

Conversation

@shrey150

@shrey150 shrey150 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Draft — not the CUA-preserving fix. This implementation restores lookup output by removing CUA. The template is intended to demonstrate CUA, so this is an alternative workaround, not a complete fix for the intended behavior. It is held as draft while the provider-authentication gap is investigated.

The KYC template fails in Playground after opening the SF business registry: its Google computer-use request gets HTTP 403 because the sandbox provides Browserbase credentials and the hosted CUA path does not supply Google credentials. The template then logs Error during business lookup: {}.

Replace CUA with Stagehand v3 browser locators and direct reads of the registry's labeled cells. The flow selects the actual DBA checkbox, waits for a single matching record, reads both sides of the virtualized grid, and preserves published blanks as null. It makes no model calls, reports meaningful errors, and awaits completion before closing the session. The README now describes this flow and its Browserbase-only credential requirement.

This PR targets production, the v3 source branch. Core PR #12059 ships the generated Playground asset and points regeneration at this branch. Merge this source change first so later core regeneration preserves the fix.

E2E verification

Flow/check Observed result
Original deployed template in core's actual EvalContext and constructor codemod, hosted Stagehand 3.6.0 Reproduced Google 403, zero CUA actions, and the exact {} console error.
Final generated template, existing Browserbase session, 1280×720 All ten fields match the city's published record for the default business, including absent end date and NAICS as null. Session released.
Final generated template with a nonexistent business Specific missing-business timeout, thrown evaluation error, no business JSON. Session released.
Actual local Playground UI: Monaco → Run → session → runner → SSE Console/live view Passed in 12.5 seconds at runtime viewport 1288×711. All ten expected fields rendered; no page/evaluation errors.
Source/artifact parity Core's real source transforms plus Prettier reproduce the tested generated asset byte-for-byte. SHA256: 49544db67ad694477b787ac0875ebb5c5bff1066a37c4976a135b3d9d8ab7afc.
Scoped Prettier, ESLint, strict TypeScript against Stagehand 3.6.0, README index Passed.

The local UI test uses actual Playground components, constructor transformation, EvalContext, runner HTTP/SSE server, and BrowserbaseEvents with real Browserbase sessions. Auth/navigation and Vercel provisioning surroundings are substituted locally; it does not verify deployed authentication or Vercel VM provisioning. The public dataset API was used only as an independent test oracle; the template performs the lookup in the browser.

This fixes KYC. Other template defects found during the incident are outside this PR.

@shrey150
shrey150 marked this pull request as draft September 11, 2026 19:56
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