You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
automation: on 19.0.0-next.2, the run-history overflow prune warns "Record run_… not found in sys_automation_run" for rows it just counted (57 per test shard in hotcrm) #38303
area:workflowApprovals and automation — the work that runs without a person driving itdomain:serverDomain lane — seat card indexed by label:pm:seatpriority:p3
On @objectstack/*19.0.0-next.2, the hotcrm test suite logs WARNs like this one:
WARN [automation] run-history overflow prune failed for 'lead_assignment': Record run_run_023873c5-6cdb-4cf1-9a90-a3410fae8cb9 not found in sys_automation_run
Observation: the prune tries to delete a run row that is not there, or not there yet.
Possibly related: the first bulk import got slower
In the same suite, the first case of test/import-values-accepted.test.ts:90 (a lead bulk import that fires lead_assignment) takes:
Version
Where
Time
next.2
CI
5455 ms (failed at the 5 s default), then 6285 ms
next.2
local
2.0–2.6 s
18.6.0
local
1.0 s
With the template imports skipped, the case takes 0.65 s on both versions. The hotcrm dev's reading is that the extra time is work the bulk import leaves running after its writes return. That reading is an inference; it is not traced to a function.
Suspected cause (inferred, not traced)
#37742 (fix for #37705) moved a run's history row to land a moment after the triggering write commits. An overflow prune that counts runs and deletes the oldest could now race the deferred insert: it picks a row id whose row has not landed yet, or deletes one twice. That would fit both the "not found" WARNs and the extra work after the writes return.
Asks
Confirm or refute the race between the overflow prune and the deferred history insert.
If confirmed, make the prune tolerate a row that has not landed yet, or order it after the insert, so it does not log a failure per run.
Say whether the slowdown of the first bulk import is expected on 19.
hotcrm gave that one test a 30 s budget with the measurement beside it. Its assertions are unchanged, and it will cite this card.
Triage: lands in packages/services/service-automation/src/suspended-run-store.ts (pruneFlowOverflow) · area:workflow · domain:server · Bug · p3 · pm:queue · size S. Rationale: each new terminal run triggers an overflow prune, and a prune that finds its row already gone only logs a WARN. The named producer (hotcrm CI #2820 shard 3) shows 57 such lines on 19.0.0-next.2. Nothing is stored wrong, so Impeded × developers/operators ⇒ p3. A second explanation besides the filed deferred-insert theory: concurrent prunes after a bulk import read the same overflow list and both delete it. The dev confirms which one and answers ask 3 (is the slowdown expected on 19?) in the report. A measured end-user bulk-import slowdown re-grades upward. Dedupe: #37705 (closed) is a different mechanism.
Path: none
Source: fleet (filed from the hotcrm seat's CI reading) · Filing gate: ① finding (a), reach measured.
Grade: area:workflow · Bug · Impeded · reach: developers and operators reading logs (named producer) · evidence: measured downstream, mechanism read.
More evidence for this card, from hotcrm card #2849 and PR #2854 (dev report: hotcrm comment 7250571615). The slowdown also shows on approval and record-change flow work in test/psa-approvals.test.ts.
Local, same box, two runs each, --maxWorkers=2, comparing 18.6.0 (hotcrm 332710e8) with 19.0.0-next.2 (hotcrm c6e64eed):
What
18.6.0
19.0.0-next.2
Whole file
24.0–25.3 s
28.7–29.0 s (about +15–20 %)
"is approved by a Project Director"
517–535 ms
644–711 ms
"sends a report totalling 2000 or more"
873–969 ms
1216–1275 ms
"puts the expenses of each project" on CI
1.6–1.8 s
3.4–3.7 s
A phase profile found no polling wait. Each vi.waitFor on approval requests resolves on its first poll, in 1–2 ms. So the time is spent in the flow and approval work itself.
Four bulk-submit cases in that file now cross hotcrm's 5 s default on CI shard 2. hotcrm gave them a measured 15 s per-case budget that cites this card.
Folded 2026-12-05T02:45Z into this week's area:workflow sweep card #39770, as row "#38303 — automation: on 19.0.0-next.2, the run-history overflow prune warns "Record run_… not found in sys_automation_r", on the maintainer's word in the triage report: 「同意,14 个专题都开,内部卡并清扫卡」. This card is internal engineering work with no direct customer effect, small and unclaimed, which is what the sweep takes. Its body stays the detail of the row; the sweep PR that ships the row names this card. Reopen it if it turns out larger than one file or one mechanism.
area:workflowApprovals and automation — the work that runs without a person driving itdomain:serverDomain lane — seat card indexed by label:pm:seatpriority:p3
Activity
objectstack-fleet commentedon Nov 28, 2026
triage#1 · sunhaolin · session_017xRBcSxvUE3fDrox79CL9t
Triage: lands in
packages/services/service-automation/src/suspended-run-store.ts(pruneFlowOverflow) · area:workflow · domain:server · Bug · p3 · pm:queue · size S. Rationale: each new terminal run triggers an overflow prune, and a prune that finds its row already gone only logs a WARN. The named producer (hotcrm CI #2820 shard 3) shows 57 such lines on 19.0.0-next.2. Nothing is stored wrong, so Impeded × developers/operators ⇒ p3. A second explanation besides the filed deferred-insert theory: concurrent prunes after a bulk import read the same overflow list and both delete it. The dev confirms which one and answers ask 3 (is the slowdown expected on 19?) in the report. A measured end-user bulk-import slowdown re-grades upward. Dedupe: #37705 (closed) is a different mechanism.Path: none
Source: fleet (filed from the hotcrm seat's CI reading) · Filing gate: ① finding (a), reach measured.
Grade: area:workflow · Bug · Impeded · reach: developers and operators reading logs (named producer) · evidence: measured downstream, mechanism read.
Recorded 2026-11-28T13:57Z.
objectstack-fleet commentedon Nov 29, 2026
repo:hotcrm#2 · sunhaolin · session_017xRBcV3h25dAMNWki8e1ns
More evidence for this card, from hotcrm card #2849 and PR #2854 (dev report: hotcrm comment 7250571615). The slowdown also shows on approval and record-change flow work in
test/psa-approvals.test.ts.Local, same box, two runs each,
--maxWorkers=2, comparing 18.6.0 (hotcrm332710e8) with 19.0.0-next.2 (hotcrmc6e64eed):A phase profile found no polling wait. Each
vi.waitForon approval requests resolves on its first poll, in 1–2 ms. So the time is spent in the flow and approval work itself.Four bulk-submit cases in that file now cross hotcrm's 5 s default on CI shard 2. hotcrm gave them a measured 15 s per-case budget that cites this card.
objectstack-fleet commentedon Dec 5, 2026
triage@hotlong · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Folded 2026-12-05T02:45Z into this week's area:workflow sweep card #39770, as row "#38303 — automation: on 19.0.0-next.2, the run-history overflow prune warns "Record run_… not found in sys_automation_r", on the maintainer's word in the triage report: 「同意,14 个专题都开,内部卡并清扫卡」. This card is internal engineering work with no direct customer effect, small and unclaimed, which is what the sweep takes. Its body stays the detail of the row; the sweep PR that ships the row names this card. Reopen it if it turns out larger than one file or one mechanism.