[pitboss] phase 11: Track D.4 + D.5 — Deterministic secrets + NetworkPolicy

This commit is contained in:
pitboss 2026-05-14 14:39:29 -05:00
parent 50f0729d01
commit 523bd0c53a
8 changed files with 789 additions and 32 deletions

View file

@ -0,0 +1,21 @@
# Phase 11 fixture: Flask app that reads FLASK_SECRET at import time via
# the bare-index `os.environ["FLASK_SECRET"]` form (the canonical KeyError
# trap). The harness must populate the env *before* the module is
# imported or app.secret_key resolution raises.
#
# Phase 11 — Track D.4 acceptance bullet:
# "A Flask fixture with `app.secret_key = os.environ["FLASK_SECRET"]`
# boots without raising `KeyError`."
import os
from flask import Flask
app = Flask(__name__)
app.secret_key = os.environ["FLASK_SECRET"]
API_TOKEN = os.environ.get("API_TOKEN", "default-token")
@app.route("/")
def index():
return "ok"