Skip to content

feat(common): add ExperimentalGCPPlanTerm to RecommendationParams - #402

Merged
cristim merged 1 commit into
mainfrom
feat/291-params-experimental-gcp-plan-term
Oct 13, 2026
Merged

cristim merged 1 commit into
mainfrom
feat/291-params-experimental-gcp-plan-term

Conversation

@cristim

@cristim cristim commented Oct 13, 2026

Copy link
Copy Markdown
Member

Adds only the RecommendationParams.ExperimentalGCPPlanTerm field (default false, EXPERIMENTAL doc comment). No behavior change: nothing reads it yet.

Split from #401 so providers/gcp can bump its pkg pin before consuming the field (standalone module CI builds with GOWORK=off). Refs #291.

🤖 Generated with Claude Code

Opt-in flag, default false, for the GCP Compute plan-derived CUD term
(go#291). Split from go#401 so provider modules can bump the pkg pin.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@cristim cristim added triaged Item has been triaged urgency/this-sprint Within the current sprint priority/p1 Next up; this sprint severity/high Significant harm impact/few Limited audience effort/s Hours type/bug Defect labels Oct 13, 2026
@coderabbitai

coderabbitai Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

  • Run on-demand review

This review includes 1 billable file and costs up to $0.25.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 4 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 61 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: LeanerCloud/cloud-commitments-go/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 680eee19-83b2-4519-a958-fd624073140c
📥 Commits

Reviewing files that changed from the base of the PR and between a4fc226 and 93b86c3.

📒 Files selected for processing: 1
  • pkg/common/types.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@cristim

cristim commented Oct 13, 2026

Copy link
Copy Markdown
Member Author

Gate verdict at head 93b86c33893dc52a760e7c589b905bc54de3e246 (base main a4fc226, up to date): PASS.

  • Diff is only pkg/common/types.go +5: the ExperimentalGCPPlanTerm bool field and a doc comment saying it is EXPERIMENTAL and that the default false keeps Term ("1yr"). Nothing reads it, so behavior is unchanged.
  • No unkeyed RecommendationParams{...} literals and no JSON marshalling of the params in the repo (git grep), so adding the field breaks no caller.
  • Local (GOTOOLCHAIN=go1.26.9, git archive at head): pkg GOWORK=off go vet + go test -race -short exit 0. With GOWORK=off, ci_cd_sanity_tests, providers/aws, providers/azure and providers/gcp all build against their current pins (exit 0). With replace pkg => ./pkg (simulating the future pin bump), each builds, vets and runs go test -short with exit 0.
  • CI: all checks green, mergeStateStatus CLEAN. Labels present.

@cristim
cristim merged commit 77bc8a9 into main Oct 13, 2026
15 checks passed
@cristim
cristim deleted the feat/291-params-experimental-gcp-plan-term branch October 16, 2026 14:14
cristim added a commit that referenced this pull request Oct 16, 2026
Moves providers/azure from pkg 3838efd to 4566498 so the module sees
common.Commitment.StartDateIsDay and the recfilter change from b69a17e.

pkg commits in between that touch packages azure imports:
b69a17e fix(recfilter): treat a date-only commitment start as any time that d...
498b74f feat(common): preserve proven commitment currency metadata (#410)
77bc8a9 feat(common): add ExperimentalGCPPlanTerm to RecommendationParams (#402)
6fd189f fix(recfilter): coverage drop reason, EC2 platform engine filter, mon...
9551cce fix(scorer): compute break-even so --max-break-even-months filters
e9a33bb feat(pkg): add recurring monthly cost to the audit record
cdcdc7f feat(common): add RecommendationParams.SPAccountScope (step 1 of 2)

Azure build and race tests pass on the bumped pin before any code change.

Refs #277

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cristim added a commit that referenced this pull request Oct 16, 2026
…duplicate guard (#453)

* build(azure): bump pkg pin to include the date-only start guard

Moves providers/azure from pkg 3838efd to 4566498 so the module sees
common.Commitment.StartDateIsDay and the recfilter change from b69a17e.

pkg commits in between that touch packages azure imports:
b69a17e fix(recfilter): treat a date-only commitment start as any time that d...
498b74f feat(common): preserve proven commitment currency metadata (#410)
77bc8a9 feat(common): add ExperimentalGCPPlanTerm to RecommendationParams (#402)
6fd189f fix(recfilter): coverage drop reason, EC2 platform engine filter, mon...
9551cce fix(scorer): compute break-even so --max-break-even-months filters
e9a33bb feat(pkg): add recurring monthly cost to the audit record
cdcdc7f feat(common): add RecommendationParams.SPAccountScope (step 1 of 2)

Azure build and race tests pass on the bumped pin before any code change.

Refs #277

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(azure): mark reservation purchaseDate as a calendar date

The reservations API returns purchaseDate as a date, so a reservation
bought late yesterday decoded to 00:00 UTC yesterday and fell outside the
24h duplicate guard. Set StartDateIsDay so the guard treats the instant as
anywhere in that day. Adds an SDK-decode regression through
DuplicateChecker with the real clock, and a partial-overlap test that
checks ResizeCount scales the recommendation costs.

Refs #277

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/s Hours impact/few Limited audience priority/p1 Next up; this sprint severity/high Significant 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