Repository navigation
Honor imported safe-output disables across workflow merges - #77560
Conversation
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
|
✅ 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.
|
|
🚀 PR Specification Reviewer has started processing this pull request |
|
✅ 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.
|
|
✅ 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. ✅
|
|
✅ 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.
|
There was a problem hiding this comment.
Generated by PR Specification Reviewer for #77560 · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review-specs to run again
| mergeAutoDefaultedSafeOutput(&result.MissingData, importedConfig.MissingData, config, topRawSafeOutputs, "report-missing-data") | ||
| mergeAutoDefaultedSafeOutput(&result.NoOp, importedConfig.NoOp, config, topRawSafeOutputs, "noop") | ||
| mergeAutoDefaultedSafeOutput(&result.ReportIncomplete, importedConfig.ReportIncomplete, config, topRawSafeOutputs, "report-incomplete") | ||
| mergeAutoDefaultedSafeOutput(&result.MissingTool, importedConfig.MissingTool, config, explicitSafeOutputs, "report-missing-tool") |
There was a problem hiding this comment.
This merge path now honors an imported false by leaving the system handler nil. That conflicts with the safe-outputs specification: system types noop, report-missing-tool, and report-missing-data are unconditionally enabled, and each is mandatory and cannot be disabled (Section 7.2, current version 1.29.25). The same applies to report-incomplete (its type section also states mandatory/cannot be disabled). Please preserve those handlers even when an import supplies false, or update the normative contract through an approved design change rather than silently weakening it.
There was a problem hiding this comment.
Updated in 26ed3ea: imported false now preserves the mandatory handler and disables its issue-producing side effect instead. The specification remains unchanged.
Comment MemoryPeek at saved memory (spec-review-history)History |
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs and /tdd (triage: bug_fix). The fix is sound and the regression test is real.
📋 Key Themes & Highlights
Verification
- The new
TestSafeOutputsImportedDisabledDiagnosticspasses on this branch. - Against a reconstructed pre-fix
imports.go, it fails in the own-safe-outputs, later-defaults, earlier-defaults, and legacy-import-key cases. So it guards the regression. - Cross-import enable/disable ordering is already rejected at parse time by the
safe-outputs conflictcheck, so the newexplicitSafeOutputsordering does not open a new path.
Positive Highlights
- ✅ Tracking explicit keys in a map seeded from the main config and extended per import is a clear, small fix.
- ✅ Updating the
mergeAutoDefaultedSafeOutputcomment to describe the nil-fallback rule is useful.
Non-blocking Suggestions
- Inline comments on the test file: avoid the
tc.namestring check, and consolidate withTestSafeOutputsImportPreservesDisabledDiagnostics. - In
mergeAutoDefaultedSafeOutput, the first branch no longer requiresimported != nil. That is reachable via an import with explicitfalse. It looks intended, but a short comment or test case would make it explicit.
@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
| assert.Nil(t, data.SafeOutputs.NoOp) | ||
| assert.Nil(t, data.SafeOutputs.ReportIncomplete) | ||
| } | ||
| if tc.name == "own safe outputs" { |
There was a problem hiding this comment.
[/tdd] Branching on tc.name == "own safe outputs" ties an assertion to a display label, so renaming that case silently drops the check. Add a wantAddComment field to the table instead.
💡 Suggested change
Add wantAddComment bool to the struct, set it on the own safe outputs row, and assert if tc.wantAddComment { assert.NotNil(t, data.SafeOutputs.AddComments) }.
@copilot please address this.
There was a problem hiding this comment.
Updated in 26ed3ea: the test table now has an explicit wantAddComment field and asserts it directly.
| assert.Nil(t, workflowData.SafeOutputs.ThreatDetection, "ThreatDetection must remain nil when explicitly disabled by main workflow") | ||
| } | ||
|
|
||
| func TestSafeOutputsImportedDisabledDiagnostics(t *testing.T) { |
There was a problem hiding this comment.
[/codebase-design] This test sits beside the near-identical TestSafeOutputsImportPreservesDisabledDiagnostics (line 2249), which already covers the main-disables and explicit-handler paths. Two similarly named tests blur which one owns import-disable semantics.
💡 Suggested change
Fold the new rows (import-order and legacy-key cases) into the existing table test and keep a single test name for this behaviour.
@copilot please address this.
There was a problem hiding this comment.
Updated in 26ed3ea: the import-disable and main-precedence cases are consolidated into the single TestSafeOutputsImportPreservesDisabledDiagnostics table test.
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 correctness issue: explicit imported noop: false is later re-enabled by repo-memory ledger default injection. Please preserve explicit-disable state through that defaulting path and add coverage for the ledger configuration.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~6 AIC · ⌖ ~1 AIC · ⊞ 1.5K
Comment /review to run again
| mergeAutoDefaultedSafeOutput(&result.ReportIncomplete, importedConfig.ReportIncomplete, config, topRawSafeOutputs, "report-incomplete") | ||
| mergeAutoDefaultedSafeOutput(&result.MissingTool, importedConfig.MissingTool, config, explicitSafeOutputs, "report-missing-tool") | ||
| mergeAutoDefaultedSafeOutput(&result.MissingData, importedConfig.MissingData, config, explicitSafeOutputs, "report-missing-data") | ||
| mergeAutoDefaultedSafeOutput(&result.NoOp, importedConfig.NoOp, config, explicitSafeOutputs, "noop") |
There was a problem hiding this comment.
The imported noop: false can still be re-enabled later when repo-memory ledger mode is active, because applyDefaultCreateIssue injects NoOp whenever this merge leaves it nil. That makes the new disable semantics ineffective for a supported workflow configuration.
💡 Preserve explicit disables through default injection
Carry explicit-disable state into the later defaulting step (or prevent the ledger branch from injecting NoOp when noop was explicitly false), and add a regression test combining an imported noop: false with an enabled repo-memory ledger.
There was a problem hiding this comment.
Updated in 26ed3ea: imported noop: false now produces a non-nil handler with issue reporting disabled; a regression test verifies ledger default injection does not replace it.
Comment MemoryPeek at saved memory (review-history)History |
There was a problem hiding this comment.
🔵 Needs a closer look
Changes to safe-output precedence across main workflows and multiple imports alter issue-producing handler availability and failure reporting for existing workflows, requiring maintainer review.
No open issues 🎉
What changed in this PR
Updates gh-aw’s workflow compiler to honor imported safe-output disables while preserving explicit main-workflow settings, addressing #77507.
Changes:
- Honor imported disables for
report-missing-tool,report-missing-data,noop, andreport-incomplete. - Track explicit settings across imports so implicit defaults cannot re-enable disabled handlers.
- Add regression coverage for import order, main-workflow overrides, absent local safe outputs, and legacy aliases.
| File | Description |
|---|---|
pkg/workflow/imports.go |
Updates merge semantics and tracks explicit safe-output settings. |
pkg/workflow/safe_outputs_import_test.go |
Adds regression cases for imported disables and precedence. |
Review effort: Max (dynamic)
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "f82da6497bb56620a9c3ba2136d284001474f63e",
"kind": "requested",
"schema_version": "1",
"state": "c9a5d8967c7dd648607d1a69a879a01e2d50a00132da55879021f49ca69c5301",
"work": [
"1331cdd1855ee1827a8663d7f36e0264a0a0affb9cfe86dee36c6f5dce874c93",
"209eb9798359503ef8b73d1fdbbfaa9c209211b97af25d5ab8f115930362a8c3",
"51e2287c3d1ee41b7e13769862add61dcd292a623cf943abc5968c984e246bcf",
"7cdb190c0127b08cab502200527aa7ecc4f48b34999c4f24d4e7245f88b11250",
"89e70d3975bfb9b5e63a21ac41121e0bc885bd1641e9d56fab43e10a3f49a7c2"
],
"workflow": "pr-sous-chef"
}
|
…eport-missing-flags Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
| } | ||
| } | ||
|
|
||
| // preserveImportedSystemHandlers keeps mandatory system handlers enabled while |
…77643) #77559 and #77560 merged with a semantic conflict: the parameter topRawSafeOutputs was renamed to explicitSafeOutputs, leaving an undefined reference that broke every Go build. Keep import values OR-combined, with only the main workflow able to override them. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🎉 This pull request is included in a new release. Release: |
Imported
report-missing-tool: falseandreport-missing-data: falsewere ignored when the main workflow declared its ownsafe-outputsblock, leaving issue-producing tools enabled.noopandreport-incomplete, while preserving main-workflow precedence.report-missing-tool: falseandreport-missing-data: falseare ignored when the workflow has its own safe-outputs block #77507