Files
Open_Ultra_SAST/.kiro/specs/harnessx-removal/tasks.md
T
Marius CiepluchandClaude Fable 5.1 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
2026-10-02 10:15:19 +02:00

3.8 KiB

Implementation Plan

Order follows the design's commit sequence (Requirement 5): nothing is deleted before its replacement has landed and passed its fixture test. Every task is a commit gated on the full suite's own exit code, ruff check, ruff format --check and mypy; the reconciler stays under 500 lines.

  • 1. Baseline without the extra

    • Equality script (design §3) with its find_spec("harnessx") and freeze checks; re-sync .venv without the harnessx extra first.
    • Record benchmarks/measurements/<date>-harnessx-removal-baseline/: full suite, ousast pairs --json, the python-vulnerable quick benchmark, one standard-mode scan, ousast improve --dry-run; the exclusion list written next to it.
    • Requirements: 3.1, 5.1
  • 2. Memory store and the remember task

    • plane/memory.py: the MemoryStore interface with FileStore and S3Store (object metadata/tags, S3 Select JSON queries probed with a local fallback, versioned provenance, lifecycle, presign stubs; OUSAST_MEMORY selects; S3 settings from .env; boto3 as an optional extra); JSON rows per repository + pin, facts by content hash, FileStore ingest refuses below 1 GiB free, plane/tasks/remember.py (model-free), reconciler.mark_done under the run lock, seed and ingest wiring in cli._plane, generator annotations; fact reuse when repository, pin, candidate set and runner image match.
    • Fixture tests: rows from a recorded Run, reuse on an unchanged pin, recompute on a changed one, disk refusal.
    • Requirements: 6.1, 6.4
  • 3. Proposals from memory

    • improve/memory.py with rules M1 (demote) and M2 (promote) and the advisory disputed-family signal; run_round(proposals=...); ousast improve --memory (opt-in; default output byte-identical); provenance per proposal in the sidecar and journal; the train-on-test guard (qualification population, gated benchmark cases, holdout pairs).
    • Tests: each rule on crafted rows, the guard drops excluded rows, provenance round-trips, default improve unchanged.
    • Requirements: 6.2, 6.4
  • 4. The loop as a plane Run

    • Tasks alerts, measure, propose, improve (no Model, zero budget); --loop Run generation; fixed-pin Workspaces; the gate's verdict in <run>/loop-improve/gate.json; adoption stays a maintainer commit.
    • Fixture tests with the fake ax; one live loop Run on the local ax recorded (no model spend beyond the verify passes it reuses from memory).
    • Requirements: 6.3
  • 5. Retire the HarnessX scan paths

    • cli.py, fusion.py, verify_judge.py, stage_processors.py changes; RetiredConfigError for [models] verifier, [fusion] panel_model/decider_model; one warning for a [harnessx] section (the only tagged retirement text allowed in src, enforced by a test); tests renamed to the behaviour they assert.
    • Requirements: 1.1, 1.2, 1.3, 3.3
  • 6. Delete HarnessX code and packaging

    • Delete harness_ext.py, hunter_harness.py, verify_judge.py's judge path, the HarnessX-only tests; remove the extra, the mypy override and the uv.lock entry; rename the conftest fixture; audit rows and manifest; the reference search test (Req 2.4).
    • Requirements: 2.1, 2.2, 2.3, 2.4
  • 7. Equality proof

    • Rerun the baseline script; commit the comparison record next to the baseline; any difference outside the exclusion list blocks the merge.
    • Requirements: 3.2
  • 8. Documentation and specs

    • README ax-plane section pointing at ops/ax/README.md; docs/examples.md §6 and docs/threat-model.md (egress policy, budgets); dated retirement notes in the four specs and .kiro/steering/overview.md; release note naming the silent loss of the second hunter for users who set [models] hunter.
    • Requirements: 4.1, 4.2, 4.3