pup is the AI's own browser: a real, full Chrome on the user's desktop that the AI fully controls (a sandbox, not the user's signed-in browser). Rides Bridge; pup_* verbs open windows and tabs, navigate, screenshot, and eval JS.
Restructure step 0: characterization suite. Locks the CURRENT observable behaviour of pup's verbs (21 cases: read-only verbs, the open-drive-close lifecycle, and four refusal paths that must keep refusing with the same errorCode) so that splitting the 3,601-line handler into verbs/ modules surfaces any behavioural drift as a diff instead of as a user-reported bug days later. Compares response SHAPE and invariants, not volatile values — timings, ids and paths are normalised, as are the advisory fields pup emits intermittently by design (_reportIssues, _cleanupReport, occasional hints), because a suite with false positives gets ignored and is worse than no suite. Verified in both directions: clean run reports drift 0, and an injected baseline change IS caught.
Restructure step 0: characterization suite. Locks the CURRENT observable behaviour of pup's verbs (21 cases: read-only verbs, the open-drive-close lifecycle, and four refusal paths that must keep refusing with the same errorCode) so that splitting the 3,601-line handler into verbs/ modules surfaces any behavioural drift as a diff instead of as a user-reported bug days later. Compares response SHAPE and invariants, not volatile values — timings, ids and paths are normalised, as are the advisory fields pup emits intermittently by design (_reportIssues, _cleanupReport, occasional hints), because a suite with false positives gets ignored and is worse than no suite. Verified in both directions: clean run reports drift 0, and an injected baseline change IS caught.
Add dashboard ralph test: drives every dashboard action end to end (page script executes, SSE emits, icon serves, taskbar rows never exceed chrome processes, close-tab/close-window/flash/flash-all all take real effect) and asserts each result via browser_list_windows. This is the test that was missing across roughly 30 broken dashboard ships; 8/8 passing on 1.9.233.