Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
b001fca
feat(efficacy): read each build's reliability, performance and portab…
braboj Nov 15, 2026
3f88877
Merge remote-tracking branch 'origin/fix/web-probe-signs-in' into fea…
braboj Nov 15, 2026
41d917b
fix(efficacy): the quality reader signs in on a 200 and counts every …
braboj Nov 15, 2026
fd5bc37
Merge remote-tracking branch 'origin/fix/web-probe-signs-in' into fea…
braboj Nov 15, 2026
57fc90b
fix(efficacy): the 500-line probe reads the export's lines and the total
braboj Nov 15, 2026
49c439b
fix(efficacy): CI runs the quality self-test, and 500 lines cost five…
braboj Nov 15, 2026
75b34fe
fix(efficacy): a post carries its own form's token, and a NaN total f…
braboj Nov 15, 2026
504a0f1
fix(efficacy): a file URI names its own database, and a zero total fails
braboj Nov 15, 2026
93a0609
fix(efficacy): capacity reads exports only; concurrent writes run last
braboj Nov 15, 2026
906548f
docs(efficacy): say what the fuzz probe does not read, and why
braboj Nov 15, 2026
7d04ebe
fix(efficacy): each fuzz case runs on its own instance and reaches it…
braboj Nov 15, 2026
be75b63
feat(efficacy): archive and reuse carry quality readings; a failed ex…
braboj Nov 15, 2026
abdda5e
fix(efficacy): a save control's formaction picks its form; every writ…
braboj Nov 15, 2026
41aca91
fix(efficacy): co-existence reads both lists, and a stray write is fi…
braboj Nov 16, 2026
ab0c9c8
fix(efficacy): a dropped tree is not measured, and a read-only databa…
braboj Nov 16, 2026
9d82672
test(efficacy): the slowed stand-in's latency is read against its del…
braboj Nov 16, 2026
70e5755
fix(efficacy): a redirect's location is resolved against its request
braboj Nov 16, 2026
297da26
test(efficacy): only the hung writer's stand-in waits 5 s for its wri…
braboj Nov 16, 2026
1e06346
test(efficacy): the late stray write's run is killed at 120 s, not 40 s
braboj Nov 16, 2026
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 .github/workflows/self-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
outputs="$RUNNER_TEMP/self-tests"
mkdir -p "$outputs"
for module in harness generate_arm score judge report archive reuse \
progress probes security control/control trace; do
progress probes security quality control/control trace; do
echo "::group::$module"
python "tests/efficacy/$module.py" --self-test \
| tee "$outputs/$(basename "$module").txt"
Expand Down
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ py tests/efficacy/reuse.py --self-test
py tests/efficacy/progress.py --self-test
py tests/efficacy/probes.py --self-test
py tests/efficacy/security.py --self-test
py tests/efficacy/quality.py --self-test
py tests/efficacy/control/control.py --self-test
py tests/efficacy/trace.py --self-test
py tests/efficacy/trace.py
Expand Down
2 changes: 2 additions & 0 deletions docs/architecture/05-building-block-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ dependency with its keyword.
| `score.py` | Installs each frozen trial cleanly, runs the hidden suite, the static tools and the adherence checklist, counts scope and cost | The run root, the hidden suite, `scoring-requirements.txt`, `toolconfig/` | `scores/`, `scores-change/` |
| `probes.py` | The structural and web-quality probes, run inside the trial's own interpreter | A trial's tree | Its findings, to `score.py` |
| `security.py` | Seeds each app, signs in its administrator, runs the 11 security and 3 data-protection probes | The scored trees | `security-scores/` |
| `quality.py` | Signs in each app's administrator and runs the quality probes in process: malformed requests, concurrent writes, latency, a 500-line invoice, SQL per invoice line, two instances side by side; then installs the build on Python 3.14 and serves a signed-in page | The scored trees | `quality-scores/` |
| `judge.py` | Builds a blind bundle per trial, runs the judge CLI against the rubric, checks every quoted line | The scored trees | `judge/` |
| `control/control.py` | Builds the rubric control: trees damaged or improved on one row each, from two pinned bases | `base.zip`, `base-2.zip`, `overlay/` | A control root for `judge.py` |
| `report.py` | Pairs trials, computes intervals and verdicts, applies withdrawals, prints the report | The run root, the scoring area, `withdrawn.json` | `docs/reports/YYYY-MM-DD-efficacy.md` in this repository |
Expand Down Expand Up @@ -72,6 +73,7 @@ are still read.
| `tool-lock.txt` | The tool versions every trial is measured with |
| `scores/`, `scores-change/` | One score per build trial and per change task |
| `security/`, `security-scores/` | Each trial's probe files, and its readings; the probe environment goes once it is read |
| `quality/`, `quality-scores/` | Each trial's quality probe files, and its readings; both environments go once they are read |
| `judge/` | Each blind bundle, its judgings and the unblinding map |
| `archived.json` | The stamp a verified archive writes, with the hash of every file the report reads |
| `<tool>.running` | A claim that one run of that tool is working here |
Expand Down
19 changes: 15 additions & 4 deletions docs/coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ when:
| ID | Kind | Checked by |
| -- | ---- | ---------- |
| FR-12-01 | Self-test | `report.py` "a contrast crossing rounds carries no verdict and counts nowhere"<br>`report.py` "a comparison across rounds reads as not given, not too few runs" |
| FR-12-02 | Self-test | `report.py` "a contrast across rounds is unpaired, with a verdict"<br>`report.py` "a round-5d run reads H4 against a reused `none`, unpaired"<br>`report.py` "an unpaired contrast leaves out two trials, not blocks"<br>`report.py` "a contrast crosses rounds where its arms ran in different roots, reused or not"<br>`reuse.py` "a trial copied on keeps the root it ran in as its origin" |
| FR-12-02 | Self-test | `report.py` "a contrast across rounds is unpaired, with a verdict"<br>`report.py` "a round-5d run reads H4 against a reused `none`, unpaired"<br>`report.py` "an unpaired contrast leaves out two trials, not blocks"<br>`report.py` "a contrast crosses rounds where its arms ran in different roots, reused or not"<br>`reuse.py` "a trial copied on keeps the root it ran in as its origin"<br>`reuse.py` "a quality reading comes along with its trial" |
| FR-12-03 | Self-test | `report.py` "it prints every declared contrast its arms ran"<br>`report.py` "a three-arm run prints only its own contrasts" |
| FR-12-04 | Self-test | `report.py` "round 5 reports the files it supersedes without a verdict" |
| FR-12-05 | Self-test | `report.py` "the report links its appendix, and the appendix the record"<br>`report.py` "the appendix holds what produced the results, the radar's axes and the verdict vector, and nothing else" |
Expand All @@ -188,8 +188,8 @@ when:
| -- | ---- | ---------- |
| FR-13-01 | Self-test | `harness.py` "the record is written as every trial starts and ends"<br>`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"<br>`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"<br>`archive.py` "the original tarball's hash is recorded"<br>`archive.py` "the revisions are recorded"<br>`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"<br>`archive.py` "the report refuses docs/reports/ without a current stamp"<br>`report.py` "a report into any docs/reports needs the stamp" |
| FR-13-03 | Self-test | `archive.py` "readings, judgings, map and lock come; bundles do not"<br>`archive.py` "the original tarball's hash is recorded"<br>`archive.py` "the revisions are recorded"<br>`archive.py` "a reading changed in the archive fails the verify"<br>`archive.py` "an archived round drops its trees and environments" |
| FR-13-04 | Self-test | `archive.py` "a reading changed after the stamp is a problem"<br>`archive.py` "a quality reading changed after the stamp is a problem"<br>`archive.py` "the report refuses docs/reports/ without a current stamp"<br>`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"<br>`archive.py` "a restored record points at the restored tarball and void"<br>`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"<br>`generate_arm.py` "the reading map names every template of the chain once, under docs/solid-ai-templates/"<br>`generate_arm.py` "each template skill is its template verbatim, named by the manifest"<br>`generate_arm.py` "a chain file the manifest does not describe is refused" |
| FR-13-07 | Self-test | `generate_arm.py` "every built root opens with the brief, verbatim, the emitted ones too"<br>`generate_arm.py` "every committed arm's root opens with the brief, verbatim"<br>`generate_arm.py` "the brief and the facts name the stack and no tooling" |
Expand All @@ -201,5 +201,16 @@ when:

| ID | Kind | Checked by |
| -- | ---- | ---------- |
| FR-14-01 | Self-test | `score.py` "a live score.py run refuses a second"<br>`judge.py` "a live judge.py run refuses a second"<br>`security.py` "a live security.py run refuses a second" |
| FR-14-01 | Self-test | `score.py` "a live score.py run refuses a second"<br>`judge.py` "a live judge.py run refuses a second"<br>`security.py` "a live security.py run refuses a second"<br>`quality.py` "a live quality.py run refuses a second"<br>`archive.py` "a live quality.py run refuses a second" |
| FR-14-02 | Self-test | `harness.py` "an ended run is taken over"<br>`harness.py` "a live pid that is not the tool is taken over" |

## 15 Quality probes

| ID | Kind | Checked by |
| -- | ---- | ---------- |
| FR-15-01 | Self-test | `quality.py` "a sound app passes every probe"<br>`quality.py` "an app answering 500 on bad input fails fuzz_robustness, and no other probe"<br>`quality.py` "an app raising out of the client fails fuzz_robustness, and no other probe"<br>`quality.py` "an app whose form page answers 500 fails fuzz_robustness, and no other probe"<br>`quality.py` "a form that cannot be reached is no handled request"<br>`quality.py` "a value one malformed request stored reaches no other case"<br>`quality.py` "an app whose writes lock fails concurrent_writes, and no other probe"<br>`quality.py` "an app dropping an overlapping write fails concurrent_writes, and no other probe"<br>`quality.py` "the locked write is read as locked"<br>`quality.py` "a writer the app hangs fails concurrent_writes, and no other probe"<br>`quality.py` "a hung writer stops the run, every reading before it kept"<br>`quality.py` "a product a malformed request stored does not reach the concurrent writes"<br>`quality.py` "an app refusing 500 lines fails capacity_500_lines, and no other probe"<br>`quality.py` "an app that cannot show 500 lines fails capacity_500_lines, and no other probe"<br>`quality.py` "an app keeping 100 of 500 lines fails capacity_500_lines, and no other probe"<br>`quality.py` "an export with a null line fails capacity_500_lines, and no other probe"<br>`quality.py` "an export whose total is NaN fails capacity_500_lines, and no other probe"<br>`quality.py` "an export answered 500 fails capacity_500_lines, and no other probe"<br>`quality.py` "an app pricing every line at nothing fails capacity_500_lines, and no other probe"<br>`quality.py` "a database opened by a file URI with a query stays in its folder"<br>`quality.py` "a total over the first 100 of 500 exported lines fails capacity_500_lines, and no other probe"<br>`quality.py` "an app reading each line on its own fails n_plus_one, and no other probe"<br>`quality.py` "statements are counted per page, and did not grow"<br>`quality.py` "instances sharing their data fail coexistence, and no other probe"<br>`quality.py` "an app writing outside its folder fails coexistence, and no other probe"<br>`quality.py` "the stray file is named"<br>`quality.py` "a second instance whose product list answers 500 fails coexistence, and no other probe"<br>`quality.py` "a write outside before a hang still fails coexistence, the path kept"<br>`quality.py` "a database outside, opened read-only, is no stray write" |
| FR-15-02 | Self-test | `quality.py` "a sound app signs in"<br>`quality.py` "a sign-in form quoted with single quotes signs in"<br>`quality.py` "a form's own token is posted, not one from a form before it"<br>`quality.py` "a post no form's action names carries the page's first token"<br>`quality.py` "a save sent by its control's formaction carries its form's token"<br>`quality.py` "a save control outside its form, linked by its id, carries that form's token"<br>`quality.py` "a save redirected to a relative location reads as the sound app's"<br>`quality.py` "an app answering 401 until signed in, and never signing in, loses every probe"<br>`quality.py` "an app answering 403 to a malformed request loses fuzz_robustness, and no other probe"<br>`quality.py` "an app that never keeps its sign-in loses every probe, passing none"<br>`quality.py` "an app answering a malformed request with the sign-in's redirect loses fuzz_robustness, and no other probe"<br>`quality.py` "the redirect is read as lost, not as an answer" |
| FR-15-03 | Self-test | `quality.py` "an app that will not boot loses every probe"<br>`quality.py` "a trial that did not install loses every probe"<br>`quality.py` "no report from the probe is missing, not lost"<br>`quality.py` "a stalled run keeps what it read and loses the rest"<br>`quality.py` "a run that stalled booting loses every probe" |
| FR-15-04 | Self-test | `quality.py` "the latency is two repeats of 30 requests each"<br>`quality.py` "a slowed app reads slower by its delay" |
| FR-15-05 | Self-test | `quality.py` "a build that serves its page on the other Python passes portability"<br>`quality.py` "a build that boots on its own Python only fails portability"<br>`quality.py` "a build whose sign-in fails on the other Python fails portability"<br>`quality.py` "a build the other Python will not install fails portability"<br>`quality.py` "no other Python is missing, not passed" |
| FR-15-06 | Self-test | `quality.py` "a reading's environment is gone once it is read"<br>`quality.py` "a trial whose source tree is gone is missing, not lost" |
15 changes: 14 additions & 1 deletion docs/requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
- **Harness:** `harness.py`, which runs the trials.
- **Scorer:** `score.py`, which scores a frozen build.
- **Security reader:** `security.py`, which runs the probes.
- **Quality reader:** `quality.py`, which runs the reliability, performance
and portability probes.
- **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.
Expand Down Expand Up @@ -209,9 +211,20 @@

| ID | Requirement | Delivered by |
| -- | ----------- | ------------ |
| FR-14-01 | The benchmark shall refuse a second scoring, judging or security run that finds a live claim on its root. | Scorer, Judge, Security reader |
| FR-14-01 | The benchmark shall refuse a second scoring, judging, security or quality run that finds a live claim on its root. | Scorer, Judge, Security reader, Quality reader |
| FR-14-02 | The benchmark shall take over a claim naming a process that has ended, and say so. | Harness |

### 15 Quality probes

| ID | Requirement | Delivered by |
| -- | ----------- | ------------ |
| FR-15-01 | The benchmark shall fail each of the fuzz, concurrent-write, 500-line, N+1 and co-existence probes on an app planted with the fault it guards against, and no other probe there, and pass every probe on an app built to pass them; the 500-line probe passes only where the invoice previews 2xx, saves and renders 2xx, its JSON export answers 2xx and lists all 500 lines in order, each a well-formed record, with a finite, positive total, and its first 100 lines, saved alone, export a total a fifth of it within a cent; pages are read for answering, never for the amounts they show; the co-existence probe reads a database opened by a `file:` URI as the file it names, fails where either instance's product list does not answer 2xx, and fails a build that, at any time in the run, opens to write a file outside the workspace and the reader's own database root, a database opened read-only by a `mode=ro` URI being no write, each such write filed as it happens so a run killed later keeps it; each malformed request is sent to a fresh instance of its own, signed in afresh, and one whose form page does not answer 200 fails as unreached; and the concurrent writes run last, on a fresh instance of their own, a writer the app hangs failing them and stopping the run there, every reading before it kept. | Quality reader |
| FR-15-02 | The benchmark shall read every quality probe signed in as the seeded administrator, through the sign-in form's hidden fields however they are quoted, each post carrying the hidden fields of the form whose action, or one of whose submit controls' `formaction`, it is sent to, or else the page's first of each name, every redirect resolved against its request as a browser resolves it, the sign-in holding only where the dashboard then answers 200, and never measure a request the sign-in turns away with its redirect, a 401, or a 403 to a request that carried its token. | Quality reader |
| FR-15-03 | The benchmark shall count as lost, reading failed, a quality probe the trial keeps from running, by not installing, not booting, not signing in or not finishing in time, and as missing one it could not run itself. | Quality reader |
| FR-15-04 | The benchmark shall record the latency as two repeats of the 95th percentile over 30 requests to the main routes, with no pass threshold until one is calibrated. | Quality reader |
| FR-15-05 | The benchmark shall read portability on Python 3.14, the trial installed, booted and serving a signed-in page there, and leave it missing where no Python 3.14 is found. | Quality reader |
| FR-15-06 | The benchmark shall read the quality probes in a fresh environment per trial on the spec's Python, and remove every environment once it is read; a trial whose source tree is not present has every probe missing. | Quality reader |

## Quality requirements

- **Numbering:** characteristics follow ISO/IEC 25010:2023 order, 01
Expand Down
20 changes: 15 additions & 5 deletions tests/efficacy/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -330,7 +330,7 @@ def stamp(root, into):

# The tools that read and write a scoring area while they run, each under a
# claim of its own.
AREA_TOOLS = ("score.py", "security.py", "judge.py")
AREA_TOOLS = ("score.py", "security.py", "quality.py", "judge.py")


def live_run_problem(root):
Expand All @@ -357,6 +357,7 @@ def drop_trees(root):
for kind in ("tree", "venv"):
folders += glob.glob(os.path.join(area, part, "*", kind))
folders += glob.glob(os.path.join(area, "security", "*", "venv"))
folders += glob.glob(os.path.join(area, "quality", "*", "venv*"))
for folder in folders:
remove_tree(folder)
return len(folders)
Expand Down Expand Up @@ -487,6 +488,7 @@ def self_test():
and not any("credentials" in key for key in files)),
("readings, judgings, map and lock come; bundles do not",
{"scoring/scores/none-1.json", "scoring/security-scores/hybrid-1.json",
"scoring/quality-scores/hybrid-1.json",
"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)),
Expand Down Expand Up @@ -546,12 +548,13 @@ def self_test():
checks.append(("a stamped round has none", stamp_problem(root) is None))

# What scoring leaves: a trial's tree and environment, a change task's,
# and a security reading's environment.
# and a security and a quality reading's environment.
area = scoring_area(root)
leftovers = [os.path.join(area, "scoring", "none-1", "tree"),
os.path.join(area, "scoring", "none-1", "venv"),
os.path.join(area, "scoring-change", "none-1", "tree"),
os.path.join(area, "security", "hybrid-1", "venv")]
os.path.join(area, "security", "hybrid-1", "venv"),
os.path.join(area, "quality", "hybrid-1", "venv")]
for folder in leftovers:
os.makedirs(folder, exist_ok=True)
with io.open(os.path.join(folder, "left.txt"), "w") as handle:
Expand All @@ -566,14 +569,21 @@ def self_test():
dump_json(score, dict(load_json(score), planted=True))
checks.append(("a reading changed after the stamp is a problem",
"scores/none-1.json" in (stamp_problem(root) or "")))
quality = os.path.join(scoring_area(root), "quality-scores", "none-1.json")
if os.path.isfile(quality):
dump_json(quality, dict(load_json(quality), planted=True))
checks.append(("a quality reading changed after the stamp is a problem",
"quality-scores/none-1.json" in (stamp_problem(root) or "")))
out = os.path.join(scratch, "draft")
checks.append(("the report refuses docs/reports/ without a current stamp",
report.main(["--root", root]) == 2))
checks.append(("the report still writes elsewhere",
report.main(["--root", root, "--out-dir", out]) == 0
and bool(os.listdir(out))))

for tool in AREA_TOOLS:
# Named, not read from the list the archive keeps, so a tool missing
# from that list shows as an archive made beside its live run.
for tool in ("score.py", "security.py", "quality.py", "judge.py"):
checks.append(claim_refusal_check(
tool, main, root, "--into",
os.path.join(scratch, "runs", "live-" + tool)))
Expand Down
Loading
Loading