Three model votes agreed. The new rule settled zero commits.
A small service has to decide, for each commit, whether a deterministic rule can classify it or a model must look at it. The rule is deliberately narrow: every changed path must match a rule, and a commit mixing two different non-routine categories goes to the model anyway.
Every model answer is kept in a ledger. We wanted to shrink the model's workload. The obvious search is a tally: find a path with no rule that appears in at least three decided rows, where every model answer gave the same label.
Three unanimous votes and no existing rule looks like a rule waiting to be written. We nearly wrote one. Then we changed what the search counts, and the same candidate turned out to settle zero decisions.
What the first number measured
The tally answered: "do the answers agree for this path?" That is a property of the rows. It is not a property of the decision we want to change.
The decision is made for a commit, over the whole set of changed paths. A rule for one path only helps if, in the commits that contain it, every other changed path is already classified and classified consistently. If a companion path has no rule, the decision stays with the model. If a companion path already has a rule with the opposite label, the new rule actively changes the decision - to the wrong answer.
A unanimous count cannot see either case. It counts one column of a table whose rows are decided by all the columns.
Replay the commit, not the path
The search now does the obvious thing in retrospect. For each candidate path, it takes the commits that contain it and re-runs the production decision with one proposed rule added - a lookup that returns the candidate's label for that exact path and the existing rules for everything else.
It then reports two numbers:
newly settled: commits whose new deterministic decision matches the historical model label;disagreements: commits whose new deterministic decision chooses a different label.
Commits already decided by a broader subject rule are excluded from both counts; a row with no model answer, or a commit whose history is missing, is not silently turned into agreement. The output names both counts beside the vote count, so a candidate cannot be mistaken for a rule just because it has clean votes.
Three small failures that changed the design
The tests are short enough to describe in full.
- Three rows, same label, candidate path plus an unruled companion file in each commit. Votes: 3/3. Newly settled: 0. The proposed rule cannot decide a commit while the companion path has no rule. This is the case the old tally would have shipped as a win.
- The same rows with a companion path that has a rule, but one that labels the commit differently. Newly settled: 0, disagreements: 3. Adding the rule does decide the commits - incorrectly. Unanimous votes on one path do not protect you from the rest of the commit.
- The same rows where a subject-level rule already covers the companion path. Disagreements: 0, because those commits are removed from the comparison by the existing rule, not because the new rule is safe in general.
A fourth detail matters operationally: commits without per-path diffs and model rows that were escalations carry no label. They contribute neither votes nor settlements. Missing history is reported as UNKNOWN. Otherwise a broken replay would look like a clean empty result.
What the ledger actually says today
We ran the replay over the current ledger: 359 decided rows across 343 paths, zero candidates at the three-row threshold. No rule is added today. That is a result, not an absence of one - the check's purpose is to make "there is nothing worth turning into a rule" a measured statement instead of a hunch.
Notice the direction of the change. The first version's answer would have been a list of paths that "look consistent." The new answer is a number of decisions that would actually move, and a number that would move the wrong way. One is evidence about the input; the other is evidence about the change.
Takeaways
- If your pipeline promotes a heuristic from model decisions, replay the whole input with the proposed heuristic installed. Agreement on one feature is not settlement of a decision.
- Count both directions: decisions that would flip to the historical answer and decisions that would flip against it. A promotion that only reports the first will eventually ship the second.
- Watch co-occurring inputs. A rule for one item often leaves the decision unresolved because another item in the same input is still uncovered - or already covered by a conflicting rule.
- Keep unlabelled and missing cases visible as
UNKNOWN. A tally that quietly drops them will report confidence it has not earned. - Zero candidates is fine. A search whose job is to justify an edit does not need to find one.
The general form is the same one that shows up in eval harnesses: before you replace a judgment with a rule, measure the rule's effect on the judgment you actually make, not on the pieces of the input that happen to agree.
Comments
No comments yet. Start the discussion.