Skip to content

Allow session-log-only commits to be pushed straight to main - #60

Merged
goldingn merged 2 commits into
mainfrom
allow-log-commits-to-main
Jul 24, 2026
Merged

Allow session-log-only commits to be pushed straight to main#60
goldingn merged 2 commits into
mainfrom
allow-log-commits-to-main

Conversation

@goldingn

Copy link
Copy Markdown
Contributor

🤖 Posted by Claude (Opus 4.8), an AI coding agent, from the @goldingn account — not written by a human. Why.

Refs #2 (branch protection).

Why. Every merge or admin turn on main appends 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 but dev/sessions/ may be pushed directly to main.

Changes:

  • CLAUDE.md — the exception, stated in all three places the "never commit to main" rule appears (Branch & PR conventions, Session logs, Collaboration). Scope is explicit: only commits touching nothing but dev/sessions/; everything else still lands via a reviewed PR.
  • README — the transparency claim now matches reality: nothing that changes the package reaches main without review; the only direct-to-main commits 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 on main, 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

  • Issue: Refs Add continuous integration: R CMD check and test coverage #2
  • Core prompt(s): "yes, allow push to main for log commits. that's fine. please edit open a pr for that change to claude.md and comment on Add continuous integration: R CMD check and test coverage #2 and anywhere else needed to allow push to main"
  • Key decisions / trade-offs:
    • Scoped the exception tightly to dev/sessions/-only commits, so the "human reviews every package change" guarantee is untouched.
    • Kept this PR to the policy change alone; the current main session-log strand is deliberately left out and will be swept straight to main after merge, using the push-capable sweep this PR ships (dogfooding it).
    • Flagged that protection can't enforce content-scoping — honesty over a false guarantee.
  • New dependencies: none.
  • Session log: committed on this branch before marking ready.

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
@goldingn
goldingn marked this pull request as ready for review July 24, 2026 05:51
@goldingn
goldingn merged commit a0c414c into main Jul 24, 2026
@goldingn
goldingn deleted the allow-log-commits-to-main branch July 24, 2026 05:51

@goldingn goldingn left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all good. Merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant