tests(system_e2e): tree fingerprints ignore server-written bytecode (__pycache__) — S19 flake under load

This commit is contained in:
Ouroboros 2026-09-01 21:21:48 +00:00 • committed by Anton Razzhigaev
parent 95762eed59
commit 4c32691ed2
2 changed files with 16 additions and 0 deletions

View file

@ -694,6 +694,14 @@ def _tree_fingerprint():
rel = path.relative_to(clone)
if rel.parts and rel.parts[0] == ".git":
continue
# __pycache__ is machine-generated bytecode the SERVER SUBPROCESS writes
# while importing this clone (the isolated server sets no
# PYTHONPYCACHEPREFIX). It is never repo content, so a .pyc appearing
# between the baseline and the assertion is not evidence that the
# refused update touched the worktree — but it DID flip this digest
# under load, when a late first-import landed after the snapshot.
if "__pycache__" in rel.parts or path.suffix in {".pyc", ".pyo"}:
continue
if path.is_symlink():
digest.update(b"L" + bytes(rel) + os.readlink(path).encode())
elif path.is_file():

View file

@ -201,6 +201,14 @@ def _tree_fingerprint(clone: pathlib.Path) -> str:
rel = path.relative_to(clone)
if rel.parts and rel.parts[0] == ".git":
continue
# __pycache__ is machine-generated bytecode the SERVER SUBPROCESS writes
# while importing this clone (the isolated server sets no
# PYTHONPYCACHEPREFIX). It is never repo content, so a .pyc appearing
# between the baseline and the assertion is not evidence that the
# refused update touched the worktree — but it DID flip this digest
# under load, when a late first-import landed after the snapshot.
if "__pycache__" in rel.parts or path.suffix in {".pyc", ".pyo"}:
continue
if path.is_symlink():
digest.update(b"L" + bytes(rel) + os.readlink(path).encode())
elif path.is_file():