ci: address coderabbit review on PR #1 — perms, sha-pin, spdx, actionlint#7
Conversation
…lint Four threads from PR #1 review, all accepted: 1. Narrow GITHUB_TOKEN default to read-only (Major) Dropped workflow-level pull-requests:write + checks:write. No job currently needs write — artifact upload uses contents:read. 2. Pin all third-party actions to commit SHAs (Major) 29 action references across ci.yml + labeler.yml now pin to 40-char SHAs with trailing `# vX.Y.Z` comments for human readability. Dependabot's github-actions ecosystem will update both SHA + comment. 3. SPDX check must enforce header location, not just token presence (Major) Switched `grep "$f"` to `head -n 15 "$f" | grep` — header must be near top-of-file per Law 7 intent, not buried somewhere in the blob. 4. Register custom Blacksmith labels in actionlint.yaml (Minor) Added .github/actionlint.yaml registering blacksmith-{2,4,8,16}vcpu- ubuntu-{2204,2404} so actionlint (used by CodeRabbit) stops flagging `runs-on: blacksmith-*` as unknown. Verified locally: - python yaml.safe_load passes on all 3 YAML files - All resolved SHAs verified via `gh api repos/.../commits/<sha>` Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThis PR hardens GitHub Actions security and reproducibility by establishing actionlint runner configuration, tightening CI workflow permissions to read-only defaults, pinning action references to commit SHAs across jobs, and restricting SPDX header detection to the first 15 lines of files. ChangesGitHub Actions Security and Configuration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
CR flagged on PR #7: tone_instructions was 1286 chars; CR's schema caps it at 250 and was falling back to default settings. Compressed to 230 chars — keeps authority order + reject-violators-cite-Law + "concrete diffs, skip nits". The detailed per-Law rules (panic!/unwrap, string errors, println!, unsafe SAFETY:, SPDX, ADR-for-architecture) already live in CLAUDE.md and docs/architecture/01-principles.md where they belong; CR reads CLAUDE.md anyway. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.coderabbit.yaml:
- Line 18: The file's governance counts are inconsistent: the tone_instructions
entry declares "15 Laws" while other places enforce "12 Laws"; update all
law-count references so they match the intended number (either change
tone_instructions to "12 Laws" or change the other law-count entries to "15
Laws") — locate the keys/values named tone_instructions and the law count fields
(the repeated "Laws" or numeric law-count entries present in the file) and make
them identical across the file, and ensure any accompanying text (e.g., "15
Laws" phrasing) and enforcement lists (the actual law entries) reflect the same
count.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 5d8efa0d-a96d-4599-bdd6-031c06eb2b0e
📒 Files selected for processing (1)
.coderabbit.yaml
CR caught a real inconsistency on PR #7: tone_instructions said "15 Laws" but other places still referenced "12 Laws". Source of truth is docs/architecture/01-principles.md, which has 15 Laws (Laws 13–15 ratified via ADR-0010 per docs/INTEGRATION-REPORT.md). Rejected CR's specific diff (would have downgraded to 12); applied the spirit of the finding — bumped all stale 12-references to 15: - .coderabbit.yaml line 7 (header comment) - .coderabbit.yaml line 15 (tone block comment) - .coderabbit.yaml line 110 (architecture path-instructions) - CLAUDE.md line 72 (principle-keeper row) - CLAUDE.md line 277 (CR tools summary) CLAUDE.md table at line 14 already enumerated all 15 Laws — no body changes needed there. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Addresses all 4 CodeRabbit threads from #1 (which was admin-merged before review was processed — this PR closes the loop).
GITHUB_TOKENdefault to read-only.github/actionlint.yamlTest plan
python yaml.safe_loadpasses on all 3 YAML filesgh api repos/<owner>/<repo>/commits/<sha>Spec refs
docs/architecture/01-principles.md— Law 7 (SPDX), Law 11 (telemetry)PRRT_kwDOSgA44s6CqISk,PRRT_kwDOSgA44s6CqISu,PRRT_kwDOSgA44s6CqISy,PRRT_kwDOSgA44s6CqISz🤖 Generated with Claude Code
Summary by CodeRabbit