Skip to content

Commit 0cf8241

Browse files
committed
ROADMAP #140: deprecated permissionMode migration silently downgrades DangerFullAccess to WorkspaceWrite — 1 test failure on main HEAD 36b3a09
1 parent 36b3a09 commit 0cf8241

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

ROADMAP.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -830,6 +830,30 @@ Acceptance:
830830
- channel status updates stay short and machine-grounded
831831
- claws stop inferring state from raw build spam
832832

833+
### 140. Deprecated `permissionMode` migration silently downgrades `DangerFullAccess` to `WorkspaceWrite`
834+
835+
**Filed:** 2026-04-21 from dogfood cycle — `cargo test --workspace` on `main` HEAD `36b3a09` shows 1 deterministic failure.
836+
837+
**Problem:** `tests::punctuation_bearing_single_token_still_dispatches_to_prompt` fails with:
838+
```
839+
assert left == right failed
840+
left: ... permission_mode: WorkspaceWrite ...
841+
right: ... permission_mode: DangerFullAccess ...
842+
warning: .claw/settings.json: field "permissionMode" is deprecated (line 1). Use "permissions.defaultMode" instead
843+
```
844+
The test fixture writes a `.claw/settings.json` with the deprecated `permissionMode: "dangerFullAccess"` key. The migration/deprecation shim reads it but resolves to `WorkspaceWrite` instead of `DangerFullAccess`. Result: `cargo test --workspace` is red on `main` with 172 passing, 1 failing.
845+
846+
**Root cause hypothesis:** The deprecated field reader in `parse_args` or `ConfigLoader` applies the `permissionMode` value through a permission-mode resolver that does not map `"dangerFullAccess"` to `PermissionMode::DangerFullAccess`, likely defaulting or falling back to `WorkspaceWrite`.
847+
848+
**Fix shape:**
849+
- Ensure the deprecated-key migration path correctly maps `permissionMode: "dangerFullAccess"` → `PermissionMode::DangerFullAccess` (same as `permissions.defaultMode: "dangerFullAccess"`).
850+
- Alternatively, update the test fixture to use the canonical `permissions.defaultMode` key so it exercises the migration shim rather than depending on it.
851+
- Verify `cargo test --workspace` returns 0 failures.
852+
853+
**Acceptance:**
854+
- `cargo test --workspace` passes with 0 failures on `main`.
855+
- Deprecated `permissionMode: "dangerFullAccess"` migrates cleanly to `DangerFullAccess` without downgrading to `WorkspaceWrite`.
856+
833857
### 137. Model-alias shorthand regression in test suite — bare alias parsing broken on `feat/134-135-session-identity` branch
834858

835859
**Filed:** 2026-04-21 from dogfood cycle — `cargo test --workspace` on `feat/134-135-session-identity` HEAD (`91ba54d`) shows 3 failing tests.

0 commit comments

Comments
 (0)