Repository navigation
Refactor issue and comment Markdown into report trees - #72415
Conversation
Compose typed bodies, diagnostics, recovery instructions, and attribution before publication rendering. Preserve metadata, protected footers, managed memory, and literal Jira ADF contracts. Add an issue-markdown skill and regression coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
✅ 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.
|
|
✅ 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. ✅
|
|
✅ 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.
|
There was a problem hiding this comment.
Review summary
No actionable blocking issues found in the changed lines reviewed. The specialist pass was unavailable because its diff-read tool invocation was rejected; this review therefore relies on the independent static pass only. No tests or builds were run.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~5 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again
✅ Test Quality Sentinel: Report Trees RefactorSummaryPR #72415 ("Refactor issue and comment Markdown into report trees") modifies 47 JavaScript test files ( Key Metrics
Quality AssessmentStrengths ✅
Detailed Test Sample Reviewreport_ast.test.cjs (51 test cases)Focus: Report AST normalization, rendering, redaction, and security invariants. Test Categories:
Assessment: Strong design-test ratio; security-focused; high-value behavioral contracts. add_comment.test.cjs (132 test cases)Focus: Safe-output publication with size fitting, fallback logic, and comment lifecycle. Test Categories:
Assessment: Comprehensive behavioral coverage; parametrized edge cases; error paths well-tested. messages.test.cjs (129 test cases)Focus: Template rendering, configuration parsing, and message generation. Test Categories:
Assessment: Clean assertion patterns; proper environment isolation; good coverage of happy path and edge cases (undefined values, type coercion). No Violations Detected
Scoring & RecommendationTest Quality Score: 85/100 (Excellent)
Recommendation: ✅ APPROVE — Test quality is strong, comprehensive, and well-aligned with design invariants. Report tree abstractions are protected by security-focused and boundary-aware test coverage. No guideline violations or hard failures detected. Notes
|
There was a problem hiding this comment.
✅ Test Quality Sentinel: 85/100 Excellent. 47 test files with 18,572 total test cases show strong behavioral coverage, comprehensive edge-case testing, and no guideline violations. Design-test ratio ~90%, error-path assertions consistently present. Approval recommended.
🧪 Test quality analysis by Test Quality Sentinel · copilot · haiku45 · ~32 AIC · ⌖ ~7 AIC · ⊞ 8.9K
Comment /review to run again
Normalize trailing whitespace before sizing publication output and remove redundant caller trims and newline allowances. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /codebase-design and /improve-codebase-architecture (via pr-triage) to this large tree-first Markdown refactor.
📋 Key Themes & Highlights
Key Themes
- Leftover transitional shims:
generatePatchPreview,renderManifestProtectionFallbackBody, andbuildPushErrorSectionincreate_pull_request_helpers.cjsare superseded by their*Blocksequivalents but remain exported, tested, and referenced only in stale comments increate_pull_request.cjs— flagged inline. - Scope limitation acknowledged: the pre-fetched diff caps at 3000 lines / 41 of 120 changed files, so files like
report_ast.cjs,report_markdown.cjs,report_size.cjs,handle_agent_failure.cjs,markdown_body_helpers.cjs, andmessages_footer.cjs(the actual core of the new tree API, perpr-triage) were not visible in the truncated patch. I reviewed them directly from the checked-out tree instead and found the public API (Report/ReportBlock/ReportInline,buildIssueBodyReport,appendReportExecutionProvenance,renderIssueParameters) to be coherent and consistent with the newissue-markdownskill doc.
Positive Highlights
- ✅
appendReportExecutionProvenancecorrectly strips any pre-existinggh-aw-execution/gh-aw-agentic-workflowmarkers before re-appending, avoiding duplicate provenance blocks. - ✅ The new
.github/skills/issue-markdown/SKILL.mdis thorough: it documents the tree-first contract, attribution composition table, and validation checklist, giving good future-navigability for this large surface area. - ✅
buildPushFailureIssueBlocks/buildFallbackIssueBlockscleanly separate configured template text from typed body content, matching the "parse before substitution" rule the skill calls out, and existing integration tests (create_pull_request.test.cjs) already exercise the push-failure and PR-creation-failure fallback paths.
No blocking issues found; one cleanup suggestion posted inline. Given the scope and truncation caveat above, treat this as a solid pass rather than an exhaustive audit of all 120 files.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · ~128 AIC · ⌖ ~16 AIC · ⊞ 10.2K
Comment /matt to run again
|
Reply to PR Code Quality Reviewer: No code change needed: this is a completion notice and the accompanying review reports no actionable blocking findings. Its static-only review scope is not treated as validation. |
|
Reply to Test Quality Sentinel status: Accepted as a status report only; |
|
Reply to Design Decision Gate: No code change needed: this gate reports |
|
Reply to Matt Pocock Skills Reviewer: No code change needed: this is an in-progress review notification with no findings or requested changes. |
|
Reply to Ponytail Reviewer: No code change needed: the reviewer reports no action and requests no change. This status notice alone does not verify review completeness. |
|
Reply to Test Quality Sentinel analysis: Partially accepted: the qualitative assessment requests no code change, but its test counts and coverage percentages are not verified. The latest |
Exercise exact attribution markers with and without GITHUB_RUN_ID so the activation-link fence regression test is deterministic in CI. Restore the inherited run ID after each case. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Critical parser backtracking and managed-memory loss remain unresolved, alongside mention, expiry, formatting, and publication regressions.
4 open issues
What changed in this PR
Refactors issue, comment, and review Markdown generation in actions/setup/js from string concatenation to typed report trees, centralizing rendering and publication-size handling.
Changes:
- Migrate safe outputs, lifecycle comments, diagnostics, work-queue projections, and fallback issues to report-tree composition.
- Extend template, metadata-marker, managed-memory fence, provenance, and size-fitting support.
- Update regression coverage and add the
issue-markdownauthoring skill.
| File | Description |
|---|---|
AGENTS.md |
Routes issue/comment Markdown work to the new skill. |
actions/setup/md/pr_permission_denied_fallback.md |
Separates the patch-preview block slot. |
actions/setup/md/firewall_blocked_domains.md |
Separates domain-list and YAML block slots. |
actions/setup/js/work_queue_issues.cjs |
Builds typed projection diagnostics and links. |
actions/setup/js/work_queue_issues_checks.cjs |
Updates escaped-redaction expectations. |
actions/setup/js/work_queue_issue_messages.cjs |
Builds queue reports; size fitting during length probing can discard descriptions instead of retaining previews. |
actions/setup/js/work_queue_issue_api.test.cjs |
Covers report rendering at mutation boundaries. |
actions/setup/js/work_queue_issue_api.cjs |
Accepts prepared reports for GraphQL mutations. |
actions/setup/js/update_pull_request_branches.cjs |
Renders maintenance comments; the new import invalidates the following triple-slash type directive. |
actions/setup/js/update_pr_description_helpers.test.cjs |
Updates canonical run-link expectations. |
actions/setup/js/update_activation_comment.test.cjs |
Adapts fixtures to report-based helpers. |
actions/setup/js/safe_output_type_validator.test.cjs |
Updates structured-data spacing expectations. |
actions/setup/js/safe_output_type_validator.cjs |
Composes structured data through reports; premature rendering neutralizes deferred mentions and escapes unresolved temporary IDs. |
actions/setup/js/safe_output_routing_parity.test.cjs |
Updates paragraph-separation expectations. |
actions/setup/js/safe_output_handler_manager.test.cjs |
Renders typed preambles in assertions. |
actions/setup/js/run_validate_workflows.cjs |
Builds validation issues and comments structurally. |
actions/setup/js/run_operation_update_upgrade.cjs |
Builds upgrade notifications as reports. |
actions/setup/js/run_activity_report.cjs |
Composes activity sections as typed nodes. |
actions/setup/js/route_slash_command.test.cjs |
Covers literal help metadata and escaping. |
actions/setup/js/route_slash_command.cjs |
Renders help comments from typed lists. |
actions/setup/js/report_size.test.cjs |
Covers durable review-marker protection. |
actions/setup/js/report_size.cjs |
Protects review markers during size fitting. |
actions/setup/js/report_markdown.cjs |
Extends template, marker, formatting, and fence parsing; the emphasis regex introduces exponential backtracking on agent-controlled input. |
actions/setup/js/report_html_fidelity.test.cjs |
Updates canonical subscript expectations. |
actions/setup/js/report_footer.test.cjs |
Updates literal-placeholder escaping expectations. |
actions/setup/js/report_failed_jobs.test.cjs |
Recognizes indented diagnostic fences. |
actions/setup/js/report_failed_jobs.cjs |
Builds job diagnostics structurally; unquoted expiration nodes break automatic expiry. |
actions/setup/js/report_ast.test.cjs |
Covers markers, scalar slots, and variable-length fences. |
actions/setup/js/reply_to_pr_review_comment.test.cjs |
Updates size-error and escaping expectations. |
actions/setup/js/reply_to_pr_review_comment.cjs |
Composes review replies; unexpanded mention aliases disable configured runtime mentions. |
actions/setup/js/push_to_pull_request_branch.test.cjs |
Aligns fallback fixtures with block slots. |
actions/setup/js/push_to_pull_request_branch.cjs |
Publishes protected-file fallback reports. |
actions/setup/js/notify_comment_error.test.cjs |
Covers fence boundaries and canonical statuses. |
actions/setup/js/notify_comment_error.cjs |
Composes final workflow-status comments structurally. |
actions/setup/js/missing_messages_helper.test.cjs |
Checks diagnostic wrappers and scalar trust boundaries. |
actions/setup/js/missing_messages_helper.cjs |
Constructs diagnostic sections without parsing dynamic values. |
actions/setup/js/missing_issue_helpers.test.cjs |
Updates template slots and heading escaping. |
actions/setup/js/missing_issue_helpers.cjs |
Builds diagnostic reports; a shipped-template placeholder mismatch prevents incomplete-run issue creation, and unquoted expiration breaks expiry. |
actions/setup/js/messages_run_status.cjs |
Adds typed creation and detection-message builders. |
actions/setup/js/messages_header.cjs |
Exposes unrendered header templates. |
actions/setup/js/messages_core.cjs |
Adds typed protected-file lists. |
actions/setup/js/markdown_body_helpers.cjs |
Adds shared tree-first footer assembly. |
actions/setup/js/mark_pull_request_as_ready_for_review.cjs |
Composes ready-for-review comments as reports. |
actions/setup/js/linear_safe_outputs.test.cjs |
Updates supported HTML-formatting expectations. |
actions/setup/js/linear_create_issue.cjs |
Renders complete Linear issue reports. |
actions/setup/js/label_apply_safe_outputs.test.cjs |
Covers numeric run-reference links. |
actions/setup/js/label_apply_safe_outputs.cjs |
Builds result comments structurally; the import splits the SEC-004 rationale, whose hardcoded-template wording also needs updating. |
actions/setup/js/jira_handlers.cjs |
Preserves literal ADF footer composition. |
actions/setup/js/issue_report.cjs |
Accepts typed issue-body blocks. |
actions/setup/js/issue_body_report_builder.test.cjs |
Normalizes diagnostic spacing in comparisons. |
actions/setup/js/handle_noop_message.test.cjs |
Updates canonical AIC escaping expectations. |
actions/setup/js/handle_noop_message.cjs |
Builds no-op reports; escaped tracker metadata and unquoted expiration break tracker discovery and expiry. |
actions/setup/js/handle_detection_runs.cjs |
Builds detection reports; tracker metadata becomes visible text and expiration is no longer recognized. |
actions/setup/js/handle_create_pr_error.cjs |
Builds permission-error issues and comments structurally. |
actions/setup/js/handle_agent_failure_max_ai_credits_exceeded.test.cjs |
Renders typed failure context in assertions. |
actions/setup/js/handle_agent_failure_daily_aic_workflow.test.cjs |
Adapts daily-credit context assertions. |
actions/setup/js/handle_agent_failure_ai_credits_rate_limit.test.cjs |
Adapts credit-rate-limit context assertions. |
actions/setup/js/gateway_difc_filtered.cjs |
Builds integrity-filter sections as nodes. |
actions/setup/js/firewall_blocked_domains.cjs |
Builds firewall sections with typed domain lists. |
actions/setup/js/failure_report.test.cjs |
Covers typed diagnostic and PR slots. |
actions/setup/js/failure_report.cjs |
Accepts typed contexts and exposes node helpers. |
actions/setup/js/expired_entity_handler_factory.cjs |
Builds expiration comments and markers structurally. |
actions/setup/js/execution_provenance.test.cjs |
Covers structural provenance replacement and ordering. |
actions/setup/js/execution_provenance.cjs |
Appends authoritative provenance to report trees. |
actions/setup/js/disable_agentic_workflow.test.cjs |
Covers hostile multiline API errors. |
actions/setup/js/disable_agentic_workflow.cjs |
Builds disable-result comments as reports. |
actions/setup/js/create_steering_issue.test.cjs |
Updates canonical attribution expectations. |
actions/setup/js/create_steering_issue.cjs |
Composes steering issues with typed footers. |
actions/setup/js/create_report_incomplete_issue.test.cjs |
Updates incomplete-report fixture slots. |
actions/setup/js/create_pr_review_comment.test.cjs |
Checks buffered policy-footer nodes. |
actions/setup/js/create_pr_review_comment.cjs |
Buffers review bodies and typed footers; unexpanded aliases neutralize configured runtime mentions. |
actions/setup/js/create_issue.test.cjs |
Updates formatting and policy-footer expectations. |
actions/setup/js/create_forecast_issue.test.cjs |
Covers literal labels and canonical tables. |
actions/setup/js/create_discussion.cjs |
Carries fallback warnings as framework-owned nodes. |
actions/setup/js/create_discussion_fallback.test.cjs |
Covers fallback warnings after unclosed fences. |
actions/setup/js/complete_steering_issue.test.cjs |
Updates escaped PR-link expectations. |
actions/setup/js/complete_steering_issue.cjs |
Builds completion comments structurally. |
actions/setup/js/comment_memory.cjs |
Composes managed-memory reports; size fitting can silently discard stored memory and its identifying fence while reporting success. |
actions/setup/js/comment_memory_helpers.test.cjs |
Covers variable-length and adjacent memory fences. |
actions/setup/js/comment_memory_helpers.cjs |
Extracts matching variable-length memory fences. |
actions/setup/js/close_older_pull_requests.cjs |
Builds supersession comments as reports. |
actions/setup/js/close_older_issues.cjs |
Builds outdated-issue comments as reports. |
actions/setup/js/close_entity_helpers.test.cjs |
Covers closure-comment publication boundaries. |
actions/setup/js/close_entity_helpers.cjs |
Composes closure comments with typed metadata. |
actions/setup/js/close_discussion.cjs |
Renders closing comments structurally; unexpanded aliases disable permitted runtime mentions. |
actions/setup/js/close_agentic_workflows_issues.cjs |
Renders no-reproduction closure comments. |
actions/setup/js/cleanup_stale_steering_issues.test.cjs |
Verifies exact compact cleanup-marker identity. |
actions/setup/js/cleanup_stale_steering_issues.cjs |
Builds cleanup comments with compact markers. |
actions/setup/js/check_workflow_recompile_needed.cjs |
Builds recompile issues and comments structurally. |
actions/setup/js/check_version_updates.cjs |
Publishes blocked-version reports at API boundaries. |
actions/setup/js/cancel_work_queue_closed_issue.test.cjs |
Verifies ledger-link and closure-marker serialization. |
actions/setup/js/cancel_work_queue_closed_issue.cjs |
Builds cancellation confirmations as reports. |
actions/setup/js/body_footer.test.cjs |
Updates protected-content error expectations. |
actions/setup/js/body_footer.cjs |
Adds typed footer composition; rewrites Azure DevOps/Linear bodies without a configured footer and drops mention allowlists during reparsing. |
actions/setup/js/assign_to_agent.test.cjs |
Updates credential-source escaping expectations. |
actions/setup/js/assign_to_agent.cjs |
Renders assignment-failure comments structurally. |
actions/setup/js/approve_workflow_run.cjs |
Composes approval comments with typed footers. |
actions/setup/js/add_workflow_run_comment.test.cjs |
Covers literal workflow names and fence boundaries. |
actions/setup/js/add_workflow_run_comment.cjs |
Builds activation comments and markers structurally. |
actions/setup/js/add_reaction_and_edit_comment.cjs |
Builds workflow-link comments as reports. |
actions/setup/js/add_comment.test.cjs |
Updates canonical rendering and structured-data assertions. |
actions/setup/js/add_comment.cjs |
Uses shared report composition; a second mention filter loses runtime-alias expansion. |
.github/skills/issue-markdown/SKILL.md |
Documents tree-first composition; needs guidance on quoted expiration nodes and allowMetadata: true for tracker templates. |
Review effort: Max
Use direct typed-builder tests to retain patch preview, push error, and fallback composition coverage, and remove stale helper references. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Reply to comment 6440758304: Acknowledged the completed code quality review. This notice requests no change and is not executed validation. |
|
Reply to comment 6440768464: Accepted as a status report only. The |
|
Reply to comment 6440768472: Acknowledged the gate's |
|
Reply to comment 6440777318: The skills-based review has now completed, superseding the earlier in-progress description. The actionable inline helper-cleanup finding is addressed separately. |
|
Reply to comment 6440777671: Acknowledged the |
|
Reply to comment 6440892706: Partially accepted: the qualitative assessment needs no source change, but its estimated test counts, coverage percentages, and score are not verified validation. For this batch, |
|
Reply to comment 6441007033: The prior no-change disposition remains applicable to the completion notice. Static review is separate from executed validation. |
|
Commit pushed:
|
Codex smoke test: FAIL✅ GitHub MCP · ✅ Serena · ❌ Playwright/title · ❌ Web fetch
|
Comment MemoryPeek at saved memory (smoke-codex)Note This comment is managed by comment memory.Expand the saved memory block to view or edit the persistent context for this thread.
|
|
Smoke: Refactor issue and comment Markdown into report trees. ✅ PR list, curl, file, build, subagent. ❌ serena, playwright, discussion, LSP (skipped). Overall: FAIL (partial). @pelikhan Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "host.docker.internal"See Network Configuration for more information.
|
This comment has been minimized.
This comment has been minimized.
|
💥 KA-POW! The smoke test agent was here! 🦸 WHOOOOSH! 💨 Like a speeding bullet, Claude engine 40521975915 blazed through all systems and came out the other side with flying colors!
⚡ ZAPP! All tests: NOMINAL. All systems: GO. All workflows: ACTIVE. 🎯 BLAMMO! See you in the next run, hero! 💥 Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "update.googleapis.com"See Network Configuration for more information.
|
There was a problem hiding this comment.
💥 Automated smoke test review - all systems nominal! Run 40521975915 complete.
Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
update.googleapis.com
To allow these domains, add them to the network.allowed list in your workflow frontmatter:
network:
allowed:
- defaults
- "update.googleapis.com"See Network Configuration for more information.
💥 [THE END] — Illustrated by Smoke Claude · claude · sonnet46 · ~78 AIC · ⌖ ~6 AIC · ⊞ 926
Comment /smoke-claude to run again
Regenerate the consolidated synthetic message Markdown snapshot for the tree-first renderer and retain the newly merged expression-parser and rollout changes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Carry the complete queue issue report through the GraphQL publication boundary so sanitized descriptions are rendered once and retain their final character limit. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Replace a misplaced alert marker inside the warning details with a bold label, retain the guidance, and refresh the consolidated preview. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep supported summary subscript nodes instead of stripping their wrapper. Render the firewall tip as a sibling alert, verify all five GitHub alert kinds round-trip through the AST, and refresh the consolidated preview. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve the resolved mention allowlist when composing project status footers, retain protected empty memory fences and update identity, and restore the github-script type directive before requires. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🎉 This pull request is included in a new release. Release: |


Why
Issue and comment publishers in
actions/setup/jsassembled Markdown with string concatenation and rendered fragments. This made wrapper boundaries, diagnostic trust, protected footers, and size limits difficult to preserve consistently.Approach
issue-markdownskill and route to it fromAGENTS.md.Compatibility notes
Rendering now uses canonical Markdown, so some whitespace, escaping, links, and supported inline HTML change serialization without changing their intended display. Jira ADF remains literal text rather than passing through Markdown normalization. Normal PR/discussion description assembly and step-summary-only output are outside this migration except where shared helpers or issue/comment fallbacks require changes.
Validation
make fmt-cjsandmake lint-cjspassed.npm run typecheckpassed.make agent-report-progresspassed: 48 JavaScript suites, 3,069 tests passed and 5 skipped; no changed Go files.awf_reflect_summary,checkout_dynamic, andfind_repo_checkoutsuites.Changeset
✨ PR Review Safe Output Test - Run 40521975915
Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
update.googleapis.comTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.