ticket-dispatch: retry the board read, and fit it under the tick (WR-90) #44
No reviewers
Labels
No labels
needs-info
needs-triage
ready-for-agent
ready-for-human
review
merge-ready
review
needs-fix
review
needs-human
review
needs-operator
review
needs-review
review
waiting
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
olympus/workshop!44
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "hermes/WR-90-retry-the-dispatch-sweep-s-vikunja-reads"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements WR-90
Summary
The pump's and the sweep's board read now retry inside the run, and the per-request timeout drops
below the tick both triggers run on.
Those numbers are priced against the tick, not picked: the triggers are
*/5 * * * *and2-59/5 * * * *— five minutes — and each read node runs once per board, six of them.The old 15 s fits no budget once retries sit under it: 280 s of a 300 s tick leaves nothing for the
rest of the run. 10 s is also the value the HTTP Request node declares for the field itself.
What this does not bound, and what that costs. The 300 s in the incident was not
options.timeout. That field is documented as "time in ms to wait for the server to send responseheaders (and start the response body)" — it never covered a body that started and then stalled. The
stall is cut by the instance's
N8N_HTTP_RESPONSE_BODY_READ_TIMEOUT(default300000ms, in@n8n/config'sHttpRequestConfig), which no node field or export setting reaches. Until that islowered, a stalling read costs 300 s per try, so three tries make that class worse than it is
today. Setting it to
10000on the instance makes both terms price the same and lands the run at190 s; that is a one-line change to
/opt/n8n.envon Guest 128 plus a restart, and it is named inthe handoff as the step this change needs beside it.
The change is one node setting per read; the sweep's other reads (
Get teams,Get pump teams,Get view tasks,Get sweep hooks) are untouched, as the ticket's out-of-scope says. WR-91 landedon
mainwhile this branch was open, so the merge commit carries it; the branch's own diff is stillthe two nodes' timeout and retry fields.
Evidence
origin/main99d8fb3c3d544aticket-dispatch/tests/retry.test.jsticket-dispatch/tests/gate.test.jsticket-dispatch/tests/pump.test.jsticket-dispatch/tests/notices.test.jsticket-dispatch/tests/provision-buckets.test.shpr-review-loop/tests/parse.test.jspr-review-loop/tests/decide.test.jsnas-disk-report/tests/scan.test.pynas-disk-report/tests/render.test.pyscripts/tests/protect-main.test.shscripts/tests/onboard-repo.test.shmake docs-checkThe new suite's left column is that same suite handed the base export
(
git show origin/main:ticket-dispatch/workflows/vikunja-ticket-dispatch.jsonafter the merge), soevery check it adds reds against the nodes as they are:
The suite's behavioural half is the ticket's second criterion driven at
fake-vikunja.py, which nowanswers the board read and can fail one on purpose:
resetdrops the connection before answering, asa proxy that cannot spool the reply does, and
statusanswers 500. A node whose read drops oncerecovers on its second try and stays green — twelve requests for six boards, because n8n reruns the
whole node, not the one board that failed. Dropped twice, it recovers on the third. A read that keeps
failing 500s reaches the third try and fails there, which is what fails the run; the error workflow is
unchanged and sends one POST per failed run, which the incident itself measured — 21 failed runs,
21 alerts.
Where the 300 s came from — read from the live instance, not inferred. Execution 69426 on
Guest 128 ran 316548 ms and failed at
Get queueswith the node carryingoptions.timeout: 15000:binary-buffer.tsreads the timer fromHttpRequestConfig.responseBodyReadTimeout, whose decoratoris
@Env('N8N_HTTP_RESPONSE_BODY_READ_TIMEOUT')and whose default is300_000. The same sweep'sother failures were
ECONNRESET/abortedafter 20277 ms — the class retries do cover.Merge Danger
Door: two-way. Revert the commit and republish; no data moves, and the ledger, the buckets and
the tick are untouched by these fields.
Blast Radius: the dispatch workflow only, and not until it is republished.
0e7fe518; thisbranch edits an export.
versionIdis deliberately left alone, because it is the publishedversion read back after a publish (WR-60), not the draft's.
mainwhile this branch was open, and the export onthis branch already carries it. #42's open-only board filter is still open and would ride the same
publish if it merges first; that is not this PR's change, and it reduces the same latency.
activeVersion.sameAsDrafttrue after the publish, and the next real sweep green. The stall boundabove is the other half of that observation, and it lives on the instance, not in this repo.
Review started (round 1/5) on
32bf0e65bc— reading the diff now.repo olympus/workshop · PR #44 · reviewed head
c3d544a0093d31f6bc4be2070fc3561819cc0377· round 1/5 (the review list held 0 reviews, so this is the first; the step-0 line said 1/5 as dispatched) · verdict: APPROVERecommendation: merge
The head moved during the review. The dispatch named
32bf0e6. Before I posted,refs/pull/44/headon the forge resolved toc3d544a: the author mergedmain(#43, WR-91) in asd68b2ef, then addedc3d544a(a test-only change inretry.test.js). Both are stacked on32bf0e6. I reviewed32bf0e6and then re-drove everything atc3d544a; the findings below are forc3d544a. The merge's files (gate/notices/pumptests, the LAN-origin edits to the workflow) are #43's to answer for. The change this PR owns isgit diff 99d8fb3 c3d544a: README,fake-vikunja.py,retry.test.js, and ten lines of the workflow export.Spec: WR-90 (Vikunja project 5, index 90, task id 295), read live. The ticket body's four acceptance criteria plus the triage Agent Brief comment. The PR body's own description agrees with the ticket.
Standards:
AGENTS.md,docs/agents/*,docs/adr/0001–0012read at the head. None binds a node-setting change in the n8n export beyond ADR 0009's merge-to-main path, which this PR does not touch. No repo convention covers the PR body's section layout; I judged that by general good practice.Spec
Ticket criteria, one by one:
c3d544aretryOnFail,maxTries,waitBetweenTries;options.timeout< sweep interval; values quotedGet queuesandGet sweep queues:retryOnFail: true,maxTries: 3,waitBetweenTries: 5000,timeout: 10000(ticket-dispatch/workflows/vikunja-ticket-dispatch.json:517–519and:815–817). Values and the 190 s / 280 s arithmetic are in the PR body; I recounted them (3×6×10+2×5 = 190, 3×6×15+2×5 = 280, six boards in Config).retry.test.jsdrivesfake-vikunja.pywith a reset once and twice; 12 and 18 requests, green.onErroris unset on both nodes,settings.errorWorkflowequals the errors export's id, and the errors export is one trigger, one render, one POST.sameAsDrafttrue, next real sweep greenADVISORY 1 (spec): the stalled-body bound the Agent Brief asks for is not delivered, and the change alone makes that class slower.
ticket-dispatch/tests/retry.test.js:55(BODY_STALL_MS = 10000) and the PR body's "What this does not bound". The brief's Desired behavior says "The stalled-body case is bounded too" and its criterion 3 says "a body that stalls mid-transfer is cut off within the stated bound, not after 300 s". The 300 s failures were the dominant class in the incident. This PR does not bound them; it states they depend onN8N_HTTP_RESPONSE_BODY_READ_TIMEOUTon Guest 128. With only this change published, a stalling read costs 3 × 300 s per board set instead of 300 s: the author says this too. The checks atretry.test.js:131-136("a read is not timed out later than a stalled body would be", "every board stalling at the body bound still fits the tick") are priced against a constant the test writes, not against anything the instance carries. They cannot go red if the instance is left at 300 s. The prerequisite is also not recorded anywhere that outlives the PR: no ticket is cited for it, and no doc in this repo names the variable. The author disclosed all of this, which is why it is an ADVISORY and not a BLOCKER: the change is two-way, nothing moves until the Operator republishes, and the PR names the step. The weight is real, though. Do not republish this export before the instance setting is lowered, and file the instance change as its own ticket so the ordering is on the record. I did not verify whether the export'ssettings.executionTimeoutcould bound the stall inside the repo; I could not run n8n here, so I name it as a question for the author, not a finding.Standards
ADVISORY 2 (standards): the PR body's evidence is pinned to a superseded head. PR body "Evidence" table is headed "head
32bf0e6". The head is nowc3d544a, and the counts moved with the merge of #43:gate.test.js79/79 (body: 75/75),pump.test.js67/67 (body: 65/65),notices.test.js23/23 (body: 21/21).retry.test.jsis still 18/18. The numbers I measured are all green; only the body lags. Refresh the column or drop the head hash from it.Verified by my own hand (at
c3d544a)git ls-remote origin refs/pull/44/headbefore postingc3d544a…, stacked on32bf0e6(merge-base --is-ancestortrue)retry.test.jsgreenmise exec -- node ticket-dispatch/tests/retry.test.jsretry.test.jsred at base7800152workflow with the errors export beside itmake docs-check/parse/decidemaxTries2; Get sweep queuesonError: continueRegularOutput; Get queuesmaxTries5 + wait 20000;settings.errorWorkflowwronggit status --porcelainin the review worktreeNamed, not charged
readNodeWithRetries), not n8n. The suite header says so ("nothing here can start the engine"). It proves the policy's outcome against a failing upstream, and the export checks prove the policy is what the nodes carry; the engine's own retry behaviour is n8n's. Disclosed; not charged.sameAsDraft, next real sweep) is post-publish by nature.binary-buffer.tsstack,HttpRequestConfigdefault300_000, the engine's 2..5 / 0..5000 clamps) I could not verify: no n8n instance or n8n source is reachable from this review. They are the author's reading of the instance, and the arithmetic built on them is internally consistent.fake-vikunja.pymoved fromHTTPServertoThreadingHTTPServer.provision-buckets.test.shpasses at 50 and the other suites do not use it; not charged.Get teams,Get pump teams,Get view tasks,Get sweep hooks) untouched, as the ticket's out-of-scope says.Summary
32bf0e6Two advisories: under the three-advisory volume rule, so
Recommendation: merge. No BLOCKER, so the review state is APPROVE. The recommendation turns on the count, not on the weight: the first advisory carries real weight and I ask that its ordering condition be honoured at republish.