Skip to content

Honor soft-skipped targets in safe-output handlers - #66555

Merged
pelikhan merged 2 commits into
mainfrom
copilot/aw-top-10-honor-soft-skip-targets
Oct 7, 2026
Merged

pelikhan merged 2 commits into
mainfrom
copilot/aw-top-10-honor-soft-skip-targets

Conversation

Copilot AI commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

When a triggering target falls outside its supported context, set_issue_type and registry-mode submit_pull_request_review treated the soft skip as a hard failure.

  • Target handling: Return a skipped result for soft target misses; preserve failures for hard target errors.
  • Regression coverage: Verify both outcomes for each handler.
{ success: false, skipped: true, reason: targetResult.error, error: targetResult.error }

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix soft-skip handling in safe-output handlers Honor soft-skipped targets in safe-output handlers Oct 7, 2026
Copilot AI requested a review from pelikhan October 7, 2026 12:27
@pelikhan
pelikhan marked this pull request as ready for review October 7, 2026 12:28
Copilot AI balanced review requested due to automatic review settings October 7, 2026 12:28

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.

Copilot review overview

🟢 Approval recommended

The focused changes preserve hard failures, and both handlers have regression coverage with appropriate test contexts.

Review effort: Balanced
Findings: None

What changed in this PR

Updates two safe-output handlers to honor soft-skipped targets, addressing #66487 without changing hard-error behavior.

Changes:

  • Return skipped results for soft target-resolution misses.
  • Add regression coverage for soft skips and hard failures in both handlers.
File Description
actions/​setup/​js/​submit_pr_review.test.cjs Covers registry-mode soft skips and hard failures.
actions/​setup/​js/​submit_pr_review.cjs Honors soft skips in registry mode.
actions/​setup/​js/​set_issue_type.test.cjs Covers issue-target soft skips and hard failures.
actions/​setup/​js/​set_issue_type.cjs Propagates soft skips while preserving hard errors.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@github-actions

github-actions Bot commented Oct 7, 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

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel skipped because pre-fetch PR data was unavailable: unable to fetch test file diff

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Lean already. Ship.

Generated by Ponytail Reviewer for #66555

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft.

No ADR enforcement needed for PR #66555: has_implementation_label=false and default_business_additions=0 (threshold 100, no custom .design-gate.yml). 4 files changed, none adding >100 lines in business logic directories.

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (pr-code-quality-reviewer)
reviewed_at: 2026-10-07T13:31:04.603+00:00
review_event: COMMENT
top_themes:
  - soft-skip target handling is now consistent for the changed handlers
  - regression coverage distinguishes soft skips from hard target failures
files_reviewed:
  - actions/setup/js/set_issue_type.cjs
  - actions/setup/js/set_issue_type.test.cjs
  - actions/setup/js/submit_pr_review.cjs
  - actions/setup/js/submit_pr_review.test.cjs
comment_count: 0

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 · gpt54 · 30 AIC · ⌖ 5.31 AIC · ⊞ 19.6K · ◷
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.

Verdict

No merge-blocking issues found in this soft-skip handling change.

Highlights

The new branches preserve hard failures while converting context-mismatch target resolution into explicit skipped results, and the added tests cover both the soft-skip and hard-error paths for each handler. I did not find a changed-line regression that would justify blocking the PR.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt54 · 30 AIC · ⌖ 5.31 AIC · ⊞ 19.6K
Comment /review to run again

@github-actions github-actions Bot mentioned this pull request Oct 7, 2026

@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.

Impeccable review (bug_fix → harden, audit)

Reviewed the two handler changes (set_issue_type.cjs, submit_pr_review.cjs) against harden/audit criteria for error/edge-state handling.

Findings: None blocking.

  • The new shouldFail === false → { success: false, skipped: true, ... } branches in both handlers exactly mirror the established soft-skip convention already used in add_labels.cjs, remove_labels.cjs, and replace_label.cjs.
  • Error strings asserted in the new tests ("not running in issue context", "not running in pull request context") match the actual messages produced by resolveTarget in safe_output_helpers.cjs.
  • Downstream consumers (safe_output_handler_manager.cjs, safe_output_manifest.cjs) already special-case result.skipped === true, so these results will correctly avoid being treated as workflow-failing errors.
  • Regression tests cover both the soft-skip path and the pre-existing hard-failure path (target: "*" with no identifier) for each handler, so behavior for genuine errors is preserved.

No changes requested.

🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · copilot · sonnet50 · 36.4 AIC · ⌖ 13.1 AIC · ⊞ 8.1K

@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 /tdd and /codebase-design — overall the fix is solid and well-tested; one gap flagged, no blocking issues.

📋 Key Themes & Highlights

Key Themes

  • Consistency: The shouldFail === false soft-skip pattern matches existing handlers (add_labels.cjs, remove_labels.cjs, replace_label.cjs), so this is a clean, idiomatic fix rather than a new abstraction.
  • Test coverage: Both set_issue_type.cjs and the registry-mode path of submit_pr_review.cjs get new regression tests distinguishing soft-skip vs. hard-failure — good /tdd discipline (root cause addressed, not just the symptom).
  • Gap: The legacy-buffer path in submit_pr_review.cjs (handleWithLegacyBuffer) wasn't updated or tested for the same soft-skip semantics — flagged inline.

Positive Highlights

  • ✅ Clear separation between "hard" (shouldFail: true) and "soft" (shouldFail: false) target-resolution failures, now honored where it was previously conflated.
  • ✅ New tests assert both outcomes (skipped: true vs. a real failure with Target is "*") for each handler touched.
  • ✅ core.warning used appropriately to surface the skip reason without failing the workflow run.

@copilot please address the review comments above.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · 113.7 AIC · ⌖ 14.7 AIC · ⊞ 10.1K
Comment /matt to run again

Comments that could not be inline-anchored

actions/setup/js/submit_pr_review.cjs:265

[/tdd] The legacy-buffer path (handleWithLegacyBuffer) wasn't updated to surface shouldFail === false as skipped: true the way the new registry path was. There's no regression test covering a soft-skip in legacy mode.

<details>
<summary>💡 Suggested follow-up</summary>

With target: &quot;triggering&quot; on a non-PR event (e.g. workflow_dispatch), the legacy path's targetResult.shouldFail check only logs a warning when shouldFail is true; when it's false (soft skip) it silently does…

actions/setup/js/set_issue_type.cjs:247

[/codebase-design] Good consistency: this mirrors the established shouldFail === false soft-skip pattern already used in add_labels.cjs, remove_labels.cjs, and replace_label.cjs. One small nit — set_issue_type.cjs and submit_pr_review.cjs both return { skipped: true, reason: ..., error: ... } with reason and error duplicating the same string, while other handlers (e.g. assign_to_agent.cjs, comment_memory.cjs) only set skipped: true without a reason field.

<details…

@pelikhan
pelikhan merged commit eb79e49 into main Oct 7, 2026
68 checks passed
@pelikhan
pelikhan deleted the copilot/aw-top-10-honor-soft-skip-targets branch October 7, 2026 15:46
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.91.5

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.

[AW Top 10] 03 Honor soft-skip targets in two safe-output handlers

3 participants