Repository navigation
Conversation
_read_bounded_regular_file and _read_gitignore_descriptor each had a loop that reads at most one byte past the limit, in two shapes. Both now call _read_at_most, which issues the same os.read sizes. The .gitignore reader raises its size error after the read instead of inside the loop, still before the identity checks.
The graph-failure and runtime-failure exits spelled out the references, audit and lean targets checks that _blocked_result already appends for the blueprint-failure exit. Both now call it with the same reasons.
18 tests re-imported autoform_cli.scaffold as scaffold_module, which the module already imports at the top.
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.
Follow-up to #96. No behaviour change: 3 files, +23/-66, one commit per item.
_read_at_most(scaffold.py)._read_bounded_regular_fileand_read_gitignore_descriptoreach had their own chunked loop that read in 64 KiB pieces until end of file or one byte past the limit. The two now share one loop. The.gitignorereader used to raise inside its loop once the total passed_MAX_GITIGNORE_BYTES. It now checks the length after the read, which covers the same bytes and raises the same error.doctor.py). The graph-validation exit and the runtime-projection exit each appended thereferences,auditandlean targetschecks by hand. The blueprint-resolution exit already used_blocked_result, which fills the remaining checks in_CHECK_NAMESorder with the same names and text. All three exits now use it.tests/test_scaffold.py). 18 tests importedautoform_cli.scaffold as scaffold_moduleinside the function, although the module already imports it at line 21.Noticed, not changed:
_blocked_lean_checknow has only one caller,_blocked_result.referencesandauditdetails on the two exits that moved. Their output is unchanged, because_blocked_resultbuilds the same checks._read_bounded_regular_filefires only if the file grows between thestatand the read. No test reaches it, on this branch or on main.Overlaps with open PRs:
tests/test_scaffold.py, and Deploy Pages only after autoform verify passes, and refuse a lean: name defined twice #140 and Bind statement: formalized to a recorded statement_hash #141 editdoctor.py.open-statements-revision, which conflicts with main.scaffold.pyandtests/test_scaffold.py.Validation at exact head
39ce5f88:ruff check autoform_cli servers testsis clean.tests/test_scaffold.py(105),tests/test_doctor.py(14),tests/test_cli.py(5) andtests/test_project_create.py(257) pass.