From d9205fd267489090728844985d5f8b9ea106f712 Mon Sep 17 00:00:00 2001 From: Marius Ciepluch <11855163+norandom@users.noreply.github.com> Date: Fri, 27 Nov 2026 18:48:37 +0100 Subject: [PATCH] docs(ops): say where ousast pairs and ousast repos find their defaults (item 5b) The maintainer's answer 6 of 2026-11-27, "Document: run from checkout" (.kiro/handover.md:1333-1334): "one sentence in ops/README.md; no code changes." In the handover's options for that question (:1422-1430): "run them from the checkout root, as every page shows." What changed - ops/README.md, at the end of "Use it as a command", after the paragraph on the native route (lines 40-42): "With their defaults, `ousast pairs` and `ousast repos` need the root of the checkout as the working directory, which under the wrapper means a native run: `benchmarks/pairs/catalog.toml` and `benchmarks/repos` are read from the current directory." - No code change, no test change. The session's reading of the answer - The sentence names the native run, which the answer's sentence does not. Measured below, the checkout root does not help through the wrapper's container path: the container's working directory is /work (docker-compose.yml:37), never the checkout. The image holds a copy of both defaults in /app, so the need is the wrapper's, not Docker's; the sentence says so. - The sentence does not repeat "as every page shows". The pages show the two commands (docs/examples.md:66-70, README.md:331, benchmarks/pairs/README.md:126-128, benchmarks/repos/README.md:16-18); by reading, none of these four places says in which directory they are run. So the sentence gives the reason instead. Measured (/tmp/opencode/s10_c6_probe.sh, output s10_c6_probe.out, 17:32:07Z to 17:32:13Z; each run file starts with its command, the wrapper files with a one-line description of the call) - From an empty directory, the CLI directly and natively: `pairs` ends with "pair catalog is not a file: benchmarks/pairs/catalog.toml", exit 1 (s10_c6_native_elsewhere_pairs.out); `repos` with "no repository recipe matches 'all' in benchmarks/repos", exit 1 (s10_c6_native_elsewhere_repos.out). - The same two through the wrapper's native path, with stubs of joern and joern-parse ahead on PATH, never called (s10_c6_wrapper_native_elsewhere_pairs.out, s10_c6_wrapper_native_elsewhere_repos.out). - From the checkout root, natively: `repos` lists seven recipes, exit 0 (s10_c6_native_root_repos.out). `pairs --slice sast --json` ends with exit 0 and 18,013 bytes of JSON, with per_slice.sast.pairs 11 and achievable.sast.pairs 10 (one known limit, src/openultrasast/pairs.py:467), and without the lookup's message (s10_c6_native_root_pairs.out for the exit and the message; s10_c6_native_root_pairs_full.out for the bytes and the two counts). joern was not on PATH for that run; what scored the pairs was not examined. - From the checkout root, through the wrapper's container path (OUSAST_PREFER_NATIVE=0; the image openultrasast:dev 3f959b31f2f2): both end with the same two messages, exit 1 (s10_c6_wrapper_container_root_pairs.out, s10_c6_wrapper_container_root_repos.out). No container remains (s10_c6_wrapper_container_index.out). - A separate run at 17:40:30Z, not from the probe: in the image's own working directory /app (Dockerfile:38), a plain `docker run` with no mount and no network, `repos` lists the seven recipes, each absent in the container, exit 0 (s10_c6_image_app_repos.out). `pairs` was not run there. By reading, not measured - Where the defaults come from: src/openultrasast/pairs.py:47-53 and src/openultrasast/repos.py:34 hold relative paths. The two stops are at src/openultrasast/cli.py:1156-1157 and :1178-1180. - The image's copy: Dockerfile:44 copies benchmarks, and .dockerignore excludes nothing of benchmarks/pairs or benchmarks/repos. Checks, on the final text - `mkdocs build --strict` into scratch: exit 0 (s10_c6b_mkdocs.out); the built page holds a phrase from each of the sentence's three lines once, and the first wording zero times (s10_c6c_site_sentence.out). - tests/test_docs_site.py and tests/test_removed_plane_references.py: 8 passed (s10_c6b_docs_tests.out). - Gates (s10_c6b_exits.txt): ten zeros; the three gate outputs equal the baseline's. Found and not fixed, for the maintainer - `ousast model candidates` has the same default for its catalog (src/openultrasast/cli.py:262), and `ousast plane harvest` for its own (:324). The sentence names the two commands of the answer. Neither was run. - The pages that show the two commands do not say where they are run from (above). The answer puts one sentence in ops/README.md. - Through the wrapper's container path the two commands cannot reach their defaults, by reading from any directory. A reader with Docker alone is told that they need a native run, not what to do instead. Not checked - ops/shell/ousast.ps1 was not read for this change. - `ousast pairs` with --catalog, and `ousast repos` with --dir, through either path. - `ousast pairs` in the image's /app. - The whole test suite. Review - Review: three rounds against d8b4cac, by one reviewer subagent. Round one blocked on the message alone (the sast slice holds 11 pairs, 10 of them achievable) and remarked that the image keeps its own copy of both defaults in /app, that the sentence separated the code block from the paragraph that explains it, and that "each file starts with its command" held for the run files alone. On those: the sentence moved to the end of the section and says that the need for a native run is the wrapper's; `repos` was measured in /app. Round two approved the diff and blocked on one line citation in the message (40-42). Round three left the diff approved and blocked on one clause, that the /app run is a separate run; it is now marked so. Docker was run by the session alone, never by the reviewer. --- ops/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ops/README.md b/ops/README.md index 43cb0c6a..cdb796de 100644 --- a/ops/README.md +++ b/ops/README.md @@ -37,6 +37,10 @@ from your directory — someone who installed the engine deliberately should not container. A native run reads `.env` from your directory, not from the checkout. Set `OUSAST_PREFER_NATIVE=0` to always containerise. +With their defaults, `ousast pairs` and `ousast repos` need the root of the checkout as the working +directory, which under the wrapper means a native run: `benchmarks/pairs/catalog.toml` and +`benchmarks/repos` are read from the current directory. + ## Two ways to get the engine **Docker (recommended for contributors).** The tool and Joern ship in one image, so nothing is installed on