Commit Graph
1344 Commits
Author SHA1 Message Date
Marius Ciepluch d8b4cac023 fix(shell): the wrapper says so when it cannot make its runs directory (item 5b)
The maintainer's answer 4 of 2026-11-27, "Guard it" (.kiro/handover.md:1409-1413), as
offered: "a clear message when HOME is unset, and a failed mkdir stops the wrapper
with exit 1; a test first." The fault it answers, in the same words: "With HOME unset
the wrapper now fails ($HOME/.cache becomes /.cache), where it wrote ./.ousast
before; a failed mkdir is not checked, as before."

What changed
- ops/shell/ousast.sh, the container path: the wrapper returns 1 with "ousast: HOME is
  not set, so there is no ~/.cache/openultrasast/runs to write the runs to" when HOME
  is unset or empty, and with "ousast: cannot create <runs>, where the runs are
  written" when mkdir -p fails (mkdir's own line comes first).
- The two lines that set `runs` and ran mkdir -p moved up to that place, from after the
  build. The placement is the session's reading of "stops the wrapper": a cold build
  pulls ~2 GB, and a run that cannot write its runs should say so before it waits.
- The native path names no HOME and is not touched.

Tests (tests/test_shell_wrapper.py)
- test_the_container_path_stops_when_home_is_not_set: exit 1, that one line on
  stderr, nothing on stdout, so neither the build nor the container is started.
- test_a_runs_directory_that_cannot_be_made_stops_the_wrapper: a file where
  $HOME/.cache should be; exit 1, the wrapper's line last on stderr, nothing on stdout.
- The helper `ousast` takes `without_home`. The docker stub answers `image inspect`
  with exit 1, so the wrapper takes its build branch in each test that reaches the
  build (the second and the third); before that, "nothing on stdout" said nothing
  about the build.
- RED, on an archive of HEAD with the final test file (s10_c4_red5.out): 2 failed, 3
  passed, each `assert 0 == 1`. For the reason of the fault: the wrapper builds, mkdir
  is refused ("/.cache: Permission denied", run as uid 1000) or fails ("Not a
  directory"), the wrapper goes on to the container (with reports=/.cache/... when
  HOME is unset), and the exit status is 0.
- GREEN, on the working tree (s10_c4_green5.out): 5 passed.
- A mutant with the guard behind the build fails both new tests on the build's line
  (/tmp/opencode/s10_c4_mutant.py, output s10_c4_mut.out), so the tests pin the
  placement; with another shebang in STUB it fails the same way (s10_c4_nopin.out).
- Gates (s10_c4e_exits.txt): ten zeros; the three gate outputs equal the baseline's.

Measured outside the stubs (/tmp/opencode/s10_c4_probe.sh, output s10_c4_probe.out):
real bash on this machine, the native path switched off so that no probe can scan.
HOME unset, HOME empty, and bash under set -u with HOME unset each print the one line
and exit 1; a file at $HOME/.cache prints mkdir's line, then the wrapper's, exit 1.

By reading, not measured
- zsh can source the wrapper as well. The block uses `[ -z "${HOME:-}" ]`, `local`,
  `if ! mkdir -p`, `echo ... >&2` and `return 1`; zsh is not installed here, so no
  probe ran.
- A run as root with HOME unset had another shape on HEAD: mkdir -p /.cache succeeds
  there, so the runs went to the filesystem root with no error. The guard closes it
  the same way. This session's runs are as uid 1000.

Found and not fixed, for the maintainer
- The helper's second parameter is `executables`. The third test passes "scan" there
  (tests/test_shell_wrapper.py:65, HEAD:63), which makes four stubs named s, c, a and
  n beside docker's. Nothing calls them. The new tests pass an empty tuple.
- A runs directory that exists but cannot be written to passes the guard: mkdir -p
  exits 0 on it (s10_c4_readonly_runs.out), and the wrapper goes on to docker. The
  decision says "a failed mkdir".
- The container path reads $HOME/.cache alone and ignores XDG_CACHE_HOME, which the
  native path honours (src/openultrasast/config.py:198-203); README.md:189-190 and
  docs/examples.md:3-5 state the rule for every run. From before this commit.
- ops/shell/ousast.ps1:44-45 has the same shape, a New-Item whose result is not
  checked, after the build. Read, not run: pwsh is not installed.
- The wrapper's message for an unset HOME (ops/shell/ousast.sh:53) describes the
  container path, which reads $HOME alone. Without HOME, Python's Path.home() and
  bash's `~` still give /home/mc on this machine (s10_c4_pathhome.out), and a native
  scan's default runs directory comes from the former unless XDG_CACHE_HOME is set to
  an absolute path (src/openultrasast/config.py:198-203 and :216-226). As decided.

Review
- Review: four rounds against 7396887, all by one reviewer subagent. Round one
  approved the change with seven remarks; six were carried into the test file and
  this message, and the seventh is the last bullet above. A probe of the reviewer
  started one container by mistake, against the brief: it failed at creating its run
  directory, and nothing of it remains (/tmp/opencode/s10_c4_after_review_docker.out).
  Round two approved the code and the tests on one condition, met in this message
  ("in every test" became "in each test that reaches the build"), and remarked that
  the docker stub's shebang was its second line. Round three approved the tree as it
  stood and remarked that the stub's inserted line depended on the shebang's text.
  Round four approved the final tree. Docker was not run in rounds two to four.
2026-11-27 18:24:11 +01:00
Marius Ciepluch 739688730f fix(push): the background child is started with -P, as the wrapper is (item 5b)
The maintainer's answer of 2026-11-27 to question 3 of the ninth session's menu, "Add -P there
too", as offered: one line, a test first, a reviewer.

src/openultrasast/push/background.py starts the detached replay of `ousast pre-push --engine
background` with the interpreter, -m and openultrasast.cli, from the pushed repository. With -m
alone the working directory is first on the interpreter's path, so a file of the pushed repository
could stand in for a module the CLI imports. The wrapper's native path had the same fault and was
fixed with -P in a6e8e26; the reviewer of that commit found this one and it was left alone.

The child is now started with -P, which keeps that directory off the path. The flag needs Python
3.11, the project's floor (pyproject.toml).

Measured by the new test, with a real child process: tests/test_push_background.py puts a json.py
that exits into the pushed repository and starts the child. On a git archive of HEAD the child's
log is "SHADOW-EXECUTED" and its artifact is never written (s10_c3_red2.out). With the change the
artifact is written and the log does not hold that line, on this host's default PATH, where Joern is
not found (the child ends in about 1 s), and with Joern 4.0.625 and its JavaScript
frontend on PATH, where the child uses its whole deadline (s10_c3_green2.out, s10_c3_green3.out).
The five push test files give 106 passed. ruff, mypy, the three gates and compileall pass, and the
gates print what they printed before (s10_c3b_exits.txt). `git diff --check` exits 0. No
whole-suite run: that is step 9.

An independent reviewer blocked the first round on the test: its wait equalled the child's
deadline, so it was red on a host where the engine can build a JavaScript graph (1 failed,
4 passed). The child's deadline is now 5 s. The second round approved the final diff.

Found and not fixed, for the maintainer:
- The container path has the fault too, by one probe. docker-compose.yml:37 sets the working
  directory to /work, and the wrapper's own comment (ops/shell/ousast.sh:13-16 and :34-35) says
  the container runs in the caller's directory. On the local openultrasast:dev image
  3f959b31f2f2, network none, a tree that holds such a json.py mounted at /work: the image's own
  entrypoint (Dockerfile:46, python -m openultrasast.cli) prints SHADOW-EXECUTED for --help and
  exits 1; the same tree with -P prints the usage (s10_c3_container_probe.out). The wrapper and
  compose were not run, and the published image was not probed.
- ops/ax/smoke-run.sh:9 and :12, ops/ax/up.sh:14 and ops/ax/probe-placement.sh:16 run this
  checkout's code with -m and without -P, in the caller's directory (by reading): the CLI at
  smoke-run.sh:12, openultrasast.plane.profile at the other three.
- src/openultrasast/plane/runner.py:678 starts a task's module with -m from the task's first
  workspace (by reading). Whether a file of that workspace can stand in for a module the task
  imports was not measured.
- The two launches in src/openultrasast/search/demo.py use -I, which keeps the directory off the
  path.
2026-11-27 17:49:08 +01:00
Marius Ciepluch f6b1406541 fix(model): a failed judge call is recorded and ends the asking (item 5b)
The maintainer's answer of 2026-11-27 to question 2 of the ninth session's menu, "Record and stop
asking", as offered: "a failed judge call adds a degradation to the manifest, with the count; the
report says those questions went unasked; after one transport failure the remaining questions are
not asked." Measured by the ninth session: with a key in the environment and no network, 16 judge
calls failed in one scan of a four-file subject, three attempts each, and each dropped its claim
as a "no" would (model/pipeline.py); the manifest counted model_calls 16 and recorded no failure,
and the report said less than that of a run without an endpoint.

What changed:
- model/scan.py, `_CountingClient`: a call that raises is counted in `failed` and ends the asking.
  The calls left in the question being put are refused without reaching the client (`refused`),
  and the driver withholds the judge from every question after it, as it does when the budget runs
  out. An answer with no decision in it (empty, not JSON, no boolean `vulnerable`) is counted in
  `failed` as well and does not end the asking. The graph still arbitrates every region.
- Two degradations, each with a sentence under "What could not be analysed" (reports.py) and a
  line in the scan skill's list:
  - `judge_calls_failed`, `count`: the judge calls that gave no decision.
  - `judge_withheld`, `questions`: the judge calls refused after the failure in the question
    being put. Of the questions after it the report says that none was put to the judge; they are
    not counted, because some of them would have put nothing to the judge.
- model/pipeline.py: the parsing half of `_ask` is moved as it was into `judge_decision`, so the
  driver reads a decision the way `_ask` does. `_ask` returns what it returned.
- The claim of every such question is still dropped, as before: "Keep the claim" was not chosen.

The session's two readings of the decision, open to correction:
- A transport failure is read as a judge call that raised, whatever the exception. The transport
  has already made its three attempts for what is transient (provider/openrouter.py), so one
  raised call ends the asking for the whole scan. That holds for a connection failure and for a
  timeout, and also for a request the endpoint refuses with an error status, where the transport
  makes one attempt: there the scan withholds every later question, where before it dropped that
  claim alone and went on. The judge_withheld line says so in the report.
- A failed judge call is read as a call that raised or a call whose answer gave no decision. Both
  are counted.

Measured on fresh copies of the four C files the ninth session used, with a placeholder key and
the network off (the scratch is /tmp/opencode/s10_c2_* and is not kept):
- Native, in a network namespace without routes: one "judge call failed" line, file_targets=4,
  findings=15, exit 0, 45 s (s10_c2_native_key3.out). The ninth session's run of the same bytes:
  16 lines, 68 s.
- In a probe image built from openultrasast:dev 3f959b31f2f2 with src copied over, network none:
  one line, file_targets=4, findings=15, exit 0, 43 s (s10_c2_image_key3.out). The ninth
  session's run: 16 lines, 65 s. The probe image is removed.
- Both manifests: model_calls 1, judge_calls_failed with count 1, judge_withheld with questions
  7; report.md carries the two sentences (s10_c2_native_inspect3.out, s10_c2_image_inspect3.out).
  The findings are the 15 the ninth session recorded with a key and without one.

Tests, one at a time, each red before its code:
- test_a_judge_that_cannot_be_reached_is_recorded_and_asked_no_further: on a git archive of
  HEAD, assert 120 == 1; after, one call, model_calls 1, ten regions arbitrated, the two
  degradations with count 1 and questions 5.
- test_a_judge_answer_with_no_decision_in_it_is_counted_and_the_rest_are_still_asked: red with
  no degradation; after, count 120 and no judge_withheld.
- test_a_failed_judge_call_is_reported_as_unasked_and_not_as_a_no: red with the two bare
  reasons; after, the two sentences. The three red runs, with the package imported from the
  archive, are in s10_c2_red8.out: 3 failed, 1 passed.
- GREEN: 657 passed over the 39 test files that name degradations, scan_repository, model_calls
  or write_markdown_report (s10_c2_green9.out); 214 passed over ten model, report and skill files
  (s10_c2_green8.out). ruff, mypy, the three gates and compileall pass, and the gates print what
  they printed before (s10_c2c_exits.txt). `git diff --check` exits 0. No whole-suite run: that is
  step 9.
- The review took three rounds on one reviewer. Round one approved a first shape that counted the
  withheld regions, and remarked that a region with several families was counted as withheld while
  its first family had been put to the judge; its other remarks changed the second sentence,
  `__all__` and a docstring. Round two blocked the sum that replaced that count: it added judge
  calls to region-and-family questions under one name. The count is of judge calls now. Round
  three approved this diff, on the condition that this message carry the measured numbers.

By reading, not measured: a pre-push run makes no judge call (push/runner.py and push/policy.py
pass no client and an execution budget), so the two reasons cannot arise there.

Found and not fixed, for the maintainer:
- .agents/skills/openultrasast-scan/SKILL.md:68-70 and docs/where-we-stand.md:349-350 say that
  `learning_endpoint_unavailable` has no line in report.md. It has had one since f555dee
  (2026-10-02).
- The citations of scan.py in docs/detection-techniques.md: of 24, 19 sit one, two or seven lines
  further down after this commit (5 do not move, 9 move by one line, 1 by two, 9 by seven).
2026-11-27 17:06:25 +01:00
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 80abac5fd1 spec(contributor-scan): record the thirteen answers of 2026-11-27 (item 5b)
A record of maintainer decisions, in the form of 23c5383. In
.kiro/specs/contributor-scan/spec.json, updated_at moves to 2026-11-27T14:15:26Z and
approval_history gains one entry with the maintainer's thirteen answers of 2026-11-27 to
the ninth session's menu, each with the label chosen and what it means as offered. Until
now they were recorded only in .kiro/handover.md, which is not tracked. The work they
choose is item 5b of the queue, before step 9; this commit is its first piece.

The entry also records what started the work. On 2026-11-27 the maintainer wrote
"proceed". Asked with the question tool what it names (the options: item 5b only, step 9,
step 6), the maintainer answered in free text "1-13". The session's reading, labelled as
such in the entry and open to correction: the work of item 5b in full, a record commit
first and then the menu's questions 1 to 13 in the order of the questions; question 13 is
the order of work, not a word for step 9. The session told the maintainer that reading
and that step 9 would be asked for; the maintainer had not answered by the time of this
record. Nothing is decided here beyond the maintainer's words.

Limits of what is on record:
- The options not chosen are not repeated in the entry; the handover holds them.
- In the handover the section that copies the menu ("Open items of the ninth session")
  restates the chosen label of answers 2, 6, 7, 10, 12 and 13 and some options not chosen,
  against its own sentence that it keeps them as offered. The entry quotes the labels of
  the decisions section, which a reviewer checked against the stored question call: they
  are the labels offered and returned. The handover is not tracked and is not changed
  here.

spec.json parses, with its keys in order and its earlier seven entries equal to HEAD's;
outside updated_at and the new entry the file is byte-identical to HEAD (one line
replaced, five added). The added lines are ASCII and `git diff --check` exits 0. ruff,
mypy, the three gates and compileall pass, and the gates print what they printed before.
No test reads a spec, by a grep of tests/. An independent reviewer approved the change in
one round; its optional rewordings are applied after the approval, as proposed (items 3
and 11 carry the meaning as offered; the pointer names the handover's decisions section;
the answer "1-13" is said to be free text; the entry says the maintainer had not answered
the reading).
2026-11-27 15:31:17 +01:00
Marius Ciepluch 23c5383701 spec(contributor-scan): record item 5a under 3.2, and what is left open (item 5a)
The record of the ninth session (2026-11-26 and 2026-11-27), in the form of ea8d3d2. Four
dated notes close task 3.2's list, at .kiro/specs/contributor-scan/tasks.md:538-660:
- item 5a: the eight commits, each with the menu item of 2026-11-26 it answers, in the
  order of the commits, and the two decisions of the maintainer on 2026-11-27;
- the judge calls with the network off, assessed on menu item 5: nothing fixed;
- the release job's tests of run 42229293910, assessed on menu item 9: nothing fixed;
- sixteen points left for the maintainer: reported, not fixed.

Nothing is decided here. "Proceed", read as the work of item 5a only, is the session's
reading. The first assessment rests on five runs (natively with the network off, without
a key and with a placeholder key; in the image with the placeholder; and the eighth
session's two image runs) and on the code by reading: a failed judge call drops the claim
as a "no" does, nothing in the manifest or the run directory says so, and such a report
says less than one without an endpoint. The second rests on `gh run view` logs: twelve
tests failed in the release job; they pass at 7e26f5f on this machine; ten of them still
failed on the runner at origin/main. In the log of the d26fbcb checks job the list of
failed tests is taken from the outer run's eleven failure lines; a nested pytest run of 45
failures inside one test's message is not counted.

In .kiro/specs/contributor-scan/spec.json, updated_at moves to 2026-11-27T10:49:05Z and
approval_history gains one entry with the maintainer's thirteen answers of 2026-11-26 and
two decisions of 2026-11-27. Until now the thirteen answers were recorded only in
.kiro/handover.md, which is not tracked. The two decisions of 2026-11-27 (the mount with
the override OPENULTRASAST_RUNS_DIR=/reports; the PowerShell wrapper changed, untested)
changed the shape answer 4 was offered in, and were otherwise recorded only in d1f61fb's
message. 4ef1394, 11733bf and ab2f55d did the same for earlier decisions; ea8d3d2 and
7e26f5f recorded no decision and touched tasks.md only.

Limits of what is on record:
- The two option labels, "Mount and override" and "Change it, untested here", are quoted
  from the session's question to the maintainer; they are in the handover, in no tracked
  file.
- The removal of the two images and the deletion of the regress directory rest on the
  handover and one output file; git holds no trace of either.
- The mount-alone run's output was overwritten; the claim also follows by reading, since
  docker-compose.yml sets OPENULTRASAST_RUNS_DIR to /reports/runs.
- "Natively" for an empty directory is the eighth session's word: its output on file is
  the image run.
- 68 against 44 and 65 against 40 are whole-command times.
- The reviewer rounds are from the commit messages; libpng at cf53e54 rests on the eighth
  session's record; the scratch under /tmp/opencode/s9_* is not kept.

spec.json parses, with its keys in order and its earlier six entries equal to HEAD's.
Everything outside lines 538-660 of the spec is byte-identical to HEAD. The added lines
are ASCII and `git diff --check` exits 0. ruff, mypy, the three gates and compileall
pass, and the gates print what they printed before. No test reads a spec, by grep. An
independent reviewer approved the change in two rounds: its first round found the
commit list numbered with the session's own item numbers and presented as the menu's,
and that is corrected; its four optional rewordings of the second round are applied
after the approval, as proposed.
2026-11-27 12:13:37 +01:00
Marius Ciepluch 9a8e0038b0 spec(plane-on-kubernetes): 4.4 is on kube-ax, a dated note (item 5a)
The maintainer's decision of 2026-11-26 on the eighth session's menu (item 13), as it
was offered: "plane-on-kubernetes tasks.md:191 says '4.4 Kind proof and record' while
roadmap.md:318 places 4.4 on kube-ax: a dated note or a reworded line." Answer: "4.4
line to kube-ax". The form was offered both ways and left to this session, which says
before this commit that it takes a dated note. A reworded line is not taken: the header
of the spec keeps the text of groups 3 to 8 as written, and this file records change by
dated text (the header note and the last section, both of 2026-11-24).

Two files. In .kiro/specs/plane-on-kubernetes/tasks.md, nine lines are the last
sub-bullet of task 4.4; the line of 4.4 and its bullets are untouched and the checkbox
stays open. In .kiro/specs/plane-on-kubernetes/spec.json, updated_at moves from
2026-11-24T13:58:17Z to 2026-11-27T10:39:48Z: d45fc98, this spec's last dated note, did
the same, and the spec skills say to update the timestamp. No code changes.

The note records that the roadmap counts 4.4 among "the open spec tasks that gate G1"
and describes it as the engine smoke on kube-ax, leading to record 04. It decides
nothing. Three points are named as open: what the proof is on kube-ax, since the
roadmap calls 4.4 the engine smoke and the task's bullets prove the GHCR images; how a
task of a group to re-plan under G4 gates G1, in a section of the roadmap whose ordering
the sections above it supersede (roadmap.md:5, the ladder of 2026-11-20, and :162; :115
and :150 say the same for detection work and detection claims); and the marker
"(coordinator, network)", which the roadmap says 4.4 and 5.4 carry and neither task's
line in the spec has. The roadmap, which is steering, is not touched.

The decision and its options are recorded in .kiro/handover.md, which is not tracked;
the note names it.

No test reads the spec, by grep: the tests that name it do so in comments and
docstrings. tests/test_obligation_siblings.py passes (4 tests) and reads no spec. ruff,
mypy, the three gates and compileall pass, and the gates print what they printed before.
An independent reviewer approved in two rounds. Its four remarks of the first round are
applied: the handover is named as the record of the decision; "the task above" became
"the bullets above"; the clause on ordering; and the marker sentence names 4.4 and 5.4
and says neither task's line carries the marker.
2026-11-27 11:44:33 +01:00
Marius Ciepluch 7e26f5fabc spec(contributor-scan): the ledger in the image is an open task on 3.1 (item 5a)
A dated note on task 3.1 of .kiro/specs/contributor-scan/tasks.md (ninth session,
2026-11-27). No code changes, and nothing is decided: the maintainer chose "Open task"
on 2026-11-26 for item 3 of the eighth session's menu ("Record it as an open task:
nothing changes now. A dated note on task 3.1 holds the measurements and the design
question (a ledger under the runs directory must be keyed by target, because its
entries name relative paths)."), and the checkbox of 3.1 stays open.

The note holds:
- what a scan does with the false-positive ledger, by reading
  src/openultrasast/cli.py and reports.py: the path under the target, the read before
  the ranking is calibrated, the write when its content would change, the degradation
  ledger_not_written on a read-only target, the report's sentence under "What could
  not be analysed", and that through the image a scan applies learnings only from a
  ledger already in the tree and can never add one (by the code, not run);
- the measurements of 2026-11-26, read again on 2026-11-27 from the run artifacts, not
  from new runs. Standard mode on contrib/examples of libpng at cf53e54, 15 findings on
  both sides, no key on either side. In the image (run 20261126T125414Z-facce3bb):
  calibrations_applied=0, project_score 26, penalty_total 80.0. Natively, a second scan
  of a copy that held the ledger an earlier native scan had written:
  calibrations_applied=2, project_score 59, penalty_total 32.0. calibrations_applied
  counts files: the native second scan applied all four learnings of that ledger, to
  two files;
- the design question, with the options not chosen.

The design question names no key for a ledger under the runs directory. The note
records two candidates that cannot serve: the path as the image shows it (every target
is /target there) and the fingerprint of the provenance stage, which classes a tree as
human, agent or mixed and hashes nothing.

The decision and its options are recorded in .kiro/handover.md, which is not tracked;
the note says so. The measurements rest on the eighth and ninth sessions' scratch under
/tmp/opencode, which is not kept; the note names the files.

tests/test_obligation_siblings.py passes (4 tests), ruff, mypy, the three gates and
compileall pass, and the gates print what they printed before. An independent reviewer
approved the change in three rounds. Its remarks are applied: the handover is named as
the record of the decision; the image figures come from the run without a key, as the
native run is; calibrations_applied is said to count files; and a clause that pointed
the design at a function that is not a key is gone. That clause came from the
reviewer's own first-round remark and was written in after checking only the call
site; the reviewer caught it in the second round.
2026-11-27 11:07:49 +01:00
Marius Ciepluch 6e4a62edd4 docs(contributor-scan): the citations in detection-techniques.md name the instruction (item 5a)
docs/detection-techniques.md pointed into Dockerfile and docker-compose.yml by line
number, and every one of those citations was off. Its three doc regions were written on
2026-10-02. Then 1b9d1ca (2026-10-05) moved the base image and php-cli out of the root
Dockerfile and into the task base (plane/Dockerfile.base), and 9d53c32 moved the Joern
build argument of docker-compose.yml from line 15 to line 16. Before this commit, lines
171 and 299 cited Dockerfile:14, Dockerfile:12 and docker-compose.yml:30-31, none of
them the instruction meant, and docker-compose.yml:15 no longer held the pin.

The maintainer's decision of 2026-11-26 (menu item 8): "Name instructions", so that the
next edit does not stale them. What the four citations name now:
- Dockerfile: the ARG JOERN_VERSION line (line 7 at HEAD).
- docker-compose.yml: the JOERN_VERSION build argument (line 16 at HEAD).
- docker-compose.yml: the comment above mem_limit (lines 49-51 at HEAD). The quotation
  is unchanged.
- The Java the engine runs on: the FROM eclipse-temurin:21-jdk-jammy AS jdk line of
  plane/Dockerfile.base (line 5 at HEAD).

Two positions are this session's, not the maintainer's decision; both are open to a
correction:
- A fifth citation of the same kind. The decision names four. The PHP row of the
  frontend table (line 158) cited Dockerfile:17-21 for the php-cli install. It was exact
  when written and went stale in 1b9d1ca with the others. It now names the apt-get
  install line of the base stage in plane/Dockerfile.base (lines 20-21 at HEAD; the file
  has a second apt-get install line, in its base-browser stage), and says the base image
  installs php-cli, since the root Dockerfile no longer does.
- A fact changed, not only a citation. The sentence said the image is on
  eclipse-temurin:21-jre-noble (Dockerfile:12). That FROM left the root Dockerfile in
  1b9d1ca, so no instruction could be named for it. The sentence now says the engine
  runs on Temurin 21, taken from eclipse-temurin:21-jdk-jammy: the jdk stage of
  plane/Dockerfile.base, copied into its base stage (line 11), which the task-base-image
  workflow publishes (target: base) and Dockerfile builds on (line 5).

Measured on 2026-11-27 in openultrasast:dev (3f959b31f2f2, built from 88ea171): Debian
13 (trixie), OpenJDK Runtime Environment Temurin-21.0.12.1+1, PHP 8.4.26 (cli), uid
1000; exit 0. No file that enters the image changed, so it was not rebuilt.

Left alone, and reported:
- .kiro/specs/plane-on-kubernetes/design.md:252 cites Dockerfile:1-7 for the argument
  against sibling services. That header left the root Dockerfile in 1b9d1ca too. It is
  a spec's design record, not a site page. By the reviewer's reading, two more are stale
  in the same spec (design.md:248 and tasks.md:180, both Dockerfile.runner:25-29).
- The citations into the Python source by line number, in the same page, are not
  touched: the decision is about the Dockerfile and compose citations.
After this commit no site page (docs/, README.md, ops/README.md) cites a Dockerfile or
a compose file by line number.

`mkdocs build --strict` exits 0, tests/test_docs_site.py and
tests/test_removed_plane_references.py pass (8 tests), ruff, mypy, the three gates and
compileall pass, and the gates print what they printed before. An independent reviewer
approved the change in one round; its remark that the root Dockerfile no longer installs
php-cli is applied.
2026-11-27 10:43:13 +01:00
Marius Ciepluch dbcbbd7f27 docs(contributor-scan): the documented build commands carry the base pin (item 5a)
Three documented build commands would have failed. README.md told the reader to build
plane/Dockerfile.engine-task with docker buildx and Dockerfile with docker build,
without TASK_BASE_TAG and TASK_BASE_DIGEST. Both Dockerfiles default the tag to
base-unpublished and give the digest no default. Measured on 2026-11-27 from a clean
copy of the tree, with the push and the published tags taken out so nothing could be
published: each failed in one to two seconds with `failed to parse stage name
"ghcr.io/norandom/ousast-task-base:base-unpublished@": invalid reference format`.

Both lines now pass the tag and the digest of `base` in plane/task-base.digest, and a
sentence after the block names the file. With those arguments the main Dockerfile
builds (exit 0 in two seconds; the image was removed afterwards). docs/scanning.md
says `docker compose build`, which pins the base and tags openultrasast:dev (the
defaults are guarded by tests/test_task_images.py), and says to run it in a checkout
of this repository.

Found while measuring, and not fixed:
- README.md's buildx line still does not run to the end on this tree. It builds the
  last stage, `replay`, and plane/Dockerfile.engine-task:47 copies
  benchmarks/unseen/replay_entry.py, which .dockerignore:32 has excluded since
  9017038 (2026-11-24). With the arguments the base resolves and the build stops at
  that COPY (`not found`). By the reviewer's reading, which was not run: of the
  Engine image workflow only its `replay` job reaches that line, so that job fails on
  the next push and on the next tag, and the `engine` job and the release image do
  not. tests/test_task_images.py forbids a negation pattern for the reserved
  populations.
- The README's copy of the pin is kept by hand and no test reads it. When the pin
  changes, both builds still succeed on the old base until that base is deleted.

The nine test files that reference README.md or docs/scanning.md pass (190 tests),
`mkdocs build --strict` exits 0, ruff, mypy, the three gates and compileall pass, and
the gates print what they printed before. An independent reviewer approved the change
in one round; its remark that docs/scanning.md did not say where to run the build is
applied.
2026-11-27 10:21:17 +01:00
Marius Ciepluch 53a6937c31 docs(contributor-scan): the comment on the first-use build says what the wrapper does (item 5a)
A comment in ops/shell/ousast.sh said the first-use build is silent. It is not: the
wrapper prints one line to say why the run waits, and the build's own output then
shows (the eighth session counted 74 lines of it from a warm cache).

The maintainer chose to keep that output ("Keep output, fix comment", the menu of
2026-11-26): on a cold build it is the only sign that a long download is running. Only
the comment changes, to say what the code does. No behaviour changed.

The clause about a cold build is the decision's wording; no cold build was measured
here. The only first-use capture is the eighth session's warm one, in which the build
shows its running steps, not a byte count.

`bash -n` passes, tests/test_shell_wrapper.py passes (3 tests), ruff, mypy, the three
gates and compileall pass, and the gates print what they printed before. An independent
reviewer approved the change in one round.
2026-11-27 10:05:00 +01:00
Marius Ciepluch d1f61fbe6f fix(contributor-scan): the wrapper writes its runs to the user cache (item 5a)
The shell wrapper wrote the runs of the image to ./.ousast, inside the repository it
was scanning (the eighth session: three runs under it). It now creates
~/.cache/openultrasast/runs, mounts it at /reports, the one writable mount, and passes
-e OPENULTRASAST_RUNS_DIR=/reports to its compose run, so nothing is written to the
scanned directory.

The override is the maintainer's choice of 2026-11-27, on a measurement. Answer 4 of
the menu of 2026-11-26 was worded as the mount alone. Measured that day: compose sets
OPENULTRASAST_RUNS_DIR=/reports/runs in the service, so the mount alone put the run on
the host at ~/.cache/openultrasast/runs/runs/<run>, one level below a native run, and
nothing prunes it there (prune_old_runs removes only run directories directly under the
root whose names match the run id). With the override the run lands beside native runs.
Two things the choice does not change: a scan in the image never prunes, so the
wrapper's runs are removed by a later native scan on the default location; and the
wrapper writes to ~/.cache/openultrasast/runs whether or not XDG_CACHE_HOME or
OPENULTRASAST_RUNS_DIR moves a native run elsewhere.

ops/shell/ousast.ps1 gets the same change, the maintainer's second choice: it writes
%USERPROFILE%\.cache\openultrasast\runs and passes the same override. That file was
edited by reading and WAS NOT RUN: there is no PowerShell on this machine.

Tests: tests/test_shell_wrapper.py has a third test. It failed before the change (no
runs directory under HOME) and again until the override was passed. After: 3 passed.
Measured on 2026-11-27 through the shell wrapper with the real Docker, from a
directory without .env, both API keys unset: `ousast scan examples --mode quick` on a
copy of libpng's contrib/examples prints run_dir=/reports/<run>, the container prefix,
with file_targets=4, findings=4, exit 0; the run is on the host directly under
~/.cache/openultrasast/runs, owned by the user; the scanned directory stays empty.
The eight tests of tests/test_docs_site.py and tests/test_removed_plane_references.py
pass, `mkdocs build --strict` exits 0, ruff format, ruff check, mypy, the three gates
and compileall pass, and the gates print what they printed before the change. An
independent reviewer approved the change in one round; its remarks on the README
clause, on the test, on the evidence and on the width of one line are applied.

Left as it is, for the maintainer: with HOME unset the shell wrapper now fails, where
it wrote ./.ousast before ($HOME is empty, so the path is /.cache/openultrasast/runs,
and a failed mkdir is not checked, as it was not before).
2026-11-27 09:56:27 +01:00
Marius Ciepluch 5ad9e7781d fix(contributor-scan): compose refuses a target that does not exist (item 5a)
A mistyped TARGET read as a clean scan. The `/target` mount was in the short syntax, so
Docker created a path that does not exist as an empty directory owned by 0:0, and the
scan ended with exit 0 and no findings (the eighth session, 2026-11-26: file_targets=0,
findings=0, exit=0).

The mount is now in the long syntax with `create_host_path: false`, as `/reports` is
since 9d53c32. The source is still `${TARGET:-.}` and the mount is still read-only. A
path that does not exist is refused by the daemon before the container starts ("bind
source path does not exist"), and nothing is created. Measured on 2026-11-26 with the
new file alone in a scratch directory, Docker 29.8.1 and Compose v5.5.1, image
openultrasast:dev (3f959b31f2f2), both API keys unset: a TARGET that does not exist
gives exit 1 in one second and no directory; the documented command with `--mode quick`
on a copy of libpng's contrib/examples gives file_targets=4, findings=4, exit 0;
`touch /target/x` ends with "Read-only file system", exit 1; with TARGET unset the
default source mounts (exit 0).

Tests: the new
`tests/test_task_images.py::test_compose_refuses_a_target_that_does_not_exist` fails on
the short syntax (1 failed, 22 deselected) and passes after; with
`tests/test_search_image.py`, 24 passed. ruff format, ruff check, mypy, the three gates
and compileall pass, and the gates print what they printed before the change. An
independent reviewer approved the change in one round; its remarks on two wordings are
applied.

Left as they are: `docs/detection-techniques.md` cites `docker-compose.yml` by line
numbers that were already off before this change; that is the next docs commit of item
5a. An empty directory that exists still scans clean, natively and in the image; the
menu did not choose to fail that.
2026-11-26 17:44:46 +01:00
Marius Ciepluch a6e8e2615a fix(contributor-scan): the wrapper's native path runs in the caller's directory (item 5a)
`ousast scan .` through ops/shell/ousast.sh with a native install scanned the wrong
tree. The native path changed into the checkout before it passed the arguments on, so
`.` was the OpenUltraSAST checkout and a relative file name was looked up there. The
eighth session showed it with a stub interpreter in place of `.venv/bin/python`
(`cwd=/tmp/opencode/s8_fakehome args=-m openultrasast.cli scan .`). The check also
looked for `joern-parse` only, while the batch queries run `joern`: with `joern-parse`
alone on PATH every batch query failed and a standard scan still exited 0 (2026-11-26,
14 findings where the working launcher gives 15).

The native path now runs the checkout's interpreter by its absolute path, in the
caller's directory, as the container path does, and it is taken only when `joern` is on
PATH as well. So `.`, relative names and relative options mean the caller's files. The
reviewer found, and a run confirmed, what dropping the `cd` brings: `-m` alone puts the
working directory first on the interpreter's path, so a file of the scanned tree could
stand in for a module the CLI imports (a `json.py` in the caller's directory: `ousast
--help` printed SHADOW-EXECUTED and exited 3). The interpreter is started with `-P`,
which keeps that directory off the path; the flag needs Python 3.11, the project's
floor (pyproject.toml).

Changes a caller sees, beyond the one the decision named:
- The checkout's .env is no longer read on the native path; the CLI reads .env from the
  working directory, which is now the caller's. ops/README.md says so.
- `ousast pairs` and `ousast repos` no longer find their defaults outside the
  checkout, because `benchmarks/` is read relative to the working directory. Measured
  for `pairs`: through the wrapper natively, and on the container path, `pairs --slice
  vibe-py` ends with "pair catalog is not a file: benchmarks/pairs/catalog.toml",
  exit 1, so the container path already behaved this way. `repos` by reading. Run from
  the checkout root they find their defaults again (by reading; not run). The header's
  `ousast pairs --slice vibe-py` example is removed. This is a reading the maintainer
  may correct.
- The message for a machine without Docker names both executables.

Tests: the new tests/test_shell_wrapper.py runs the wrapper by bash with a stub of the
interpreter, `joern`, `joern-parse` and `docker` ahead of /usr/bin and /bin on PATH.
Its two tests failed before the change (2 failed: the interpreter ran in the fake
checkout, and the native path was taken without `joern`), and the first failed again
until `-P` was passed (1 failed). With the real venv and Joern 4.0.625 on PATH, from a
directory without .env: `ousast scan examples --mode quick` on a fresh copy of libpng's
contrib/examples gives file_targets=4, findings=4, exit 0, before and after the flag,
the figures of the eighth session. The eight tests of tests/test_docs_site.py and
tests/test_removed_plane_references.py pass, `mkdocs build --strict` exits 0, ruff
format, ruff check, mypy, the three gates and compileall pass, and the gates print what
they printed before the change. An independent reviewer approved the change in the
second round; its two findings of the first round led to the `-P` flag and to the
removal of the header example.

Found by the reviewer and left alone, outside this decision: the background child of
`ousast pre-push` (src/openultrasast/push/background.py) starts the CLI with `-m` and
without `-P`, from the pushed repository.
2026-11-26 17:29:16 +01:00
Marius Ciepluch ea8d3d2e6e spec(contributor-scan): record part 2 of the image under 3.2, and what is left open
Started on the maintainer's "proceed" of 2026-11-26, read as step 5 only. The note on task
3.2 records part 2, done in `9d53c32` and `88ea171`, with its evidence: the image built from
`88ea171`, the documented command before and after `9d53c32`, the read-only target, the
network off, the reserved populations absent, the parity of a first scan natively and in the
image on libpng's `contrib/examples` (4 and 4 findings, then 15 and 15) and on libpng whole
(167 and 167), the wrapper, the release pins read with `gh`, and what the entailment at
`contrib/examples/iccfrompng.c:124` does at `88ea171`: it is still reported, so the roadmap's
second criterion does not hold on libpng. The box of 3.2 is ticked; the task's observable
is met.

A second note lists eleven items left for the maintainer, none of them changed. The first
is a fault: the native path of `ops/shell/ousast.sh` changes into the checkout before any
path is rewritten, so `ousast scan .` from a user's directory would scan the OpenUltraSAST
checkout.

Decisions are quoted and everything else is labelled as evidence. No test reads this file;
`tests/test_obligation_siblings.py`, which the handover names as the one that reads the
specs, passes (4 tests). ruff format, ruff check, mypy, the three gates and compileall
pass, and the gates print what they printed before. An independent reviewer approved the
note in the third round. Its first verdict corrected the open list: one number was wrong
(the first run printed 84 lines, 74 of them build output) and one count could not be
verified because its output had not been kept, so it was dropped; five measurements were
then re-run with complete captures kept.
2026-11-26 15:03:38 +01:00
Marius Ciepluch 88ea171dbe fix(contributor-scan): the release builds the scan image from the pinned base (3.2, part 2)
The `images` job of `.github/workflows/release.yml` built `Dockerfile` with no build
arguments, so the file's own defaults applied: `TASK_BASE_TAG=base-unpublished` and an
empty digest. The first `FROM` could not be resolved. The log of the `v2.1.0-alpha.1` tag's
run (42229293910, job `images (openultrasast, Dockerfile)`, 2026-11-06T13:54:46Z) reads
`ERROR: failed to build: failed to solve: failed to parse stage name
"ghcr.io/norandom/ousast-task-base:base-unpublished@": invalid reference format`. Compose
had the same defect, closed in 89d08e0.

The job now reads `plane/task-base.digest` in a `pins` step before its build, the way the
`pins` job of `engine-image.yml` does: the same pattern, fail closed on an unpublished or
malformed pin, the tag and digest written to the step's outputs. The build step passes them
as `TASK_BASE_TAG` and `TASK_BASE_DIGEST`. The other leg of the matrix, the runner, declares
no such arguments and ignores them. The `image` job of `engine-image.yml` already passes
both arguments to its search-task leg, which does not declare them either: run 42229294086
of the same tag succeeded, and its log holds no line about unused arguments.

Tests: the new `tests/test_task_images.py::test_release_pins_the_base_of_its_scan_image`
fails on the workflow at 9d53c32 (3 failed: the job reads no pin) and passes after, in five
cases. A valid pin writes exactly the two output lines. An unpublished pin, a bare tag, a
short digest and another repository each stop the script with its own message and write
nothing. The test also asserts that the pin is read before the build and that the build
carries both arguments from that step. With `tests/test_search_image.py`, 23 passed. On
this machine the script, run from the tree, wrote `base_tag=base-b696c08` and the digest
`docker-compose.yml` defaults to. ruff format, ruff check, mypy, the three gates and
compileall pass, and the gates print what they printed before the change. An independent
reviewer approved the change in one round; its three notes on the test are applied here
(the step order, the exit status and message, two more malformed pins).

Not run: the release workflow itself, on GitHub.
2026-11-26 13:50:17 +01:00
Marius Ciepluch 9d53c320a5 fix(contributor-scan): compose leaves the reports directory to the user (3.2, part 2)
On a fresh checkout the documented command, `TARGET=/path/to/repo docker compose run
--rm ousast scan /target`, died before scanning. The `/reports` mount was in the short
syntax, so Docker created a missing `./reports` as root, and the image runs as uid 1000.
On 2026-11-26, from a copy of the compose file at 8daca3d, Docker created the directory
owned by 0:0 and the scan stopped after one second with exit 1 and `PermissionError:
[Errno 13] Permission denied: '/reports/runs'`.

The mount is now in the long syntax with `create_host_path: false`, so nothing is
created. Without the directory the daemon refuses the container ("bind source path does
not exist") and leaves nothing behind. After `mkdir -p reports` the same command
completes with exit 0 and writes the run directory owned by the user (quick mode on four
C files: file_targets=4, findings=4). The documented command in the compose header, in
`README.md` and in `ops/README.md` creates the directory first. Both shell wrappers
already did.

Tests: the new `tests/test_task_images.py::test_compose_leaves_the_reports_directory_to_the_user`
fails on the short syntax (1 failed, 16 deselected) and passes after; with
`tests/test_search_image.py`, 18 passed. The eight test files that read `README.md` pass
(183 tests). ruff format, ruff check, mypy, the three gates and compileall pass, and the
gates print what they printed before the change. An independent reviewer approved the
change in one round.

Left as it was, an open item for the maintainer: the `/target` mount is still in the
short syntax, so a `TARGET` that does not exist is created as an empty root-owned
directory and the scan ends with exit 0 and no findings (measured on 2026-11-26).
2026-11-26 13:25:20 +01:00
Marius Ciepluch 8daca3df76 docs(plane-on-kubernetes): the pages that placed the plane in the kind cluster say it is stopped
By the maintainer's decisions of 2026-11-25 and 2026-11-26, recorded in the handover. The
question: "The local kind cluster is stopped since 2026-11-24, and three pages still say in
the present tense that the plane runs in it ... Fix them?" Answer: "One docs commit now", as
offered: "The statement step 3 made in the other pages: the cluster is stopped and its code
stays. The docs tests and a reviewer, as for step 3." Four smaller leftovers chosen in the
same menu are done here too: "Reword three link sentences", "Drop Today's in
deployment.md", "Note the proof on kind" and "Note the probe on kind".

The three pages: `docs/ops/ax/README.md` and `docs/where-we-stand.md` take the sentence of
`3a34929` ("That cluster is stopped since 2026-11-24: the code stays, `ops/ax/up.sh`
recreates the cluster, and whether the executor code is deleted is decided at the plane
re-plan"). `ops/ax/README.md` lines 3-4 are one sentence now, as the second menu decided,
and still two lines, because `docs/ops/ax/README.md` includes that page from its line 5.
For that reason the clause "`ousast plane run` submits, resumes, starts and collects" left
those two lines; it stays in the docs page's own paragraph.

The link sentences in `README.md`, `ops/README.md` and `docs/index.md` say what
`docs/deployment.md` holds, in the page's own words: how the plane was deployed on the
maintainer's host, and what moving it to a separate cluster would take. In
`docs/deployment.md`, "Today's EndpointSlice" is an undated statement about the kind
profile. Two dated notes say what waits for the cluster: the replay proof of 5.4 on kind,
and the kind half of the probe of task 3.2 in the parked search-with-proof spec.

Left alone, as decided: `ops/ax/README.md:20`; the rewrite of `ops/ax/README.md` and
`docs/ops/ax/README.md`, and k3s against kube-ax, wait for the plane re-plan.

Tests: the seven test files that read these pages (`test_docs_site.py`,
`test_removed_plane_references.py`, `test_plane_literals.py`, `test_plane_profile.py`,
`test_obligation_siblings.py`, `test_learn_experiments.py`, `test_config.py`): 113 passed
before and after the change. `git diff --check` is clean, and `mkdocs build --strict`
builds the site into a scratch directory. An independent reviewer approved the change in
one round; its remarks on the probe's kind half and on the style of the two notes are
applied.

Outside this commit, from the reviewer: `.kiro/specs/plane-on-kubernetes/tasks.md` has
"4.4 Kind proof and record 04", while `roadmap.md` places 4.4 on kube-ax.
2026-11-26 10:59:35 +01:00
Marius Ciepluch a706a7d811 build(image): the app layers name the runtime user, so the chown layer is gone
By the maintainer's decision of 2026-11-25, recorded in the handover. The option as
offered: "Drop the duplicate chown layer", as offered: "`COPY --chown` on the app file
layers instead of a final `chown -R`. Every file under `/app` stays owned by uid 1000,
compared file by file in the rebuilt image."

`RUN chown -R ousast /app` ran after the last COPY, so it copied every file of `/app`
into a second layer: 194 MB beside the 189 MB `benchmarks` layer in the local image,
and the build of 2026-11-25 spent 311 of its 470 seconds in it. The line is removed, and
the copies it covered take `--chown=1000` as `benchmarks` already did: `pyproject.toml`,
`README.md` and `LICENSE` in one, `src` in the other. Nothing after the last COPY writes
under `/app`: the pip install runs with the uv_build backend and left nothing there in
the image built on 2026-11-25.

Two things are expected to change besides the layer. `/app` itself, which `WORKDIR`
creates, is owned by root, where `chown -R` made it uid 1000. And the files that were
gid 0 take gid 1000. No tracked use writes into `/app` as the runtime user: compose runs
in `/work` and writes under `/reports`, the wrapper `ops/ousast-docker` works in the
mounted repository, and the workflows build and push.

Tests: the new `tests/test_task_images.py::test_app_layers_carry_their_owner` fails on
a `RUN chown` in the final stage and on a `COPY` into it that does not start with
`COPY --chown=1000 `. It failed before the change (1 failed, 15 passed) and passes
after; with `tests/test_search_image.py`, 17 passed. On scratch copies it fails when
the chown line is put back and when the flag is dropped from `COPY src ./src`.
`test_digest_required_and_code_last` found its code line by `COPY src `; it accepts the
new prefix, and its ordering check is unchanged. ruff, mypy, the three gates and
compileall pass, and the gates print what they printed before the change. An independent
reviewer approved the change in one round.

Not claimed here: the rebuilt image. It follows in this step's next part, with the
proof that every file under `/app` is owned by uid 1000 and that `/app` holds the
tracked files only.
2026-11-26 10:36:59 +01:00
Marius Ciepluch 005bffb677 build(image): the image leaves the search pilot's git-ignored working files out
By the maintainer's decision of 2026-11-25, recorded in the handover. The option as
offered: "One line in `.dockerignore` names `benchmarks/search/private/`, with a test
that pins it. The local image then holds what a checkout holds."

`.gitignore` ignores `benchmarks/search/private/`, where the feasibility pilot keeps its
local identities and working files. `.dockerignore` did not, so `COPY --chown=1000
benchmarks` baked the directory of a local tree, 49,961 files, into the local image
`openultrasast:dev`; nothing under it is tracked. A checkout has none of these files, so
an image built from one never held them. Nothing under `src/` names the directory: the
pilot scripts, `benchmarks/search/pilot_run.py` and `pilot_select.py`, run on the host
and take the image under test as an argument.

Tests: `tests/test_task_images.py::test_search_pilot_files_stay_out_of_the_image` pins
the pattern, and that no `!` line with its exact prefix, with or without the trailing
slash, lets it back in. It failed before the change (1 failed, 14 deselected) and passes
after; with `tests/test_search_image.py`, 16 passed. On scratch copies the test fails
when the line is removed, and when `!benchmarks/search/private` or
`!benchmarks/search/private/` is appended. ruff, mypy, the three gates and compileall
pass, and the gates print what they printed before the change. An independent reviewer
approved the change in one round; its remark on the re-include check is applied.

Not claimed here: the rebuilt image. It follows in this step's next part, with the check
that the directory is absent from it.
2026-11-26 10:15:26 +01:00
Marius Ciepluch 3a34929c55 docs(plane-on-kubernetes): the docs say the local kind cluster is stopped and its code stays
The maintainer decided on 2026-11-24: "The local kind cluster is stopped and the
code stays. Whether the executor code is deleted is decided at the plane
re-plan." d45fc98 recorded the decision in the spec's tasks. The documentation
went on calling the cluster the development default, or saying that it runs
today. This is step 3 of the handover: one documentation commit for that
decision, with the two records the same step names.

What changes, by file:

- README.md, tier 3: the cluster is stopped since 2026-11-24, the code stays,
  ops/ax/up.sh recreates the cluster, and the deletion of the executor code is
  decided at the plane re-plan. Tier 4 names the stop where it says that no
  other cluster has received a deployment.
- docs/plane.md: the same under "ax is the only executor"; the Deployment link
  and the profile list no longer say "today".
- docs/deployment.md: a dated paragraph at the top carries the record's own
  facts: the decision, the teardown with ops/ax/down.sh, ops/ax/up.sh, a cold
  bring-up that has not been timed, and that nothing on the product's main line
  used the cluster. The frame sentence, two headings, one table header and the
  sentences that said "today" or "runs" are dated or put in the past.
- .kiro/steering/overview.md, the Engine bullet of the dated section of
  2026-10-04; .kiro/steering/roadmap.md, the Destination list, the
  Infrastructure row and the plane-on-kubernetes row. Each keeps the earlier
  target and adds the dated fact, the form roadmap.md already uses for the
  decisions of 2026-11-24.
- ops/k8s/profiles/kind.toml: the leading comment only. No value changes.
- .kiro/specs/ir-consolidation/brief.md: a dated note. Question 2 is overtaken
  by the maintainer's decision on contributor-scan task 4.1: "C memory-safety
  beyond string-function misuse is out of scope. Record that, and say so per
  corpus slice." Question 1 is not affected.
- .kiro/specs/reachability-flow-model/design.md, Data Models: the run directory
  of a scan since 6edae3a, where the line named the location that ended then.

The roadmap's Position is refreshed (verified 2026-11-25). An open subtask is
an open checkbox whose first token is a task number without a trailing dot;
the group headers end with a dot. valid-detection-benchmark 2 (11.6, 11.7);
contributor-scan 18; plane-on-kubernetes 22; reachability-flow-model 16;
authorization-obligations 18; pre-push-safety-net 4 (8.3, 11.3, 13.2, 13.3);
hunter-learning-loop 1; detection-core 0 (11.4 closed under R0). The new
bullet says what the task boxes show for R1 to R5 and records the stop.

Beyond the handover's line numbers, in files it names: README tier 4 (one
clause), two sentences of docs/plane.md, and in docs/deployment.md the frame
sentence, two headings, one table header and three sentences that said "today"
or "runs". Also roadmap.md's Destination bullet (line 239 before this commit):
the same claim 21 lines above the row the handover names, in steering that
every run loads.

Left as they are and reported, on the maintainer's rule that a fault outside
the chosen tasks is reported and not fixed in passing: docs/ops/ax/README.md:3,
ops/ax/README.md:3 and :20, and docs/where-we-stand.md:184-185, which still say
that the plane runs in the cluster; README.md:270-271, ops/README.md:388 and
docs/index.md:56, "where the plane runs today"; roadmap.md:317, "proof on
kind"; search-with-proof/tasks.md:27; the requirements and design of
plane-on-kubernetes, where a change is a spec amendment; and README tier 4 and
docs/deployment.md naming k3s as production, where the roadmap's spec map says
that the production path was re-scoped to kube-ax.

Evidence:
- tests/test_docs_site.py (the strict site build), test_removed_plane_references.py,
  test_plane_literals.py, test_plane_profile.py and test_obligation_siblings.py:
  exit=0, 40 passed, on the committed tree.
- git diff --check: exit 0. The added lines are ASCII.
- The reviewer counted the open work by a method of its own and found the same
  numbers. It built the site strict into scratch, and measured the host: no
  kind cluster and no kube context.

Review: an independent reviewer approved the change in round 1 (no REQUIRED
finding, two SHOULD FIX) and again in round 2, after those were folded in.
After round 2 its round-2 wordings were applied as proposed: one sentence, one
clause and two table labels. No test pins these sentences. The cluster was not
recreated and ops/ax/up.sh was not run.
2026-11-25 19:19:46 +01:00
Marius Ciepluch 91d305cd3c ci: keep the local .env out of the dagger upload
By the maintainer's decision of 2026-11-25, recorded in the handover: "dagger/ci.py syncs the
git-ignored .env into the local container when run locally, and step 9 runs that script locally
for the first time. I have not read how CI supplies what .env holds; that is checked first, so
CI keeps what it needs."

`.env` is the first entry of the exclude list of the one upload in dagger/ci.py,
`client.host().directory(".", exclude=[...])`. The script is CI's dagger job and the same
script run locally; the entry matches nothing in CI and removes the root `.env` of the tree
when the script runs on a machine that has one.

CI keeps what it needs, read before the change: `.github/workflows/ci.yml` (97 lines) sets two
literal variables (`UV_NO_SYNC`, `DAGGER_VERSION`), uses no `secrets.*` and no `vars.*`, and
has no step that creates or copies a `.env`; the container gets one variable, `UV_NO_SYNC=1`.
The names `.env.example` lists, the two API keys, the `VALID_BENCHMARK_*` S3 settings and the
two Discord values, are supplied by no workflow. A checkout has no `.env`, because the file is
git-ignored; `.env.example` is not matched and stays in the upload. No test reads a `.env` from
the tree.

That the pattern removes the root `.env` rests on reading, not on a run: the SDK passes the
list unchanged to the engine, whose filter matches a pattern without wildcards against the
whole relative path (the independent reviewer traced it at v0.21.7, the version CI pins, and
ran that filter over a scratch tree; no engine and no container was started).

Tests: the new tests/test_dagger_ci_upload.py parses dagger/ci.py as text, so it needs no
dagger engine, and asserts that the one exclude list holds `.env`. It failed before the change
(the list without the entry, 1 failed) and passes after; with the two test files that read the
workflow files, 16 passed. ruff, mypy, the three gates and compileall pass, and the gates print
what they printed before the change. An independent reviewer approved the change in one round;
its remarks on the wording of the comment and of the test, and on the failure message of the
test, are applied.

Left for the maintainer's menu, not decided: excluding `.env.*` files as well (a bare pattern
would also drop `.env.example`, which a test reads), an in-container check that fails the
pipeline if the file ever got in, and `__pycache__` directories, which a local run uploads.
2026-11-25 18:37:30 +01:00
Marius Ciepluch 8998697b4e fix(contributor-scan): the MCP server answers a tool that stops the CLI and stays up (3.1, follow-up)
By the maintainer's decision of 2026-11-25, recorded in the handover: "McpServer.handle
catches Exception only, so a missing scan path raises SystemExit through it and ends the stdio
loop; openultrasast.scan and openultrasast.benchmark both take that path. One bad call would
become an error result for that call and the server would stay up."

`McpServer.handle` in src/openultrasast/mcp.py catches `SystemExit` beside `Exception` and
answers with the error it already builds for any exception a tool raises: `-32603` with
`SystemExit: scan path is not a directory: <path>`. The stdio loop reads on, answers the next
request and exits 0 at EOF; before, the process exited 1 with that message on stderr and nothing
on stdout. `openultrasast.benchmark` takes the same clause when the manifest names a source path
that does not exist. No other path changes: the notification return comes before the `try`, a
line that does not parse is answered in `serve`, and `cli.py:588` is the only `SystemExit` a tool
handler can reach (the independent reviewer's trace), raised before the configuration is loaded
and before a run directory is created.

"Error result" is read as that JSON-RPC error: the decision names `handle`, and the handover
keeps this channel apart from `isError: true`, which `_call_tool` builds for `McpToolError`. A
missing path therefore travels a different channel from a missing `path` argument or an
unsupported mode; that is left for the maintainer's menu, with one pre-existing gap the reviewer
found: a line that is valid JSON but not an object still ends the loop.

Tests: through `serve`, a tools/call for `openultrasast.scan` with a missing path followed by a
ping gives the error object and then the ping result, and `serve` returns 0; through `handle`,
the same call gives that error object. Both failed on the code as it was, each with the
`SystemExit` raised through the function it calls (the first in my run, the second in the
reviewer's, on a copy of the code before the change); the second pins that the catch sits in
`handle`, the public dispatch, where a catch in `serve` alone passes the first. The 23 test files
around the scan path and the MCP server pass (242 passed before the second test was added, and
`tests/test_mcp.py` 18 passed after); ruff, mypy, the three gates and compileall pass, and the
gates print what they printed before the change. The real `ousast mcp` process, fed the same two
lines, answered both and exited 0 with an empty stderr. An independent reviewer approved the
change in one round and proposed the second test.
2026-11-25 18:14:06 +01:00
Marius Ciepluch 09a9fcea96 docs(contributor-scan): the user docs name the skipped runs directory and its notice (3.1, follow-up)
By the maintainer's decision of 2026-11-25, as the handover records it: "One
sentence in README.md and docs/examples.md, in its own docs commit: a scan does
not read the files under its runs directory when it lies inside the scanned
path. A notice chosen above would be documented in the same place."

The sentence, the same in both files: "A scan does not read the files under its
runs directory when that directory lies inside the scanned path; when this
leaves source files out of the scan, `ousast` prints one `notice:` line naming
the directory and how many." It closes the run-location paragraph of README.md
and sits in the first paragraph of docs/examples.md, before the benchmark
sentence.

"when this leaves source files out of the scan" is the exact promise of
`52c9afb`: the notice counts what the skip took out of the scan, so a source
file that the target's root `.gitignore` or an ignored directory already keeps
out brings none. "`ousast` prints" matches the retention sentence two lines up;
`ousast scan` and `ousast benchmark` print the line, and the
`openultrasast.scan` and `openultrasast.benchmark` tools return the same text
among their notices instead (the independent reviewer's probes). The first
clause keeps the maintainer's words: nothing under the runs directory becomes a
file target, while the other readers of a scanned tree stay as they are by the
decision "No, leave them"; a route manifest under the runs directory is still
read.

No code changes. The two documentation test files pass (8 passed). An
independent reviewer approved the change in two rounds; its first round found
that the first wording, "when source files are left out there", promised a
notice for files the scan was not going to read anyway, which this wording
closes.
2026-11-25 17:44:42 +01:00
Marius Ciepluch 52c9afb85f feat(contributor-scan): a scan says how many source files it left out under its runs directory (3.1, follow-up)
`56c4620` made a scan skip its runs directory when it lies inside the scanned
path, and said nothing about it. By the maintainer's decision of 2026-11-25,
recorded in the handover, the scan now prints one notice. The decision, as the
handover records it: "When source files lie under the runs directory inside the
scanned path, the scan prints one notice: line naming the path and the number
left out, the way run retention does."

The line is `notice: skipped <n> source files under the runs directory <path>`
(`source file` at one). `ousast scan` prints it, the `openultrasast.scan` tool
returns it among its notices, and `openultrasast.benchmark` returns the notices
of the scan it runs. Nothing is added to the manifest or the report.

The count follows the scanned tree's own rules, so it is the number the skip
took: a source file that the target's root `.gitignore` already keeps out, or
that lies under a directory the scan ignores, brings no notice, and a
`.gitignore` inside the runs directory does not hide what was left out. To that
end `enumerate_source_files` in src/openultrasast/preprocess.py and the new
`count_skipped_source_files` share one private predicate,
`_is_read_as_source`. The enumeration returns the lists it returned before
(the skip test now comes first, so a path under the skipped directory is no
longer stat'ed). The count is taken after the preprocess stage, so a tree
whose ignore file cannot be read stops the scan inside that stage, as before.
It costs one more read of the target's root `.gitignore` and, where there is
one, one more `git ls-files`, and only when the runs directory lies inside the
scanned path.

Nothing is said when no source file is left out, when the runs directory lies
outside the scanned path, or when it is the target or lies above it.

Tests: the notice tests failed on the code as it was (6 failed) and pass after
the change. Four more failed on a first cut that counted by the runs
directory's own `.gitignore` and pass on this one: a `.gitignore` inside the
runs directory does not hide what the scan left out, nothing is left out where
the target already ignores the runs directory, nothing under a directory the
scan ignores, and a directory named `.gitignore` costs the scan nothing. The
test that a target inside the runs directory is read as it was now also pins
that nothing is said; a count that covered that target failed it. The 23 test
files around the change pass (241 passed); ruff, mypy, the three gates and
compileall pass, and the gates print what they printed before the change.

An independent reviewer approved the change in two rounds. Its first round
found the count by the wrong rules, which this cut closes. Its second round
named two things that are left open and recorded in the handover: were the
target's root `.gitignore` to become unreadable between the preprocess stage
and the count, the scan would stop with no failed stage recorded in its trace
and no manifest; and no test pins that a tracked source file under an ignored
runs directory is counted.
2026-11-25 17:15:13 +01:00
Marius Ciepluch 9a0b27e07b spec(contributor-scan): record the benchmark runs and the skipped runs directory under 3.1
The 3.1 task note gains two record paragraphs.

`9e4983f` moved the benchmark runs beside the scan runs. `56c4620` made a
scan skip its runs directory when it lies inside the scanned path: the
maintainer's decision, as the handover records it, is quoted. Each paragraph
closes the item the note of 2026-11-24 had marked "not yet done", and the
older wording, "skip the cache when a scan meets a directory that contains
it", is marked as overtaken by the decision, which names the runs directory
only.

The rest is labeled evidence on record: the skip applies only where the runs
directory lies inside the scanned path (the reading the independent reviewer
confirmed), it is silent, no run of this package keeps a source file today,
and the counts of tests, lint and gates of `56c4620`. What is left for the
maintainer is named as such and not decided: whether a scan should say when
it left files out, whether a target inside the runs directory should be
named, and a sentence for the user docs.

No code changes.
2026-11-25 14:42:59 +01:00
Marius Ciepluch 56c4620087 feat(contributor-scan): a scan skips its runs directory when it lies inside the scanned path (3.1, follow-up)
Since part A a native scan writes its run under the user cache or wherever
`OPENULTRASAST_RUNS_DIR` points. A scan of a path that contains that directory,
a home directory or a tree with the runs directory set inside it, took the
files under it for source: those of earlier runs and those of its own run. On
the code as it was, a source file under the runs directory inside the target
was read and its finding reported (`file_targets=3 findings=2` for a tree of
two files and one such copy).

By the maintainer's decision, recorded as step 2c of the handover, the scan
skips the runs directory only: `config.runs_dir`, the default location or the
override. The other directories under `~/.cache/openultrasast` are read as
before, and so is every tree whose runs directory lies outside it.

`preprocess_repository` and `enumerate_source_files` in
src/openultrasast/preprocess.py take a `skip` directory, and the preprocess
stage of a scan (`_map_scan_targets` in cli.py) passes `Path(config.runs_dir)`.
The skip applies only where the runs directory lies inside the scanned path:
a target that is the runs directory or lies inside it is read as it was, so a
runs directory set to `.` does not silence a scan. Both paths are compared
resolved, so a symlinked or relative name is found, and the excluded path is
built under the root as the walk spells it, so a relative root works too. Every
other caller of the two functions passes no `skip` and is unchanged.

No run of this package keeps a source file today (the independent reviewer's
count: a quick run holds 15 files, all `.json`, `.jsonl`, `.md` or `.sarif`;
the two benchmark runs in the real cache hold `.json` and `.toml`). The copy in
the tests is a constructed case.

Tests: four tests failed on the code as it was and pass after the change: the
runs directory inside the scanned path, by the override, by the default
location and by the override through a symlink, and the rest of the cache
still read. Two more pin the narrow reading, a target that is the runs
directory or lies inside it is read as it was; they failed on a first cut
that skipped more than was decided. A direct call with a relative root pins
the path comparison. The nine test files around the change pass (113 passed),
as do the 37 files that exercise the scan path (362 passed); ruff, mypy, the
three gates and compileall pass. Runs of the real CLI on one scratch subject,
the code at HEAD against this tree: with the runs directory inside the target
the copy under it is no longer read (`file_targets=4 findings=3` for five
source files); with the runs directory a parent of the target, or the target
itself, both read the same five files and report the same four findings. An
independent reviewer approved the change in three rounds; its first round
found that the first cut also silenced a scan whose target lay inside the
runs directory, which this cut narrows to the decided case.
2026-11-25 14:41:44 +01:00
Marius Ciepluch 9e4983f465 feat(contributor-scan): benchmark runs go beside the scan runs (3.1, follow-up)
`ousast benchmark` and its MCP twin wrote a run to
`<target>/.openultrasast/benchmarks/<id>/`, into the scanned tree, and no user
document said so. By the maintainer decision of 2026-11-24 a benchmark run now
goes to `<runs_dir>/<benchmark-run-id>/`, beside the scan runs, where run
retention removes it like a scan run.

`create_benchmark_run` in src/openultrasast/benchmark.py takes the runs
directory instead of the target. The two `_benchmark` functions, in cli.py and
in mcp.py, load the configuration the way `_run_scan` does and pass
`config.runs_dir`, so a benchmark run follows `OPENULTRASAST_RUNS_DIR` like the
scan it runs.

Both create the run once the scan has returned. Created first, as it was, the
run was under the scan's own retention while the scan ran, and a scan that
outlasted the retention window took it for an old one: the scoreboard could not
be written and the scan outcome was never printed. A failed scan now also
leaves no empty run behind.

README.md and docs/examples.md name where a benchmark run goes.

Tests: the three location assertions failed before the change and pass after
it. A new test pins that retention removes a benchmark run like a scan run, and
another that a benchmark keeps its run when its scan outlasts the retention
window. The nine test files around the change pass (120 passed); ruff, mypy,
the three gates and compileall pass. A run of the real CLI printed `run_dir=`
and `benchmark_run_dir=` as siblings under the runs directory and left only the
calibration ledger in the scanned tree. An independent reviewer approved the
change in two rounds; its first round found the retention window, which this
cut closes.
2026-11-25 10:40:01 +01:00
Marius Ciepluch 78434a6e9f refactor(contributor-scan): split _run_scan into its stages (3.1, follow-up)
`_run_scan` in src/openultrasast/cli.py stood at a McCabe complexity of 18
and 124 logical lines, against the caps of 10 and 50 in
.kiro/steering/code-standards.md. It is now 5 and 45 and reads as the stage
sequence.

The stages moved to six private helpers in the same module, in call order:
_map_scan_targets, _collect_findings, _verify_and_fuse, _map_and_overlay,
_add_obligation_and_model_findings and _run_map_stage. Two small records
carry what crosses between them. _RunFiles names the ten artifacts a run
writes, where the function kept ten path locals; _MapStage carries what the
MAP stage hands to the reports, with the defaults of a scan that did not
request that stage. The wrote_overlay flag is gone: the overlay is a list
when the stage ran and None otherwise.

No statement changed. What differs from the old function is where values
live: the tool hunter's budget is read as config.hardening.max_findings,
the fusion decisions come from their helper's return, and the reports and
the manifest read the two records.

Logical lines are counted the way the detection-core final gate counts
them (the tokenize method). _main, _pre_push and _plane in the same file
were already over the complexity cap and are not touched.

Tests: the 38 test files that import the CLI or the MCP server pass (563
passed, 11 skipped); ruff, mypy and the three gates pass. Scans by the code
before and after agree artifact for artifact: quick mode on a scratch copy
of src and tests, and standard mode with defaults and with the scripted
tool hunter under a budget of three findings. An independent reviewer
approved the change in two rounds; its first round asked for the
logical-lines cap, which this cut meets.

The task note in .kiro/specs/contributor-scan/tasks.md records the split.
2026-11-24 22:05:49 +01:00
Marius Ciepluch 61581f63b8 ci: raise the dagger job's timeout to 60 minutes
The limit of 20 minutes dates from fb7594a (2026-06-22). Run 45352669096
was cancelled at it with pytest at 89 percent, before any summary was
printed. On the runner host the last 11 percent of the suite took 662 of
2095 seconds, and eleven tests that failed early there for want of a git
index now run to their end, so the job needs about 40 minutes on that
runner. 60 leaves room for a slower one.
2026-11-24 20:40:48 +01:00
Marius Ciepluch 75233fdf14 ci(dagger): give the mounted tree a git index
The dagger job mounts the checkout without `.git` (excluded from the synced
directory), and eleven tests need it. The detection-core final gate and
ten tests in the migration files list tracked Python files with
`git ls-files` under check=True, so in run 45352669096 each failed for
want of that index soon after it started, while the job's 52 performance
tests passed.

The container now trusts the worktree, which can be owned by another user
than the container's, and builds an index of the mounted tree before uv
runs. In python:3.11-bookworm the final gate then passes (1 passed in
358 s) and the index holds the same 1031 Python files as on the host;
without the index the final gate fails in 12 s.
2026-11-24 20:40:48 +01:00
Marius Ciepluch 53a68907ea test(detection-core): give the measured seed budget headroom over its proxy workload
Forty-five tests in tests/test_detection_core_performance.py failed on the
GitHub runner (run 45352669096) with "measured budget gate failed", for
example 206ms>157ms. The seed budget is the slowest `_validate_work`
sample, and it gates the complete consumer run, which also derives and
encodes output. The two workloads scale differently per host: the complete
run measured 0.78 of the seed on the development machine and 1.28 to 1.41
on the runner. Through the final gate's nested run this was also the run's
eleventh failure.

The seed is now doubled before it is used. The budget that the tests
derive and assert is unchanged, and the gate keeps its teeth: with the
gated run slowed by one second the module fails (1222ms>1146ms), with a
quarter of a second it passes. No production code changes.
2026-11-24 20:16:23 +01:00
Marius Ciepluch 7c707d61f9 test(search-with-proof): flush the disk-bound write inside the program
tests/test_search_worker.py::test_run_timeout_truncation_and_disk_bound
failed on the ubuntu-26.04 runner (run 45352669096) with exit status 0,
where it requires a non-zero status. The runner's Python 3.14 buffers
131072 bytes by default, so a 16 KiB write to an unclosed file is flushed
only at interpreter exit, where the error is ignored. The program now
closes its file, so ENOSPC surfaces on every Python version.
2026-11-24 20:16:23 +01:00
Marius Ciepluch c4720ba186 test(search-with-proof): skip by cause where the host refuses the browser sandbox, a private network namespace or node
GitHub CI's checks job failed nine search tests on the ubuntu-26.04 runner
(run 45352669096), which has chromium and bubblewrap. Three causes:

- chromium prints "No usable sandbox!" inside the bubblewrap user namespace
  and does not exit. The browser test skips on that evidence in the launch
  error's cause, as it already did on "Operation not permitted" and
  "Permission denied"; an ordinary browser failure still fails.
- `unshare --user --map-root-user --net` is refused ("write failed
  /proc/self/uid_map: Operation not permitted"). The ssrf differential and
  the namespace handoff test probe that command first and skip when it
  fails. The other three differential families do not need it.
- The six node fixture tests could not run their app on the runner. They
  need /usr/bin/node, the path the demo launcher uses, and now skip when
  it is not executable. The runner's log does not name the missing path;
  hiding it locally reproduces the same six failures.

A present but broken node, or a browser that fails for its own reasons,
remains a failure.
2026-11-24 20:16:23 +01:00
Marius Ciepluch 02493bd6b7 spec(pre-push-safety-net): record the stale push eligibility registry as owned M5 work
The maintainer decided on 2026-11-24 to file the push eligibility registry
under milestone M5 ("File under M5"). The item had no owner.

The paragraph under M5 in release-milestones.md quotes the decision and
labels the rest as evidence on record: the file was last written at commit
b506516 (2026-09-13), and by the task 15.2 note its bindings match the code
of that commit and no binding at HEAD, so load_registry returns stale with
zero capabilities and the hook emits no admitted alert. The hook stays
silent until M5 regenerates the registry.
2026-11-24 18:37:47 +01:00
Marius Ciepluch 4ef1394c2b spec(contributor-scan): record the decisions taken after the stop: run retention, the push condition, and the next session's work
The maintainer answered six open questions on 2026-11-24, so that a new
session can continue without asking. tasks.md carries them where they apply.
Task 3.1 notes the run retention (17d46c0) and the three follow-ons decided
for the next session: the benchmark runs move to the cache, a scan that
meets a directory containing the cache skips it, and _run_scan is split in
its own commit. Task 3.2 notes that part 2 also carries the release workflow
fix and the libpng re-measurement against the second release criterion.
Tasks 5.14, 7.3, 7.7, 7.8 and 5.9 carry one rule: each closes on the fresh
pmpro measurement when its own completion criterion holds there, and stays
open with the fresh number recorded otherwise.

spec.json records the same decisions in one approval entry together with
the push condition: a push follows a local gate, the whole test suite and
every CI command passing locally, while GitHub CI stays red for reasons in
other specs.
2026-11-24 17:54:21 +01:00
Marius Ciepluch 17d46c0f93 feat(contributor-scan): remove scan runs older than 30 days from the default cache (3.1, run retention)
By maintainer decision. Since 6edae3a a native scan leaves a run directory
under ~/.cache/openultrasast/runs/ and nothing removed them. After a scan's
manifest is written, with no OPENULTRASAST_RUNS_DIR set, the runs in that
default location that are older than 30 days are now removed. The age comes
from the UTC timestamp in the run id, never from file times, so a copied or
touched directory is not misjudged, and a run exactly 30 days old is kept.

Never touched: the scan's own run; anything not named exactly like a run
(only direct children of the runs root whose name is a run id); symlinks,
which are neither followed nor removed; and any location chosen with
OPENULTRASAST_RUNS_DIR, even when it resolves to the default.

OPENULTRASAST_RUNS_RETENTION_DAYS sets the number of days and 0 keeps every
run. A failed prune never fails the scan: it is one notice on the command
line, and the MCP scan and benchmark results now carry a notices key. A
retention longer than the calendar and a directory tree too deep to remove
are both turned into that same behaviour.

Known limits, on record: a removal that fails part-way leaves the run half
deleted and it is retried on every later scan; the prune stops at the first
failure; a clock set far ahead removes earlier runs; a filesystem mounted at
or under an expired run is emptied before the removal fails.

Tests: tests/test_run_pruning.py drives the function and the real command
line (34 tests); tests/test_mcp.py pins the notices. The reviewer attacked
the deletion path with about sixty hostile inputs and twenty-three mutations;
all are killed or kept safe.
2026-11-24 17:51:37 +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 d45fc98c4e spec(plane-on-kubernetes): record that the local kind cluster is stopped and the code stays
The maintainer decided on 2026-11-24 to stop the local kind cluster and keep
the code until groups 3 to 8 are re-planned. The cluster was torn down the
same day with ops/ax/down.sh; whether the executor code is deleted is decided
at that re-plan.

The dated section at the end of tasks.md records what was true when the
decision was taken, each with its source: nothing on the product's main line
used the cluster or its stores and the memory store is remote; the rustfs in
the cluster was Substrate's snapshot store, and a file copy of it with
Substrate's postgres data is kept on the development machine; search-with-proof
demonstrated on kube-ax and takes from plane/ only memory.py and budget.py;
the admission that decides rollout does not depend on the local cluster. The
status block at the top points to it, and spec.json carries the date.
2026-11-24 15:25:48 +01:00
Marius Ciepluch 11733bfb87 spec(contributor-scan): record the course of the implementation run and close 7.1 as superseded
The maintainer set the course for this run on 2026-11-24. spec.json now
carries it as two approval entries: the course itself (7.1 closes as
superseded; 5.12 covers facts and generic features and is to record why it
drops the LLM ranker; 7.2 lands before 5.6 and 5.1; the subject for 5.2 is
chosen by the maintainer; a native scan writes to the user cache; both
stages run autonomously and a push follows only after the whole test suite
and every CI check pass), and the later decisions of the same day, recorded
at the time of writing (the 5.2 subject, the calibration ledger, the build
cache, the image contents).

tasks.md: 7.1 is ticked as superseded. Its instrument was built on
2026-09-21 (0beae46, b0500ec), measured on NodeGoat only, and retired with
the other cuts on 2026-10-13 (f5a904b); the NodeGoat record survives and the
successor is the detection-core fact-pack workstream. 5.1 carries its
deferral, which sets aside the Depends line task 5.6 carries. 5.2 names its
chosen subject and says that other advisories affect the pinned version
besides the two labelled ones.
2026-11-24 14:40:08 +01:00
Marius Ciepluch 90170380ec fix(docker): keep the reserved populations out of the image (contributor-scan 3.2)
The root image copies benchmarks/ (Dockerfile:43), and .dockerignore let benchmarks/valid
and benchmarks/unseen through, about 18 MB of reserved-population material.
RELEASE_NOTES.md says every version tag is pushed to ghcr.io/norandom/openultrasast.
Decided by the maintainer on 2026-11-24: both stay out of the image.

The scan path reads neither. The one run-time reader is the hunter's contamination report
(hunt/contamination.py), which runs from a checkout: a missing pool contributes nothing to
it, and it imports benchmarks.unseen.eligibility late, so inside the image that report has
no eligibility module and fails at the import rather than silently.

A test pins both patterns and fails if a later negation lets either back in. The built image
is checked for their absence in task 3.2 part 2, when it is rebuilt.
2026-11-24 14:25:30 +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 89d08e01d3 fix(contributor-scan): build the image from the pinned base and keep runs on the writable mount (3.2, part 1)
`docker compose build` has failed since 1b9d1ca (2026-10-05): the Dockerfile requires the task
base's tag and digest and deliberately has no floating fallback, but the compose file passed
neither argument. Compose now defaults both from plane/task-base.digest, the pin CI builds
from, and a test fails when the two drift apart or an argument goes missing.

The service also sets OPENULTRASAST_RUNS_DIR=/reports/runs, so a scan's run directory lands on
the one writable mount (Req 6.3) whatever the default location is.

Built and verified once, with no scan (2026-11-24, 11:02Z to 11:10Z): `docker compose build`
exit 0 in 8m03s, the Joern zip passing its sha512 check, and inside the image the CLI usage,
native PHP 8.4.26, lib/io.joern.joern-cli-4.0.625.jar, the installed package, and the pinned
base's 12 layers and 24 history entries as the image's prefix. That image held HEAD's source
and was removed from the build machine by a Docker prune at 12:56Z.

Task 3.2 stays open: the image must be rebuilt after task 3.1 lands, and part 2 (a real scan
through the image and the shell wrapper, parity with a native run) is not done. Known for part
2: on a fresh checkout Docker creates ./reports root-owned and the image runs as uid 1000, so
the first run cannot write its output.
2026-11-24 14:04:33 +01:00
Marius Ciepluch 4c5b5d7932 test(contributor-scan): pin tier-zero pruning at the scan boundary (5.14)
Four regression tests for the mechanism that landed in 9a8e9f0 and 3b6e642:

- a family absent from the repository is never asked, at callDepth 0 or 3;
- the evidence that prunes a question is asked over that question's own
  scope and at the arbiter's callDepth;
- a pruned question is recorded as deferred with reason tier_zero and
  never as an outcome;
- an evidence summary that does not say the family is absent excludes
  nothing.

Each test was shown red under a control that breaks only the rule it
names. The engine's half of the rules (familyInRepo over the whole graph,
the reachable-set scope above depth 0) is verified by reading taint.sc
only; no executable test pins it.

Task 5.14 stays open: its Observable also asks whether the query completes
on pmpro, and the record on file (2026-09-22) answers that it does not.
2026-11-24 11:43:37 +01:00
Marius Ciepluch d26fbcbe53 docs(valid-detection-benchmark): record the full-scale rehearsal measurement
Item 9 of the hardening pass: the opt-in rehearsal completed a correctly
reviewed 840-input lifecycle in about 92 minutes, with the replay
derivation taking 75% of the time. The note carries the stage timings so
the 11.6 owner budgets the run from a measurement.
2026-11-24 07:42:06 +01:00
Marius Ciepluch 28f160419a test(valid-detection-benchmark): add the opt-in full-scale rehearsal
One test runs the whole lifecycle at 840 inputs with every planned arm and
the per-population review subject, so a correctly reviewed full-scale run
completes for the first time. It is skipped unless
OPENULTRASAST_FULL_SCALE_REHEARSAL=1 and records per-stage wall-clock
seconds. The default path is unchanged: the new ScaleLifecycle arguments
default to None and the timing wrapper always calls its stage.
2026-11-24 07:41:26 +01:00
Marius Ciepluch 26833ffe52 docs(valid-detection-benchmark): record the pre-11.6 hardening pass
Fold-in notes for the reviewer advisories closed before 11.6: reservation
identity, preparation-rooted spend and its harness adoption, the
wrong-typed stage product, the license fixture, the ledger and closure
type guards, the sourcing queue key, the runtime floor, the whole-tree
formatter gate, and the residuals left for the 11.6 owner.
2026-11-23 21:55:38 +01:00
Marius Ciepluch 081adfc052 test(valid-detection-benchmark): route the harness spends through the production spend stage
The end-to-end and scale harnesses committed the shared custody spend by
hand. They now bind the production stage (bind_case_adapter_spend_stage)
through one shared helper that predicts the release review subject before
the spend, so the harness exercises the same path the adapter replay
binds. The failure-injection copy stays a raising fault injector so the
failure matrix keeps its pinned outcomes.

The sealed release the harness persists now has the production shape
(schema version and review covered by the release digest); nothing
pinned the old five-key payload.
2026-11-23 21:54:42 +01:00
Marius Ciepluch 2b49fd748f docs(pre-push-safety-net): record protocol v4 and close the stale open items for 15.1
The lines that said population v4 has no protocol now name protocol-v4.md
(committed before any scan). The 15.1 notes record the maintainer
decisions the protocol fixes, correct the claim that the quick rules are
PHP-only, and list what is still open before the first scan: the v4
runner work, the entry points not traced at the freeze, and a possible
twelfth case.
2026-11-23 21:05:56 +01:00