SourceHarbor

Testing

SourceHarbor uses layered verification.

Think of it like product evidence in layers:

  1. Fast checks catch broken contracts and fake tests
  2. Doctor classifies first-run blockers before you burn time on deeper smoke
  3. Core suites verify Python surfaces and shared behavior
  4. Supervisor clean path proves the repo-managed operator path locally
  5. Long live smoke extends into secret and provider gates on purpose

Start With One Verification Path

If you want to know… Start here What it answers
Can I trust the repo locally? ./bin/doctor, bash scripts/ci/python_tests.sh, then ./bin/full-stack up environment, Python contracts, and the repo-managed operator path
Can I trust a pull request? the GitHub required checks below branch-protected merge truth for code, secrets, and workflow safety
Can I trust public, release, or publish claims? the maintainer appendix later on this page release/publication truth, external lanes, and closeout-grade audits

Five-Layer Verification Contract

Think of this like airport checkpoints:

Do 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

Fast Local Checks

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

First-Run Doctor

./bin/doctor

What it tells you:

What they cover:

Core Python Test Suite

bash scripts/ci/python_tests.sh

What it covers:

Supervisor Clean Path

./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:

Long Live Smoke Lane

./bin/smoke-full-stack --offline-fallback 0

What it proves:

Important boundary:

Maintainer Appendix

Everything below this line is maintainer depth, not the newcomer verification path.

Local-only login browser lane

GitHub-hosted CI stays login-free. If a browser flow genuinely needs a signed-in Chrome session, keep it local and repo-scoped:

./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

For the deeper browser/login runbook, read runbook-local.md.

Git hooks

Install hooks with:

./bin/install-git-hooks

Pre-commit and pre-push should keep real regressions, secret leaks, and broken public workflows out of ordinary pushes.

PR-facing security and dependency checks

Remote required checks widen the proof surface beyond local boot:

Treat them as part of the branch-protected pull-request contract, not as optional extras.

External-proof workflow-dispatch lanes

These stay outside the default pull-request gate:

They run behind protected environments because they prove harder publication or distribution claims than the default local + PR lanes.

Manual truth audits and closeout lanes

Use these only when you need remote/public truth, release/publication truth, or closeout-grade evidence:

./bin/repo-side-strict-ci --mode pre-push
./bin/quality-gate --mode pre-push
./bin/governance-audit --mode audit
python3 scripts/runtime/run_reader_clean_ui_audit.py
python3 scripts/runtime/run_frontstage_clean_ui_audit.py
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

These lanes prove:

Public-Proof Boundary

For the public evidence ladder, read proof.md.