Skip to content

F: publish only ledger-recorded commits (snapshot head may hold others) #113

Description

@mchwang

Why

From the #103 review (PR #110). The publisher pushes snapshot.head, and for a review the snapshot head can come from the user's checkout (runner/review.ts). GitBranchPusher only checks that the remote branch's current commit is ledger-owned, before it overwrites the branch. It does not check the commits being pushed. So commits the ledger does not record can reach the codeboost/ branch and the PR. These could be the user's own local commits, or an unrelated commit like the demo's "Unrelated diagnostic output". Otherwise, the push fails with "the runner repository has no commit".

This overlaps #22: rebasing writes foreign ledger entries. When #22 lands, ownedCommits must also be revisited (finding 4 of the #101 review).

Needed

  • Decide which head a task publishes: the runner's last commit, or the snapshot head checked against the ledger.
  • Before pushing, refuse a head whose base..head range holds a commit the ledger does not record as owned, unless a person accepted it.
  • Do this together with Add pre-merge rebase and head-bound command checks #22's ledger mapping.

Tests

🤖 Generated with Claude Code

Activity

  1. mchwang commented on Oct 4, 2026

    @mchwang
    ContributorAuthor

    Decision, made 2026-10-03: keep publishing the whole task head, as the design intends. Implemented in PR #119, which is stacked on #110.

    One gap found along the way and left for a separate follow-up: the merge gate inspects and merges github.pullRequest, not the task's published PR.

    This issue closes when PR #119 reaches main.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions