fix(sp): unify agent-routed instance delete to enroll-before-publish - #63
fix(sp): unify agent-routed instance delete to enroll-before-publish#63gabriel-farache wants to merge 1 commit into
Conversation
89092ce to
d7ca39b
Compare
|
/agentic_review |
Code Review by Qodo
1. Late agent acknowledgements are ignored
|
…review) Qodo's automated review of PR dcm-project#63 (dcm-project#63 (comment)) found that the only durable signal separating a non-deferred (hard-delete) scheduled deletion from a deferred one was a post-publish status=deleting write: a fast acknowledgement, a publish failure followed by a scheduler retry, or a DB failure on that write after a successful publish could each misclassify the deletion as deferred and leave a DELETED tombstone instead of hard-deleting, and an unguarded late UpdateStatus could resurrect status=deleting on an already-finalized row. Add a durable ServiceTypeInstance.HardDelete column, persisted in the same update as deletion_status=SCHEDULED at enrollment (MarkForDeletion/ResetRetryCount), before any publish attempt. handleDeletionAcknowledged and the cleanup scheduler's auditGiveUp now key off this field instead of status, so classification survives fast acks, publish failures/retries, and best-effort status-write failures. The post-publish status=deleting write becomes observability-only (GetInstance surfacing "deleting"); its failure no longer fails DeleteInstance. Also fix the OpenAPI deleteInstance description, which stated enrollment/publish/204 behavior universally even though non-deferred no-agent/no-publisher deletes bypass enrollment and hard-delete immediately, while deferred ones enroll and are completed later by the cleanup scheduler rather than immediately. Regenerated spec.gen.go via `make generate-sp-rm-api` (types.gen.go/server.gen.go/client.gen.go are byte-identical, since they don't embed the operation description text). Assisted by: Cursor Agent - Claude Sonnet 4.5 Signed-off-by: gabriel-farache <gfarache@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
PR Summary by QodoUnify agent deletion with durable enroll-before-publish
AI Description
Diagram
High-Level Assessment
Files changed (16)
|
|
Code review by qodo was updated up to the latest commit 0e9359a |
Assisted by: Claude Code - claude-4.6-sonnet Signed-off-by: gabriel-farache <gfarache@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
0e9359a to
a7f8ea4
Compare
Unify agent-routed instance delete to enroll-before-publish
Refects changes from dcm-project/enhancements#106