fix(desktop): address workflow deletions at the workflow's actual owner#2669
Open
chillerno1 wants to merge 1 commit into
Open
fix(desktop): address workflow deletions at the workflow's actual owner#2669chillerno1 wants to merge 1 commit into
chillerno1 wants to merge 1 commit into
Conversation
delete_workflow built the NIP-09 a-tag coordinate with the caller's pubkey, but kind:30620 is addressable by (author, d-tag). For an agent-created workflow the coordinate named a record that doesn't exist — the relay accepted the kind:5 and deleted nothing while the UI reported success. Fetch the workflow's kind:30620 event first (the same #d query update_workflow already uses) and build the coordinate from the event's author. Deleting an unknown workflow id now surfaces "workflow not found" instead of silently publishing an unmatchable delete. Client half of the end-to-end fix; the relay half (execute a-tag deletions against the a-tag owner rather than the signer) is block#2242. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: chillerno1 <gh.chiller@pm.me>
chillerno1
force-pushed
the
chillerno1/workflow-delete-owner
branch
from
July 24, 2026 11:43
6a5d5a0 to
373ac3d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2671.
Problem
Deleting an agent-created workflow from the desktop app appears to succeed, but the workflow keeps running and stays in the list. Since workflows are commonly created by agents, this makes most workflows undeletable from the UI.
Root Cause
delete_workflowbuilds the NIP-09a-tag coordinate with the caller's pubkey:kind:30620 is addressable by
(author, d-tag). For an agent-created workflow,30620:<caller>:<workflow-id>names a record that does not exist. The relay accepts the kind:5 (a self-addressed delete always passes validation) and deletes nothing; the UI reports success.Observed live: a delete of an agent-owned workflow produced
["a","30620:<human-pubkey>:<workflow-uuid>"]while the kind:30620 event is authored by the agent — the coordinate can never match.Fix
Fetch the workflow's kind:30620 event first (the same
#dqueryupdate_workflowalready uses) and build the coordinate from the event's author. Relay-side validation already authorizes the owning human for agent-authored coordinates viais_agent_owner. Deleting an unknown workflow id now surfacesworkflow not foundinstead of silently publishing an unmatchable delete.This is the client half of the fix. The relay half is #2242: today the relay executes a-tag deletions scoped by the delete's signer, so a human-signed delete of an agent workflow still no-ops server-side. Without this change, #2242 alone won't help desktop users, because the client addresses a record that doesn't exist. Together they make delete work end to end.
Related but deliberately not included: deleted workflows leaving their kind:30620 event queryable (ghost list entries) is #2390, with a relay-side fix open in #1340.
Validation
cargo testindesktop/src-tauri: 1617 passed, 0 failed, 14 ignored.cargo clippy --all-targetsandcargo fmt --check: clean.accepted: trueand the workflow remained live and kept firing.30620:<agent-pubkey>:<workflow-id>; an owner-signed deletion of that exact coordinate was verified to remove the workflow record.🤖 Generated with Claude Code