SourceHarbor uses layered verification.
Think of it like product evidence in layers:
Think of this like airport checkpoints:
pre-commit is the quick bag scanpre-push is the fuller gate before you boardhosted is the airline’s own security lane on GitHubnightly is the background sweep that keeps stale risk from piling upmanual is the specialist inspection for release, provider, browser, and public-proof truthDo not force every heavy check into the default local path. Each layer answers a different question.
| Layer | Default trigger | Primary entrypoints | What it proves |
|---|---|---|---|
pre-commit |
local edit / commit prep | fast local checks below + web lint | the fastest contributor-side contract stays honest before deeper proof |
pre-push |
contributor-side push gate | .githooks/pre-push |
the default local parity hook stays deterministic and does not silently expand into a full closeout audit |
hosted |
GitHub pull_request / push |
ci.yml, pre-commit.yml, dependency-review.yml, codeql.yml on PR/push, trivy.yml, trufflehog.yml, zizmor.yml |
the branch-protected remote contract for pull requests and main |
nightly |
hosted schedule |
codeql.yml on schedule |
thin background security refresh; keep this lane small and do not create a separate weekly governance bucket |
manual |
human-triggered or operator-triggered | ./bin/repo-side-strict-ci --mode pre-push, ./bin/quality-gate --mode pre-push, ./bin/governance-audit --mode audit, ./bin/smoke-full-stack --offline-fallback 0, repo-owned real-profile browser proof, build-public-api-image.yml, build-ci-standard-image.yml, release-evidence-attest.yml |
provider/browser/release/publication truth plus closeout-grade repo/public audits |
python3 scripts/governance/check_env_contract.py --strict
python3 scripts/governance/check_host_safety_contract.py
python3 scripts/governance/check_host_specific_path_references.py
python3 scripts/governance/check_test_assertions.py
python3 scripts/governance/check_route_contract_alignment.py
python3 scripts/governance/check_public_entrypoint_references.py
python3 scripts/governance/check_public_personal_email_references.py
python3 scripts/governance/check_public_sensitive_surface.py
python3 scripts/governance/check_local_private_ledger_migration.py
python3 scripts/governance/check_external_lane_contract.py
eval "$(bash scripts/ci/prepare_web_runtime.sh --shell-exports)"
( cd "$WEB_RUNTIME_WEB_DIR" && npm run lint )
python3 scripts/runtime/maintain_external_cache.py --json
./bin/doctor
What it tells you:
What they cover:
bash scripts/ci/python_tests.sh
What it covers:
./bin/bootstrap-full-stack
./bin/full-stack up
source .runtime-cache/run/full-stack/resolved.env
./bin/full-stack status
curl -sS "${SOURCE_HARBOR_API_BASE_URL}/healthz"
curl -I "http://127.0.0.1:${WEB_PORT}/ops"
What it proves:
Important local-truth notes:
9000/3000; bootstrap/full-stack may move to other free ports and record them in .runtime-cache/run/full-stack/resolved.envCORE_POSTGRES_PORT=15432127.0.0.1:5432, that is a different data plane from the core-services container path.runtime-cache/tmp/web-runtime/workspace/apps/web/.env.local so browser-triggered writes keep the same local API base URL and write-session fallback as the supervisor pathCI=false or similar non-truthy env strings must not suppress the maintainer-local sourceharbor-local-dev-token fallback during repo-managed full-stack startup./bin/full-stack up can now self-heal Temporal reachability by trying the
repo-owned core_services.sh up path before failing worker startupmode=full YouTube receipt now depends on:
gemini-3-flash-preview as the fast-model defaultACTIVE./bin/smoke-full-stack --offline-fallback 0
What it proves:
Important boundary:
GitHub-hosted CI stays login-free.
If a browser flow genuinely depends on a real signed-in Chrome session, treat it as a local-only proof lane instead of a hosted CI lane.
SourceHarbor now uses a dedicated isolated Chrome root:
SOURCE_HARBOR_CHROME_USER_DATA_DIRSOURCE_HARBOR_CHROME_PROFILE_DIRlaunch_persistent_contextBootstrap and start it with:
./bin/bootstrap-repo-chrome --json
./bin/start-repo-chrome --json
python3 scripts/runtime/resolve_chrome_profile.py --mode repo-runtime --json
bash scripts/ci/external_playwright_smoke.sh --browser chromium --real-profile --url https://example.com
Hosted workflows must not reference SOURCE_HARBOR_CHROME_* or try to reuse a
local persistent browser profile.
Install hooks with:
./bin/install-git-hooks
Pre-commit and pre-push should block:
These checks now sit on the remote branch-protected pull-request path together
with python-tests, web-lint, and pre-commit. They still answer a
different question from the small local proof path above: they widen
GitHub-side supply-chain, workflow-safety, and secret-scanning coverage rather
than replacing the repo-managed local supervisor proof.
dependency-review.yml inspects pull-request dependency changescodeql.yml runs code scanning on the tracked languageszizmor.yml lint-checks GitHub Actions workflow safetytrivy.yml scans the repository filesystem and dependency manifests for high-severity issuestrufflehog.yml scans pushed and pull-request Git history deltas for verified or unknown secretsThose branch-protected checks are current remote required checks today, so this page should not describe them as optional or merely advisory.
These still stay outside the default pull-request gate:
build-public-api-image.yml, build-ci-standard-image.yml, and release-evidence-attest.yml stay in the external-proof lane, not the default pull-request gateworkflow_dispatch only and run behind protected environments so ordinary pull requests never touch their secrets or publication pathsubuntu-latest; local repo-side-strict-ci
remains a repo-side proof command, not a self-hosted CI runnerThink of them like specialist inspectors after the core exam:
These commands are the closer’s toolkit, not the default newcomer path.
Use them when you need remote/public truth, current-proof receipts, or release and provider evidence that go beyond the ordinary local and PR-facing lanes.
./bin/repo-side-strict-ci --mode pre-push
./bin/quality-gate --mode pre-push
./bin/governance-audit --mode audit
python3 scripts/governance/probe_remote_platform_truth.py
python3 scripts/governance/check_remote_required_checks.py
python3 scripts/governance/check_remote_security_alerts.py
python3 scripts/governance/probe_external_lane_workflows.py
python3 scripts/governance/check_current_proof_commit_alignment.py
python3 scripts/governance/render_newcomer_result_proof.py && python3 scripts/governance/check_newcomer_result_proof.py
python3 scripts/governance/render_current_state_summary.py && python3 scripts/governance/check_current_state_summary.py
Closeout note:
./bin/repo-side-strict-ci --mode pre-push still prefers the repo-owned
standard-env container path when Docker is healthy.Mutation-readiness note:
repo-side-strict-ci now prefers a fresh current-commit mutation stats
artifact at .runtime-cache/reports/mutation/mutmut-cicd-stats.json when one
already exists for the current HEAD.scripts/ci/run_mutmut.sh and rewrites the report before evaluating the
thresholds.killed,
survived, no_tests, timeout, not_checked, caught_by_type_check) so
a failed mutation lane points at an exact leaf instead of a blank
killed+survived=0 summary.What this layer proves:
main.For the public evidence ladder, read proof.md.