Commit Graph
2 Commits
Author SHA1 Message Date
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 CiepluchandClaude Opus 5.5 66357ffea1 pre-push(17.5): say when the engine cannot finish, and offer it in the background
--engine inline|background|off (hook: OUSAST_PUSH_ENGINE). background returns
after the quick tier and starts one detached explicit replay of the same base
and head (push/background.py), one at a time per artifact directory; its
artifact lands under <artifact dir>/engine/<repo key>/<head>.json and the next
run prints "Engine result for <head> from the previous push" once. A deadline
miss says so in one line naming the deadline and the background option. No
engine speed work. Requirement 9.5.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo
2026-10-02 22:31:14 +02:00