Skip to content

context-budget: correct the "deltas add" claim in both homes and finish the per-bucket additivity reporting #3863

Closed

Description

@kyle-sexton

This was generated by AI during triage.

Parent

Refs #3356, cluster 1: finding H2, plus the unimplemented half of H1. The parent's plan names this the item to land first.

Re-verified against current main (2026-09-06)

The plugin has advanced several patch versions since both the audit and the plan. Re-checked rather than assumed:

  • H2 is still live, in both homes, worded almost identically. The skill body still states unconditionally that the measure is compositional and that deltas add, so a basket of trims can be priced from its members. The lever catalogue's entry for the same lever independently asserts that deltas are additive and a basket prices from its members. Neither carries any qualification.
  • H1's saturation guard is present and correct. The bucket-saving computation now detects vanished buckets and returns a null saving rather than a synthesized zero, with a source comment stating that callers must publish it as incomparable and never coerce it to zero. The verification path consumes it and attaches a reason. That half is done.
  • H1's per-bucket half remains unimplemented, as the plan recorded.

What to build

1. Correct the additivity claim in both homes

The measured truth is more specific than either claim: prefix-side deltas do not add; deferred-side deltas do. The audit's evidence is strong and does not depend on the saturation bug that H1 fixed. On three non-saturated readings the prefix side showed at least 956 tokens of double-counting, while the deferred side was exact to the token, with twelve savers summing precisely and a three-tool basket predicting its measured result exactly.

Both homes must be corrected in the same change. This repository treats a fact duplicated across two surfaces as a defect in its own right, so fixing one and leaving the other is not a partial improvement, it is the same defect with a new instance. The corrected wording must say which side composes and which does not, rather than merely softening the claim into vagueness: "may not always add" would be true and useless, and would leave an operator no better able to predict a basket.

Note also that the audit established the skill-frontmatter-subtraction hypothesis is dead, confirmed one-to-one. Do not resurrect it as an explanation.

2. Report additivity per bucket

The data is already present on every per-tool row; nothing new needs measuring. Report additivity per bucket rather than as a single verdict over the whole reading, so a consumer can see that one side composes and the other does not, which is exactly what the corrected claim now tells them to expect.

3. Stop reporting a boolean where the answer is unmeasured

The overall additivity verdict is still a boolean computed from a comparability flag, so an incomparable reading surfaces as a definite "not additive" rather than "not measurable". The information is not lost, since it rides alongside in the comparability flag and the attached reasons, but a consumer reading only the verdict is told something false. Make the unmeasured case distinguishable from the measured-negative case in the verdict field itself.

Acceptance criteria

  • Neither the skill body nor the lever catalogue asserts unqualified additivity.
  • Both state which side composes and which does not, specifically enough to predict a basket, and they agree with each other.
  • Additivity is reported per bucket, sourced from data already on the per-tool rows with no new measurement pass.
  • An incomparable reading is distinguishable from a measured-non-additive one in the verdict itself, not only in adjacent fields.
  • A test covers the incomparable case and asserts the verdict is not the same value as a measured negative.
  • The saturation guard's existing behavior is unchanged; it is correct and is the foundation this builds on.
  • scripts/affected-tests.sh --run selects and passes the suites mapped to the changed files.

Out of scope

  • Re-litigating the saturation guard, which is fixed.
  • The remaining findings in the parent, which need per-finding re-verification first.
  • Changing how any delta is measured. This corrects what is claimed and reported about measurements, not the measurements.

Blocked by

None. Can start immediately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.status: readyTriaged, unblocked, and fully specified; eligible to pick up.

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions