fix(ci): always upload recipe-evidence report so comment gate works#1292
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughTwo GitHub Actions workflows were updated to improve resilience around evidence report artifact availability. The Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Summary
Fix the recipe-evidence comment workflow, which has failed on every run since the gate was introduced with
Artifact not found for name: recipe-evidence-report.Motivation / Context
recipe-evidence.yamlwrites its report to${{ runner.temp }}/report.md, but its upload step was gated onhashFiles(format('{0}/report.md', runner.temp)) != ''.hashFiles()only matches files insideGITHUB_WORKSPACE, andrunner.tempis outside it — so the expression always returned'', the guard was always false, and the upload was always skipped. The companionrecipe-evidence-comment.yamlworkflow then unconditionally tried to download an artifact that never existed and hard-failed.Confirmed against run history: the last 12 successful "Recipe Evidence: Verify" runs all show
Upload evidence report → skipped, and every triggered comment run failed at the download step. Broken since #1065 (2026-05-28).Fixes: N/A
Related: #1065
Type of Change
Component(s) Affected
.github/workflows/recipe-evidence*.yaml)Implementation Notes
recipe-evidence.yaml— dropped the brokenhashFilesguard. The upload step now runs onif: always()withif-no-files-found: ignore.upload-artifactreads the absoluterunner.temppath without issue (onlyhashFilescouldn't see it), so the report now actually uploads, and a genuinely-absent report is a quiet no-op rather than an error.recipe-evidence-comment.yaml— addedcontinue-on-error: trueto the download step. For the legitimate case where verify fails before writing a report (no artifact), the warning-only comment gate no longer turns red; it falls through to the existing[[ ! -s report.md ]]guard that skips posting.Testing
yamllint -c .yamllint.yaml \ .github/workflows/recipe-evidence.yaml \ .github/workflows/recipe-evidence-comment.yaml # exit 0Full end-to-end validation requires a live
recipes/**PR run on GitHub: "Recipe Evidence: Verify" should showUpload evidence report → success, and "Recipe Evidence: Comment" should post the sticky comment instead of failing at download. No Go code changed, somake test/lint gates are not exercised by this change.Risk Assessment
Rollout notes: N/A — takes effect on the next
recipes/**PR.Checklist
make testwith-race) — N/A, no Go changesgit commit -S)