Skip to content
Draft
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
30 changes: 30 additions & 0 deletions .github/workflows/profile-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Profile checks

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

permissions:
contents: read

jobs:
parity:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: python -m pip install pytest
- name: Check profile parity and privacy boundaries
env:
DOC_BRICKS_PRIVATE_REPOS: ${{ secrets.DOC_BRICKS_PRIVATE_REPOS }}
run: python -m pytest -q
13 changes: 13 additions & 0 deletions tests/test_private_guard.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"""Check that a privacy failure does not echo the configured private name."""
import pytest

import test_profile_parity as profile


def test_private_name_is_absent_from_failure(monkeypatch):
name = "synthetic-private-sentinel-62941"
monkeypatch.setenv(profile.PRIVATE_REPOS_ENV, name)
monkeypatch.setattr(profile, "get_file_content", lambda _path: name)
with pytest.raises(AssertionError) as caught:
profile.test_private_repo_leak_guard()
assert name not in str(caught.value)
3 changes: 2 additions & 1 deletion tests/test_profile_parity.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ def test_private_repo_leak_guard():
for rel_path in target_files:
content = get_file_content(rel_path)
for private_repo in private_repos:
assert private_repo not in content, "Private repository name found in public docs"
if private_repo in content:
raise AssertionError("Private repository name found in public docs")

def test_check_timestamp_parity():
"""Verify verification date 2026-10-13 across profile files."""
Expand Down
Loading