[codex] Protect the shipped create_plan prompt contract#119
Open
kfiramar wants to merge 2 commits into
Open
Conversation
added 2 commits
April 17, 2026 21:01
The create_plan template carries planning-only, worktree-boundary, plan-path, and envctl follow-up rules, but existing coverage only checked that the preset existed and omitted one legacy string. Add a dedicated contract test file so prompt regressions fail with targeted feedback instead of hiding inside the broader installer test module. Constraint: User requested a test-only change centered on the shipped create_plan template Rejected: Snapshot the full prompt body | too brittle for harmless wording edits Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep create_plan prompt assertions clustered around contract language rather than exact whole-file snapshots Tested: pytest tests/python/runtime/test_create_plan_prompt_contract.py -q Tested: pytest tests/python/runtime/test_prompt_install_support.py -q Not-tested: Ruff check (ruff not installed in this environment) Not-tested: basedpyright check (basedpyright not installed in this environment)
OMX writes local session state under `.omx/` while these worktrees are active. Ignoring that directory at the repo level keeps implementation branches and PRs focused on source changes instead of local orchestration artifacts. Constraint: OMX writes per-worktree runtime state during normal local use Rejected: Leave `.omx/` visible to git | local session artifacts create noisy diffs and status output Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep this ignore limited to local orchestration state; do not hide user-facing repo artifacts here Tested: `git check-ignore -v .omx/state/session.json` Not-tested: Fresh clone behavior without existing `.omx/` paths
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test_create_plan_prompt_contract.pymodule for the shippedcreate_planpromptWhy
The
create_planprompt is a high-value contract, but the existing tests only verified that the preset exists and that one legacy changelog string is absent. That left meaningful prompt regressions under-protected.Impact
Maintainers now get a focused regression signal when the shipped planning prompt loses key instructions around repo boundaries, required plan structure, or the envctl follow-up/output contract.
Root cause
create_plancoverage lived only inside the broad prompt installer test module, so prompt text regressions could slip through without a targeted failure explaining what contract changed.Validation
pytest tests/python/runtime/test_create_plan_prompt_contract.py -qpytest tests/python/runtime/test_prompt_install_support.py -qNotes
ruffandbasedpyrightchecks were not run here because those tools are not installed in this environment.