You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(tools): a read-only workspace is a condition, not a defect (BRO-2227)
`chmod 555 <workspace>` then `propose` returned UNEXPECTED with a raw EACCES,
and exit 1. The CLI's own contract says exit 1 means a defect and UNEXPECTED is
"the backstop that should never fire" -- so an operator was told Parallax is
broken when the accurate answer was that their directory is not writable. The
two have completely different remedies, and the wrong one sends someone reading
our source instead of their mount options.
It is also not a rare case: a read-only bind mount is the confinement posture
this design assumes, so a tenant hits it on the first call.
Every write in src/tools/state.ts now goes through one guard that maps EACCES,
EROFS, EPERM and ENOSPC to a distinct WorkspaceNotWritableError. A distinct
class rather than a generic wrap, so every OTHER throw still reaches the
backstop, which is where an actual defect belongs.
Both adapters map it identically -- WORKSPACE_NOT_WRITABLE, and the CLI returns
2 (a typed refusal) rather than 1. A condition that is a typed refusal on one
surface and a crash on the other is precisely the divergence the "agent is a
user" claim rules out, so the two backstops carry the same mapping rather than
one delegating politeness to the other.
Verified on both surfaces with the control: read-only refuses with the code on
CLI and tools alike, writable still returns ok on both.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments