SIGN IN SIGN UP

fix(#107 follow-up): retry on 'untrusted workspace' + escalate UpdateWorkspaceTrust silent failures (v2.0.46)

zhangzhang-bit on #107 after v2.0.45: env extraction now works but
upstream LS rejects SendUserCascadeMessage with 'untrusted workspace'.
Two compounding bugs in src/client.js:

1. warmupCascade's UpdateWorkspaceTrust catch handler silently swallowed
   non-transport errors (log.warn + return). If trust failed, the next
   "Cascade workspace init complete" line still printed and operators
   had no idea why subsequent SendUserCascadeMessage failed.

2. The per-Send retry loop only recognized 'panel state not found' /
   'cascade expired'. 'untrusted workspace' didn't match either, so the
   rethrow guard fired immediately — retry budget never spent, 'Stream
   error after retries' message lied (no retries actually happened).

Fix:
- Add isUntrustedWorkspace classifier matching the LS phrasing
- Plumb it into the existing panel-retry branch so re-warm + retry kicks
  in (force=true clears workspaceInit and re-runs all 4 warmup steps)
- Bump UpdateWorkspaceTrust silent-failure logging from warn to error
  with explicit hint about the symptom that follows
- Distinguish untrusted-workspace exhaustion in MAX_PANEL_RETRIES error

Tests: 476 -> 480 (+4 / 0 fail) — new test/untrusted-workspace-retry.test.js
covers classifier presence + retry-loop wiring + error-level logging +
exhaustion message specificity.
D
dwgx committed
eca0908a164488e1976f53264271abb843d8a1cb
Parent: f25781a