Repository navigation
fix(workflows): reload a saved workflow only after its commit - #127170
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…loads Co-Authored-By: Claude Opus 5.5 <[email protected]>
…that still holds The post_save reload now publishes after commit, so the old reason no longer matches the code. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A single save or delete now reloads through the same retry and error capture as a deferred batch. The two management commands drop their own after-commit workflow reload, because the model already publishes one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
😎 Merged successfully - details. |
🤖 CI report
|
| File | Comment lines | Added lines |
|---|---|---|
products/workflows/backend/management/commands/rewrite_email_asset_url.py |
2 | 3 |
This check does not block merging. It updates on every push and clears when the share drops.
✅ Hogbox preview — ready, open the preview
▶ Open the preview
| 🔑 Login | [email protected] / 12345678 (demo data) |
| 🧩 Running | this PR's backend on the PostHog :master base (frontend unchanged by this PR) |
| 🔗 Link | stable across rebuilds: a re-push swaps the box underneath, the URL stays |
| 🔒 Access | tailnet only (PostHog VPN) |
| 🛠️ Admin | inspect & debug state in hogland |
| 💤 Idle | sleeps after ~30 min idle (snapshot to S3, zero node cost) and wakes on your next visit in ~30s, behind a brief "waking up" screen |
commit de0e86a · box box-f4fb78912a8a · ready in 2089s (push → usable) · build log · rebuilds on every push, torn down on close
HostHog preview —
|
…d-after-commit Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Risk: No findings This PR moves the CDP worker reload for saved workflows from inside the save transaction to transaction.on_commit, so workers never cache a row that has not committed yet, and removes the now-duplicate explicit reloads from three callers. I traced every write path whose explicit reload was removed and confirmed each goes through instance.save(), so the post_save receiver's on-commit publish covers it; the pause/resume paths keep their own robust on-commit publishes. No security issue introduced — the change strictly tightens cache-invalidation timing. Sentinel reviewed |
There was a problem hiding this comment.
Approved.
The change enters workflow write-path territory, with assurance supplied by owning-team authorship and added regression coverage. No unresolved substantive concerns or other refusal grounds were found; discussion bot summaries are not current-head reviews.
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| size | ✓ | 65L, 5F substantive, 195L/11F incl. docs/generated/snapshots — within ceiling |
| tier | ✓ | T1-agent / T1c-medium (195L, 11F, single-area, fix) |
| stamphog 2.7.0 | .stamphog/policy.yml @ de0e86a · reviewed head de0e86a |
|
/trunk merge |
|
/trunk cancel |
|
/trunk merge |
Problem
Warning
Merge risk: medium, two-way door. No flag. Every workflow save now reloads the workers after commit.
Changes
hog_flow_savedpublishes intransaction.on_commit.defer_hog_flow_reloadsflushes bulk changes on commit too.How did you test this code?
de0e86a8f86: 20 of 20 read the new row.Release status
Docs update
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Agent: Claude Code, Claude Opus 5.5 (claude-opus-5-5)
Skills:
/tdd,/writing-tests,/recreating-fork-prs,/writing-pr-descriptions,/full-stopMore context for AI agents
de0e86a8f86mergesmasterat74536afc862and drops two comments.de0e86a8f86. The final read flagged two lines that came from master (fix(workflows): reject a wait that reads a group property #105854, fix(workflows): delete schedules when the live trigger leaves schedule #127358), outside this diff.hog_flow_savedanddefer_hog_flow_reloadsinmodels/hog_flow/hog_flow.py.🤖 Generated with Claude Code