Skip to content

[codex] Protect the shipped create_plan prompt contract#119

Open
kfiramar wants to merge 2 commits into
mainfrom
implementations_envctl_create_plan_test_file-1
Open

[codex] Protect the shipped create_plan prompt contract#119
kfiramar wants to merge 2 commits into
mainfrom
implementations_envctl_create_plan_test_file-1

Conversation

@kfiramar
Copy link
Copy Markdown
Collaborator

Summary

  • add a dedicated test_create_plan_prompt_contract.py module for the shipped create_plan prompt
  • lock the planning-only, worktree-boundary, plan path, research, and final-response/envctl follow-up contract text with focused grouped assertions
  • keep the existing installer coverage untouched while giving prompt regressions a clearer failure surface

Why

The create_plan prompt 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_plan coverage 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 -q
  • pytest tests/python/runtime/test_prompt_install_support.py -q

Notes

  • ruff and basedpyright checks were not run here because those tools are not installed in this environment.

root 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
@kfiramar kfiramar marked this pull request as ready for review April 29, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant