mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Retain user instructions in Guardian context (#42844)
## Why Guardian reviews need the original user instructions even when compaction or transcript selection removes them from the active conversation window. ## What changed - Capture complete user messages in host-owned retained context and include them as ordered authorization evidence alongside verified answers. - Omit oversized instructions atomically and emit an explicit incomplete-evidence notice instead of exposing a potentially misleading partial permission. - Mark user messages inherited by forked agents so they remain model-visible without becoming child-local authorization. ## Testing - Cover retained instructions across compaction, resume, rollback, and agent forks, including oversized evidence and legacy context behavior. GitOrigin-RevId: 97122509d818c90d2f87c6a1b29c99c05ad0316e
This commit is contained in:
1 parent
147137c1f4
commit
9c4253ffc1
20 files changed
+663
-140
No files matched your search
@@ -79,6 +79,7 @@ fn response_item_envelope_stores_metadata_beside_rollout_payload() -> Result<()>
|
||||
metadata: Some(CodexHarnessMetadata {
|
||||
client_authored: true,
|
||||
fallback_token_limit_override: Some(20_000),
|
||||
inherited_user_message: true,
|
||||
..Default::default()
|
||||
}),
|
||||
}),
|
||||
@@ -92,7 +93,11 @@ fn response_item_envelope_stores_metadata_beside_rollout_payload() -> Result<()>
|
||||
"ordinal": 7,
|
||||
"type": "response_item",
|
||||
"payload": response_item,
|
||||
"metadata": { "client_authored": true, "fallback_token_limit_override": 20_000 },
|
||||
"metadata": {
|
||||
"client_authored": true,
|
||||
"fallback_token_limit_override": 20_000,
|
||||
"inherited_user_message": true,
|
||||
},
|
||||
})
|
||||
);
|
||||
assert_eq!(serialized["payload"].get("metadata"), None);
|
||||
@@ -106,6 +111,7 @@ fn response_item_envelope_stores_metadata_beside_rollout_payload() -> Result<()>
|
||||
Some(CodexHarnessMetadata {
|
||||
client_authored: true,
|
||||
fallback_token_limit_override: Some(20_000),
|
||||
inherited_user_message: true,
|
||||
..Default::default()
|
||||
})
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user