Skip to content

fix(ci): remove two platform/environment couplings from the pipeline tests - #4

Merged
danielfmonzon merged 1 commit into
mainfrom
fix/ci-platform-coupling
Aug 15, 2026
Merged

fix(ci): remove two platform/environment couplings from the pipeline tests#4
danielfmonzon merged 1 commit into
mainfrom
fix/ci-platform-coupling

Conversation

@danielfmonzon

Copy link
Copy Markdown
Owner

CI went red on main (PR #2's merge commit) and on prop/2 with the same four failures. Not a git-identity problem — see below.

Cause 1 — a real gate hole, not a test artifact

firewall._normalise did not treat a backslash as a separator. On POSIX, Path(r"config\risk.yaml") is a single filename containing a backslash, so it never matched the config/risk.yaml entry and the firewall ALLOWED a frozen path. The same assertion passed on Windows, where Path splits on backslash. A gate whose verdict depends on which OS evaluates it is not a gate.

Fixed by normalising the separator in the string before Path sees it, plus a parametrised test that pins _normalise directly rather than inferring it from a verdict, and a mixed-separator case.

Cause 2 — a test reading the developer's data

test_allowed_evidence_paths_are_accepted asserted .exists() on reports/*, which is gitignored (.gitignore:6), so a fresh CI clone has none of it. It now asserts what assert_allowed actually promises — the path is inside the permitted read set and resolves under the repo root. Whether the artifact has been produced is the caller's problem, and render_inventory already reports absent sources as ABSENT.

Refuting the git-identity hypothesis

No identity error appears anywhere in the logs; the repo fixture already sets repo-local user.email/user.name (no --global); and every test that makes real git commits passed in CI.

672 pass locally; ruff and mypy clean. CI is the real verdict here — the POSIX fix cannot be proven on a Windows dev machine.

…tests

CI on ubuntu-latest went red on four tests that pass on the Windows dev
machine. Neither was a git-identity problem; the repo fixture already sets a
repo-local user.name/user.email and every test that makes real commits passed.

1. firewall._normalise did not treat a backslash as a separator. This is a REAL
   GATE HOLE, not a test artifact: on POSIX, Path(r"config\risk.yaml") is one
   filename containing a backslash, so it never matched the config/risk.yaml
   entry and the firewall ALLOWED a frozen path. A gate whose verdict depends on
   the OS evaluating it is not a gate. The separator is now normalised in the
   string before Path sees it, and _normalise is pinned directly by a
   parametrised test rather than inferred from a verdict.

2. test_allowed_evidence_paths_are_accepted asserted .exists() on reports/*,
   which is gitignored, so a fresh CI clone has none of it. The test was reading
   the developer local data rather than the code behaviour. It now asserts what
   assert_allowed actually promises: the path lies in the permitted read set and
   resolves under the repo root. Whether the artifact has been generated is the
   caller problem, and render_inventory already reports absent sources as ABSENT.

672 pass locally; ruff and mypy clean.
@danielfmonzon
danielfmonzon merged commit b39a8b4 into main Aug 15, 2026
1 check passed
@danielfmonzon
danielfmonzon deleted the fix/ci-platform-coupling branch August 15, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant