Alpamys
0ee5f78986
fix(ci): ANSI-robust serve help test + restore 77% coverage gate (v0.71.1)
...
The v0.71.1 release commit (514761c ) went red on CI for two reasons:
- test_flag_in_help asserted a raw "--record-thumbs" substring, but Rich
splits an option name's dashes with ANSI codes under CI's FORCE_COLOR
(it passes locally without color). Strip ANSI before the substring check.
- Coverage fell to 76.96% (< 77% gate): CI installs [dev], which has no
FastAPI, so the new /v1/thumbs endpoint + record-thumbs startup block in
serve.py are uncovered there. Restore the gate honestly (no lowering, no
pragma) by adding 19 genuine no-FastAPI tests for previously-uncovered
pure-CLI paths: lock show / lock check (no-drift / drift exit 3 / missing),
env check (no-drift / missing / drift exit 3), env fix error branches,
env lock null-byte output, and load_evidence_file (the
`eval unlearning --evidence` loader).
CI-equivalent (no-fastapi) coverage: 76.96% -> 77.24%. Tests: 12134 -> 12153.
2026-06-01 15:03:37 +05:00
Alpamys
514761c89a
feat(env,lock,serve,eval): v0.71.1 — quick wins + wiring (7 closures)
...
Closes #195 #210 #214 #224 #230 #233 #209 .
- soup env fix: print-only install-plan renderer from soup-env.lock
(uv-pip / requirements; non-pip entries surfaced as comments). (#209 )
- soup lock write --env-lock: auto-derive --env-hash from soup-env.lock
via new compute_env_hash (excludes created_at). (#224 )
- soup serve --record-thumbs <db>: capture thumbs-up/down into the
local-RL SQLite + POST /v1/thumbs (transformers backend). (#230 )
- Judge-calibration persistence: JudgeCalibrationReport.to_dict +
write/load_judge_calibration + judge_calibration registry kind; load
re-validates the frozen dataclass with cwd/symlink containment. (#214 )
- soup completions: introspect a base model's real LoRA target modules
(config-only AutoConfig, local_files_only, never networks/raises). (#210 )
- Bundled MUSE + WMDP unlearning eval fixtures; WMDP forget rows ship
REDACTED (Soup never bundles verbatim hazardous content). (#195 )
- build_dag.validate_build_source: cwd-containment + symlink rejection. (#233 )
Review-fix hardening (consolidated python+code+security+tdd, 0 CRIT/0 HIGH):
load_judge_calibration containment + friendly missing-field ValueError;
serve thumbs success-print escape; env_fix --output Optional[str];
empty --env-hash auto-derives; render_install_plan PEP 440 docstring note.
Tests: 12071 -> 12134 (12044 passed, 90 skipped, 2 deselected).
2026-06-01 14:12:30 +05:00
Alpamys
740832e1b4
feat(unlearn/edit): v0.61.0 — Unlearning & Knowledge Edit (NPO/SimNPO/RMU + ROME/MEMIT/AlphaEdit)
...
5 Parts shipping schema + CLI surface for two of the most under-served axes
in fine-tuning: GDPR right-to-be-forgotten unlearning (the legal-liability
axis upstream TRL avoids) and surgical knowledge editing (research-coded
everywhere, productized nowhere). Schema-only release; live trainer +
kernel wiring deferred to v0.61.1 (matches established v0.50.0 / v0.52.0
/ v0.53.0 stub-then-live cadence).
Part A — task='unlearn' + NPO/SimNPO/RMU allowlist + UnlearnTrainerWrapper
+ data.forget_set / data.retain_set + training.unlearn_method/_alpha
Part B — soup eval unlearning (TOFU/MUSE/WMDP) with Forget Quality + Model
Utility + PrivLeak kernels + OK/MINOR/MAJOR taxonomy; bundled TOFU
mini-fixture under soup_cli/data/_fixtures/unlearning/
Part C — soup edit set (ROME/MEMIT/AlphaEdit) + EditPlan + per-method
default layer; --plan-only ships live, apply_edit kernel deferred
Part D — Sequential edit governor: norm-blowup detection (OK/WARN/BLOWUP),
auto-switch ROME→AlphaEdit at edit#10 or BLOWUP, refuses past cap
Part E — soup edit diff: cwd-contained probe loader, atomic JSONL out,
shape + table renderer (live before/after generation v0.61.1)
Net: +125 tests (9446 → 9571), +5 utility modules + 1 trainer wrapper +
2 commands. Review-fix coverage: 0 CRITICAL + 5 HIGH + 11 MEDIUM + 11 LOW.
All ruff + pytest green; Step 6 smokes (CLI plumbing + happy paths + 5
schema rejection paths) confirmed end-to-end.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 15:16:15 +05:00