Skip to content

Commit 451992e

Browse files
Juanpacolclaude
andcommitted
feat(experiments): domain-ambiguity pilot -- a fifth ceiling, for a new reason
Pilots 4-6 (ADR-0015, 0016, 0017) all used bugs with one answer derivable from the code, given enough reading, and all three ceilinged on success -- a capable model always found it eventually. This pilot changes the kind of difficulty entirely: a business-rule ambiguity the code cannot resolve at all. Fixture: billing/late_fee.py's bug is a one-line no-op, trivial to spot -- not the point. The real question is whether the exact day a grace period ends still counts as within grace (days_overdue > grace_days) or already overdue (days_overdue >= grace_days). Nothing in the code states this. The one visible test (days_overdue=20, grace_days=10) was deliberately chosen so both interpretations pass it identically; a second, hidden test (days_overdue == grace_days, never shown to any trial) is scored independently by the harness afterward against the fabricated phase-A decision, which states the real policy is inclusive. This is a genuine design change, not a harder version of the same bug: in pilots 4-6, careful reading always finds the one right answer. Here, no amount of reading the visible code finds it -- only the decision (recoverable via verity handoff) or an outside guess does. Result: fifth ceiling, 5/5 both conditions on the hidden boundary check. But for a new reason -- every naive trial independently wrote the strict `>` comparison with zero access to the decision and no prompt toward the boundary case at all. The ambiguity was real; "grace period" carries enough of a linguistic convention that the model's default matched the fabricated policy regardless of condition. That's a fact about this specific ambiguity and this model, not a flaw in the mechanism: it validates the hidden-test design (a real technique for scoring "correct for the right reason" vs "happened to pass") while showing this particular ambiguity had a dominant convention to fall back on. ADR-0019 proposes the next pilot use an ambiguity with no dominant convention -- a coin-flip shaped choice, not a language-shaped one. 520 tests passing (no source changes this phase). See docs/adr/0019-domain-ambiguity-pilot.md. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 065ab26 commit 451992e

14 files changed

Lines changed: 268 additions & 8 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,4 @@ Thumbs.db
9797
experiments/family_b_pilot_4_recovery_after_reset/trials/
9898
experiments/family_b_pilot_5_harder_recovery/trials/
9999
experiments/family_b_pilot_6_runtime_bug/trials/
100+
experiments/family_b_pilot_7_domain_ambiguity/trials/

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Claude Code sessions of this project (~3.48M tokens,
7070
| 30,000-token budget, ranked against the task | 56.7% | 100% | 100% |
7171

7272
**Family B — a model decides something, so every claim carries a noise
73-
floor.** Seven pilots, reported whatever they found:
73+
floor.** Eight pilots, reported whatever they found:
7474

7575
| Pilot | Question | Verdict |
7676
|---|---|---|
@@ -81,13 +81,15 @@ floor.** Seven pilots, reported whatever they found:
8181
| [0016](docs/adr/0016-harder-recovery-pilot.md) | Does a harder bug break that ceiling? | No. Cost effect reproduced and grew |
8282
| [0017](docs/adr/0017-runtime-bug-pilot.md) | Does changing the bug's *shape* break it? | No. Cost effect reproduced a third time |
8383
| [0018](docs/adr/0018-consistency-engine-first-measurement.md) | Does the Consistency Engine catch real hallucinations? | 100% recall on invented symbols; three real bugs found and fixed |
84+
| [0019](docs/adr/0019-domain-ambiguity-pilot.md) | Does an ambiguity *not derivable from code at all* break the ceiling? | No — but for a new reason: the model's naming convention matched the policy in 10/10 trials regardless of condition |
8485

85-
The honest summary of those seven: **recovery after a context reset
86+
The honest summary of those eight: **recovery after a context reset
8687
reliably makes an already-achievable outcome cheaper, and that is the most
8788
reproduced result here — but no design yet has shown it changes whether a
88-
capable agent succeeds at all.** Four consecutive ceilings across four bug
89-
designs is a finding about what these tasks can detect, and it is reported
90-
as such rather than buried.
89+
capable agent succeeds at all.** Five consecutive ceilings across five bug
90+
designs — including one where the answer genuinely isn't in the code — is
91+
a finding about what these tasks can detect, and it is reported as such
92+
rather than buried.
9193

9294
---
9395

docs/BENCHMARK_PROTOCOL.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,19 @@ the function in isolation, only found by tracing the actual sequence of
4646
calls, deliberately deterministic (no real race condition, to avoid
4747
contaminating the noise floor itself). Still a ceiling, the fourth in the
4848
series, 5/5 both conditions — but the cost effect reproduced a third time:
49-
`verity` (mean 4.2) below `naive`'s floor (`[7, 9]`). All six pilots' stated
50-
limits (small N, narrow task design, single fixture) still apply — see each
51-
pilot's own README before generalizing any result.
49+
`verity` (mean 4.2) below `naive`'s floor (`[7, 9]`). Family B, seventh
50+
pilot (`experiments/family_b_pilot_7_domain_ambiguity/`, ADR-0019), changed
51+
the difficulty's *kind* entirely: a business-rule ambiguity not derivable
52+
from the code at all (does the exact day a grace period ends still count
53+
as within grace?), with a visible test built so both interpretations pass
54+
it identically and a hidden test — never shown to any trial, scored
55+
independently — checking which one the fix actually implements. Fifth
56+
ceiling, 5/5 both conditions on the hidden check too, but for a new reason:
57+
every `naive` trial independently chose the interpretation matching the
58+
fabricated policy, with no access to it, because "grace period" carries a
59+
strong enough naming convention to override the genuine ambiguity. All
60+
seven pilots' stated limits (small N, narrow task design, single fixture)
61+
still apply — see each pilot's own README before generalizing any result.
5262

5363
Separately, the Consistency Engine (`consistency/`, ADR-0007) got its own
5464
first real measurement (`experiments/consistency_pilot_1_hallucination_

docs/MEASUREMENTS.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,30 @@ larger trial budget) to move — while the cost effect is now this project's
211211
most consistently reproduced Family B result, across three separate
212212
pilots and bug designs.
213213

214+
**A seventh pilot tried a fundamentally different kind of difficulty**
215+
(`experiments/family_b_pilot_7_domain_ambiguity/`, [ADR-0019](adr/0019-domain-ambiguity-pilot.md)):
216+
instead of a bug with one answer derivable from the code, a business-rule
217+
ambiguity the code cannot resolve at all — does the exact day a grace
218+
period ends still count as within grace? The one visible test was
219+
deliberately built so both interpretations (`>` and `>=`) pass it
220+
identically; a second, hidden test (never shown to any trial) checks which
221+
one the fix actually implements, scored independently by the harness:
222+
223+
| Metric | `naive` | `verity` | Verdict |
224+
|---|---|---|---|
225+
| Visible test passes (5 trials) | 5/5 | 5/5 | ceiling, as designed |
226+
| Correct at the hidden boundary (5 trials) | 5/5 | 5/5 | `indistinguishable_from_noise` |
227+
228+
A fifth ceiling — but for a new reason. Every `naive` trial independently
229+
chose the strict `>` comparison with no access to the fabricated decision
230+
and no prompt toward the boundary case at all. The ambiguity was real (no
231+
code states the policy), but "grace period" carries a strong enough
232+
linguistic convention that the model's default matched the fabricated
233+
policy regardless of condition. ADR-0019 keeps the hidden-test design —
234+
a real technique for scoring "correct for the right reason" versus
235+
"happened to pass" — and proposes the next pilot use an ambiguity with no
236+
dominant convention (a coin-flip-shaped choice, not a language-shaped one).
237+
214238
**The Consistency Engine got its own first real measurement**
215239
(`experiments/consistency_pilot_1_hallucination_detection/`, [ADR-0018](adr/0018-consistency-engine-first-measurement.md)),
216240
closing a stale claim in `BENCHMARK_PROTOCOL.md` that this engine was
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# ADR-0019: A fifth ceiling, but for a genuinely new reason
2+
3+
- **Status**: Accepted
4+
- **Date**: 2026-08-10
5+
- **Context**: pilots 4-6 (ADR-0015, 0016, 0017) all ceilinged on success
6+
because their bugs had one answer derivable from the code, given enough
7+
reading. The user asked whether recovery changes *outcome*, not just
8+
cost, on a bug where the answer genuinely is not in the code at all.
9+
10+
## Decision: an ambiguity the code cannot resolve, hidden from the visible test
11+
12+
`billing/late_fee.py`'s bug is a one-line no-op — trivial to spot. The real
13+
question is a business-rule ambiguity: does the day a grace period ends
14+
still count as within grace (`days_overdue > grace_days`) or already
15+
overdue (`days_overdue >= grace_days`)? Nothing in the code states this.
16+
The one visible test uses `days_overdue=20, grace_days=10`, chosen so both
17+
interpretations pass it identically — the divergence only shows up at
18+
`days_overdue == grace_days`, a case never shown to any trial. That case is
19+
scored by the harness afterward, independently, never by the agent's own
20+
report.
21+
22+
This differs from pilots 4-6 in kind, not degree: there, careful-enough
23+
reading always finds the one right answer. Here, no amount of reading the
24+
visible code finds it — only the fabricated phase-A decision (recoverable
25+
via `verity handoff`) states the real policy.
26+
27+
## Result
28+
29+
| Metric | naive | verity | Verdict |
30+
|---|---|---|---|
31+
| `visible_pass` (5 trials) | 5/5 | 5/5 | ceiling, as designed |
32+
| `boundary_correct` (5 trials) | 5/5 | 5/5 | `indistinguishable_from_noise` |
33+
34+
Every `naive` trial independently wrote the strict `>` comparison with no
35+
access to the decision and no prompting toward the boundary question —
36+
the same choice `verity` trials made after reading the decision explicitly.
37+
None of the naive trials' reasoning mentioned the boundary case at all;
38+
`>` reads as a strong default convention for "grace period" semantics.
39+
40+
## Consequences
41+
42+
- **A fifth ceiling, but a different finding than the first four.** Pilots
43+
4-6 ceilinged because the answer was derivable and a capable model always
44+
derived it. This pilot's answer was **not derivable from the code**, and
45+
the ceiling happened anyway — because the specific ambiguity chosen
46+
(grace-period inclusivity) has a dominant linguistic convention that
47+
happens to match the fabricated policy. That is a fact about this
48+
ambiguity and this model, not a flaw in the mechanism being tested: it
49+
says something true and useful (models have strong shared priors for
50+
common billing/contract conventions) but does not yet test what happens
51+
when no such prior exists.
52+
- **The design itself is validated and worth reusing.** A hidden test that
53+
the visible test cannot distinguish is a real technique for scoring
54+
"correct for the right reason" vs. "happened to pass" — the next pilot
55+
should keep this structure and change only the ambiguity's content, e.g.
56+
a tie-breaking rule between two conventions with no common default (a
57+
coin-flip-shaped choice, not a language-shaped one), or a numeric
58+
threshold with no natural-language framing at all.
59+
- Consistent with this project's standing practice: the fixture was
60+
verified by hand (both interpretations checked against both the visible
61+
and hidden test) before spending any trial budget, and the giveaway-text
62+
mistake from ADR-0016 was checked for and avoided from the start.

docs/adr/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ verdict was "this pilot could not have detected an effect."
3636
| [0016](0016-harder-recovery-pilot.md) | Does a harder bug break that ceiling? | No — third ceiling; cost effect reproduced and grew |
3737
| [0017](0017-runtime-bug-pilot.md) | Does changing the bug's *shape* break it? | No — fourth ceiling; cost effect reproduced a third time |
3838
| [0018](0018-consistency-engine-first-measurement.md) | Does the Consistency Engine catch real hallucinations? | 100% recall on invented symbols; three real bugs found and fixed |
39+
| [0019](0019-domain-ambiguity-pilot.md) | Does an ambiguity not derivable from code at all break the ceiling? | No — the model's naming convention matched the fabricated policy 10/10 regardless of condition |
3940

4041
## Pre-pivot (superseded)
4142

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Domain-ambiguity pilot: a fifth ceiling, for a genuinely new reason
2+
3+
Per `docs/BENCHMARK_PROTOCOL.md`'s Family B procedure. Pilots 4-6 (ADR-0015,
4+
0016, 0017) all used bugs with **one answer derivable from the code alone**,
5+
and all three ceilinged on success — a capable model, given enough time,
6+
always found it. This pilot changes the shape of the difficulty entirely: a
7+
bug whose correct fix depends on a **business-rule ambiguity the code
8+
cannot resolve at all**, deliberately designed so the one visible test
9+
cannot distinguish the two plausible answers.
10+
11+
**Status: complete, and it is a fifth ceiling — but for a new reason.**
12+
10/10 trials, both conditions, independently converged on the same
13+
(correct) interpretation of an ambiguity that genuinely wasn't in the code.
14+
15+
## The design
16+
17+
`fixture_repo/billing/late_fee.py`'s `apply_late_fee()` is a one-line
18+
no-op — trivial to spot, not the point. The real question: does the exact
19+
day a grace period ends (`days_overdue == grace_days`) still count as
20+
within grace, or is it already overdue? That's a policy choice
21+
(`days_overdue > grace_days` vs `days_overdue >= grace_days`), not
22+
something the surrounding code states anywhere.
23+
24+
The one visible test (`days_overdue=20, grace_days=10`) is unambiguously
25+
overdue under either interpretation — it was deliberately chosen so both
26+
fixes pass it identically. A second, **hidden** test
27+
(`days_overdue == grace_days`, never shown to any trial) is scored
28+
independently by the harness afterward: the fabricated phase-A decision
29+
states the real policy is inclusive (fee only applies when `days_overdue >
30+
grace_days`, strictly), so the correct answer at the boundary is "no fee."
31+
32+
This is structurally different from pilots 4-6: there, a careful-enough
33+
reading of the code always found the one right answer. Here, **no amount
34+
of reading the code finds it** — only the decision (recoverable via
35+
`verity handoff`) or an outside guess does.
36+
37+
## Phase A, conditions, scoring
38+
39+
Same shape as pilots 4-6 (`../lib/setup_phase_a.sh`): `naive` gets the bare
40+
task and no `.verity/`; `verity` gets a `.verity/` pre-loaded with the
41+
fabricated decision stating the inclusive-grace-period policy explicitly.
42+
5 live-agent trials per condition, Bash access, constrained not to touch
43+
`tests/`.
44+
45+
Two metrics, both scored independently by the harness, never from the
46+
agent's own report:
47+
- `visible_pass`: does the shown test pass? (sanity check, expected ~10/10)
48+
- `boundary_correct`: does `calculate_invoice({"subtotal": 1000.0,
49+
"days_overdue": 10, "grace_days": 10})` return `1000.0` (no fee, the
50+
correct policy) rather than `1020.0`?
51+
52+
## Result
53+
54+
| Metric | naive | verity | Verdict |
55+
|---|---|---|---|
56+
| `visible_pass` (5 trials) | 5/5 | 5/5 | ceiling, as designed |
57+
| `boundary_correct` (5 trials) | 5/5 | 5/5 | `indistinguishable_from_noise` |
58+
59+
Every one of the 5 `naive` trials independently wrote `days_overdue >
60+
grace_days` (strict) with no prompting toward the boundary question and no
61+
access to the decision — the same choice the `verity` trials made after
62+
reading it explicitly. None discussed the boundary case in their reasoning;
63+
`>` appears to be a strong default convention for "grace period" semantics
64+
regardless of whether the model was told the policy.
65+
66+
**This is a genuinely different finding from pilots 4-6's ceilings.** There,
67+
success ceilinged because the answer was in the code and a careful agent
68+
always found it. Here, the answer was *not* in the code — and the ceiling
69+
happened anyway, because the model's default convention for this
70+
particular kind of naming (`grace_days`, "grace period") happens to align
71+
with the fabricated policy. That is a fact about this specific ambiguity
72+
and this model, not evidence the design failed: a different, less
73+
linguistically-loaded ambiguity (e.g., an arbitrary tie-breaking rule with
74+
no common convention) might show a real split. Reproduce:
75+
76+
```bash
77+
./setup_phase_a.sh
78+
# run each of the 10 trials as a live agent per the design above
79+
verity noise-floor naive_results.json verity_results.json --metric boundary_correct
80+
```
81+
82+
## Known limitations of this pilot, stated up front
83+
84+
- **The chosen ambiguity had a dominant linguistic prior.** "Grace period"
85+
strongly suggests an inclusive boundary in common usage and probably in
86+
training data (real billing systems, contract language). A genuinely
87+
unresolvable ambiguity needs a convention with no dominant default — e.g.
88+
a tie-breaking rule between two equally common but incompatible
89+
approaches, or a numeric edge case with no natural-language framing at
90+
all.
91+
- **This was the cheapest possible test of the design**, not proof the
92+
mechanism can never show an effect. A harder version of this same idea
93+
(an ambiguity without a linguistic tell) is the natural next pilot.
94+
- **One fixture, one ambiguity, 5 trials per condition.** Same caveat as
95+
every prior pilot — see `docs/BENCHMARK_PROTOCOL.md` before generalizing.

experiments/family_b_pilot_7_domain_ambiguity/fixture_repo/billing/__init__.py

Whitespace-only changes.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
"""Invoice total calculation."""
2+
3+
from billing.late_fee import apply_late_fee
4+
5+
6+
def calculate_invoice(order: dict) -> float:
7+
return apply_late_fee(order["subtotal"], order["days_overdue"], order["grace_days"])
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
"""Late-fee calculation."""
2+
3+
FEE_RATE = 0.02
4+
5+
6+
def apply_late_fee(subtotal: float, days_overdue: int, grace_days: int) -> float:
7+
return subtotal

0 commit comments

Comments
 (0)