fix(recommendations): preserve incomplete AWS sweeps - #472
Conversation
Preserve valid rows and withhold stale-row eviction for incomplete AWS accounts. Query explicit services when retrying with configured recommendation parameters. Refs LeanerCloud/cloud-commitments-go#54
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Warning Review limit reached
This review includes 5 billable files and costs up to $1.25.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 51 minutes for your next included review. View limit detailsLimit details: You’ve used the included review currently available. Your 83 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Review configuration: ⚙️ Run configuration
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (5)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (5)
Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour. 📝 WalkthroughWalkthroughThe scheduler now treats AWS incomplete-recommendation errors as nonfatal while marking the sweep incomplete. When the initial fetch returns no recommendations, it requests fallback recommendations separately for each supported service. Tests cover error handling, fallback requests, and collection persistence. ChangesAWS recommendation collection
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to Incomplete AWS sweeps retain valid recommendations without evicting stale rows for the affected account. No identified issue blocks merge after the required checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 42.86% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 4 files. (1 skipped: 1 unsupported.) ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Platform #472 independent exact-head reviewReviewed head: Verdict: no actionable findings. Exact-head source review and fresh local verification pass. This supersedes the prior 9a40 source/runtime approval only for the named head; publication or merge still requires the owner's current remote-head/CI/gate checks. Reviewer performed no public writes or merge. Source reviewRe-read the complete six-file base-to-head diff, 360 additions and 28 deletions, applicable committed CLAUDE.md, test assertions, and actual published SDK contracts. Covered completeness, correctness, security, bugs, duplication, scope, and over-engineering, with particular attention to surviving monetary recommendations and account/provider-scoped eviction.
Head is a merge of old reviewed 9a40 and base fa8c39. Explicit git comparison confirms zero changes from 9a40 to ed80 across internal/scheduler, internal/config, internal/database and CLAUDE.md. Merged base adds OTel 1.45/logr upgrades and unrelated frontend/Docker/Terraform changes. Those make an old binary insufficient; all runtime evidence below was freshly compiled/run against ed80. Fresh execution evidenceRuntime tree:
Native overlay replaces ONLY Prior parent and one-line AND/fatal mutant evidence remains supplementary: the scheduler/test files are byte-identical across the merge, but those probes were not rerun on ed80 and are not represented as fresh final-head executions. LimitsThis is synthetic AWS HTTP data through the real SDK and production scheduler into real local PostgreSQL 17.11, with a native helper replacing the committed Docker PostgreSQL16 helper. It is not a live-cloud or Docker-parity claim. Empty HOME, synthetic credentials, disabled metadata, rejection proxy, and offline modules avoid real cloud credentials/APIs. No full application build, whole-repository test run, browser, outer scheduled process, real purchase, or deployment was performed in this final-head review. Diagnostic log text is visible but not asserted. Root must independently confirm current remote SHA, current CI and any other merge gates. |
Incomplete AWS recommendation sweeps can return valid rows alongside an error. Preserve those rows while excluding the incomplete account from stale-row eviction. When retrying with configured parameters, query each explicit service and retain incomplete status across the fallback results.
Refs LeanerCloud/cloud-commitments-go#54. The parent remains open until the CLI, MCP, and Platform rollout is complete.
Local verification exercised the published AWS adapter, synthetic SDK HTTP responses, actual collection and PostgreSQL persistence across 11 scenarios. Baseline and mutation probes demonstrate the survivor, fallback-parameter, and eviction assertions. Full backend race tests, build, vet, pinned lint, and normal installed hooks passed. Independent gpt-6-astra source and staged reviews found no actionable findings. No live cloud calls were made.
Independent final review approved exact committed SHA
9a40c12dc7881439f011bd6bdacdf6f1c565bf36. Fresh race-enabled connected PostgreSQL verification passed all 11 cases (25.740s). Published AWS/pkg module selection at that SHA passed with no replacements. The unrelated OpenTelemetry advisory is tracked by the active repair plan; required CI must pass before merge.Summary by CodeRabbit