fix(workflow): stop deleted workflows from returning after a stale edit - #2489
fix(workflow): stop deleted workflows from returning after a stale edit#2489BradGroux wants to merge 1 commit into
Conversation
a350356 to
0c36797
Compare
|
I rebased this branch onto current The core transaction remains relevant. The audit found one remaining defect: when the workflow row was already missing but live definitions still existed, the database tombstoned those definitions yet returned no row channel. The relay therefore had no cache key to invalidate, so a stale query result could survive a successful orphan cleanup. Head The affected package suites, strict Clippy, and Rust formatting were refreshed. The non-database tests passed. Nine unrelated relay media/admin tests could not obtain this host's local PostgreSQL pool, and a serial rerun hit the same boundary. The new ignored lifecycle regression compiled, but I am not presenting the unavailable database run as passing evidence. This remains intentionally separate from legacy alias policy, Desktop refetch behavior, and the other deletion/attribution PRs noted in the updated body. |
Co-authored-by: Brad Groux <bradgroux@hotmail.com> Signed-off-by: Brad Groux <bradgroux@hotmail.com>
0c36797 to
7345b84
Compare
|
Rebased this branch onto current Head moved from Verification:
GitHub checks are rerunning on the new head. |
Fixes #2390.
What users saw
A deleted workflow could return after someone edited a stale copy. A later delete removed the workflow row again, but the replacement definition could remain queryable on the relay.
What changed
Canonical workflow deletion now uses one database transaction that:
dtag;The last point closes an orphan-repair gap found during this refresh. Previously the database could tombstone orphaned definitions successfully while returning no workflow-row channel, leaving stale query results in another affected channel cache.
Safety and scope
The existing validator still proves signer authority. The database mutation independently scopes the row and definitions by community and owner.
This PR does not add a permanent resurrection ban, sweep legacy name aliases, or change Desktop refetch behavior. It complements rather than replaces the separate work on atomic deletion, legacy/name no-op handling, and effective agent-author attribution.
Verification
Verified at exact head
ea5729ef8e8c69b01de80108c3cf4dc25c233aa8, rebased onto currentmain:buzz-db,buzz-relay, andbuzz-test-clientpackage suites were exercised. The non-database tests passed; nine unrelated relay media/admin tests failed because this host's local PostgreSQL pool timed out.The new lifecycle regression compiled but remains ignored without working local database infrastructure. Live relay and PostgreSQL race tests were not rerun in this refresh.