mirror of
https://github.com/openai/codex.git
synced 2026-11-08 20:40:33 +00:00
codex: fix CI failure on PR #26833
This commit is contained in:
@@ -349,7 +349,7 @@ impl LoadedAgentsMd {
|
||||
Self {
|
||||
entries: vec![InstructionEntry {
|
||||
contents,
|
||||
provenance: InstructionProvenance::Internal,
|
||||
provenance: InstructionProvenance::Global(None),
|
||||
}],
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,26 +221,14 @@ fn configured_and_persisted_instructions_are_bounded_for_model_context() {
|
||||
fn replacing_global_instructions_preserves_project_entries_within_the_bound() {
|
||||
let project_source =
|
||||
AbsolutePathBuf::from_absolute_path("/tmp/project/AGENTS.md").expect("absolute path");
|
||||
let mut loaded = LoadedAgentsMd {
|
||||
entries: vec![
|
||||
InstructionEntry {
|
||||
contents: "old global".to_string(),
|
||||
provenance: InstructionProvenance::Global(None),
|
||||
},
|
||||
InstructionEntry {
|
||||
contents: "project".to_string(),
|
||||
provenance: InstructionProvenance::Project(Some(project_source.clone())),
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
loaded.replace_global(LoadedAgentsMd {
|
||||
entries: vec![InstructionEntry {
|
||||
contents: "new global".to_string(),
|
||||
provenance: InstructionProvenance::Global(None),
|
||||
}],
|
||||
let mut loaded = LoadedAgentsMd::from_text_for_testing("old global");
|
||||
loaded.entries.push(InstructionEntry {
|
||||
contents: "project".to_string(),
|
||||
provenance: InstructionProvenance::Project(Some(project_source.clone())),
|
||||
});
|
||||
|
||||
loaded.replace_global(LoadedAgentsMd::from_text_for_testing("new global"));
|
||||
|
||||
assert_eq!(
|
||||
loaded,
|
||||
LoadedAgentsMd {
|
||||
|
||||
Reference in New Issue
Block a user