Repository navigation
Reject negative lookback and receipt retention counts - #100
laaielichter merged 1 commit into
Conversation
laaielichter
left a comment
There was a problem hiding this comment.
Thanks @yinbowen-dc. On its merits this is correct and complete for the "Done when" list of #98: negative --lookback and --keep-last return status: error with a next_step and exit 1, 0 stays valid, and the prune test snapshots the whole state folder to prove nothing is deleted on a refused value (in dry-run and real runs, with and without --json). I merged it onto current main in a scratch checkout: ruff check . is clean and pytest -q gives 858 passed, 10 skipped. The change is small and the README lines are a nice touch.
This approval is about the code only. CI is waiting for the maintainer's approval because it is your first contribution, and if main moves before it lands, a quick git merge upstream/main is all that is needed (the CHANGELOG line is where a small conflict is likely).
Generated by Claude Code
|
Hi @yinbowen-dc, a quick heads-up, and thank you for your patience. The maintainer approved and merged your #99 this morning (thanks for that one too), and it added a line at the top of Could you merge the latest One thing to expect: #101 also adds a line near the top of Generated by Claude Code |
|
Good news: you no longer need to resolve the CHANGELOG conflict. We changed the rule so contributors don't edit CHANGELOG.md any more; we add your entry with credit when we merge. Easiest fix: drop your CHANGELOG.md change (or merge main and take main's version of the file) and push; the rest of the PR is unchanged. Generated by Claude Code |
laaielichter
left a comment
There was a problem hiding this comment.
Thanks @yinbowen-dc. This PR refuses negative --lookback and --keep-last, which #102 also does (it closes #98 and was opened first), so the maintainer will take #102 for that part. The branch also conflicts with main in CHANGELOG.md and README.md. If you want to keep working on this, please rebase on main and tell us which part is not covered by #102. Otherwise we can close it.
Generated by Claude Code
Land #100: Reject negative lookback and receipt retention counts
|
Thank you @yinbowen-dc for the fix and for the careful tests, especially the byte-for-byte check that a rejected Your three PRs (#99, #100 and #101) are now all in. If you want a next one, #159 (translate the README quick start into your language) is free and labelled Generated by Claude Code |
Reject negative incremental lookbacks and prune retention counts with an error and next step. Validate before SQL advice or store pruning; zero remains valid. Tests cover Python and CLI entry points, JSON/text output, dry runs and byte-for-byte preservation of receipt/audit files on rejected pruning.
Validation:
pytest -q(858 passed, 10 skipped in 39.05s),ruff check .,git diff --check. Added regression tests fail against the original implementation and pass with this change. PostgreSQL-specific tests were not run; no external warehouse was contacted.Closes #98