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
19.0.0-next.0: a record-change flow's run-history and audit writes throw knex "Transaction query already complete" after the flow finishes (hotcrm lead_assignment) #37705
Filing gate: ① a regression with a reproduction. Source: the cloud#5053 pin round (protocol 19 move, ruled by the maintainer on 2026-11-26). The hotcrm ^19 port on @objectstack/*19.0.0-next.0 (hotcrm#2820, head 9e7bc7f) reproduced it.
Reader: the framework's automation/data lane (triage to confirm the domain). The seat epic:#5027#1 does not take it; it only reports it.
Dedupe: the same class as #22855, #33651 and #33760 (all closed). No open card matches "Transaction query already complete" on the 19 line.
hotcrm test/flow-record-change.test.ts (lead_assignment): 6 tests on 19.0.0-next.0. The flow run completes. The run-history persist and the audit writes then fail with knex "Transaction query already complete".
Not yet checked on objectstack main (1dbf19a1, which carries more than next.0). The first step is to reproduce on main.
What to do
Reproduce on main with a record-change flow whose run writes run history and an audit row after the triggering write's transaction has committed.
Triage: lands in area:data · domain:server · Bug · priority:p1 · pm:queue · size M; rationale: a regression in the published 19.0.0-next.0, reproduced on hotcrm. After a record-change flow finishes, its run-history and audit writes reuse a committed transaction and throw, so those rows are lost. Lost audit and run-history writes are p1, as suggested. It lands in area:data, not area:workflow: the fault is the write path's transaction handling (the class of #22855, #33651 and #33760), and area:data has taking seats, while area:workflow has none. First step: reproduce on main.
Claim: PM loop round 1 · 2026-11-26T23:56Z
Session: session_01L6bhgV6i8jfWwSXjpWJrjA
Thread session: session_01L6bhgX3p4cHBBQ11Sjokrq
Account: os-sales
Branch: claude/project-thread-a7kaf6
Domain: domain:server
Seat: repo:objectstack#2
Area: s2-data
File surface: not known before the reproduction — the record-change flow's post-run writes (run-history persist and audit writes) on the data write path, their regression test, one changeset; the thread names the files in its first report
Container & model: M, mode:thread (card thread implements, no os-dev), model: default — no path-derived mandate, effort: high
Clause-②: no
Metadata-protocol: none
Responsibility: objectstack platform (a record-change flow's run-history and audit writes after the flow finishes reuse a committed transaction on 19.0.0-next.0) | hotcrm (blocks a clean ^19 republish, hotcrm#2820) | app builders with record-change flows that write audit after the triggering write; reachable on 19.0.0-next.0
Thread-read: none
Premise: unverified on main — the card's first step; the thread reproduces on origin/main first and reports the reading before any fix (if it does not reproduce, the card closes with that reading)
Serial constraints cleared: none known; the thread re-runs overlap-check before its first push
This card's acceptance also names hotcrm's six lead_assignment tests on the release that carries the fix. PR #37742 delivers the platform half and keeps Fixes. The release check is owned by objectstack-ai/hotcrm#2822 (Blocked-by: #37742). That card also switches the three case_escalation history reads in hotcrm PR #2820 to the file's landedRuns wait, because the history row now lands just after the write returns. Review record 7208126545, F-3.
PR #37742 merged at 2026-11-27T03:35Z and closed this card. pm:dispatched is cleared. The release check on hotcrm's six lead_assignment tests continues on objectstack-ai/hotcrm#2822.
That job's log has 0 "Transaction query already complete" lines.
The three case_escalation reads now wait for the history row with landedRuns, as the card describes.
One side observation is filed separately as #38303. With history landing after the write, the overflow prune logs "Record … not found in sys_automation_run" 57 times per shard.
Activity
objectstack-fleet commentedon Nov 26, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in area:data · domain:server · Bug · priority:p1 ·
pm:queue· size M; rationale: a regression in the published 19.0.0-next.0, reproduced on hotcrm. After a record-change flow finishes, its run-history and audit writes reuse a committed transaction and throw, so those rows are lost. Lost audit and run-history writes are p1, as suggested. It lands in area:data, not area:workflow: the fault is the write path's transaction handling (the class of #22855, #33651 and #33760), and area:data has taking seats, while area:workflow has none. First step: reproduce onmain.objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA
Claim: PM loop round 1 · 2026-11-26T23:56Z
Session:
session_01L6bhgV6i8jfWwSXjpWJrjAThread session:
session_01L6bhgX3p4cHBBQ11SjokrqAccount:
os-salesBranch:
claude/project-thread-a7kaf6Domain:
domain:serverSeat:
repo:objectstack#2Area:
s2-dataFile surface: not known before the reproduction — the record-change flow's post-run writes (run-history persist and audit writes) on the data write path, their regression test, one changeset; the thread names the files in its first report
Container & model:
M,mode:thread(card thread implements, no os-dev),model: default — no path-derived mandate,effort: highClause-②: no
Metadata-protocol: none
Responsibility:
objectstack platform (a record-change flow's run-history and audit writes after the flow finishes reuse a committed transaction on 19.0.0-next.0) | hotcrm (blocks a clean ^19 republish, hotcrm#2820) | app builders with record-change flows that write audit after the triggering write; reachable on 19.0.0-next.0Thread-read: none
Premise: unverified on main — the card's first step; the thread reproduces on
origin/mainfirst and reports the reading before any fix (if it does not reproduce, the card closes with that reading)Serial constraints cleared:
none known; the thread re-runs overlap-check before its first pushfix(objectql): keep the facade within its line ceiling; type the new …
chore(changeset): declare the new ObjectQL.runOutsideOpenUnits as a C…
fix(core,messaging,queue): wake a dispatcher at the commit of the uni…
chore(changeset): name the commit-time wake, the audit-seal loop and …
objectstack-fleet commentedon Nov 27, 2026
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA
Release check owner (seat) · 2026-11-27T02:28Z
This card's acceptance also names hotcrm's six
lead_assignmenttests on the release that carries the fix. PR #37742 delivers the platform half and keepsFixes. The release check is owned by objectstack-ai/hotcrm#2822 (Blocked-by: #37742). That card also switches the threecase_escalationhistory reads in hotcrm PR #2820 to the file'slandedRunswait, because the history row now lands just after the write returns. Review record 7208126545, F-3.docs(webhooks): a delivery written in a transaction goes out at its c…
objectstack-fleet commentedon Nov 27, 2026
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA
Landed · 2026-11-27T03:36Z
PR #37742 merged at 2026-11-27T03:35Z and closed this card.
pm:dispatchedis cleared. The release check on hotcrm's sixlead_assignmenttests continues on objectstack-ai/hotcrm#2822.objectstack-fleet commentedon Nov 28, 2026
repo:hotcrm#2 · sunhaolin · session_017xRBcV3h25dAMNWki8e1ns
Release check for this issue, as objectstack-ai/hotcrm#2822 asks, on the published
19.0.0-next.2:test/flow-record-change.test.tspasses 56/56 in CI on feat!: move to ObjectStack 19.0.0-next.2 and protocol 19 hotcrm#2820 at headb7a997f9: job https://github.com/objectstack-ai/hotcrm/actions/runs/46141406462/job/140967940616, log line✓ test/flow-record-change.test.ts (56 tests).lead_assignmentcases are among the 56.case_escalationreads now wait for the history row withlandedRuns, as the card describes.One side observation is filed separately as #38303. With history landing after the write, the overflow prune logs "Record … not found in sys_automation_run" 57 times per shard.
fix(automation): a record-change flow's run history and notification …