What broke
The promotion gate could roll back a recipe the owner had set by hand
The stock app's promotion gate decided it "owned" a setting because an old row of its own had the same value. That meant it could undo a recipe Henning had set by hand. Now the newest config-change row decides who owns a setting, and stacking a change on top of a recipe needs a stated basis.
The short version
What went wrongThe gate decided it owned a setting because one of its own old rows had the same value, so it treated Henning's hand-set recipe as its own and could have rolled it back.
How we found itThe weekly review on 8 November saw the gate block another dial for a recipe it claimed to have set, and the recipe was one bad week from rollback.
The rule nowThe newest config-change row that touched the key decides ownership, whatever its source. An older row with the same value proves nothing about who owns it now.
This post documents something Claude got wrong. The claim rests on a commit or a file, not on memory. All of Claude's mistakes
The stock app has a promotion gate. Every Sunday it measures a set of “dials”, which are candidate config changes, against the live configuration (called LIVE). A dial that passes its requirement in two batches with separate time windows can be promoted onto LIVE. The gate can also roll back a dial it promoted earlier if that dial later measures worse.
One rule was supposed to keep the gate in check: it only rolls back dials it set itself. If the owner sets something by hand, the gate leaves it alone. The code said so. The implementation did something else.
The history of one recipe
The setting involved is what the project calls “the recipe”: a signal matrix that uses three sources together (valuation, insight and ML).
- 4 October: the gate promoted the recipe onto LIVE.
- 25 October: the gate rolled it back.
- 31 October, 09:02: Henning chose to put it back by hand through the config CLI.
The value Henning set was the same one the gate had promoted on 4 October. That turned out to matter.
How the weekly review found it
On Sunday 8 November Claude did the weekly review. It was a read-only sweep and no code was changed. The review’s notes recorded two things about the gate (batch of 52 rows that day):
- A different dial, a source-weighted matrix, had passed both batches with separate windows (18 October: +0.30 / +3.37; 8 November: +3.37 / +1.30, requirement “non-inferior”). It should have been promoted. The gate answered that it had already set the recipe, and that it only promotes one change at a time.
- The recipe itself failed that day on the standard matrix: +0.65 / −3.17. The rollback rule needs two bad Sundays in a row. One more week below −0.5 and the gate would have rolled the recipe back on Sunday 15 November.
In plain terms, the gate treated Henning’s hand-set recipe as its own promotion. That blocked everything else, and the gate was one bad week away from undoing a choice the owner had made deliberately.
The cause: value read as ownership
To decide whether it owned a setting, the gate searched its own rows in the config-change log for one that had set the current value. It found the 4 October promotion and stopped looking. It never checked who made the latest change. Henning’s row from 31 October came later and came from the CLI, but because the value matched, the gate’s old row “won”.
The project’s error-class register now lists this as class 32, “the value read as ownership”. The entry puts it in the same family as two earlier classes: booking time read as event time (class 8), and direction hidden in the payload (class 27). In each case an attribute that looks the same (here the value) is read as evidence of something else (who set it, and when).
The code is Claude’s, so this was Claude’s mistake. The comment and the documented intent said “set by hand, the gate doesn’t touch it”. The function that decided ownership did not implement that.
There was a second, smaller mistake on the same day. In its report Claude had written that the gate would promote the source-weighted dial the next Sunday. The fix commit says that sentence was wrong by the gate’s own rules, and corrects it. The dial had been measured on the standard matrix, not on top of the recipe, so the combination had never been measured.
What changed
Henning read the review and replied that he would follow Claude’s recommendations. Claude made the fix the same morning. The project’s replay documentation records three rules from 8 November:
| Question | Rule |
|---|---|
| Who owns a dial on LIVE? | The newest row in the config-change log that touched the dial’s keys, whatever its source. If it is the gate’s row, the gate owns it and may roll it back. If it is the owner’s row, the dial counts as set by hand, even when the value matches an old promotion. |
| Stacking | A promotable dial on LIVE blocks promotion of any dial measured without it, whoever set it. The gate’s reason now says “set by hand” or “gate-set”, and that the combination has to be measured first. |
| Building on a hand-set recipe | A dial with a stated basis equal to what LIVE runs. Then the combination is measured. “Promotable” together with a basis is now allowed, but only when LIVE actually runs that basis. |
Before this, a test asserted that no dial could be both promotable and have a basis. That test was rewritten. It now says the only dial with both is the source-weighted matrix, and that its basis has to be LIVE’s recipe.
That new dial is the source-weighted matrix measured on top of the recipe, requirement non-inferior. Its first measurement is 15 November. Because promotion needs two batches whose windows are 21 days apart, 6 December is the earliest it can be promoted.
The dry run after the fix gave the answer the gate should have given in the first place: the source-weighted dial passed, but it was measured without the recipe that is set by hand on LIVE, so the combination has to be measured first.
The ownership function is now a pure, tested function. One test covers this exact case: the owner set the value back after the gate’s rollback, so it counts as set by hand. The gate tests went from 13 to 20, and the full suite of 1,429 tests passed.
What this did not break
Part of the old behaviour was right by accident. Blocking the source-weighted dial was correct, because that dial had never been measured together with the recipe. The fix keeps the block and gives it the right reason. The only thing removed is the gate’s claim to own something it did not set.
No rollback happened. The review caught it a week before the earliest possible date.
The rule
Ownership and cause are decided by the newest event that touched the field, whatever its source. An older event from the “right” source that happens to have the same value proves nothing about who owns the field now.
The error-class register also adds a detection query for this: for each key on LIVE, take the latest source. If that source is not the gate, the gate does not own the key.