From fe0990452ca7806e64e985b3ecb553ddad4f4c2c Mon Sep 17 00:00:00 2001 From: Nathan Flurry Date: Tue, 17 Mar 2026 15:28:17 -0700 Subject: [PATCH] docs: update PRD and progress for US-035 Co-Authored-By: Claude Opus 4.6 (1M context) --- scripts/ralph/prd.json | 2 +- scripts/ralph/progress.txt | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/ralph/prd.json b/scripts/ralph/prd.json index 9846f39..25ccbb4 100644 --- a/scripts/ralph/prd.json +++ b/scripts/ralph/prd.json @@ -572,7 +572,7 @@ "Typecheck passes" ], "priority": 35, - "passes": false, + "passes": true, "notes": "BrowserProblem::start_failed (500 status, browser/start-failed code) is used as a catch-all for filesystem errors in browser_context.rs which makes error codes meaningless for API consumers." }, { diff --git a/scripts/ralph/progress.txt b/scripts/ralph/progress.txt index 028b180..531276e 100644 --- a/scripts/ralph/progress.txt +++ b/scripts/ralph/progress.txt @@ -628,3 +628,14 @@ Started: Tue Mar 17 04:32:06 AM PDT 2026 - Mutual exclusivity checks should be placed BEFORE acquiring the state lock, consistent with BrowserRuntime's pattern - `OnceLock` implements Debug and Clone (when T does), so it works with `#[derive(Debug, Clone)]` on the parent struct --- + +## 2026-03-17 - US-035 +- Added `internal_error` variant to `BrowserProblem` (500 status, `browser/internal-error` code) for filesystem/serialization errors +- Replaced all 5 `BrowserProblem::start_failed` usages in `browser_context.rs` with `BrowserProblem::internal_error` +- Fixed misleading comment in `browser_runtime.rs` console event handler: now actually normalizes CDP "warning" level to "warn" +- Files changed: browser_errors.rs, browser_context.rs, browser_runtime.rs +- **Learnings for future iterations:** + - `BrowserProblem::start_failed` should only be used for actual browser startup failures, not generic server-side errors + - CDP console event `type` field uses "warning" (not "warn") — always normalize to "warn" for consistency with standard log levels + - When adding new error variants, check existing tests in the module's `#[cfg(test)] mod tests` to ensure they still pass +---