Problem: unified_guardrail.py calls process_output_response() but does not forward request_data β the full input-phase context dict. Any guardrail that needs to correlate input state with output state (e.g. PII tokens stored during masking) has no way to access it during output processing.
Part of #22821. Supersedes #22879.
Changes:
- base_translation.py: Add request_data: Optional[dict] = None to both abstract signatures
- unified_guardrail.py: Forward data as request_data at all three output call sites
- All 13 concrete handlers: Accept request_data parameter; handlers that build a local dict now merge with the incoming parameter via `{(request_data or {}), "response": response}`
- Existing tests updated: Mock handler signatures in unified guardrail tests
Test plan: New test file with 6 tests covering signature conformance and behavioral forwarding. All 6 new + 8 existing unified guardrail tests pass.