Repository navigation
Conversation
A baseline copy holding `[]` was read as a pre-envelope copy with no run, so its run could be selected. It now exits 2 naming the copy. docs/runs.md also listed a generated questions set as having no subject, though `runs list` shows its product. Fixes intel#1332 Signed-off-by: vchamarthi <123653452+vchamarthi@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the baseline-copy validation and documentation updates.
No open issues 🎉
What changed in this PR
0 new findings; nothing to fix.
Fixes #1332 by making run-history garbage collection refuse non-object baseline copies and correcting the documented subject for generated question sets.
Changes:
- Makes
runs gc --keep-baselinesexit 2 for non-object copies before removing anything, while preserving support for legacy objects withoutrun_id. - Corrects the generated-question subject documentation and documents the new refusal.
- Adds regression tests and a changelog entry.
| File | Description |
|---|---|
dokimi/tests/test_runs_rm_gc.py |
Tests non-object baseline refusal and the documentation correction. |
dokimi/dokimi/runs/rm.py |
Raises InputError when a baseline copy is not a JSON object. |
dokimi/docs/runs.md |
Corrects question subjects and explains the baseline refusal. |
dokimi/changelog.d/20261127_120000_runs-gc-baseline-not-object.md |
Records the behavior and documentation fixes. |
Review effort: Balanced
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 4 selected item(s). CI at Review details
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1340 +/- ##
==========================================
- Coverage 96.19% 96.18% -0.01%
==========================================
Files 499 499
Lines 66465 66467 +2
Branches 11542 11543 +1
==========================================
- Hits 63933 63932 -1
Misses 1563 1563
- Partials 969 972 +3
🚀 New features to boost your workflow:
|
xaleryb
left a comment
There was a problem hiding this comment.
Approved on 01c93f8. A baseline copy whose JSON is not an object now stops gc with exit 2 and names the copy before anything is removed (main exited 0 and would remove the run), and the docs fix holds; #1184 rewrites the same --keep-baselines paragraph, so whichever lands second keeps the refusal sentence. Tests and gates are green. Windows smoke had not started (the hosted Windows queue was stuck); every other check passed.
Summary
Fixes #1332.
runs gc --keep-baselinesselected a run when its saved baseline copy held[], anddocs/runs.mdsaid a questions set fromquestions generateshows-as its subject althoughruns listshows itsproduct.Changes
baseline_runsraisesInputError(not a JSON object, so the run it holds is not known) when a copy parses to something other than an object; an object withoutrun_idstill holds no run.docs/runs.mddropsquestions generatefrom the no-subject list and states the new refusal.Risk
Only a copy that parses to a non-object changes: gc now exits 2 instead of treating it as holding no run.
Testing
python -m pytest -q tests/test_runs_rm_gc.py tests/test_growth_ratchet.pypasses (99 tests), andruff checkon the changed Python files is clean. New tests cover[],null, a string and a number, and read the docs page.Open questions
Only a non-object copy is refused. A copy that is an object with a malformed
run_idis still treated as holding no run; I left that as it was.run_idis missing or malformed: A copy saved before the envelope has norun_idand docs/runs.md says it holds no run; smallest change. Is that the behaviour you want?Revert
A plain revert restores the old behaviour; nothing is stored.
Checklist
pytestpassesruff,mypy, and schema checks passAGENTS.mdraise/exit and test names the doc, contract or issue it traces to.github/.licenserc.yaml)Related issues:
docs/runs.mdand the same subject column ofruns list; this change only corrects one more sentence there.Checklist evidence
pytestpasses: 1 test file(s) changed; suite: 31214 passed; 1 failing test(s) fail on the base branch too: tests/test_repo_compare_interval.py::test_the_row_p_places_zero_where_large_deltas_round_p_at_zero_apart; 2 of 2 proof(s) fail before the changeruff,mypy, and schema checks pass: passed: ci.yml:static / ruff check, ci.yml:typecheck / mypy, ci.yml:static / schema-check, ci.yml:static / schema_compat vs the PR basedokimi/docs/runs.mdAGENTS.md: nothing left open; mutation of changed lines ranraise/exit and test names the doc, contract or issue it traces to: every new error path and test names a doc, contract or issue.github/.licenserc.yaml): no new source fileFixes #1332.