pr-review-loop: a body edit is not an entry point, and one PR holds one review #45
No reviewers
Labels
No labels
needs-info
needs-triage
ready-for-agent
ready-for-human
review
merge-ready
review
needs-fix
review
needs-human
review
needs-operator
review
needs-review
review
waiting
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
olympus/workshop!45
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "hermes/pr-review-edit-trigger"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
docs/automations/pr-review-loop.mdrecords the rule;test-payloads/pr-edited-body.jsonis the event, replayable.Evidence
Before —
olympus/infra-secrets#30, two reviews of one commit,989e247:pull_request/opened→ review dispatched, round 1pull_request/edited,changes: {body: …}→ review dispatched again, round 1The push itself was ignored (
pull_request_syncis not a trigger, exec 72246), and the true duplicate deliveries were absorbed (execs 72242, 72248) — but the dedupe was keyed on the head, and the rebase had moved it.After — published, then a real body edit against the live webhook (
pit/pr-loop-sandbox#6, a closed throwaway whose body was restored byte-for-byte afterwards):Nothing dispatched. The sandbox PR's body was verified identical to its previous value.
Suites, run against the published graph re-exported into the record (
versionId == activeVersionId == d5d39d01-f7fe-40d9-a705-9bbf3a192d50):node pr-review-loop/tests/parse.test.js— 17/17node pr-review-loop/tests/decide.test.js— 100/100New cases: a body edit refused; the readiness title edit still admitted; a retarget and a title+body edit still admitted; a body edit on a PR holding review state refused; a repeat open on a head a push moved absorbed with the marker intact; an open past the stale window still dispatches.
Merge Danger
Door: two-way for the record, and the behaviour is already live — the instance runs the published graph, so merging changes nothing in production and reverting this file does not revert the loop. The way back on the instance is
publish_workflowwith the previous version id046970b1-acd6-4762-86ee-4b172720d25e.Blast Radius: review dispatch
Two things the record now carries that are worth knowing:
Confignode's notes readengage_bot_author, a stale canvas hand-edit (the field isengage_authors). No MCP operation reaches a node's notes, so the record mirrors the canvas rather than this PR fixing it.Review started (round 1/5) on
d2575e3344— reading the diff now.repo: olympus/workshop·PR: #45·head: d2575e3344d1773c43c39aff5868bc4d2ceabe3c·round: 1/5·verdict: APPROVERecommendation: merge
Standards
ADVISORY —
pr-review-loop/workflows/forgejo-pr-review-loop.json:499— the Config node's notes now nameengage_bot_author, a field that does not exist. The same node declaresengage_authorsat:470, the Decide node's own header comment listsengage_authors, anddocs/automations/pr-review-loop.md:101documentsengage_authors. The PR body says this is a stale canvas hand-edit mirrored because no MCP operation reaches a node's notes, anddocs/automations/pr-review-loop.md:235says the export is "the graph as the instance holds it" — so the mirror follows the stated policy. The cost is that the one place a reader looks up the knobs now names a field that will be silently ignored if they add it. Smallest fix: leave this hunk out until the canvas note is corrected, or correct the note on the canvas and re-export.ADVISORY —
docs/automations/pr-review-loop.md:74-76— "Anediteddelivery counts only as the draft's readiness transition" is not the rule the code implements.Parse eventrefuses anediteddelivery only whenchanges.bodyis present andchanges.titleis absent; a retarget (changes.ref) and an edit carrying nochangesobject at all still reachDecideas an open — andpr-review-loop/tests/parse.test.js:86-87asserts the retarget case on purpose. Smallest fix: state what the code does ("a rewritten description —changes.bodywithout a title change — is not an entry point") and drop "only".Spec
No missing or partial requirement. All six behavioural claims reproduce (see below).
No scope creep requiring a change: the only hunks outside the rule are the export's own metadata — the
notesline at:499(already the finding above, not counted twice) and theversionIdbump at:799, which is what re-exporting the graph carries.Summary
:499— a wrong config knob name in the record's own documentationNo blocker. Two advisories, both advice; the recommendation does not turn on the count.
Verified
mise exec -- node pr-review-loop/tests/decide.test.js→ 100/100;…/parse.test.js→ 17/17 (the two suites thepr-checks / loop-decidejob runs).git show cc7735f5:pr-review-loop/workflows/forgejo-pr-review-loop.json) → 97/100 and 16/17, failing exactly the new assertions:a body edit -> not a trigger, and the three 17b checks including the marker (sha1, notsha-moved). The new tests fail on the old code for the reason claimed, so they are not passing for the wrong reason.pr-review-loop/test-payloads/pr-edited-body.jsonreplayed through the workflow's realParse eventcode with the headerssend-test-event.sh n8nsends →proceed: false, reason: "pull_request/edited to the body is not an entry point", pr: 9999. The fixture does what the body says it does.scripts/docs-check.py→ 3/3 assertions hold; workflow JSON and fixture both parse.duplicateexpression by hand over bot/human ×pr_opened/label× same head/moved head/past-stale: the head term survives only where the docs say it does (label writes,fixroutes, past the stale window), and the human branch's restore leaves the marker the sweeper escalates on.Could not verify
pit/pr-loop-sandbox#6, andversionId == activeVersionId == d5d39d01-f7fe-40d9-a705-9bbf3a192d50. No access to n8n at10.12.0.128, so "the behaviour is already live" is taken as stated, not confirmed.pr-checkscontexts were stillpendingond2575e3when I started, so I ran both suites by hand as above.