Files
Open_Ultra_SAST/docs/evaluation.md
T
Marius Ciepluch 6ef8381396 docs(readme): an adopter's front door; roadmap and engine-trace runbook move to docs
The maintainer's request of 2026-11-28, in chat: update the README for an adopter
with /cobesy; move the parts on the roadmap and on technical internals to docs;
index docs/ from the README; add a roadmap visualization with the present state
and the past milestones; then give the choices for the open items through the
menu. The menu had eleven questions, each answered with the option recommended.
Two answers govern this commit. "README first": the README work is committed with
the per-commit gate and a fresh reviewer, before the record commit for 5b and
item 5c. "Fix in this commit": the faults found while moving text are fixed here,
the wording shown first.

The wording of the two fixes was shown in chat and answered "Write it as shown
(Recommended)" and "Say why, in a comment (Recommended)". A third fault offered in
that menu, "five docs pages link README anchors that do not exist", was the
session's error: they are seven links, in four pages, to five anchors of
ops/ax/README.md and ops/README.md, and all five headings exist. Nothing was
repointed. The learning is in the handover, which is not tracked, with the
maintainer's approval.

What changed. Measured in /tmp/opencode/s10_rd1_diffcheck.out: five tracked files
changed (144 insertions, 328 deletions) and three files are new.
- README.md, 488 lines at HEAD and 296 now. It keeps the install of Tier 1 and
  Tier 2, the scan modes, the run artifacts and the maintainer commands. It adds
  "What you can run today", "Status and roadmap" (a Mermaid ladder of R0 to R6, a
  table with each step's state on 2026-11-28, a table of past milestones) and
  "Documentation", a table with one row for each of the 21 pages under docs/.
- docs/roadmap.md, new, 123 lines: the destination, the ladder with what must be
  true to move on, the release milestones M1a to M5, the past milestones, the
  status of 2026-11-06 as the README carried it, what changed after that day, and
  the rules that bind every step.
- ops/ax/engine-traces.md, new, 80 lines: the README's section "Engine traces on
  kube-ax" as it stood, with "s3://..." written "s3://<bucket>" and the link to
  ops/ax/README.md written as a path and a section name. docs/ops/ax/engine-traces.md,
  new, includes it from its line 3, as docs/ops/ax/README.md includes
  ops/ax/README.md.
- mkdocs.yml: two entries in the nav, Roadmap and Engine traces on kube-ax.
- docs/evaluation.md: one paragraph with the gate's committed baseline
  (benchmarks/measurements/2026-09-06-gate-baseline.txt: recall 93.62%, 44 of 47;
  false positives 0.0%), the day the README quoted it (2026-10-02, bdabb97), and
  that PHP is not in the gate.
- docs/examples.md: two sentences moved from the README, on the ledger block of
  manifest.json and on the MCP tool openultrasast.benchmark. The sentence that
  pointed to the README's "Scan modes" now points to architecture.md.
- docs/index.md: the state line, from 2026-10-02 to 2026-11-28, in the words that
  were shown.
- The README's pull line: a comment says that 2.0.1 is the last full release and
  that a prerelease is tagged with its version (.github/workflows/release.yml:93-95).

Left out of the README because another page already held it, each checked by grep
before the cut and then by the reviewer: Tier 3 and Tier 4, the plane, the memory
store, the decision engine, the token economics, the detection techniques, the
framework priors, and the details of the run directory, its retention and the
ledger (docs/examples.md, docs/architecture.md). The note on the retired HarnessX
keys is in RELEASE_NOTES.md, which the README links.

Checks, in files under /tmp/opencode/ that start with their command; s10_rd1_exits.txt
is the gates script's own output, ten exit codes.
- s10_rd1_pytest_docs.out: 30 passed in the five test files that read the README,
  docs and ops (test_docs_site, with the strict build;
  test_removed_plane_references; test_plane_literals; test_push_explain;
  test_engine_queue), run after the last edit.
- s10_rd1_pytest_ops.out: 141 passed and 3 skipped in seven test files that touch
  ops/ax or the hook install.
- s10_rd1_links.out: the relative links resolve, anchors included: 41 in the
  README, 5 in docs/roadmap.md, 19 in docs/index.md, 3 in docs/evaluation.md, 2
  in docs/examples.md. README.md and docs/roadmap.md hold one flowchart each, of
  seven nodes, by the checks of test_docs_site. No file under docs/ contains
  ".kiro" or "kiro-".
- s10_rd1_diffcheck.out: the new text is ASCII; git diff --check exits 0.
- s10_rd1_gates_run.out and s10_rd1_exits.txt: the gates of label rd1 give ten
  zeros.
Not verified: the README's Mermaid block in a browser.

Review.
Three rounds, read-only. The old README was split into 351 sentences and each was
traced in the README, docs/, ops/ and the release notes. Round one found a lost
sentence, now in docs/examples.md, four false states in README.md and docs/roadmap.md
(Docker, M4, the proof arm, "a human go") and three wrong counts in the message; all
are corrected. Round two found the rewording of a remark false at docs/roadmap.md:14.
Round three read every number of that page: its only detection figures are the two
recall counts of the status of 2026-11-06, as the page now says. Measured in round
three: 123 lines; 41 relative links of the README resolve, and 5, 19, 3 and 2 in the
changed pages; 21 rows for 21 pages; one flowchart of seven nodes in each of README.md
and docs/roadmap.md; a strict build with no ".kiro" or "kiro-"; 11 tests passed in
the three permitted files. The counts 30, 141 and 3 and the ten gate zeros were read
in the session's files, not re-run.
2026-11-28 16:30:44 +01:00

8.7 KiB

Evaluation

This page shows what has been measured on code the tool was not tuned on, and how. State as of 2026-10-02. Every number below is quoted from a committed record, and the record's path is given with it.

Instruments

Instrument Measures Where
Detection gate per-language recall/FP on the bundled cheat-sheet corpora (goal: >= 90% recall, < 10% FP) python -m openultrasast.gate, benchmarks/manifests/
Pair corpus fire on the vulnerable function, stay silent on its fix ousast pairs, benchmarks/pairs/
Independent populations real repositories at vulnerable, fixed and benign pins, scored under a pre-registered protocol benchmarks/independent/

Recall means the share of known bugs found. FP means false positives.

The detection gate and the local pairs are CI gates. They catch regressions. They do not estimate recall on real code, because the rules were written against them.

The gate's committed baseline, benchmarks/measurements/2026-09-06-gate-baseline.txt, records 93.62% recall (44/47) and 0.0% false positives. The README quoted it from 2026-10-02 (commit bdabb97). PHP is not in the gate.

Pair corpora

A pair is a vulnerable function and its fixed version. You can run the catalog benchmarks/pairs/catalog.toml and the slice directories with ousast pairs --slice <name>. The slices are local, github, sast, vfc, vibe-py, vfc-js, agent-vfc and owasp.

  • Each pair carries a provenance profile and a train/holdout split (--profile, --split).
  • Pointer pairs are not vendored. --pointers fetches them into ~/.cache/openultrasast/pairs/.
  • benchmarks/pairs/README.md documents the schema and the review tiers.

advisory-fixes (benchmarks/pairs/advisory-fixes/, 2026-10-01) holds 97 pointer pairs, one per repository. Each is a public CVE/GHSA fix commit. The function the advisory names is declared on both sides and changed by the fix.

It was assembled to give the decision engine real negatives (fixed, non-vulnerable code). It targets families the corpus had few of: access control, deserialization, output encoding, path, untrusted destination. It is a label source of the decision engine (src/openultrasast/learn/sources.toml), not an ousast pairs slice. The research log and every rejection are in research-2026-10-01.md.

Independent populations and the M4 gates

M4 is the qualification milestone of the pre-push safety net. It requires all of these together:

  • at least 95% actionable precision;
  • at least 90% supported recall;
  • at least 95% supported-check completion;
  • the runtime gates;
  • zero fixed-side or benign false alerts.

A population is a set of real repositories. Its lifecycle has three steps:

  1. It is frozen before any of its cases is scanned.
  2. It is scored once under a pre-registered protocol.
  3. It is then spent: it may inform changes, but it can no longer qualify anything.
Population Status Result Record
v1 (11 cases) spent engine: recall 1/11, precision 1/12, 4 fixed-side and 1 benign false alert; every M4 gate failed. Eight of eleven cases completed no question at the vulnerable pin. benchmarks/independent/results-v1.json
v2 (17 cases) spent engine: recall 0/17, 3 benign alerts, completion 13,206 of 108,374. Tool hunter: recall 1/17, precision 2/14, 1 fixed-side and 16 benign alerts, $8.88. No M4 gate met by either. results-v2.json, results-v2-hunter.json
v2, model-driven pipeline exploratory (v2 already spent) stopped after 7 of 17 cases when the account emptied: recall 4/7; precision not adjudicated; no gate measurable results-v2-model-pipeline.json
v3 (PHP, 15 cases; one SSRF slot left empty by the selection rule) frozen, untouched none: it is the one-time final check, run once under protocol-v3.md after a prediction is committed population-v3-php.toml, freeze-v3-php.json
v4 (11 cases: 4 PHP with JavaScript, 4 TypeScript, 3 Python) frozen 2026-11-23, unscanned none: it has not been scanned; its one run follows protocol-v4.md, after the candidate is frozen at M3 population-v4.toml, freeze-v4.json, protocol-v4.md

v3 is reserved. Development and analysis work never reads its cases. tests/test_independent_population.py fails when anything in the development tree names one of its repositories. That covers a recipe, catalog, manifest or measurement. The same guard covers population v4, frozen on 2026-11-23 and not scanned. Its run follows protocol-v4.md, committed before any scan.

stateDiagram-v2
    [*] --> Frozen: cases selected and frozen before any scan
    Frozen --> Scored: scored once under the pre-registered protocol
    Scored --> Spent: result recorded
    Spent --> [*]: may inform changes, can no longer qualify anything
    note right of Frozen
        v3 (PHP, 15 cases) waits here as the one-time final check,
        run once after a prediction is committed
        v4 (11 cases, frozen 2026-11-23) waits here too, unscanned
    end note
    note right of Spent
        v1 and v2 are spent
    end note

Folds: how learned decisions are kept out of their own training data

The decision engine is evaluated on repositories it was not shown (src/openultrasast/learn/folds.py). Every split is by repository group. A group is the label builder's normalised owner/name, merged across URLs, forks and shared advisories. Splits cover all corpora and are seeded and deterministic.

flowchart TD
    groups["All repository groups with labels"] --> c["Compile split: 25% of groups, never evaluated"]
    groups --> rest["The other 75%"]
    c --> boot["C_boot 60%: demonstrations"]
    c --> val["C_val 40%: instruction scoring"]
    rest --> outer["Outer grouped 5-fold: calibration cross-fitted, operating points nested"]
    rest --> loso["Leave-one-source-out: a source held out whole"]
    rest --> lofo["Leave-one-framework-out: frameworks with at least 10 groups"]

assert_disjoint runs before a compile. It checks that the compile split and the evaluation folds share no group. A framework with fewer than 10 groups gets insufficient data instead of a fold. As of 2026-10-02, the outer folds have been run for the six evaluable families. Leave-one-source-out and leave-one-framework-out have not (decision-engine.md).

The plane increment

The first increment of the agentic plane ran on google/ax. It used the model-driven pipeline's validation set: 46 candidates in 15 cases of v2, with 20 declared vulnerable sites. It was compared with the script pipeline on the same cases, candidates, pins and recorded triage.

The pre-registered gate: at least 16 of 20 declared sites agreed, at a cost per candidate under $0.022.

  • Increment 1 (2026-09-29, benchmarks/independent/plane-increment-1.json): 14 of 20 declared sites agreed, against the reference's 16. Cost was $0.0194 per candidate with recorded triage. NOT MET on recall. Correction (2026-09-30, in the record): the first version misread agree's declared_sites_matched. That field is coverage by candidates (19), but it was read as "found in either pass". So the first version concluded detection was unchanged. Recounted from the agreed rows, the plane's passes flagged 17 of 20 declared sites in at least one pass. The reference flagged 19.

  • Increment 2 (2026-09-30, benchmarks/independent/plane-increment-2.json): came after the design revisit. It added a tie-break pass c on the 10 disputed candidates, with 2-of-3 agreement. 16 of 20 declared sites agreed (reference 16). Cost was $0.0205 per candidate over 46, and $0.02195 over the 43 after triage (reference: $0.022). MET, with two caveats the record carries:

    1. The tie-break was chosen after seeing the first measurement on the same validation set. So this compares plane with script and qualifies nothing on an independent population.
    2. The plane's passes still flag fewer declared sites than the reference (17 vs 19).

    Precision is not part of this gate and remains the open problem.

The decision engine

Two slices have been measured out of repository: injection (2026-10-01) and six families (2026-10-02). The engine is not adopted. Where we stand shows the state against the gates in one place, with the plane increment and the populations above. The per-family tables are on decision-engine.md.

Removal of the earlier agentic extra

The earlier agentic extra was removed on 2026-09-30. The removal was checked for byte-identical deterministic outputs: pair replay, quick benchmark, standard scan. Records: benchmarks/measurements/2026-09-30-harnessx-removal-baseline/ and -equality/.