Repository navigation
Save-compat: count files, not directories, in baseline-write and fixture - #26
Merged
Merged
Conversation
baseline-write and fixture tested bool(digests(...)), and digests() also records directories, so a write leaving only an empty slot directory, or a fixture archive of directories alone, passed with "0 file(s)". Both now require at least one file. Part of #21 (the consumers half needs an owner decision). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (head c332c81):
Merge hold: This comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
baseline-writeandfixtureingates/save_compat.pynow require at least one file. Previously both testedbool(digests(...)), anddigests()records directories as"dir", so a baseline write that left only an emptyslot_1/, or a fixture archive holding only directories, passed with0 file(s)in the detail. This is the second, smaller case of Gates can pass having checked nothing: every consumer skipped, or saves with no files #21.file_count()helper replaces the two inlinelen([v for v ... if v != "dir"])counts, so the number reported in the detail and the number the check tests are the same value.tests/test_save_compat_files.pycoversfile_count()overdigests()output (empty slot directory, nothing written, mixed files and directories, an empty file).Part of #21. The consumers half of #21 (every consumer skipped) is untouched: it needs the owner's choice between a new input and an unconditional
controlfailure, so the issue stays open.Verification
python3 -m unittest tests.test_save_compat_files tests.test_save_compat_migrations tests.test_save_compat_view: 24 tests, OK (Python 3.8, the interpreter this dispatch can run). CI runs the full suite on 3.12.file_count()changed tolen(d)(the old entry-counting behaviour), 2 of the 4 new tests failed; with the file restored, all 4 passed.python3.12and env-prefixed gate commands require an approval this headless dispatch cannot receive, so no realsave_compat.pyrun against tak was made and no PASS/FAIL assertion lines can be quoted. The unit tests exercisefile_count()but not the tworesult.check(...)call sites themselves.Test plan
py_compileof the changed files; unit tests pass locallyCheck/compile) green on the PR headREPOSITORY=Stephenson-Software/tak SHA=<tak main sha> BASELINE_REF=v0.2.0 SCENARIO=scenarios/tak_slots.py DISTRIBUTION=tak WORK=/tmp/prg-work python3.12 gates/save_compat.py, withbaseline-writereadingPASS ... N file(s) writtenfor N > 0Merge hold
This changes what an existing assertion (
baseline-write,fixture) accepts, which is on the dev loop's do-not-auto-merge list, and the gate-run anchor could not run. The PR is therefore left open for owner review rather than merged. It is stricter only: no run that previously failed can now pass.Skipped issues
installed_commitreading stderr): the fix is ingates/common.py, which is do-not-auto-merge, and also needs a gate run this dispatch cannot make.workflow_callcheckout): needs an owner decision on whetherworkflow_callis supported, and a call from a second repository to verify.This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
🤖 Generated with Claude Code
drafted by Claude on behalf of Daniel Stephenson