Skip to main content

DISABLED_MARKER

Constant DISABLED_MARKER 

Source
const DISABLED_MARKER: &str = "[improv:formula-disabled]";
Expand description

The reserved leading marker in [Measure::description] that flags a derived measure’s formula as disabled — the reference’s cleared ✓ (see docs/reviews/2026-09-22-gui-reconstruction-plan.md Step 2).

Disabling is a model-level fact, not GUI state: it must survive save and reload, and the engine must honor it. Two properties chose this representation over the alternative (flipping the measure to Input and stashing its formula somewhere):

  • The formula is never moved or re-encoded. A disabled measure stays MeasureKind::Derived(f), so its formula persists through the store’s existing :measure/formula attribute, and re-enabling is exact. Stashing it as text instead would have to survive formula_dsl returning None for shapes the v1 grammar cannot spell — those formulas would be destroyed by a disable/enable cycle.
  • One bit, on the measure it describes. The marker rides :measure/description, which the store already reads and writes, so it round-trips with no schema change; and because it lives on the measure, deleting or renaming that measure carries the flag with it (a side table keyed by MeasureId would need garbage collection).

A user-written description is preserved verbatim after the marker; see split_marker / join_marker.

The engine honors it via engine_model, which flattens disabled measures to Input in the model handed to Engine::new, so derived_build_order stops traversing them and every dependent recomputes without them — which is exactly what clearing the checkmark means.

ponytail: a reserved prefix in description is a sidecar in a user-visible field (the CLI prints descriptions), and it is what a GUI-only change can persist. Promote it to a real Measure.enabled: bool plus a :measure/enabled store attribute (serde/schema default true, so existing databases keep loading) as soon as core_model/storage_mentat can be touched in the same change; split_marker, join_marker and formula_disabled are the only three places that would move.