Skip to content

Add GitHub Actions CI (lint, egress-isolation, tests + coverage)#3

Merged
grammy-jiang merged 2 commits into
masterfrom
claude/pre-commit-hooks-setup-2sc78y
Jul 19, 2026
Merged

Add GitHub Actions CI (lint, egress-isolation, tests + coverage)#3
grammy-jiang merged 2 commits into
masterfrom
claude/pre-commit-hooks-setup-2sc78y

Conversation

@grammy-jiang

Copy link
Copy Markdown
Owner

What

Adds continuous integration (builds on the pre-commit + Mermaid setup from #2, already on master).

.github/workflows/ci.yml runs on push to master and every pull request:

Job Runs Notes
lint pre-commit run --all-files ruff, markdownlint, the Mermaid validator, hygiene — with cached hook envs
egress-isolation scripts/check_egress_isolation.py Phase-4 control #1: fails if a data server (calibration-tracker / evidence-ledger / ach-engine + shared common/staleness) gains a direct network import. osint-toolkit (the sole egress surface) is exempt.
test pytest on Python 3.11 / 3.12 / 3.13 (+ 3.14 preview) under coverage latest deps (fastmcp 3.x); 3.14 is continue-on-error until its dependency wheels are confirmed

Coverage

pytest-cov with a fail_under = 80 floor (config in pyproject.toml, omitting the thin __main__.py shims); current line coverage is ~85%. CI prints the per-file term-missing report.

Hardening

Least-privilege permissions: contents: read and per-ref concurrency cancellation. Adds a CI badge and a CI note to the README.

Verified locally

  • lint (14 hooks), egress-isolation, and pytest + coverage (152 passed, 85.25%) all green.
  • The egress check passes on current code, catches a planted import socket in a data server, and correctly exempts osint-toolkit.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Fd4FtxJFV2fVSSoD7urqqn


Generated by Claude Code

claude added 2 commits July 19, 2026 20:00
.github/workflows/ci.yml runs on push to master and every pull request:
- lint: `pre-commit run --all-files` (ruff, markdownlint, the Mermaid
  validator, and hygiene hooks) with a cached hook environment.
- egress-isolation: a new static gate (scripts/check_egress_isolation.py)
  that fails the build if a data server — calibration-tracker,
  evidence-ledger, ach-engine, or the shared common/staleness helpers —
  gains a direct network import. Realizes Phase-4 control #1 (osint-toolkit
  is the sole egress surface); osint-toolkit is exempt.
- test: pytest on Python 3.11, 3.12, and 3.13, installing the latest deps.

Least-privilege permissions (contents: read) and per-ref concurrency
cancellation. Adds a CI badge and a CI note to the README.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fd4FtxJFV2fVSSoD7urqqn
- The test matrix gains Python 3.14 as an experimental, continue-on-error
  entry (setup-python allow-prereleases). It is exercised on real runners but
  does not gate the build until its dependency wheels are confirmed — promote
  it to required by dropping `experimental`.
- pytest now runs under coverage (pytest-cov). A fail_under=80 floor guards
  against regression (current line coverage ~85%); CI prints the per-file
  term-missing report. Config lives in pyproject [tool.coverage.*], omitting
  the thin __main__.py entry-point shims.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fd4FtxJFV2fVSSoD7urqqn
@grammy-jiang
grammy-jiang merged commit 0b77b6f into master Jul 19, 2026
6 checks passed
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.

2 participants