Repository navigation
merge queue: checking #70 on main (4967100) - #85
Closed
mergify[bot] wants to merge 6 commits into
Closed
mergify[bot] wants to merge 6 commits into
mergify[bot] wants to merge 6 commits into
Conversation
…ecause a plain open() of a FIFO held two daily reports in wait_for_partner for most of a day Two `sweep --all --dry-run --report` runs that lane-start detached, from 2026-11-11T21:27Z and 2026-11-12T01:32Z, sat in `wait_for_partner` - the kernel holding an open() of a FIFO until its other end opens - with no child and no regular file open, so nothing timed them out. Every file the report opens itself was a plain open(): sweep.conf, a `.git` pointer, `commondir`, a git config, `alternates`, a lane's snapshot and inventory records, a sandbox's `.lock` and run marker, an archive's MANIFEST.sha256, the workspace's `.gitignore` and the `--post` target. On a scratch estate a FIFO at each one of them held the report there until `timeout` ended it. `open_regular` refuses what `stat` says is a FIFO, a socket or a device before any open, and opens the rest O_NONBLOCK and asks `fstat` again, so one swapped in between cannot hold it either. The refusal is an OSError, which each of those readers already takes as a read that failed and never as a file that is absent, and every path refused is a row of "Records the report could not read". A directory, or a path `stat` cannot answer, still goes to open() and fails exactly as before. A `--post` target that is a FIFO is the documented exit 1, with the report printed. Test: tests/test_lane_worktrees_report.py::test_a_fifo_where_the_report_reads_a_file_is_skipped_and_named_never_waited_on - passed by a direct `python3 -m pytest <node id>` (1 passed). Lane: openRepoTools-3 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s a NUL-byte path as unreadable, because past its FIFOs the real estate's first such `.git` made the whole report an INTERNAL ERROR, exit 2, with no report With the FIFOs skipped (af9bcd4), a read-only replay of the report's walk and pointer reads over the real estate went on to repository #37875 of 60,968, whose `.git` reads `gitdir: ../m<NUL>x`, and stopped there with "ValueError: embedded null byte" - the OS refuses a path holding a NUL with a ValueError, not an OSError, so no reader caught it, and `main` turns it into "INTERNAL ERROR, nothing was changed". The replay met 20 such records: `gitdir:` lines and `commondir` files, test fixtures left in the estate. Each place in the report's path where a path read out of a file meets the OS now takes that ValueError as a record it could not read, named by `_nul_record` in SKIPPED (a row of "Records the report could not read") and in `unread` where one is kept, so a leaning it may hide is unknown, never none: - `git_common_dir`: a `gitdir:` line naming such a path is no pointer, and unreadable; - `dependents_map`: such a path in `commondir`, in an alternates line or in a remote's URL leaves the repository's leaning unknown; - `archive_ledger`: a rescues.tsv row holding a NUL is not origin, branch, sha, so the archive is kept, as any malformed row keeps it; - `Report._record`: an inventory record whose path holds a NUL is a record not read, where `os.path.isdir`'s False read as a tree that is gone. And the workspace hygiene row: a `.gitignore` that is not a regular file is said to be one, and no `printf ... >> .gitignore` is offered, which onto a FIFO would hang whoever pasted it. The replay over the real estate, run again with this code, completed: 60,984 repositories, 6 FIFOs and 20 NUL-byte records skipped, no exception. Tests, run by node id with a direct `python3 -m pytest`: - tests/test_lane_worktrees_report.py::test_a_git_pointer_naming_a_nul_byte_path_is_unreadable_never_an_internal_error (new): passed. - tests/test_lane_worktrees_report.py::test_a_fifo_where_the_report_reads_a_file_is_skipped_and_named_never_waited_on (now also holds the `.gitignore` row): passed. Lane: openRepoTools-3 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…resh its base for the code queue Code main's tip is a15a6b5 (#74). The code queue's check needs the pull request's base to be main's tip and main to be an ancestor of its head (.github/ci/delivery_verify.py:296 and :299 at code 908d815, unchanged at a15a6b5). The merge is clean, and the pull request's own diff against main is unchanged: its patch-id is 956b970ef978932a6da4c0bde2008150de942894 before and after. Lane: openRepoTools-3 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nswer, manifest row, recorded dir or lane log holding a NUL byte, because one such workspace-root answer still ended it INTERNAL ERROR, exit 2 The review of #70 at 62fe17f found one BLOCKING finding, one SHOULD and one NIT. Each is fixed here. Line numbers are this commit's unless they say "at 62fe17f". BLOCKING (lane-worktrees:5632 at 62fe17f). `lanes-edit.sh workspace-root`'s answer went unchecked to `real()` and `git -C`. The OS refuses a path holding a NUL with a ValueError, not an OSError, so no reader caught it, and the report ended "INTERNAL ERROR", exit 2. On 62fe17f the first to raise is `register_lane_dirs`' `git -C`, before line 5632. `Helper.workspace_root` (lane-worktrees:707-724) now asks the helper once and checks the answer before any caller makes a path of it. An answer holding a NUL is dropped, the root is '' (the workspace not found, which every caller already reads), and `_nul_record` names it in "Records the report could not read". `_foreign`, `_closed_lanes`, `_workspace_hygiene`, `register_lane_dirs`, `MergeEvidence.landed` and `fetch_register` all read that one checked root. The rest of the report's path, searched for any other value from outside that can reach a path operation holding a NUL: - `project_legs` (2139-2144): a NUL in the helper's answer makes the manifest one not read. Before, `Leg`'s `real()` raised it to INTERNAL ERROR. - `archive_ledger` (5283-5286): a NUL in a MANIFEST.sha256 row keeps the archive, with a reason. Before, the row was printed with its raw NUL. - `Report._recorded_parents` (5466-5472): a lane's recorded `dir` holding a NUL is named. Before, it was dropped in silence. - `Report._closed_lanes` (5744-5752): a lane log git grep reads as binary is named. Before, its ENDED line was missed in silence. The `gitdir:`, `commondir`, alternates, remote-URL, rescues.tsv and inventory path cases were already handled at 62fe17f (f12e8d4). NIT (lane-worktrees:382). "skipped, never opened" is false for a FIFO swapped in after the stat, which is opened O_NONBLOCK for its `fstat` alone. The row now says "skipped, never read"; `open_regular`'s docstring (399-412) and the existing FIFO test's assertion (tests/test_lane_worktrees_report.py:805) match it. SHOULD (tests/test_lane_worktrees_report.py:751 at 62fe17f). New tests, from tests/test_lane_worktrees_report.py:850: - the race: a hook (REPORT_SEAM) on `open_regular`'s own `os.stat` call swaps a FIFO in after the stat. It is deterministic, with no timing loop; - a socket, a link to /dev/null, a link to a block device (skipped, named, where the host has none) and a FIFO held open with bytes in it, each at four files the report reads; the FIFO's bytes must survive unread; - `open_regular` against plain `open` for every read mode and path kind the report meets, and `--post`'s write; - the whole report over regular files against one where every `open_regular` is given back the plain `open()`; - a workspace root holding a NUL, asked once; - eight NUL-bearing record sources, one at a time. Verification, every run through tests/run.sh: - 62fe17f, -k 'lane_worktrees or repo_hygiene': 382 passed, 18 skipped, 5020 deselected - this commit, same selector: 397 passed, 19 skipped, 5020 deselected; the 16 new items are the +15 passed and the +1 skip (no block device on the host) - the new tests on 62fe17f's code: 10 failed, 6 passed, 1 skipped. The 10 are the socket, character-device and FIFO-with-data cases, the race, the workspace root, the project-legs, manifest-row, register-dir and register-binary-log cases, and the existing FIFO test on its new wording. The 6 that pass are the two parity tests and the four NUL cases 62fe17f already handled; the skip is the block device - ten mutants of this commit, each removing one guard, in three runs: all ten killed, none survived. Batch A: M1 (no O_NONBLOCK) by the race test, which timed out in the open(); M3 (no socket check) and M4 (no character-device check) by their own cases; M6 (no NUL catch on the alternates read) by the alternates case and by the existing git-pointer test, whose commondir NUL meets that read first; M7 (remote URL), M8 (inventory path) and M9 (rescues.tsv row) by their own cases. Batch B: M2 (no fstat check) by the race test, which found no row; M5 (descriptor left non-blocking) by the open_regular parity test. Batch C: C1 (every text read forced to surrogateescape) by both parity tests Lane: openRepoTools-3 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…resh its base for the code queue Code main's tip is c62ba9c, the merge of #69 at 2026-11-14T17:17:27Z. The code queue's check needs the pull request's base to be main's tip and main to be an ancestor of its head (.github/ci/delivery_verify.py:296 and :299, the same blob at code eff8459 and c62ba9c). The merge is clean: the 13 files main changed since a15a6b5 do not include lane-worktrees or tests/test_lane_worktrees_report.py, so the pull request's change is unchanged from 7d2b3ee. Lane: openRepoTools-3 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideImplementationMake report reads refuse special files and handle NUL-bearing paths as unreadable records instead of blocking or aborting the report.
TestsAdd regression coverage for special-file refusal, open races, regular-file parity, and NUL-bearing paths throughout report processing.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
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.



Note
This is a merge queue draft opened by Mergify. Nobody needs to act on it.
Mergify opened it for batch serious-baba-jy6r24 of the
openrepotools-codequeue, to test #70 before it merges intomain. Pushing to this branch or closing this pull request removes #70 from the queue.What this draft tests
Mergify checks that #70 still passes CI on top of
main. CI runs on this draft's code, built in this order:mainat4967100⏳ Where it stands: being checked
CI is running on this draft.
Waiting for
check-success=@github-actions/packagecheck-success=@github-actions/testscheck-success=@github-actions/tests-no-submodulemain: the four tests.yml jobs required (owner act 2)]check-neutral = @github-actions/openrepotools-deliverycheck-skipped = @github-actions/openrepotools-deliverycheck-success = @github-actions/openrepotools-deliveryFollow the
openrepotools-codequeue in the dashboardWhat happens next
mainand closes this draft.checks_timeout), Mergify removes #70 from the queue and closes this draft.Metadata for CI tooling, read by
mergify ciRequired conditions of queue rule
openrepotools-codefor mergecheck-success=@github-actions/packagecheck-success=@github-actions/testscheck-success=@github-actions/tests-no-submodulemain: the four tests.yml jobs required (owner act 2)]:check-neutral = @github-actions/openrepotools-deliverycheck-skipped = @github-actions/openrepotools-deliverycheck-success = @github-actions/openrepotools-deliverycheck-success=@github-actions/guard-launch-modegithub-code-owner-review-satisfied[🛡 GitHub repository ruleset ruleRequire Code Owner Review]github-review-approved[🛡 GitHub repository ruleset ruleRequire Code Owner Review]Required conditions to stay in the queue
#files>=1-closed-draft-files=src/openrepotools/_release.py-files~=^(?!(?:(?:claude-current|claude-restart-check|lane|lane-end|lane-handoff|lane-rename|lane-start|lane-worktrees|lanes|lanes-edit[.]sh|lanes-index|link-estates|openRepoTools|park|resume|status|repos[.]tsv|README[.]md)|(?:tests|src|commands|skills|features)/[A-Za-z0-9_.+/-]+)\Z)-from-forkbase=maincheck-success=@github-actions/guard-launch-modecheck-success=@github-actions/packagecheck-success=@github-actions/testscheck-success=@github-actions/tests-no-submodulegithub-code-owner-review-satisfied[🛡 GitHub repository ruleset ruleRequire Code Owner Review]github-review-approved[🛡 GitHub repository ruleset ruleRequire Code Owner Review]head~=^(?!release/|verify/|mergify/|ci/batch-pilot/)[A-Za-z0-9][A-Za-z0-9._/-]*\Zmain: the four tests.yml jobs required (owner act 2)]:check-success = @github-actions/openrepotools-deliverycheck-neutral = @github-actions/openrepotools-deliverycheck-skipped = @github-actions/openrepotools-delivery