Commit Graph
21 Commits
Author SHA1 Message Date
Marius Ciepluch 7ecd60ec4e ci(release): the retention prunes image versions too
The maintainer's request, on 2026-11-29: "packages haven't beeen updated in github. do we delete
them?". The two image packages were updated (2.2.0-alpha.1, three hours before); what is old is
the tag latest, which release.yml gives only to a release tag without a hyphen. Asked by menu
what to do with the image versions, the maintainer chose "Prune image versions (Recommended)":
keep the versions of the kept release tags, keep main with its sha tags, delete the other
sha-tagged and the untagged versions of openultrasast and openultrasast-runner; the first run
only lists, and the deletion waits for the maintainer's word.

What changed
.github/workflows/release-retention.yml, 150 to 262 lines (the python of the step: 105 to 215).
The rule for tags and releases is as before. For image versions, after the versions that go with
a deleted release tag: a version that carries no tag of a kept release and not main is pruned
when it is untagged or tagged with a sha only. Two safeguards, found while the rule was written
and in its review. First, an untagged version can be the image manifest or the attestation
manifest of an image that stays: the four release images read on 2026-11-29 are OCI indexes with
an amd64 manifest and an attestation manifest (s10_pkg_indexes.out), and the packages hold more
untagged versions than tagged ones. So the step logs in to the registry, reads the index of each
image that stays once, whatever tag keeps it, with docker buildx imagetools inspect, and keeps
every version whose digest is one of the manifests that index lists. The index is read one level
deep: an index inside it is not followed, and build-push-action makes none. Second, that fails
closed: an index none of whose manifests is a version of the package, an index entry without a
digest, or output that is not an index stops the job before anything is pruned or deleted. A
version with a tag the rule does not name, or untagged without a digest, stays and is listed.
The limit for image versions is 100 in one run (the limit of 20 stays for tags and releases).
The summary lists every version to prune with the start of its digest and its tags before
anything is deleted. A failed docker call stops the job and names the call and the reason, as a
failed gh call does.

Checks
The harness /tmp/opencode/s10_rr2_harness.py runs the python of the step on fixtures with
stand-ins for git, gh and docker (/tmp/opencode/s10_rr2_bin), ten cases. Against the workflow at
HEAD (d98334a) eight of the ten fail (s10_rr2_red.out): the old script prunes nothing, makes no
docker call, and has no limit for image versions. Against this file ten of ten pass
(s10_rr2_green.out): a dry run that lists and deletes nothing; two deleting runs that delete
exactly the expected 10 image versions and 5 tag operations (keep 3), and 13 and 6 (keep 1,
where the image of a pre-release goes with its release); a failing login, a failing index read,
an index entry without a digest, versions named by another form of digest, the image limit, a
failing read of the releases and a failing read of an image each stop the job with nothing
deleted. The harness also checks that the plan is complete in the summary at the first deleting
call, that each index is read once, and that the token is printed nowhere. The YAML parses, the
step passes bash -n and the python compiles; the file is ASCII, its widest line 120 columns; git
diff --check exits 0 (s10_rr2_diffcheck.out). The gates give ten zeros (s10_rr2_exits.txt, label
rr2). No test reads the workflow. The s10 files are under /tmp/opencode, outside the repository.

Not verified
The run on GitHub: whether the package versions API names each version by the digest that the
index lists, and what docker buildx imagetools inspect prints there. The first run is a dry run.
If the API names versions by another form of digest, that run stops on the second safeguard, and
nothing is deleted; its summary is read before any deletion.

Review.
Three read-only rounds, the harness re-run in each (last r3_new 10 of 10,
r3_head 2 of 10) and copies of the fixtures under /tmp/opencode/s10_rev_rr2.
Round one blocked the file on two gaps: an image that stays under another
tag lost its untagged children, and a digest of another form made the
safeguard match nothing. Round two found both closed, the tags and releases
part identical to d98334a, and blocked the message on one sentence, since
corrected. Round three found the file unchanged (same hash, same python),
the new fixture right by hand, and the mutant without the empty-digest guard
caught. Shown by runs: the dry run list and the deleting plan are equal;
every failed or malformed read stops the job with nothing deleted; twelve
mutants are caught. Open remarks: the stop needs no child to be a version;
a nested index is not followed. Not seen: the API's fields, the run, the chat.
2026-11-29 13:20:41 +01:00
Marius Ciepluch d68280bf2d ci(release): keep the three newest releases, tags and versioned images
The maintainer's request, in their words: "add a retention of 3 releases and
tags, and delete the old". The menu of 2026-11-28, four answers, each the option
recommended: the three newest version tags with their releases, by the date of
the tag, pre-releases included (the archive/* tags stay); one workflow that runs
after each release and on demand and logs what it deletes; the old ones are
listed first and deleted on the maintainer's word; older version tags of the
images are deleted too.

What changed
- One new file, .github/workflows/release-retention.yml (150 lines).
- Triggers: a manual run, with dry run on by default, and the end of the Tagged
  Release workflow. The run after a release only lists. A manual run with dry
  run off deletes.
- The rule: version tags (vX.Y.Z with an optional pre-release) by the date of
  the tag. The newest RELEASES_TO_KEEP (3) stay, and so does the latest stable
  release. The others go with their releases.
- Images: for openultrasast and openultrasast-runner, a version goes only when
  every one of its tags came from a deleted release tag (the version, and the
  major.minor of a stable one). A version that carries latest, main, a sha or
  a tag of a kept release stays and is named in the summary.
- Guards: a non-version tag is never touched; more than 20 deletions in one run
  stop the job; the plan is written to the job summary before the images are
  read and before anything is deleted; one read gives the releases and the
  latest stable release, and a failed read stops the job; a failed call fails
  the job, and the log names the call and the reason gh printed.

Checks
- s10_rr1_harness_evidence.out: the python of the workflow, taken out of the
  file and run on the local tags of this repository with a stand-in for gh.
  Five runs. A dry run that keeps 3 exits 0 and deletes nothing. A deleting
  run that keeps 3 makes nine deleting calls: five image versions, then four
  releases. A deleting run that keeps 1 leaves the latest stable release
  v2.0.1 in place and deletes the tag v2.0.0, which has no release, by the
  API: eleven calls. A deleting run where the read of the releases fails exits
  1 with no deleting call. A deleting run where the read of the first image
  fails exits 1 with the plan in its summary and no deleting call.
- s10_rr1_file.out: the file is ASCII; its longest line is 120 columns; the
  step passes bash -n and its python compiles.
- s10_rr1_exits.txt: the gates with label rr1, ten zeros (they do not read the
  workflow; they show that the tree is otherwise unchanged).

Not verified
- The run on GitHub itself. The path for user-owned packages with GITHUB_TOKEN
  (/user/packages/container/{name}/versions) is proven only by the first run.
  The documentation of GitHub says a workflow deletes package versions through
  the REST API only with admin permission on the package, which a repository
  that publishes the package has by default (public preview).
- No test in tests/ reads the new workflow.

Review.
Two rounds, read-only, on the workflow, release.yml, engine-image.yml, the harness,
its stand-in and the evidence; the step's own shell script ran under bash with my own
stand-ins for git and gh. Round one blocked the file: the read of the latest release
was swallowed, so with three pre-releases above the latest stable a failed read let a
deleting run exit 0, print nothing and delete the release and the tag v2.0.1; a failed
call named the command but not the reason. Round two: one read of the releases with
isLatest must succeed, gh() exits with the call, its code and the stderr, and the plan
precedes the images and the limit check. The attack repeated: exit 1, the call and its
502 named, no deleting call. Measured too: a failed delete names call and reason; a
failed image read leaves the plan in the summary; 27 planned deletions stop the same
way. The harness reproduces its five runs (exit 0, 0, 0, 1, 1; deleting calls 0, 9, 11,
0, 0); jq confirms the tab-separated rows. Left for GitHub: isLatest and the package path.
2026-11-28 20:25:43 +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 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 d242ebd59c ci(release): make alpha checkpoint reproducible 2026-11-06 14:34:19 +01:00
Marius CiepluchandClaude Fable 5.1 351d73079a ci: the host job keeps the hunt and semantic extras; a benchmark main no longer leaks GIT_NO_LAZY_FETCH into later tests
The workflow runs pytest twice: in the dagger container (now one failure) and on the runner host, whose job
synced the dev group only, so dspy and tree-sitter were missing there (25 failures). The one failure shared by
both runs was the partial-clone extraction test: engine_trace.main sets GIT_NO_LAZY_FETCH in the process
environment, the variable outlived its tests, and git 2.44 and newer refuse the lazy fetch with "lazy fetching
disabled". The local git ignores the variable, so the leak was invisible here; the test module now restores
the variable after each test (leak checked with a session-end probe: present before, absent after).

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-14 08:08:32 +02:00
Marius CiepluchandClaude Fable 5.1 1b9d1ca85c images: shared task base, code-last layers, no per-push rebuilds [skip ci]
One base (Temurin 21 JDK, node/npm/tsc, php/composer, maven, sqlite, bwrap)
built only when its Dockerfile or dependencies change, plus a browser variant;
engine/search/VM images FROM base@sha256 with the code in the last layer; the
image workflow runs on dispatch, tags, Dockerfile or pin changes, with a build
cache. Executor NPROC bound relative to the current process count.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-05 20:40:13 +02:00
Marius CiepluchandClaude Opus 5.5 4b38239f68 search-with-proof group 4 + image: board, spend reservation, coordinator, search-task image
Board as immutable versioned blobs (coordinator sole writer); budget reserve/settle
before model calls; per-task and run caps; coordinator loop over an injected
executor; batch.py accepts a fixed allow-list of search variables; XSS browser
oracle; ousast-search-task image (Python, Node/TypeScript, PHP, Java 17, sqlite,
bwrap, chromium) built by CI. 103 tests on the host.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-05 14:26:43 +02:00
Marius CiepluchandClaude Opus 5.5 c6e87a8517 unseen-eval groups 4-6: generic AX batch dispatcher (engine_trace on it), replay task and image stage, scorer with adoption gate
Implemented with Codex.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-04 20:19:14 +02:00
Marius CiepluchandClaude Opus 5.5 abca40b072 engine: AX-task executor for kube-ax (engine-task image FROM ax-task-runner v0.3.1, presigned HTTPS I/O, ousast-engine- names, 60 s egress-ready retry, 1.7 GB cluster heap, VM OOM fallback)
Implemented with Codex. Live smoke pending the operator egress watcher.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-04 15:22:44 +02:00
Marius CiepluchandClaude Opus 5.5 e174c06ee7 engine: worker Deployment from the image (S3 queue with leases, dispatcher --executor queue, engine-image workflow, scoped RustFS policy); merge main
Implemented with Codex. Cluster deploy pending the k3s kubeconfig and the scoped account.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-04 14:23:04 +02:00
Marius CiepluchandClaude Opus 5.5 f0fcb6686f docs: publish the MkDocs site to GitHub Pages
A Docs workflow builds the site strictly with the docs extra and deploys it to
https://norandom.github.io/OpenUltraSAST/ on pushes to main that touch the docs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo
2026-10-02 21:16:49 +02:00
Marius CiepluchandClaude Opus 5.5 d1aabf0f66 ci: green again -- format and lint the whole tree; push the scan and runner images to GHCR on tags
CI and the release job check `ruff format --check .` and `ruff check .` over the
whole repository, while the local gate checked only src and tests, so eight
benchmark scripts drifted and the v2.0.0 release job stopped before building.
The fixes are formatting, two noqa comments and one renamed loop variable; no
script computes anything differently. The local gate now checks the whole tree.

The release workflow gains an images job: Dockerfile -> ghcr.io/<owner>/openultrasast,
plane/Dockerfile.runner -> ghcr.io/<owner>/openultrasast-runner, tagged with the
version, and the digests written to the job summary.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo
2026-10-02 20:09:28 +02:00
Marius Ciepluch 04f888019b release: prepare v1.2.0-alpha.1 and record rollout blockers 2026-09-14 08:13:26 +02:00
Marius Ciepluch e9f185da59 feat(tree-sitter-overlay-extra): parse JS/C/Java overlay via optional extra
Add openultrasast[semantic] with official grammar wheels and one CST walker
into FileIR. quick stays extra-free. Host CLI is not overlay-ready. Default CI
stays extra-free; a semantic job runs pytest -m semantic.
2026-09-04 15:07:35 +02:00
Marius Ciepluch 1ae41eea19 feat(propose-adjudicate-prove): overlay adjudicates inventory before prove
Regex inventory stays the proposer. MAP attaches promote/demote/unadjudicated/coverage
from intra-file taint (tree-sitter when a grammar parses, Python ast as last resort).
Deep sandboxes promotions only, ordered by the existing heuristic ranker plus optional
OpenRouter mechanism recall. The SAST pair slice scores overlay outcomes; the stage-1
detection gate and local pair gate stay inventory-only.
2026-09-04 13:57:33 +02:00
Marius Ciepluch 9af356797f feat(three-stage-scan): gate stage-2 maps against split-sink ranking 2026-09-04 11:53:06 +02:00
Marius CiepluchandClaude Opus 4.8 649bd42fc3 feat(gate): Phase 4 task 8 — lock the detection gate into CI
Make the >=90% recall / <10% FP detection gate a first-class, score-independent
CI step with non-regression guards.

- openultrasast.gate: canonical corpus map + DetectionMetrics/DetectionGateVerdict,
  evaluate_corpus/detection_gate (no score input — cannot be unblocked by score),
  merge_gate (ANDs the hard detection gate with the advisory-first score gate),
  within_tolerance, and a `python -m openultrasast.gate` entrypoint that exits
  non-zero on a breach. Wired as an explicit step in both the GitHub and Dagger
  pipelines.
- 8.1: pipeline tests prove a high/passing score cannot unblock a recall-breaching
  change; the gate fails below 90% recall or at/above 10% FP.
- 8.2: tests/golden/detection_baseline.json + a byte-identical baseline test for
  the default ruleset / empty ledger (44/47 = 93.62% recall, 0% FP).
- 8.3: within_tolerance band logic + a capability-gated HarnessX tolerance test.
- 8.4: zero-dependency guard — governance/scoring/benchmark planes never import
  HarnessX (sys.modules check + module-scope import scan).
- test_detection_benchmarks now sources the corpus/aggregation from the gate module.

128 passed, 3 skipped; ruff + mypy clean; detection gate PASS.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-22 17:13:02 +02:00
Marius CiepluchandClaude Opus 4.8 fb7594a3ed ci: harden flaky dagger job; docs: document Phase 1 project scores
CI: the dagger job repeatedly failed (and once hung 10 min) pulling the engine
image from registry.dagger.io. Pin the dagger CLI to 0.21.7 (matching dagger-io
and the SDK's CLI_VERSION so the engine tag is deterministic), pre-pull
registry.dagger.io/engine:v0.21.7 with a dependency-free retry loop (5 attempts,
90s/pull, 20s backoff) so the action's `docker image inspect` finds it cached and
skips its own flaky pull, and add a 20-minute job timeout so a stalled pull can
no longer hang the run. The canonical `checks` job is unchanged.

Docs: add a "Project scores and central CWE policy" README section documenting
the implemented Phase 1 — central verycode CWE policy, policy-governed severity
(one CWE = one severity), the fail-loud invariant, the 0-100 project score and
two-condition advisory-first gate, the score.json/manifest artifacts, and the
CWE-120 -> CWE-121 remap.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-22 13:25:22 +02:00
Marius CiepluchandClaude Opus 4.8 0c0137e591 ci: upload only wheel and sdist in releases
`files: dist/*` also picked up the `dist/.gitignore` uv writes, attaching a
stray `default.gitignore` asset to the release. Restrict to dist/*.whl and
dist/*.tar.gz.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-21 20:50:34 +02:00
Marius Ciepluch 1e6c1f4436 ci: add quality gates and release workflows 2026-06-18 10:06:21 +02:00