Repository navigation
Fix Package Specification Enforcer coverage upload path - #76534
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
🔵 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)
|
🍳 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": "e16e65e1d0f6d6eed8f40b41605d24d40e3c654d",
"kind": "requested",
"schema_version": "1",
"state": "4c523e3ffcec7f3aecd7807121d833f273c2ee11e1bddeaed6a1507c554fa650",
"work": [],
"workflow": "pr-sous-chef"
}
|
…lete-result-report # Conflicts: # .github/workflows/spec-enforcer.lock.yml Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Merged |
|
🎉 This pull request is included in a new release. Release: |
The workflow generated a valid Cobertura report but placed it under
$RUNNER_TEMPand 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.$GITHUB_WORKSPACE/coverageand pass its workspace-relative path so the handler can stage it.{"file":"coverage/spec-enforcer-cobertura.xml","language":"Go","label":"spec-enforcer/generated-tests"}