M00: Program kickoff, baseline freeze, phase map, E2E verification

- docs/serena.md: Living ledger, phase map, invariants, milestone table
- docs/milestones/M00/: M00_plan, preflight, e2e_baseline, ci_inventory, toolcalls
- scripts/dev/: run_m00_baseline_e2e.ps1, .sh (thin verification helpers)
- Baseline tag baseline-pre-refactor created on 82a973c0

No runtime/structural changes. Behavior-preserving docs and verification only.

Made-with: Cursor
This commit is contained in:
Michael Cahill 2026-03-06 19:17:49 -08:00
parent 82a973c043
commit 0a8ade1a9f
10 changed files with 1914 additions and 0 deletions

View file

@ -0,0 +1,44 @@
# M00 Baseline E2E Verification Script (PowerShell)
# Wraps existing repo commands exactly — no new behavior.
# Usage: .\scripts\dev\run_m00_baseline_e2e.ps1
# Prerequisites: Python 3.10.x, Node 18, pip install wait-for-it -r requirements-test.txt
$ErrorActionPreference = "Stop"
$RepoRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
Set-Location $RepoRoot
Write-Host "=== M00 Baseline Verification ===" -ForegroundColor Cyan
Write-Host ""
# 1. Python lint (matches CI: ruff 0.3.3)
Write-Host "[1/4] Python lint (ruff)..." -ForegroundColor Yellow
pip install ruff==0.3.3 -q 2>$null
ruff .
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
Write-Host " PASS" -ForegroundColor Green
Write-Host ""
# 2. JS lint (matches CI: npm i --ci, npm run lint)
Write-Host "[2/4] JS lint (eslint)..." -ForegroundColor Yellow
npm i --ci 2>&1 | Out-Null
npm run lint
if ($LASTEXITCODE -ne 0) {
Write-Host " FAIL (note: CRLF linebreaks on Windows may cause linebreak-style errors; CI on Linux passes)" -ForegroundColor Yellow
}
Write-Host ""
# 3. Env setup (optional — uncomment if running tests)
# Write-Host "[3/4] Env setup..." -ForegroundColor Yellow
# $env:TORCH_INDEX_URL = "https://download.pytorch.org/whl/cpu"
# python launch.py --skip-torch-cuda-test --exit
# Write-Host ""
# 4. Tests require server — print instructions
Write-Host "[3/4] Test server + pytest (manual):" -ForegroundColor Yellow
Write-Host " Start server in separate terminal:"
Write-Host " python -m coverage run --data-file=.coverage.server launch.py --skip-prepare-environment --skip-torch-cuda-test --test-server --do-not-download-clip --no-half --disable-opt-split-attention --use-cpu all --api-server-stop"
Write-Host " Then run: wait-for-it --service 127.0.0.1:7860 -t 20"
Write-Host " Then run: python -m pytest -vv --cov . --cov-report=xml --verify-base-url test"
Write-Host ""
Write-Host "=== Lint verification complete ===" -ForegroundColor Cyan

View file

@ -0,0 +1,42 @@
#!/usr/bin/env bash
# M00 Baseline E2E Verification Script (Bash)
# Wraps existing repo commands exactly — no new behavior.
# Usage: ./scripts/dev/run_m00_baseline_e2e.sh
# Prerequisites: Python 3.10.x, Node 18, pip install wait-for-it -r requirements-test.txt
set -e
REPO_ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
cd "$REPO_ROOT"
echo "=== M00 Baseline Verification ==="
echo ""
# 1. Python lint (matches CI: ruff 0.3.3)
echo "[1/4] Python lint (ruff)..."
pip install ruff==0.3.3 -q 2>/dev/null || true
ruff .
echo " PASS"
echo ""
# 2. JS lint (matches CI: npm i --ci, npm run lint)
echo "[2/4] JS lint (eslint)..."
npm i --ci
npm run lint
echo " PASS"
echo ""
# 3. Env setup (optional — uncomment if running full tests)
# echo "[3/4] Env setup..."
# export TORCH_INDEX_URL=https://download.pytorch.org/whl/cpu
# python launch.py --skip-torch-cuda-test --exit
# echo ""
# 4. Tests require server — print instructions
echo "[3/4] Test server + pytest (manual):"
echo " Start server in background:"
echo " python -m coverage run --data-file=.coverage.server launch.py --skip-prepare-environment --skip-torch-cuda-test --test-server --do-not-download-clip --no-half --disable-opt-split-attention --use-cpu all --api-server-stop &"
echo " Then: wait-for-it --service 127.0.0.1:7860 -t 20"
echo " Then: python -m pytest -vv --cov . --cov-report=xml --verify-base-url test"
echo ""
echo "=== Lint verification complete ==="