Testing And Validation¶
Purpose¶
This document defines the canonical validation path for changes in this repo. It is the primary reference for:
what to run locally before push
what GitHub runs on pull requests
what the deploy workflow runs before and after deployment
Local developer validation¶
Required local regression command before push:
cd /home/roger/projects/codex_trial/agent_client/server
UV_CACHE_DIR=/tmp/uv-cache uv run python scripts/release_verify.py pre-deploy
This is the canonical local validation path for deployment-facing changes.
What it covers¶
The current pre-deploy gate runs these test modules:
tests.test_api_routerstests.test_admin_cli_devices_and_contexttests.test_admin_cli_exports_stage_repltests.test_admin_cli_jobs_roundstests.test_admin_cli_customers_artifactstests.test_command_registrytests.test_configtests.test_export_sync_servicetests.test_final_report_images_servicetests.test_media_runtime_servicetests.test_report_image_runtime_servicetests.test_staging_sync_servicetests.test_tree_identification_service
These tests run with CI-safe local defaults:
TRAQ_DATABASE_URL=sqlite+pysqlite:///:memory:TRAQ_ENABLE_DISCOVERY=falseTRAQ_AUTO_CREATE_SCHEMA=falseTRAQ_ENABLE_FILE_LOGGING=false
CI validation¶
Pull request workflows:
PR verification
workflow:
.github/workflows/server-pr-verification.ymlruns the same canonical pre-deploy gate:
uv run python scripts/release_verify.py pre-deploy
PostgreSQL integration smoke lane
workflow:
.github/workflows/server-postgres-ci.ymlboots temporary PostgreSQL in GitHub Actions
runs:
uv run alembic upgrade head uv run python -m unittest tests.test_postgres_ci_smoke
Deployment validation¶
The deploy workflow is:
.github/workflows/server-cloudrun.yml
It runs:
pre-deploy gate
image build and push
migration job update and execution
Cloud Run service deploy
post-deploy health verification
Post-deploy verification¶
The canonical post-deploy check is:
UV_CACHE_DIR=/tmp/uv-cache uv run python scripts/release_verify.py post-deploy
Required environment:
TRAQ_CLOUD_ADMIN_BASE_URL
Current scope:
GET /health
Interpretation¶
local regression command: developer pre-push check
PR verification: merge gate
deploy verification: release gate
post-deploy health: live-service readiness check
Practical standard¶
Before starting a feature branch, assume the required validation path is:
targeted tests for the changed area during implementation
canonical pre-deploy gate before push or merge
PostgreSQL CI lane on pull request
deploy workflow on
main
If a change is important enough to deploy, it is important enough to survive the canonical pre-deploy gate.