docs: enforce main-only release protocol - #75
Conversation
📝 WalkthroughWalkthroughThe PR adds repository workflow and release protocol guidance in ChangesRelease policy
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 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 `@AGENTS.md`:
- Around line 36-39: Normalize the ordered-list markers for items 8–11 in the
AGENTS.md section to match the repository-configured markdownlint MD029 style,
preserving the existing item order and content.
- Line 1: Update the opening heading in AGENTS.md from the second-level `madar`
heading to a top-level `#` heading, preserving the existing heading text.
- Around line 60-64: Pin the release contract to the exact reviewed promotion
commit instead of ancestry alone: update .github/workflows/publish.yml to
compare the release tag with the intended main commit, and update
tests/release-policy-contract.test.ts (lines 34-37) to enforce that exact-match
behavior. Keep AGENTS.md (lines 60-64) and CONTRIBUTING.md (lines 48-52) aligned
with the exact-commit requirement; do not weaken the documentation to permit any
ancestor tag.
In `@tests/release-policy-contract.test.ts`:
- Around line 12-21: Update the release-policy contract tests around the
instruction list and publish workflow assertions to explicitly prohibit use of
the long-lived NPM_TOKEN. Add the prohibition to the documented rules and assert
that the loaded workflow does not contain “NPM_TOKEN”, while preserving the
existing positive trusted-publishing and provenance checks.
🪄 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: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: bc38761b-92f8-4756-85e3-9f76483c805f
📒 Files selected for processing (3)
AGENTS.mdCONTRIBUTING.mdtests/release-policy-contract.test.ts
Summary
development→main; feature branches anddevelopmentcannot publish.npm publish --access public --provenancecommand authenticated with OIDC, neverNPM_TOKEN.maincommit.Security impact
main.NPM_TOKENin the release path.npmenvironment and provenance requirement.Validation
npm run lintnpm run typecheckChecklist
development