Repository navigation
Remove blank line before generated footer expiration - #74176
Conversation
Co-authored-by: pelikhan <[email protected]>
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: 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.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅ Warning threat detection engine error What happenedThe threat detection engine failed to produce results. Review the workflow run logs for details.
|
|
✅ 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.
|
|
✅ Test Quality Sentinel completed test quality analysis. Warning threat detection engine error What happenedThe threat detection engine failed to produce results. Review the workflow run logs for details. 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. Warning threat detection engine error What happenedThe threat detection engine failed to produce results. Review the workflow run logs for details.
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported, and the changes include targeted regression coverage for quoted expiration rendering, round trips, spacing preservation, and supported footer variants.
No open issues 🎉
What changed in this PR
This pull request removes the blank quoted line before generated footer expiration metadata while preserving existing spacing for paragraphs, alerts, and unquoted content.
Changes:
- Adds quote-aware compact spacing before expiration nodes.
- Adds AST rendering and round-trip regression coverage.
- Adds footer coverage for issues, pull requests, comments, and discussion comments, including expiration metadata preservation.
| File | Description |
|---|---|
actions/setup/js/report_ast.cjs |
Compacts spacing before expiration nodes within quoted blocks. |
actions/setup/js/report_ast.test.cjs |
Verifies quoted expiration rendering, round trips, and preserved spacing in other block types. |
actions/setup/js/issue_body_report_builder.test.cjs |
Verifies generated footer rendering and expiration metadata across supported publication types. |
Review effort: Lite (auto)
There was a problem hiding this comment.
Warning
threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.
What happened
The threat detection engine failed to produce results.
Review the workflow run logs for details.
Skills-Based Review 🧠
Applied /diagnosing-bugs and /tdd. Requesting changes for one round-trip regression and a matching test gap.
📋 Key Themes & Highlights
Key Themes
- Regression: compaction fires after any predecessor, including lists. Inside a quote, a list directly before an expiration loses the expiration on re-parse. Base keeps it.
- Test gap: new tests only cover a paragraph predecessor, so they miss the regression.
Positive Highlights
- ✅ Expiration spacing is correct in quotes, and unquoted and alert spacing are unchanged.
- ✅ Issue-body builder coverage spans all four item types.
- ✅ A paragraph-only compaction variant passes every new assertion and round-trips paragraph, list, code, heading, and table predecessors.
Verification Note
vitest could not be installed in this sandbox (TLS certificate error on npm), so the test files were run by executing their assertions directly in Node. Please confirm the suite under vitest in CI.
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~7 AIC · ⊞ 5.4K
Comment /matt to run again
| : value | ||
| ) | ||
| .join("\n\n"); | ||
| .map((value, index) => (index ? (compactExpiration && nodes[index].type === "expiration" ? "\n" : "\n\n") : "") + value) |
There was a problem hiding this comment.
[/diagnosing-bugs] Regression: the compaction also fires after lists. Inside a quote, a list directly before an expiration now loses the expiration on re-parse (round trip gives ["list"] instead of ["list","expiration"]; base preserves it). Paragraph, code, heading, and table predecessors round-trip correctly, so the fix can be narrow.
💡 Suggested fix and regression test
Limit compaction to paragraph predecessors:
.map((value, index) => (index ? (compactExpiration && nodes[index].type === "expiration" && nodes[index - 1].type === "paragraph" ? "\n" : "\n\n") : "") + value)Add a case that renders a quote containing [list, expiration], re-parses it with parseReportMarkdown(md, { allowMetadata: true }), and asserts the expiration node survives.
@copilot please address this.
There was a problem hiding this comment.
Addressed in the current head: compaction applies only after a paragraph predecessor, and a list-before-expiration case round-trips (covered by a test).
Generated by 🏁 PR Finisher · copilot · auto · ~22 AIC · ⌖ ~2 AIC · ⊞ 10.5K
| afterEach(() => vi.unstubAllEnvs()); | ||
|
|
||
| describe("report AST", () => { | ||
| it("compacts quoted expiration without changing paragraph, alert, or unquoted spacing", () => { |
There was a problem hiding this comment.
[/tdd] This test exercises only a paragraph predecessor, so it cannot catch the list round-trip regression above. Add a list-before-expiration case inside a quote and assert the expiration node still round-trips. The it.each in issue_body_report_builder.test.cjs has the same gap.
@copilot please address this.
There was a problem hiding this comment.
Added a quoted list-before-expiration round-trip test in report_ast.test.cjs (present in the current head).
Generated by 🏁 PR Finisher · copilot · auto · ~22 AIC · ⌖ ~2 AIC · ⊞ 10.5K
|
Warning threat detection engine error What happenedThe threat detection engine failed to produce results. Review the workflow run logs for details. 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.
Warning
threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.
What happened
The threat detection engine failed to produce results.
Review the workflow run logs for details.
Review: comment
One robustness issue was identified: the new block-rendering concatenation can expose undefined for unhandled AST node types. An inline comment includes the impact and a surgical fix.
Details
- Preserve empty output or fail explicitly for unknown block nodes before concatenating rendered values.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~2 AIC · ⊞ 1.7K
Comment /review to run again
| : value | ||
| ) | ||
| .join("\n\n"); | ||
| .map((value, index) => (index ? (compactExpiration && nodes[index].type === "expiration" ? "\n" : "\n\n") : "") + value) |
There was a problem hiding this comment.
This concatenation now turns an unhandled block node into the literal text undefined instead of the empty output produced by the previous join("\n\n"), so malformed or newly added AST nodes can silently publish undefined in issue/comment bodies.
💡 Preserve the old failure/output semantics
Normalize the mapped value before concatenating (for example, (value ?? "")) or add an explicit default case that throws for unknown node types. Either approach prevents an internal AST mismatch from leaking user-visible text.
There was a problem hiding this comment.
Addressed: each rendered value is coalesced with ?? "" before concatenation, so unhandled nodes yield empty output, not undefined.
Generated by 🏁 PR Finisher · copilot · auto · ~22 AIC · ⌖ ~2 AIC · ⊞ 10.5K
|
Warning threat detection engine error What happenedThe threat detection engine failed to produce results. Review the workflow run logs for details. PR FinisherPushed a fix for the open review feedback:
Local validation: a manual node round-trip check passed for list and paragraph predecessors. Vitest could not be installed (npm registry certificate error), so the test suites were not run, and Sous-chef head: 52bb908
|
|
Warning threat detection engine error What happenedThe threat detection engine failed to produce results. Review the workflow run logs for details. PR Finisher: pushed a fix limiting quoted expiration compaction to paragraph predecessors (list→expiration now round-trips), made
|
|
Note The pull request was not created — a fallback review issue was created instead due to protected file changes: #74213 PR Finisher: the three review items were already fixed in the head (compaction limited to paragraph predecessors, Sous-chef head: c0d05b1
|
|
Note The pull request was not created — a fallback review issue was created instead due to protected file changes: #74218 PR FinisherReview feedback (list-before-expiration regression, test coverage,
|
|
🎉 This pull request is included in a new release. Release: |
Generated footers insert an empty quoted line before expiration. This change places expiration directly beneath attribution.