public-release phases 1-3: read-only public mode, gunicorn container, demo bootstrap, CI, README
- before_request guard: visitors browse + explore; writes need PHYSCOM_ADMIN_TOKEN login - SameSite=Lax/HttpOnly cookies, persisted secret key, debug off unless FLASK_DEBUG=1 - non-root gunicorn container with healthcheck; physcom demo --if-empty on first start - landing page Top Concepts, write controls hidden from visitors - CI workflow, pyproject metadata, compose Ollama parity, README rewrite - tests/test_web_access.py: access control + GET smoke test of every page Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -55,6 +55,25 @@ Skipped until something forces them:
|
||||
|
||||
---
|
||||
|
||||
## Suggested order
|
||||
## Progress (2026-09-25)
|
||||
|
||||
1.1 → 1.5 → 1.2 → 1.3 → 1.4 → 1.6 → 1.7 → 1.8 → 2.3 → 2.1 → 2.4 → 2.5 → 2.6 → 3.1 → 3.3 → 2.2 (screenshots need the final UI) → 3.4 → 3.2.
|
||||
| Item | Status |
|
||||
|------|--------|
|
||||
| 1.1 gunicorn, debug off | Done. Dev server debug only with `FLASK_DEBUG=1`. |
|
||||
| 1.2 read-only public mode | Done. Deviation: an unset token means *nobody* can write under gunicorn, instead of "localhost can write", because behind a reverse proxy every request looks like localhost. The dev server stays open until a token is set. |
|
||||
| 1.3 cookie hardening | Done. `Secure` is opt-in via `PHYSCOM_SECURE_COOKIES=1` so plain-HTTP local Docker can still log in. |
|
||||
| 1.4 explore | Done. Verified it never writes; it costs about 45 ms per call (measured over 168 combos). Non-finite inputs are now rejected. No app-level rate limit: add one at the proxy if needed. |
|
||||
| 1.5 secret key | Done differently: instead of refusing to start, an unset key is generated once and saved next to the DB. |
|
||||
| 1.6 container | Done: non-root, healthcheck. Base image **not** digest-pinned (no Docker available here to resolve one). **Container build is untested**, since Docker isn't installed on this machine. |
|
||||
| 1.7 untrack local config | Done. Checked the history: no secrets. The repo was already public. |
|
||||
| 1.8 tests | Done: `tests/test_web_access.py`. |
|
||||
| 2.1 LICENSE | **Open. Your decision** (and your employer's). |
|
||||
| 2.2 README | Done, apart from **screenshots**, which need a browser. |
|
||||
| 2.3 CI | Done: `.github/workflows/test.yml` (Gitea Actions reads it). Unverified until a runner picks it up. |
|
||||
| 2.4 metadata | Done. `license` is left unset until 2.1. |
|
||||
| 2.5 compose parity | Done: Ollama vars, admin token, Postgres placeholder removed. |
|
||||
| 2.6 route smoke tests | Done (in 1.8's file). |
|
||||
| 3.1 demo data | Done differently: `physcom demo --if-empty` builds it on first start (about 20 s) instead of committing a snapshot that goes stale whenever the physics changes. |
|
||||
| 3.2 host | **Open. Your call**: the README "Deploying publicly" section covers any host. |
|
||||
| 3.3 pass-4 reviews | **Open.** Ollama wasn't running here. Run pass 4 locally, then snapshot export → import. |
|
||||
| 3.4 landing page | Done: "Top Concepts" table, and the Run Pipeline button is hidden from visitors. |
|
||||
|
||||
Reference in New Issue
Block a user