Repository navigation
Fix author prompt body metadata discovery regressions - #78880
Conversation
Keep body thematic breaks out of document-frontmatter detection and mask HTML comments during metadata boundary discovery without changing compiler digest inputs. Add focused rendering and provenance regressions. Co-authored-by: Copilot App <[email protected]>
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Code Quality Reviewer completed the code quality review. PR Code Quality ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
Comment MemoryPeek at saved memory (spec-review-history)History |
Comment MemoryPeek at saved memory (pr-code-quality-reviewer)Note This comment is managed by comment memory.Expand the saved memory block to view or edit the persistent context for this thread.
|
There was a problem hiding this comment.
Found one blocking correctness issue in the new comment-masking logic. The inline comment explains how comment delimiters inside frontmatter can hide the real closing fence and abort or misparse prompt rendering. Review was static; no tests were run.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.5K
Comment /review to run again
Comment MemoryPeek at saved memory (review-history)History |
There was a problem hiding this comment.
🟡 Changes recommended
HTML-comment masking misinterprets markers inside YAML, causing previously valid metadata to fail with unterminated-frontmatter errors and abort prompt creation.
1 open issue
What changed in this PR
This PR follows up on #78828 to address metadata discovery regressions in gh-aw prompt rendering while preserving compiler-approved metadata provenance.
Changes:
- Keeps a temporary leading newline through all three author-body transforms to protect thematic breaks.
- Masks HTML comments during metadata discovery while retaining original source offsets.
- Adds five regression cases covering thematic breaks, commented headers, CRLF offsets, and active metadata provenance.
| File | Description |
|---|---|
actions/setup/js/markdown_metadata.test.cjs |
Adds commented-header and CRLF provenance regressions. |
actions/setup/js/markdown_metadata.cjs |
Masks HTML comments during metadata boundary discovery. |
actions/setup/js/create_prompt.test.cjs |
Tests thematic breaks and active metadata preservation. |
actions/setup/js/create_prompt.cjs |
Protects body separators throughout author-text transforms. |
Review effort: Balanced (adaptive)
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs and /tdd — requesting changes because the global comment mask introduces a parse regression.
📋 Key Themes & Highlights
Key Themes
- Regression: masking every
<!--before locating the document fence makes a valid frontmatter with an unclosed<!--throwunterminated frontmatter. The base code renders it. - Behaviour change: an inline-code
<!--now hides a later## agent:header. - Test gap: the new tests cover commented fences and headers, but not an unclosed comment inside frontmatter.
Positive Highlights
- ✅ The thematic-break and CRLF offset cases are covered and pass.
- ✅ Preserving original bytes for the digest lookup is the right call.
Verification
I ran the PR’s five regression assertions and they pass on head. I could not run the full vitest suite because npm ci fails on the sandbox TLS proxy. I confirmed the regression by running head and base on the same input.
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~8 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again
Restrict HTML comment masking to metadata header discovery so literal comment markers in frontmatter scalars cannot swallow closing fences or later headers. Add document and inline regressions covering later thematic breaks and CRLF offsets. Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Refresh compiled workflow body hashes to match the smoke-service-ports source merged from main. Co-authored-by: Copilot App <[email protected]>
|
Reply to this status report: acknowledged; no separate code change is requested. Completion status alone is not being treated as proof of correctness or coverage. |
|
Reply to this Ponytail status report: no separate code change is requested. The no-action outcome is not being treated as proof of correctness or comprehensive coverage. |
|
Reply to this specification ledger entry: no code change is requested, and this historical record is left unchanged. Its recorded outcome applies to the listed revision, not subsequent changes. |
|
Reply to this review-start notification: this announces work in progress, not a finding or completed review. No code change is requested by this comment. |
|
Reply to this test-quality report: no separate code change is requested by this notification. The boundary fix has focused regression coverage; |
|
Reply to this code-quality report: the actionable boundary finding is fixed in |
|
Reply to this review ledger entry: the recorded finding is fixed in |
|
Reply to this saved code-quality finding: the masking issue is fixed in |
ok
|
🎉 This pull request is included in a new release. Release: |

Summary
Follow up on review feedback from #78828, which had already merged. Prompt creation could abort or drop prose when the workflow body began with a thematic break, and commented-out agent examples with unmatched frontmatter fences could also abort rendering.
Keep a temporary leading newline through all three author-body transforms so body separators are never interpreted as document frontmatter. Mask HTML comments during metadata boundary discovery while retaining original source bytes and offsets for compiler-digest lookup. Add five regression cases covering thematic breaks, commented agent/skill headers, CRLF offsets, and active metadata provenance.
The compiler metadata projection and intentional name-derived agent descriptions remain unchanged.
Validation
make fmtnpm --prefix actions/setup/js run typecheck --silentnpm --prefix actions/setup/js run test:js -- --no-file-parallelism create_prompt.test.cjs markdown_metadata.test.cjs runtime_import.test.cjs extract_inline_sub_agents.test.cjs interpolate_prompt.test.cjs prompt_provenance_regressions.test.cjs interpolate_prompt_injection.test.cjs- 646 tests passed.BASE_REF=0ffa2f7ada7799705ecca828d7e8f8e0145f8ef3 make agent-report-progress- passed; JavaScript lint reported warnings only, with no errors.Used canonical macOS temporary paths and workspace-local tool executables for validation. No live workflow was dispatched.