Skip to content

Fix TestStepOrderingValidation_SecretRedactionBeforeUploads: tighten Upload Safe Outputs assertion#25524

Merged
pelikhan merged 1 commit intomainfrom
copilot/fix-test-case
Apr 9, 2026
Merged

Fix TestStepOrderingValidation_SecretRedactionBeforeUploads: tighten Upload Safe Outputs assertion#25524
pelikhan merged 1 commit intomainfrom
copilot/fix-test-case

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 9, 2026

Summary

The integration test TestStepOrderingValidation_SecretRedactionBeforeUploads was failing because its assertion was too broad.

Root cause

The check:

if strings.Contains(contentStr, "name: Upload Safe Outputs") {

matched the intentional "- name: Upload Safe Outputs Items" step in the safe_outputs job (generated by buildSafeOutputItemsManifestUploadStep), which exists for a valid reason — it uploads the manifest as a separate artifact to avoid 409 conflicts.

Fix

Narrowed the assertion to use the exact old step name (with YAML list prefix and trailing newline), consistent with the identical check in agentic_output_test.go:

if strings.Contains(contentStr, "- name: Upload Safe Outputs\n") {

This only matches a step named exactly "Upload Safe Outputs" and does not match "Upload Safe Outputs Items" or "Upload Safe Outputs Assets".

Reference: https://github.com/github/gh-aw/actions/runs/24207061879/job/70665593242

…Upload Safe Outputs assertion

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/8e7bba39-ed6f-49f4-96a5-91a1bc9c30d2

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI requested a review from pelikhan April 9, 2026 19:19
@pelikhan pelikhan marked this pull request as ready for review April 9, 2026 19:22
Copilot AI review requested due to automatic review settings April 9, 2026 19:22
@pelikhan pelikhan merged commit e406559 into main Apr 9, 2026
55 checks passed
@pelikhan pelikhan deleted the copilot/fix-test-case branch April 9, 2026 19:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a flaky/broken integration test by tightening a string assertion so it only matches the exact legacy step name "Upload Safe Outputs" (and not similarly-named valid steps like "Upload Safe Outputs Items").

Changes:

  • Updated TestStepOrderingValidation_SecretRedactionBeforeUploads to check for the exact YAML step entry "- name: Upload Safe Outputs\n".
  • Added explanatory comments documenting why the exact match is required (to avoid matching other valid upload steps).
Show a summary per file
File Description
pkg/workflow/step_order_validation_integration_test.go Narrows the “Upload Safe Outputs” absence assertion to an exact step-name match to prevent false positives.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 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.

3 participants