Files
strix/tests
oyasumiandClaude Opus 4.8 760dea6d38 feat(safety): review repeat_request instead of blocking it
repeat_request replays a captured HTTP request with optional modifications.
Its effective bytes are fully determined before dispatch — the captured request
is immutable and the modification overlay is deterministic — so it no longer
needs a blanket deterministic block.

- Extract resolve_effective_request in the proxy tool so the tool and the safety
  layer build the {method, url, headers, body} from the same function; the
  reviewed request is byte-for-byte the one that is sent.
- compile_network_evidence freezes that request as an evidence packet; the
  runtime routes repeat_request through the reviewer (and human approval when
  guarded+interactive), sending only if allowed and failing closed when the
  request cannot be resolved.
- Approval prompts now carry the real tool name (via _ExecReview.tool_name), so
  a deferred repeat_request no longer shows as exec_command.
- Reviewer prompt notes the replayed-request shape.

Tests cover allow/block/unresolvable/deferred paths and the packet shape.
Full Python suite, ruff, and mypy strix/ pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-12 16:33:35 +00:00
..