fix(tools/fossil): address the requested changes in review feedback of Fossil SCM integration#784
Conversation
potiuk
left a comment
There was a problem hiding this comment.
Approving — this cleanly addresses the four review-feedback items on the Fossil integration:
- SQLite connection-leak fix via
contextlib.closing(...)infind_repo_db/query_db— connections now close on the exception path too (parameterized queries preserved). - Tighter exception handling in
ticket.py:except Exception→except FossilError, warning to stderr instead of a silentpass. --options-terminator hardening (with-Rmoved before--) — the right defensive pattern for theticket add/setarg vectors.- Good added test coverage for the vcs status/log parser (EDITED/ADDED/DELETED→M/A/D, extras→
?, theVCSError→empty-status path, timeline + grep, bracket-in-comment case).
No credential/URL/injection surface introduced — list-form subprocess.run (no shell), clean_env(), parameterized SQL, DB-sourced artifact UUIDs. SPDX headers present.
One non-blocking follow-up worth a quick manual check: the -- hardening assumes Fossil's own arg parser honors -- in ticket add/set; the tests are mocked, so that isn't exercised against a real fossil binary. Thanks @onlyarnav.
This review was drafted by an AI-assisted tool and confirmed by a Magpie maintainer. The maintainer approving this PR has read the findings and signed off.
More on how Magpie handles maintainer review: CONTRIBUTING.md.
|
I pushed a small follow-up (rebased on latest |
Summary
Addresses follow-up review feedback on the merged Fossil SCM integration (#736):
tools/vcs/tests/test_vcs.pyto coverFossilBackend.statusandFossilBackend.logtimeline output parsing.--separator before field name/value inputs in ticket commands to prevent options confusion.contextlib.closingto ensure handles are closed on exceptions.except Exception: passcatches with warning prints to stderr.