spec: support configurable template formats for Oz responses#361
spec: support configurable template formats for Oz responses#361oz-for-oss[bot] wants to merge 5 commits intomainfrom
Conversation
Co-Authored-By: Safia Abdalla <captainsafia@users.noreply.github.com>
|
@oz-for-oss[bot] I'm starting a first review of this spec-only pull request. You can view the conversation on Warp. I completed the review and posted feedback on this pull request. Powered by Oz |
There was a problem hiding this comment.
Overview
This PR adds product and tech specs for configurable workflow_comments in .github/oz/config.yml, centered on a shared template registry, strict validation, and preserving current behavior when no overrides are configured.
Concerns
- The tech spec's migration target list still omits several deterministic workflow-owned comment surfaces that remain hardcoded outside helpers, so the scoped implementation would not yet satisfy the product claim that current hardcoded workflow comment copy becomes configurable.
- The
Next stepsdesign only templates the section heading while leaving the actual step text hardcoded in workflow entrypoints, which keeps some of the most repository-specific workflow guidance out of config.
Verdict
Found: 0 critical, 2 important, 0 suggestions
Request changes
Powered by Oz
captainsafia
left a comment
There was a problem hiding this comment.
@oz-agent Let's make the following tweaks to the spec.
|
I'm working on changes requested in this PR (responding to a PR review body). Spec context was found and will be used to ground the change. You can view the conversation on Warp. I pushed changes to this PR based on the comment. Replied to and attempted to resolve 5 review comments that this run addressed. Next steps:
Powered by Oz |
Co-Authored-By: Safia Abdalla <captainsafia@users.noreply.github.com>
Co-Authored-By: Safia Abdalla <captainsafia@users.noreply.github.com>
|
/oz-review |
|
I'm re-reviewing this pull request in response to a review request. You can view the conversation on Warp. I completed the review and posted feedback on this pull request. Powered by Oz |
There was a problem hiding this comment.
Overview
This PR adds a centralized workflow comment template registry, extends .github/oz/config.yml loading to support workflow_comments, routes several existing helper/entrypoint strings through the new renderer, and adds specs, docs, and targeted tests for the new configuration surface.
Concerns
- The first-release template surface is still incomplete. Several deterministic workflow-owned completion/no-op messages remain hardcoded outside
workflow_comments, so repositories still cannot fully customize the core progress-comment copy promised by the product/tech specs. Examples includecreate_spec_from_issue.py:201,create_implementation_from_issue.py:245,respond_to_pr_comment.py:309, and the review completion/no-op paths inreview_pr.py:432-446andreview_pr.py:738. - The render-time
Missing placeholder values...error omits the resolved config path, which makes broken overrides harder to trace than the README/spec contract suggests.
Verdict
Found: 0 critical, 1 important, 1 suggestions
Request changes
Powered by Oz
|
|
||
| #### 2a. Enumerate the first-release template registry | ||
|
|
||
| The first release should explicitly register every deterministic user-visible string that is currently hardcoded in helpers or workflow entrypoints, rather than leaving implementers to rediscover them during coding. The initial namespace/key set should be documented in the new module and reflected in README examples. |
There was a problem hiding this comment.
workflow_comments — for example create_spec_from_issue.py:201, create_implementation_from_issue.py:245, respond_to_pr_comment.py:309, and review_pr.py:432-446 / review_pr.py:738. Repositories would still need to fork Python to change those responses, so the surface list here should either add those keys or narrow the promised coverage.
| name: str(value) | ||
| for name, value in (context or {}).items() | ||
| } | ||
| missing = sorted(name for name in placeholders if name not in normalized_context) |
There was a problem hiding this comment.
💡 [SUGGESTION] The other validation failures include the resolved .github/oz/config.yml path, but this render-time error does not. If a repo override uses an allowed placeholder that the caller forgot to supply, the maintainer only sees namespace.key, which is harder to trace than the README/spec contract implies. Consider including the resolved config path in this exception when the selected template came from workflow_comments.
… registry Add missing completion/no-op template keys to the registry and route all previously hardcoded entrypoint strings through render_comment_template: - create-spec-from-issue.complete_no_diff - create-implementation-from-issue.complete_no_diff - respond-to-pr-comment.complete_no_diff - review-pull-request.complete_no_feedback / complete_approved_with_reviewers / complete_approved_no_reviewers / complete_changes_requested / complete_commented Also include the resolved config path in the render-time missing-placeholder error when the template came from a workflow_comments override, and update the tech spec to enumerate all first-release keys including the completion paths. Co-Authored-By: Oz <oz-agent@warp.dev>
|
Addressed the review feedback: Hardcoded workflow comments moved to template registry:
The Config path in render-time errors: When a template was configured via Spec updated: |
|
@oz-agent Resolve the merge conflicts in this PR. |
|
I'm working on changes requested in this PR (responding to a PR conversation comment). Spec context was found and will be used to ground the change. You can view the conversation on Warp. I pushed changes to this PR based on the comment. Next steps:
Powered by Oz |
Co-Authored-By: Safia Abdalla <captainsafia@users.noreply.github.com>
|
/oz-review |
|
I'm re-reviewing this pull request in response to a review request. You can view the conversation on Warp. I completed the review and posted feedback on this pull request. Powered by Oz |
There was a problem hiding this comment.
Overview
This PR introduces the new workflow_comments config surface, adds a centralized template registry and render path across the workflow scripts, expands unit coverage, and documents/specifies the new override model.
Concerns
- The new product spec/example and placeholder guidance imply that
create-spec-from-issue.complete_createdcan interpolate${spec_preview_markdown}and${next_steps_markdown}, but the shipped implementation currently validates that template againstallowed_placeholders=("pr_url",)only. A maintainer who copies the documented example will get a config-validation failure instead of the advertised behavior.
Verdict
Found: 0 critical, 1 important, 0 suggestions
Request changes
Powered by Oz
| "complete_created", | ||
| "I created a new [spec PR](${pr_url}) for this issue.", | ||
| allowed_placeholders=("pr_url",), |
There was a problem hiding this comment.
create-spec-from-issue.complete_created embedding ${spec_preview_markdown} and ${next_steps_markdown}, but this allowlist only permits pr_url. Copying that documented config currently fails validation instead of working. Either expose those placeholders here (and pass them from the caller) or update the spec/docs to describe the shipped surface as separate shared.spec_preview / shared.next_steps_section overrides.
Summary
.github/oz/config.ymlworkflow_commentssection, a centralized template registry, and helper/script refactorsValidation
specs/GH347/product.mdandspecs/GH347/tech.mdfor config shape, scope boundaries, and implementation alignmentNotes