PLT-464: regression fence — profiles parse + legacy default path#52
PLT-464: regression fence — profiles parse + legacy default path#52bdchatham wants to merge 2 commits into
Conversation
… (PLT-464) CI fence for the additive-by-construction promise: glob every profiles/*.json and assert it resolves through the binary's real settings path (LoadSettings/ResolveSettings/Validate), and that a no-new-fields config resolves to the legacy default (ArrivalModelClosedLoop, distributions nil) — the resolution stage that gates main's open-loop branch. Asserts against the DefaultSettings()/ArrivalModelClosedLoop constants, not literals. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PR SummaryLow Risk Overview Every
Reviewed by Cursor Bugbot for commit 95fa12a. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3374877. Configure here.
|
|
||
| if probe.Settings.ArrivalModel != "" || probe.Settings.MaxInFlight != nil { | ||
| return true | ||
| } |
There was a problem hiding this comment.
Legacy fence skips explicit defaults
Medium Severity
usesNewFields treats any present arrivalModel string or maxInFlight JSON key as opting in, including values that only restate legacy defaults (closed_loop, default max-in-flight). Those profiles skip TestProfilesNoNewFieldsResolveToLegacyPath, so the CI fence no longer checks arrival model or nil distributions for them and can hit checked == 0 if every profile documents defaults explicitly.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 3374877. Configure here.
…m review) settings_test.go's inline 18-flag block now calls registerSettingsFlags — a single source of truth, so the flag set can't drift between the two tests (the very drift this fence exists to catch). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>


Implements PLT-464 (M1.6) — a CI fence for the additive-by-construction promise.
What
A config-package test (
config/regression_fence_test.go, run bymake test/CI — no manual step):profiles/*.jsonand asserts each resolves through the binary's real settings path (LoadSettings→ResolveSettings→Validate, the viper merge where additive defaults apply) — strictly stronger than the existing raw-unmarshalprofiles_test.go.ArrivalModelClosedLoop, distributions nil — the resolution that gates main'sopenLoopbranch. Asserted againstDefaultSettings()/the constant, not literals.All 8 shipped profiles parse + resolve; a falsification probe confirmed the legacy assertion has teeth (an
open_loopconfig survives asArrivalModelOpenLoop).Verify
make verifygreen (lint-pin + lint 0 issues + test + build + --help + bindings in sync).🤖 Generated with Claude Code