Allow session-log-only commits to be pushed straight to main - #60
Merged
Conversation
Every merge and admin turn on `main` appends to that branch's session log, which then has no PR to carry it — forcing a separate housekeeping PR each time (e.g. #57). A session-log commit is auto-generated provenance with nothing to review, so route it around the PR-only rule: - CLAUDE.md: carve out the one exception — commits touching nothing but `dev/sessions/` may be pushed directly to `main`. Stated where the rule is ("Branch & PR conventions", "Session logs", "Collaboration"). - README: match the transparency claim to reality — nothing that *changes the package* reaches `main` without review; the only direct-to-`main` commits are the logs themselves. - sweep-session-logs.sh: on the default branch, push the log commit after making it; on any other branch, leave it for that branch's PR. Branch protection cannot inspect commit contents, so enforcement is a maintainer bypass plus this convention — noted for #2, where protection is set up. Refs #2 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R8QmvZEJTz9b7uNfJZTy3n
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R8QmvZEJTz9b7uNfJZTy3n
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #2 (branch protection).
Why. Every merge or admin turn on
mainappends to that branch's session log, which then has no PR to carry it — so each one otherwise needs its own housekeeping PR (#57 was one). A session-log commit is auto-generated provenance with nothing to review, so this carves out a single narrow exception: commits that touch nothing butdev/sessions/may be pushed directly tomain.Changes:
main" rule appears (Branch & PR conventions, Session logs, Collaboration). Scope is explicit: only commits touching nothing butdev/sessions/; everything else still lands via a reviewed PR.mainwithout review; the only direct-to-maincommits are the auto-generated logs, which carry no reviewable content.sweep-session-logs.sh— on the default branch it now pushes the log commit after making it; on any other branch it leaves the commit for that branch's PR. Verified against a local bare remote (pushes onmain, holds on a feature branch).Enforcement caveat (for #2). GitHub branch protection can't inspect what's in a commit, so it can't enforce "log-only". Once protection is enabled, allowing this means a maintainer bypass plus the convention above — not a hard machine guarantee. I've commented on #2 so whoever configures protection accounts for it. Branch protection is not enabled today, so the direct push works now.
How this was produced
dev/sessions/-only commits, so the "human reviews every package change" guarantee is untouched.mainsession-log strand is deliberately left out and will be swept straight tomainafter merge, using the push-capable sweep this PR ships (dogfooding it).