Commit Graph
513 Commits
Author SHA1 Message Date
Marius Ciepluch 55583b34c3 fix(images): the replay entry leaves benchmarks/unseen, so the replay stage builds (item 5b)
The maintainer's answer of 2026-11-27 to question 1 of the ninth session's menu, "Move the
file, fix now": the script leaves benchmarks/unseen for a path the build context keeps, and
the four references follow. .dockerignore:32 has excluded benchmarks/unseen since 9017038
(2026-11-24), so the COPY of the replay stage of plane/Dockerfile.engine-task stopped the
build. Measured again here from the root context, with scratch Dockerfiles: a COPY of the old
path fails with "not found", a COPY of a kept path succeeds, and after the change a COPY of
the new path succeeds.

What changed:
- benchmarks/unseen/replay_entry.py is benchmarks/replay/replay_entry.py (git mv, the
  content unchanged). The directory is the session's choice; no decision names it. The
  script's own line 18 looks for learn/ beside its own directory (parents[1] / "learn"), so a
  sibling of benchmarks/learn keeps that line as it is. Measured in a probe image: with the
  file directly under benchmarks/, the import of engine_task_entry fails at line 19.
- plane/Dockerfile.engine-task:47 copies the new path to ./benchmarks/replay/. The command
  of benchmarks/unseen/replay.py:46 names /app/benchmarks/replay/replay_entry.py. The two
  tests import benchmarks.replay.replay_entry.
- tests/test_task_images.py gains test_copy_sources_are_kept_by_the_build_context, over the
  four Dockerfiles that build from the root context: a COPY source that the root .dockerignore
  excludes stops the build.

Evidence:
- RED: the new test on a git archive of HEAD plus the new test file, 1 failed and 3 passed
  (the engine-task Dockerfile copies benchmarks/unseen/replay_entry.py); the first version of
  the helper gave the same on the working tree before the move.
- GREEN: 458 passed over tests/test_task_images.py, tests/test_unseen_*.py,
  tests/test_independent_population.py and tests/test_search_image.py after the move, and
  tests/test_task_images.py again, 27 passed, after the helper was hardened.
- ruff, mypy, the three gates and compileall pass, and the gates print what they printed
  before. `git diff --check` exits 0. No whole-suite run: that is step 9.
- An independent reviewer approved the change in one round. Its optional hardening of the
  helper is applied after the approval, as proposed: a line of .dockerignore is now matched
  against the path and each directory above it, where the first version took a line without a
  wildcard by prefix only. Two shapes stay as the reviewer found them: a line written with a
  leading ./ or /, and a `!` line with a wildcard are not read as Docker reads them.
- The scratch is under /tmp/opencode/s10_* and is not kept.

Side effect, by reading: the root Dockerfile copies the whole benchmarks directory
(Dockerfile:44), so the next scan image carries benchmarks/replay/replay_entry.py, where the
file was excluded with its directory. No image is rebuilt.

Found and not fixed, for the maintainer: after this commit the replay job of
engine-image.yml builds again, and the image it publishes cannot start its entry. In an
image built from plane/Dockerfile.engine-task the import at benchmarks/learn/
engine_task_entry.py:17 (from benchmarks.valid.artifact_contract, from 11059c4c of
2026-11-03) has nothing to resolve. By reading: the engine stage copies pyproject.toml,
README.md, LICENSE, src and three named files of benchmarks/learn, and the replay stage adds
one file, so neither image holds benchmarks/valid. Measured on the shipped scan image
openultrasast:dev 3f959b31f2f2 (built from 88ea171, before this change) with the network
off; the engine image and the replay image were not built or run here, and the runner's
environment was not read: `python3 /app/benchmarks/learn/engine_task_entry.py`, the way
benchmarks/learn/engine_trace_ax.py:38 launches the engine workload, stops at line 17 with
"No module named 'benchmarks'"; with /app on the path it stops with "No module named
'benchmarks.valid'", because 9017038 keeps benchmarks/valid out of every image; and the
replay actor's command in a probe image built from the scan image stops at
replay_entry.py:19 and then at that line. So a green replay job is not a working replay. The
fix is a decision: carry artifact_contract.py in the two stages, move
write_benchmark_artifact out of benchmarks/valid, or make the import lazy. It is not made
here; the fault is outside the answer.

Left as they are: .kiro/steering/roadmap.md:289 and
.kiro/specs/engine-change-scoped-analysis/brief.md:36 name the old path in the image
(steering is the maintainer's; both are reported); the contributor-scan record,
benchmarks/measurements/2026-10-04-unseen-06-scorer/record.json:8 and a PATHFINDER document
are dated records. No test reads the command path of replay.py:46 against the COPY's
destination; they agree by reading.
2026-11-27 16:00:32 +01:00
Marius Ciepluch efa2b62bff feat(contributor-scan): pin Open Notebook as the whole vibe-code checkout (5.2, part 1)
benchmarks/repos/open-notebook.toml pins lfnovo/open-notebook at 89eac04c
(tag v1.8.3, MIT), chosen by the maintainer from a shortlist: 462 files in
two languages, 101 Python and 197 TypeScript or JavaScript. It holds one
known entry for each of the eight published advisories whose range covers
the pin, five in scope and three out with the reason in each, and asserts no
rung. Every site was read in the code at the pin, and the fix statements in
the code of the fixed trees rather than in the advisory text.

What the recipe says about scope, so that the measurement is read correctly:
two in-scope entries hand the value to a dependency that performs the sink
(a file read and an HTTP request in content-core), and one sits in
docker-compose.yml, which no scan opens. The engine cannot entail a flow to
a callee that no sink table names, so a miss on those is structural. Only
CVE-2026-33588 has its sink in the tree. The recipe also states what the
learning labels would make of the YAML entry, were a source to list it.

The measurement is part 2 and runs in the image.
2026-11-24 16:06:32 +01:00
Marius Ciepluch 6edae3a585 feat(contributor-scan): a scan writes its run to the user cache, and the ledger only when it learns (3.1, part A)
Where a scan writes. A native scan now creates its run under the user cache,
~/.cache/openultrasast/runs/<scan-id>/ by default ($XDG_CACHE_HOME when it is
set and absolute), prints run_dir=<path> once, and no longer writes anything
under the analysed tree. OPENULTRASAST_RUNS_DIR still wins: an absolute value
is used as given, a relative one resolves against the working directory.
Pre-push storage is unchanged.

The calibration ledger, by maintainer decision: .openultrasast/calibration/
stays the store, and a scan writes the false-positive ledger into the tree
only when its content would change. On a read-only tree the scan records
ledger_not_written, with a sentence in the report, and completes; before, a
read-only target with one rejected finding crashed before report.md existed.

benchmarks/repos/measure.py follows the printed run directory. It read the
run from under the scanned copy, which would have recorded every repository
as failed, and it also read a stale run left in a copy.

Tests: tests/test_scan_output_location.py drives the real CLI and compares
the whole tree before and after; tests/test_repo_measure.py pins the
measurement script; an autouse fixture keeps every test's scan runs out of
the developer's cache; fourteen test files follow the run to its new place.
README, docs/examples.md and the scan skill name the ledger as the one write
a scan makes. _run_scan is touched by one line and stays over the complexity
cap.

Task 3.1 stays open for part B, the readable summary.
2026-11-24 15:33:35 +01:00
Marius Ciepluch ab2f55d8ae spec(contributor-scan): close the deferred decisions 4.1 and 4.2 on the maintainer's record
Task 4.1 (Req 7.1), decided 2026-11-24: "C memory-safety beyond string-function misuse
is out of scope. Record that, and say so per corpus slice." The decision is recorded in
the spec's amendment record, the steering overview and roadmap, and the user docs; the
pair corpus README states it per slice (vfc, sast, local). The maintainer stated no
reason, so the records name the evidence that was on record and label it as such: the
memory family models calls, not arithmetic; no execution tier is adopted, since
Rung.EXECUTION_CONFIRMED has no producer; of the 176 vfc pairs none is labelled as going
through a string API the family models (129 carry no sink label, counted 2026-11-24).

With it, task 5.3 (the C harvest of Req 9.2) and task 2.13 are withdrawn, and task 2.15
closes on its recorded-decision branch. Req 9.2 is left unmet and its text stands. The
entailment at contrib/examples/iccfrompng.c:124, libpng's last one by task 2.13's
account, now has nothing that removes it; that is recorded as to be re-measured.

Task 4.2 (Req 7.2), decided 2026-11-24: "Keep both, record why. No output change for
JSON, SARIF or MCP consumers. Record the reason in the spec and docs, and revisit when
detection-core revises its consumer contract." rung is the model ladder's verdict;
evidence_level is the pattern and overlay pipeline's vocabulary, which the overlay raises
only to static_corroboration. Folding one into the other would present a text match as a
model verdict or change the JSON, SARIF and MCP output. No code changes.

Reviewed in four adversarial rounds; the fourth approved both records.
2026-11-24 14:17:30 +01:00
Marius Ciepluch ca87f4c0a2 bench(independent): pre-registered protocol v4 before any scan
Protocol v4 fixes, before any scan of population v4: the one-time M4 run
after the candidate frozen at M3; three instruments at one analyzer
commit (engine, enabled quick rules, the pre-push hook as the M4
answer); matching with file scope equal to module scope; the v3 gates
per instrument; zero model spend, a model instrument only by amendment
committed before the first scan.

Decisions 1-5 and the hook candidate set are the maintainer's; the
controller's drafting decisions are listed separately in the
confirmation section.
2026-11-23 21:05:07 +01:00
Marius Ciepluch 2951f7d53a fix(valid-detection-benchmark): refuse a wrong-typed stage product as an instrument failure
A run stage that returned None or a product of another type escaped the run
command as a raw AttributeError, or was passed on to the next stage. The
run command now type-checks every stage product against its declared type
and persists an IMPAIRED outcome at that phase with reason
INSTRUMENT_FAILURE; the spent flag stays what durable custody says. Seam
refusals are still re-raised and the INTERRUPTED path is unchanged.
2026-11-23 20:15:28 +01:00
Marius Ciepluch f9d29aa6e8 fix(valid-detection-benchmark): bind a production spend stage for the adapter path
Add bind_case_adapter_spend_stage and export it from the run module: the
stage derives the preparation from the adapter request and commits the
shared spend through commit_preparation_spend_and_release, so a receipt
minted on this path satisfies the core's shared-spend validation. The
legacy release is refused on the same path (contrast test).

The bound stage refuses a stage product that differs from the execution the
request was validated for, before any custody read or write.
2026-11-23 20:15:21 +01:00
Marius Ciepluch 5fdf65e02d fix(valid-detection-benchmark): mint the shared spend receipt from the preparation
Add commit_preparation_spend_and_release: the shared label spend mints its
custody receipt from preparation.label_release_request, which is what the
core's shared-spend validation requires (arm id and influenced artifact
digest of the authority). commit_spend_and_release keeps its behaviour and
its mint order; its receipts cannot satisfy a preparation and are refused by
the replay, as a contrast test now pins.

Closed refusals, all before any write unless stated: wrong preparation type,
head unavailable or moved (no CAS), lost CAS, labels unreadable after the
committed spend (labels_spent true).
2026-11-23 20:15:09 +01:00
Marius Ciepluch 58b2021247 style(valid-detection-benchmark): apply ruff format to three benchmark modules
admission_spend.py, admission_case_adapter.py and run.py were still
unformatted at HEAD (CI runs ruff format --check over the whole tree).
Formatting only: the abstract syntax tree of each file is identical to
the previous revision.
2026-11-23 20:15:02 +01:00
Marius Ciepluch c97564343e bench(independent): freeze population v4 (11 cases)
freeze.py verified every case with git and file reads only (exit 0). A hand
review in two independent sessions then read each sink at the vulnerable pin
and each benign diff. Eleven cases stand; irrd-host-header-reset-poisoning
was dropped (its declared sink file holds no link construction and the fix
touches none of the link files, so the sink rule cannot be met).

4 PHP with JavaScript, 4 TypeScript, 3 Python; injection 6, untrusted
destination 3, configuration 2. Nothing in it has been scanned, traced,
probed or censused. protocol-v4.md must be committed before the first scan.

freeze-v4.json is pinned in reservation_guard_sources.py beside the
research record, so the guard fails loudly if either file changes.
2026-11-23 17:41:29 +01:00
Marius Ciepluch 624816f36c bench(independent): reserve population v4 (12 cases) by maintainer selection
Reserve a fourth independent population for milestone M4: twelve
repositories (four PHP, four TypeScript, four Python) chosen by the
maintainer from a sixteen-candidate research record built without a
clone or a scan. None of the twelve is named anywhere else in the
development tree.

The research record is pinned by SHA-256 in the reservation guard so the
production guard accepts the one file allowed to name the reserved
repositories. The population is reserved, not frozen: pins, sink
presence and benign changes are verified by the freeze step. Nothing in
it has been scanned, traced, probed or censused.
2026-11-23 16:03:59 +01:00
Marius Ciepluch 364b4c0777 test(valid-detection-benchmark): pin each fix-site key element and non-integer closure totals
- one sourcing-queue pair per fix-site key element (path-only,
  function-only), each proven red by dropping that key line alone
- the closure decode test covers a self-consistent bool total next to
  the float total
- the _request_order docstring names the two ties that remain open
  (fix revisions; shared candidate digest with another family or CWE)
2026-11-23 13:31:01 +01:00
Marius Ciepluch bacbe53a0b style(valid-detection-benchmark): apply ruff format to 15 benchmark modules
CI runs ruff format --check over the whole repository, and these modules under benchmarks/valid were the last unformatted files. Formatting only: the AST dump of every file is identical to the previous revision and the logical line count is unchanged (admission_execution.py and admission_projection.py stay at 400).
2026-11-23 11:42:55 +01:00
Marius Ciepluch 67bc37cac6 fix(valid-detection-benchmark): break sourcing-queue ties on fix-site path and function
Candidates that differed only in fix-site path or function were selected by input order under the queue cap. Both scalars are now part of the request order, so cap selection no longer depends on input order for them.
2026-11-23 11:40:09 +01:00
Marius Ciepluch 9e884e8342 fix(valid-detection-benchmark): require a strict integer for the accepted positive total
total_accepted_positives accepted floats and booleans on both the direct and the decode path. Both now fail closed with STATE_MISMATCH through one sibling helper that keeps _validate_closure within the complexity cap.
2026-11-23 11:40:09 +01:00
Marius Ciepluch 60bb7f0bdd fix(valid-detection-benchmark): fail cohort selection closed on a malformed pending ledger
_ledger_facts accepted any pending_entries value and turned it into a set; a ledger outside the durable shape is now a STATE_MISMATCH on both selection rounds. The _pending_by_ecosystem docstring now states the conflicting-accepted-review corner accurately.
2026-11-23 11:40:09 +01:00
Marius Ciepluch 7e6da2efae fix(valid-detection-benchmark): normalize mixed-case .git suffixes in reservation identity
A reference such as OWNER/REPO.GIT escaped the reserved-identity check at both reservation sites because the suffix was stripped case-sensitively. One shared strip now handles the suffix case-insensitively; identities without a mixed-case suffix are byte-identical.
2026-11-23 11:40:09 +01:00
Marius Ciepluch da5323002e feat(valid-detection-benchmark): 11.3 end-to-end lifecycle with case adapter and hostile-decode retrofit 2026-11-23 02:50:12 +01:00
Marius Ciepluch c587f25bb3 feat(valid-detection-benchmark): 10.7 freeze and causally bind replacement baseline 2026-11-22 22:27:09 +01:00
Marius Ciepluch 93ebea7b93 feat(valid-detection-benchmark): 10.6 draw and validate ordinary-change population 2026-11-22 21:38:26 +01:00
Marius Ciepluch c2b5f5bc92 feat(valid-detection-benchmark): 10.5 ingest fourth cohort and close positive set 2026-11-22 20:12:03 +01:00
Marius Ciepluch 6d66501192 feat(valid-detection-benchmark): 10.4 select and ingest third reviewed cohort 2026-11-22 19:16:54 +01:00
Marius Ciepluch 408a562c41 feat(valid-detection-benchmark): 10.3 ingest bounded reviewed JavaScript/TypeScript cohort 2026-11-22 18:42:51 +01:00
Marius Ciepluch 825e680804 feat(valid-detection-benchmark): 10.2 ingest bounded reviewed Python cohort 2026-11-22 10:25:59 +01:00
Marius Ciepluch 34344234d5 feat(valid-detection-benchmark): 10.1 create bounded sourcing and review queues for both initial ecosystems 2026-11-21 21:29:52 +01:00
Marius Ciepluch 38e12282da feat(valid-detection-benchmark): 9.3 publish benchmark-only run, resume, and status commands 2026-11-21 19:27:27 +01:00
Marius Ciepluch 4085f236f3 feat(valid-detection-benchmark): 8.6 resume exact pre-spend and post-spend workflows without changing authority 2026-11-21 17:39:10 +01:00
Marius Ciepluch 6fad162962 feat(valid-detection-benchmark): 8.5 produce every scoped report and one complete evaluation replay 2026-11-21 16:34:30 +01:00
Marius Ciepluch 475ff3a5fe feat(valid-detection-benchmark): 8.4 project exact-scope cases and promote only matching differential proof 2026-11-21 15:23:51 +01:00
Marius Ciepluch 14036e1ec9 feat(valid-detection-benchmark): 8.3 commit spend before label release with independent V3 case review 2026-11-21 14:11:01 +01:00
Marius Ciepluch 14bf931f01 feat(valid-detection-benchmark): 9.2 remove replacement authority from legacy aggregate scoring 2026-11-21 13:39:38 +01:00
Marius Ciepluch 9ba0a9d4c5 feat(valid-detection-benchmark): 8.2 execute and seal planned observations before spend 2026-11-21 12:41:55 +01:00
Marius Ciepluch a7adc99d31 feat(valid-detection-benchmark): 9.1 route catalog, verification, and assembly through new authorities 2026-11-21 12:41:42 +01:00
Marius Ciepluch 3a9f1d12ab feat(valid-detection-benchmark): 8.1 admission preflight with sealed retry authority 2026-11-21 11:10:05 +01:00
Marius Ciepluch 8b0cf664b3 feat(valid-detection-benchmark): render deterministic transport-neutral operator reports 2026-11-21 10:25:33 +01:00
Marius Ciepluch cf4467aa5e feat(valid-detection-benchmark): implement causal workflow journal with lease-protected head 2026-11-20 22:25:06 +01:00
Marius Ciepluch 0ba6d22d17 feat(valid-detection-benchmark): define closed workflow outcomes and redacted serialization 2026-11-20 21:35:16 +01:00
Marius Ciepluch b1a7ccd231 feat(valid-detection-benchmark): integrate sealed pre-spend diagnostics with reviewed development opening 2026-11-20 20:25:08 +01:00
Marius Ciepluch c122c72da1 feat(valid-detection-benchmark): freeze exact observation checkpoints 2026-11-17 22:42:00 +01:00
Marius Ciepluch 06cee280df feat(valid-detection-benchmark): isolate label blind arm execution 2026-11-17 20:34:11 +01:00
Marius Ciepluch 6a71a86ee5 feat(valid-detection-benchmark): combine preserved arm observations 2026-11-17 17:34:49 +01:00
Marius Ciepluch abe3f9ccd9 feat(valid-detection-benchmark): register immutable evaluation arms 2026-11-17 16:47:55 +01:00
Marius Ciepluch 990eda3506 feat(valid-detection-benchmark): enforce monotonic durable custody 2026-11-17 16:11:24 +01:00
Marius Ciepluch 7f1539a7ca feat(valid-detection-benchmark): probe custody store capabilities 2026-11-17 15:52:05 +01:00
Marius Ciepluch b8a7e66cd6 feat(valid-detection-benchmark): recover durable authority projections 2026-11-17 14:37:20 +01:00
Marius Ciepluch ce7bc1842c feat(valid-detection-benchmark): persist content addressed artifacts 2026-11-17 13:59:33 +01:00
Marius Ciepluch 26b6174510 feat(valid-detection-benchmark): integrate reviewed label blind manifest 2026-11-17 13:35:45 +01:00
Marius Ciepluch 67312fc39f feat(valid-detection-benchmark): separate public private and sealed materials 2026-11-17 13:07:06 +01:00
Marius Ciepluch 4196effcd0 feat(valid-detection-benchmark): classify and freeze canonical population 2026-11-16 18:41:49 +01:00
Marius Ciepluch 0dd4d35519 feat(valid-detection-benchmark): draw representative ordinary changes 2026-11-16 18:09:48 +01:00