mirror of
https://github.com/openai/codex.git
synced 2026-10-20 17:38:45 +00:00
Add an optional JSON transcript format for Guardian (#51465)
## Why Transcript content can contain forged role headers, transcript boundaries, or claims of user approval. Guardian needs to distinguish that content from host-assigned authorship metadata. ## What changed - Add `features.guardianv2.transcript_mode` with `line` (the default) and `json` options for synchronous review and asynchronous scoring. - Render JSON transcript entries with host-assigned metadata and escaped `text`, and prepend matching provenance instructions to reviewer and classifier prompts. - Preserve JSON metadata when budget recovery shortens historical text, and keep provenance instructions outside the configured classifier prompt limit. ## Testing Add coverage for forged roles and approvals remaining within their original entries, JSON metadata surviving budget recovery, and provenance instructions surviving prompt limits. Extend review and scoring integration tests to verify JSON evidence and matching instructions. GitOrigin-RevId: 81a3580390d3c4d1a664e554976cda5f1adc9a2c
This commit is contained in:
@@ -268,6 +268,7 @@ async fn new_config(
|
||||
guardian_policy_config: None,
|
||||
guardian_extra_policy: None,
|
||||
guardian_policy_template: None,
|
||||
guardian_transcript_mode: Default::default(),
|
||||
guardian_conversation_history_prompt: None,
|
||||
guardian_conversation_history_max_output_tokens: None,
|
||||
guardian_circuit_break_action: Default::default(),
|
||||
|
||||
Reference in New Issue
Block a user