Skip to content

Tests: pin the failure classes of the four load-bearing CI guards - #59

Merged
rivassec merged 1 commit into
mainfrom
guard-script-tests
Sep 11, 2026
Merged

rivassec merged 1 commit into
mainfrom
guard-script-tests

Conversation

@rivassec

Copy link
Copy Markdown
Owner

The CI guards are the merge gate for every content PR, and a guard that silently breaks fails open - a green check that verified nothing. Until now only check_paradigm_shift had tests, and no workflow ran even those.

What

  • tests/test_guard_scripts.py - 16 new tests over fixture site trees, one class per guard:
    • check_descriptions: 161 chars fails, exactly 160 passes, Description: overrides a long Summary:
    • check_link_graph: orphan post, hub-unreachable island (inbound links but no hub path), outbound-cap violation, clean graph passes
    • check_wellknown_llms: clean fixture passes; missing markdown mirror, /drafts/ URL leak, post absent from index, expired security.txt all fail
    • check_canonical_noindex: self-canonical noindex passes, cross-canonical fails, redirect stubs allowed, noindex page in sitemap fails
  • .github/workflows/tests.yml - runs unittest discover on push/PR. Stdlib only, no new dependencies; also puts the pre-existing paradigm-shift tests under CI for the first time.

Verified locally

Ran 27 tests ... OK (16 new + 11 existing), with each guard's ::error output visibly firing in the failure-case tests.

Follows the repo's existing test conventions (unittest + importlib script loading, per tests/test_check_paradigm_shift.py).

A guard that silently breaks fails OPEN - a green check that verified
nothing. Fixture site trees now assert each guard still catches what it
exists for, and stays quiet on a clean tree:

- check_descriptions: >160 fails, ==160 passes, Description overrides
- check_link_graph: orphan, hub-unreachable island, outbound cap
- check_wellknown_llms: clean pass, missing mirror, /drafts/ leak,
  post missing from index, expired security.txt
- check_canonical_noindex: self-canonical pass, cross-canonical fail,
  redirect-stub allowance, noindex-in-sitemap leak

New tests.yml workflow runs the whole suite (27 tests, stdlib unittest
only, no new deps) on push/PR - the existing paradigm-shift tests were
previously not run by any workflow.
@rivassec
rivassec merged commit 07970ea into main Sep 11, 2026
17 checks passed
@rivassec
rivassec deleted the guard-script-tests branch September 11, 2026 23:25
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