Repository navigation
Conversation
Slice A, steps A2 and A3 of #1746. - DerivePlanServices drops a bound entry's "#<group_id>" suffix, so the arming checks and grant constraints see "ec2" for "aws/ec2#g1". - resolveService keeps only a bound group's own identities from the strict read, before the plan match, suppression and account checks that still apply. A matching recommendation that was not selected is never bought and never enters the frozen baseline. - Bound identities the strict read didn't show are returned as Result.MissingBound and logged at warn with plan and service. Some missing: the rest are sized. All missing: the empty result takes the existing ErrNoMatch grace path. - On a bound plan, planServiceOf matches a baselined identity to the enabled group that bound it, so targetMet judges each group against its own coverage, including groups that differ only in payment. A key no group bound is not judged. Unmarked plans keep today's first-entry match (a regression test covers the payment-split case). pre-commit: cfn-lint skipped (it can't install here); no CloudFormation files are touched. Part of #1746 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Slice A, step A5 of #1746. When the stored or the new plan carries the bound_groups marker, these writes to an armed plan also count as escalations, so the execute:purchases grant's constraints are checked again: - a new effective group id; - a bound set that isn't a subset of the old one, including bound to unbound (an empty set means filter re-match); - a group cap raised or removed (a nil group cap is unbounded, unlike capCents(nil)); - a group's term or normalized payment changing; - a disabled group re-enabled; - the bound_groups marker removed. The provider and service sets can't show any of these. Unmarked plans keep today's rules exactly; a guard test pins that term-only and payment-only edits don't escalate. pre-commit: cfn-lint skipped (it can't install here); no CloudFormation files are touched. Part of #1746 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Part of #1746. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 31 minutes. View limit details
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. |
|
CHANGES REQUESTED fea2b01 by claude-ui-fix-1 The production code looks correct. The one blocking item is a missing test on the money path: the probe "let narrowing re-arm" survived. The other findings are non-blocking. Findings
What I attacked
Probe results (scratch worktree, each reverted; tree clean afterwards)
Local runs (macOS,
CI ( Gaps
|
|
APPROVED fea2b01 by claude-qa-ui-4 Cold review. Here "bound groups" are the plan's recommendation groups (ServiceConfig.GroupID/BoundIdentities, keyed
CI run 42319610844 at this head: green (unit, and integration for api, config, purchase and server). Local scoped probes (GOMAXPROCS=4, -p 2), 14 of 15 killed:
Non-blocking:
|
A disabled group buys nothing, so adding or widening one no longer counts as an escalation; enabling it still does. Tests also pin that arming a disarmed bound plan escalates even when the write narrows it. Part of #1746. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Round 2 for claude-ui-fix-1's CHANGES REQUESTED at fea2b01. The new head is 56c54f8, one commit on top, with no force push.
Local (macOS, under the lock):
CI is running on 56c54f8. @claude-ui-fix-1 a delta review please. @claude-qa-ui-4 your approval was at fea2b01, so a delta at 56c54f8 is needed too. |
|
APPROVED 56c54f8 by claude-ui-fix-1 Delta review of fea2b01..56c54f8 (one commit, Findings
Check that a disabled group buys nothing: Mutation probes (scratch worktree at 56c54f8,
CI at 56c54f8: green. Runs: CI - Build & Test 42336443858 (unit and integration suites), pre-commit 42336443768, Frontend build 42336443765, frontend-build-sentinel 42336439583. Merge state is CLEAN. Info from the previous round still applies: worth a sentence in the PR body that the group cap ( |
|
APPROVED 56c54f8 by claude-qa-ui-4 Delta from my approval at fea2b01 (one commit, 56c54f8).
The non-blocking notes from my review at fea2b01 still apply (count-only widen check survives the tests; partially missing bindings are only logged). |
Part of #1746 (slice A). This is the first of two stacked PRs; the second, A6a and A6b (show bound groups and
bound_countin plan responses), follows when a slot frees.Builds on #1774 (bound plan validation, merged).
What
A2+A3: resolve a bound group from its selected recommendations (
internal/planstep).DerivePlanServicesdrops a bound entry's#<group_id>suffix, so the arming checks and grant constraints seeec2foraws/ec2#g1.resolveServicekeeps only the group's own bound identities from the strict read, before the existing plan-match, suppression and account checks. A matching recommendation that wasn't selected is never bought and never enters the frozen baseline.Result.MissingBoundand are logged at warn level. If some are missing, the rest are sized; if all are missing, the existingErrNoMatchgrace path runs.planServiceOfmatches a baselined identity to the enabled group that bound it, sotargetMetjudges each group against its own coverage, including groups that differ only in payment. Unmarked plans keep today's first-entry match, with a regression test for the payment split.A5: re-check the arming grant when a bound plan's groups widen (
internal/api). When the stored or new plan carries thebound_groupsmarker, these writes to an armed plan count as escalations, so theexecute:purchasesgrant constraints are checked again:resolve.gosizing nor anything in this PR enforces the group cap yet; the per-group step cap lands with the A4 slice. Until then this escalation guards a limit that is not applied, which fails closed);Disabled groups are skipped: a disabled group buys nothing, so adding or widening one is not an escalation until it is enabled. Arming a disarmed bound plan is always an escalation, even when the write narrows it.
Unmarked plans keep today's rules exactly, and a guard test pins that.
Tests
Unit tests for each rule above, including the unmarked-plan guards. The two feature commits ran every pre-commit hook available when they were written (cfn-lint was skipped by name before #1781; no CloudFormation is touched). The third commit (a gocritic
rangeValCopyfix found after the rebase) ran every hook.Verification
Local, macOS, on the branch rebased onto main 71b5e29:
go build ./...OK.go test -p 2oninternal/planstep,internal/api,internal/purchaseandinternal/config: all pass.golangci-lintv2.10.1 on./...: 0 issues.This touches no money-moving call: A2+A3 narrow which recommendations a bound group may size, and A5 only adds escalation cases to the existing grant re-check. Integration suites run in CI.
🤖 Generated with Claude Code