Python 3.12+ tokenizes f-strings, so pycodestyle now checks inside them.
CI runs flake8 on production's Python 3.13; the old CI and local checks
ran an older Python and never saw it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The runner (act) runs JavaScript actions such as actions/checkout inside
the job container, and python:3.13-trixie has no node, so checkout failed
with 'exec: node: executable file not found'. Debian's nodejs (20.x) is
enough for checkout v4 and keeps the job image matching production.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
gandalf#55, part 1 (no server changes needed).
- .gitea/workflows/ci.yml replaces lint.yml, test.yml and security.yml.
Jobs: Lint (Python) with the dash check, Lint (JS), Test, Security,
Scan (gitleaks over the full history, actionlint, shellcheck), Deploy
and Notify. Deploy needs every check, so failing tests or a bandit or
gitleaks finding no longer reach production.
- Pinned: actions/checkout to a full SHA, job images to digests (Python
3.13 on Debian 13 like CT 157, Node 22 for eslint), Python tools in the
new requirements-dev.txt, scanner downloads by SHA-256. No setup-python
(the runner's shared tool cache broke Pulse twice).
- Builds run on pull requests and on pushes to main only, plus a weekly
run on main; concurrency queues deploys and never cancels one.
- Deploy signs {"ref", "sha", "ts"} (unique per request), then waits up to
5 minutes until /health reports that commit for both processes, and only
then tags deploy-<date>-<run>.
- /health reports `sha` (version.py reads .git at startup, no subprocess)
and `monitor_sha` (the monitor writes it every cycle).
Part 2 (server side): the pinned deploy script that refuses stale or
replayed requests, deploys exactly that sha and rolls back.
Co-Authored-By: Claude Opus 5.5 <[email protected]>