From 3bf00636e8f54a56d5edc703bfedaf30437c502b Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Wed, 25 Nov 2026 16:22:37 +0000 Subject: [PATCH] refactor(test-e2e-playwright): keep the spec secrets container check at 500 lines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Main 42b887e7f2 fails test_python_file_size: spec_secrets_container.py holds 501 lines since the --ulimit=core=0 option of #2925, so the Test job of every PR is red. The mount check at the end of check_container wrapped its chained comparison over three lines; binding set(mounts) once lets it fit on one, with the same semantics, so the file is back at 500 lines without moving code. Same change as IAM's b08c6594fd. (cherry picked from commit b08c6594fd) 🎯 Fix: 98 % 💥 Break: 1 % 💸 Tokens: – ⏱️ Velocity: – 🛡️ Security: 100 % 🏆 Score: 97 🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 % Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 --- roles/test-e2e-playwright/files/spec_secrets_container.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/roles/test-e2e-playwright/files/spec_secrets_container.py b/roles/test-e2e-playwright/files/spec_secrets_container.py index 2e5adce400..9bef582bcd 100644 --- a/roles/test-e2e-playwright/files/spec_secrets_container.py +++ b/roles/test-e2e-playwright/files/spec_secrets_container.py @@ -495,7 +495,6 @@ def check_container(container: list[str], run: Path) -> None: f"{shared / 'personas'}:/e2e/tests/personas:ro", } mounts = check_ca(container, found, stage) - if len(set(mounts)) != len(mounts) or not required <= set(mounts) <= ( - required | optional - ): + unique = set(mounts) + if len(unique) != len(mounts) or not required <= unique <= required | optional: raise SpecSecretsError("a run with spec secrets takes no other mounts")