CI: one pipeline that gates the deploy on every check and waits for prod to run it (#55, part 1) #76

Merged
jared merged 4 commits from ci-deploy-gate into main 2026-11-29 00:00:28 -05:00
4 Commits
Author SHA1 Message Date
jaredandClaude Opus 5.5 8a23fe0922 monitor: space after a comma in an f-string (flake8 E231 on Python 3.13)
CI / Lint (Python) (pull_request) Successful in 36s
CI / Lint (JS) (pull_request) Successful in 16s
CI / Security (pull_request) Successful in 44s
CI / Test (pull_request) Successful in 54s
CI / Scan (pull_request) Successful in 48s
CI / Deploy (pull_request) Skipped
CI / Notify (pull_request) Skipped
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]>
2026-11-28 23:54:39 -05:00
jaredandClaude Opus 5.5 77a5791bbf CI: install Node before checkout in the Python jobs
CI / Lint (JS) (pull_request) Successful in 10s
CI / Lint (Python) (pull_request) Failing after 36s
CI / Test (pull_request) Successful in 56s
CI / Security (pull_request) Successful in 32s
CI / Scan (pull_request) Successful in 28s
CI / Deploy (pull_request) Skipped
CI / Notify (pull_request) Skipped
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]>
2026-11-28 23:52:16 -05:00
jaredandClaude Opus 5.5 58e4528eb5 gitignore: keep node_modules/ and .coverage on separate lines
CI / Lint (Python) (pull_request) Failing after 16s
CI / Lint (JS) (pull_request) Successful in 1m7s
CI / Test (pull_request) Failing after 10s
CI / Security (pull_request) Failing after 9s
CI / Scan (pull_request) Failing after 7s
CI / Deploy (pull_request) Skipped
CI / Notify (pull_request) Skipped
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-28 23:43:29 -05:00
jaredandClaude Opus 5.5 48daed3682 CI: one pipeline that gates the deploy on every check and waits for prod to run it
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]>
2026-11-28 23:43:21 -05:00