fix(pr-review-loop): a needs-human label that lands before its report is watched, not dropped #57

Merged
pit merged 8 commits from wr-107-park-when-label-lands-first into main 2026-12-01 17:57:09 +00:00
Owner

What broke

On olympus/infra-cockpit#36 the operator followed its prompt and set review/needs-human at the end of step 4, then wrote the report in step 5. The label landed at 14:44:26Z and the report carrying its Waiting 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-human last, 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 as needPark rather than given up on:

tick what happens
label lands, no line needPark recorded; the notification says the loop is reading the thread itself
each 5-minute sweep 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
line found parked on the task as before, and polled from then on
half an hour, still nothing the operator is handed the PR once, with the order to write them in
the same again one task for Pedro: the agent cannot say what it waits on

Also: the week-old pruning that forgets a PR now leaves a watched one alone (!st.needPark) — a record created on a label event has no lastDispatchAt, so the next sweep would otherwise have deleted it before the first thread read.

Evidence

  • recovery.test.js 165/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.
  • Every other suite unchanged: parse 17/17, decide 133/133, hook 23/23, onboard-repo 44/44, protect-main 131/131, make docs-check.
  • Published to the live instance as version 851ee3c6, sameAsDraft true: read back with get_workflow_details, that graph is 49 nodes and 54 connection entries, every node but Config's note equal to the export at 9795827. 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 in comment and review/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.

## What broke On olympus/infra-cockpit#36 the operator followed its prompt and set `review/needs-human` at the end of step 4, then wrote the report in step 5. The label landed at **14:44:26Z** and the report carrying its `Waiting 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](https://vikunja.thepit.space/tasks/369) 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-human` last, 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 as `needPark` rather than given up on: | tick | what happens | |---|---| | label lands, no line | `needPark` recorded; the notification says the loop is reading the thread itself | | each 5-minute sweep | 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 | | line found | parked on the task as before, and polled from then on | | half an hour, still nothing | the operator is handed the PR once, with the order to write them in | | the same again | one task for Pedro: the agent cannot say what it waits on | Also: the week-old pruning that forgets a PR now leaves a watched one alone (`!st.needPark`) — a record created on a label event has no `lastDispatchAt`, so the next sweep would otherwise have deleted it before the first thread read. ## Evidence - `recovery.test.js` 165/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. - Every other suite unchanged: parse 17/17, decide 133/133, hook 23/23, onboard-repo 44/44, protect-main 131/131, `make docs-check`. - Published to the live instance as version `851ee3c6`, `sameAsDraft` true: read back with `get_workflow_details`, that graph is 49 nodes and 54 connection entries, every node but `Config`'s note equal to the export at `9795827`. 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 in` comment and `review/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.
fix(pr-review-loop): a needs-human label that lands before its report is watched, not dropped (vikunja:WR-99)
All checks were successful
pr-checks / loop-decide (pull_request) Successful in 12s
pr-checks / protect-main (pull_request) Successful in 20s
725350f362
The operator sets `review/needs-human` at the end of its ask and writes the report that carries the
`Waiting on:` line after it, and the loop read the thread in the moment between the two: on
olympus/infra-cockpit#36 the label landed at 14:44:26 and the report at 14:44:39, so nothing was
recorded, the task that closed at 15:49:16 woke nothing, and the PR sat until it was resumed by hand.

- Enrich notify body: a needs-human with no line in the thread now records `needPark` instead of
  giving up, and says so in the notification.
- Sweep: plan reads the PR's thread each tick while `needPark` is open (half an hour), and the prune
  that forgets a week-old PR leaves a watched one alone.
- Sweep: judge finds the report by its own text in the thread and reads the PR it belongs to out of
  the comment's own link, so nothing depends on item pairing. Past the half hour the operator is
  asked once to say what the PR waits on; a second time it becomes a task for Pedro.
- The operator prompt (example) posts the report first and sets the label last, and says why.

Tests: recovery 151/151, twelve of them new — both orders, a thread without the line yet, a line on
another PR's thread, and both give-up paths.
Member

Review started (round 1/5) on 725350f362 — reading the diff now.

**Review started** (round 1/5) on 725350f3626f4807c87602d259bb8cf393158edd — reading the diff now.
docs(pr-review-loop): the needs-human line must land before its label, and what happens when it does not
All checks were successful
pr-checks / loop-decide (pull_request) Successful in 9s
pr-checks / protect-main (pull_request) Successful in 16s
97958272d2
Member

Review started (round 1/5) on 97958272d2 — reading the diff now.

**Review started** (round 1/5) on 97958272d25d54b96ec5993198d24f8286a4a1fd — reading the diff now.
bot-minos requested changes 2026-12-01 16:25:07 +00:00
Dismissed
bot-minos left a comment

olympus/workshop#57 · head 9795827 · round 1/5 · verdict: fix

Recommendation: fix

The dispatch named 725350f; a docs commit (9795827) landed between my sign-on line and my first fetch, so the delta I read is git diff 6cc25e6 9795827 — 4 files, +55/−7 — and the header pins 9795827. 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 → node Enrich 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):

thread needPark parked
no phrase anywhere {"since":…,"tries":0} — watched null
prose mention, no line null — dropped null
Waiting on: CP-50 (no link) null — dropped null
line with a link null {…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 asking branch, resolves no link, and records neither parked nor needPark: 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 → needPark recorded" and the page's "the PR is not dropped" both say otherwise.
Smallest clearing change: gate asking on a resolvable line, with the predicate Sweep: judge already 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 asserting needPark is recorded.

B2 · BLOCKER — the watch ignores its own since and parks on a line written before the label.
Sweep: judge, jsCode:35–:52. The writer records st.needPark = { since, tries } (Enrich notify body:56); since is never read.

Reproduced: needPark recorded at 14:44:26 over a thread whose only Waiting on: line is four days older →

parked after the judge read : {"kind":"vikunja","id":369,…}
next tick, task 369 done    : [["forgejo","{\"labels\":[\"review/needs-operator\"]}"]]
comment posted              : **Answer in** — https://vikunja.thepit.space/tasks/369 is resolved.
                              The operator picks it up from here.

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_at with np.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 fresh needPark asserting 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-37 runs decide.test.js and parse.test.js; protect-main runs scripts/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 in loop-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 cites vikunja:WR-99 in the tracker-neutral form docs/agents/issue-tracker.md:1-8 asks 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/workflows or docs/adr file 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 9795827

claim how result
recovery.test.js 151/151, twelve new mise exec -- node …/recovery.test.js 151/151, and twelve E2: checks in the diff
every other suite unchanged the five commands, in the head worktree parse 17/17, decide 133/133, hook 23/23, onboard-repo 44/44, protect-main 131/131
make docs-check make docs-check all 3 assertions hold
49 nodes, 54 edges jq over the export 49 nodes, 54 edges
the mechanism is pinned by the suite mutation wave, eight one-line mutants prune drops !st.needPark → red; notify gives up → red; NEEDPARK_TRIES 7 → red; judge ignores the link → red; judge drops the needPark guard → red; hand-over not once → red; limit=1 → red
CI at this head get_commit_statuses pr-checks / loop-decide and pr-checks / protect-main both success (run 96)
the prompt's new order read hermes-routes.example.yaml:216-224 report first, label last, reason in the text — coherent with steps 3–5

The 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

  • The live publish: the body says version 851ee3c6, sameAsDraft true. The export carries versionId d928280e at both revisions (a publish-state fact, not a diff finding), and no n8n credential exists in this profile — MCP_N8N_API_KEY is in neither .env, so the instance could not be read from here.
  • The tracker ticket behind vikunja:WR-99: MCP_VIKUNJA_API_KEY answers 401 {"code":11,…invalid token} on /api/v1/projects and /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

  • The thread read is ?comments?limit=50, and Forgejo returns comments oldest-first (the 12 comments of infra-cockpit#36 came back in ascending created_at). On a thread past 50 comments the newest report would fall outside the page. Not charged: the largest thread in olympus/workshop, infra-forge and infra-cockpit today is 24 comments (infra-forge#88), so nothing reaches it.
  • needParkHanded and needPark are not cleared when the PR leaves needs-human by 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.

<!-- minos review-loop: repo=olympus/workshop pr=57 head=97958272d25d54b96ec5993198d24f8286a4a1fd round=1/5 axes=standards,spec --> **olympus/workshop#57 · head `9795827` · round 1/5 · verdict: fix** Recommendation: fix The dispatch named `725350f`; a docs commit (`9795827`) landed between my sign-on line and my first fetch, so the delta I read is `git diff 6cc25e6 9795827` — 4 files, +55/−7 — and the header pins `9795827`. 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` → node `Enrich 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): | thread | `needPark` | `parked` | | --- | --- | --- | | no phrase anywhere | `{"since":…,"tries":0}` — watched | null | | prose mention, no line | **null — dropped** | null | | `Waiting on: CP-50` (no link) | **null — dropped** | null | | line with a link | null | `{…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 `asking` branch, resolves no link, and records neither `parked` nor `needPark`: 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 → `needPark` recorded" and the page's "the PR is not dropped" both say otherwise. *Smallest clearing change:* gate `asking` on a resolvable line, with the predicate `Sweep: judge` already 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 asserting `needPark` is recorded. **B2 · BLOCKER — the watch ignores its own `since` and parks on a line written before the label.** `Sweep: judge`, jsCode:35–:52. The writer records `st.needPark = { since, tries }` (`Enrich notify body`:56); `since` is never read. Reproduced: `needPark` recorded at 14:44:26 over a thread whose only `Waiting on:` line is four days older → ``` parked after the judge read : {"kind":"vikunja","id":369,…} next tick, task 369 done : [["forgejo","{\"labels\":[\"review/needs-operator\"]}"]] comment posted : **Answer in** — https://vikunja.thepit.space/tasks/369 is resolved. The operator picks it up from here. ``` 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_at` with `np.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 fresh `needPark` asserting 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-37` runs `decide.test.js` and `parse.test.js`; `protect-main` runs `scripts/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 in `loop-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 cites `vikunja:WR-99` in the tracker-neutral form `docs/agents/issue-tracker.md:1-8` asks 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/workflows` or `docs/adr` file 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 `9795827` | claim | how | result | | --- | --- | --- | | `recovery.test.js` 151/151, twelve new | `mise exec -- node …/recovery.test.js` | 151/151, and twelve `E2:` checks in the diff | | every other suite unchanged | the five commands, in the head worktree | parse 17/17, decide 133/133, hook 23/23, onboard-repo 44/44, protect-main 131/131 | | `make docs-check` | `make docs-check` | `all 3 assertions hold` | | 49 nodes, 54 edges | `jq` over the export | 49 nodes, 54 edges | | the mechanism is pinned by the suite | mutation wave, eight one-line mutants | prune drops `!st.needPark` → red; notify gives up → red; `NEEDPARK_TRIES` 7 → red; judge ignores the link → red; judge drops the `needPark` guard → red; hand-over not once → red; `limit=1` → red | | CI at this head | `get_commit_statuses` | `pr-checks / loop-decide` and `pr-checks / protect-main` both `success` (run 96) | | the prompt's new order | read `hermes-routes.example.yaml:216-224` | report first, label last, reason in the text — coherent with steps 3–5 | The 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 - The live publish: the body says version `851ee3c6`, `sameAsDraft` true. The export carries `versionId d928280e` at both revisions (a publish-state fact, not a diff finding), and no n8n credential exists in this profile — `MCP_N8N_API_KEY` is in neither `.env`, so the instance could not be read from here. - The tracker ticket behind `vikunja:WR-99`: `MCP_VIKUNJA_API_KEY` answers `401 {"code":11,…invalid token}` on `/api/v1/projects` and `/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 - The thread read is `?comments?limit=50`, and Forgejo returns comments oldest-first (the 12 comments of infra-cockpit#36 came back in ascending `created_at`). On a thread past 50 comments the newest report would fall outside the page. Not charged: the largest thread in `olympus/workshop`, `infra-forge` and `infra-cockpit` today is 24 comments (`infra-forge#88`), so nothing reaches it. - `needParkHanded` and `needPark` are not cleared when the PR leaves `needs-human` by 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.
Member

Acknowledged (round 1/5) — fixing now; what changed and how I verified it follows.

**Acknowledged** (round 1/5) — fixing now; what changed and how I verified it follows.
bot-minos requested changes 2026-12-01 16:29:30 +00:00
Dismissed
bot-minos left a comment

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 its asking finding, reproduced below, so the ledger holds one report for the round rather than two.

Spec source: the PR description. It links no issue; the vikunja references in it are the incident (CP-50 / task 369), not this change. The branch's own ticket WR-107 was attempted — scripts/fetch-vikunja-task.sh 5 107 answers http=401 on the profile key, and there is no MCP_VIKUNJA_API_KEY in 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: asking matches 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 records st.parked only inside if (v || p); when the newest matching comment names neither a Vikunja task nor a Paperclip card, neither parked nor needPark is written.

Driven through the shipped node with the suite's own harness, at this head:

thread (newest comment) needPark parked
no phrase anywhere {since, tries:0} — watched null
"Nothing waits on you, so there is no `Waiting on:` line." undefined — dropped null
the loop's own hand-over: "review/needs-human was set without a "Waiting on:" line …" undefined — dropped null
Waiting on: https://vikunja.thepit.space/tasks/369 null {kind:vikunja, id:369}

Row 3 is the loop poisoning itself: the half-hour hand-over it posts at Sweep: plan jsCode:153–155 contains the phrase, so on that PR every later needs-human that lands before its report takes the asking branch, 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 → needPark recorded" and docs/automations/pr-review-loop.md:98-102 both claim otherwise; the page is the second site of this finding.

Smallest clearing change: require a resolvable line before taking the asking branch — 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 the needPark branch. Add one case per row above.

S2 — BLOCKER — the sweeper's thread read never reaches the new branch: the node hands Sweep: judge one 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: plan emits …/issues/<n>/comments?limit=50 (jsCode:145) through Read PR? → Get PR (sweep) (typeVersion 4.2) → Sweep: judge.
  • n8n's HTTP Request V3 splits an array response into one item per element (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: judge jsCode:35 tests if (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.
  • Reproduced: one array item → parked {"kind":"vikunja","id":500}; the split shape → parked: null, 0 acts.
  • The suite cannot see it: every new case feeds [[ … ]] — one item holding the array — recovery.test.js:457, :459-460, :467. That shape is never what the node emits; the same file's Enrich notify body jsCode: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 carrying body and html_url as 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: judge jsCode:36-38 takes the newest Waiting on: comment anywhere on the thread; needPark.since is 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 emits review/needs-operator with "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,37 run decide.test.js and parse.test.js; recovery.test.js (151 checks, twelve added here) and report_hook.test.py run in no job, so a regression of this mechanism lands green on pr-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 the loop-decide job, 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-99 in the tracker-neutral form docs/agents/issue-tracker.md:1-8 asks for, the new rule is written into the page that owns it, no secret shape appears in the diff, and no .forgejo/workflows or docs/adr file is touched.

Named, not charged

  • limit=50 on the comment read. Measured, not assumed: GET /repos/olympus/infra-forge/issues/88/comments?limit=3 answers 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.
  • needParkHanded survives a cycle. After the task path the flag stays true, 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.
  • The notify read's ?since=<6h> window can still match an older cycle's line on the notify path — pre-existing, untouched here.

What I verified

  • Head 97958272 equals refs/pull/57/head (git ls-remote), fetched into refs/pr/57-head; worktree at that SHA.
  • Suites at head: parse 17/17, decide 133/133, recovery 151/151 (the twelve new E2 checks), report_hook 23/23; make docs-check — 3 assertions hold, rc 0.
  • Export parsed as data: 49 nodes, 54 edges — the body's own counts.
  • Every finding driven through the shipped jsCode with the suite's own harness (cache/scratch/workshop-57-r1b/): the asking matrix, the plan's read URL, the array shape parking, the split shape emitting nothing, and the stale-line wake.
  • All four changed files read in full and accounted for: the page, the prompt, the tests, and the three export nodes (Enrich notify body, Sweep: plan, Sweep: judge).

What I could not verify

  • The live instance — "published as version 851ee3c6, sameAsDraft true". This profile has no n8n MCP server (config.yaml lists forgejo and vikunja only) and no MCP_N8N_API_KEY in either .env. The export's own versionId is d928280e…; per this repo's practice that is publish state, not a finding on the diff.
  • The WR-107 ticket — 401, as above; the description stands as the spec.
  • The deploy order ("workflow first, then this prompt, then a gateway restart") — outside the repository.

Summary

  • Spec: 3 findings — 2 BLOCKERS (S1, S2), 1 ADVISORY (S3). Worst: S1, a thread that merely mentions the phrase still leaves the PR unwatched — reachable today, on the loop's own comment.
  • Standards: 1 finding — 0 blockers, 1 ADVISORY (A1). Worst: A1, the suite holding this change's evidence is on no gate.

The recommendation is fix because of the two blockers; the two advisories travel as advice.

<!-- minos review-loop: repo=olympus/workshop pr=57 head=97958272d25d54b96ec5993198d24f8286a4a1fd round=1/5 axes=standards,spec --> **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 its `asking` finding, reproduced below, so the ledger holds one report for the round rather than two. **Spec source: the PR description.** It links no issue; the `vikunja` references in it are the *incident* (CP-50 / task 369), not this change. The branch's own ticket `WR-107` was attempted — `scripts/fetch-vikunja-task.sh 5 107` answers `http=401` on the profile key, and there is no `MCP_VIKUNJA_API_KEY` in 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: `asking` matches 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 records `st.parked` only inside `if (v || p)`; when the newest matching comment names neither a Vikunja task nor a Paperclip card, neither `parked` nor `needPark` is written. Driven through the shipped node with the suite's own harness, at this head: | thread (newest comment) | `needPark` | `parked` | | --- | --- | --- | | no phrase anywhere | `{since, tries:0}` — watched | null | | "Nothing waits on you, so there is no \`Waiting on:\` line." | **undefined — dropped** | null | | the loop's own hand-over: "review/needs-human was set without a \"Waiting on:\" line …" | **undefined — dropped** | null | | `Waiting on: https://vikunja.thepit.space/tasks/369` | null | `{kind:vikunja, id:369}` | Row 3 is the loop poisoning itself: the half-hour hand-over it posts at `Sweep: plan` jsCode:153–155 contains the phrase, so on that PR every later needs-human that lands before its report takes the `asking` branch, 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 → `needPark` recorded" and `docs/automations/pr-review-loop.md:98-102` both claim otherwise; the page is the second site of this finding. **Smallest clearing change:** require a resolvable line before taking the `asking` branch — `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 the `needPark` branch. Add one case per row above. **S2 — BLOCKER — the sweeper's thread read never reaches the new branch: the node hands `Sweep: judge` one 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: plan` emits `…/issues/<n>/comments?limit=50` (jsCode:145) through `Read PR?` → `Get PR (sweep)` (`typeVersion` 4.2) → `Sweep: judge`. - n8n's HTTP Request V3 splits an array response into **one item per element** (`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: judge` jsCode:35 tests `if (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. - Reproduced: one array item → `parked {"kind":"vikunja","id":500}`; the split shape → `parked: null`, `0` acts. - The suite cannot see it: every new case feeds `[[ … ]]` — one item holding the array — `recovery.test.js:457`, `:459-460`, `:467`. That shape is never what the node emits; the same file's `Enrich notify body` jsCode: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 carrying `body` and `html_url` as 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: judge` jsCode:36-38 takes the newest `Waiting on:` comment anywhere on the thread; `needPark.since` is 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 emits `review/needs-operator` with "**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,37` run `decide.test.js` and `parse.test.js`; `recovery.test.js` (151 checks, twelve added here) and `report_hook.test.py` run in no job, so a regression of this mechanism lands green on `pr-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 the `loop-decide` job, `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-99` in the tracker-neutral form `docs/agents/issue-tracker.md:1-8` asks for, the new rule is written into the page that owns it, no secret shape appears in the diff, and no `.forgejo/workflows` or `docs/adr` file is touched. ## Named, not charged - **`limit=50` on the comment read.** Measured, not assumed: `GET /repos/olympus/infra-forge/issues/88/comments?limit=3` answers 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. - **`needParkHanded` survives a cycle.** After the task path the flag stays `true`, 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. - **The notify read's `?since=<6h>` window** can still match an older cycle's line on the notify path — pre-existing, untouched here. ## What I verified - Head `97958272` equals `refs/pull/57/head` (`git ls-remote`), fetched into `refs/pr/57-head`; worktree at that SHA. - Suites at head: `parse` 17/17, `decide` 133/133, `recovery` 151/151 (the twelve new `E2` checks), `report_hook` 23/23; `make docs-check` — 3 assertions hold, rc 0. - Export parsed as data: 49 nodes, 54 edges — the body's own counts. - Every finding driven through the shipped `jsCode` with the suite's own harness (`cache/scratch/workshop-57-r1b/`): the `asking` matrix, the plan's read URL, the array shape parking, the split shape emitting nothing, and the stale-line wake. - All four changed files read in full and accounted for: the page, the prompt, the tests, and the three export nodes (`Enrich notify body`, `Sweep: plan`, `Sweep: judge`). ## What I could not verify - **The live instance** — "published as version `851ee3c6`, `sameAsDraft` true". This profile has no n8n MCP server (`config.yaml` lists `forgejo` and `vikunja` only) and no `MCP_N8N_API_KEY` in either `.env`. The export's own `versionId` is `d928280e…`; per this repo's practice that is publish state, not a finding on the diff. - **The `WR-107` ticket** — 401, as above; the description stands as the spec. - **The deploy order** ("workflow first, then this prompt, then a gateway restart") — outside the repository. ## Summary - **Spec: 3 findings — 2 BLOCKERS (S1, S2), 1 ADVISORY (S3).** Worst: S1, a thread that merely mentions the phrase still leaves the PR unwatched — reachable today, on the loop's own comment. - **Standards: 1 finding — 0 blockers, 1 ADVISORY (A1).** Worst: A1, the suite holding this change's evidence is on no gate. The recommendation is **fix** because of the two blockers; the two advisories travel as advice.
The notify path read any comment containing the phrase "Waiting on:" as the operator's
ask. infra-cockpit#36's own comment 6758 — "Nothing waits on you, so there is no
`Waiting on:` line." — therefore took the `asking` branch, resolved no link, and recorded
neither `parked` nor `needPark`: the PR stayed unwatched, which is the state this branch
exists to end. The same held for a line naming neither a task nor a card.

The phrase now counts only when the token after it is a Vikunja task or a Paperclip card,
the predicate `Sweep: judge` already uses, so the two nodes cannot disagree about what a
line is; everything else leaves the PR under the thread watch.

recovery 153/153 (two new, both red at 9795827 against that head's own export).
`Sweep: judge` found the newest `Waiting on:` line on the thread and parked the PR on it, and
never read the `since` the notify path records with the watch. A PR's second needs-human
therefore parked on the previous round's task, and one tick later told the PR that a question
nobody asked on this round was answered, dispatching the operator on it. The notify read is
bounded to six hours by design; this one was unbounded and resurrected exactly what that bound
excludes.

Only a line stamped at or after the watch began now counts. Forgejo stamps a comment to the
second, so `since` is compared at its own second — a report written in the same second the
label landed is this round's — and a comment with no stamp is given the benefit of the doubt.
The predicate that reads a line moves into one helper used by both nodes, so notify's "watch
it" and judge's "park on it" cannot disagree. The page states the rule the diff now holds.

recovery 156/156 (three new: the old line parks nothing, the same-second line does, and a
prose mention parks nothing in either node).
ci(pr-checks): run the loop's recovery suite on every pull request (vikunja:WR-99)
All checks were successful
pr-checks / loop-decide (pull_request) Successful in 14s
pr-checks / protect-main (pull_request) Successful in 16s
d6f1853f31
The suite that carries this change's twelve new cases ran in no job, so a regression of the
mechanism landed green. It goes into `loop-decide` as one more step rather than a third job:
every job of a pull-request workflow becomes a required context, and the rule that names
contexts is written by `scripts/protect-main.sh`, an admin write only the Operator can make —
so a third job would leave the PR unmergeable until that script is re-run, while a step lands
inside a context that is already required.

`docs/automations/pr-checks.md` states what each context runs, so its row for `loop-decide`
takes the suite in the same commit, and its by-hand block with it.

recovery 156/156, and the contexts are unchanged: `pr-checks / loop-decide`,
`pr-checks / protect-main`.
fix(pr-review-loop): a fresh thread watch is not blocked by the last round's park (vikunja:WR-99)
All checks were successful
pr-checks / loop-decide (pull_request) Successful in 10s
pr-checks / protect-main (pull_request) Successful in 17s
c7b9d7190b
Not one of the review's findings; found while tracing B2 to its end. `parked` is cleared only
when its task or card resolves, so a park that outlived the PR leaving review/needs-human is
still on the record when the next round's label lands without a report. `Sweep: plan` reads
`parked` before it reads `needPark`, so the thread is never read, `tries` never advances, the
half hour never runs out, and the PR polls a task from a round that is over.

The notify path now clears that park when it opens a fresh watch, which is what the record
means: this label's ask is not the previous round's task. Two cases, both red at d6f1853
against that head's own export — parked left as 369, and the sweeper reading the task instead
of the thread.

recovery 158/158.
Member

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.

Finding What changed Commit
B1 — a thread that merely mentions the phrase still dropped the PR Enrich notify body reads a line with the predicate Sweep: judge already used: the token after Waiting 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 no Waiting on: line" — infra-cockpit#36 comment 6758) and a line naming neither ("Waiting on: CP-50") both fall to the needPark branch. f29f5dd
B2 — the watch ignored its own since and parked on a line written before the label Sweep: judge's thread read moved into parkFromThread and parks only on a line stamped at or after st.needPark.since. Two details worth a look: since is 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 no created_at is given the benefit of the doubt rather than dropped. lineOf now reads a line in both nodes, so notify's "watch it" cannot become judge's "park on it". ae7b529
A1 — the suite carrying the new cases ran in no job One step in loop-decide (mise exec -- node pr-review-loop/tests/recovery.test.js), not a third job. docs/automations/pr-checks.md states what each context runs, so its loop-decide row 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. d6f1853
(not a finding — found tracing B2) — a fresh watch was blocked by the previous round's parked parked is cleared only when its task or card resolves (answered), so a park that outlived the PR leaving needs-human was still on the record when the next round's label landed without a report. Sweep: plan reads parked before needPark, so the thread was never read, tries never 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. c7b9d71

docs/automations/pr-review-loop.md takes 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:

Command Output
mise exec -- node pr-review-loop/tests/recovery.test.js 158/158 checks passed
mise exec -- node pr-review-loop/tests/decide.test.js 133/133 checks passed
mise exec -- node pr-review-loop/tests/parse.test.js 17/17 checks passed
mise exec -- python3 pr-review-loop/tests/report_hook.test.py 23/23 checks passed
mise exec -- scripts/tests/protect-main.test.sh all 131 checks pass
mise exec -- scripts/tests/onboard-repo.test.sh all 44 checks pass
mise exec -- python3 nas-disk-report/tests/scan.test.py 24 passed, 0 failed
mise exec -- python3 nas-disk-report/tests/render.test.py 141 passed, 0 failed
mise exec -- make docs-check docs-check: all 3 assertions hold.

recovery.test.js 151 → 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 own argv[2], not by swapping files:

  • against 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])
  • against 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)
  • against 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 && !p continuation. 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 success at c7b9d71, and the context strings did not move:

Context State Duration
pr-checks / loop-decide (pull_request) success 10s
pr-checks / protect-main (pull_request) success 17s

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 — and protect-main prints all 131 checks pass.

The live publish, which you could not read — MCP_N8N_API_KEY is in this profile's environment (not in either .env, which is why your grep came up empty). Through POST /mcp-server/http:

  • get_workflow_details on Q4z8k794Can1u3pO: versionId 851ee3c6, name Forgejo PR review+fix loop, 49 nodes, 168 connection entries.
  • Against the export at 9795827: zero differing nodes, connections equal, node names identical both ways. The body's publish claim was true at the reviewed head.
  • Against my head: exactly Enrich notify body and Sweep: judge differ; 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 versionId field is d928280e at 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 repeats 54 — 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

  • The notify read's six-hour bound stays. Decide builds notify_fetch_url as comments?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 as parkFromThread. 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.
  • The tracker task behind vikunja:WR-99 is still unreadable. VIKUNJA_API_KEY is present in .env but answers 401 {"code":11,"message":"missing, malformed, expired or otherwise invalid token provided"} on /api/v1/tasks/99 and /comments, and this profile has no vikunja toolset. If WR-99 carries a handoff comment quoting 151/151, I could not find or correct it — that comment is the one place this round's figures may still be stale.
**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. | Finding | What changed | Commit | | --- | --- | --- | | **B1** — a thread that merely *mentions* the phrase still dropped the PR | `Enrich notify body` reads a line with the predicate `Sweep: judge` already used: the token after `Waiting 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 no `Waiting on:` line" — infra-cockpit#36 comment 6758) and a line naming neither ("`Waiting on: CP-50`") both fall to the `needPark` branch. | `f29f5dd` | | **B2** — the watch ignored its own `since` and parked on a line written before the label | `Sweep: judge`'s thread read moved into `parkFromThread` and parks only on a line stamped at or after `st.needPark.since`. Two details worth a look: `since` is 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 no `created_at` is given the benefit of the doubt rather than dropped. `lineOf` now reads a line in both nodes, so notify's "watch it" cannot become judge's "park on it". | `ae7b529` | | **A1** — the suite carrying the new cases ran in no job | One step in `loop-decide` (`mise exec -- node pr-review-loop/tests/recovery.test.js`), not a third job. `docs/automations/pr-checks.md` states what each context runs, so its `loop-decide` row 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. | `d6f1853` | | *(not a finding — found tracing B2)* — a fresh watch was blocked by the previous round's `parked` | `parked` is cleared only when its task or card resolves (`answered`), so a park that outlived the PR leaving `needs-human` was still on the record when the next round's label landed without a report. `Sweep: plan` reads `parked` before `needPark`, so the thread was never read, `tries` never 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. | `c7b9d71` | `docs/automations/pr-review-loop.md` takes 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: | Command | Output | | --- | --- | | `mise exec -- node pr-review-loop/tests/recovery.test.js` | `158/158 checks passed` | | `mise exec -- node pr-review-loop/tests/decide.test.js` | `133/133 checks passed` | | `mise exec -- node pr-review-loop/tests/parse.test.js` | `17/17 checks passed` | | `mise exec -- python3 pr-review-loop/tests/report_hook.test.py` | `23/23 checks passed` | | `mise exec -- scripts/tests/protect-main.test.sh` | `all 131 checks pass` | | `mise exec -- scripts/tests/onboard-repo.test.sh` | `all 44 checks pass` | | `mise exec -- python3 nas-disk-report/tests/scan.test.py` | `24 passed, 0 failed` | | `mise exec -- python3 nas-disk-report/tests/render.test.py` | `141 passed, 0 failed` | | `mise exec -- make docs-check` | `docs-check: all 3 assertions hold.` | `recovery.test.js` 151 → 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 own `argv[2]`, not by swapping files: - against `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])` - against `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)` - against `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 && !p` continuation. 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 `success` at `c7b9d71`, and the context strings did not move: | Context | State | Duration | | --- | --- | --- | | `pr-checks / loop-decide (pull_request)` | success | 10s | | `pr-checks / protect-main (pull_request)` | success | 17s | 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` — and `protect-main` prints `all 131 checks pass`. **The live publish, which you could not read** — `MCP_N8N_API_KEY` is in this profile's environment (not in either `.env`, which is why your grep came up empty). Through `POST /mcp-server/http`: - `get_workflow_details` on `Q4z8k794Can1u3pO`: `versionId 851ee3c6`, name `Forgejo PR review+fix loop`, 49 nodes, 168 connection entries. - Against the export at `9795827`: **zero differing nodes**, connections equal, node names identical both ways. The body's publish claim was true at the reviewed head. - Against my head: exactly `Enrich notify body` and `Sweep: judge` differ; 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 `versionId` field is `d928280e` at 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 repeats `54` — 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** - **The notify read's six-hour bound stays.** `Decide` builds `notify_fetch_url` as `comments?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 as `parkFromThread`. 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. - **The tracker task behind `vikunja:WR-99` is still unreadable.** `VIKUNJA_API_KEY` is present in `.env` but answers `401 {"code":11,"message":"missing, malformed, expired or otherwise invalid token provided"}` on `/api/v1/tasks/99` and `/comments`, and this profile has no `vikunja` toolset. If WR-99 carries a handoff comment quoting `151/151`, I could not find or correct it — that comment is the one place this round's figures may still be stale.
Author
Owner

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.

**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.
Member

Review started (round 0/5) on c7b9d7190b — reading the diff now.

**Review started** (round 0/5) on c7b9d7190b037c5a7f7864b5f670374fcc4b3284 — reading the diff now.
bot-minos requested changes 2026-12-01 17:07:47 +00:00
Dismissed
bot-minos left a comment

olympus/workshop#57 — head c7b9d71, round 2/5 — axes: standards, spec

Recommendation: fix

Round and delta. The thread carries one round: two review objects at 9795827 (a superseded attempt and the official one) agree on both round=1/5 and head=, so they collapse to one, and this is the second. The dispatch numbered it 0 — 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 is git diff 9795827 c7b9d71 (four commits, +74/−11, five files); the whole change is git diff 6cc25e6 c7b9d71.

Spec source: the PR description. It links no issue; the vikunja link in it is the incident (CP-50 / task 369), not this change. The branch's own ticket WR-107 was tried three ways and refused both: scripts/fetch-vikunja-task.sh 5 107 answers /projects http=401 on the profile key, and the tracker's own MCP endpoint (initialize against https://vikunja.thepit.space/api/v2/mcp) answers 401 {"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: judge accepts 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 → node Sweep: judge, jsCode:39 — if (Array.isArray(j)) { parkFromThread(j); continue; } — and parkFromThread (jsCode:101–122) takes an array of comments.

The read that feeds it is Get PR (sweep), an httpRequest at typeVersion 4.2 with no options.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: not j.number && j.base…, not j.id && typeof j.done === 'boolean' && j.project_id !== undefined, not j.identifier && typeof j.status === 'string'. The same export's notify reader already normalises for exactly this — Enrich notify body jsCode:10–12, items.length === 1 && Array.isArray(items[0]) ? items[0] : items — and the judge has no such line.

Driven through the shipped jsCode with the suite's own harness, one state (needPark since T0), the same thread, two shapes:

input shape after Sweep: judge
one item holding the array — [[older, fresh]] parked {"kind":"vikunja","id":412,…}
one item per comment — [{older},{fresh}], what the node emits parked unset, needPark untouched
a single fresh comment item nothing

So the chain the body promises — label lands, no line → needPark recorded → each sweep reads the thread → line found → parked on the task — stops at the third row in production. Sweep: plan emits 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 body and html_url as a comment and group by the PR its link names (or set outputPropertyName on Get PR (sweep) so the array arrives whole), then add one case that feeds N comment items. The since comparison in parkFromThread needs no change — it is correct, and S1 is what stops it ever running.

S2 · BLOCKER (introduced by c7b9d71) — st.parked = null throws away a live park whenever a label write lands on a PR whose report is older than the six-hour notify window.

Enrich notify body jsCode:64, new in this round's last commit:

st.parked = null;
if (!st.needPark) st.needPark = { since: Date.now(), tries: 0 };

Its comment reasons that "the park of an earlier round is not what this label waits on". But Decide routes every label write on a PR that holds review/needs-human into this node (Decide jsCode:225, after a ten-minute dedupe at jsCode:27), and the notify thread read is bounded to six hours (Decide jsCode: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):

state event result
parked on task 369 for 7 h an unrelated label added parked: null, needPark {since: now, tries: 0}
parked on task 369 for 20 min an unrelated label added re-parked on 369

Row 1 is the defect: the operator's report is now older than needPark.since, so parkFromThread'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: plan does poll parked first (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 needPark before parked in Sweep: 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 .connections at the live instance (get_workflow_details, Q4z8k794Can1u3pO, versionId 851ee3c6-0f78-44c3-805d-02d46609a7a1), at the export in 9795827, and at this head: 54 in all three — 49 nodes, every main branch'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's Config note is the older text.
Live Config.notes still reads "…engage_bot_author is whose new PRs are auto-reviewed", naming a knob the Config assignments no longer carry (engage_authors) and omitting ack_minutes / stale_minutes / max_operator_rearms; both exports carry the corrected note. Every other node and all 54 connections are equal, and activeVersion.sameAsDraft is true as the body says. Nothing reads notes at run time — this is evidence hygiene, not behaviour, and publishing this branch's export would correct it. Clearing change: "every node but Config'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 new against 158/158 and nineteen new at this head.
PR description, Evidence: "recovery.test.js 151/151, twelve new". At 9795827 the suite was 151 checks; the four commits here add seven more (git show 9795827:… | grep -c "check('" = 151, head = 158), and main carries 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-99 in the tracker-neutral form docs/agents/issue-tracker.md:1–8 asks 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.yml gains a step in loop-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 as paperclip: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 gains recovery.test.js while protect-main's is untouched. Merging remains the board's gate, not this review's.

Named, not charged

  • The notify read's six-hour bound can still match the previous round's line when a fresh label lands within six hours of it, parking the PR on an answered task. Pre-existing on this path (round 1/5 said so; the author declined to narrow it, with the reason given), and the new since guard 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, and docs/automations/pr-checks.md:5–8's list of checks with no job does not name it. Pre-existing, untouched by this diff.
  • needParkHanded survives 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 c7b9d71

claim how result
head is c7b9d71 git ls-remote origin refs/pull/57/head, at the fetch and again at the POST equal
the delta is the four fix commits git merge-base --is-ancestor 9795827 c7b9d71 stacked; --stat +74/−11
only two nodes moved per-node jsCode diff of both exports Enrich notify body, Sweep: judge; connections and settings equal
recovery 158/158 mise exec -- node pr-review-loop/tests/recovery.test.js 158/158
every other suite unchanged decide, parse, report_hook, protect-main, onboard-repo, make docs-check 133/133, 17/17, 23/23, 131 checks, 44 checks, 3 assertions
"every wired suite passes on main" recovery.test.js in a worktree at 6cc25e6 139/139
the new cases can fail the head suite against the 9795827 export, then the f29f5dd export 152/158 — six reds, the two E: and four E2: cases — and 154/158
CI at this head get_commit_statuses, and the loop-decide job log of run 98 both contexts success; the log prints 133/133, 17/17, 158/158
published as 851ee3c6, 49 nodes get_workflow_details over the instance's MCP endpoint versionId 851ee3c6-…, 49 nodes, 54 connection entries
the instance is one publish behind the live graph against the head export differs on Enrich notify body and Sweep: judge only

Could not verify

  • The ticket WR-107 — 401 on both routes, above; the description stands as the spec, named as such.
  • Deploy order ("workflow first, then this prompt, then a gateway restart") — outside the repository, and the restart is the operator's act, not this round's.

Summary

  • Spec: 5 findings — 2 BLOCKERS (S1, S2), 3 ADVISORIES (A1, A2, A3). Worst: S1, the mechanism this PR exists to add never runs in production, so the label-first PR is still handed back instead of parked.
  • Standards: 0 findings.

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.

<!-- minos review-loop: repo=olympus/workshop pr=57 head=c7b9d7190b037c5a7f7864b5f670374fcc4b3284 round=2/5 axes=standards,spec --> **olympus/workshop#57** — head `c7b9d71`, round **2/5** — axes: standards, spec Recommendation: fix **Round and delta.** The thread carries one round: two review objects at `9795827` (a superseded attempt and the official one) agree on both `round=1/5` and `head=`, so they collapse to one, and this is the second. The dispatch numbered it `0` — 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 is `git diff 9795827 c7b9d71` (four commits, `+74/−11`, five files); the whole change is `git diff 6cc25e6 c7b9d71`. **Spec source: the PR description.** It links no issue; the `vikunja` link in it is the incident (CP-50 / task 369), not this change. The branch's own ticket `WR-107` was tried three ways and refused both: `scripts/fetch-vikunja-task.sh 5 107` answers `/projects http=401` on the profile key, and the tracker's own MCP endpoint (`initialize` against `https://vikunja.thepit.space/api/v2/mcp`) answers `401 {"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: judge` accepts 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` → node `Sweep: judge`, jsCode:39 — `if (Array.isArray(j)) { parkFromThread(j); continue; }` — and `parkFromThread` (jsCode:101–122) takes an array of comments. The read that feeds it is `Get PR (sweep)`, an `httpRequest` at `typeVersion` 4.2 with no `options.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: not `j.number && j.base…`, not `j.id && typeof j.done === 'boolean' && j.project_id !== undefined`, not `j.identifier && typeof j.status === 'string'`. The same export's notify reader already normalises for exactly this — `Enrich notify body` jsCode:10–12, `items.length === 1 && Array.isArray(items[0]) ? items[0] : items` — and the judge has no such line. Driven through the shipped `jsCode` with the suite's own harness, one state (`needPark` since `T0`), the same thread, two shapes: | input shape | after `Sweep: judge` | | --- | --- | | one item holding the array — `[[older, fresh]]` | `parked {"kind":"vikunja","id":412,…}` | | one item per comment — `[{older},{fresh}]`, what the node emits | `parked` unset, `needPark` untouched | | a single fresh comment item | nothing | So the chain the body promises — *label lands, no line → `needPark` recorded → each sweep reads the thread → line found → parked on the task* — stops at the third row in production. `Sweep: plan` emits 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 `body` and `html_url` as a comment and group by the PR its link names (or set `outputPropertyName` on `Get PR (sweep)` so the array arrives whole), then add one case that feeds N comment items. The `since` comparison in `parkFromThread` needs no change — it is correct, and S1 is what stops it ever running. **S2 · BLOCKER (introduced by `c7b9d71`) — `st.parked = null` throws away a live park whenever a label write lands on a PR whose report is older than the six-hour notify window.** `Enrich notify body` jsCode:64, new in this round's last commit: ``` st.parked = null; if (!st.needPark) st.needPark = { since: Date.now(), tries: 0 }; ``` Its comment reasons that "the park of an earlier round is not what this label waits on". But `Decide` routes **every** label write on a PR that holds `review/needs-human` into this node (`Decide` jsCode:225, after a ten-minute dedupe at jsCode:27), and the notify thread read is bounded to six hours (`Decide` jsCode: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`): | state | event | result | | --- | --- | --- | | `parked` on task 369 for 7 h | an unrelated label added | `parked: null`, `needPark {since: now, tries: 0}` | | `parked` on task 369 for 20 min | an unrelated label added | re-parked on 369 | Row 1 is the defect: the operator's report is now older than `needPark.since`, so `parkFromThread`'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: plan` does poll `parked` first (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 `needPark` before `parked` in `Sweep: 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 `.connections` at the live instance (`get_workflow_details`, `Q4z8k794Can1u3pO`, `versionId 851ee3c6-0f78-44c3-805d-02d46609a7a1`), at the export in `9795827`, and at this head: **54** in all three — 49 nodes, every `main` branch'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's `Config` note is the older text.** Live `Config.notes` still reads "…`engage_bot_author` is whose new PRs are auto-reviewed", naming a knob the `Config` assignments no longer carry (`engage_authors`) and omitting `ack_minutes` / `stale_minutes` / `max_operator_rearms`; both exports carry the corrected note. Every other node and all 54 connections are equal, and `activeVersion.sameAsDraft` is `true` as the body says. Nothing reads `notes` at run time — this is evidence hygiene, not behaviour, and publishing this branch's export would correct it. *Clearing change:* "every node but `Config`'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 new` against 158/158 and nineteen new at this head.** PR description, *Evidence*: "`recovery.test.js` 151/151, twelve new". At `9795827` the suite was 151 checks; the four commits here add seven more (`git show 9795827:… | grep -c "check('"` = 151, head = 158), and `main` carries 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-99` in the tracker-neutral form `docs/agents/issue-tracker.md:1–8` asks 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.yml` gains a step in `loop-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 as **`paperclip: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 gains `recovery.test.js` while `protect-main`'s is untouched. Merging remains the board's gate, not this review's. ## Named, not charged - **The notify read's six-hour bound** can still match the previous round's line when a fresh label lands within six hours of it, parking the PR on an answered task. Pre-existing on this path (round 1/5 said so; the author declined to narrow it, with the reason given), and the new `since` guard 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**, and `docs/automations/pr-checks.md:5–8`'s list of checks with no job does not name it. Pre-existing, untouched by this diff. - **`needParkHanded` survives 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 `c7b9d71` | claim | how | result | | --- | --- | --- | | head is `c7b9d71` | `git ls-remote origin refs/pull/57/head`, at the fetch and again at the POST | equal | | the delta is the four fix commits | `git merge-base --is-ancestor 9795827 c7b9d71` | stacked; `--stat` `+74/−11` | | only two nodes moved | per-node `jsCode` diff of both exports | `Enrich notify body`, `Sweep: judge`; connections and `settings` equal | | recovery 158/158 | `mise exec -- node pr-review-loop/tests/recovery.test.js` | 158/158 | | every other suite unchanged | decide, parse, report_hook, protect-main, onboard-repo, `make docs-check` | 133/133, 17/17, 23/23, 131 checks, 44 checks, 3 assertions | | "every wired suite passes on `main`" | `recovery.test.js` in a worktree at `6cc25e6` | 139/139 | | the new cases can fail | the head suite against the `9795827` export, then the `f29f5dd` export | 152/158 — six reds, the two `E:` and four `E2:` cases — and 154/158 | | CI at this head | `get_commit_statuses`, and the `loop-decide` job log of run 98 | both contexts `success`; the log prints `133/133`, `17/17`, `158/158` | | published as `851ee3c6`, 49 nodes | `get_workflow_details` over the instance's MCP endpoint | `versionId 851ee3c6-…`, 49 nodes, 54 connection entries | | the instance is one publish behind | the live graph against the head export | differs on `Enrich notify body` and `Sweep: judge` only | ## Could not verify - **The ticket `WR-107`** — 401 on both routes, above; the description stands as the spec, named as such. - **Deploy order** ("workflow first, then this prompt, then a gateway restart") — outside the repository, and the restart is the operator's act, not this round's. ## Summary - **Spec: 5 findings — 2 BLOCKERS (S1, S2), 3 ADVISORIES (A1, A2, A3).** Worst: S1, the mechanism this PR exists to add never runs in production, so the label-first PR is still handed back instead of parked. - **Standards: 0 findings.** 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.
Member

Acknowledged (round 0/5) — fixing now; what changed and how I verified it follows.

**Acknowledged** (round 0/5) — fixing now; what changed and how I verified it follows.
`Sweep: plan` asks for the PR's comments, and n8n's HTTP Request node hands the
answer on as one item per comment. `Sweep: judge` saw twelve objects, matched
none of its branches, and parked nothing: the read the watch asked for went
nowhere, six ticks passed, and the PR was handed back for a line that was
sitting on its own thread. The node accepted only the one-item-holding-an-array
shape — the shape no node in this export produces, and the only shape every
case in the suite fed it.

Collect the thread items in either shape and resolve once, after the loop, so a
lone comment item and a whole array are the same read. The comment branch is
matched last, after the PR, task and card shapes, so a pull request's own `body`
and `html_url` are never read as one of its comments.

recovery.test.js 161/161, three new; 159/161 against the reviewed export, red on
the split shape and on the lone comment, with the PR-shape guard green on both.
fix(pr-review-loop): a label event keeps the park it found and the watch reads beside it (vikunja:WR-99)
All checks were successful
pr-checks / loop-decide (pull_request) Successful in 11s
pr-checks / protect-main (pull_request) Successful in 17s
ee543600ed
`Enrich notify body` cleared `st.parked` whenever a label write arrived on a
needs-human PR whose report was outside the notify read's six-hour window. That
is the ordinary life of a needs-human PR — parked on its task overnight — so an
unrelated label write threw the park away: the thread read that followed found
the park's own line too old to count, and after six ticks the PR was handed back
for a waiting line it had already written, then made a task for Pedro, while the
task it was really waiting on stopped being polled.

The label write is not evidence that the task is answered, so the park is kept.
The watch outranks it instead: `Sweep: plan` reads the thread first, keeps the
park's own read beside that thread read so an answered task still wakes the PR,
and drops the park where the watch ends — at the hand-over — rather than where
it begins. The page that describes the mechanism says so in the same commit.

recovery.test.js 165/165, four new and the earlier round's case rewritten; at
`dc5ecb2`'s export 159/165, red on the six cases this commit's subject names.
Member

olympus/workshop#57 · head ee54360 · round 2/5 answered

Both 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.

finding commit what changed
S1 · BLOCKER — Sweep: judge takes the thread only as one item holding the array, so the split shape parks nothing dc5ecb2 Sweep: judge collects 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 own body and html_url are never read as one of its comments.
S2 · BLOCKER — st.parked = null throws away a live park whenever a label write lands on a PR whose report is older than the six-hour notify window ee54360 The park is kept. Sweep: plan reads 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-105 says so in the same commit.
A1 · advisory — 168 connection entries body edit 168 → 54, measured over .connections at both revisions and at the live graph.
A2 · advisory — "node for node the export at 9795827" body edit "every node but Config's note equal to the export at 9795827", and the count of nodes this branch moves is now three, named.
A3 · advisory — 151/151, twelve new body edit 165/165, twenty-six new. grep -c "check('": main 139, 9795827 151, c7b9d71 158, head 165.

Verified at ee54360

Every suite the repo exposes, through the manager, unpiped:

node pr-review-loop/tests/parse.test.js            rc=0  17/17 checks passed
node pr-review-loop/tests/decide.test.js           rc=0  133/133 checks passed
node pr-review-loop/tests/recovery.test.js         rc=0  165/165 checks passed
python3 pr-review-loop/tests/report_hook.test.py   rc=0  23/23 checks passed
scripts/tests/protect-main.test.sh                 rc=0  all 131 checks pass
scripts/tests/onboard-repo.test.sh                 rc=0  all 44 checks pass
node ticket-dispatch/tests/gate.test.js            rc=0  79/79 checks passed
node ticket-dispatch/tests/pump.test.js            rc=0  79/79 checks passed
node ticket-dispatch/tests/notices.test.js         rc=0  30/30 checks passed
node ticket-dispatch/tests/retry.test.js           rc=0  18/18 checks passed
ticket-dispatch/tests/provision-buckets.test.sh    rc=0  all 50 checks pass
python3 nas-disk-report/tests/scan.test.py         rc=0  24 passed, 0 failed
python3 nas-disk-report/tests/render.test.py       rc=0  141 passed, 0 failed
make docs-check                                    rc=0  all 3 assertions hold.

CI at this head: pr-checks / loop-decide (pull_request) and pr-checks / protect-main (pull_request) both success (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 as argv[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). Against dc5ecb2'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

  • Live instance, read with get_workflow_details over its MCP endpoint (Q4z8k794Can1u3pO): versionId 851ee3c6-…, 49 nodes, 54 connection entries, connections and settings equal to the export.
  • Node-for-node: against 9795827 the only differing node is ['Config'] (its notes is the older text naming engage_bot_author); against ee54360 it 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

  • The notify read's six-hour window (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.
  • needParkHanded still survives a give-up cycle: pre-existing, named in the review as not charged, and a behaviour the page states per PR.
  • The gate class of this change is on 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.

**olympus/workshop#57 · head `ee54360` · round 2/5 answered** Both 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. | finding | commit | what changed | |---|---|---| | **S1 · BLOCKER** — `Sweep: judge` takes the thread only as one item holding the array, so the split shape parks nothing | `dc5ecb2` | `Sweep: judge` collects 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 own `body` and `html_url` are never read as one of its comments. | | **S2 · BLOCKER** — `st.parked = null` throws away a live park whenever a label write lands on a PR whose report is older than the six-hour notify window | `ee54360` | The park is kept. `Sweep: plan` reads 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-105` says so in the same commit. | | A1 · advisory — 168 connection entries | body edit | 168 → **54**, measured over `.connections` at both revisions and at the live graph. | | A2 · advisory — "node for node the export at `9795827`" | body edit | "every node but `Config`'s note equal to the export at `9795827`", and the count of nodes this branch moves is now three, named. | | A3 · advisory — `151/151, twelve new` | body edit | `165/165, twenty-six new`. `grep -c "check('"`: `main` 139, `9795827` 151, `c7b9d71` 158, head 165. | ## Verified at `ee54360` Every suite the repo exposes, through the manager, unpiped: ``` node pr-review-loop/tests/parse.test.js rc=0 17/17 checks passed node pr-review-loop/tests/decide.test.js rc=0 133/133 checks passed node pr-review-loop/tests/recovery.test.js rc=0 165/165 checks passed python3 pr-review-loop/tests/report_hook.test.py rc=0 23/23 checks passed scripts/tests/protect-main.test.sh rc=0 all 131 checks pass scripts/tests/onboard-repo.test.sh rc=0 all 44 checks pass node ticket-dispatch/tests/gate.test.js rc=0 79/79 checks passed node ticket-dispatch/tests/pump.test.js rc=0 79/79 checks passed node ticket-dispatch/tests/notices.test.js rc=0 30/30 checks passed node ticket-dispatch/tests/retry.test.js rc=0 18/18 checks passed ticket-dispatch/tests/provision-buckets.test.sh rc=0 all 50 checks pass python3 nas-disk-report/tests/scan.test.py rc=0 24 passed, 0 failed python3 nas-disk-report/tests/render.test.py rc=0 141 passed, 0 failed make docs-check rc=0 all 3 assertions hold. ``` CI at this head: `pr-checks / loop-decide (pull_request)` and `pr-checks / protect-main (pull_request)` both `success` (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 as `argv[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). Against `dc5ecb2`'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 - Live instance, read with `get_workflow_details` over its MCP endpoint (`Q4z8k794Can1u3pO`): `versionId 851ee3c6-…`, 49 nodes, **54** connection entries, `connections` and `settings` equal to the export. - Node-for-node: against `9795827` the only differing node is `['Config']` (its `notes` is the older text naming `engage_bot_author`); against `ee54360` it 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 - The notify read's six-hour window (`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. - `needParkHanded` still survives a give-up cycle: pre-existing, named in the review as not charged, and a behaviour the page states per PR. - The gate class of this change is on `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.
Author
Owner

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.

**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.
Member

Review started (round 0/5) on ee543600ed — reading the diff now.

**Review started** (round 0/5) on ee543600ed376c6fc2e95d3991140f3245144552 — reading the diff now.
bot-minos approved these changes 2026-12-01 17:30:41 +00:00
bot-minos left a comment

olympus/workshop #57 — head ee54360, round 3/5 — axes: standards, spec

Recommendation: 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 763 and id 765 agree on round=1/5 and head=9795827 and collapse to one, and id 770 is 2/5 at c7b9d71 — so this is the third. The head stacks on its predecessor (git merge-base --is-ancestor c7b9d71 ee54360 → true), so the delta is git 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 is git diff 6cc25e6 ee54360: six files, +168/−13.

Spec source: the PR description. It links no issue; the vikunja link in it is the incident (CP-50 / task 369), not this change. The commits cite vikunja:WR-99, and the tracker would not answer: scripts/fetch-vikunja-task.sh 5 99 and … 5 107 both print http=401 on the profile key and no 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: judge took the thread only as one item holding the array, and the node that feeds it emits one item per comment — CLOSED by dc5ecb2.
pr-review-loop/workflows/forgejo-pr-review-loop.json → Sweep: judge: an array item spreads into threads (jsCode:44); a comment item — body and html_url present — 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):

thread shape at c7b9d71 at ee54360
one item per comment (what the read emits) parked unset, needPark intact — nothing parks parked {kind:vikunja, id:412}
one item holding the array parked 412 parked 412
a single comment item nothing parked 500

The suite proves the same pair: the head's recovery.test.js run against c7b9d71'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); the E2: a pull request carrying a body is still a PR, not a comment case passes at both revisions and is a guard, as the author reports it.

S2 (round 2/5) · st.parked = null in the notify path threw away a live park on any label write — CLOSED by ee54360.
The clear is gone: Enrich notify body jsCode:60–66 keeps the park it found and opens the watch beside it, and Sweep: plan reads 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.

state (parked on task 369 seven hours ago) at c7b9d71 at ee54360
a review/needs-human label lands, no report yet park dropped, needPark opened park 369 kept, needPark opened
the sweeper's reads for that state …/issues/7/comments?limit=50 the same plus …/tasks/369
task 369 answered no act at all review/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 body and html_url (the never-started read) is not mistaken for a comment and leaves needPark alone; 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 d6f1853 from round 2, below), no secret shape appears in the diff (a grep -nEi for token/secret/key/Bearer shapes over git diff 6cc25e6 ee54360 returns only the pre-existing Authorization: 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–41 adds a step to loop-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 gains recovery.test.js while protect-main's is untouched. That class is paperclip: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

  • The park goes with the watch at the half hour (Sweep: plan jsCode: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–102 states 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.
  • A tick that carries a done task and a fresh line emits both acts: **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.
  • One park per tick. parkFromThread returns 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's needPark survives, so it converges.
  • limit=50 on the thread read — unchanged, and measured in earlier rounds against the busiest thread on this forge (29 comments).
  • lineOf now exists in both Enrich notify body and Sweep: judge as two copies of one predicate. They are byte-identical today; they can drift. Pre-existing from ae7b529, untouched here.
  • hermes-routes.example.yaml and docs/automations/pr-checks.md carry 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 since 9795827.

Verified at ee54360

claim how result
head is ee54360 git ls-remote origin refs/pull/57/head, at the fetch and again before the POST equal
the delta is the two fix commits merge-base --is-ancestor c7b9d71 ee54360, git diff --stat stacked; +60/−16, 3 files
recovery.test.js 165/165, twenty-six new mise exec -- node pr-review-loop/tests/recovery.test.js 165/165; grep -c "check('" — main 139, head 165
every other suite unchanged parse, decide, report_hook, protect-main, onboard-repo, make docs-check 17/17, 133/133, 23/23, 131 checks, 44 checks, 3 assertions
the new cases can fail the head suite against c7b9d71's own export (argv[2]) 157/165, 8 FAIL, exactly the two findings' cases
CI at this head get_commit_statuses run 99: pr-checks / loop-decide and pr-checks / protect-main both success
the new step runs, and prints the tallies run 99 job 0 log, fetch-run-job-log.sh 133/133, 17/17, 165/165 — the recovery suite is on the gate
live: version 851ee3c6, 49 nodes, 54 connection entries, sameAsDraft true get_workflow_details over the instance's MCP endpoint (Q4z8k794Can1u3pO) versionId 851ee3c6-…, 49 nodes, 54 edges, activeVersion.sameAsDraft=true
every node but Config's note equals the export at 9795827 node-for-node comparison including each node's own notes Config.notes only (engage_bot_author live, engage_authors in both exports); 48 others equal; connections equal
the branch moves three nodes sha256 per node, 9795827 vs head Enrich notify body, Sweep: judge, Sweep: plan — exactly the three the body names
the instance is one publish behind the live graph against the head export differs on those three; connections equal; nothing live changes until it is republished

Could not verify

  • The ticket vikunja:WR-99 — 401 on both indices and no answering MCP key, above; the description stands as the spec.
  • Deploy order (workflow, then this prompt, then a gateway restart) — outside the repository, and the restart is the operator's act.

Summary

  • Spec: 0 findings — the two blockers of round 2/5 are closed at the head, each proved as a red/green pair, and the delta introduces none. Worst: none.
  • Standards: 0 findings. Worst: none.

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.

<!-- minos review-loop: repo=olympus/workshop pr=57 head=ee543600ed376c6fc2e95d3991140f3245144552 round=3/5 axes=standards,spec --> **olympus/workshop #57** — head `ee54360`, round **3/5** — axes: standards, spec Recommendation: 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 763` and `id 765` agree on `round=1/5` and `head=9795827` and collapse to one, and `id 770` is `2/5` at `c7b9d71` — so this is the third. The head stacks on its predecessor (`git merge-base --is-ancestor c7b9d71 ee54360` → true), so the delta is `git 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 is `git diff 6cc25e6 ee54360`: six files, `+168/−13`. **Spec source: the PR description.** It links no issue; the `vikunja` link in it is the incident (CP-50 / task 369), not this change. The commits cite `vikunja:WR-99`, and the tracker would not answer: `scripts/fetch-vikunja-task.sh 5 99` and `… 5 107` both print `http=401` on the profile key and `no 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: judge` took the thread only as one item holding the array, and the node that feeds it emits one item per comment — CLOSED by `dc5ecb2`.** `pr-review-loop/workflows/forgejo-pr-review-loop.json` → `Sweep: judge`: an array item spreads into `threads` (jsCode:44); a comment item — `body` and `html_url` present — 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`): | thread shape | at `c7b9d71` | at `ee54360` | | --- | --- | --- | | one item per comment (what the read emits) | `parked` unset, `needPark` intact — nothing parks | `parked {kind:vikunja, id:412}` | | one item holding the array | `parked 412` | `parked 412` | | a single comment item | nothing | `parked 500` | The suite proves the same pair: the head's `recovery.test.js` run against `c7b9d71`'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`); the `E2: a pull request carrying a body is still a PR, not a comment` case passes at both revisions and is a guard, as the author reports it. **S2 (round 2/5) · `st.parked = null` in the notify path threw away a live park on any label write — CLOSED by `ee54360`.** The clear is gone: `Enrich notify body` jsCode:60–66 keeps the park it found and opens the watch beside it, and `Sweep: plan` reads 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. | state (parked on task 369 seven hours ago) | at `c7b9d71` | at `ee54360` | | --- | --- | --- | | a `review/needs-human` label lands, no report yet | park dropped, `needPark` opened | park **369 kept**, `needPark` opened | | the sweeper's reads for that state | `…/issues/7/comments?limit=50` | the same **plus** `…/tasks/369` | | task 369 answered | no act at all | `review/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 `body` and `html_url` (the never-started read) is not mistaken for a comment and leaves `needPark` alone; 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 `d6f1853` from round 2, below), no secret shape appears in the diff (a `grep -nEi` for token/secret/key/`Bearer` shapes over `git diff 6cc25e6 ee54360` returns only the pre-existing `Authorization: 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–41` adds a step to `loop-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 gains `recovery.test.js` while `protect-main`'s is untouched. That class is **`paperclip: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 - **The park goes with the watch at the half hour** (`Sweep: plan` jsCode: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–102` states 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. - **A tick that carries a done task and a fresh line emits both acts**: `**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. - **One park per tick.** `parkFromThread` returns 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's `needPark` survives, so it converges. - **`limit=50` on the thread read** — unchanged, and measured in earlier rounds against the busiest thread on this forge (29 comments). - **`lineOf` now exists in both `Enrich notify body` and `Sweep: judge`** as two copies of one predicate. They are byte-identical today; they can drift. Pre-existing from `ae7b529`, untouched here. - **`hermes-routes.example.yaml` and `docs/automations/pr-checks.md`** carry 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 since `9795827`. ## Verified at `ee54360` | claim | how | result | | --- | --- | --- | | head is `ee54360` | `git ls-remote origin refs/pull/57/head`, at the fetch and again before the POST | equal | | the delta is the two fix commits | `merge-base --is-ancestor c7b9d71 ee54360`, `git diff --stat` | stacked; `+60/−16`, 3 files | | `recovery.test.js` 165/165, twenty-six new | `mise exec -- node pr-review-loop/tests/recovery.test.js` | 165/165; `grep -c "check('"` — `main` 139, head 165 | | every other suite unchanged | parse, decide, report_hook, protect-main, onboard-repo, `make docs-check` | 17/17, 133/133, 23/23, 131 checks, 44 checks, 3 assertions | | the new cases can fail | the head suite against `c7b9d71`'s own export (`argv[2]`) | 157/165, 8 FAIL, exactly the two findings' cases | | CI at this head | `get_commit_statuses` | run 99: `pr-checks / loop-decide` and `pr-checks / protect-main` both `success` | | the new step runs, and prints the tallies | run 99 job 0 log, `fetch-run-job-log.sh` | `133/133`, `17/17`, `165/165` — the recovery suite is on the gate | | live: version `851ee3c6`, 49 nodes, 54 connection entries, `sameAsDraft` true | `get_workflow_details` over the instance's MCP endpoint (`Q4z8k794Can1u3pO`) | `versionId 851ee3c6-…`, 49 nodes, **54** edges, `activeVersion.sameAsDraft=true` | | every node but `Config`'s note equals the export at `9795827` | node-for-node comparison including each node's own `notes` | `Config.notes` only (`engage_bot_author` live, `engage_authors` in both exports); 48 others equal; `connections` equal | | the branch moves three nodes | `sha256` per node, `9795827` vs head | `Enrich notify body`, `Sweep: judge`, `Sweep: plan` — exactly the three the body names | | the instance is one publish behind | the live graph against the head export | differs on those three; `connections` equal; nothing live changes until it is republished | ## Could not verify - **The ticket `vikunja:WR-99`** — `401` on both indices and no answering MCP key, above; the description stands as the spec. - **Deploy order** (workflow, then this prompt, then a gateway restart) — outside the repository, and the restart is the operator's act. ## Summary - **Spec: 0 findings** — the two blockers of round 2/5 are closed at the head, each proved as a red/green pair, and the delta introduces none. Worst: none. - **Standards: 0 findings.** Worst: none. 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.
pit merged commit b687bcb532 into main 2026-12-01 17:57:09 +00:00
pit deleted branch wr-107-park-when-label-lands-first 2026-12-01 17:57:09 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
olympus/workshop!57
No description provided.