Commit Graph
146 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
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 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 3b10b409a8 [eric] browser: an unproven send still blocks a resend, so nothing gets posted twice 2026-08-04 18:32:51 -07:00
ciregenz 57d5a6fed7 [eric] browser: hand a bot-detection challenge to the user instead of guessing at it 2026-08-04 15:33:35 -07:00
ciregenz aa07ff0728 [eric] browser: tell a user their DELETION was unconfirmed, not their send 2026-08-03 15:48:33 -07:00
ciregenz 116e44255e [eric] browser: a delete task can no longer report a send it never made 2026-08-03 15:23:50 -07:00
ciregenz fb3ec15105 [eric] merge: bring eric/dev onto the browser v3 branch (7 conflicts resolved, gates green) 2026-08-02 16:14:53 -07:00
ciregenz 1508e03c5f [eric] browser: half an emoji in page text no longer kills the whole prestage 2026-08-02 15:30:17 -07:00
ciregenz 2489cc3971 [eric] browser: persist the wall/llm/tools/ours latency split, so a speed claim has evidence 2026-08-01 00:35:11 -07:00
ciregenz c826d2b614 [eric] browser: a slow command reports whether the wait was before its handler or inside it 2026-07-31 18:43:20 -07:00
ciregenz ec4a044b0b [eric] browser: strip the click-by-index element rows from anything a human reads 2026-07-31 15:58:49 -07:00
ciregenz a9da551425 [eric] browser: show a failed step as failed in the live overlay, with per-step timestamps 2026-07-31 14:33:16 -07:00
ciregenz dcaf655b14 [eric] browser: measure browser time where the commands actually run, not from 18 self-reports 2026-07-31 14:00:19 -07:00
ciregenz c9c25542b9 [eric] browser: never click a disabled submit, and turn the structural composer finder on 2026-07-31 13:03:59 -07:00
ciregenz 5d8bf4102e [eric] browser: only a verified delivery teaches a write skill, not a resend guard 2026-07-31 02:44:34 -07:00
ciregenz b4074c3665 [eric] browser: never report a post as sent when no send was ever confirmed 2026-07-31 02:23:36 -07:00
ciregenz 013bf663ef [eric] browser: a post that never confirmed is not a skill worth learning 2026-07-31 01:27:55 -07:00
ciregenz e989517c6c [eric] lint: de-private the wall budget, trim error_classify under cap, drop stray ws_manager 2026-07-30 20:58:16 -07:00
ciregenz f6ad6cfb91 [eric] browser: a run out of wall time delivers what it has instead of nothing 2026-07-30 20:50:37 -07:00
ciregenz f1f8464f1a [eric] browser: reap idle agent cards so finished runs stop stacking live webviews 2026-07-30 19:47:20 -07:00
ciregenz 3d5c287139 [eric] merge: bring eric/browser onto eric/dev (30 conflicts resolved, gates green) 2026-07-30 13:18:11 -07:00
ciregenz 0d9e80d502 [eric] browser: capacity-retry the model call + classify the catch-all (free-pool 429 raw-card leak sealed) 2026-07-28 15:49:59 -07:00
ciregenz 43576e2805 [eric] cleanup: cwd-proof spawn stdio test, de-prefix evict_dead_card (p-private), trim Tools.tsx to cap 2026-07-16 22:39:41 -07:00
ciregenz 8e904f2141 [eric] browser: evict a wedged agent-spawned card before recovery spawns it (dead-card reuse-skip + safe evict, never deletes a user card, + settle wait); forward-port of eric/browser 3123e9a1/c423517a/02fee098 2026-07-15 23:38:05 -07:00
ciregenz 8eb48dfc42 [eric] app-use: strip pierre's transient [app-agent] trace scaffolding + write-only controls cache (no speculative scaffolding) 2026-06-29 23:03:45 -07:00
ciregenz 1b6d747326 [eric] merge #107 (pierre): app-use OPENSWARM_APP bridge + AppAgent
# Conflicts:
#	electron/main.js
#	frontend/src/app/pages/Views/ViewPreview.tsx
2026-06-29 21:34:11 -07:00
ciregenz e57bc06c9f [eric] browser: tag agent-spawned + pasted browser cards with their home dashboard (were untagged, bled onto all dashboards) 2026-06-26 05:01:44 -07:00
SirKentut 75df12a1b7 [pierre] feat: merge app-use (OPENSWARM_APP bridge + AppAgent) onto eric/dev, convention-clean
Brings the app-use feature (OPENSWARM_APP bridge, AppAgent delegation tool,
BrowserClickPoint, autopilot supervision) onto the linted eric/dev base.

- Resolved 9 conflicts favoring eric's refactored structure; renamed all of
  pierre's _-prefixed names to p_/P_, kept eric's prior_messages resume guard.
- Made the 4 test-exercised bridge helpers public (p-private rule).
- Wired AppAgent into browser_delegation_tools + BuiltinTool registry and
  threaded selected_app_output_ids -> OPENSWARM_SELECTED_APP_IDS (eric had
  forward-ported the prompt but not the tool, so it was unreachable).
- Linter clean (underscore/p-private/ruff/cycles 0); 301 backend tests pass.
2026-06-26 02:44:10 -07:00
ciregenz bb31d359ee [eric] analytics: retire the old session-snapshot cloud path (sync_session_close); full transcript + classification now come from Haik's per-message product-analytics bridge, and it was 413ing the 100KB /sync edge 2026-06-25 03:40:35 -07:00
ciregenz 0d093cc5f8 [eric] backend: one-line every comment + collapse 3+ blank runs across apps/ (AST-verified identical, -lines); CLAUDE.md one-line-comment rule 2026-06-25 02:29:04 -07:00
SirKentut 14c2e63c4c [pierre]: In app mode the playbook key is the browser_id instead of an empty URL 2026-06-24 04:51:22 -07:00
SirKentut 4d8698dfd1 [pierre]: activating playbook skill for app agent use 2026-06-24 03:56:14 -07:00
SirKentut 420263b71f [pierre]: ensuring the bridge is present or not before declaring 2026-06-24 03:30:20 -07:00
ciregenz 6ab6217ac7 [eric] backend: final leading-_ cleanup, file-local shorts + move session cancel-event to manager-side table (off the pydantic model, kills the last underscore); naming linter now 0/0 2026-06-23 21:57:20 -07:00
ciregenz 2e4bcd9e89 [eric] browser: leading-_ -> p_ for function-local vars/args/nested-fns in browser_agent.py (scope-aware AST rename, no module symbols touched) 2026-06-23 21:10:00 -07:00
ciregenz a4c92aaa33 [eric] update cross-module + test refs to promoted service/version symbols 2026-06-23 20:53:27 -07:00
ciregenz a407e6578f [eric] dashboards+modes: leading-_ -> p_/public; promote cross-file public (load/save/load_all/migrate_if_needed/strip_orphan_session_cards), fix qualified test refs 2026-06-23 20:47:13 -07:00
ciregenz f703b8aa02 [eric] agents: leading-_ -> p_/P_/public in proxy+providers/openrouter+ws_manager+mcp-servers+oauth_state; promote cross-file API public, fix monkeypatch+attr test refs 2026-06-23 20:00:06 -07:00
ciregenz 1767389cbb [eric] browser: leading-_ -> p_/P_/public for module functions+constants+state across browser subsystem; promote cross-file symbols public (detect_loop, BROWSER_HISTORY, TRUSTED, etc.), align analyze-browser-metrics.py + tests 2026-06-23 19:37:40 -07:00
ciregenz 394dcd7492 [eric] agents: leading-_ -> p_/public in providers+core+tools (registry/pricing/seq_log/mcp_preflight/openai_passthrough/web/ssrf_guard); promote cross-module fns public, fix monkeypatch string refs 2026-06-23 18:39:11 -07:00
ciregenz 751bb77032 [eric] agents: publicize cross-mixin members (p_run_agent_loop, p_build_mcp_servers, etc.) + safe_resp_text so the decomposition passes p-private 2026-06-23 16:44:41 -07:00
ciregenz 0f94f3feaf [eric] agents: fix 6 callers of renamed p_ methods (browser_agent/agents/main) that the suite masked 2026-06-23 11:30:07 -07:00
ciregenz 1d7fadca77 [eric] tokens: pill shows new (uncached) tokens not cached re-reads; context bar keeps full size 2026-06-21 21:40:33 -07:00
SirKentut e0c4b5859f [pierre] feat: add BrowserClickPoint and human-style canvas/game control for app agent 2026-06-18 02:33:18 -07:00
SirKentutandClaude Opus 4.8 8cf868784f [pierre] fix/app-agent: re-attach app controls on every task
Run AppDescribe and front-load the app's controls each task in app mode,
not just on fresh conversations. The bridge can appear between runs and a
resumed history may carry a stale screenshot-it strategy; re-reading the
controls re-points the agent at the bridge instead of inheriting old fumbling.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 00:52:00 -07:00
AidanandGitHub de2e70ca8f [aidan] fix/browser-early-close: let agent keep browser open when result lives on the page (#88) 2026-06-15 19:00:40 -07:00
SirKentutandClaude Opus 4.8 a35bfaaf7d [pierre] feat/app-agent: drive web apps through the OPENSWARM_APP bridge
Browser agent gains app-control logic + schema, app-builder skill doc,
run.sh agent-bridge presence check, and app-agent tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 15:06:10 -07:00
ciregenz 490bbf4113 [aidan] merge #80: cross-origin iframe perception + spawned card end UX 2026-06-13 01:53:47 -07:00
SirKentut b498ed3097 implemented app-describe for agent use: exposing the command tree of an app 2026-06-13 01:01:11 -07:00