Add offline unit specs for eight untested lib/ files (#379)#414
Conversation
New offline-capable specs (no CPLN_ORG, no cpln binary, no HTTP): - spec/core/shell_spec.rb for lib/core/shell.rb - spec/core/controlplane_api_spec.rb for lib/core/controlplane_api.rb - spec/command/update_github_actions_spec.rb for lib/command/update_github_actions.rb - spec/core/doctor_service_spec.rb for lib/core/doctor_service.rb - spec/core/helpers_spec.rb for lib/core/helpers.rb - spec/command/test_spec.rb for lib/command/test.rb - spec/command/staging_branch_validation_spec.rb for lib/command/staging_branch_validation.rb - spec/core/github_flow_readiness/checks_spec.rb for lib/core/github_flow_readiness/checks.rb Also adds the new specs to the documented offline smoke suite in spec/README.md. The ninth file listed in issue #379, lib/command/terraform/import.rb, already has an offline spec (spec/command/terraform/import_spec.rb); the issue's audit missed it, so no new spec is added for it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 43 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR adds offline unit coverage for eight previously untested library files. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (1): Last reviewed commit: "Add offline unit specs for eight unteste..." | Re-trigger Greptile |
ReviewReviewed the diff ( OverviewAdds offline unit coverage for previously-untested Code quality / correctness
Minor observations (non-blocking)
Security / performanceNo concerns — this PR touches only spec files, no production code, no new external calls, and no secrets/credentials are involved. Overall: well-scoped, correctly verified against source, and follows the established offline-spec conventions. No blocking issues found. |
|
CI triage — RSpec (Fast) failure is pre-existing, not from this diff The 13 failed examples ( Evidence it's environmental:
This is the live-env regression tracked by the slow-suite lane (#409 / #413). Marking this PR |
|
Follow-up to the triage above: root cause was the shared CI org's |
Closes #379.
Adds offline unit specs for eight previously-untested
lib/files (114 new examples, spec-only — no production code changes):spec/core/shell_spec.rbspec/core/controlplane_api_spec.rbspec/command/update_github_actions_spec.rbspec/core/doctor_service_spec.rbspec/core/helpers_spec.rbspec/command/test_spec.rbspec/command/staging_branch_validation_spec.rbspec/core/github_flow_readiness/checks_spec.rbAll specs run offline (no
CPLN_ORG, no live org, nocplnbinary): the only mocked seam is the network/CLI boundary (ControlplaneApiDirect#call,Shell,TemplateParser), following thespec/command/delete_unit_spec.rbpattern.spec/README.md's documented offline suite list updated to include the new files.Codex Decision Log
lib/command/terraform/import.rbwas the ninth.spec/command/terraform/import_spec.rbalready exists and existed at the audit commit (7c96df9, added in Terraform feature support #251). Audit error in the issue.git cat-file -e 7c96df9:spec/command/terraform/import_spec.rb.minimum_coverageafter this merges.spec/command/test_spec.rbasserts the intentionally-empty debug stubCommand::Test#callreturns nil.Confidence
rubocop spec/: no offenses (121 files).RSPEC_RETRY_COUNT=1).Batch: CPFLOW B 07-16 15:43 (
cpf-b-20260716-1543), lane issue379, epic #387.🤖 Generated with Claude Code