-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Infrastructure
-
None
-
Python Drivers
-
None
-
None
-
None
-
None
-
None
-
None
Context
The synchro pre-commit hook regenerates the synchronous driver and test
files in place, and the synchro-stage-files hook stages what it wrote. When
a run fails partway, or a later hook fails, dozens of modified generated files
are left in the working tree. CONTRIBUTING.md
documents this failure mode and a manual cleanup workaround. Developers must
then tell their own changes apart from generated noise and can accidentally
commit unrelated reformatting.
Definition of done
- Generated files are copied into the working tree only when their content
changes. - A failed synchro run leaves the working tree unchanged.
- A run with nothing to regenerate writes no files and stages nothing.
- Ruff failures on generated output fail the hook with a clear message.
- Unit tests cover the copy-on-change behavior, and CONTRIBUTING.md drops the
cleanup workaround.
Pitfalls
- Mirror a test file only when its sync counterpart already exists in test/.
- Keep the .synchro-modified manifest contract with
synchro-stage-files; an empty manifest must stay valid. - A ruff version bump can legitimately reformat every generated file; that
drift must still be reported.