docs: make CI evidence-verify example robust under pipefail#1392
docs: make CI evidence-verify example robust under pipefail#1392ld-singh wants to merge 1 commit into
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 (1)
📝 WalkthroughWalkthroughThe "JSON Output for CI" section in Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested labels
🚥 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
Make the "JSON Output for CI" evidence-verify example in
docs/user/artifact-verification.mdrobust underset -o pipefail, and normalize the evidence-verify JSON flags.Motivation / Context
Follow-up to the deferred review nit on #1357. The previous example piped
aicr evidence verify ... | jq '.exit'inside a command substitution. Underset -o pipefail(common in CI), the verifier's non-zero exit (e.g. exit 2 = bundle invalid) propagates through the pipeline and can abort the script before thecaseruns. It fails closed, but it does not behave as the guide implies. The fix writes the JSON to a file first, absorbs the exit with|| true, then reads.exitfrom the file. Also normalized the nearby example from-t jsonto--format jsonfor consistency.Fixes: #1364
Related: #1357
Type of Change
Component(s) Affected
docs/,examples/)Implementation Notes
caseexample to:aicr evidence verify ... --format json -o result.json || truethencase "$(jq '.exit' result.json)" in ....set -erobustness).aicr evidence verify ... -o result.json -t jsonto--format json -o result.json.Testing
Docs-only change; MDX-safe and filename checks pass. CI runs the full gate plus the lychee anchor check.
Risk Assessment
Rollout notes: N/A
Checklist
git commit -S)