Skip to content
Skip to main content
Novel Systems home
Decision log
D-056August 5, 2026

A floor is not a lock, and the badge has to say which one it is

Decided

The at-floor margin message reads *"At the 50.0% floor. The target moves up from here, not below it."* It read *"Locked at the 50.0% margin floor."* until today.

Affects: lib/cpq-engine.ts (assessMargin), rendered on /platform/cpq and in the homepage sandbox

What the problem was. That sentence renders directly beneath a target-margin slider with a visible, draggable range. A reader saw a badge saying *locked* above a control that plainly is not, and had to conclude that one of the two was lying to them. On a page whose entire argument is that the arithmetic can be checked, a visible self-contradiction in the margin panel is the most expensive place on the site to have one.

Why it was not a bug in the engine. Nothing was wrong underneath. resolveMargin in lib/trade-profiles.ts applies max(requested, floor) when the floor is engaged: the slider raises the target and the floor catches it on the way down. That is what a floor is, and it is the right behaviour. The defect was that the sentence described the floor's effect at exactly one slider position — the bottom — as though it described the whole control.

The alternative that was rejected. Removing the slider, or clamping its minimum to the floor so it could not be dragged below. That would have removed the feature the panel exists to demonstrate. resolveMargin returns an engaged flag precisely so the UI can say *"you asked for 22%, the floor held it at 28%"*; a slider that cannot be dragged below the floor can never produce that sentence, and the guardrail becomes invisible in the act of working.

What would have to change for this to be wrong. If the floor ever became genuinely fixed — a contractual rate rather than a minimum — "locked" would become the accurate word and this entry should be reversed.