fix(cloud-agent): improve failure reporting and log retention - #5722
fix(cloud-agent): improve failure reporting and log retention#5722eshurakov wants to merge 2 commits into
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryIncremental review of bootstrap-diagnostic archive ordering at HEAD Files Reviewed (2 files)
Previous Review Summaries (2 snapshots, latest commit 4f13bc6)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 4f13bc6)Status: No Issues Found | Recommendation: Merge Executive SummaryIncremental review of diagnostic-expiry pairing at HEAD Files Reviewed (8 files)
Previous review (commit 2fb12c2)Status: No Issues Found | Recommendation: Merge Executive SummaryReviewed failure reporting, log-archive retention, GitHub credential classification, diagnostic expiry, and admin health drilldown at HEAD Files Reviewed (64 files)
Reviewed by grok-4.6 · Input: 58.6K · Output: 9.2K · Cached: 470.7K Review guidance: REVIEW.md from base branch |
2fb12c2 to
4f13bc6
Compare
iscekic
left a comment
There was a problem hiding this comment.
lgtm, bot feedback below
| { | ||
| beforeFailureCleanup: async () => { | ||
| if (bootstrapLogUploader?.archiveId === logArchiveId) { | ||
| await bootstrapLogUploader.finalize(); |
There was a problem hiding this comment.
bot: The bootstrap-failure archive is finalized before readySession records its terminal failure diagnostic.
Suggested fix: Record the sanitized bootstrap failure before this finalization callback runs (for example, have the bootstrap failure path write/return the safe failure record before cleanupWorkspace invokes beforeFailureCleanup), then finalize and upload before deleting the workspace. Add an integration test that exercises the production readySession catch path and asserts the finalized archive contains the terminal safe error.
Summary
Verification
Visual Changes
The existing health table gains impact counts and expanded redacted diagnostic details. Screenshot capture failed during local QA; no before/after image evidence is claimed.
Reviewer Notes
0234_cloud_agent_error_expiry.sqlbefore deploying cleanup code that retains expiry markers. The large generated snapshot differs from the preceding snapshot only in IDs and this constraint.git-token-servicebeforecloud-agent-nextand keep report producers/consumers aligned. Reporting remains best-effort; no historical backfill, outbox, or retry/concurrency policy change is included.