Skip to content

Fix Package Specification Enforcer coverage upload path - #76534

Merged
pelikhan merged 3 commits into
mainfrom
copilot/aw-fix-incomplete-result-report
Nov 10, 2026
Merged

pelikhan merged 3 commits into
mainfrom
copilot/aw-fix-incomplete-result-report

Conversation

Copilot AI commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

The workflow generated a valid Cobertura report but placed it under $RUNNER_TEMP and submitted a bare filename. The safe-output handler rejected the file as outside its allowed source roots, causing the run to report an incomplete result.

  • Use an approved source path: Write the report under $GITHUB_WORKSPACE/coverage and pass its workspace-relative path so the handler can stage it.
  • Prevent regression: Add a check for the supported path and reject the previous staging path; regenerate the workflow lock.
"$(go env GOPATH)/bin/gocover-cobertura" \
  < /tmp/gh-aw/spec-enforcer/coverage.out \
  > "$GITHUB_WORKSPACE/coverage/spec-enforcer-cobertura.xml"
{"file":"coverage/spec-enforcer-cobertura.xml","language":"Go","label":"spec-enforcer/generated-tests"}

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix package specification enforcer reported incomplete result Fix Package Specification Enforcer coverage upload path Nov 10, 2026
Copilot AI requested a review from pelikhan November 10, 2026 15:16
@pelikhan
pelikhan marked this pull request as ready for review November 10, 2026 15:34
Copilot AI adaptive review requested due to automatic review settings November 10, 2026 15:34

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

The workflow compiles strictly, but external security and linting scanners could not run, leaving a coverage gap that requires human review before approval.

No open issues 🎉

What changed in this PR

Fixes the Package Specification Enforcer coverage upload by writing the Cobertura report under the approved workspace path and passing a workspace-relative path to the safe-output handler.

Changes:

  • Writes coverage to $GITHUB_WORKSPACE/coverage/spec-enforcer-cobertura.xml.
  • Adds regression checks for supported and rejected coverage paths.
  • Regenerates the workflow lock metadata and admission hash.
File Description
pkg/​workflow/​compiled_lock_files_test.go Adds regression checks for the supported coverage path and rejection of the former staging and bare-filename paths.
.github/​workflows/​spec-enforcer.md Writes the Cobertura report under the workspace coverage directory and uses the workspace-relative upload path.
.github/​workflows/​spec-enforcer.lock.yml Regenerates lock metadata and the workflow admission hash for the updated source workflow.

Review effort: Lite (auto)

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

Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering.

Structured data
{
  "completed_task": 0,
  "head": "e16e65e1d0f6d6eed8f40b41605d24d40e3c654d",
  "kind": "requested",
  "schema_version": "1",
  "state": "4c523e3ffcec7f3aecd7807121d833f273c2ee11e1bddeaed6a1507c554fa650",
  "work": [],
  "workflow": "pr-sous-chef"
}

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

…lete-result-report

# Conflicts:
#	.github/workflows/spec-enforcer.lock.yml

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

@copilot

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

Merged main into the branch in merge commit 6e05f2906a. The merge conflict in the generated spec-enforcer lock was resolved by regenerating locks; final validation passed.

Copilot AI requested a review from gh-aw-bot November 10, 2026 16:44
@pelikhan
pelikhan merged commit f2fabf8 into main Nov 10, 2026
47 checks passed
@pelikhan
pelikhan deleted the copilot/aw-fix-incomplete-result-report branch November 10, 2026 16:51
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.2.3

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] Package Specification Enforcer: reported incomplete result

4 participants