Skip to content

Make text-view template substitution single-pass - #83

Merged
rickardvh merged 1 commit into
masterfrom
codex/text-view-single-pass
Jul 13, 2026
Merged

rickardvh merged 1 commit into
masterfrom
codex/text-view-single-pass

Conversation

@rickardvh

Copy link
Copy Markdown
Owner

Summary

  • make Python output.emit text-view template substitution single-pass over the original template, matching TypeScript behavior
  • preserve placeholder-looking replacement text literally instead of expanding it again
  • document the single-pass substitution rule

Blocker Coverage

Addresses the remaining post-merge #81 portability blocker:

{
  "result": {"first": "{second}", "second": "resolved"},
  "template": "{first} {second}"
}

Python now renders {second} resolved, matching TypeScript instead of recursively producing resolved resolved.

Validation

  • uv run pytest tests/test_public_api.py::test_generated_output_emit_text_views_execute_in_python_and_typescript -q
  • uv run ruff check src/command_generation/primitive_executor.py tests/test_public_api.py
  • git diff --check origin/master...HEAD
  • uv run pytest

Follow-up to #81.

@rickardvh rickardvh added the semver:patch Release as a patch semver bump label Jul 13, 2026
@rickardvh
rickardvh merged commit a144e60 into master Jul 13, 2026
3 of 4 checks passed
@rickardvh
rickardvh deleted the codex/text-view-single-pass branch July 13, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

generated-runtime semver:patch Release as a patch semver bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant