Files
codex/codex-rs/prompts/src/review_exit_tests.rs
T
Adam Perry @ OpenAIandGitHub ba2b67f9cd [codex] Consolidate shared prompts in codex-prompts (#25151)
## Why

`codex_core` is consistently a bottleneck for incremental builds during
iteration. The simplest fix is to make the crate smaller.

## Summary

`codex-core` owns several reusable prompt renderers and static prompt
assets, which makes the crate harder to split apart.

Rename `codex-review-prompts` to `codex-prompts` and move shared review,
goal, permissions, compaction, realtime, hierarchical AGENTS.md, and
`apply_patch` prompts into it. Move prompt-only tests and update
consumers and `CODEOWNERS`.

## Validation

- `just test -p codex-prompts -p codex-apply-patch`
- `just test -p codex-core prompt_caching`
- Bazel builds for the affected crates
2026-06-01 18:45:07 +00:00

19 lines
716 B
Rust

use super::*;
use pretty_assertions::assert_eq;
#[test]
fn render_review_exit_success_replaces_results_placeholder() {
assert_eq!(
render_review_exit_success("Finding A\nFinding B"),
"<user_action>\n <context>User initiated a review task. Here's the full review output from reviewer model. User may select one or more comments to resolve.</context>\n <action>review</action>\n <results>\n Finding A\nFinding B\n </results>\n </user_action>\n"
);
}
#[test]
fn normalize_review_template_line_endings_rewrites_crlf() {
assert_eq!(
normalize_review_template_line_endings("<user_action>\r\n <results>\r\n None.\r\n"),
"<user_action>\n <results>\n None.\n"
);
}