test(recommendations): cover expiry through command output by cristim · Pull Request #2143 · LeanerCloud/cloud-commitments-cli · GitHub
Skip to content

test(recommendations): cover expiry through command output - #2143

Merged
cristim merged 1 commit into
mainfrom
codex/go70-cli-expiry-command
Oct 7, 2026
Merged

cristim merged 1 commit into
mainfrom
codex/go70-cli-expiry-command

Conversation

@cristim

@cristim cristim commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Reopening of #2134 (closed unmerged when its base branch codex/go70-cli-expiry-consumer was deleted after #2133 merged). Same branch, retargeted at main. Original: test(recommendations): cover expiry through command output. Needs a rebase onto main to absorb #2133 and #2135.

Summary by CodeRabbit

  • Tests
    • Expanded coverage for EC2 reservation-expiry reporting, including demand availability, reservation timing, account filtering, and coverage thresholds.
    • Added checks for CSV results, totals, warnings, and cloud-service request handling.
    • Updated completeness checks to use service-appropriate validations for EC2, RDS, and other supported services.

@cristim cristim added triaged Item has been triaged priority/p1 Next up; this sprint severity/medium Moderate harm urgency/this-sprint Within the current sprint impact/many Affects most users effort/s Hours type/bug Defect labels Oct 7, 2026
@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Exercise pool demand, missing demand, filtering and exact boundaries
through the existing root-command, TLS SDK and CSV test harness.
Assert counts, costs, warnings and the bounded request allowlist.

This verification layer depends on the consumer prerequisite and uses
synthetic provider responses. Real-scenario acceptance and final
dependency repins remain outstanding.

Refs LeanerCloud/cloud-commitments-go#70.
@cristim

cristim commented Oct 7, 2026

Copy link
Copy Markdown
Member Author

Rebased onto main at 65a02a7. Final head: ef3a2dc.

The old stack contained the parent expiry fix and its dependency-pin commit. The parent fix is now merged. The only rebase conflict was the older Azure dependency pin in go.mod/go.sum; retained main's newer 56555e1 pin, so the redundant pin commit dropped. All three command-test files were retained unchanged (range-diff confirms the test patch is identical). No dependency diff remains.

Finding disposition: #2134 had a skipped review and #2143 had a rate-limited review, with no actionable findings or inline comments to fix, dismiss, or defer. A green CodeRabbit status for the rate-limited pass was not a completed review.

Fresh macOS verification at this head: formatting, go vet ./..., go build -o /private/tmp/cudly-cli2143-codex ./cmd, and go test ./cmd/... -count=1 passed. The command tests exercise the actual root command, SDK requests and CSV output against synthetic loopback TLS fixtures. Real-account acceptance remains required and unverified. No merge is performed; the separate reviewer retains all merge decisions and the exact claude-opus-5-5 final-SHA review gate remains open.

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cristim

cristim commented Oct 7, 2026

Copy link
Copy Markdown
Member Author

CodeRabbit completed the review at ef3a2dc: the walkthrough lists all three changed files, exact source/covered SHA matches this head, and says no actionable comments were generated. The CodeRabbit commit status says Review completed; there are no inline comments.

Disposition: no actionable, stale or out-of-scope findings. The automated docstring-coverage suggestion is dismissed because these unexported test helpers are covered by the owner's sparing-comments convention (default to no comments), and adding documentation solely for a coverage percentage would add unrelated prose. No code change or duplicate review request is needed.

Local verification is recorded above. Actions CI remains watched. Exact claude-opus-5-5 independent review at this head and real-account acceptance are still separate open gates; this is not a merge authorization.

@cristim

cristim commented Oct 7, 2026

Copy link
Copy Markdown
Member Author

Final implementation handoff at ef3a2dc: both watched workflows completed successfully:

Fresh gh pr checks reports all workflow checks passing; standalone Trivy/gosec annotations are neutral/skipped, while the workflow Security Scanning job passed. CodeRabbit completed exact-head coverage with zero actionable/inline findings; the docstring suggestion disposition is recorded above. PR is OPEN, CLEAN and MERGEABLE in GitHub. Local worktree is clean and tracks the published head. Watch state is pushed-cr-clean; both CI watchers and the CodeRabbit watcher reached terminal states.

No additional source changes or fix commits were necessary after recovering the session. All original files and worktrees remain preserved. The implementation assignment is handed off without merging. Exact claude-opus-5-5 final-SHA independent review and real-account acceptance remain required; synthetic command fixtures do not satisfy either gate.

@cristim

cristim commented Oct 7, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review completed on exact head ef3a2dc076f73466babad2fc5e762f038ba76a6b by a separate Codex reviewer. Two passes: no actionable findings. Review traced the real root-command path through filtering, coverage, expiry sizing and CSV output, and checked pinned shared/AWS source rather than trusting this PR's claims.

Independent realistic local command verification passed all six TestReservationExpiryCommand scenarios (totals 36/18/6/36/8/6). An additive baseline with the pre-fix CLI helper reproduced the missing-demand failure: old output had 0% coverage and 8/account, total 24; reviewed code retained 60% coverage and 2/account, total 6. Other five baseline scenarios passed. This proves the CLI regression while retaining current dependency pins. Fixtures use synthetic credentials, isolated config and an operation allowlist that rejects purchase calls. No live-cloud acceptance or purchase was performed; live-account behavior remains a coverage gap.

CodeRabbit completed review of all three files on this exact head with no actionable findings (run c8aad556-56b4-4a8e-bb72-472d79f34f3f). CR was not waived. Exact-head CI Build & Test run 37644729390 and pre-commit run 37644729417 succeeded.

Owner's current override permits independent available-model review and realistic local verification, superseding the prior exact-model and mandatory live-account gates. Merge still requires adequate current local verification, unchanged reviewed head, freshly green CI, clean mergeability and ordinary branch protections.

Local full-suite reliability investigation: initial unchanged full suite passed, but later runs encountered unrelated GCP signal timing failures and synchronous test-output pipe blocking. Unchanged focused GCP signal tests passed three repetitions and a race run; unchanged CSV cap test passed under race. Ancillary AWS calls escaping mocks are tracked in #2148. Full-suite resource-contained re-verification remains in progress; this comment does not claim that latest full-suite gate is green.

@cristim

cristim commented Oct 7, 2026

Copy link
Copy Markdown
Member Author

Final local verification is green on unchanged reviewed head ef3a2dc076f73466babad2fc5e762f038ba76a6b:

GOTOOLCHAIN=go1.26.6 GOGC=10 GOFLAGS=-p=1 HTTP_PROXY=http://127.0.0.1:1 HTTPS_PROXY=http://127.0.0.1:1 NO_PROXY=localhost,127.0.0.1,::1 AWS_EC2_METADATA_DISABLED=true go test -short ./... -count=1 -timeout=20m

Exit 0, cmd package 383.064s. All standard local tests retained; no source overlay or test-specific exclusions. Reduced build concurrency and more frequent GC are resource containment, not a proven root-cause fix. Earlier unrelated signal timing/pipe-capture failures remain honestly recorded; current focused signal race and CSV-cap race tests passed unchanged. CI's exact-head unit and integration suites are also green. No live-account or purchase acceptance was performed.

Ready for ordinary owner-authorized SHA-guarded merge after immediately refreshing exact head, CI and clean mergeability. CodeRabbit actually completed, so there is no waived-review debt.

@cristim
cristim merged commit bfdb4f6 into main Oct 7, 2026
12 checks passed
@cristim

cristim commented Oct 7, 2026

Copy link
Copy Markdown
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/s Hours impact/many Affects most users priority/p1 Next up; this sprint severity/medium Moderate harm triaged Item has been triaged type/bug Defect urgency/this-sprint Within the current sprint

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant