From 47f48873e06b33a5f7974839f14ca79a83e26d26 Mon Sep 17 00:00:00 2001 From: Travis Date: Sat, 18 Apr 2026 12:51:12 -0400 Subject: [PATCH] added the phase 3 docker stuff --- templates/Dockerfile | 36 +++++++++++++++++ templates/architect-sweep-checklist.md | 54 ++++++++++++++++++++++++++ templates/compose.yml | 47 ++++++++++++++++++++++ 3 files changed, 137 insertions(+) create mode 100644 templates/Dockerfile create mode 100644 templates/architect-sweep-checklist.md create mode 100644 templates/compose.yml diff --git a/templates/Dockerfile b/templates/Dockerfile new file mode 100644 index 0000000..2e086d9 --- /dev/null +++ b/templates/Dockerfile @@ -0,0 +1,36 @@ +# Zero-Check Container Verification Template +# Copy this into your project and adjust as needed. +# +# Usage: +# docker build -t project-verify . +# docker run --rm project-verify + +# --- Python Projects --- +FROM python:3.12-slim AS python-verify + +WORKDIR /app + +COPY requirements*.txt pyproject.toml* ./ +RUN pip install --no-cache-dir -r requirements.txt 2>/dev/null \ + || pip install --no-cache-dir . 2>/dev/null \ + || echo "No Python dependencies to install" + +COPY . . + +RUN pip install pytest pytest-cov +CMD ["pytest", "--cov", "--cov-report=term-missing", "-q"] + + +# --- Go Projects --- +# Uncomment this block and comment out the Python block above +# +# FROM golang:1.22-alpine AS go-verify +# +# WORKDIR /app +# +# COPY go.mod go.sum* ./ +# RUN go mod download +# +# COPY . . +# +# CMD ["go", "test", "-cover", "./..."] \ No newline at end of file diff --git a/templates/architect-sweep-checklist.md b/templates/architect-sweep-checklist.md new file mode 100644 index 0000000..4b4fb1c --- /dev/null +++ b/templates/architect-sweep-checklist.md @@ -0,0 +1,54 @@ +# Architect Sweep Checklist + +Run this review after the gauntlet is green and container verification passes. +Timebox to 5 minutes. Focus on intent, not syntax. + +## Pre-review + +- [ ] Pull up the diff: `git diff ..HEAD` +- [ ] Confirm `validate/results.json` shows all checks passed + +## Outbound calls + +- [ ] Search for `requests`, `httpx`, `urllib`, `http.client`, `net/http` +- [ ] Every outbound call has a clear, expected destination +- [ ] No unexpected domains or IPs +- [ ] No data being sent that shouldn't be (tokens, user data, telemetry) + +## Auth and access control + +- [ ] No `try/except: pass` around auth logic +- [ ] No commented-out auth decorators or middleware +- [ ] No hardcoded credentials, even "temporary" ones +- [ ] Route protection is consistent (no unprotected admin endpoints) + +## Obfuscation + +- [ ] No unexplained Base64 or hex-encoded strings +- [ ] No dynamically constructed URLs from encoded parts +- [ ] No eval(), exec(), or subprocess with string interpolation + +## Dependency changes + +- [ ] Any new dependencies are real, well-known packages +- [ ] No typosquatting (check spelling against PyPI/Go modules) +- [ ] Version pins are present where expected + +## Test quality + +- [ ] Tests assert actual behavior, not just `assert True` +- [ ] Tests have meaningful names describing what they verify +- [ ] No tests that just call a function without checking the result +- [ ] Mock boundaries are at external integration points, not internal logic + +## Architecture + +- [ ] External integrations are behind clean interfaces (not scattered) +- [ ] No new global state or singletons without justification +- [ ] Error handling is specific, not broad exception swallowing +- [ ] File/network resources are properly closed + +## Final decision + +- [ ] **APPROVE** — code is safe to promote +- [ ] **REJECT** — document reason, kick back to LLM or fix manually \ No newline at end of file diff --git a/templates/compose.yml b/templates/compose.yml new file mode 100644 index 0000000..2c335e6 --- /dev/null +++ b/templates/compose.yml @@ -0,0 +1,47 @@ +# Zero-Check Tier 2 Integration Test Template +# Copy this into your project and uncomment the services you need. +# +# Usage: +# docker compose -f docker-compose.verify.yml up --build --abort-on-container-exit +# docker compose -f docker-compose.verify.yml down -v + +services: + app: + build: + context: . + dockerfile: ./Dockerfile + depends_on: + - db + environment: + - DATABASE_URL=postgresql://testuser:testpass@db:5432/testdb + # - REDIS_URL=redis://redis:6379/0 + command: ["pytest", "--cov", "--cov-report=term-missing", "-q"] + + db: + image: postgres:16-alpine + environment: + POSTGRES_USER: testuser + POSTGRES_PASSWORD: testpass + POSTGRES_DB: testdb + tmpfs: + - /var/lib/postgresql/data + + # --- Uncomment services as needed --- + + # redis: + # image: redis:7-alpine + # tmpfs: + # - /data + + # mongo: + # image: mongo:7 + # environment: + # MONGO_INITDB_ROOT_USERNAME: testuser + # MONGO_INITDB_ROOT_PASSWORD: testpass + # tmpfs: + # - /data/db + + # rabbitmq: + # image: rabbitmq:3-alpine + # tmpfs: + # - /var/lib/rabbitmq \ No newline at end of file