fix(security-agent): make async command lifecycle durable#3726
Open
jeanduplessis wants to merge 1 commit into
Open
fix(security-agent): make async command lifecycle durable#3726jeanduplessis wants to merge 1 commit into
jeanduplessis wants to merge 1 commit into
Conversation
Contributor
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Executive Summary
Overview
Issue Details (click to expand)WARNING
Other Observations (not in diff)
Files Reviewed (40 files)
Fix these issues in Kilo Cloud Reviewed by claude-4.6-sonnet-20260217 · 2,528,768 tokens Review guidance: REVIEW.md from base branch |
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.
Summary
Makes Security Agent queue-backed actions durable and observable from admission through terminal completion.
Why this change is needed
Manual sync, finding dismissal, and manual analysis previously returned success at queue admission while the UI inferred completion from broad invalidation and timeouts. This could hide downstream failures, leave stale progress states, and acknowledge rollback callbacks before durable processing was admitted.
How this is addressed
Human Verification
finding-dismissal-lifecycle-guided.mp4
dashboard-refresh-lifecycle-guided.mp4
Local end-to-end browser and database verification
Tested with
agent-browseragainst the local app aslocal@admin.example.com, using the configuredKilo-Org/security-agent-testbedrepository. Correlated each user-visible transition with local Postgres state.Syncing...andSync queued, then returned to Refresh with a freshLast syncedtimestamp. The durable command settled assucceeded / SYNC_COMPLETED, and repository sync-state success timestamps were persisted.QueueingandAnalyzing. Reloading the Findings page restored the active state. The finding and analysis queue completed after about two minutes, the result rendered asNot Exploitable, and the dashboard analysis counts updated. The launch command settled assucceeded / ANALYSIS_LAUNCH_STARTEDwith Cloud Agent and CLI session IDs persisted.InaccurateshowedDismissal queuedandDismissing..., then changed counts from301 Open / 14 Closedto300 Open / 15 Closed. The finding appeared in Closed findings. The durable command settled assucceeded / FINDING_DISMISSED, and the finding persisted asignoredwith reasoninaccurate.Reviewer Notes
Human Reviewer Flags
0155_wakeful_skaarwith owner-scoped command and repository sync-state tables.Code Reviewer Agent
Code Reviewer Notes
QUEUE_ADMISSION_FAILED.commandId; scheduled sync messages remain ledger-free.