Skip to content

The prose gate diffs against the base tip rather than the merge base, so another change's lines can fail this pull request #1658

Closed as not planned

Description

@ptr727

The prose gate's CI scope can include lines somebody else merged, and with a refusing rule in the default set that now fails a pull request over them.

.github/workflows/validate-task.yml passes base: ${{ github.event.pull_request.base.sha }} to the prose-gate action. That is the base branch's tip at the moment the event fired, while actions/checkout builds the pull request's merge ref. Anything that lands on the base between the event and the run therefore sits inside the diff the gate reads as this pull request's added lines.

Until now the consequence was bounded: the rules in the default set report on prose shape, so the worst case was a finding on a line somebody else wrote, on a file this pull request also touched. comment-added changes the consequence, because its remedy is deleting the line or labeling the pull request, and neither is right for a line another change merged.

The correct base is the merge base between the head and the base branch, git merge-base origin/<base> HEAD, which is what scripts/local_review.py and the local-strict-review skill already use for exactly this reason. The action resolves refs itself and retries on replication lag, so it has the history to compute one.

Worth checking before changing it

  • Whether the composite action should compute the merge base itself, which keeps every caller correct with no caller change, or take it from the caller, which keeps the action's input honest about what it is given.
  • A downstream repository consuming the action at a pin keeps the current behavior until the pin moves, so the two halves disagree in the interim, per docs/reusable-workflows.md.

Found by the local review pass on the comment-added branch. The scope semantics predate that change, so it blocks nothing there.

Activity

  1. added
    gate
    on Sep 17, 2026
  2. ptr727 commented on Oct 7, 2026

    @ptr727
    OwnerAuthor

    Another instance, 2026-10-07: #2493's Lint sources job failed comment-added on host-setup/bootstrap.ps1:295, a file that pull request never touched. #2496 had merged a comment line there into develop after #2493's fork point. Merging develop into the feature branch cleared it, at the cost of one more local review pass on unchanged content, since the receipt is keyed on the fork point.

  3. ptr727 commented on Oct 31, 2026

    @ptr727
    OwnerAuthor

    Backlog burndown round 2 claim. Branch: feature/burndown-1133-1658. Group: #1133, #1658 (regression tests for fixes already on develop).

    Predicted file set:

    • tests/test_audit.py
    • tests/test_workflow_steps.py
    • tests/workflow_steps.py

    No other live group may edit these files until this branch merges or the claim is released here.

  4. ptr727 commented on Oct 31, 2026

    @ptr727
    OwnerAuthor

    Claim released: feature/burndown-1133-1658 is abandoned and was never pushed. The regression test this round set out to add already exists on develop (431ffaf):

    • .github/workflows/validate-task.yml resolves the diff base in a prose-base step and passes base: ${{ steps.prose-base.outputs.base }} to the gate, not the event's base.sha.
    • tests/test_prose_lint.py test_the_gate_reads_the_resolved_base (around line 7766) pins that input. Neighbouring tests run the step's script against a constructed merge commit.

    The fix is present and pinned, so nothing is left to change here. This is left for the maintainer to close.

  5. ptr727 commented on Oct 31, 2026

    @ptr727
    OwnerAuthor

    Closed as obsolete at the maintainer's direction on 2026-10-31, per the evidence comment above: nothing remains to fix or test here.

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

    gate

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions