Skip to content

fix(stokowski): keep PR branches intact and accept "Accept" approvals - #290

Merged
bougyman merged 3 commits into
mainfrom
fix/stokowski-hook-and-approval
Sep 28, 2026
Merged

bougyman merged 3 commits into
mainfrom
fix/stokowski-hook-and-approval

Conversation

@ruby-automation

Copy link
Copy Markdown
Contributor

Two small fixes to the stokowski setup, both found while finishing EXT-68.

1. before_run no longer rewrites pushed branches (workflow.glean.yaml)

The hook rebased every clean branch onto origin/main. PR #286's branch contained a merge from main (from "Update branch"). On that branch the rebase dropped the merge commit and replayed the 5 feature commits, which left the workspace ahead 5, behind 6 of the PR, and it did this on every dispatch.

Now:

  • A branch with an upstream (main, or a pushed PR branch) is only fast-forwarded to that upstream with git pull --ff-only, and is never rewritten.
  • Only an unpushed local branch still rebases onto origin/main.

I ran the hook with /bin/sh against a scratch repo:

Case Result
main behind origin/main fast-forwarded
Pushed PR branch containing a merge commit unchanged, in sync with its upstream
PR branch that moved upstream fast-forwarded
Unpushed local branch rebased onto the latest main

All four exit 0.

2. Improvement accepts "Accept" (improvement.md, glean.md)

EXT-68's approval read "Accepted: G1, G2, and G3". It contains no Approve, so under the prompt's own rule nothing should have been created, yet improvement created all three. The result was right, but the agent broke its rule to get there.

  • The rule now accepts a word starting with Approve or Accept.
  • The report's first claim must quote the approval comment it used, word for word, so a reviewer can check the match.
  • Glean's instruction to the reviewer mentions both words.

Verification

  • workflow.glean.yaml parses, and the hook cases above pass.
  • The pre-commit gate passed: 24 root tests, 596 app tests, Credo clean.

🤖 Generated with Claude Code

ruby-automation and others added 3 commits September 27, 2026 20:46
The hook rebased every clean branch onto origin/main. On a PR branch
that already contains a merge from main (EXT-68's PR #286 after "Update
branch"), that dropped the merge commit and replayed the feature commits,
leaving the workspace "ahead 5, behind 6" of the PR on every dispatch.

A branch with an upstream (main, or a pushed PR branch) is now only
fast-forwarded to that upstream with `git pull --ff-only`. Only an
unpushed local branch still rebases onto origin/main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EXT-68's approval read "Accepted: G1, G2, and G3". It has no "Approve",
so under the prompt's own rule nothing should have been created, yet
improvement created all three: the outcome was right but the agent broke
its rule to get there. The rule now accepts a word starting with
"Approve" or "Accept", and the report must quote the approval comment it
used, so a reviewer can check the match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bougyman
bougyman merged commit d1788ed into main Sep 28, 2026
3 checks passed
@bougyman
bougyman deleted the fix/stokowski-hook-and-approval branch September 28, 2026 00:58
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.

2 participants