Repository navigation
refactor(config): add RampSchedule.CumulativePercent (631 C0) - #860
Conversation
…mp-progress definition GetCurrentCoverage now derives from it so later per-step sizing and the coverage figure cannot drift apart. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Warning Review limit reached
This review includes 2 billable files and costs up to $0.50.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 12 minutes for your next included review. View limit details
Comment |
Gate verdict: CHANGES REQUESTED at 31a11caFinding (internal/config/types.go:291-292):
C0 is specified as a pure refactor whose proof is equivalence, so this is a behavior change on a function that feeds ramp sizing. Impact today is nil: func (r *RampSchedule) GetCurrentCoverage(baseCoverage float64) float64 {
if r.Type == "immediate" {
return baseCoverage
}
return baseCoverage * r.CumulativePercent(r.CurrentStep) / 100
}With that change applied locally, the differential harness reports 0 differences. Evidence (local,
Not merged. Re-gate after the fix. |
GetCurrentCoverage returned base*100/100 for immediate schedules, which is not exact in floating point. Return the base unchanged as before. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Gate verdict: APPROVED at 6d16bbdThe earlier finding is fixed. Evidence (local,
Evidence type: unit-level differential and fixture tests. There is no real-account path to exercise, because the change has no production caller. |
Scope
C0 of platform#631 (cumulative ramp sizing). Adds
RampSchedule.CumulativePercent(step)(min(100, step*PercentPerStep); 100 for immediate) and makesGetCurrentCoveragecall it, so there is one definition of cumulative ramp progress. No behavior change: nothing else calls the new method yet. Refs #631.Evidence
go test ./internal/config: the existingTestRampSchedule_GetCurrentCoveragetable stays green (equivalence), plus new tests forCumulativePercent(immediate, step 0, cap at 100, custom 3x40) and a no-drift test.🤖 Generated with Claude Code