refactor(rebuild): lower cognitive complexity ratchet to 224 - #5427
Conversation
Signed-off-by: Carlos Villela <cvillela@nvidia.com> (cherry picked from commit 41fcd6a)
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
…t/244-rebuild-cognitive-complexity
…243-rebuild-confirm-cognitive-complexity
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
📝 WalkthroughWalkthrough
ChangesrebuildSandbox preflight refactor
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in the Show a code coverage summary of the most covered files.
TypeScript / code-coverage/cliThe overall coverage in the Show a code coverage summary of the most covered files.
Updated |
E2E Advisor RecommendationRequired E2E: None Full advisor summaryE2E Recommendation AdvisorFailed: Advisor SDK provider error: analysis: 403 <title>403 Forbidden</title> 403 Forbidden |
Vitest E2E Scenario RecommendationRequired Vitest E2E scenarios: None Full Vitest E2E advisor summaryVitest E2E Scenario AdvisorFailed: Scenario advisor SDK provider error: scenario-analysis: 403 <title>403 Forbidden</title> 403 Forbidden |
PR Review AdvisorFindings: 0 needs attention, 1 worth checking, 0 nice ideas Review findings🛠️ Needs attention
🔎 Worth checking
🌱 Nice ideas
Consider writing more tests for
Since last review detailsCurrent findings:
This is an automated advisory review. A human maintainer must make the final merge decision. |
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
…t/244-rebuild-cognitive-complexity
…243-rebuild-confirm-cognitive-complexity
…ratchet/225-rebuild-single-agent-guard
…4-rebuild-registry-guard # Conflicts: # src/lib/actions/sandbox/rebuild.ts
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
…t/244-rebuild-cognitive-complexity
…243-rebuild-confirm-cognitive-complexity
…ratchet/225-rebuild-single-agent-guard
…4-rebuild-registry-guard
…ognitive-complexity # Conflicts: # biome.json
…243-rebuild-confirm-cognitive-complexity
…ratchet/225-rebuild-single-agent-guard
…4-rebuild-registry-guard
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
…243-rebuild-confirm-cognitive-complexity
…ratchet/225-rebuild-single-agent-guard
…4-rebuild-registry-guard
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
…243-rebuild-confirm-cognitive-complexity # Conflicts: # test/rebuild-credential-preflight.test.ts
…ratchet/225-rebuild-single-agent-guard
…4-rebuild-registry-guard
…onfirm-cognitive-complexity # Conflicts: # biome.json # src/lib/actions/sandbox/rebuild.ts # test/rebuild-credential-preflight.test.ts
…ratchet/225-rebuild-single-agent-guard
…4-rebuild-registry-guard
…ingle-agent-guard # Conflicts: # biome.json # src/lib/actions/sandbox/rebuild.ts
…4-rebuild-registry-guard
…egistry-guard # Conflicts: # biome.json # src/lib/actions/sandbox/rebuild.ts
Summary
Continue the stacked cognitive-complexity ratchet by lowering the threshold from 225 to 224. This trims the rebuild hotspot with small guard/preflight extractions.
Changes
complexity/noExcessiveCognitiveComplexityfrom225to224inbiome.json.rebuildSandbox.rebuildSandboxcomplexity below the new ceiling.Type of Change
Verification
npx @biomejs/biome lint --only=complexity/noExcessiveCognitiveComplexity --max-diagnostics=none .npm run typecheck:clinpx vitest run --project cli test/rebuild-credential-preflight.test.ts test/rebuild-stale-recovery.test.ts src/lib/actions/sandbox/rebuild-gateway-drift.test.tsGit hooks passed during commit and push, or
npx prek run --from-ref main --to-ref HEADpassesTargeted tests pass for changed behavior
Tests added or updated for new or changed behavior
Full
npm testpasses (broad runtime changes only)No secrets, API keys, or credentials committed
Docs updated for user-facing behavior changes
npm run docsbuilds without warnings (doc changes only)Doc pages follow the style guide (doc changes only)
New doc pages include SPDX header and frontmatter (new pages only)
Signed-off-by: Carlos Villela cvillela@nvidia.com
Summary by CodeRabbit
Refactor
Chores