From d2f907e7dae672c3c7bfc86399cddf43bf404795 Mon Sep 17 00:00:00 2001 From: thekevinbot <248217931+thekevinbot@users.noreply.github.com> Date: Mon, 2 Nov 2026 21:15:52 -0500 Subject: [PATCH 1/2] test: restore the ./ and ./docs one-level speed cases against the fastest native --- .../tests/e2e/glob_speed_one_level_test.py | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/packages/python/tests/e2e/glob_speed_one_level_test.py b/packages/python/tests/e2e/glob_speed_one_level_test.py index 40a5fb0ae..3770c1a68 100644 --- a/packages/python/tests/e2e/glob_speed_one_level_test.py +++ b/packages/python/tests/e2e/glob_speed_one_level_test.py @@ -1,4 +1,4 @@ -"""Glob speed: one-level listings, `'./*'`. +"""Glob speed: one-level listings, `'./*'`, `'./'` and `'./docs'`. A wide flat root and a wide flat `docs/`, each beside subdirectories full of files that a one-level listing must not read, plus dotfiles it must hide. @@ -15,6 +15,7 @@ import pytest from .speed_of_light import ( + FASTEST, Native, agreed_rows, assert_speed_of_light, @@ -44,6 +45,20 @@ '{bin} -c \'for f in *; do if [ -f "$f" ]; then printf "%s\\n" "$f"; fi; done\'', ), ] +DOCS_NATIVE = [ + Native( + "find", + ("find",), + "{bin} docs -mindepth 1 -maxdepth 1 -type f ! -name '.*'", + ), + fd("--max-depth 1 . docs"), + rg("--max-depth 1 docs"), + Native( + "bash-glob", + ("bash",), + '{bin} -c \'for f in docs/*; do if [ -f "$f" ]; then printf "%s\\n" "$f"; fi; done\'', + ), +] FILES_PER_SUBDIR = 1000 @@ -76,10 +91,14 @@ def tree(tmp_path_factory): shutil.rmtree(root, ignore_errors=True) @pytest.mark.parametrize( - ("glob", "specs"), - [("./*", ROOT_NATIVE)], + ("glob", "specs", "bar"), + [ + ("./*", ROOT_NATIVE, ""), + ("./", ROOT_NATIVE, FASTEST), + ("./docs", DOCS_NATIVE, FASTEST), + ], ) - def it_matches_native_files_within_the_bar(tree, glob, specs): + def it_matches_native_files_within_the_bar(tree, glob, specs, bar): root, n, startup = tree def dirsql(timeout): @@ -90,7 +109,7 @@ def dirsql(timeout): ) return sorted(row for (row,) in dirsql_rows(proc, ("path",))), seconds - result = paired(shell_natives(root, specs), dirsql, startup) + result = paired(shell_natives(root, specs, bar=bar), dirsql, startup) expected, actual = agreed_rows(result), result.dirsql_rows assert len(expected) == n - len(range(0, n, 50)) From f9960a2ad27a800af9e6537a4dbad94969e06b06 Mon Sep 17 00:00:00 2001 From: thekevinbot <248217931+thekevinbot@users.noreply.github.com> Date: Mon, 2 Nov 2026 21:37:29 -0500 Subject: [PATCH 2/2] e2e attestation for bot/1471-one-level-restore-1102 --- .../e2e-attestations/bot-1471-one-level-restore-1102.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 packages/python/e2e-attestations/bot-1471-one-level-restore-1102.json diff --git a/packages/python/e2e-attestations/bot-1471-one-level-restore-1102.json b/packages/python/e2e-attestations/bot-1471-one-level-restore-1102.json new file mode 100644 index 000000000..18b777118 --- /dev/null +++ b/packages/python/e2e-attestations/bot-1471-one-level-restore-1102.json @@ -0,0 +1,7 @@ +{ + "command": "uv run python -m pytest tests/e2e/glob_speed_one_level_test.py -x -q -s", + "ran_at": 1793673449, + "exit_code": 0, + "commit": "d2f907e7dae672c3c7bfc86399cddf43bf404795", + "branch": "bot/1471-one-level-restore-1102" +}