mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-12-03 10:18:18 +00:00
0c5e06bb149af3ec40632d4116c3a31525d212ff
57
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
2bf92717aa |
docs: a humanizer pass over the README and the docs pages
The maintainer's request, in their words: "run /humanizer across the readme and docs and push them to main". The menu of 2026-11-28, three answers, each the option recommended: prose only (headings, code blocks, commands, paths, link targets and quoted strings stay); README.md and the 21 pages under docs/ (the three ops pages that the site includes stay as they are); the push follows the full gate. What changed - The pass read the 22 files with the humanizer skill, in its register for reference text: plain and neutral, no personality added. Apart from the two corrections below, a file was edited only where a pattern of the skill required it. - Six files changed, +14 -12 (s10_rd3_diffcheck.out). The other 16 pages are byte-identical to HEAD. - README.md: one tailing negation became a sentence of its own. A missing engine is recorded as a degradation; it does not count as a clean result. - README.md, docs/architecture.md, docs/memory-and-detection.md and docs/scanning.md: four sentences lost a diff-anchored "now" (one word each). - docs/pre-push-for-developers.md: two "not just" contrasts, a tailing negation and a run of three subjectless "No ..." fragments became plain clauses. The bold label keeps its strength: "It can prove as well as warn." - Two old faults that the README rewrite of |
||
|
|
c10dc11a43 |
docs(readme): a system map above the documentation index; open parts link docs to the roadmap
The maintainer's request of 2026-11-28, in chat, after |
||
|
|
6ef8381396 |
docs(readme): an adopter's front door; roadmap and engine-trace runbook move to docs
The maintainer's request of 2026-11-28, in chat: update the README for an adopter
with /cobesy; move the parts on the roadmap and on technical internals to docs;
index docs/ from the README; add a roadmap visualization with the present state
and the past milestones; then give the choices for the open items through the
menu. The menu had eleven questions, each answered with the option recommended.
Two answers govern this commit. "README first": the README work is committed with
the per-commit gate and a fresh reviewer, before the record commit for 5b and
item 5c. "Fix in this commit": the faults found while moving text are fixed here,
the wording shown first.
The wording of the two fixes was shown in chat and answered "Write it as shown
(Recommended)" and "Say why, in a comment (Recommended)". A third fault offered in
that menu, "five docs pages link README anchors that do not exist", was the
session's error: they are seven links, in four pages, to five anchors of
ops/ax/README.md and ops/README.md, and all five headings exist. Nothing was
repointed. The learning is in the handover, which is not tracked, with the
maintainer's approval.
What changed. Measured in /tmp/opencode/s10_rd1_diffcheck.out: five tracked files
changed (144 insertions, 328 deletions) and three files are new.
- README.md, 488 lines at HEAD and 296 now. It keeps the install of Tier 1 and
Tier 2, the scan modes, the run artifacts and the maintainer commands. It adds
"What you can run today", "Status and roadmap" (a Mermaid ladder of R0 to R6, a
table with each step's state on 2026-11-28, a table of past milestones) and
"Documentation", a table with one row for each of the 21 pages under docs/.
- docs/roadmap.md, new, 123 lines: the destination, the ladder with what must be
true to move on, the release milestones M1a to M5, the past milestones, the
status of 2026-11-06 as the README carried it, what changed after that day, and
the rules that bind every step.
- ops/ax/engine-traces.md, new, 80 lines: the README's section "Engine traces on
kube-ax" as it stood, with "s3://..." written "s3://<bucket>" and the link to
ops/ax/README.md written as a path and a section name. docs/ops/ax/engine-traces.md,
new, includes it from its line 3, as docs/ops/ax/README.md includes
ops/ax/README.md.
- mkdocs.yml: two entries in the nav, Roadmap and Engine traces on kube-ax.
- docs/evaluation.md: one paragraph with the gate's committed baseline
(benchmarks/measurements/2026-09-06-gate-baseline.txt: recall 93.62%, 44 of 47;
false positives 0.0%), the day the README quoted it (2026-10-02,
|
||
|
|
e2163a4fea |
feat(scan): an unwritable tree keeps a scan's learnings under the runs directory (item 5b)
The decision of the maintainer on the ninth session's menu, answer 9 (.kiro/handover.md,
untracked, 1340-1343 as it stood on 2026-11-27; the option as offered, 1451-1452):
> 9. The ledger in the image. Answer: "Decide the key now": a digest of the tree's files
> (the `fingerprint` of the `provenance` stage is no digest), one ledger per digest under
> the runs directory; a design note is shown to the maintainer before any code.
The design note (/tmp/opencode/s10_c10_design_note.md, 299 lines) was reviewed in five
rounds before it was shown, and shown to the maintainer whole on 2026-11-27 with its three
questions. The maintainer's answers came on 2026-11-28, through the question tool, each the
recommended option as offered: "Stand as written (Recommended)" on the note's rule of reading
and writing (its section 3.3), "With the runs, by last use (Recommended)" on how long a ledger
stays (section 3.5), and "Build it now (Recommended)". The dated note on task 3.1 of
.kiro/specs/contributor-scan/tasks.md (lines 459-502) carries the rule as approved.
The fault: the image mounts the target read-only, so the ledger a scan writes into the tree
(<target>/.openultrasast/calibration/false_positive_learnings.json) cannot be written there,
the scan records ledger_not_written, and the next scan in the image starts without the
learnings of the one before.
What changed
- src/openultrasast/tree_digest.py: tree_digest(target, runs_directory) (line 48), a sha256
over one entry per file in path order (the length of the path, a colon, the path, a tab,
the sha256 of the bytes), after a version line. Left out: links, the directories a scan
ignores (IGNORED_DIRS, so that the tree's ledger does not change its own key) and the runs
directory, whichever way it is reached (by device and inode). A file that cannot be read
and a directory that cannot be listed are named "unreadable"; a directory that can be
listed but not searched raises, as the scan's own reading of the tree does.
- src/openultrasast/digest_ledger.py: the ledger of a digest, calibration/<digest>.json under
the runs directory, in the JSON of the tree's ledger. read_digest_ledger (line 47) reads it
and marks it as used; settle_digest_ledger (line 65) applies the rule.
The tree took the write: the ledger is removed. The tree refused: the ledger is written
with its own entries and this scan's new ones, never one whose finding id the tree's
ledger has, only when that differs from its content, and removed when that would leave it
empty. No write: a ledger whose every entry the tree's ledger also has is removed. One that
could not be read (a file that is not a ledger, whatever its top level or its depth) is
taken for empty and goes, unless the tree refused and this scan wrote it. It is written
through a temporary file of the writer's own and a rename (line 112).
- src/openultrasast/cli.py: the stage tree_digest, before any stage reads the tree
(cli.py:603-605); _read_ledgers (cli.py:1085-1099), the tree's ledger and then the
digest's, the tree's entry winning by finding id; _persist_calibration_feedback
(cli.py:1101-1136), which writes the tree's ledger when its content would differ from what
it held, also when only the digest's entries are new to it; the manifest's ledger block
(cli.py:731-735); a notice when the digest's ledger could not be written or removed
(cli.py:755).
- src/openultrasast/run.py: prune_expired_ledgers (run.py:112), called by prune_scan_runs
(run.py:71-99). Under calibration/ of the same two locations as the runs, a ledger, or the
temporary file it was written through, last used OPENULTRASAST_RUNS_RETENTION_DAYS days
ago is removed; 0 keeps all. Files called something else, links and directories stay. A
removal that fails is said once and costs the scan nothing.
- src/openultrasast/reports.py: write_manifest takes ledger (reports.py:212, 254-255). The
ledger_not_written sentence names the digest's ledger when it holds the learnings
(reports.py:461-467, chosen at 479-483).
- README.md, docs/examples.md, docs/architecture.md and
.agents/skills/openultrasast-scan/SKILL.md say where the learnings of a read-only tree go,
and what removes them.
Two departures from recorded decisions, both put to the maintainer in the note and accepted
with it:
- The tree's ledger is written when a scan learns nothing new, because the digest's entries
are new to it. The decision of 2026-11-24 says it "is written only when a scan learns
something" (spec.json:68).
- A ledger of a digest is removed when it expires, and its time is changed when a scan reads
it. The decision of 2026-11-24 says "the scan's own run and anything not named like a run
are never touched" (spec.json:73), and dates a run by its id, where a ledger is dated by
its use.
Measured
- The built function gives the note's prototype's digest for the four-file subject
(915506a8...) and for libpng's copy (1dcd664f...): s10_c10_port.out.
- In the image, on the final code. A probe image of openultrasast:dev (3f959b31f2f2) with
the tree's package copied over it, built at 09:06:36Z and holding the tree's 297 .py files
(s10_c10_image_probe/03_probe_sources.out, s10_c10_sources_still_equal4.out). Standard
mode, no key, network none. The four C files of contrib/examples of libpng and their
README, copied fresh and mounted read-only at /target; a scratch runs directory mounted at
/reports with the wrapper's OPENULTRASAST_RUNS_DIR=/reports (s10_c10_image_probe.sh,
stamps 09:06:36Z to 09:09:14Z, 2026-11-28).
- The first scan learns four entries and keeps them in /reports/calibration/<digest>.json:
calibrations_applied=0, project_score 26, the manifest's ledger {digest_ledger: written,
learnings_read: {digest: 0, tree: 0}} (10_, 11_). The report names the file.
- The second scan of the same bytes reads them: calibrations_applied=2 on two files,
project_score 59, penalty_total 32.0, learnings_read 4 from the digest's ledger,
digest_ledger "left as it was" (20_, 21_). The file's time is that of the second scan's
read, 09:07:19Z (22_).
- The digest the scan took in the image equals the one taken on the host for the same
files (s10_c10_image_digest_host4.out). The target is unchanged
(s10_c10_image_target_same4.out).
- Three earlier runs of this probe and of the native run below, each on the code as it
stood before a later correction of the same rule (the value for a ledger that could not
be read; a ledger whose top level is not an object; one nested too deep), gave the same
numbers. Their stamps: 08:12:50Z to 08:17:31Z, 08:23:38Z to 08:27:42Z and 08:50:15Z to
08:54:17Z. They are kept as s10_c10_image_probe_run1, _run2, s10_c10_native_run1,
_run2 and _run3; of the third image run s10_c10_image_probe_run3.out and the host,
target and sources checks numbered 3 remain, since s10_c10_image_probe_run3 is empty.
Its files were read by the reviewer in round two.
- The shipped image, the control, on the same files: calibrations_applied=0 and
project_score 26 on both scans, no ledger block and no ledger (30_ to 42_).
- Natively, on a fresh copy of the same five files, the network off (s10_c10_native.sh,
09:09:14Z to 09:10:38Z): the first scan writes the tree's ledger (calibrations_applied=0,
project_score 26, digest_ledger none), the second reads it (calibrations_applied=2,
project_score 59, learnings_read 4 from the tree's ledger), and no ledger of a digest is
made (s10_c10_native/10_ to 22_).
- The probe left no container (2 before, 2 after: 00_, 91_) and its image is removed (90_,
92_).
Tests
- tests/test_tree_digest.py (7) and tests/test_digest_ledger.py (11, one over nine contents
a file may hold); seven tests in tests/test_scan_output_location.py, six through the scan
(three over two cases) and one on _read_ledgers; six in tests/test_run_pruning.py; one
sentence in tests/test_reports.py. The scan test of a refused write selects its run by
name now, since the runs directory holds calibration/ as well.
- RED on an archive of
|
||
|
|
e231b78e04 |
docs(readme): the AX coordinator commands build with docker compose only (item 5b)
Decision (the ninth session's menu of 2026-11-27, question 8, "README.md's copy of the base pin"; .kiro/handover.md, not tracked, lines 1338-1339 and 1439-1445). The maintainer's answer: "Drop the two lines". As offered: "README.md says `docker compose build` only; one docs commit." Not chosen: "Guard it with a test" (the session's recommendation); "Leave it". The fault: the two build commands of the section "Engine traces on kube-ax", one docker buildx build and one docker build, carried the base tag and digest by hand in two --build-arg pairs, and no test read them. When plane/task-base.digest changes, both builds still succeed on the old base until that base is deleted from GHCR. The copy in docker-compose.yml is guarded (tests/test_task_images.py:51-59, test_compose_builds_from_the_pinned_base). What changed (README.md:440-458, which are lines 440-463 on efa311a; one file, 12 insertions, 17 deletions): - The two build commands are gone, with the lines that served them alone: TASK_TAG, the metadata file that gave TASK_IMAGE its digest, and the printf of it. - The block builds with `OUSAST_VERSION=engine-ax docker compose build` and sets TASK_IMAGE to the reference the Engine image workflow printed. - The lead-in and the paragraph after the block say what the block does now. The sentence "The Engine image workflow also builds/pushes both images and prints each digest; CI needs the changes published before dispatch" stands as it was. The session's readings of the decision, open to correction: 1. OUSAST_VERSION=engine-ax stands before the command so that the image keeps the tag the two trace commands below name (--docker-image openultrasast:engine-ax, README.md:469 and :479) and does not overwrite openultrasast:dev, the image the wrapper uses (ops/shell/ousast.sh:64) and the default of --docker-image (benchmarks/learn/engine_trace.py:890). The block still says docker compose build alone. 2. TASK_IMAGE now comes from the Engine image workflow. The dropped buildx command was the README's only local build of the task image. The workflow's engine job builds plane/Dockerfile.engine-task, target engine, pushes ghcr.io/<owner>/ousast-engine-task at sha-<7> and main, and writes image@digest to its log and to its step summary (.github/workflows/engine-image.yml:104-151). AX takes --image by digest only (engine_trace.py:915-916). 3. The README no longer documents a build of the task image from uncommitted code. The last sentence of the paragraph says what a reader now gets: the Docker lane runs the local image, committed or not; the AX lanes run the task image of the revision the workflow built. 4. The paragraph that opens the section (README.md:412-413, "Rebuild it after code changes and pass its digest with --image") is left as it is: the rebuild is the workflow's, and the sentence does not say who builds. 5. When the workflow runs is not restated here; the sentence points at the rebuild policy (ops/ax/README.md:296-319). Measured (files under /tmp/opencode; all but the gate files start with their command; the gates were run as `bash /tmp/opencode/s10_gates.sh c9`): - The image compose names: `OUSAST_VERSION=engine-ax docker compose config --images` prints openultrasast:engine-ax; without the variable, openultrasast:dev (s10_c9_compose_images.out). Only the lines that start with openultrasast: were printed. No image was built. - The block parses: `sed -n '444,449p' README.md | bash -n` exits 0 (s10_c9_block.out). - Before and after: a grep for six markers (build-arg, TASK_BASE_TAG, TASK_BASE_DIGEST, docker build, TASK_TAG, metadata-file) over README.md gives 10 lines on |
||
|
|
312c09bdbf |
fix(scan): a scan in the image prunes the wrapper's runs directory too (item 5b)
The maintainer's answer 7 of 2026-11-27 (the ninth session's menu). The label is in .kiro/specs/contributor-scan/spec.json ( |
||
|
|
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
|
||
|
|
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
|
||
|
|
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.
|
||
|
|
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." |
||
|
|
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. |
||
|
|
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. |
||
|
|
17d46c0f93 |
feat(contributor-scan): remove scan runs older than 30 days from the default cache (3.1, run retention)
By maintainer decision. Since
|
||
|
|
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. |
||
|
|
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. |
||
|
|
c5ec9a11d1 |
docs(independent): list population v4 among the independent populations
Population v4 (11 cases: 4 PHP with JavaScript, 4 TypeScript, 3 Python) was frozen on 2026-11-23 and is unscanned. The docs and steering that enumerate populations v1, v2 and v3-php now name it, with no result claimed. |
||
|
|
375d7b7f71 | docs: record Zenodo DOI | ||
|
|
7deab25093 | chore(release): prepare v2.1.0-alpha.1 checkpoint | ||
|
|
f5a904b7f2 |
chore(p0): retire regress, the skill router, the module audit tool and vocabulary.sc
Off every active line (PATHFINDER-2026-10-13/03-unified-proposal.md, cuts). Deleted: src/openultrasast/regress/ and the deep-mode REGRESS branch (deep now records a regress_retired degradation and equals standard; proof is the search-with-proof arm's job), the sandbox docker runner and probe that only regress used, --fail-on worth-fixing, RegressConfig, the two ledger helpers only regress called; skills.py and index.py with the hunter pool's skill routing; model/audit.py; cpg/queries/vocabulary.sc with benchmarks/push/ontology_gap.py. Docs and the scan skill describe the retirement. Net: 3,895 lines deleted, 86 added. Targeted tests: 180 passed, 28 skipped; 3,331 tests collect. Co-Authored-By: Claude Fable 5.1 <[email protected]> |
||
|
|
94e96c6885 |
chore(p0): remove the improve lever and the plane improvement loop
Off every active line (PATHFINDER-2026-10-13/03-unified-proposal.md, cuts). Deleted: src/openultrasast/improve/ (1,175 lines), the ousast improve subcommand, plane/tasks/loop.py and loop.yaml with the --loop generation, the memory-snapshot step in memory.seed, pairs.build_pair_signals, and the four improve tests plus the loop cases in other tests. Docs no longer describe the lever. Net: 3,073 lines deleted, 83 added. Targeted tests: 154 passed; 3,436 tests collect. Co-Authored-By: Claude Fable 5.1 <[email protected]> |
||
|
|
b08f372022 |
docs: retire the SZZ-pool metric, add the valid-benchmark brief, plain-English pass
The frozen SZZ-labeled pool is not a valid benchmark. SZZ puts the vulnerability in the wrong place about half the time, and ~76% of entries are library-internal (not reachable in-repo), so its catch/false-alarm numbers (record 07's "3/92") are noise. Retired as a metric and a gate across the roadmap and briefs; no pool-scored number is quoted anywhere. Added .kiro/specs/valid-detection-benchmark/brief.md: positives labelled from the fix (not SZZ), kept only when app-shaped and reachable in-repo, each verified; ordinary negatives from the same repos; unseen repos; the whole tool measured; plain metrics (catch rate, false-alarms per 100 pushes, precision, proved-catch). Ran a plain-English pass (the humanizer rules) on the roadmap, README, and the two active briefs via Codex, then reviewed the diff: only these files changed, every number/path/hash/command is unchanged, and the retired-metric decision is intact. Co-Authored-By: Claude Opus 4.8 <[email protected]> |
||
|
|
6c789eac40 |
docs: correct G0 status (record 07 done on docker) + ax-lane is a G1 target
Roadmap "Where we are" table said Baseline (G0.2) = "Not yet, run on kube" -- stale.
Record 07 (G0 exit) was completed right after on the docker lane (
|
||
|
|
23c8644a37 |
docs: README reflects the dynamic proof arm and unseen-repo release gate
Update the front door and Status to the current state: static abstract-interpretation blocking is NO-GO by hand, so the work is a dynamic proof arm that builds and runs the app and demonstrates a finding by a differential (triggers on the vulnerable revision, not the fixed one), earning a block by execution rather than calibration. It is pilot, not shipped. The release gate is a measured catch/false-alarm number on unseen repositories, now being produced. Bump v2.0.0 -> v2.0.1, link the developer guides. Co-Authored-By: Claude Opus 4.8 <[email protected]> |
||
|
|
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]> |
||
|
|
591818d5fc |
pre-push(17.6): install, Docker wrapper and first-run docs
`ousast pre-push install|uninstall [REPO] [--force] [--docker]` ships in the wheel with the hook as package data; it honours core.hooksPath, refuses an existing hook unless --force (which chains it as pre-push.before-ousast), and uninstall restores the chained hook. ops/ousast-docker is a hook-callable script: the repository read-only and the artifact directory at their own paths, stdin passed through, no network, --memory 3g, the GHCR 2.0.1 image by default, advisory exit unless blocking. Help text for every pre-push flag; a first-run guide, settings, skip-reason glossary, CI recipe and full --help in docs/scanning.md; README tiers 1 and 2 pull the published image. The image was not rebuilt: 1.1 GB free, below the 4 GB threshold. Requirements 7.4, 9.6. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo |
||
|
|
49e11e0252 |
docs(readme): one paragraph for the published site and local preview
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo |
||
|
|
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 |
||
|
|
552671ca6a |
docs: plain-language pass -- README, index, where we stand, scanning, examples, threat model
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo |
||
|
|
50f4e69321 |
release: v2.0.1 -- Apache-2.0 licence, GHCR images, CI green, front-door README
v2.0.0 was tagged but its release job stopped at the format check, so no release or package was published; v2.0.1 is the first published 2.x release. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo |
||
|
|
bdabb978f8 |
docs(readme): front door -- current commands, status, and links to every docs page
Rewrite README.md as the front door of the docs site: a short "What it is", the Status (NO-GO against M4, figures quoted from docs/where-we-stand.md), a tiered install (quick scan without Docker; standard/deep with the openultrasast:dev image; the plane on ax for maintainers; k3s planned), then one section per docs page, each linked by relative path so it works on GitHub and on the site. Stale claims removed: `ousast index` (deleted), `OPENROUTER_EMBEDDING_MODEL` (no longer read), the duplicated scan-mode, rule and gate tables (now on docs/scanning.md and docs/evaluation.md), the HarnessX-era wording. Adds a Licence section stating that no licence file exists yet. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo |
||
|
|
c978de9ff8 |
merge(cleanup): second legacy inventory -- vector index, equality test, unread config keys, status notes
Also drops the removed ousast index line from the scan skill. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo |
||
|
|
16d9ef7110 |
chore(skills): apply the 2026-10-02 review -- current CLI and evidence, merges, removals, steering names
openultrasast-scan: evidence ladder as verification.py defines it, with the levels nothing produces today; --mode prerequisites, --fail-on, recorded degradations, run artifacts, ousast mcp; retired [evidence] threshold language removed. openultrasast-triage: reasons verified against calibration.py; deterministic fusion; adjudications as labels, plane verdicts as features, rule changes through improve or a registered experiment; fix-audit merged as a fix-and-re-scan section. kiro: spec-quick and spec-batch removed; validate-gap and validate-design merged into spec-design (--gap, --review; the review gate stays); steering-custom merged into steering; core steering names overview.md, roadmap.md, safety-net.md; instrument rule in debug and verify-completion; repo gates named in validate-impl. AGENTS.md, README skills paragraph and tests/test_agent_skills.py (.agents/skills, two product skills, drift tests) updated. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo |
||
|
|
e1db7e1920 |
chore(index): remove the unused vector index, the ousast index subcommand and the [embeddings] section
Legacy inventory 2, item R1. The vector half of index.py (VectorIndex, VectorRecord, RetrievalHit, RetrievalPackage, the EmbeddingClient protocol, index_reuse_key, build/write/read/query_vector_index, build_retrieval_package and their helpers) had no importer in src; `ousast index` wrote index/chunks.json that nothing read, and was the only reader of `[embeddings]`. index.py keeps CodeChunk and chunk_text_namespace, which skills.py imports; chunk_file/build_code_chunks go with their only caller. `[embeddings] model` and `[embeddings] store` join RETIRED_KEYS (RetiredConfigError naming the reason), the same way the [variants] keys were retired; OPENROUTER_EMBEDDING_MODEL is no longer read, so the README and .env.example drop it (`ousast learn memory embed --model` names the model). test_index.py now tests the chunker only; test_config.py covers the two retired keys and no longer asserts the removed field. The module audit record is regenerated (counts unchanged: 151 modules, 0 orphaned; the index module's importer list shrinks to skills). RELEASE_NOTES Unreleased carries the line. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo |
||
|
|
69b5e0efcc |
chore(skills): move the project skills from .opencode/skills to .agent/skills
Maintainer decision 2026-10-02 (no symlink). AGENTS.md, README, the two spec docs, the kiro-spec-batch skill and the provenance ignore list are repointed; the OpenCode plugin package.json stays under .opencode. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo |
||
|
|
5aac7eac36 |
docs: audit against v2.0.0; deployment guide (local ax and a separate Kubernetes cluster)
Every README and docs page checked against ousast --help, the code and the committed records. New docs/deployment.md (in the nav): what runs where today, this host's setup (up.sh, doctor, smoke Run, footprint), step-by-step guidance for a separate Kubernetes cluster with implemented vs planned stated per item (no cluster deployment has been made; kube context and doctor's registry check are hard-coded in doctor.py, egress.py, router.py), and what the plane/ manifests need changed. Decision-engine pages state slice 2 (six families, pooled and within-pair AUC, BLOCK offered nowhere, canary below 0.9 for three families, positives-only inflation) and that the engine is not adopted; exp-002 registered, not run, no result quoted. Fixed: model/judge.py reference (now model/pipeline.py), missing-key behaviour, .env reference (OPENROUTER_EMBEDDING_MODEL, store variables), docs extra, plane memory-normalise and ousast index listed, ax README's cluster table made precise. RELEASE_NOTES gets an Unreleased entry. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo |
||
|
|
838638a692 |
release: v2.0.0 -- ax plane, HarnessX removed, S3 memory on RustFS, AI decision engine (in development)
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo |
||
|
|
6d601c1464 |
docs: token ergonomics -- runtime routing/budgets/caches and the development-side tooling
One page, two halves with a Mermaid diagram each. A: the plane's token economy (one Model per Task with a metered usd/calls budget, attribution table, credentials only in the start request, repo-facts and content-addressed reuse, replay at $0, triage-hunt-tie-break order, prefix-cache prompt order) with every cost quoted from plane-increment-1/2.json, the injection-slice and harvest records, and an honest not-yet list (no token budget in ax, triage applied not run, k and contrast fixed outside experiments). B: the development-side measurement (tool I/O 85.5%, previously 90%) and the benchmarks/dev remedies: read_guard hook, bulk_read portal, token_report, plus the practices. Linked from the nav, index, memory-and-detection and the README docs list. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo |
||
|
|
51d064e381 |
refactor(memory): S3-generic store on boto3; RustFS is the tested server (no MinIO naming)
The plane's memory store no longer names one vendor. `MinioStore`/`SdkClient`/ `minio_settings`/`MINIO_KEYS` become `S3Store`/`S3Client`/`s3_settings`/`S3_KEYS`; the URL scheme is `s3://<bucket>[/<prefix>]` (`s3://` alone uses `S3_BUCKET`); the settings are `S3_ENDPOINT` (a full URL), `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, optional `AWS_SESSION_TOKEN` and `S3_REGION`. The client is boto3 (extra `s3`, imported lazily): SigV4, path-style addressing, SDK checksum trailers off, paginated listing, versions and delete markers listed and deleted by version (`purge`, used by the contract tests' teardown so the bucket keeps nothing of a run). Behaviour is unchanged: the store never configures its bucket and verifies versioning, the `runs/` expiry rule, S3 Select and tag reads at startup; no local fallback; every row carries every queryable field with "" placeholders. The admin hints read `--endpoint-url "$S3_ENDPOINT"`. The fake client still reproduces RustFS's two Select failures (unbound leading-row field, null-typed column). Docs: rustfs.md stays the tested server's setup page (policy JSON unchanged, env names updated, any S3-compatible store with versioning, lifecycle, tags and Select works); memory.md, ops/ax/README.md, README.md, steering and the two current spec designs use the S3 naming. Retired specs and committed measurements are untouched. Real server (RustFS, OUSAST_MEMORY_TEST_S3=1): test_plane_memory + test_learn_compile 75 passed, 1 skipped. Store copy of the live local store to a temporary prefix: every count matched (776 row objects, 2982 rows, 22 facts, 788 excerpts, 2601 responses, 2 programs, 1793 index entries), 4190 versions purged afterwards. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo |
||
|
|
95a252b89b |
docs: MkDocs site with flow diagrams; RustFS permissions
Material for MkDocs site (mkdocs.yml, optional extra `docs`) with Mermaid via the superfences custom fence. New pages: overview, scanning (modes, quick rules, Joern engine, priors, pre-push delta), the plane on ax (one task as a sequence, golden snapshot, Run DAGs), memory (row kinds, write/read paths, FileStore vs S3, verify at startup), memory and detection, and RustFS setup (admin steps, complete agent policy, .env, refusal messages, Select limit). The ops READMEs are included at build time; evaluation gains the population lifecycle and the fold layout. tests/test_docs_site.py runs the strict build when mkdocs is importable and checks Mermaid blocks and the RustFS page. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo |
||
|
|
32a2cb8bcf |
docs: describe the system as of 2026-10-02 (ax plane, AI decision engine, PHP, v3)
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo |
||
|
|
f4bd984fda |
docs(harnessx-removal): the plane replaces HarnessX in README, docs and specs (task 8)
README: "Configuring the HarnessX agentic plane" becomes "The agentic plane (ax)" (ousast plane run|status|doctor|remember, per-task Model, budget and egress, pointer to ops/ax/README.md, one tagged retirement line); "The HarnessX self-improving cycle" becomes "The self-improving cycle", and its MetaAgent paragraph is replaced by the memory proposer (`ousast improve --memory`, provenance, train-on-test guard). The fusion panel_model/decider_model lines and the [harnessx] spend caps are gone. The README reference test now passes without its strict xfail. docs/examples.md section 6 runs the plane; docs/threat-model.md describes the per-task EgressPolicy, the usd/calls budgets and the start-request credential path. RELEASE_NOTES.md gets an Unreleased entry: HarnessX removed, the retired keys and their errors, the silent loss of the second hunter for users who set [models] hunter, and the plane as the agentic path. Dated retirement notes (2026-09-30) head the requirements, design and brief of harnessx-self-improving-rulesets, learning-harness, three-stage-scan and openrouter-sast-harness, and follow the spec table in steering/overview.md; history is unchanged. All tasks are checked, so spec.json moves to implementation-complete. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EmM1j46qgKMh3zqD1QMwEo |
||
|
|
04f888019b | release: prepare v1.2.0-alpha.1 and record rollout blockers | ||
|
|
c14ac8344f |
docs: drop the skills set from the detector requirement and refresh stale framing
The maintainer settled the conflict the group 2 review escalated: a detector configuration has no skills set. The skill router belongs to the tool's earlier shape, and a family's prompt, checklist, tools and counterexamples already carry what a round evolves. The README described the project as an editor-agent harness whose skills steer it, and pointed users at the maintainer's spec directory. The tool is a CLI now and the agent integrations are optional, so the opening says that, the skills section describes what it actually is, and the spec pointer is gone from the user-facing text. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01T7XD7x5KonMdmGRkp63EQG |
||
|
|
b3b47ad757 |
feat(corpus-seeded-mechanisms): the mechanisms lever runs from ousast improve
Review rounds 3-5 remediations (Req 5, 7). - ousast improve resolves candidates from the target's calibration dir, then the working directory's (where `mechanisms export` writes), and admits into <target>/.openultrasast/calibration/mechanisms.jsonl, where a scan of that target reads; --mechanism-candidates, --mechanism-store, --no-mechanisms; --dry-run redirects the store to scratch; accepted rounds print admit/retract <id>. - run_improvement threads the store paths; RoundOutcome carries the mechanism edits; reverted mechanism keys are blocked outright; a no-gain admission is rejected as mechanism_no_gain; a retraction may name an admitted record that left the candidate set. - leave-one-out forwards variant-search degradations and pins the containment and label rules; mechanisms export defaults to the candidates file so it never re-admits a tombstone. - design §Lever rewritten to the implemented gate; README and docs show export -> improve -> scan. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01T7XD7x5KonMdmGRkp63EQG |
||
|
|
3c36f13e03 |
feat(pair-corpus-honesty): LLM-generated Real-Vuln repos and unlicensed agent fixes as pointer pairs
Task 8.4 (Req 10.6, 5.1). - harvest.merge_recipes appends recipes by name and never rewrites existing rows. - vibe-py/build_recipes.py --pointers: the 40 LLM-generated repositories without a license become vendored = false rows (80 pairs, agent, seeded) appended to recipes.toml; unlicensed human repos stay skipped. - agent-vfc/build_recipes.py --from ... --pointers [--cache]: unlicensed agent-authored fixes become title-tier pointer rows whose function label is derived from the cached excerpt (30 added from a fresh 662-candidate search); TOML booleans rendered correctly. - catalogs regenerated: vibe-py 115 rows (35 vendored + 80 pointer), agent-vfc 59 (29 + 30); no excerpt is vendored for any pointer row. - `pairs --slice vibe-py --pointers` scores both provenances (human 35, agent 80); the default run skips 80 pairs with pointer_pair_skipped; suite and gates unchanged. README/docs name the nightly command. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01T7XD7x5KonMdmGRkp63EQG |
||
|
|
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. |
||
|
|
b5e40318db |
feat(hardening): Phase 15 — redaction, retry/backoff, budgets, threat-model docs
Release-readiness hardening. - redaction.py (zero-dep): redact_secrets masks provider API keys, AWS/GitHub/Slack/ Google tokens, bearer tokens, URL-embedded credentials, PEM private keys, and sensitive key=value assignments. Wired into the trace writer and the markdown report (on by default), so scan artifacts never leak a credential quoted from source. - provider/openrouter.py: call_with_retry — exponential backoff on transient failures (HTTP 429/5xx, connection errors, timeouts); non-transient errors fail fast. Both the chat and embedding clients use it (max_attempts/retry_base_delay configurable). - config [hardening]: redact_secrets (default true) + max_findings (bounded-CI output cap, 0 = unlimited; truncation is severity-ordered and disclosed as a `budget` degradation). Agentic spend stays bounded by [harnessx] max_cost_usd/token_threshold. - docs/threat-model.md (trust boundaries, controls, sandbox limits) + docs/examples.md (six end-to-end walkthroughs); README "Security & hardening" section links both. - CI lint/typecheck/test/detection-gate/dagger gates already existed. tests/test_redaction.py, test_provider_retry.py, test_hardening_pipeline.py + config tests. 206 passed, 4 skipped; ruff + mypy clean; detection gate PASS. Co-Authored-By: Claude Opus 4.8 <[email protected]> |
||
|
|
9c917dd6aa |
feat(mcp): Phase 12 — narrow MCP server + ousast mcp
A zero-dependency MCP server over stdio (newline-delimited JSON-RPC 2.0) for OpenCode/IDE integration, exposing only stable project-level operations. - mcp.py: McpServer (pure handle() dispatch) + serve() stdio loop, stdlib-only. Ten tools: openultrasast.scan/status/findings/get_finding/evidence/artifacts/ benchmark/explain/propose_patch/export_report. scan/benchmark run the bounded analysis pipeline; NO tool accepts a free-form command — no shell, Docker, or internal hunter tools are exposed. propose_patch degrades visibly (patch oracle is a later phase). initialize/tools/list/tools/call/ping handled; notifications get no response; errors surface as JSON-RPC errors instead of crashing the loop. - cli: `ousast mcp` subcommand launches the stdio server (lazy import → keeps the mcp↔cli cycle one-directional). - tests/test_mcp.py: tool listing is exactly the narrow surface, surface-safety (no shell/exec/command tool), scan→status→findings→explain→evidence flow, export_report, propose_patch degradation, and the stdio loop round-trip. - README "MCP server" section; openrouter-sast-harness Phase 12 checked off. Verified end-to-end over real stdio (initialize → tools/list → scan). 179 passed, 4 skipped; ruff + mypy clean; detection gate PASS. Co-Authored-By: Claude Opus 4.8 <[email protected]> |
||
|
|
867bd536a2 |
feat(fusion): Phase 13 — two-panel fusion adjudication
OpenUltraCode-style deepening for findings that need more reasoning than the ranker→hunter→verifier→mapping loop provides. - fusion.py (zero-dep core + lazy LLM path): a deterministic trigger policy (critical/high severity, verifier disagreement, static-vs-semantic conflict, gates-risky-fix, high-assurance request); two panels that steel-man the vulnerability and false-positive cases; a deterministic, auditable decider that reconciles to one of five dispositions (accepted/rejected/mitigated/deferred/ blocked); full disclosure (votes, model IDs, degradations, warnings, decision source). fuse_findings_dispatch routes panels through the configured HarnessX provider when panel_model + extra are present, else deterministic + a degradation. - config [fusion]: enabled (default true), panel_model, decider_model, high_assurance. - cli: standard-mode fusion stage runs on triggered findings, writes fusion.json and a manifest `fusion` block; quick mode never fuses. reports.write_manifest gained the fusion summary param. - 8.4 zero-dep guard extended to cover fusion.py (lazy harnessx import only). - README fusion section marked implemented + documented; openrouter-sast-harness Phase 13 checked off. tests/test_fusion.py (16 tests) + config tests. 169 passed, 4 skipped; ruff + mypy clean; detection gate PASS. Co-Authored-By: Claude Opus 4.8 <[email protected]> |
||
|
|
e255eb264f |
feat(harnessx): configurable provider + per-task budget caps
Add a [harnessx] config block so the agentic plane can be steered from
openultrasast.toml, and make the LLM provider selectable (the hunter and verifier
previously hardcoded AnthropicProvider).
- config.HarnessxConfig: provider ("anthropic"|"openai"|"litellm", default
anthropic), max_cost_usd (2.0), token_threshold (120000); parsed from [harnessx].
- harness_ext.build_provider: single lazy, capability-guarded provider factory.
The provider name is validated before any import, so an unknown choice fails with
a clear ValueError even when the extra is absent; each provider reads its own
standard key env var (openai -> OPENAI_API_KEY, anthropic -> ANTHROPIC_API_KEY).
- HxScanOrchestrator and verify_findings_dispatch take a provider and route through
build_provider; cli threads config.harnessx.{provider,max_cost_usd,token_threshold}
into both the hunter and the verifier.
- README: "Configuring the HarnessX agentic plane" section (install, models,
provider, budgets, fallback/degradation).
Test isolation: convert the "harnessx not in sys.modules" import-guards to a
hermetic subprocess fixture (tests/conftest.py assert_cold_of_harnessx) and
simulate extra-absent in the CLI dispatch tests, so the suite is deterministic
whether or not the optional extra is installed (it now is, locally). Verified the
OpenAI path constructs end-to-end (build_provider -> OpenAIProvider; orchestrator
-> Harness) with the budget threaded through.
137 passed, 3 skipped; ruff + mypy clean; detection gate PASS.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
|