Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci-guards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ jobs:
fi
python3 scripts/ci/validate_test_execution_registry.py "${args[@]}"

- name: Validate Python test execution registry blast radius
if: ${{ matrix.group == 'preflight' }}
run: python3 tests/test_ci_test_execution_registry.py

- name: Validate dev-fleet warm-slot lifecycle
if: ${{ matrix.group == 'preflight' }}
run: |
Expand Down
12 changes: 11 additions & 1 deletion scripts/ci/test_execution_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,21 @@


def load_registry(path: Path) -> list[dict[str, object]]:
return parse_registry(path.read_text(encoding="utf-8"), str(path))


def parse_registry(text: str, label: str) -> list[dict[str, object]]:
"""Parse registry text. `label` names the source in error messages.

The validator reads the base branch's registry through `git show`, which
has no path on disk, so parsing is separate from reading.
"""
version: object = None
tests: list[dict[str, object]] = []
current: Optional[dict[str, object]] = None
path = label

for line_number, raw_line in enumerate(path.read_text(encoding="utf-8").splitlines(), start=1):
for line_number, raw_line in enumerate(text.splitlines(), start=1):
line = raw_line.strip()
if not line or line.startswith("#"):
continue
Expand Down
Loading
Loading