Repository navigation
bench-kit v0.6.0: sweep ledger, auth-error check, secret scrub - #7
Merged
Merged
Conversation
- 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
runs/*/raw/), but each sweep's per-trial verdicts go to a trackeddata/sweeps/<sweep-id>.json(schemabench-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 whendata/sweeps/or a run'smanifest.json/samples.jsonlis gitignored (viagit check-ignore, tracked files never count). BL001 validates ledgers that declarebench-sweep/1; other ledger formats are left alone.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-filekeeps the streak across one-trial-at-a-time calls.--only/--skip/--patternhandle benches whose transcripts quote a target's own 401s.--require GLOBis the missing-files check. Lint BL013 warns on auth-error rows in a run marked complete.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.--checkexits 1 if any value is left. The caller names the secrets; bench-kit never reads a secret store.Checks
tests/test_sweep_tools.py(102 total pass); ruff check + format clean; wheel shipsbench-sweep-1.schema.json.Not tagged. Tag
v0.6.0after merge.