feat(browser): persist thinking-effort selection evidence - #397
Conversation
`ensureThinkingTime` verified the requested effort tier and then threw the result away, so a completed run left no machine-checkable proof of the tier it submitted at — only an unstructured `[browser] Thinking time: …` log line. That gap is load-bearing rather than cosmetic. `browser.modelSelection` cannot stand in for it: for a Pro-capable target the picker deliberately reports the requested model string as the resolved label, so `resolvedLabel === requestedModel; verified: true` is byte-identical whether or not the Pro effort row was ever selected. Any consumer asking "did this run answer at Pro effort?" had nothing to read. `ensureThinkingTime` now returns a `BrowserThinkingSelectionEvidence` record alongside its existing logging, and it is persisted as `browser.thinkingSelection` parallel to `browser.modelSelection`, crossing the remote bridge on `BrowserRunResult` and rendering in `oracle status`. `verified` is true only for the two statuses that positively observed the option's selected state. Strict (fail-closed) requests still throw before submit on every other outcome, so they never produce an unverified record — which makes a persisted strict record proof by refusal that no degraded tier was used. Claude-Session: https://claude.ai/code/session_01HsXirqcfqtr1Cae9zYCLDk
…ridged results `sanitizeResult` whitelists what crosses the bridge, which is the right shape — a result must never carry this host's pids, ports, or profile paths to a client on another machine. But the whitelist had drifted narrower than that rule: it also dropped `modelSelection`, `thinkingSelection`, `archive`, `tabUrl`, `conversationId`, and `promptSubmitted`. The effect is that a remote caller could not tell which model or effort answered their prompt — the evidence the picker verified was computed, logged on the host, and then discarded at the boundary — and could not bind the answer to a durable ChatGPT URL. A bridged answer arrived unattributable, and silently so: the fields are optional, so nothing failed. None of the added fields describes the host. The three that do stay explicitly undefined, and the test now asserts both halves of the rule so a future field cannot quietly pick the wrong side. Claude-Session: https://claude.ai/code/session_01HsXirqcfqtr1Cae9zYCLDk
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 7, 2026, 10:09 AM ET / 14:09 UTC. ClawSweeper reviewWhat this changesRecords observed ChatGPT thinking-effort selections in session metadata, displays them in session status, and preserves selection and conversation details in remote results. Merge readiness✅ Ready for maintainer review The PR remains useful: current main lacks structured thinking-effort evidence. The integrated head resolves the earlier configuration-allowlist concern, and no blocking introduced defect was found. Priority: P3 Review scores
Verification
How this fits togetherOracle’s browser runner selects ChatGPT controls before submitting prompts. This change carries the observed effort selection through local session storage and the remote bridge into CLI status output. flowchart LR
A[Requested thinking effort] --> B[ChatGPT picker]
B --> C{Selection confirmed?}
C -->|Yes| D[Timestamped UI evidence]
C -->|Best effort only| D
C -->|Strict request unconfirmed| E[Stop before submission]
D --> F[Local or remote result]
F --> G[Session metadata]
G --> H[CLI status]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Retain optional, timestamped UI-selection evidence independently of model identity, with strict refusal preserved and historical sessions remaining readable. Do we have a high-confidence way to reproduce the issue? Not applicable as a new evidence capability; source inspection confirms main does not persist a separate thinking-selection record. Is this the best way to solve the issue? Yes. Returning evidence from the existing selector avoids a competing verification path, and optional storage preserves older session records. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 54dafa78fe6f. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles) |
Integrate current selector readiness and strict Pro gating with typed, timestamped UI evidence in session metadata, status output, and remote structured results. Keep the host configuration allowlist and omit host PID/profile fields. Do not report a disabled requested option as a resolved selection. Document the selection-time evidence boundary and prove switched, already-selected, unverified, strict-refusal, and real CLI bridge paths against isolated synthetic Chrome. Co-authored-by: Caleb Sowers <frontierkodiak@gmail.com>
|
Maintainer integration verified at The record describes UI selection at capturedAt. Existing direct-slider readiness, explicit Deep Research effort handling, strict Pro refusal, and the remote request allowlist are preserved. Disabled non-strict choices now produce verified=false and no resolved label; the regression failed before repair. Validation: 2,123 tests passed, 45 skipped; 176 focused tests; lint/typecheck/build/docs passed. Actual built CLI runs in real isolated Chrome verified switched Pro, already-selected Pro, unverified best-effort selection, and strict refusal. Metadata and oracle status output agreed with the observed fixture tier. A built oracle serve process and built CLI client additionally exercised the real browser bridge: effort evidence survived while structured host PID, port, and profile fields remained absent. The expanded proof also passed in Linux CI. Unproven: fresh signed-in ChatGPT/Deep Research/follow-up behavior, actual backend model or effort identity, and UI state after the recorded observation. The current pages and service login responses are explicitly synthetic; the contributor's prior live trace remains historical evidence. Thanks @frontierkodiak. Human credit and contributor history are preserved. The deferred changelog line remains in the PR body; no branch changelog delta, merge, or release was introduced. |
Persist thinking-effort selection evidence independently of model-selection metadata. The selector now returns the requested level, observed selected label, verification/strict-failure status, and capture time; the record is saved as browser.thinkingSelection, displayed by oracle status, and retained in remote structured results.
The maintainer integration preserves current direct-slider readiness, explicit Deep Research effort selection, strict Pro refusal, and the conversation-scoped remote configuration allowlist. Host PID, port, and profile fields remain excluded from structured bridge results. A disabled best-effort option is recorded as unverified with no resolved label, rather than suggesting that the unavailable requested option was selected.
Evidence is limited to what the UI confirmed at capturedAt. It does not attest the backend model/effort or guarantee that later UI state remained unchanged.
Validation: 2,123 tests passed, 45 skipped; 176 focused tests; lint/typecheck/build/docs passed. The disabled-option regression failed before its repair. The actual built CLI and real isolated Chrome passed switched Pro, already-selected Pro, unverified best-effort selection, and strict refusal cases, checking metadata and status output. A further case ran both the built oracle serve process and built CLI client, verifying real browser execution, preserved structured effort evidence, and absence of host PID/profile fields. The expanded proof runs in Linux CI. Final branch review and exact-head CI are linked in the proof comment.
Unproven here: fresh signed-in ChatGPT/Deep Research/follow-up behavior, actual backend effort/model identity, and UI changes after the recorded observation. The contributor's earlier live trace remains historical evidence; the current pages are explicitly synthetic.
Thanks @frontierkodiak. Deferred changelog line after landing: Browser: persist and display thinking-effort selection evidence, including remote results, without treating unverified or disabled options as confirmed selections; thanks @frontierkodiak.