Files
CLI-Anything/browser
apireno a87647e07c fix(browser): R4 bot-cleanup — surface ls/grep errors, lock _daemon_lane_id, exc_info, HARNESS.md drift
Codex P2 + Copilot review of 5790651. One real correctness bug
(error visibility in non-JSON CLI), three defensive cleanups
(thread-safety, log traceback, doc drift). Pre-existing items
already tracked as #327, #328; two more filed as new follow-ups.

  1. browser_cli.py fs_ls + fs_grep non-JSON branches now check
     "error" in result before falling into the empty-collection
     "No elements"/"No matches" path. Mirrors fs_cd. Without this,
     `fs ls /nonexistent` displayed "No elements at /nonexistent"
     instead of DOMShell's "No such directory" error. (Codex P2)

  2. domshell_backend.py _daemon_lane_id capture wrapped in a
     threading.Lock; the test-and-set race on the `is None` check
     moved inside the lock. Cheap defensive measure for any future
     concurrent caller of _call_execute. (Copilot ×3)

  3. domshell_backend.py daemon-failure log.warning now carries
     exc_info=True so the traceback shows up in diagnosability
     output. (Copilot)

  4. HARNESS.md dropped the stale `group_id="shared"` reference
     (removed in 5790651's R3 fix) and replaced with accurate
     _daemon_lane_id-based wording for daemon-no-session callers.
     The split-and-check table accuracy (separate pre-existing item)
     stays scoped to #328. (Copilot)

Tests: 193 passing locally (was 191 + 2 new for ls/grep error
visibility).

Cc @yuh-yang

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-04 12:43:36 -04:00
..