Skip to content

bench-kit v0.6.0: sweep ledger, auth-error check, secret scrub - #7

Merged
aaronjmars merged 1 commit into
mainfrom
sweep-hygiene-v0.6.0
Oct 26, 2026
Merged

aaronjmars merged 1 commit into
mainfrom
sweep-hygiene-v0.6.0

Conversation

@aaronjmars

Copy link
Copy Markdown
Collaborator

Adds sweep hygiene to the standard (STANDARD.md v2.5, new section 11) and three CLI commands. Manifests and samples are unchanged; new lint rules are warnings only.

What

  1. Sweep ledger kept in git. Raw transcripts may stay gitignored (runs/*/raw/), but each sweep's per-trial verdicts go to a tracked data/sweeps/<sweep-id>.json (schema bench-sweep/1). bench-kit ledger <sweep-id> --run <run-id> [--records file.jsonl] [--status ...] writes it; calls merge, so a runner can call it after every trial and once at the end. It exits 2 if the path is gitignored. Lint BL012 warns when data/sweeps/ or a run's manifest.json / samples.jsonl is gitignored (via git check-ignore, tracked files never count). BL001 validates ledgers that declare bench-sweep/1; other ledger formats are left alone.
  2. Fail loud on auth errors. bench-kit check-run <trial>... scans finished trials for generic provider auth-failure wording (401 Unauthorized, revoked or expired token, invalid API key, lost login) and prints a masked excerpt. Exit 2 = record the trial as an error (error.type: "auth", never scored), exit 3 = N in a row (--stop-after, default 3), so stop the sweep. --streak-file keeps the streak across one-trial-at-a-time calls. --only / --skip / --pattern handle benches whose transcripts quote a target's own 401s. --require GLOB is the missing-files check. Lint BL013 warns on auth-error rows in a run marked complete.
  3. Secret scrub. bench-kit scrub <path>... --env '*_API_KEY' [--values-file FILE] [--check] replaces each value (and its JSON-escaped forms) with <redacted:NAME>, longest first, skipping binary files and values under 8 chars. --check exits 1 if any value is left. The caller names the secrets; bench-kit never reads a secret store.

Checks

  • 24 new tests in tests/test_sweep_tools.py (102 total pass); ruff check + format clean; wheel ships bench-sweep-1.schema.json.
  • Linted the 7 fleet bench repos with this branch: no BL012/BL013/new BL001 findings. The BL003 errors that show up there come from the existing 0.5.1 render change and show up the same under v0.5.1.

Not tagged. Tag v0.6.0 after merge.

- STANDARD.md v2.5, new section 11 (sweeps).
- bench-kit ledger: tracked per-sweep verdict file data/sweeps/<sweep-id>.json
  (schema bench-sweep/1), merged on every call, exits 2 if the path is gitignored.
- bench-kit check-run: flags provider auth failures (401, revoked or expired
  token, invalid API key) so the trial is recorded as an error, not scored;
  exit 3 after --stop-after N in a row; --require for missing-file checks.
- bench-kit scrub: replaces secret values named by env var (globs) or a
  values file with <redacted:NAME>; --check verifies none is left.
- lint BL012 (run record or data/sweeps/ gitignored), BL013 (auth-error rows
  in a complete run); BL001 validates bench-sweep/1 ledgers.
@aaronjmars
aaronjmars merged commit e215bc9 into main Oct 26, 2026
3 checks passed
@aaronjmars
aaronjmars deleted the sweep-hygiene-v0.6.0 branch November 4, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant