Commit Graph
683 Commits
Author SHA1 Message Date
ciregenzandClaude Opus 5 a982e3361f [eric] browser: an approval nobody can answer declines now instead of parking a turn for 5 minutes
The wait was a bare `timeout=300.0` at the call site: invisible, unchangeable, and
longer than WALL_BUDGET_S (180s) itself, so a single prompt could outlive the whole
run's budget.

Measured 2026-08-08. deepl bot-detected the browser profile, the agent correctly
refused to solve the challenge ("handing to the user, not solving it") and asked for
help via RequestHumanIntervention. Headless, nobody answered, so it burned the full
306s and then denied -- the identical verdict it can reach instantly. That single
wait consumed the entire 420s task budget and was the whole of what looked like a
"249s spawn stall" while profiling. Cron runs, scheduled agents, CI and benchmarks
all sit in exactly this position.

Two changes, neither of which weakens the gate:
- ws_manager.has_listener(session_id) reports whether ANY socket would receive the
  session's events, reading the same two lists send_to_session broadcasts to so it
  cannot drift from where messages actually go.
- p_request_browser_approval checks it BEFORE building a request, and declines with
  an honest reason when no UI is attached. The decision is unchanged (deny); only
  the five minutes of waiting for it are gone.

The timeout is now P_APPROVAL_TIMEOUT_S, overridable via OSW_APPROVAL_TIMEOUT_S for
automation contexts that want a different budget.

A human at the keyboard sees no change: with a socket attached the request is sent
and awaited exactly as before.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-08 09:28:53 -07:00
ciregenz 7a942fa9fa Merge remote-tracking branch 'origin/eric/dev' into eric/browser-merged 2026-08-08 09:22:33 -07:00
ciregenz 01e295ac5c [eric] agents: parked CLIs die at 10 minutes and the warm cap drops to 8, cutting the measured 1.3GB idle ceiling roughly in half 2026-08-07 21:10:44 -07:00
ciregenz 0c83bb8f78 [eric] canvas: an app window owns its wheel whether or not you clicked in first; workflow tests wait on progress, not a clock 2026-08-07 17:37:30 -07:00
ciregenz 9b54b39dde [eric] workflows: a test that runs long hands back what it has instead of telling the agent to poll; memory stops re-deriving facts it already stored 2026-08-07 17:33:20 -07:00
ciregenz e5f4144f72 [eric] workflows: an agent will not start a workflow the user switched off 2026-08-07 14:26:33 -07:00
ciregenz 21e1400e3c [eric] telemetry: a silent quit carries the same envelope as a hard error, found by reading the sink 2026-08-07 12:27:38 -07:00
ciregenz 42b14165d5 [eric] telemetry: the missing-CLI error card carries a flight envelope, and a test keeps every error family honest 2026-08-07 07:25:57 -07:00
ciregenz c6a0c1f34b [eric] telemetry: silent-recovery rows carry journey context, and packaged builds stop shipping test files 2026-08-07 06:35:20 -07:00
ciregenz bbf086329f [eric] agents: a router-down turn names its cause instead of dying unclassified, found by the forced-failure battery 2026-08-07 06:23:45 -07:00
ciregenz 260d5a3de3 [eric] agents: the CLI's silent provider-500 retries become breadcrumbs and near-miss ledger entries 2026-08-07 05:39:46 -07:00
ciregenz 007bd47f3b [eric] workflows: TestWorkflow waits for the run and returns the transcript in-turn, so the agent keeps going instead of parking on the user 2026-08-07 04:06:02 -07:00
ciregenz dbea61b109 [eric] telemetry: the last two envelope-less diagnostics (pressure valve, router start) now carry context too 2026-08-07 01:08:00 -07:00
ciregenz ef8806eda3 [eric] latency: a short first message no longer drifts the boot fingerprint, so the pre-warmed CLI is actually used (3.92s -> 1.58s median, 0 wasted spawns) 2026-08-07 00:34:54 -07:00
ciregenz 2b6178c12e [eric] telemetry: crumbs at every spawn phase and stream milestone, envelopes carry journey and auth context 2026-08-07 00:02:29 -07:00
ciregenz 792605e530 [eric] telemetry: OSW_FLIGHT=0 kill switch for the recorder 2026-08-06 23:36:53 -07:00
ciregenz c4ff6dad93 Merge remote-tracking branch 'origin/eric/dev' into eric/browser-merged
# Conflicts:
#	electron/package-lock.json
2026-08-06 23:22:12 -07:00
ciregenzandClaude Opus 5 3c50359146 [eric] browser-v3: fix the instrument first, then the two composer bugs it could finally see
Six of the eleven defects here were in the MEASUREMENT, not the product, and they
were wrong in both directions.

Harness, all of which silently produced wrong numbers:
- coverage.py preflight refused every sweep on a box holding exactly one backend:
  stack.sh's supervisor is a `bash -c` quoting the whole uvicorn line, so it carries
  both "-m uvicorn backend.main" AND the venv python path. Discriminate on POSITION.
- stack.sh status reported 2 backends over 1 and 0 webpack over a live dev server
  (webpack retitles its process). A status check whose job is preventing a second
  stack, failing in the direction that lets one land.
- c7_run.sh/c8_run.sh slice r6_be.log while stack.sh names logs by TAG: a stack under
  any other tag hands every trial an empty slice and the sweep reports a confident
  0/108. Now refuses loudly; it caught this exact mistake on first use.
- "Browser command timed out" was bucketed infra. It is ONE command blowing its own
  budget, not a dead webview: all 4 such rows were BrowserFindComposer at exactly its
  30s cap, every run completed after, zero card-gone markers in the whole log. Filed
  as infra it read as 11.8% flake AND lifted holdout reach 70% -> 84%.
- api_retry / rate_limit_error now grade as infra. A provider 429 storm turned clean
  15-21s exclusions into 188s product_no_composer rows.
- bench.py prints reach BOTH ways when a row is UNVERIFIED. An exclusion resting on
  the agent's own word quietly flatters the score, and coverage.py's own instruction
  to confirm it by hand goes unread (I quoted a 100% that excluded onlinegdb).

Timing was measuring 0.2% of the run: prestage completes BEFORE metrics_started_at,
so other_ms was 25ms of a 12700ms median while prestage (4146ms, ~61%) sat in no
bucket at all. prestage_ms/task_ms are now recorded; total_ms is deliberately NOT
redefined, which would invalidate every before/after already taken against it.

Product:
- find_composer rejected ACE/CodeMirror-5/Monaco composers. Their input is a ~1x1
  offscreen textarea that paints into a sibling div, so it can never pass a size
  gate. Accept it when a VISIBLE ancestor is composer-sized; honeypots stay out
  because the input itself must not be display:none/visibility:hidden/opacity:0.
  anon reach 80% -> 100%, holdout 89% -> 90%, p95 38.6s -> 9.7s.
- the composer poll slept a blind 0+1.2+1.4 = 2.6s whenever prestage staged nothing,
  which is nearly every run, and it was the whole of other_ms's suspicious constancy
  (2610-2613ms regardless of tools_ms). Stop when two reads are identical, the rule
  the opener poll 40 lines below already applies. other_ms -53.7%, tools_ms flat.
- prestage no longer navigates to the page it is already on, nor sleeps 0.35s before
  its first settle probe.
- is_replay_boundary reasoned from the NAME alone, so x.com's composer textbox named
  "Post text" was ruled an irreversible send and truncated its replay to a bare
  navigate. Excluded by ROLE; first_unsafe_step now passes role through at all.

Measured on this box: reach 100% (83% if onlinegdb's unverified exclusion is bogus),
0 false successes in ~155 runs, prestage tier-0/1 2702ms, other_ms -53.7%, infra
flake 0/158, holdout 18/20. Criteria 2/4/9 need live writes and are untouched.
Full evidence, including what did NOT work, in e2e/browser-v3/RESULTS_2026-08-06.md.

Also drops the tracked electron/node_modules symlink pointing at another machine's
Downloads folder; it is dangling on every other checkout and re-breaks the install on
any stash or checkout.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-06 23:21:05 -07:00
ciregenz d082af7e03 [eric] telemetry: envelopes get real concurrency via a sessions provider, every turn opens with a baseline crumb 2026-08-06 22:57:53 -07:00
ciregenz 565009f0c5 [eric] telemetry: auth and overflow errors carry flight envelopes, router revives hit the near-miss ledger 2026-08-06 22:42:48 -07:00
ciregenz 86e323cbce [eric] telemetry: per-session flight recorder, error envelopes name cause+lane+phase+crumbs, silent recoveries hit the ledger 2026-08-06 22:39:30 -07:00
ciregenz 7c3999d779 [eric] agents: a self-healing reset-window 401 retries silently instead of flashing the reconnect card 2026-08-06 20:58:42 -07:00
ciregenz dbade1b25e [eric] agents: a turn whose router died mid-flight re-ensures it and resumes instead of a terminal snag 2026-08-06 20:50:13 -07:00
ciregenz 1b2203fa75 [eric] boot: anthropic and the sdk+mcp chain leave the import graph, api-ready median 2531 to 1843ms, hooks re-import at call time 2026-08-06 16:33:22 -07:00
ciregenz 7399076906 [eric] boot: only mid-turn sessions hydrate at startup, 2269 settled ones lazy-load, agents lifespan 850 to 537ms median 2026-08-06 16:08:30 -07:00
ciregenz 8042da10da [eric] agents: the CLI pre-warms while the user types, first-turn answer median 2.42s to 1.23s, one spawn per session enforced 2026-08-06 15:50:32 -07:00
ciregenz bd822c16ed [eric] agents: spawn-phase logs carry monotonic ms stamps so a turn's latency attributes itself from one grep 2026-08-06 15:31:03 -07:00
ciregenz 42103a4e23 [eric] agents: launch honors its prompt instead of silently dropping it, spawn phases log their trail (the ENG-131 ghost hang) 2026-08-06 15:19:02 -07:00
ciregenz a64fcef234 [eric] memory: one user-curated fact store rides every agent turn, fully visible and editable in Settings 2026-08-06 10:42:54 -07:00
ciregenz b6f8fbb5ef [eric] agents: silent-quit re-nudges are earned by new tool work, capped at 3, stalls surface honestly (ENG-121 family) 2026-08-05 20:10:54 -07:00
ciregenz a519354cc4 [eric] skills: per-skill enable toggle gates prompt list, Skill tool, and cloud runs; files endpoint feeds the detail picker 2026-08-05 08:38:02 -07:00
ciregenz af68dcd06d [eric] send: when the task names a field, write into that field (reddit's title) 2026-08-05 08:28:38 -07:00
ciregenz 438a96eb42 [eric] skills: name the send-script's clicks so a completed write can be recorded at all 2026-08-05 07:47:01 -07:00
ciregenz 83649f5b17 Revert "[eric] browser: prove a send by the payload appearing twice, when the composer never clears"
This reverts commit 7fcce1e2f3.
2026-08-05 00:48:16 -07:00
ciregenz 7fcce1e2f3 [eric] browser: prove a send by the payload appearing twice, when the composer never clears 2026-08-05 00:45:38 -07:00
ciregenz 6e3ef0e40a [eric] browser: nudge a lazy feed once before deciding it has no posts 2026-08-04 23:32:14 -07:00
ciregenz 324639e217 [eric] browser: open the first post by its own link, instead of hunting a feed 2026-08-04 23:26:37 -07:00
ciregenz ac6dbb119f [eric] browser: catch a wrong-surface landing while there are still steps to fix it 2026-08-04 23:12:49 -07:00
ciregenz 8298d3f604 [eric] browser: let the model name the message, so the fast lane stops needing quotes 2026-08-04 22:03:50 -07:00
ciregenz 1eaa23b9c1 [eric] browser: say 'I never typed it' when nothing was typed, not 'check the page' 2026-08-04 21:53:58 -07:00
ciregenz 25bfe12da4 [eric] browser: a page that loaded content is settled, even with nothing to compare against 2026-08-04 21:16:27 -07:00
ciregenz 5abf06b54f [eric] browser: a click that reveals the composer ends the stage, no second model call 2026-08-04 20:59:44 -07:00
ciregenz e445ca3eeb [eric] browser: fill the one field a disabled submit is waiting on, then re-ask the page 2026-08-04 20:14:50 -07:00
ciregenz 7dc5f58651 [eric] browser: a composer already on the page needs no model to confirm it 2026-08-04 19:44:44 -07:00
ciregenz 3b10b409a8 [eric] browser: an unproven send still blocks a resend, so nothing gets posted twice 2026-08-04 18:32:51 -07:00
ciregenz 310fa1619a Revert "[eric] browser: prove a send by the posted content, not only by an emptied box"
This reverts commit 5035520629.
2026-08-04 17:49:23 -07:00
ciregenz 5035520629 [eric] browser: prove a send by the posted content, not only by an emptied box 2026-08-04 17:40:39 -07:00
ciregenz 3787123468 [eric] browser: wait longer for a slow composer to clear, so a real send stops reading as unverified 2026-08-04 17:23:57 -07:00
ciregenz ccccf9fc4c [eric] browser: probe before sleeping, so a ready page stops paying the slow page's wait 2026-08-04 16:50:44 -07:00
ciregenz bd24d0bf6c [eric] browser: a comment task must not click Create-new-post 2026-08-04 16:11:51 -07:00