mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-12-04 02:38:18 +00:00
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.
This commit is contained in:
@@ -30,3 +30,7 @@ benchmarks/measurements/*
|
||||
# the hunter's contamination report reads them from a checkout, not from the image.
|
||||
benchmarks/valid
|
||||
benchmarks/unseen
|
||||
|
||||
# The search pilot's working files are git-ignored (.gitignore), so a checkout never has them; a local
|
||||
# build context does.
|
||||
benchmarks/search/private/
|
||||
|
||||
Reference in New Issue
Block a user