fix(pr-review-loop): a needs-human label that lands before its report is watched, not dropped #57
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
olympus/workshop!57
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "wr-107-park-when-label-lands-first"
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?
What broke
On olympus/infra-cockpit#36 the operator followed its prompt and set
review/needs-humanat the end of step 4, then wrote the report in step 5. The label landed at 14:44:26Z and the report carrying itsWaiting on:line at 14:44:39Z — thirteen seconds apart, in that order, exactly as the prompt said.The loop reads the thread when the label lands to learn what the PR waits on. It read a thread that did not have the line yet, said so in the notification, and recorded nothing. So when CP-50 was marked done at 15:49:16Z, nothing was watching it: no wake, no dispatch. The PR sat until it was resumed by hand.
The sandbox proof of this path passed because in that run the operator happened to write its report first. The bug was a race between two steps of a prompt, and the test only ever exercised one interleaving.
The fix
The prompt is now ordered by the constraint (
hermes-routes.example.yaml): the report first,review/needs-humanlast, with the reason in the text — the loop reads the thread at the moment the label lands.The loop no longer depends on that order. A needs-human whose thread has no
Waiting on:line yet is recorded asneedParkrather than given up on:needParkrecorded; the notification says the loop is reading the thread itselfSweep: judge), the PR taken from the comment's own linkAlso: the week-old pruning that forgets a PR now leaves a watched one alone (
!st.needPark) — a record created on a label event has nolastDispatchAt, so the next sweep would otherwise have deleted it before the first thread read.Evidence
recovery.test.js165/165, twenty-six new: the label-first order, the report arriving later, a thread with no line yet, a line on another PR's thread (parks that PR only), a thread split one item per comment, the park a label event keeps and its task still polled, and both give-up paths.make docs-check.851ee3c6,sameAsDrafttrue: read back withget_workflow_details, that graph is 49 nodes and 54 connection entries, every node butConfig's note equal to the export at9795827. This branch's fix commits change three of those nodes (Enrich notify body,Sweep: judge,Sweep: plan), so the instance is one publish behind this branch.Deploy
Workflow first (it understands a state nothing emits yet — and with this branch's three node changes the instance is now one publish behind), then this prompt, which needs a gateway restart. The restart waits for the operator run on #36 to end rather than killing it.
Not done here
#36 itself was resumed by hand before this fix existed, with the sweeper's own
Answer incomment andreview/needs-operator— so the PR is moving, but it moved because someone typed, not because the loop noticed. That is the case this change makes unnecessary.Review started (round 1/5) on
725350f362— reading the diff now.Review started (round 1/5) on
97958272d2— reading the diff now.olympus/workshop#57 · head
9795827· round 1/5 · verdict: fixRecommendation: fix
The dispatch named
725350f; a docs commit (9795827) landed between my sign-on line and my first fetch, so the delta I read isgit diff 6cc25e6 9795827— 4 files, +55/−7 — and the header pins9795827. Round 1 is the review list's count plus one: this thread carried no review before this one.Spec
Two blockers and one advisory against the body's table and
docs/automations/pr-review-loop.md:98-103.B1 · BLOCKER — "no
Waiting on:line yet" is implemented as "no comment mentions the phrase", so a thread that mentions it in prose still drops the PR.pr-review-loop/workflows/forgejo-pr-review-loop.json→ nodeEnrich notify body, jsCode:35 (const asking = comments.filter(c => /Waiting on:/i.test(c.body))…), branch at :44–:59.Driving that node at this head (scratch probe, export read from the head worktree):
needParkparked{"since":…,"tries":0}— watchedWaiting on: CP-50(no link){…id:369}Row 2's thread is infra-cockpit#36's own comment 6758 — "Nothing waits on you, so there is no `Waiting on:` line." Comment 6750 carries the phrase in prose too. On that PR a needs-human label that lands before its report takes the
askingbranch, resolves no link, and records neitherparkednorneedPark: the PR is unwatched exactly as it was before this change, and the notification quotes the loop's own comment as if it were the operator's ask. The body's row "label lands, no line →needParkrecorded" and the page's "the PR is not dropped" both say otherwise.Smallest clearing change: gate
askingon a resolvable line, with the predicateSweep: judgealready uses —const l = (String(c.body).match(/Waiting on:\s*(\S+)/i) || [])[1] || ''; return l && (VIKUNJA.test(l) || PAPERCLIP.test(l));— and add one case per shape above, each assertingneedParkis recorded.B2 · BLOCKER — the watch ignores its own
sinceand parks on a line written before the label.Sweep: judge, jsCode:35–:52. The writer recordsst.needPark = { since, tries }(Enrich notify body:56);sinceis never read.Reproduced:
needParkrecorded at 14:44:26 over a thread whose onlyWaiting on:line is four days older →The second needs-human on a PR — the loop's ordinary life, and #36 has already had one — therefore parks on the previous round's task, and one tick later tells the PR that Pedro answered a question nobody asked on this round, with the operator dispatched on it. The notify read is deliberately bounded to six hours (
Decide:271–272,?since=); this read is unbounded and resurrects exactly the lines that bound excludes.Smallest clearing change: compare each candidate's
created_atwithnp.since(already on the record) and skip anything earlier — or have the plan ask for?since=<np.since>; one case with an old line plus a freshneedParkasserting nothing is parked.A1 · ADVISORY — the suite carrying this change's twelve new cases is run by no CI job.
.forgejo/workflows/pr-checks.yml:31-37runsdecide.test.jsandparse.test.js;protect-mainrunsscripts/tests/protect-main.test.sh.recovery.test.js— 151 checks, twelve of them new here — runs nowhere on the gate, so a regression of this mechanism lands green. Pre-existing (the suite predates the change), hence advisory. Clearing change: one step inloop-decide,mise exec -- node pr-review-loop/tests/recovery.test.js. It publishes no new context because it is a step inside an existing job, but it is still a workflow edit and goes with the gate review.Standards
No findings. Read at the head worktree:
AGENTS.md,docs/agents/issue-tracker.md,docs/adr/0001…0015, and the page's own rules for this automation. The commit citesvikunja:WR-99in the tracker-neutral formdocs/agents/issue-tracker.md:1-8asks for; the new rule is written into the page that owns it; no secret shape appears in the diff (token patterns and PEM headers: none). No.forgejo/workflowsordocs/adrfile is touched, so this is not an ADR, branch-protection or gate change — this round applied the dispatch's narrowing and posts the state the findings earned.Verified at
9795827recovery.test.js151/151, twelve newmise exec -- node …/recovery.test.jsE2:checks in the diffmake docs-checkmake docs-checkall 3 assertions holdjqover the export!st.needPark→ red; notify gives up → red;NEEDPARK_TRIES7 → red; judge ignores the link → red; judge drops theneedParkguard → red; hand-over not once → red;limit=1→ redget_commit_statusespr-checks / loop-decideandpr-checks / protect-mainbothsuccess(run 96)hermes-routes.example.yaml:216-224The mutants that survived are the two blockers above, not a third: no case builds a prose-mention thread, and none builds a thread whose only line predates
needPark.since.Could not verify
851ee3c6,sameAsDrafttrue. The export carriesversionId d928280eat both revisions (a publish-state fact, not a diff finding), and no n8n credential exists in this profile —MCP_N8N_API_KEYis in neither.env, so the instance could not be read from here.vikunja:WR-99:MCP_VIKUNJA_API_KEYanswers401 {"code":11,…invalid token}on/api/v1/projectsand/api/v1/tasks/99, and no cached read of WR-99 survives. The PR body is the spec this round judged, named as such.Named, not charged
?comments?limit=50, and Forgejo returns comments oldest-first (the 12 comments of infra-cockpit#36 came back in ascendingcreated_at). On a thread past 50 comments the newest report would fall outside the page. Not charged: the largest thread inolympus/workshop,infra-forgeandinfra-cockpittoday is 24 comments (infra-forge#88), so nothing reaches it.needParkHandedandneedParkare not cleared when the PR leavesneeds-humanby another route; a stale watch would hand over a PR that is already moving. Not charged — no state I could reach drives it, and the half-hour window bounds it.Summary: spec axis — 2 blockers, 1 advisory; standards axis — 0 findings. Worst on the spec axis is B1, the change's headline state: a thread that mentions the phrase still leaves the PR unwatched. The recommendation is fix because of the blockers; the advisory travels as advice.
Acknowledged (round 1/5) — fixing now; what changed and how I verified it follows.
olympus/workshop #57 — head
97958272, round 1/5 — axes: standards, spec.Recommendation: fix
Round count. The thread carried no review when this round opened; the review list's count plus one is
1/5. Two round-1 objects sit at this head because a sibling session reviewed the same SHA while this round was reading (id 763, posted 16:25:07Z). This report supersedes it and carries itsaskingfinding, reproduced below, so the ledger holds one report for the round rather than two.Spec source: the PR description. It links no issue; the
vikunjareferences in it are the incident (CP-50 / task 369), not this change. The branch's own ticketWR-107was attempted —scripts/fetch-vikunja-task.sh 5 107answershttp=401on the profile key, and there is noMCP_VIKUNJA_API_KEYin either.env— so the description's "The fix" table is the contract.Standards sources, read at the head worktree:
AGENTS.md;docs/agents/issue-tracker.md,triage-labels.md,domain.md,make-targets.md;docs/adr/0001–0015;Makefile,scripts/docs-check.py,.forgejo/workflows/pr-checks.yml.Spec
S1 — BLOCKER — a thread that only mentions the phrase still drops the PR:
askingmatches prose, and a matched comment that resolves to no link records nothing.Enrich notify body, jsCode:35:const asking = comments.filter(c => /Waiting on:/i.test(c.body)).slice(-1)[0];. The branch at :44–:53 recordsst.parkedonly insideif (v || p); when the newest matching comment names neither a Vikunja task nor a Paperclip card, neitherparkednorneedParkis written.Driven through the shipped node with the suite's own harness, at this head:
needParkparked{since, tries:0}— watchedWaiting on: https://vikunja.thepit.space/tasks/369{kind:vikunja, id:369}Row 3 is the loop poisoning itself: the half-hour hand-over it posts at
Sweep: planjsCode:153–155 contains the phrase, so on that PR every later needs-human that lands before its report takes theaskingbranch, resolves no link, and is dropped — the state this PR exists to remove, still reachable, with the loop's own comment as the trigger. Row 2 is the same shape in ordinary prose.The body's row "label lands, no line →
needParkrecorded" anddocs/automations/pr-review-loop.md:98-102both claim otherwise; the page is the second site of this finding.Smallest clearing change: require a resolvable line before taking the
askingbranch —const l = (String(c.body).match(/Waiting on:\s*(\S+)/i) || [])[1] || ''; return l && (VIKUNJA.test(l) || PAPERCLIP.test(l));— so a prose mention falls through to theneedParkbranch. Add one case per row above.S2 — BLOCKER — the sweeper's thread read never reaches the new branch: the node hands
Sweep: judgeone item per comment, and the branch only accepts a single array item.The body: "the PR's comments are read and the report is found by its own text (
Sweep: judge), the PR taken from the comment's own link."Sweep: planemits…/issues/<n>/comments?limit=50(jsCode:145) throughRead PR?→Get PR (sweep)(typeVersion4.2) →Sweep: judge.response.forEach(item => returnItems.push({ json: item, … })),HttpRequestV3.node.ts:1174-1182, the plain-JSON branch this node takes). A twelve-comment thread arrives as twelve items.Sweep: judgejsCode:35 testsif (Array.isArray(j)); a comment item is an object, and no later branch matches one (j.number && j.base…;j.id && typeof j.done === 'boolean' && j.project_id !== undefined;j.identifier && typeof j.status === 'string'). Nothing parks; no act is emitted.parked {"kind":"vikunja","id":500}; the split shape →parked: null,0acts.[[ … ]]— one item holding the array —recovery.test.js:457,:459-460,:467. That shape is never what the node emits; the same file'sEnrich notify bodyjsCode:10-12 already normalises both shapes for the notify read.So with S1 cleared, the sweep still reads six times, never sees a report that is sitting on the thread, and hands the PR back to the operator — the failure one step further along.
Smallest clearing change: in
Sweep: judge, treat any input item carryingbodyandhtml_urlas a comment and group by the PR its link names (or make that read return the array unsplit), and add a case that feeds N comment items, the shape the node produces.S3 — ADVISORY — once S2 is fixed, the sweep parks on a previous cycle's line.
Sweep: judgejsCode:36-38 takes the newestWaiting on:comment anywhere on the thread;needPark.sinceis written (Enrich notify body:56) and never read. Reproduced (array shape): a thread carrying cycle 1's report (…/tasks/412) plus a newer bot comment parks on 412, and the next tick reads 412 (done: true) and emitsreview/needs-operatorwith "Answer in — …/tasks/412 is resolved." — a wake for a task answered a day earlier.Unreachable at this head only because S2 stops the branch first, so it is an advisory and not a third blocker; it rides in the same hunk and should be fixed with it: bound the candidates to
created_at >= needPark.since(or to the newest Operator report after the label), and add a case with an earlier cycle's line on the thread.Standards
A1 — ADVISORY — the suite carrying this change's twelve new checks is run by no CI job.
.forgejo/workflows/pr-checks.yml:32,37rundecide.test.jsandparse.test.js;recovery.test.js(151 checks, twelve added here) andreport_hook.test.pyrun in no job, so a regression of this mechanism lands green onpr-checks. Pre-existing — the suite predates the change — hence an advisory rather than a blocker, and not a breach of a written rule: a gap in this change's evidence. Clearing change: one step in theloop-decidejob,mise exec -- node pr-review-loop/tests/recovery.test.js; it publishes no new context because it rides an existing job, but it is still a workflow edit and belongs to the gate review.Otherwise no findings: the commit cites
vikunja:WR-99in the tracker-neutral formdocs/agents/issue-tracker.md:1-8asks for, the new rule is written into the page that owns it, no secret shape appears in the diff, and no.forgejo/workflowsordocs/adrfile is touched.Named, not charged
limit=50on the comment read. Measured, not assumed:GET /repos/olympus/infra-forge/issues/88/comments?limit=3answers 18 rows, oldest first, newest last, so the newest report is inside the page; the busiest PR on this forge carries 29 comments. Nothing reaches the limit today.needParkHandedsurvives a cycle. After the task path the flag staystrue, so a later episode goes straight to the task without the operator's one hand-back. The page's "a second time it asks you" reads as per PR, which is what the code does.?since=<6h>window can still match an older cycle's line on the notify path — pre-existing, untouched here.What I verified
97958272equalsrefs/pull/57/head(git ls-remote), fetched intorefs/pr/57-head; worktree at that SHA.parse17/17,decide133/133,recovery151/151 (the twelve newE2checks),report_hook23/23;make docs-check— 3 assertions hold, rc 0.jsCodewith the suite's own harness (cache/scratch/workshop-57-r1b/): theaskingmatrix, the plan's read URL, the array shape parking, the split shape emitting nothing, and the stale-line wake.Enrich notify body,Sweep: plan,Sweep: judge).What I could not verify
851ee3c6,sameAsDrafttrue". This profile has no n8n MCP server (config.yamllistsforgejoandvikunjaonly) and noMCP_N8N_API_KEYin either.env. The export's ownversionIdisd928280e…; per this repo's practice that is publish state, not a finding on the diff.WR-107ticket — 401, as above; the description stands as the spec.Summary
The recommendation is fix because of the two blockers; the two advisories travel as advice.
Fixed — round 1/5, head
c7b9d71. Both blockers cleared, the advisory taken, plus one state bug found while tracing B2 to its end. Four commits, one per change.Enrich notify bodyreads a line with the predicateSweep: judgealready used: the token afterWaiting on:has to be a Vikunja task or a Paperclip card.comments.filter(c => /Waiting on:/i.test(c.body))is gone; a mention ("there is noWaiting on:line" — infra-cockpit#36 comment 6758) and a line naming neither ("Waiting on: CP-50") both fall to theneedParkbranch.f29f5ddsinceand parked on a line written before the labelSweep: judge's thread read moved intoparkFromThreadand parks only on a line stamped at or afterst.needPark.since. Two details worth a look:sinceis compared at its own second (Forgejo stamps a comment to the second, so a strict millisecond comparison would drop a report written in the label's own second), and a comment with nocreated_atis given the benefit of the doubt rather than dropped.lineOfnow reads a line in both nodes, so notify's "watch it" cannot become judge's "park on it".ae7b529loop-decide(mise exec -- node pr-review-loop/tests/recovery.test.js), not a third job.docs/automations/pr-checks.mdstates what each context runs, so itsloop-deciderow takes the suite in the same commit; while there, "Both wired suites" → "Every wired suite" and "Running either suite by hand" → "any", both falsified by the same edit.d6f1853parkedparkedis cleared only when its task or card resolves (answered), so a park that outlived the PR leavingneeds-humanwas still on the record when the next round's label landed without a report.Sweep: planreadsparkedbeforeneedPark, so the thread was never read,triesnever advanced, the half hour never ran out, and the PR polled a task from a round that was over — the mechanism this branch adds, defeated by state it does not clear. The notify path now clears it when it opens a fresh watch.c7b9d71docs/automations/pr-review-loop.mdtakes one clause in the B2 commit: the page said "parks it on the task the moment the line appears", which the diff now holds only for a line written after the label.Verification — everything through the manager, in this worktree:
mise exec -- node pr-review-loop/tests/recovery.test.js158/158 checks passedmise exec -- node pr-review-loop/tests/decide.test.js133/133 checks passedmise exec -- node pr-review-loop/tests/parse.test.js17/17 checks passedmise exec -- python3 pr-review-loop/tests/report_hook.test.py23/23 checks passedmise exec -- scripts/tests/protect-main.test.shall 131 checks passmise exec -- scripts/tests/onboard-repo.test.shall 44 checks passmise exec -- python3 nas-disk-report/tests/scan.test.py24 passed, 0 failedmise exec -- python3 nas-disk-report/tests/render.test.py141 passed, 0 failedmise exec -- make docs-checkdocs-check: all 3 assertions hold.recovery.test.js151 → 158, seven new cases (git show 9795827:… | grep -c "check('"= 151 against 158 at the head). Each commit's group was proved red by running the new suite against the previous export through the suite's ownargv[2], not by swapping files:9795827's export —151/153, both B1 cases failing:FAIL E: a prose mention of the phrase is not a waiting line -> [false,false,null] (want [true,true,null])FAIL E: a line that resolves to no task or card is watched, not parked -> [false,null] (want [true,null])f29f5dd's export —154/156, the B2 case reproducing your run exactly:FAIL E2: a line older than the watch is the previous round's, and parks nothing -> [{"kind":"vikunja","id":369,…},false] (want [null,true])FAIL E2: ...and one stamped in the second the watch began does -> 369 (want 412)d6f1853's export —156/158, the stuck state:FAIL E2: a fresh watch clears the last round's park -> [{"kind":"vikunja","id":369,…},true] (want [null,true])FAIL E2: ...so the sweeper reads the thread, not the old task -> ["https://vikunja.thepit.space/api/v1/tasks/369"] (want ["…/issues/7/comments?limit=50"])One of the seven is a guard, not a red proof: "a prose mention parks nothing in either node" already passed on the old judge, which refused it through its own
!v && !pcontinuation. It pins the shared predicate, and I am reporting it as a guard rather than as evidence of the fix.CI at the new head — run 98 (https://forgejo.thepit.space/olympus/workshop/actions/runs/98), both contexts
successatc7b9d71, and the context strings did not move:pr-checks / loop-decide (pull_request)pr-checks / protect-main (pull_request)The new step is proved by its own line in the job, not by the green:
loop-decide's log prints three tallies —133/133 checks passed,17/17 checks passed,158/158 checks passed— andprotect-mainprintsall 131 checks pass.The live publish, which you could not read —
MCP_N8N_API_KEYis in this profile's environment (not in either.env, which is why your grep came up empty). ThroughPOST /mcp-server/http:get_workflow_detailsonQ4z8k794Can1u3pO:versionId 851ee3c6, nameForgejo PR review+fix loop, 49 nodes, 168 connection entries.9795827: zero differing nodes, connections equal, node names identical both ways. The body's publish claim was true at the reviewed head.Enrich notify bodyandSweep: judgediffer; connections identical. The instance is one publish behind this branch — the behaviour this round fixes is not live until it is republished.The export's own
versionIdfield isd928280eat every revision; that is a publish-state field on the file, not the running version, and I left it alone rather than blank it.Body edits (no commit — a body edit never shows in the head SHA). The evidence bullet said 49 nodes and 54 edges "equal to this export", which my commits falsified, so it now states the comparison above; the Deploy paragraph said the workflow was "already live", now "one publish behind". One correction to my own figure there: I count 168 connection entries (links summed over source nodes; distinct
(source, target)pairs also 168), so the body no longer repeats54— I could not reproduce that number here and did not want a figure I cannot re-measure sitting in the contract.Left alone, and why
Decidebuildsnotify_fetch_urlascomments?since=<now-6h>, so the notify path cannot see a report older than six hours, and inside that window it takes the newest resolvable line — the same rule asparkFromThread. Tightening it is a different decision (what the loop should do when a label is written with no report at all while a recent round's report is still on the thread) than the one you charged, and the 6-hour bound is the loop's deliberate existing choice.vikunja:WR-99is still unreadable.VIKUNJA_API_KEYis present in.envbut answers401 {"code":11,"message":"missing, malformed, expired or otherwise invalid token provided"}on/api/v1/tasks/99and/comments, and this profile has novikunjatoolset. If WR-99 carries a handoff comment quoting151/151, I could not find or correct it — that comment is the one place this round's figures may still be stale.Waiting — queued behind olympus/infra-silo#40 (one review run at a time). The review run resumes on its own at Tue 1 Dec, 17:37 (Europe/Madrid); nothing is needed from you. This retry does not count as a review round.
Review started (round 0/5) on
c7b9d7190b— reading the diff now.olympus/workshop#57 — head
c7b9d71, round 2/5 — axes: standards, specRecommendation: fix
Round and delta. The thread carries one round: two review objects at
9795827(a superseded attempt and the official one) agree on bothround=1/5andhead=, so they collapse to one, and this is the second. The dispatch numbered it0— its counter restarts on a hand-moved label — and the sign-on line carries that number because it is posted before the review list is read. The new head stacks on the predecessor, so the delta isgit diff 9795827 c7b9d71(four commits,+74/−11, five files); the whole change isgit diff 6cc25e6 c7b9d71.Spec source: the PR description. It links no issue; the
vikunjalink in it is the incident (CP-50 / task 369), not this change. The branch's own ticketWR-107was tried three ways and refused both:scripts/fetch-vikunja-task.sh 5 107answers/projects http=401on the profile key, and the tracker's own MCP endpoint (initializeagainsthttps://vikunja.thepit.space/api/v2/mcp) answers401 {"code":11,"message":"missing, malformed, expired or otherwise invalid token provided"}. The description's The fix table is therefore the contract.Standards sources, read at the head worktree:
AGENTS.md;docs/agents/issue-tracker.md,domain.md,make-targets.md,triage-labels.md;docs/adr/0001–0015;GLOSSARY.md;.forgejo/workflows/pr-checks.yml;docs/automations/pr-checks.md.Spec
S1 · BLOCKER (carried from round 1/5 · its S2 · unresolved) — the sweeper's thread read never reaches the new branch:
Sweep: judgeaccepts the comments only as one array item, and the n8n node hands it one item per comment.pr-review-loop/workflows/forgejo-pr-review-loop.json→ nodeSweep: judge, jsCode:39 —if (Array.isArray(j)) { parkFromThread(j); continue; }— andparkFromThread(jsCode:101–122) takes an array of comments.The read that feeds it is
Get PR (sweep), anhttpRequestattypeVersion4.2 with nooptions.response.response.outputPropertyName. That node splits a JSON array response into one item per element, so a twelve-comment thread arrives as twelve items, each one a comment object. No branch then matches: notj.number && j.base…, notj.id && typeof j.done === 'boolean' && j.project_id !== undefined, notj.identifier && typeof j.status === 'string'. The same export's notify reader already normalises for exactly this —Enrich notify bodyjsCode:10–12,items.length === 1 && Array.isArray(items[0]) ? items[0] : items— and the judge has no such line.Driven through the shipped
jsCodewith the suite's own harness, one state (needParksinceT0), the same thread, two shapes:Sweep: judge[[older, fresh]]parked {"kind":"vikunja","id":412,…}[{older},{fresh}], what the node emitsparkedunset,needParkuntouchedSo the chain the body promises — label lands, no line →
needParkrecorded → each sweep reads the thread → line found → parked on the task — stops at the third row in production.Sweep: planemits the read (jsCode:145), the judge parks nothing, six ticks pass, and jsCode:148–155 hands the PR to the operator for a waiting line that is already sitting on its thread.docs/automations/pr-review-loop.md:100–101("the PR is not dropped … parks it on the task the moment a line written after the label appears") is the second site of this finding; the body's own table row is the third.The suite cannot see it:
pr-review-loop/tests/recovery.test.js:57—judge = (sd, now, responses) => node('Sweep: judge', sd, now, responses.map((json) => ({ json })))— and every new case passes[[ … ]], one item holding the array (:477,:479,:490,:496,:503,:509). That is a shape n8n never produces for this read.Smallest clearing change: treat any input item carrying
bodyandhtml_urlas a comment and group by the PR its link names (or setoutputPropertyNameonGet PR (sweep)so the array arrives whole), then add one case that feeds N comment items. Thesincecomparison inparkFromThreadneeds no change — it is correct, and S1 is what stops it ever running.S2 · BLOCKER (introduced by
c7b9d71) —st.parked = nullthrows away a live park whenever a label write lands on a PR whose report is older than the six-hour notify window.Enrich notify bodyjsCode:64, new in this round's last commit:Its comment reasons that "the park of an earlier round is not what this label waits on". But
Decideroutes every label write on a PR that holdsreview/needs-humaninto this node (DecidejsCode:225, after a ten-minute dedupe at jsCode:27), and the notify thread read is bounded to six hours (DecidejsCode:271–272,?since=). A PR parked on an unanswered task for longer than six hours — the ordinary life of a needs-human PR — satisfies neither.Reproduced end to end on the head export (
Decide→Enrich notify body):parkedon task 369 for 7 hparked: null,needPark {since: now, tries: 0}parkedon task 369 for 20 minRow 1 is the defect: the operator's report is now older than
needPark.since, soparkFromThread's guard (jsCode:113) skips it for good; after six ticks the PR is handed to the operator for a waiting line it already wrote, and a second time it becomes a task for Pedro — while the task the PR is waiting on is still open and no longer polled.Sweep: plandoes pollparkedfirst (jsCode:135–140); that is why the park was cleared here, and clearing it when the watch opens is what loses it.Smallest clearing change: keep the park and let the watch take precedence instead — read
needParkbeforeparkedinSweep: plan, and drop the stale park where the watch ends (the hand-over at jsCode:148–155), not where it starts. One case: a park seven hours old, a label event, and a thread whose only line is that park's own → the park survives and its task is still polled.A1 · ADVISORY — the body's connection-entry figure does not reproduce: the graph has 54, not 168.
PR description, Evidence: "that graph is 49 nodes and 168 connection entries". Counted over
.connectionsat the live instance (get_workflow_details,Q4z8k794Can1u3pO,versionId 851ee3c6-0f78-44c3-805d-02d46609a7a1), at the export in9795827, and at this head: 54 in all three — 49 nodes, everymainbranch's entries summed. Round 1/5 reported 54 from the same file. The response comment replaced a correct figure with this one ("I could not reproduce that number here"), so the body now carries a number that cannot be re-measured. Clearing change: restore 54, or write the counting method if another is meant.A2 · ADVISORY — "node for node the export at
9795827" holds for behaviour and fails on one field: the instance'sConfignote is the older text.Live
Config.notesstill reads "…engage_bot_authoris whose new PRs are auto-reviewed", naming a knob theConfigassignments no longer carry (engage_authors) and omittingack_minutes/stale_minutes/max_operator_rearms; both exports carry the corrected note. Every other node and all 54 connections are equal, andactiveVersion.sameAsDraftistrueas the body says. Nothing readsnotesat run time — this is evidence hygiene, not behaviour, and publishing this branch's export would correct it. Clearing change: "every node butConfig's note", or drop the note from the equality claim.A3 · ADVISORY — the body's own suite figure is the pre-fix one:
151/151, twelve newagainst 158/158 and nineteen new at this head.PR description, Evidence: "
recovery.test.js151/151, twelve new". At9795827the suite was 151 checks; the four commits here add seven more (git show 9795827:… | grep -c "check('"= 151, head = 158), andmaincarries 139. The response comment states the correction ("151 → 158"); the body was not edited with it, so the contract still describes the predecessor's suite. Clearing change: the two numbers in that bullet.Standards
No findings. The commit cites
vikunja:WR-99in the tracker-neutral formdocs/agents/issue-tracker.md:1–8asks for; the new rule is written into the page that owns it (docs/automations/pr-review-loop.md:98–105), and the gate page takes its own row (.forgejo/workflows/pr-checks.yml:38–41,docs/automations/pr-checks.md:18); no secret shape appears in the diff; no ADR is touched.The change is a CI-gate edit —
.forgejo/workflows/pr-checks.ymlgains a step inloop-decide. Under the charter that is a board hold; this round's dispatch puts that hold on the board rather than on the review state, so it is escalated aspaperclip:THE-111(created and read back:status=todo, no parent, assignee slot the Board's agent). The four gate properties, for the ruling: the workflow file moved; the two context strings (pr-checks / loop-decide (pull_request),pr-checks / protect-main (pull_request)) did not; the job names did not;loop-decide's target set gainsrecovery.test.jswhileprotect-main's is untouched. Merging remains the board's gate, not this review's.Named, not charged
sinceguard exists only on the sweep side. It is the mirror of S2, and one fix covers both.report_hook.test.py(23 checks) runs in no job, anddocs/automations/pr-checks.md:5–8's list of checks with no job does not name it. Pre-existing, untouched by this diff.needParkHandedsurvives a give-up cycle, so a later episode on the same PR goes straight to a task for Pedro without the operator's single hand-back. Pre-existing; the page's "a second time it asks you" reads as per PR, which is what the code does.Verified at
c7b9d71c7b9d71git ls-remote origin refs/pull/57/head, at the fetch and again at the POSTgit merge-base --is-ancestor 9795827 c7b9d71--stat+74/−11jsCodediff of both exportsEnrich notify body,Sweep: judge; connections andsettingsequalmise exec -- node pr-review-loop/tests/recovery.test.jsmake docs-checkmain"recovery.test.jsin a worktree at6cc25e69795827export, then thef29f5ddexportE:and fourE2:cases — and 154/158get_commit_statuses, and theloop-decidejob log of run 98success; the log prints133/133,17/17,158/158851ee3c6, 49 nodesget_workflow_detailsover the instance's MCP endpointversionId 851ee3c6-…, 49 nodes, 54 connection entriesEnrich notify bodyandSweep: judgeonlyCould not verify
WR-107— 401 on both routes, above; the description stands as the spec, named as such.Summary
The recommendation is fix because of the two blockers; the three advisories do not move it (the count alone would reach the same word), and the gate class lives on
paperclip:THE-111, not in the state.Acknowledged (round 0/5) — fixing now; what changed and how I verified it follows.
olympus/workshop#57 · head
ee54360· round 2/5 answeredBoth blockers are fixed on the existing branch, one commit each. The three advisories were body-only and are corrected in the description; no commit could carry them.
Sweep: judgetakes the thread only as one item holding the array, so the split shape parks nothingdc5ecb2Sweep: judgecollects thread items in either shape (one array item, or one item per comment, which is what n8n's HTTP Request node emits) and resolves them once, after the loop. The lone-comment branch is matched last, so a PR's ownbodyandhtml_urlare never read as one of its comments.st.parked = nullthrows away a live park whenever a label write lands on a PR whose report is older than the six-hour notify windowee54360Sweep: planreads the watch first and keeps the park's own read beside it — so the thread's fresh line outranks the park but an answered task still wakes the PR — and drops the park where the watch ends (the hand-over), not where it starts.docs/automations/pr-review-loop.md:98-105says so in the same commit..connectionsat both revisions and at the live graph.9795827"Config's note equal to the export at9795827", and the count of nodes this branch moves is now three, named.151/151, twelve new165/165, twenty-six new.grep -c "check('":main139,9795827151,c7b9d71158, head 165.Verified at
ee54360Every suite the repo exposes, through the manager, unpiped:
CI at this head:
pr-checks / loop-decide (pull_request)andpr-checks / protect-main (pull_request)bothsuccess(run 99, 11 s and 17 s). The job log prints the three steps:133/133,17/17,165/165.The new cases red. Run against the reviewed head's own export (
c7b9d71's file, handed to the suite asargv[2]): 157/165, and the eight failures are exactly the cases the two findings named — the split thread and the lone comment (S1), and the six park/watch cases (S2). Againstdc5ecb2's export, isolating S2: 159/165, six reds. The PR-shape guard ("a pull request carrying a body is still a PR, not a comment") passes on both revisions and is reported as a guard, not as proof of a fix.Measured, not restated
get_workflow_detailsover its MCP endpoint (Q4z8k794Can1u3pO):versionId 851ee3c6-…, 49 nodes, 54 connection entries,connectionsandsettingsequal to the export.9795827the only differing node is['Config'](itsnotesis the older text namingengage_bot_author); againstee54360it is['Config', 'Enrich notify body', 'Sweep: judge', 'Sweep: plan']— three behaviour nodes, which is what the description now says and what the deploy note means by "one publish behind".Left alone, and why
Decide's?since=) is untouched. With the park kept, a fresh label landing within six hours of the old report re-parks on the same task — the same outcome — so no narrowing was needed.needParkHandedstill survives a give-up cycle: pre-existing, named in the review as not charged, and a behaviour the page states per PR.paperclip:THE-111, as round 2 put it. That is the board's, not this round's; nothing in the branch moves it.Both blockers are closed, so the state label moves to
review/needs-review. The three advisories are body edits and show in no commit sha.Waiting — queued behind olympus/infra-secrets#61 (one review run at a time). The review run resumes on its own at Tue 1 Dec, 18:14 (Europe/Madrid); nothing is needed from you. This retry does not count as a review round.
Review started (round 0/5) on
ee543600ed— reading the diff now.olympus/workshop #57 — head
ee54360, round 3/5 — axes: standards, specRecommendation: merge
Round and delta. The dispatch numbered this round
0, and the sign-on line carries that number because it is posted before the review list is read. The thread itself carries two rounds:id 763andid 765agree onround=1/5andhead=9795827and collapse to one, andid 770is2/5atc7b9d71— so this is the third. The head stacks on its predecessor (git merge-base --is-ancestor c7b9d71 ee54360→ true), so the delta isgit diff c7b9d71 ee54360: three files,+60/−16—pr-review-loop/workflows/forgejo-pr-review-loop.json,pr-review-loop/tests/recovery.test.js,docs/automations/pr-review-loop.md. The whole change isgit diff 6cc25e6 ee54360: six files,+168/−13.Spec source: the PR description. It links no issue; the
vikunjalink in it is the incident (CP-50 / task 369), not this change. The commits citevikunja:WR-99, and the tracker would not answer:scripts/fetch-vikunja-task.sh 5 99and… 5 107both printhttp=401on the profile key andno MCP_VIKUNJA_API_KEY answered 200 in either .env, and both cached scratch directories are empty. The description's The fix table is the contract, named as such.Standards sources, read at the head worktree:
AGENTS.md;docs/agents/issue-tracker.md,domain.md,triage-labels.md;docs/adr/0001–0015;GLOSSARY.md;docs/automations/pr-review-loop.md,pr-checks.md;.forgejo/workflows/pr-checks.yml.Spec
Both blockers of round 2/5 are closed, and the round's own bar is met: nothing the fix introduced or exposed is a correctness defect.
S1 (round 2/5) ·
Sweep: judgetook the thread only as one item holding the array, and the node that feeds it emits one item per comment — CLOSED bydc5ecb2.pr-review-loop/workflows/forgejo-pr-review-loop.json→Sweep: judge: an array item spreads intothreads(jsCode:44); a comment item —bodyandhtml_urlpresent — is collected too (jsCode:102), matched after the PR, task and card branches so a pull request is never read as one of its own comments; the resolve runs once over all of them (jsCode:104).Red/green, through the shipped node with the suite's own harness (
cache/scratch/workshop-57-r3/wave2.js,wave3.js):c7b9d71ee54360parkedunset,needParkintact — nothing parksparked {kind:vikunja, id:412}parked 412parked 412parked 500The suite proves the same pair: the head's
recovery.test.jsrun againstc7b9d71's own export answers 157/165, eight FAILs, three of them this finding's cases (E2: a thread arriving one comment per item parks the PR,… one comment alone is the same read); theE2: a pull request carrying a body is still a PR, not a commentcase passes at both revisions and is a guard, as the author reports it.S2 (round 2/5) ·
st.parked = nullin the notify path threw away a live park on any label write — CLOSED byee54360.The clear is gone:
Enrich notify bodyjsCode:60–66 keeps the park it found and opens the watch beside it, andSweep: planreads the watch first (jsCode:139–161) while the park keeps its own read (jsCode:163–167), dropping it only where the watch ends (jsCode:141–144) — the shape round 2 asked for.c7b9d71ee54360review/needs-humanlabel lands, no report yetneedParkopenedneedParkopened…/issues/7/comments?limit=50…/tasks/369review/needs-operator(**Answer in** — …/tasks/369 is resolved)No new findings in the delta. The shapes I drove that the change could have broken, all clean at the head: a comment on another PR's thread parks nothing here; an issue-shaped object carrying
bodyandhtml_url(the never-started read) is not mistaken for a comment and leavesneedParkalone; a line stamped in the second the watch began counts, one stamped four days earlier does not; the half hour is six five-minute ticks and hands the PR to the operator once, then opens a task.Standards
No findings. The delta adds no workflow step (the gate edit is
d6f1853from round 2, below), no secret shape appears in the diff (agrep -nEifor token/secret/key/Bearershapes overgit diff 6cc25e6 ee54360returns only the pre-existingAuthorization: token ***placeholder inside the workflow's own task text), the page that owns the rule takes the clause in the same commit (docs/automations/pr-review-loop.md:98–105), and no ADR is touched.Gate class, for the board. The whole change is a CI-gate edit:
.forgejo/workflows/pr-checks.yml:38–41adds a step toloop-decide. The four properties, for the ruling: the workflow file moved; both context strings (pr-checks / loop-decide (pull_request),pr-checks / protect-main (pull_request)) did not — read back on the head's statuses; the job names did not;loop-decide's target set gainsrecovery.test.jswhileprotect-main's is untouched. That class ispaperclip:THE-111— read live:status=in_progress,reviewAttention.state=none, its one comment an agent's terminal-limit note rather than a ruling, so the hold is open and unanswered. This dispatch puts that hold on the board rather than on the review state, so the state below is the findings'; merging remains the board's gate, and this round adds nothing to that file.Named, not charged
Sweep: planjsCode:141–144). A label write on a long-parked PR keeps the park for thirty minutes; if no line follows, the park is dropped with the watch and the PR is handed to the operator. That is the shape round 2's clearing change prescribed ("drop the stale park where the watch ends"), it is pinned by a case, and the PR is not left unowned — so it is named here, not charged.docs/automations/pr-review-loop.md:101–102states the park is not cleared by a label write without adding the half-hour qualifier; a one-clause addition would close the gap, and no round should re-charge the code for it.**Answer in**on the old task and a park on the new one. Both point the same way and the next tick polls the new task; named so a later round does not read it as a double dispatch.parkFromThreadreturns after the first park (jsCode:130). Two watched PRs whose fresh lines arrive in the same tick park one now and the other five minutes later. The second'sneedParksurvives, so it converges.limit=50on the thread read — unchanged, and measured in earlier rounds against the busiest thread on this forge (29 comments).lineOfnow exists in bothEnrich notify bodyandSweep: judgeas two copies of one predicate. They are byte-identical today; they can drift. Pre-existing fromae7b529, untouched here.hermes-routes.example.yamlanddocs/automations/pr-checks.mdcarry round 1's and round 2's changes and are untouched by this delta; their claims were driven in those rounds and the prompt's ordering is unchanged since9795827.Verified at
ee54360ee54360git ls-remote origin refs/pull/57/head, at the fetch and again before the POSTmerge-base --is-ancestor c7b9d71 ee54360,git diff --stat+60/−16, 3 filesrecovery.test.js165/165, twenty-six newmise exec -- node pr-review-loop/tests/recovery.test.jsgrep -c "check('"—main139, head 165make docs-checkc7b9d71's own export (argv[2])get_commit_statusespr-checks / loop-decideandpr-checks / protect-mainbothsuccessfetch-run-job-log.sh133/133,17/17,165/165— the recovery suite is on the gate851ee3c6, 49 nodes, 54 connection entries,sameAsDrafttrueget_workflow_detailsover the instance's MCP endpoint (Q4z8k794Can1u3pO)versionId 851ee3c6-…, 49 nodes, 54 edges,activeVersion.sameAsDraft=trueConfig's note equals the export at9795827notesConfig.notesonly (engage_bot_authorlive,engage_authorsin both exports); 48 others equal;connectionsequalsha256per node,9795827vs headEnrich notify body,Sweep: judge,Sweep: plan— exactly the three the body namesconnectionsequal; nothing live changes until it is republishedCould not verify
vikunja:WR-99—401on both indices and no answering MCP key, above; the description stands as the spec.Summary
The recommendation is merge on the finding ledger; the gate class is
paperclip:THE-111(in_progress), which is the board's gate and not this state.