simplify: one scoring path, bare AST formulas, localhost-only dev server

- move _score_raw into scorer.score_raw; Scorer delegates to it
- compile_formula returns ast.Expression directly (drop CompiledFormula)
- secret key from env or random; drop hand-rolled .env parsing/appending
- dev server binds 127.0.0.1 by default (HOST env override); Docker sets
  HOST=0.0.0.0 so container port mapping still works
- trim pipeline comments narrating past bugs (history lives in git)
- snapshot free-var/formula (de)serialization via asdict/**kwargs
- domains routes: shared form parsing and partial rendering helpers

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-09-25 15:03:59 -05:00
parent 3429bce8d0
commit b2ccd94fd5
8 changed files with 111 additions and 270 deletions

View File

@@ -9,6 +9,7 @@ RUN pip install --no-cache-dir ".[web,gemini]"
VOLUME /app/data
ENV PHYSCOM_DB=/app/data/physcom.db
ENV HOST=0.0.0.0
EXPOSE 5000
CMD ["python", "-m", "physcom_web"]