Skip to content

Honor imported safe-output disables across workflow merges - #77560

Merged
pelikhan merged 4 commits into
mainfrom
copilot/fix-ignored-report-missing-flags
Nov 14, 2026
Merged

pelikhan merged 4 commits into
mainfrom
copilot/fix-ignored-report-missing-flags

Conversation

@pelikhan

@pelikhan pelikhan commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Imported report-missing-tool: false and report-missing-data: false were ignored when the main workflow declared its own safe-outputs block, leaving issue-producing tools enabled.

  • Merge semantics: Honor explicit imported disables, including for noop and report-incomplete, while preserving main-workflow precedence.
  • Multiple imports: Track explicit settings so later imports cannot re-enable disabled handlers through implicit defaults.
  • Regression coverage: Cover import order, main overrides, workflows without local safe outputs, and legacy key aliases.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@pelikhan pelikhan changed the title [WIP] Fix ignored report-missing-tool and report-missing-data flags Honor imported safe-output disables across workflow merges Nov 13, 2026
@pelikhan
pelikhan marked this pull request as ready for review November 13, 2026 22:32
Copilot AI adaptive review requested due to automatic review settings November 13, 2026 22:32
@github-actions

github-actions Bot commented Nov 13, 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.

Design Decision Gate 🏗️

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.

🏗️ ADR gate enforced by Design Decision Gate 🏗️ · pi · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 8.6K · ◷

@github-actions

Copy link
Copy Markdown
Contributor

🚀 PR Specification Reviewer has started processing this pull request

@github-actions

github-actions Bot commented Nov 13, 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 #77560 · codex · routed: gpt61 medium · ~3 AIC · ⌖ ~1 AIC · ◇ ~1 AIC · ⊞ 182 · ◷

@github-actions

github-actions Bot commented Nov 13, 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 · ~6 AIC · ⌖ ~1 AIC · ◇ ~1 AIC · ⊞ 1.5K · ◷

@github-actions

github-actions Bot commented Nov 13, 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 13, 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 · ◇ ~1 AIC · ⊞ 7.2K · ◷

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

Generated by PR Specification Reviewer for #77560 · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review-specs to run again

Comment thread pkg/workflow/imports.go
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")

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.

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.

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.

Updated in 26ed3ea: imported false now preserves the mandatory handler and disables its issue-producing side effect instead. The specification remains unchanged.

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (spec-review-history)
{"id":"ldg-7390a9a9-521a-467e-b618-2fa97345c7e4","parents":[],"payload":{"id":"ldg-c4a4b905-9486-4957-9568-1611958c8e60","operation":"append","value":{"finding_count":1,"head_sha":"f82da6497bb56620a9c3ba2136d284001474f63e","outcome":"regression"}},"sha":"sha256:fa921b1f7783c9de72e2b8430241d09db71a64c09b8347adabba9f27c0065031","timestamp":"2026-11-13T22:40:09.612Z","type":"ledger_append","version":1}
History

@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 (triage: bug_fix). The fix is sound and the regression test is real.

📋 Key Themes & Highlights

Verification

  • The new TestSafeOutputsImportedDisabledDiagnostics passes 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 conflict check, so the new explicitSafeOutputs ordering 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 mergeAutoDefaultedSafeOutput comment to describe the nil-fallback rule is useful.

Non-blocking Suggestions

  • Inline comments on the test file: avoid the tc.name string check, and consolidate with TestSafeOutputsImportPreservesDisabledDiagnostics.
  • In mergeAutoDefaultedSafeOutput, the first branch no longer requires imported != nil. That is reachable via an import with explicit false. 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" {

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.

[/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.

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.

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

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.

[/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.

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.

Updated in 26ed3ea: the import-disable and main-precedence cases are consolidated into the single TestSafeOutputsImportPreservesDisabledDiagnostics table test.

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (pr-code-quality-reviewer)
reviewed_at: 2026-11-13T22:36:10Z
review_event: REQUEST_CHANGES
top_themes:
  - explicit noop disable is re-enabled by repo-memory ledger defaults
files_reviewed:
  - pkg/workflow/imports.go
  - pkg/workflow/safe_outputs_import_test.go
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 · ~6 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 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

Comment thread pkg/workflow/imports.go
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")

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.

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.

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.

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.

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (review-history)
{"id":"ldg-f91f3dc8-8676-40e3-9805-499a285820bc","parents":[],"payload":{"id":"ldg-1838b87a-6070-47d1-a456-cecbfd354830","operation":"append","value":{"finding_count":1,"head_sha":"f82da6497bb56620a9c3ba2136d284001474f63e","outcome":"findings"}},"sha":"sha256:5f5610306e90240df3913488e61ffca8e0208067d071b9dfe21397bef20e4370","timestamp":"2026-11-13T22:48:58.468Z","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.

🔵 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, and report-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)

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (pkg/workflow/imports.go:557): address unresolved feedback - Review comment
  3. Review (pkg/workflow/safe_outputs_import_test.go:2242): address unresolved feedback - Review comment
  4. Review (pkg/workflow/safe_outputs_import_test.go:2196): address unresolved feedback - Review comment
  5. Review (pkg/workflow/imports.go:559): address unresolved feedback - Review comment
  6. Fix failing check conclusion (FAILURE): Check run.

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"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 xhigh · ~3 AIC · ⌖ ~2 AIC · ⊞ 6.9K · ◷
Comment /souschef to run again

gh-aw-bot and others added 2 commits November 13, 2026 23:13
…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>
Comment thread pkg/workflow/imports.go
}
}

// preserveImportedSystemHandlers keeps mandatory system handlers enabled while
@pelikhan
pelikhan merged commit 3054250 into main Nov 14, 2026
94 checks passed
@pelikhan
pelikhan deleted the copilot/fix-ignored-report-missing-flags branch November 14, 2026 02:54
pelikhan added a commit that referenced this pull request Nov 14, 2026
#77559 and #77560 crossed; the require-agent-success check referenced
topRawSafeOutputs inside mergeSafeOutputConfig where it was undefined,
breaking the Go/WASM build used by the docs workflow.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
pelikhan added a commit that referenced this pull request Nov 14, 2026
…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>
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.3.0

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.

Imported report-missing-tool: false and report-missing-data: false are ignored when the workflow has its own safe-outputs block

5 participants