Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ when:
| FR-01-02 | Self-test | `report.py` "one changed and not committed is refused"<br>`report.py` "an amendment on a branch of its own is refused" |
| FR-01-03 | Self-test | `report.py` "a trial on another spec is refused"<br>`report.py` "a trial on another prompt is refused"<br>`report.py` "every trial on the registered spec passes"<br>`report.py` "every trial on the one prompt passes" |
| FR-01-04 | Self-test | `report.py` "a scorable trial recording no spec is refused"<br>`report.py` "a scorable trial recording no prompt is refused" |
| FR-01-05 | Self-test | `harness.py` "a spec edited mid-run refuses the next trial unbuilt"<br>`harness.py` "a spec changed as it is copied refuses the trial and frees its slot"<br>`harness.py` "a round-5 run on other content is refused"<br>`harness.py` "round 5's registered digest is SPEC.md's content" |
| FR-01-05 | Self-test | `harness.py` "a spec edited mid-run refuses the next trial unbuilt"<br>`harness.py` "a spec changed as it is copied refuses the trial and frees its slot"<br>`harness.py` "a round-5 run on other content is refused"<br>`harness.py` "round 6's registered digest is SPEC.md's content, and round 5's is another" |
| FR-01-06 | Self-test | `report.py` "a trial start with no UTC offset is refused" |
| FR-01-07 | Untestable | How a commit reached `main` is the owner's practice, and no script sees it. |

Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@
| -------- | -------- | ------- |
| Hidden suite | 534 build checks across 18 modules and 74 change checks, in the private `braboj/tariff-hidden-suite`. | QG-01-02 |
| Reference implementation | A build written from the spec alone, and the change task made on it from the change prompt alone. Private, beside the hidden suite. | QG-01-02 |
| Mutation control | Twelve spec violations, each planted alone in the reference implementation. | QG-01-02 |
| Mutation control | Fourteen spec violations, each planted alone in the reference implementation. | QG-01-02 |
| Control fixture | The judge's control trees, built by `control/control.py` from two pinned applications; see [validation](validation.md). | QG-01-03, QG-01-04 |
| Self-tests | Each script's `--self-test`, which plants the case each rule guards against. | QG-01-05, QG-05-01, QG-05-02, QG-06-01, QG-06-02, QG-07-01 |
| CI runners | `ubuntu-latest` and `windows-latest`, Python 3.12, stub agent CLIs that refuse to run. | QG-07-01, QG-08-02 |
Expand Down
11 changes: 7 additions & 4 deletions docs/validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,19 @@ support are in [requirements.md](requirements.md); the reasons are in

## The hidden suite

<!-- measured: 2026-09-24 -->
534 build checks across 18 modules and 74 change checks in
`braboj/tariff-hidden-suite`, validated before round 3's first trial.
<!-- measured: 2026-11-07 -->
544 build checks across 19 modules and 74 change checks in
`braboj/tariff-hidden-suite`, validated before round 3's first trial and
again on 2026-11-07, when round 6's two non-functional lines joined the
spec: a persistence module and eight refusal checks, graded on the
reference as it stood.
<!-- /measured -->

| Check | Result |
| ----- | ------ |
| A reference implementation written from the spec alone | Passes every build check |
| The change task made on it from the change prompt alone | Passes every change check, and the build suite still |
| Twelve spec violations, each planted alone | All twelve caught |
| Fourteen spec violations, each planted alone | All fourteen caught |
| The pre-round-3 reference, with no sign-in | Fails the sign-in module |

## Trial bounds
Expand Down
4 changes: 4 additions & 0 deletions tests/efficacy/SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ other decision is yours.
- The rendered HTML must be valid.
- `import tariff` must work without Flask installed and without touching
the database. The pricing engine does not depend on the web application.
- Data survives a restart: whatever was saved is still there when the
application is started again on the same database file.
- Errors say what went wrong: an answer that refuses input names the field
it refuses, whether it re-renders the form or answers 400.

## 2. Money

Expand Down
27 changes: 21 additions & 6 deletions tests/efficacy/harness.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@
# specifications in one round without a trace in its verdicts.
ROUND5_SPEC = ("normal",
"48ee93ff968ef4a3175408c349afd6ce7223d0f3bd25b49ad4521f0fc307e55e")

# Round 6's specification: round 5's plus the two non-functional lines a team
# would write, data surviving a restart and errors naming the field, each
# graded by the hidden suite. Round 5's arms keep their own content above and
# are re-run only from the benchmark at their commit.
ROUND6_SPEC = ("normal",
"a99e19ac006605d06af214552de1ce5a3f0f5c4b087f1a461acb8d3f3b869a5f")
ROUND5_ROOTS = ["backend-api", "backend-auth", "backend-database",
"frontend-ux", "base-security", "base-data-governance"]

Expand Down Expand Up @@ -3483,8 +3490,10 @@ def spec_checks():
round5 = ["none", "inline", "hybrid", "reference", "skills"]
name, registered = ROUND5_SPEC
checks = [
("round 5's registered digest is SPEC.md's content",
spec_digest(SPECS[name]) == registered),
("round 6's registered digest is SPEC.md's content, and round 5's "
"is another",
spec_digest(SPECS[name]) == ROUND6_SPEC[1]
and registered != ROUND6_SPEC[1] and len(registered) == 64),
("a round-5 run on the registered spec passes",
spec_problem(round5, name, registered) is None),
("a round-5 run on other content is refused",
Expand All @@ -3499,9 +3508,14 @@ def spec_checks():

# The spec edited after the run started: the next trial is refused before
# its workspace is laid out, so nothing is built from the new content.
# The planted run registers the file as it stands, since round 5's
# registered content is no longer the file's: each refusal below must then
# come from the edit, named as such, not from the registration.
scratch = tempfile.mkdtemp(prefix="efficacy-spec-")
original = SPECS[name]
registration = ROUND5_SPEC
try:
globals()["ROUND5_SPEC"] = (name, spec_digest(original))
edited = os.path.join(scratch, "SPEC.md")
with io.open(original, "rb") as source, io.open(edited, "wb") as out:
out.write(source.read() + b"\nOne more line.\n")
Expand All @@ -3514,8 +3528,8 @@ def spec_checks():
try:
run_trial("none", 2, root, scratch, options)
refused = False
except TrialError:
refused = True
except TrialError as error:
refused = "not the content" in str(error)
except Exception:
refused = False
checks.append(("a spec edited mid-run refuses the next trial unbuilt",
Expand All @@ -3536,8 +3550,8 @@ def edited_in_flight(*args, **kwargs):
try:
run_trial("none", 3, root, scratch, options)
refused = False
except TrialError:
refused = True
except TrialError as error:
refused = "not the content" in str(error)
except Exception:
refused = False
finally:
Expand All @@ -3546,6 +3560,7 @@ def edited_in_flight(*args, **kwargs):
"frees its slot", refused and os.listdir(root) == []))
finally:
SPECS[name] = original
globals()["ROUND5_SPEC"] = registration
shutil.rmtree(scratch, ignore_errors=True)
return checks

Expand Down
22 changes: 19 additions & 3 deletions tests/efficacy/judge.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
"round 4, weaker",
"5347f551a4c8a351731a2e846bf90700ea84f066d6fa8a7126e4d1eba194798d":
"round 4, thin",
"48ee93ff968ef4a3175408c349afd6ce7223d0f3bd25b49ad4521f0fc307e55e":
"rounds 5 to 5e",
}

# The paragraph round 5 added to both specifications. Taking it out again
Expand All @@ -64,6 +66,16 @@
b"variable `TARIFF_SECRET_KEY`, which is set and non-empty wherever the\n"
b"application runs.\n")

# The two lines round 6 added to the specification's constraints. Taking them
# out again gives back the text rounds 5 to 5e ran, which the self-test
# proves is registered.
ROUND6_LINES = (
b"- Data survives a restart: whatever was saved is still there when the\n"
b" application is started again on the same database file.\n"
b"- Errors say what went wrong: an answer that refuses input names the "
b"field\n"
b" it refuses, whether it re-renders the form or answers 400.\n")

# The model each CLI judges with. The rounds' judge comes from another
# vendor than every builder, so it never scores its own vendor's code. The
# other CLI stays available to re-read an earlier round, whose readings are
Expand Down Expand Up @@ -1047,11 +1059,12 @@ def spec_checks(scratch):
current = spec_text(SPEC)
earlier = b"# tariff, as an earlier round specified it\n"
thin = spec_text(THIN_SPEC)
round4 = current.replace(SECRET_KEY_PARAGRAPH, b"")
round5 = current.replace(ROUND6_LINES, b"")
round4 = round5.replace(SECRET_KEY_PARAGRAPH, b"")
round4_thin = thin.replace(SECRET_KEY_PARAGRAPH, b"")
planted = {"current": current, "thin": thin,
"crlf": current.replace(b"\n", b"\r\n"),
"earlier": earlier,
"earlier": earlier, "round5": round5,
"round4": round4, "round4-thin": round4_thin,
"edited": current + b"\nAlso build a blog.\n",
"missing": None}
Expand Down Expand Up @@ -1105,8 +1118,11 @@ def refused(label):

# A replaced specification stays registered, or every tree built
# against it is refused as edited and can never be judged again.
("rounds 5 to 5e's trees are judged against the spec they ran",
round5 != current and judged_against("round5", round5)
and built["round5"][0]["spec"]["round"] == "rounds 5 to 5e"),
("round 4's trees are judged against the spec they ran",
round4 != current and round4_thin != thin
round4 != round5 and round4_thin != thin
and judged_against("round4", round4)
and built["round4"][0]["spec"]["round"] == "round 4, weaker"
and judged_against("round4-thin", round4_thin)
Expand Down
Loading