Skip to content

Fix author prompt body metadata discovery regressions - #78880

Merged
pelikhan merged 4 commits into
mainfrom
pelikhan/pr-review-fixes
Nov 18, 2026
Merged

pelikhan merged 4 commits into
mainfrom
pelikhan/pr-review-fixes

Conversation

@pelikhan

Copy link
Copy Markdown
Collaborator

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 fmt
  • npm --prefix actions/setup/js run typecheck --silent
  • npm --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.

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]>
@pelikhan
pelikhan marked this pull request as ready for review November 18, 2026 01:15
Copilot AI adaptive review requested due to automatic review settings November 18, 2026 01:15
@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

PR Specification Reviewer

Outcome: reported_action

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.

Generated by PR Specification Reviewer for #78880 · copilot · gpt56 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.7K · ◷

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

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.

🧪 Test quality analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ⊞ 7.2K · ◷

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

PR Code Quality Reviewer

Outcome: reported_action

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.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt56 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.5K · ◷

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~8 AIC · ⌖ ~2 AIC · ⊞ 6.6K · ◷

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

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.

Generated by Ponytail Reviewer for #78880 · codex · routed: gpt61 medium · ~4 AIC · ⌖ ~1 AIC · ⊞ 185 · ◷

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (spec-review-history)
{"id":"ldg-40fa3d57-db1b-437d-abfd-2537b06ac777","parents":[],"payload":{"id":"ldg-5b6a5ec9-973b-45b2-a8fb-2bda13194bcf","operation":"append","value":{"finding_count":0,"head_sha":"4a1960e1d9e0b57386938db54ec8e95bb2115cff","outcome":"aligned"}},"sha":"sha256:1cd4b4017d824ac5f25f84740a656c69e58fd463438005470b1888b92159d980","timestamp":"2026-11-18T01:21:57.255Z","type":"ledger_append","version":1}
History

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (pr-code-quality-reviewer)
reviewed_at: 2026-11-18T01:18:16Z
review_event: REQUEST_CHANGES
top_themes:
  - comment masking can hide frontmatter fences
files_reviewed:
  - actions/setup/js/create_prompt.cjs
  - actions/setup/js/create_prompt.test.cjs
  - actions/setup/js/markdown_metadata.cjs
  - actions/setup/js/markdown_metadata.test.cjs
comment_count: 1
History

Note

This comment is managed by comment memory.

Expand the saved memory block to view or edit the persistent context for this thread.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.5K · ◷
Comment /review to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 thread actions/setup/js/markdown_metadata.cjs Resolved
@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (review-history)
{"id":"ldg-ecb416a5-eb5e-47a4-b66b-3b003f50a542","parents":[],"payload":{"id":"ldg-1dc49f52-1d12-4e26-ba98-1f728774e639","operation":"append","value":{"finding_count":1,"head_sha":"4a1960e1d9e0b57386938db54ec8e95bb2115cff","outcome":"findings"}},"sha":"sha256:3b03d7f719b077fae7f6b84b8c8dbca47d98da9827c9e8bfff492a5e517be1eb","timestamp":"2026-11-18T01:23:01.388Z","type":"ledger_append","version":1}
History

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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)

Comment thread actions/setup/js/markdown_metadata.cjs Resolved

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 <!-- throw unterminated 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

Comment thread actions/setup/js/markdown_metadata.cjs Resolved
Comment thread actions/setup/js/markdown_metadata.cjs Resolved
pelikhan and others added 3 commits November 17, 2026 17:34
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]>
Refresh compiled workflow body hashes to match the smoke-service-ports source merged from main.

Co-authored-by: Copilot App <[email protected]>
@pelikhan

Copy link
Copy Markdown
Collaborator Author

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.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

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.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

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.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

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.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

Reply to this test-quality report: no separate code change is requested by this notification. The boundary fix has focused regression coverage; reported_no_action is not being treated as verification.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

Reply to this code-quality report: the actionable boundary finding is fixed in 90238498c99 and answered in its review thread. No separate change is needed for this status notification.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

Reply to this review ledger entry: the recorded finding is fixed in 90238498c99 and answered in its review thread. No separate change is needed for this historical record, which is left unchanged.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

Reply to this saved code-quality finding: the masking issue is fixed in 90238498c99 and answered in its review thread. No separate code change is needed, and the managed historical memory is left unchanged.

@pelikhan
pelikhan merged commit c70f2ca into main Nov 18, 2026
41 checks passed
@pelikhan
pelikhan deleted the pelikhan/pr-review-fixes branch November 18, 2026 01:49
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.3.1

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.

2 participants