From 24271bee2b00175330ec8690578de4690bfc09ba Mon Sep 17 00:00:00 2001 From: Branimir Georgiev <66906831+braboj@users.noreply.github.com> Date: Sun, 15 Nov 2026 20:02:13 +0200 Subject: [PATCH 1/6] feat(efficacy): round 6's ISO targets read each suite module and the quality probes - The report loads `quality-scores/` beside `security-scores/` and reads each probe as a `quality:` target: a lost probe fails, a missing one is not measured. - Functional correctness reads one target per hidden-suite build module, met only where the module passed whole (nothing failed, errored or skipped); a module absent from a trial's report is not measured. - Each pass-or-fail quality probe is a target in its sub-characteristic; the latency reads `LATENCY_CUTOFF_MS`, unset until calibrated, so it is not measured until then. - A pilot round read by the ISO radar keeps the targets it had before round 6; `--round6-targets`, with `--iso`, reads round 6's instead, and is refused anywhere else. - `archive.py` archives `quality-scores/` with the other readings. - Requirements gain FR-12-19 to FR-12-21 and the new QT rows; coverage, chapter 8 and ADR-023's history follow. Refs #155, #119. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DpT5xQh3AgRFs2tJwMT4g3 --- docs/architecture/08-crosscutting-concepts.md | 18 + docs/coverage.md | 5 +- docs/decisions/023-the-iso-radar.md | 1 + docs/requirements.md | 29 +- tests/efficacy/archive.py | 13 +- tests/efficacy/report.py | 421 +++++++++++++++--- 6 files changed, 419 insertions(+), 68 deletions(-) diff --git a/docs/architecture/08-crosscutting-concepts.md b/docs/architecture/08-crosscutting-concepts.md index e09e3e6..e157ff0 100644 --- a/docs/architecture/08-crosscutting-concepts.md +++ b/docs/architecture/08-crosscutting-concepts.md @@ -622,6 +622,24 @@ interval of the difference against `none` lies past the axis's margin each radar, shown and not scored, and the appendix holds one table of sub-scores per axis. The decision is ADR-023. +Round 6's targets read three sources the pilot's did not (FR-12-19 to +FR-12-21): + +- **Hidden-suite modules.** Functional correctness has one target per build + module, met where the module passes whole: no check failed, errored or + skipped. A module missing from a build's report is not measured. The + sub-characteristic is still one share among three on its axis, however + many modules it holds. +- **Quality probes.** Each pass-or-fail probe is one target: fault + tolerance, availability, capacity, resource use, co-existence and + portability. A lost probe fails; a missing one is not measured. +- **Latency.** Its target reads a cutoff calibrated from the reference + build and a planted slowdown, frozen before round 6 registers. Until then + it is not measured. + +A pilot round read by the ISO radar keeps the targets it had before round 6, +and reads round 6's only when `--round6-targets` asks for them. + **Each approach in plain words** (FR-12-07): - What it did better and worse than `none`, by radar axis. diff --git a/docs/coverage.md b/docs/coverage.md index 21983b6..6b71242 100644 --- a/docs/coverage.md +++ b/docs/coverage.md @@ -181,6 +181,9 @@ when: | FR-12-16 | Self-test | `report.py` "an ISO-read arm's verdict is worse on an axis worse, better on one better with none worse, and no clear gain otherwise"
`report.py` "the plain words name the axes behind an ISO-read verdict"
`report.py` "the summary's axis table of an ISO-read run is the ISO radar's, marked as the chart is" | | FR-12-17 | Self-test | `report.py` "the ISO screen drops an arm worse on an axis, ranks the rest by axes better and then by cost, and keeps four"
`report.py` "an axis no target measures neither holds nor moves the ISO screen"
`report.py` "an axis that lists targets but has no reading yet holds the ISO screen"
`report.py` "the ISO screen names the arms round 6 runs and the axis that put one out" | | FR-12-18 | Self-test | `report.py` "a pilot round read by the ISO radar is only a draft, never in or under docs/reports/, and keeps its aggregate beside the registered one"
`report.py` "a pilot round read by the ISO radar says it is post hoc and that its axes decide"
`report.py` "a run read by the ISO radar refuses a cross-check, whose withheld rows its markers would still count" | +| FR-12-19 | Self-test | `report.py` "the report loads a trial's quality reading beside its security reading"
`report.py` "a lost quality probe reads failed, a missing one not measured"
`report.py` "the latency target is not measured until its cutoff is registered, then met within it" | +| FR-12-20 | Self-test | `report.py` "a module passes whole only where no check failed, errored or was skipped"
`report.py` "a module absent from a trial's report is not measured, and correctness is the share of the modules that ran" | +| FR-12-21 | Self-test | `report.py` "a pilot round read by the ISO radar keeps the targets it had before round 6, unless round 6's are asked for"
`report.py` "round 6's targets are refused where no pilot draft reads them" | ## 13 Records and archive @@ -188,7 +191,7 @@ when: | -- | ---- | ---------- | | FR-13-01 | Self-test | `harness.py` "the record is written as every trial starts and ends"
`harness.py` "every trial records the CLI's version, read as it starts" | | FR-13-02 | Self-test | `generate_arm.py` "every built arm's file has its generation record beside it"
`report.py` "a pilot arm no script builds keeps its record for the report, and its vendored templates" | -| FR-13-03 | Self-test | `archive.py` "readings, judgings, map and lock come; bundles do not"
`archive.py` "the original tarball's hash is recorded"
`archive.py` "the revisions are recorded"
`archive.py` "a reading changed in the archive fails the verify" | +| FR-13-03 | Self-test | `archive.py` "readings, judgings, map and lock come; bundles do not"
`archive.py` "quality readings are archived beside the security readings"
`archive.py` "the original tarball's hash is recorded"
`archive.py` "the revisions are recorded"
`archive.py` "a reading changed in the archive fails the verify" | | FR-13-04 | Self-test | `archive.py` "a reading changed after the stamp is a problem"
`archive.py` "the report refuses docs/reports/ without a current stamp"
`report.py` "a report into any docs/reports needs the stamp" | | FR-13-05 | Self-test | `archive.py` "the restored root reads as the original does"
`archive.py` "a restored record points at the restored tarball and void"
`archive.py` "a restored transcript keeps its time" | | FR-13-06 | Self-test | `generate_arm.py` "the two map arms name the same moments in the chain's order"
`generate_arm.py` "the reading map names every template of the chain once, under docs/solid-ai-templates/"
`generate_arm.py` "each template skill is its template verbatim, named by the manifest"
`generate_arm.py` "a chain file the manifest does not describe is refused" | diff --git a/docs/decisions/023-the-iso-radar.md b/docs/decisions/023-the-iso-radar.md index 965907b..65d19dd 100644 --- a/docs/decisions/023-the-iso-radar.md +++ b/docs/decisions/023-the-iso-radar.md @@ -89,3 +89,4 @@ split; `#N` is in this repository; a dash means none. | ---- | ------ | --- | ----- | | 2026-11-04 | From round 6 the radar reads ISO/IEC 25010:2023: eight axes, the share of targets met, markers past a margin, cost above | The pilot's radars read the benchmark's rows, not the software's qualities; the spike in #118 settled the chart | #121 | | 2026-11-14 | Rule 10 and alternative E: from round 6 the verdict in the text reads the radar's markers, as ADR-024 decides | Round 5e read by the radar showed the verdict and the chart disagreeing | #165 | +| 2026-11-15 | Round 6's targets: one per hidden-suite build module for correctness, one per quality probe, latency against a cutoff registered later; a pilot round's draft keeps its own | Round 5e read by the radar showed Functionality, Performance and Flexibility at 100 % for every arm | #155, #119 | diff --git a/docs/requirements.md b/docs/requirements.md index cd82648..0de7c8d 100644 --- a/docs/requirements.md +++ b/docs/requirements.md @@ -191,6 +191,9 @@ | FR-12-16 | From round 6 the benchmark shall give each approach its verdict from the ISO radar's axes: Yes where an axis is better and none worse, Worse where any is worse, No where none moved; and the summary's axis table shall be the ISO radar's. | Report | | FR-12-17 | The benchmark shall screen round 6's candidates on the ISO radar's axes: out on an axis worse, the rest ranked by axes better and then by mean cost, the top four kept; an axis no target measures shall neither hold nor move it, and an axis that lists targets but has no reading yet shall hold it. | Report | | FR-12-18 | The benchmark shall read a pilot round by the ISO radar only as a draft that says it is post hoc, never under `docs/reports/`, and keep its aggregate beside the registered one; a run read by the ISO radar shall take no cross-check. | Report | +| FR-12-19 | From round 6 the benchmark shall load each trial's quality reading beside its security reading and read each quality probe as an ISO target: a lost probe fails, a missing one is not measured, and the latency target is not measured until its cutoff is registered. | Report | +| FR-12-20 | From round 6 the benchmark shall read functional correctness as one target per hidden-suite build module, met only where every check in it ran and passed, and not measured where the trial's report lacks the module. | Report | +| FR-12-21 | The benchmark shall read a pilot round by the ISO radar with the targets it had before round 6, and by round 6's only where asked, refusing that request where no pilot draft would read it. | Report | ### 13 Records and archive @@ -311,15 +314,23 @@ is the mean of the judge's three readings on its 1 to 5 scale. - **Fixed:** before round 6's first trial, for this app; a change is a new registration. -- **Read from:** the scorer's row, the probe, or the judge's row the target - reads; a build the reading did not reach is not measured, never a fail. +- **Read from:** the scorer's row, the probe, the hidden-suite module, or the + judge's row the target reads; a build the reading did not reach is not + measured, never a fail. A probe the build itself kept from running is lost, + and fails. +- **Pilot drafts:** a pilot round read by the ISO radar keeps the targets it + had before round 6: the hidden suite at 98 % or more for correctness, and + no quality probe. Round 6's are read there only when asked for. +- **Later:** interoperability and the migration targets come with the + changed tree's scoring. The export formats take no target of their own: + the hidden suite's export modules grade them. ### 01 Functional suitability | ID | Sub-characteristic | Target | Read from | | -- | ------------------ | ------ | --------- | | QT-01-01 | Functional completeness | Every name the specification requires is exported. | Specified names missing | -| QT-01-02 | Functional correctness | The hidden suite passes at 98 % or more. | Hidden-suite pass rate | +| QT-01-02 | Functional correctness | Each of the hidden suite's 19 build modules passes whole, one target per module: every check ran and passed, none failed, errored or skipped. A module missing from a build's report is not measured. | Hidden suite, per module | | QT-01-03 | Functional appropriateness | Nothing nobody asked for is delivered. | Artifacts nobody asked for | ### 02 Performance efficiency @@ -328,6 +339,15 @@ | -- | ------------------ | ------ | --------- | | QT-02-01 | Resource utilisation | The invoice builder answers in 100 KB or less. | Invoice builder response size | | QT-02-02 | Resource utilisation | The invoice builder makes at most 3 subrequests. | Invoice builder subrequests | +| QT-02-03 | Time behaviour | The 95th-percentile latency, the worse of two repeats, is within the cutoff registered before round 6; not measured until one is. | Quality probe `latency_p95_ms` | +| QT-02-04 | Resource utilisation | A page's SQL statements do not grow with an invoice's lines. | Quality probe `n_plus_one` | +| QT-02-05 | Capacity | An invoice of 500 lines is kept, shown and exported whole. | Quality probe `capacity_500_lines` | + +### 03 Compatibility + +| ID | Sub-characteristic | Target | Read from | +| -- | ------------------ | ------ | --------- | +| QT-03-01 | Co-existence | Two instances side by side keep their data and files apart. | Quality probe `coexistence` | ### 04 Interaction capability @@ -343,6 +363,8 @@ | QT-05-01 | Faultlessness | The build installs and boots. | Installs and boots | | QT-05-02 | Faultlessness | At most 10 type errors per KLOC under `mypy --strict`. | Type errors per KLOC | | QT-05-03 | Fault tolerance | A malformed request leaks no stack trace. | Probe `error_leakage` | +| QT-05-04 | Availability | Concurrent writes all land, none refused for a lock. | Quality probe `concurrent_writes` | +| QT-05-05 | Fault tolerance | A malformed request never answers a server error. | Quality probe `fuzz_robustness` | ### 06 Security @@ -396,3 +418,4 @@ | ID | Sub-characteristic | Target | Read from | | -- | ------------------ | ------ | --------- | | QT-08-01 | Installability | `pip install .` succeeds in a clean environment. | Installs in a clean environment | +| QT-08-02 | Adaptability | The build installs and serves a signed-in page on a second Python. | Quality probe `python_portability` | diff --git a/tests/efficacy/archive.py b/tests/efficacy/archive.py index 29d1a3e..09050a8 100644 --- a/tests/efficacy/archive.py +++ b/tests/efficacy/archive.py @@ -35,7 +35,7 @@ # The scoring area's per-trial readings the report aggregates, each a JSON # file named for its trial. -READINGS = ("scores", "scores-change", "security-scores") +READINGS = ("scores", "scores-change", "security-scores", "quality-scores") # What a frozen workspace holds that no reading needs and any scoring # rebuilds: tool caches, compiled bytecode, and every virtual environment, @@ -384,7 +384,8 @@ def plant_tarball(path, name, extra=()): def plant_root(scratch): """A round with two build trials, one change trial, one voided attempt - and its re-run, scored, judged, read for security and archived nowhere.""" + and its re-run, scored, judged, read for security and quality, and + archived nowhere.""" root = os.path.join(scratch, "round") area = scoring_area(root) started = datetime.datetime(2026, 10, 1, 12, 0, 0) @@ -434,8 +435,11 @@ def plant_root(scratch): "w", encoding="utf-8") as handle: handle.write('{"token": "planted-secret"}') + # Each reading the scoring area holds, named here rather than taken from + # what the archive copies, so a kind it stops copying shows. for name, arm in (("none-1", "none"), ("hybrid-1", "hybrid")): - for kind in READINGS: + for kind in ("scores", "scores-change", "security-scores", + "quality-scores"): dump_json(os.path.join(area, kind, "%s.json" % name), {"name": name, "arm": arm, "trial": 1, "suite_revision": "suite1"}) @@ -490,6 +494,9 @@ def self_test(): "scoring/scores-change/none-1.json", "scoring/judge/T1.json", "scoring/judge/map.json", "scoring/tool-lock.txt"} <= set(files) and not any("bundle" in key for key in files)), + ("quality readings are archived beside the security readings", + {"scoring/quality-scores/none-1.json", + "scoring/quality-scores/hybrid-1.json"} <= set(files)), ("a voided directory is kept as a marker", manifest["voided"] == ["hybrid-1-2026-10-01T11-00-00"] and os.path.isfile(os.path.join(into, "void", manifest["voided"][0], diff --git a/tests/efficacy/report.py b/tests/efficacy/report.py index 975436e..b11616e 100644 --- a/tests/efficacy/report.py +++ b/tests/efficacy/report.py @@ -15,6 +15,7 @@ """ import argparse +import contextlib import datetime import fnmatch import glob @@ -605,7 +606,7 @@ def load(root): scores = json.load(handle) trials[canonical(scores["name"])] = { "scores": scores, "judge": None, "judgings": [], "change": None, - "security": None} + "security": None, "quality": None} # A completed judging stands over any other record of the same trial, # such as a dry run's or a failed attempt's left beside it. A trial judged @@ -634,13 +635,16 @@ def load(root): if name in trials: trials[name]["change"] = change - for file in sorted(glob.glob(os.path.join(area, "security-scores", - "*.json"))): - with io.open(file, encoding="utf-8") as handle: - security = json.load(handle) - name = canonical(security.get("name") or "") - if name in trials: - trials[name]["security"] = security + # The security and quality readings each sit beside their trial's score, + # one file a trial, named for it. + for kind, key in (("security-scores", "security"), + ("quality-scores", "quality")): + for file in sorted(glob.glob(os.path.join(area, kind, "*.json"))): + with io.open(file, encoding="utf-8") as handle: + reading = json.load(handle) + name = canonical(reading.get("name") or "") + if name in trials: + trials[name][key] = reading return trials @@ -1741,7 +1745,7 @@ def write_report(root, trials, table, results, seed, out_dir, "solid-ai-benchmark repository.") lines.append("") if iso and is_round5(trials): - lines.extend([POSTHOC_ISO_NOTE, ""]) + lines.extend(posthoc_iso_lines(iso)) if k < FEWEST_DECIDING: lines.append("**Every interval below is descriptive.** At K = %d no " "arrangement of paired differences reaches conventional " @@ -2132,6 +2136,20 @@ def vector_lines(results, active): "describes the round and decides nothing; the round's own report keeps " "its verdicts.") +# Said beside it where the draft reads round 6's targets, not the pilot's. +POSTHOC_ROUND6_NOTE = ( + "It reads round 6's targets, one per hidden-suite module and one per " + "quality probe, which no pilot round was built against.") + + +def posthoc_iso_lines(iso): + """The note opening a pilot round read by the ISO radar, naming round + 6's targets where it reads them.""" + if iso[3] == ISO_AXES: + return [POSTHOC_ISO_NOTE + " " + POSTHOC_ROUND6_NOTE, ""] + return [POSTHOC_ISO_NOTE, ""] + + # What the verdict looks at in a run read with the ISO radar, whose axes # decide. PLAIN_ISO_VERDICT_RULE = ( @@ -2403,7 +2421,7 @@ def plain_report_lines(root, trials, table, results, radar, appendix, k, % (times(runs, [arm for arm in runs if arm != BARE]), times(runs, [BARE]), BARE, BARE), ""] if iso and is_round5(trials): - lines.extend([POSTHOC_ISO_NOTE, ""]) + lines.extend(posthoc_iso_lines(iso)) if radar: for theme, image in sorted(radar.items()): lines.append("![Radar per approach](%s#gh-%s-mode-only)" @@ -2518,7 +2536,7 @@ def appendix_lines(trials, table, results, k, seed, generation, report, lines.extend(iso_axis_lines(trials, iso[0], [BARE] + by_cost(table, [ pair[0] for pair in against]), - iso[1], iso[2], k)) + iso[1], iso[2], k, iso[3])) else: lines.extend(["", "## The radar's axes, row by row", "", "Each table is one axis of the radar: every " @@ -3711,7 +3729,8 @@ def iso_screen(trials, table, iso): # would hold it for good, so it does not. rows.append({"arm": arm, "unread": [axis for axis, move in moves - if move is None and iso_targeted(axis)], + if move is None + and iso_targeted(axis, iso[3])], "worse": [axis for axis, move in moves if move == -1.0], "better": sum(1 for _, move in moves if move == 1.0), "cost": arm_mean(table, "cost_usd", arm), @@ -3719,9 +3738,12 @@ def iso_screen(trials, table, iso): return screen_ranked(trials, rows, missing) -def iso_targeted(axis): - """Whether any sub-characteristic of an ISO axis lists a target.""" - return any(targets for _, targets in dict(ISO_AXES)[axis]) +def iso_targeted(axis, axes=None): + """Whether any sub-characteristic of an ISO axis lists a target with a + registered threshold, in `axes` or else round 6's table.""" + return any(threshold is not None + for _, targets in dict(axes or ISO_AXES)[axis] + for _, _, _, threshold in targets) def screen_ranked(trials, rows, missing): @@ -4509,7 +4531,7 @@ def stamped(kind, message_id, uuid, *blocks): ("Maintainability", "lazyref", "better"), ("Maintainability", "reference", "worse")): axes["iso:" + axis]["%s-none" % arm]["verdict"] = verdict - iso = ({}, axes, ()) + iso = ({}, axes, (), pilot_axes()) iso_rows, missing = round6_screen(held, table, results, iso) iso_ranks = {row["arm"]: (row["rank"], row["round6"], row["worse"]) for row in iso_rows} @@ -4546,7 +4568,7 @@ def stamped(kind, message_id, uuid, *blocks): in by_label.items()} for key, by_label in axes.items()} for contrast in pending["iso:Security"].values(): contrast["verdict"] = "not computed" - pending_iso = ({}, pending, ()) + pending_iso = ({}, pending, (), pilot_axes()) pending_rows, _ = round6_screen(held, table, results, pending_iso) pending_text = "\n".join(screen_lines(held, table, results, pending_iso)) checks.append(("an axis that lists targets but has no reading yet holds " @@ -5743,37 +5765,73 @@ def radar_panels(table, results, active): return panels +# The hidden suite's build modules, one target each from round 6. A module +# passing whole is one part of the specification delivered; a pass rate over +# every check lets a build fail one part outright and still clear its bar. +HIDDEN_MODULES = ( + "test_api_contract.py", "test_rules_validation.py", + "test_pricing_line.py", "test_pricing_invoice.py", + "test_pricing_allocation.py", "test_pricing_tax.py", + "test_pricing_refusals.py", "test_worked_example.py", + "test_http_routes.py", "test_http_validation.py", "test_http_preview.py", + "test_http_signin.py", "test_http_customers.py", "test_export_json.py", + "test_export_csv.py", "test_seed.py", "test_persistence.py", + "test_nojs.py", "test_browser.py", +) + +# The latency's cutoff in milliseconds, the worse repeat's 95th percentile. +# It is calibrated from the reference build's repeats and a planted slowdown, +# then frozen here before round 6 registers; until then the latency target +# is not measured, never met and never failed. +LATENCY_CUTOFF_MS = None + # The quality radar on ISO/IEC 25010:2023, from round 6. Eight axes in the # standard's own order, each the share of its targets met, read against the # bare arm. Safety, the ninth characteristic, does not apply to this backend. # Each sub-characteristic lists its targets as (what it asks, where the value -# comes from, the pass condition): a metric row by its key, or a probe by -# `probe:`. A target is met, not met, or not measured, and a -# sub-characteristic with no target reads not measured, never 0 %. +# comes from, the pass condition): a metric row by its key, a security probe +# by `probe:`, a quality probe by `quality:`, or a hidden-suite +# module by `suite:`. A target is met, not met, or not measured, and a +# sub-characteristic with no target reads not measured, never 0 %. This is +# round 6's table; a pilot round read by the radar keeps its own, below. AT_LEAST, AT_MOST = ">=", "<=" ISO_AXES = ( ("Functionality", ( ("Functional completeness", ( ("every specified name is exported", "surface_missing", AT_MOST, 0),)), - ("Functional correctness", ( - ("the hidden suite passes at 98 % or more", "task_success", - AT_LEAST, 0.98),)), + + # The export formats are graded by the suite's export modules, so + # they take no target of their own here. + ("Functional correctness", tuple( + ("%s passes whole" % module, "suite:" + module, AT_LEAST, 1.0) + for module in HIDDEN_MODULES)), ("Functional appropriateness", ( ("nothing nobody asked for is delivered", "unasked_artifacts", AT_MOST, 0),)), )), ("Performance", ( - ("Time behaviour", ()), + ("Time behaviour", ( + ("the 95th-percentile latency is within the registered cutoff", + "quality:latency_p95_ms", AT_MOST, LATENCY_CUTOFF_MS),)), ("Resource utilisation", ( ("the invoice builder answers in 100 KB or less", "builder_bytes", AT_MOST, 100000), ("the invoice builder makes at most 3 subrequests", - "builder_subrequests", AT_MOST, 3),)), - ("Capacity", ()), + "builder_subrequests", AT_MOST, 3), + ("a page's SQL statements do not grow with an invoice's lines", + "quality:n_plus_one", AT_LEAST, 1.0),)), + ("Capacity", ( + ("an invoice of 500 lines is kept, shown and exported whole", + "quality:capacity_500_lines", AT_LEAST, 1.0),)), )), ("Compatibility", ( - ("Co-existence", ()), + ("Co-existence", ( + ("two instances side by side keep their data and files apart", + "quality:coexistence", AT_LEAST, 1.0),)), + + # The changed tree's targets join here once the change task's tree + # is scored: the data an earlier build saved still reads. ("Interoperability", ()), )), ("Usability", ( @@ -5792,10 +5850,14 @@ def radar_panels(table, results, active): ("installs and boots", "reliability", AT_LEAST, 1.0), ("at most 10 type errors per KLOC under --strict", "mypy_per_kloc", AT_MOST, 10),)), - ("Availability", ()), + ("Availability", ( + ("concurrent writes all land, none refused for a lock", + "quality:concurrent_writes", AT_LEAST, 1.0),)), ("Fault tolerance", ( ("a malformed request leaks no stack trace", - "probe:error_leakage", AT_LEAST, 1.0),)), + "probe:error_leakage", AT_LEAST, 1.0), + ("a malformed request never answers a server error", + "quality:fuzz_robustness", AT_LEAST, 1.0),)), ("Recoverability", ()), )), ("Security", ( @@ -5885,7 +5947,13 @@ def radar_panels(table, results, active): ("Observability", ()), )), ("Flexibility", ( - ("Adaptability", ()), + + # The changed tree's targets join here too once it is scored: a + # schema change shipped as a migration, the database named by + # configuration. + ("Adaptability", ( + ("the build installs and serves a signed-in page on a second " + "Python", "quality:python_portability", AT_LEAST, 1.0),)), ("Scalability", ()), ("Installability", ( ("pip install . succeeds in a clean environment", "install", @@ -5933,21 +6001,87 @@ def radar_panels(table, results, active): } -def iso_targets(): +# The pass condition a pilot round's correctness read before round 6 gave +# each hidden-suite module a target of its own. +PILOT_CORRECTNESS = ( + ("the hidden suite passes at 98 % or more", "task_success", + AT_LEAST, 0.98),) + +# The sources round 6 added; a pilot round's draft reads none of them. +ROUND6_SOURCES = ("quality:", "suite:") + + +def pilot_axes(): + """The ISO table a pilot round's post-hoc draft reads: round 6's, less + every target round 6 added, with the pilot's correctness target.""" + return tuple( + (axis, tuple( + (sub, PILOT_CORRECTNESS if sub == "Functional correctness" + else tuple(target for target in targets + if not target[1].startswith(ROUND6_SOURCES))) + for sub, targets in subs)) + for axis, subs in ISO_AXES) + + +def iso_axes_of(trials, round6_targets=False): + """The ISO table a run is read by: round 6's for a round after the + pilot or where `round6_targets` asks for it, the pilot's otherwise.""" + return ISO_AXES if iso_rules(trials) or round6_targets else pilot_axes() + + +def iso_targets(axes=ISO_AXES): """Every target of the ISO radar, as (axis, sub-characteristic, what it asks, source, condition, threshold).""" return [(axis, sub, asks, source, condition, threshold) - for axis, subs in ISO_AXES for sub, targets in subs + for axis, subs in axes for sub, targets in subs for asks, source, condition, threshold in targets] +def quality_value(trial, name): + """A quality probe's value: 1.0 passed and 0.0 failed, or the latency + in milliseconds; None where it was not measured.""" + probe = path(trial, "quality", "probes", name) + if not isinstance(probe, dict) or probe.get("missing"): + return None + + # A probe the build kept from running failed, whatever else it holds, + # and a latency it kept from being read meets no cutoff. + if probe.get("lost"): + return math.inf if "value" in probe else 0.0 + if "value" in probe: + return probe["value"] + passed = probe.get("passed") + return None if passed is None else (1.0 if passed else 0.0) + + +def module_value(trial, module): + """1.0 where a hidden-suite module passed whole, 0.0 where any of its + checks failed, errored or was skipped; None where it did not run.""" + record = path(trial, "scores", "hidden_suite") + if not isinstance(record, dict) or record.get("missing"): + return None + counts = path(record, "report", "modules", module) + if not isinstance(counts, dict): + return None + + # A skipped check is one nobody ran, so it cannot show the module whole. + unproven = sum(counts.get(key) or 0 + for key in ("failed", "error", "skipped")) + return 1.0 if not unproven and counts.get("passed") else 0.0 + + def iso_value(trial, source): """A target's value for one trial: a metric row's reading, a probe's - pass, or a reading of the radar's own; None where not measured.""" + pass, a module's whole pass, or a reading of the radar's own; None + where not measured.""" if source.startswith("probe:"): probes = (trial.get("security") or {}).get("probes") or {} passed = (probes.get(source[len("probe:"):]) or {}).get("passed") return None if passed is None else (1.0 if passed else 0.0) + if source.startswith("quality:"): + return quality_value(trial, source[len("quality:"):]) + if source.startswith("suite:"): + return module_value(trial, source[len("suite:"):]) if source in ISO_EXTRA: accessor = ISO_EXTRA[source] else: @@ -5963,24 +6097,25 @@ def iso_value(trial, source): def target_met(trial, source, condition, threshold): """Whether one trial meets a target: True, False, or None where its - value was not measured.""" + value was not measured or its threshold is not registered yet.""" value = iso_value(trial, source) - if value is None: + if value is None or threshold is None: return None return value >= threshold if condition == AT_LEAST else value <= threshold -def iso_trial_scores(trial, withdrawn=()): +def iso_trial_scores(trial, withdrawn=(), axes=ISO_AXES): """One trial on every axis, as {axis: {sub-characteristic: score}}. A sub-score is the share of its targets met, over the targets measured, and None where none was. A broken build is scored on Reliability alone, where the install target fails, and reads None on every other axis. A - target reading a metric in `withdrawn` is not measured. + target reading a metric in `withdrawn` is not measured. `axes` is the + table of targets read. """ broken = works(trial) != 1.0 scores = {} - for axis, subs in ISO_AXES: + for axis, subs in axes: per_sub = {} for sub, targets in subs: if broken and axis != BROKEN_AXIS: @@ -6007,16 +6142,16 @@ def iso_axis_score(per_sub): return 100.0 * statistics.fmean(measured) if measured else None -def iso_table(trials, withdrawn=()): +def iso_table(trials, withdrawn=(), axes=ISO_AXES): """The ISO axes as rows of a table, one row per axis under the key `iso:`, each trial's score in points, better up, so the contrast machinery reads them like any other row; `withdrawn` names the metrics - no target may read.""" + no target may read, and `axes` is the table of targets read.""" table = {} for axis, _ in ISO_AXES: table["iso:" + axis] = {"label": axis, "direction": UP, "values": {}} for name, trial in sorted(trials.items()): - scores = iso_trial_scores(trial, withdrawn) + scores = iso_trial_scores(trial, withdrawn, axes) for axis, _ in ISO_AXES: row = table["iso:" + axis]["values"] row.setdefault(arm_of(name), {})[index_of(name)] = iso_axis_score( @@ -6258,15 +6393,15 @@ def axis_reading(score, marker, moved): def iso_axis_lines(trials, iso, arms, results=None, withdrawn=(), - blocks=None): + blocks=None, axes=ISO_AXES): """One table per axis: its sub-characteristics, each arm's mean share of their targets met, and the targets each asks; a target reading a - metric in `withdrawn` is not measured, and a contrast over fewer pairs - than `blocks` names its count.""" + metric in `withdrawn` is not measured, a contrast over fewer pairs than + `blocks` names its count, and `axes` is the table of targets read.""" lines = [] - per_trial = {name: iso_trial_scores(trial, withdrawn) + per_trial = {name: iso_trial_scores(trial, withdrawn, axes) for name, trial in trials.items()} - for axis, subs in ISO_AXES: + for axis, subs in axes: lines.extend(["### %s" % axis, ""]) lines.append("| Sub-characteristic | %s | Targets |" % " | ".join("`%s`" % arm for arm in arms)) @@ -6334,12 +6469,15 @@ def aggregate(seed, trials, table, results, withdrawn, check, iso, return payload -def iso_reading(trials, seed, withdrawn=()): - """The ISO radar's table, its contrasts against the bare arm and the - metrics withdrawn from it, as one triple, for a run read with it.""" +def iso_reading(trials, seed, withdrawn=(), axes=None): + """The ISO radar's table, its contrasts against the bare arm, the + metrics withdrawn from it and the table of targets it read, for a run + read with it; `axes` defaults to the run's own.""" withdrawn = tuple(withdrawn) - iso = iso_table(trials, withdrawn) - return iso, iso_contrasts(iso, seed, crossed_labels(trials)), withdrawn + axes = iso_axes_of(trials) if axes is None else axes + iso = iso_table(trials, withdrawn, axes) + return (iso, iso_contrasts(iso, seed, crossed_labels(trials)), withdrawn, + axes) # How the plain report reads the ISO radar, under it. @@ -6736,6 +6874,9 @@ def parse_args(argv): help="read a pilot round by the ISO radar: its " "radar, verdicts and screen, as a draft only; " "its registered verdicts stand") + parser.add_argument("--round6-targets", action="store_true", + help="with --iso, read the pilot round by round 6's " + "targets rather than its own; a draft still") parser.add_argument("--self-test", action="store_true", help="check the verdict rule against worked cases; " "read no run") @@ -7797,18 +7938,168 @@ def planted(install=True, probes=None, **scores): and "- Cost: about $8.80 a run, against $4.00 with no " "rules file." in words, words[:8])) - # Every target reads a metric row, a probe security.py runs, or a - # reading of the radar's own; a target pointed elsewhere would read not - # measured for every trial without failing. + # Every target reads a metric row, a probe security.py or quality.py + # runs, a hidden-suite module, or a reading of the radar's own; a target + # pointed elsewhere would read not measured for every trial without + # failing. + import quality import security - probes = set(security.SECURITY_PROBES + security.DATA_PROTECTION_PROBES) + readers = {"probe:": set(security.SECURITY_PROBES + + security.DATA_PROTECTION_PROBES), + "quality:": set(quality.PROBES), + "suite:": set(HIDDEN_MODULES)} keys = {key for key, _, _, _ in METRICS} | set(ISO_EXTRA) - stray = sorted(source for _, _, _, source, _, _ in iso_targets() - if not (source[len("probe:"):] in probes - if source.startswith("probe:") - else source in keys)) + + def reads(source): + prefix = next((prefix for prefix in readers + if source.startswith(prefix)), None) + if prefix is None: + return source in keys + return source[len(prefix):] in readers[prefix] + + stray = sorted(source for _, _, _, source, _, _ + in iso_targets() + iso_targets(pilot_axes()) + if not reads(source)) checks.append(("every target reads a metric row, a probe or a reading " "of the radar's own", not stray, stray)) + + # A quality probe the build kept from running is lost and fails, as a + # security probe does, whatever else it holds; one the reader could not + # run is missing and not measured. + trial = planted(probes={"error_leakage": True}) + trial["quality"] = {"probes": { + "fuzz_robustness": {"lost": "the application raised"}, + "concurrent_writes": {"passed": False, "missing": "the reader failed"}, + "coexistence": {"passed": True}}} + scores = iso_trial_scores(trial) + got = (scores["Reliability"]["Fault tolerance"], + scores["Reliability"]["Availability"], + scores["Compatibility"]["Co-existence"], + scores["Performance"]["Capacity"]) + checks.append(("a lost quality probe reads failed, a missing one not " + "measured", got == (0.5, None, 1.0, None), got)) + + # The latency target reads the registered cutoff. With none registered + # it is not measured, never met and never failed, and holds no screen; + # with one, a latency within it is met, one past it or lost is not. + def cut(ms): + return tuple((axis, tuple((sub, tuple( + (asks, source, condition, + ms if source == "quality:latency_p95_ms" else threshold) + for asks, source, condition, threshold in targets)) + for sub, targets in subs)) for axis, subs in ISO_AXES) + + def timing(axes): + return tuple((axis, subs if axis != "Performance" else tuple( + (sub, targets if sub == "Time behaviour" else ()) + for sub, targets in subs)) for axis, subs in axes) + + timed = planted() + timed["quality"] = {"probes": {"latency_p95_ms": { + "value": 40.0, "repeats": [38.0, 40.0]}}} + slow = planted() + slow["quality"] = {"probes": {"latency_p95_ms": { + "value": None, "lost": "the application would not boot"}}} + got = (LATENCY_CUTOFF_MS, + iso_trial_scores(timed)["Performance"]["Time behaviour"], + iso_targeted("Performance", timing(ISO_AXES)), + iso_targeted("Performance", timing(cut(50.0))), + [iso_trial_scores(trial, (), cut(ms))["Performance"][ + "Time behaviour"] for trial, ms in ((timed, 50.0), + (timed, 30.0), + (slow, 50.0))]) + checks.append(("the latency target is not measured until its cutoff is " + "registered, then met within it", + got == (None, None, False, True, [1.0, 0.0, 0.0]), got)) + + # A module passes whole only where every check in it ran and passed: a + # skipped check cannot show it whole. + def suite(modules, missing=None): + trial = planted() + trial["scores"]["hidden_suite"] = { + "value": 0.9, "missing": missing, + "report": {"modules": modules}} + return trial + + whole = {"passed": 5, "failed": 0, "error": 0, "skipped": 0} + got = [module_value(suite({"test_seed.py": dict(whole, **change)}), + "test_seed.py") + for change in ({}, {"failed": 1}, {"error": 1}, {"skipped": 1})] + got.append(module_value(suite({"test_seed.py": whole}, "no install"), + "test_seed.py")) + checks.append(("a module passes whole only where no check failed, " + "errored or was skipped", + got == [1.0, 0.0, 0.0, 0.0, None], got)) + + # A module absent from a trial's report did not run there, as in a suite + # that predates it: not measured, so correctness is the share of the + # modules that ran, 17 of 18 here, not 17 of 19. + ran = {module: dict(whole) for module in HIDDEN_MODULES + if module != "test_persistence.py"} + ran["test_browser.py"] = dict(whole, failed=1) + trial = suite(ran) + got = (module_value(trial, "test_persistence.py"), + round(iso_trial_scores(trial)["Functionality"][ + "Functional correctness"], 4)) + checks.append(("a module absent from a trial's report is not measured, " + "and correctness is the share of the modules that ran", + got == (None, round(17 / 18, 4)), got)) + + # A pilot round read by the ISO radar keeps the targets its drafts read + # before round 6 added its own: the suite's pass rate, 99 % here, and + # no quality probe, unless round 6's are asked for by name. + pilot = dict(suite(ran), quality={"probes": { + "fuzz_robustness": {"passed": False}}}) + pilot["scores"]["hidden_suite"]["value"] = 0.99 + pilot["security"]["probes"]["error_leakage"] = {"passed": True} + run = {"lazyref-1": pilot, "none-1": pilot} + later = {"hybrid-1": pilot, "none-1": pilot} + + def read(axes): + scores = iso_trial_scores(pilot, (), axes) + return (round(scores["Functionality"]["Functional correctness"], 4), + scores["Reliability"]["Fault tolerance"]) + + drafted = iso_reading(run, seed) + got = (len(iso_targets(drafted[3])), read(drafted[3]), + read(iso_axes_of(run, True)), iso_axes_of(later) == ISO_AXES, + POSTHOC_ROUND6_NOTE in posthoc_iso_lines(drafted)[0], + POSTHOC_ROUND6_NOTE in posthoc_iso_lines( + iso_reading(run, seed, (), ISO_AXES))[0]) + checks.append(("a pilot round read by the ISO radar keeps the targets it " + "had before round 6, unless round 6's are asked for", + got == (48, (1.0, 1.0), (round(17 / 18, 4), 0.5), True, + False, True), got)) + + # The quality reading is loaded beside the security reading, each from + # its own folder, and round 6's targets on a run no pilot draft reads + # are refused rather than ignored. + scratch = tempfile.mkdtemp(prefix="efficacy-report-quality-") + try: + root = os.path.join(scratch, "round") + area = scoring_area(root) + for kind, payload in ( + ("scores", {"name": "none-1"}), + ("security-scores", {"name": "none-1", "probes": {}}), + ("quality-scores", {"name": "none-1", "probes": { + "coexistence": {"passed": True}}})): + os.makedirs(os.path.join(area, kind)) + with io.open(os.path.join(area, kind, "none-1.json"), "w", + encoding="utf-8") as handle: + json.dump(payload, handle) + loaded = load(root)["none-1"] + with contextlib.redirect_stdout(io.StringIO()): + refused = main(["--root", root, "--round6-targets", "--out-dir", + os.path.join(scratch, "out")]) + got = (path(loaded, "quality", "probes", "coexistence", "passed"), + path(loaded, "security", "probes"), refused, + os.path.exists(os.path.join(scratch, "out"))) + finally: + shutil.rmtree(scratch, ignore_errors=True) + checks.append(("the report loads a trial's quality reading beside its " + "security reading", got[:2] == (True, {}), got)) + checks.append(("round 6's targets are refused where no pilot draft " + "reads them", got[2:] == (2, False), got)) checks.append(("every axis carries a margin", set(ISO_MARGINS) == {axis for axis, _ in ISO_AXES}, sorted(ISO_MARGINS))) @@ -7819,7 +8110,8 @@ def planted(install=True, probes=None, **scores): table = iso_table(run) lines = iso_axis_lines(run, table, ["none", "hybrid"]) thin = [line for line in lines if line.startswith("| Installability |")] - empty = [line for line in lines if line.startswith("| Co-existence |")] + empty = [line for line in lines + if line.startswith("| Interoperability |")] checks.append(("the tables mark a thin sub-characteristic and read an " "empty one as not measured", len(thin) == 1 and "(fewer than 3 targets)" in thin[0] @@ -8376,6 +8668,12 @@ def main(argv): out_dir = reports_dir() posthoc_iso = options.iso and not iso_rules(trials) + + # Round 6's targets on a pilot round change only its ISO draft, so the + # option is refused where no draft would read it. + if options.round6_targets and not posthoc_iso: + print("refused: --round6-targets reads a pilot round, with --iso") + return 2 problem = (posthoc_iso_problem(posthoc_iso, out_dir) or iso_cross_problem(iso_rules(trials) or posthoc_iso, options.cross_check)) @@ -8467,7 +8765,8 @@ def main(argv): return 2 check = cross_check(trials, other, options.seed) disagree(results, check) - iso = (iso_reading(trials, options.seed, withdrawn) + iso = (iso_reading(trials, options.seed, withdrawn, + iso_axes_of(trials, options.round6_targets)) if iso_rules(trials) or posthoc_iso else None) uses = map_uses(options.root, trials) if is_round5e(trials) else None target = write_report(options.root, trials, table, results, options.seed, From bd89b62f1156626376a29e506f95e60596dd7dc8 Mon Sep 17 00:00:00 2001 From: Branimir Georgiev <66906831+braboj@users.noreply.github.com> Date: Sun, 15 Nov 2026 20:12:05 +0200 Subject: [PATCH 2/6] feat(efficacy): an absent module fails unless its suite lacked it; reuse carries quality - A hidden-suite module absent from a trial's report reads not measured only where the revision that graded it did not hold the module, from a fixed table of the suite's earlier revisions; under any other revision it failed to collect or ran out of time, and is not met. - `reuse.py` copies `quality-scores/` with the other readings, and its self-test plants each kind itself, so one it stops copying shows. - The hidden-suite artefact row reads the current suite: 544 build checks across 19 modules at `a8e7935`, and 74 change checks. - FR-12-20, QT-01-02 and chapter 8 state the revision rule; FR-13-11 covers the reuse of every reading. Refs #155, #119. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DpT5xQh3AgRFs2tJwMT4g3 --- docs/architecture/08-crosscutting-concepts.md | 7 +-- docs/coverage.md | 3 +- docs/requirements.md | 8 +-- tests/efficacy/report.py | 51 ++++++++++++++++--- tests/efficacy/reuse.py | 21 +++++--- 5 files changed, 68 insertions(+), 22 deletions(-) diff --git a/docs/architecture/08-crosscutting-concepts.md b/docs/architecture/08-crosscutting-concepts.md index e157ff0..4466d84 100644 --- a/docs/architecture/08-crosscutting-concepts.md +++ b/docs/architecture/08-crosscutting-concepts.md @@ -627,9 +627,10 @@ FR-12-21): - **Hidden-suite modules.** Functional correctness has one target per build module, met where the module passes whole: no check failed, errored or - skipped. A module missing from a build's report is not measured. The - sub-characteristic is still one share among three on its axis, however - many modules it holds. + skipped. A module missing from a build's report is not measured where + the suite's revision did not hold it, and not met where it did: it failed + to collect or ran out of time. The sub-characteristic is still one share + among three on its axis, however many modules it holds. - **Quality probes.** Each pass-or-fail probe is one target: fault tolerance, availability, capacity, resource use, co-existence and portability. A lost probe fails; a missing one is not measured. diff --git a/docs/coverage.md b/docs/coverage.md index 6b71242..8fa8e72 100644 --- a/docs/coverage.md +++ b/docs/coverage.md @@ -182,7 +182,7 @@ when: | FR-12-17 | Self-test | `report.py` "the ISO screen drops an arm worse on an axis, ranks the rest by axes better and then by cost, and keeps four"
`report.py` "an axis no target measures neither holds nor moves the ISO screen"
`report.py` "an axis that lists targets but has no reading yet holds the ISO screen"
`report.py` "the ISO screen names the arms round 6 runs and the axis that put one out" | | FR-12-18 | Self-test | `report.py` "a pilot round read by the ISO radar is only a draft, never in or under docs/reports/, and keeps its aggregate beside the registered one"
`report.py` "a pilot round read by the ISO radar says it is post hoc and that its axes decide"
`report.py` "a run read by the ISO radar refuses a cross-check, whose withheld rows its markers would still count" | | FR-12-19 | Self-test | `report.py` "the report loads a trial's quality reading beside its security reading"
`report.py` "a lost quality probe reads failed, a missing one not measured"
`report.py` "the latency target is not measured until its cutoff is registered, then met within it" | -| FR-12-20 | Self-test | `report.py` "a module passes whole only where no check failed, errored or was skipped"
`report.py` "a module absent from a trial's report is not measured, and correctness is the share of the modules that ran" | +| FR-12-20 | Self-test | `report.py` "a module passes whole only where no check failed, errored or was skipped"
`report.py` "a module absent from a report is not measured only where the suite's revision did not hold it" | | FR-12-21 | Self-test | `report.py` "a pilot round read by the ISO radar keeps the targets it had before round 6, unless round 6's are asked for"
`report.py` "round 6's targets are refused where no pilot draft reads them" | ## 13 Records and archive @@ -199,6 +199,7 @@ when: | FR-13-08 | Self-test | `generate_arm.py` "a built file naming a tool is refused" | | FR-13-09 | Self-test | `report.py` "with no --out-dir it lands in this repository's docs/reports/, needing the stamp but no templates source" | | FR-13-10 | Self-test | `generate_arm.py` "every committed arm is what the script builds at its recorded ref, byte for byte, the same twice" | +| FR-13-11 | Self-test | `reuse.py` "the readings are filed under the word and name their origin"
`reuse.py` "the quality readings come along beside the security readings"
`reuse.py` "the judgings keep their labels and the map is theirs alone" | ## 14 One run at a time diff --git a/docs/requirements.md b/docs/requirements.md index 0de7c8d..9d4ddf4 100644 --- a/docs/requirements.md +++ b/docs/requirements.md @@ -27,6 +27,7 @@ - **Judge:** `judge.py`, which bundles a build and has a model score it. - **Report:** `report.py`, which reads a round and writes its report. - **Archive:** `archive.py`, which carries a round to the private archive. + - **Reuse:** `reuse.py`, which brings an earlier round's trials into a run. - **Arm generator:** `generate_arm.py`, which writes a generated arm's file. - **Control builder:** `control/control.py`, which builds the judge's control trees. @@ -192,7 +193,7 @@ | FR-12-17 | The benchmark shall screen round 6's candidates on the ISO radar's axes: out on an axis worse, the rest ranked by axes better and then by mean cost, the top four kept; an axis no target measures shall neither hold nor move it, and an axis that lists targets but has no reading yet shall hold it. | Report | | FR-12-18 | The benchmark shall read a pilot round by the ISO radar only as a draft that says it is post hoc, never under `docs/reports/`, and keep its aggregate beside the registered one; a run read by the ISO radar shall take no cross-check. | Report | | FR-12-19 | From round 6 the benchmark shall load each trial's quality reading beside its security reading and read each quality probe as an ISO target: a lost probe fails, a missing one is not measured, and the latency target is not measured until its cutoff is registered. | Report | -| FR-12-20 | From round 6 the benchmark shall read functional correctness as one target per hidden-suite build module, met only where every check in it ran and passed, and not measured where the trial's report lacks the module. | Report | +| FR-12-20 | From round 6 the benchmark shall read functional correctness as one target per hidden-suite build module, met only where every check in it ran and passed; a module the trial's report lacks is not measured where the suite's revision did not hold it, and not met where it did. | Report | | FR-12-21 | The benchmark shall read a pilot round by the ISO radar with the targets it had before round 6, and by round 6's only where asked, refusing that request where no pilot draft would read it. | Report | ### 13 Records and archive @@ -209,6 +210,7 @@ | FR-13-08 | The benchmark shall refuse a built arm file that names a tool. | Arm generator | | FR-13-09 | The benchmark shall write a round's report, by default, to its own `docs/reports/`, with no templates source named. | Report | | FR-13-10 | The benchmark shall build every arm a round runs by script, with no model call, and fail its self-test where a committed arm differs from what the script builds at the arm's recorded ref. | Arm generator | +| FR-13-11 | The benchmark shall bring a reused trial's score, security and quality readings and judgings into the later round, each naming the trial it came from. | Reuse | ### 14 One run at a time @@ -295,7 +297,7 @@ | Artefact | Contents | Used by | | -------- | -------- | ------- | -| Hidden suite | 534 build checks across 18 modules and 74 change checks, in the private `braboj/tariff-hidden-suite`. | QG-01-02 | +| Hidden suite | At revision `a8e7935`, 544 build checks across 19 modules, 5 of them browser flows that skip where no browser is installed, 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 | Fifteen 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 | @@ -330,7 +332,7 @@ | ID | Sub-characteristic | Target | Read from | | -- | ------------------ | ------ | --------- | | QT-01-01 | Functional completeness | Every name the specification requires is exported. | Specified names missing | -| QT-01-02 | Functional correctness | Each of the hidden suite's 19 build modules passes whole, one target per module: every check ran and passed, none failed, errored or skipped. A module missing from a build's report is not measured. | Hidden suite, per module | +| QT-01-02 | Functional correctness | Each of the hidden suite's 19 build modules passes whole, one target per module: every check ran and passed, none failed, errored or skipped. A module missing from a build's report is not measured where the suite's revision did not hold it, and not met where it did. | Hidden suite, per module | | QT-01-03 | Functional appropriateness | Nothing nobody asked for is delivered. | Artifacts nobody asked for | ### 02 Performance efficiency diff --git a/tests/efficacy/report.py b/tests/efficacy/report.py index b11616e..e1c5c85 100644 --- a/tests/efficacy/report.py +++ b/tests/efficacy/report.py @@ -5779,6 +5779,26 @@ def radar_panels(table, results, active): "test_nojs.py", "test_browser.py", ) +# The modules each earlier revision of the hidden suite did not hold, read +# from its history. A module absent from a report graded by one of these was +# never there to run; absent under any other revision, it was there and did +# not run, as a module that fails to collect or a suite that ran out of time +# leaves it, and that is the build's. +SUITE_LACKS = dict( + [(revision, ("test_persistence.py",)) for revision in ( + "8caaaa339c04f0af3df878c92ed8974a237e67e0", + "1f07e422b3b5348418a596d36c7a2d582688d49b", + "c987eff4c100c24f070eb1ff2f2e488539b391f5", + "579209412dc414b17283a9df7adf8857eb570a10", + "65bfb9a8590bfcd0096fdb6c0c6ae7be4d8ed5c6")] + + [(revision, ("test_http_signin.py", "test_http_customers.py", + "test_persistence.py")) for revision in ( + "48f47851ed43ac0734dcb72183930ae4d86055cc", + "00cf47533508fb26ae9bb59dd4f816a025b7ad05", + "f983e230de8781e0d1a3df661306cc621f4b0c81", + "cb66df1e4988d0b07c2528ba0a1d7f2d3d02d6eb", + "bdee80653e6e14256f9d20e7e763acbdf6646af1")]) + # The latency's cutoff in milliseconds, the worse repeat's 95th percentile. # It is calibrated from the reference build's repeats and a planted slowdown, # then frozen here before round 6 registers; until then the latency target @@ -6056,13 +6076,16 @@ def quality_value(trial, name): def module_value(trial, module): """1.0 where a hidden-suite module passed whole, 0.0 where any of its - checks failed, errored or was skipped; None where it did not run.""" + checks failed, errored or was skipped, or where the suite's revision + held it and it did not run; None where the suite did not run, or its + revision did not hold the module.""" record = path(trial, "scores", "hidden_suite") if not isinstance(record, dict) or record.get("missing"): return None counts = path(record, "report", "modules", module) if not isinstance(counts, dict): - return None + revision = path(record, "report", "suite_revision") + return None if module in SUITE_LACKS.get(revision, ()) else 0.0 # A skipped check is one nobody ran, so it cannot show the module whole. unproven = sum(counts.get(key) or 0 @@ -8031,19 +8054,29 @@ def suite(modules, missing=None): "errored or was skipped", got == [1.0, 0.0, 0.0, 0.0, None], got)) - # A module absent from a trial's report did not run there, as in a suite - # that predates it: not measured, so correctness is the share of the - # modules that ran, 17 of 18 here, not 17 of 19. + # A module absent from a report graded by a revision that did not hold + # it is not measured, so correctness is the share of the modules that + # ran, 17 of 18 here, not 17 of 19. Absent under a revision that held + # it, it failed to collect or ran out of time, and is not met. ran = {module: dict(whole) for module in HIDDEN_MODULES if module != "test_persistence.py"} ran["test_browser.py"] = dict(whole, failed=1) trial = suite(ran) + trial["scores"]["hidden_suite"]["report"]["suite_revision"] = ( + "1f07e422b3b5348418a596d36c7a2d582688d49b") + held = suite(ran) + held["scores"]["hidden_suite"]["report"]["suite_revision"] = ( + "a8e79354eda873c72c6da7319cd0f93865a16812") got = (module_value(trial, "test_persistence.py"), round(iso_trial_scores(trial)["Functionality"][ + "Functional correctness"], 4), + module_value(held, "test_persistence.py"), + round(iso_trial_scores(held)["Functionality"][ "Functional correctness"], 4)) - checks.append(("a module absent from a trial's report is not measured, " - "and correctness is the share of the modules that ran", - got == (None, round(17 / 18, 4)), got)) + checks.append(("a module absent from a report is not measured only where " + "the suite's revision did not hold it", + got == (None, round(17 / 18, 4), 0.0, round(17 / 19, 4)), + got)) # A pilot round read by the ISO radar keeps the targets its drafts read # before round 6 added its own: the suite's pass rate, 99 % here, and @@ -8051,6 +8084,8 @@ def suite(modules, missing=None): pilot = dict(suite(ran), quality={"probes": { "fuzz_robustness": {"passed": False}}}) pilot["scores"]["hidden_suite"]["value"] = 0.99 + pilot["scores"]["hidden_suite"]["report"]["suite_revision"] = ( + "1f07e422b3b5348418a596d36c7a2d582688d49b") pilot["security"]["probes"]["error_leakage"] = {"passed": True} run = {"lazyref-1": pilot, "none-1": pilot} later = {"hybrid-1": pilot, "none-1": pilot} diff --git a/tests/efficacy/reuse.py b/tests/efficacy/reuse.py index 7e9a4f2..0c576fc 100644 --- a/tests/efficacy/reuse.py +++ b/tests/efficacy/reuse.py @@ -3,11 +3,11 @@ Round 5d reuses round 5c's trials rather than running them again. This module copies what the report reads for a trial — its run record, frozen -tarball, transcripts, score, judging and security reading — from the earlier -root and scoring area into the new ones, and marks each copy with where it -came from. The earlier root is never touched, and nothing copied is scored or -judged again: the scorer, the judge and the security reader skip a trial -whose result is already there. +tarball, transcripts, score, judging, and security and quality readings — +from the earlier root and scoring area into the new ones, and marks each copy +with where it came from. The earlier root is never touched, and nothing +copied is scored or judged again: the scorer, the judge and the security and +quality readers skip a trial whose result is already there. """ import argparse @@ -30,7 +30,7 @@ # The scoring area's per-trial readings, each a JSON file named for the # trial, that a reused trial brings with it. -READINGS = ("scores", "security-scores") +READINGS = ("scores", "security-scores", "quality-scores") def existing_file(directory, name): @@ -233,7 +233,10 @@ def plant_source(scratch): with io.open(os.path.join(folder, "planted.jsonl"), "w", encoding="utf-8") as handle: handle.write("{}\n") - for kind in READINGS: + + # Each reading the scoring area holds, named here rather than taken + # from what a reuse copies, so a kind it stops copying shows. + for kind in ("scores", "security-scores", "quality-scores"): os.makedirs(os.path.join(area, kind), exist_ok=True) with io.open(os.path.join(area, kind, "%s.json" % old), "w", encoding="utf-8") as handle: @@ -299,6 +302,10 @@ def loaded(*parts): for name, old in (("inline-1", "inline-1"), ("hand-1", "hand-1"))) and not os.path.exists(os.path.join(area, "scores", "none-1.json"))), + ("the quality readings come along beside the security readings", + all(os.path.isfile(os.path.join(area, kind, "%s.json" % name)) + for kind in ("security-scores", "quality-scores") + for name in ("inline-1", "hand-1"))), ("the judgings keep their labels and the map is theirs alone", loaded(area, "judge", "T2.json")["trial"] == "inline-1" and loaded(area, "judge", "T1.json")["trial"] == "hand-1" From 9e2a74668586c858b77dfd5659c537a63c0be6b3 Mon Sep 17 00:00:00 2001 From: Branimir Georgiev <66906831+braboj@users.noreply.github.com> Date: Sun, 15 Nov 2026 20:17:27 +0200 Subject: [PATCH 3/6] docs(efficacy): the reuse requirement takes FR-13-19, clear of FR-13-11 to 18 - Another branch adds FR-13-11 to FR-13-18, so the reuse row moves to the next free number in requirements.md and coverage.md. Refs #155, #119. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DpT5xQh3AgRFs2tJwMT4g3 --- docs/coverage.md | 2 +- docs/requirements.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/coverage.md b/docs/coverage.md index 8fa8e72..9d60a33 100644 --- a/docs/coverage.md +++ b/docs/coverage.md @@ -199,7 +199,7 @@ when: | FR-13-08 | Self-test | `generate_arm.py` "a built file naming a tool is refused" | | FR-13-09 | Self-test | `report.py` "with no --out-dir it lands in this repository's docs/reports/, needing the stamp but no templates source" | | FR-13-10 | Self-test | `generate_arm.py` "every committed arm is what the script builds at its recorded ref, byte for byte, the same twice" | -| FR-13-11 | Self-test | `reuse.py` "the readings are filed under the word and name their origin"
`reuse.py` "the quality readings come along beside the security readings"
`reuse.py` "the judgings keep their labels and the map is theirs alone" | +| FR-13-19 | Self-test | `reuse.py` "the readings are filed under the word and name their origin"
`reuse.py` "the quality readings come along beside the security readings"
`reuse.py` "the judgings keep their labels and the map is theirs alone" | ## 14 One run at a time diff --git a/docs/requirements.md b/docs/requirements.md index 9d4ddf4..cdc55a8 100644 --- a/docs/requirements.md +++ b/docs/requirements.md @@ -210,7 +210,7 @@ | FR-13-08 | The benchmark shall refuse a built arm file that names a tool. | Arm generator | | FR-13-09 | The benchmark shall write a round's report, by default, to its own `docs/reports/`, with no templates source named. | Report | | FR-13-10 | The benchmark shall build every arm a round runs by script, with no model call, and fail its self-test where a committed arm differs from what the script builds at the arm's recorded ref. | Arm generator | -| FR-13-11 | The benchmark shall bring a reused trial's score, security and quality readings and judgings into the later round, each naming the trial it came from. | Reuse | +| FR-13-19 | The benchmark shall bring a reused trial's score, security and quality readings and judgings into the later round, each naming the trial it came from. | Reuse | ### 14 One run at a time From a93f082584e21cd3b221d2a48a8e301b52c9701c Mon Sep 17 00:00:00 2001 From: Branimir Georgiev <66906831+braboj@users.noreply.github.com> Date: Sun, 15 Nov 2026 20:21:22 +0200 Subject: [PATCH 4/6] docs(efficacy): the ISO target requirements take FR-12-21 to FR-12-23 - Another branch adds FR-12-19 and FR-12-20, so the quality-reading, module and pilot-target rows move to the next free numbers, in order, in requirements.md, coverage.md and chapter 8. Refs #155, #119. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DpT5xQh3AgRFs2tJwMT4g3 --- docs/architecture/08-crosscutting-concepts.md | 4 ++-- docs/coverage.md | 6 +++--- docs/requirements.md | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/architecture/08-crosscutting-concepts.md b/docs/architecture/08-crosscutting-concepts.md index 4466d84..1ab3fc0 100644 --- a/docs/architecture/08-crosscutting-concepts.md +++ b/docs/architecture/08-crosscutting-concepts.md @@ -622,8 +622,8 @@ interval of the difference against `none` lies past the axis's margin each radar, shown and not scored, and the appendix holds one table of sub-scores per axis. The decision is ADR-023. -Round 6's targets read three sources the pilot's did not (FR-12-19 to -FR-12-21): +Round 6's targets read three sources the pilot's did not (FR-12-21 to +FR-12-23): - **Hidden-suite modules.** Functional correctness has one target per build module, met where the module passes whole: no check failed, errored or diff --git a/docs/coverage.md b/docs/coverage.md index 9d60a33..b977385 100644 --- a/docs/coverage.md +++ b/docs/coverage.md @@ -181,9 +181,9 @@ when: | FR-12-16 | Self-test | `report.py` "an ISO-read arm's verdict is worse on an axis worse, better on one better with none worse, and no clear gain otherwise"
`report.py` "the plain words name the axes behind an ISO-read verdict"
`report.py` "the summary's axis table of an ISO-read run is the ISO radar's, marked as the chart is" | | FR-12-17 | Self-test | `report.py` "the ISO screen drops an arm worse on an axis, ranks the rest by axes better and then by cost, and keeps four"
`report.py` "an axis no target measures neither holds nor moves the ISO screen"
`report.py` "an axis that lists targets but has no reading yet holds the ISO screen"
`report.py` "the ISO screen names the arms round 6 runs and the axis that put one out" | | FR-12-18 | Self-test | `report.py` "a pilot round read by the ISO radar is only a draft, never in or under docs/reports/, and keeps its aggregate beside the registered one"
`report.py` "a pilot round read by the ISO radar says it is post hoc and that its axes decide"
`report.py` "a run read by the ISO radar refuses a cross-check, whose withheld rows its markers would still count" | -| FR-12-19 | Self-test | `report.py` "the report loads a trial's quality reading beside its security reading"
`report.py` "a lost quality probe reads failed, a missing one not measured"
`report.py` "the latency target is not measured until its cutoff is registered, then met within it" | -| FR-12-20 | Self-test | `report.py` "a module passes whole only where no check failed, errored or was skipped"
`report.py` "a module absent from a report is not measured only where the suite's revision did not hold it" | -| FR-12-21 | Self-test | `report.py` "a pilot round read by the ISO radar keeps the targets it had before round 6, unless round 6's are asked for"
`report.py` "round 6's targets are refused where no pilot draft reads them" | +| FR-12-21 | Self-test | `report.py` "the report loads a trial's quality reading beside its security reading"
`report.py` "a lost quality probe reads failed, a missing one not measured"
`report.py` "the latency target is not measured until its cutoff is registered, then met within it" | +| FR-12-22 | Self-test | `report.py` "a module passes whole only where no check failed, errored or was skipped"
`report.py` "a module absent from a report is not measured only where the suite's revision did not hold it" | +| FR-12-23 | Self-test | `report.py` "a pilot round read by the ISO radar keeps the targets it had before round 6, unless round 6's are asked for"
`report.py` "round 6's targets are refused where no pilot draft reads them" | ## 13 Records and archive diff --git a/docs/requirements.md b/docs/requirements.md index cdc55a8..fcb7085 100644 --- a/docs/requirements.md +++ b/docs/requirements.md @@ -192,9 +192,9 @@ | FR-12-16 | From round 6 the benchmark shall give each approach its verdict from the ISO radar's axes: Yes where an axis is better and none worse, Worse where any is worse, No where none moved; and the summary's axis table shall be the ISO radar's. | Report | | FR-12-17 | The benchmark shall screen round 6's candidates on the ISO radar's axes: out on an axis worse, the rest ranked by axes better and then by mean cost, the top four kept; an axis no target measures shall neither hold nor move it, and an axis that lists targets but has no reading yet shall hold it. | Report | | FR-12-18 | The benchmark shall read a pilot round by the ISO radar only as a draft that says it is post hoc, never under `docs/reports/`, and keep its aggregate beside the registered one; a run read by the ISO radar shall take no cross-check. | Report | -| FR-12-19 | From round 6 the benchmark shall load each trial's quality reading beside its security reading and read each quality probe as an ISO target: a lost probe fails, a missing one is not measured, and the latency target is not measured until its cutoff is registered. | Report | -| FR-12-20 | From round 6 the benchmark shall read functional correctness as one target per hidden-suite build module, met only where every check in it ran and passed; a module the trial's report lacks is not measured where the suite's revision did not hold it, and not met where it did. | Report | -| FR-12-21 | The benchmark shall read a pilot round by the ISO radar with the targets it had before round 6, and by round 6's only where asked, refusing that request where no pilot draft would read it. | Report | +| FR-12-21 | From round 6 the benchmark shall load each trial's quality reading beside its security reading and read each quality probe as an ISO target: a lost probe fails, a missing one is not measured, and the latency target is not measured until its cutoff is registered. | Report | +| FR-12-22 | From round 6 the benchmark shall read functional correctness as one target per hidden-suite build module, met only where every check in it ran and passed; a module the trial's report lacks is not measured where the suite's revision did not hold it, and not met where it did. | Report | +| FR-12-23 | The benchmark shall read a pilot round by the ISO radar with the targets it had before round 6, and by round 6's only where asked, refusing that request where no pilot draft would read it. | Report | ### 13 Records and archive From 99194f3aa73c8a75d03eb7b007ae86997aeff0e6 Mon Sep 17 00:00:00 2001 From: Branimir Georgiev <66906831+braboj@users.noreply.github.com> Date: Sun, 15 Nov 2026 20:24:35 +0200 Subject: [PATCH 5/6] docs(efficacy): renumber the reuse row FR-13-21, clear of the harness rows Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DpT5xQh3AgRFs2tJwMT4g3 --- docs/coverage.md | 2 +- docs/requirements.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/coverage.md b/docs/coverage.md index 545ba1d..3789ce4 100644 --- a/docs/coverage.md +++ b/docs/coverage.md @@ -199,7 +199,7 @@ when: | FR-13-08 | Self-test | `generate_arm.py` "a built file naming a tool is refused" | | FR-13-09 | Self-test | `report.py` "with no --out-dir it lands in this repository's docs/reports/, needing the stamp but no templates source" | | FR-13-10 | Self-test | `generate_arm.py` "every committed arm is what the script builds at its recorded ref, byte for byte, the same twice" | -| FR-13-19 | Self-test | `reuse.py` "the readings are filed under the word and name their origin"
`reuse.py` "the quality readings come along beside the security readings"
`reuse.py` "the judgings keep their labels and the map is theirs alone" | +| FR-13-21 | Self-test | `reuse.py` "the readings are filed under the word and name their origin"
`reuse.py` "the quality readings come along beside the security readings"
`reuse.py` "the judgings keep their labels and the map is theirs alone" | ## 14 One run at a time diff --git a/docs/requirements.md b/docs/requirements.md index 94a0de4..b271845 100644 --- a/docs/requirements.md +++ b/docs/requirements.md @@ -210,7 +210,7 @@ | FR-13-08 | The benchmark shall refuse a built arm file that names a tool. | Arm generator | | FR-13-09 | The benchmark shall write a round's report, by default, to its own `docs/reports/`, with no templates source named. | Report | | FR-13-10 | The benchmark shall build every arm a round runs by script, with no model call, and fail its self-test where a committed arm differs from what the script builds at the arm's recorded ref. | Arm generator | -| FR-13-19 | The benchmark shall bring a reused trial's score, security and quality readings and judgings into the later round, each naming the trial it came from. | Reuse | +| FR-13-21 | The benchmark shall bring a reused trial's score, security and quality readings and judgings into the later round, each naming the trial it came from. | Reuse | ### 14 One run at a time From 5bb7c86e1e61839fc815d9837478720199b6d373 Mon Sep 17 00:00:00 2001 From: Branimir Georgiev <66906831+braboj@users.noreply.github.com> Date: Mon, 16 Nov 2026 14:06:11 +0200 Subject: [PATCH 6/6] fix(efficacy): a hidden suite that ran out of time fails every module - The scorer files a suite whose pytest wrote no report as missing, with the grader's report marked timed out, so every module target read not measured and a hanging build escaped its failed targets. - A recorded timeout now fails every module the suite's revision holds, ahead of the missing check; a suite never run stays not measured. - The check builds both timed-out records through score.py's own `run_hidden_suite`, with the grader's run stubbed to write its timed-out report. - FR-12-22, QT-01-02 and chapter 8 state the rule. Refs #155, #119. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DpT5xQh3AgRFs2tJwMT4g3 --- docs/architecture/08-crosscutting-concepts.md | 5 +- docs/coverage.md | 2 +- docs/requirements.md | 4 +- tests/efficacy/report.py | 76 +++++++++++++++++-- 4 files changed, 76 insertions(+), 11 deletions(-) diff --git a/docs/architecture/08-crosscutting-concepts.md b/docs/architecture/08-crosscutting-concepts.md index 1ab3fc0..c8e0f64 100644 --- a/docs/architecture/08-crosscutting-concepts.md +++ b/docs/architecture/08-crosscutting-concepts.md @@ -629,8 +629,9 @@ FR-12-23): module, met where the module passes whole: no check failed, errored or skipped. A module missing from a build's report is not measured where the suite's revision did not hold it, and not met where it did: it failed - to collect or ran out of time. The sub-characteristic is still one share - among three on its axis, however many modules it holds. + to collect. A suite that ran out of time fails every module: the build + held it there. The sub-characteristic is still one share among three on + its axis, however many modules it holds. - **Quality probes.** Each pass-or-fail probe is one target: fault tolerance, availability, capacity, resource use, co-existence and portability. A lost probe fails; a missing one is not measured. diff --git a/docs/coverage.md b/docs/coverage.md index f9e4011..ed2abc2 100644 --- a/docs/coverage.md +++ b/docs/coverage.md @@ -182,7 +182,7 @@ when: | FR-12-17 | Self-test | `report.py` "the ISO screen drops an arm worse on an axis, ranks the rest by axes better and then by cost, and keeps four"
`report.py` "an axis no target measures neither holds nor moves the ISO screen"
`report.py` "an axis that lists targets but has no reading yet holds the ISO screen"
`report.py` "the ISO screen names the arms round 6 runs and the axis that put one out" | | FR-12-18 | Self-test | `report.py` "a pilot round read by the ISO radar is only a draft, never in or under docs/reports/, and keeps its aggregate beside the registered one"
`report.py` "a pilot round read by the ISO radar says it is post hoc and that its axes decide"
`report.py` "a run read by the ISO radar refuses a cross-check, whose withheld rows its markers would still count" | | FR-12-21 | Self-test | `report.py` "the report loads a trial's quality reading beside its security reading"
`report.py` "a lost quality probe reads failed, a missing one not measured"
`report.py` "every reading the quality reader files reads as its target: lost fails, missing or a gone tree is not measured"
`report.py` "the latency target is not measured until its cutoff is registered, then met within it" | -| FR-12-22 | Self-test | `report.py` "a module passes whole only where no check failed, errored or was skipped"
`report.py` "a module absent from a report is not measured only where the suite's revision did not hold it" | +| FR-12-22 | Self-test | `report.py` "a module passes whole only where no check failed, errored or was skipped"
`report.py` "a module absent from a report is not measured only where the suite's revision did not hold it"
`report.py` "a suite the build held past its time fails every module, and one never run is not measured" | | FR-12-23 | Self-test | `report.py` "a pilot round read by the ISO radar keeps the targets it had before round 6, unless round 6's are asked for"
`report.py` "round 6's targets are refused where no pilot draft reads them" | ## 13 Records and archive diff --git a/docs/requirements.md b/docs/requirements.md index f1e449b..0f92f91 100644 --- a/docs/requirements.md +++ b/docs/requirements.md @@ -193,7 +193,7 @@ | FR-12-17 | The benchmark shall screen round 6's candidates on the ISO radar's axes: out on an axis worse, the rest ranked by axes better and then by mean cost, the top four kept; an axis no target measures shall neither hold nor move it, and an axis that lists targets but has no reading yet shall hold it. | Report | | FR-12-18 | The benchmark shall read a pilot round by the ISO radar only as a draft that says it is post hoc, never under `docs/reports/`, and keep its aggregate beside the registered one; a run read by the ISO radar shall take no cross-check. | Report | | FR-12-21 | From round 6 the benchmark shall load each trial's quality reading beside its security reading and read each quality probe as an ISO target: a lost probe fails, a missing one is not measured, and the latency target is not measured until its cutoff is registered. | Report | -| FR-12-22 | From round 6 the benchmark shall read functional correctness as one target per hidden-suite build module, met only where every check in it ran and passed; a module the trial's report lacks is not measured where the suite's revision did not hold it, and not met where it did. | Report | +| FR-12-22 | From round 6 the benchmark shall read functional correctness as one target per hidden-suite build module, met only where every check in it ran and passed; a module the trial's report lacks is not measured where the suite's revision did not hold it, and not met where it did; a suite that ran out of time fails every module. | Report | | FR-12-23 | The benchmark shall read a pilot round by the ISO radar with the targets it had before round 6, and by round 6's only where asked, refusing that request where no pilot draft would read it. | Report | ### 13 Records and archive @@ -332,7 +332,7 @@ | ID | Sub-characteristic | Target | Read from | | -- | ------------------ | ------ | --------- | | QT-01-01 | Functional completeness | Every name the specification requires is exported. | Specified names missing | -| QT-01-02 | Functional correctness | Each of the hidden suite's 19 build modules passes whole, one target per module: every check ran and passed, none failed, errored or skipped. A module missing from a build's report is not measured where the suite's revision did not hold it, and not met where it did. | Hidden suite, per module | +| QT-01-02 | Functional correctness | Each of the hidden suite's 19 build modules passes whole, one target per module: every check ran and passed, none failed, errored or skipped. A module missing from a build's report is not measured where the suite's revision did not hold it, and not met where it did; a suite that ran out of time fails every module. | Hidden suite, per module | | QT-01-03 | Functional appropriateness | Nothing nobody asked for is delivered. | Artifacts nobody asked for | ### 02 Performance efficiency diff --git a/tests/efficacy/report.py b/tests/efficacy/report.py index 71e5378..15e05c5 100644 --- a/tests/efficacy/report.py +++ b/tests/efficacy/report.py @@ -6076,16 +6076,25 @@ def quality_value(trial, name): def module_value(trial, module): """1.0 where a hidden-suite module passed whole, 0.0 where any of its - checks failed, errored or was skipped, or where the suite's revision - held it and it did not run; None where the suite did not run, or its - revision did not hold the module.""" + checks failed, errored or was skipped, where the suite ran out of time, + or where the suite's revision held it and it did not run; None where the + suite was not run, or its revision did not hold the module.""" record = path(trial, "scores", "hidden_suite") - if not isinstance(record, dict) or record.get("missing"): + if not isinstance(record, dict): + return None + revision = path(record, "report", "suite_revision") + if module in SUITE_LACKS.get(revision, ()): + return None + + # A suite that ran out of time was held there by the build under it, so + # every module fails, even where the scorer kept no rate from the run. + if path(record, "report", "timed_out") is True: + return 0.0 + if record.get("missing"): return None counts = path(record, "report", "modules", module) if not isinstance(counts, dict): - revision = path(record, "report", "suite_revision") - return None if module in SUITE_LACKS.get(revision, ()) else 0.0 + return 0.0 # A skipped check is one nobody ran, so it cannot show the module whole. unproven = sum(counts.get(key) or 0 @@ -8084,6 +8093,61 @@ def suite(modules, missing=None): "errored or was skipped", got == [1.0, 0.0, 0.0, 0.0, None], got)) + # A suite the build held past its time fails every module, both where + # pytest wrote no report, which the scorer files as missing, and where + # it wrote one partway; the records are the scorer's own, from the + # grader's timed-out report. A suite never run is still not measured. + import score + + def timed_out(raw): + def grader(argv, cwd=None, env=None, timeout=None, stdin=None): + report = {"ok": False, "timed_out": True, "exit_status": None, + "suite_revision": env["HIDDEN_SUITE_REVISION"], + "suite": "build", "python": "3.12.10", + "elapsed_seconds": 1800.0} + if raw: + report["modules"] = {module: dict(whole) for module in raw} + counts = dict(passed=5 * len(raw), failed=0, skipped=0, + error=0, total=5 * len(raw)) + else: + report["reason"] = "pytest wrote no report" + report["output_tail"] = "" + counts = dict(passed=0, failed=0, skipped=0, error=0, + total=0) + graded = counts["passed"] + counts["failed"] + counts["error"] + report.update(counts=counts, graded=graded, + pass_rate=counts["passed"] / graded if graded + else 0.0) + with io.open(argv[argv.index("--report") + 1], "w", + encoding="utf-8") as handle: + json.dump(report, handle) + return {"argv": list(argv), "cwd": cwd, "status": None, + "stdout": "", "stderr": "", "failed": None} + + trial = planted() + held = tempfile.mkdtemp(prefix="efficacy-report-suite-") + real = score.run + score.run = grader + try: + trial["scores"]["hidden_suite"] = score.run_hidden_suite( + os.path.join(held, "venv"), { + "revision": "a8e79354eda873c72c6da7319cd0f93865a16812", + "path": held}, held, "build") + finally: + score.run = real + shutil.rmtree(held, ignore_errors=True) + return trial + + unreported, partway = timed_out(()), timed_out(HIDDEN_MODULES[:10]) + unrun = suite({}, "the trial did not install") + got = (bool(path(unreported, "scores", "hidden_suite", "missing")), + {module_value(unreported, module) for module in HIDDEN_MODULES}, + {module_value(partway, module) for module in HIDDEN_MODULES}, + module_value(unrun, "test_seed.py")) + checks.append(("a suite the build held past its time fails every module, " + "and one never run is not measured", + got == (True, {0.0}, {0.0}, None), got)) + # A module absent from a report graded by a revision that did not hold # it is not measured, so correctness is the share of the modules that # ran, 17 of 18 here, not 17 of 19. Absent under a revision that held