Skip to content

feat: add auditable batch content scanning - #12

Merged
ChrysFu merged 1 commit into
mainfrom
codex/landscape-driven-upgrade
Aug 24, 2026
Merged

ChrysFu merged 1 commit into
mainfrom
codex/landscape-driven-upgrade

Conversation

@ChrysFu

@ChrysFu ChrysFu commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Change summary

Upgrade the content gate from a single-draft preflight into an auditable batch workflow while preserving the existing API and CLI contract.

  • scan Markdown and text files recursively with deterministic ordering
  • add stable rule IDs, error/warning/note severity, and strict policy validation
  • emit canonical JSON or SARIF 2.1.0 with document hashes, policy hash, audit context, and deterministic scan ID
  • fail closed on empty batches, invalid UTF-8, invalid regex/policy data, and output failures
  • preserve preflight(), existing CLI flags and JSON fields, release_approved=false, and exit codes 0/1/2
  • extend quality checks to Python 3.11-3.14, Ruff, README anchors, JSON, and pinned/checksummed actionlint
  • document a primary-source comparison of recently active peer projects and synchronize the bilingual README

Evidence and design

The implementation draws lightweight practices from Vale, textlint, reviewdog, Ruff, Conftest, Argo Workflows, and Prefect. The fixed-commit and official-document evidence, tradeoffs, and follow-up roadmap are in docs/github-landscape.md.

Validation

  • ruff check src tests
  • python3 -m compileall -q src tests
  • python3 -m unittest discover -s tests -v (23 tests)
  • python3 src/content_guard.py --self-test
  • legacy draft and batch SARIF examples with --fail-on-issues
  • python3 src/repository_checks.py .
  • README Architect validation
  • JSON and YAML parsing
  • Python 3.11, 3.13, and 3.14 locally; Python 3.12 delegated to CI
  • GitHub Actions matrix and actionlint

Compatibility and safety

The runtime remains Python standard-library only. Warnings and notes do not block human review; errors do. Automation never approves publication. Rollback is a single squash revert, and no data migration is involved.

@ChrysFu
ChrysFu merged commit 232083c into main Aug 24, 2026
5 checks passed
@ChrysFu
ChrysFu deleted the codex/landscape-driven-upgrade branch August 24, 2026 12: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