Until now, the deploy job lived in lint.yml and needed only eslint, while jest and npm audit ran as separate workflows. A merge that failed its tests still deployed to production. Gandalf's pipeline has the same gap, because every LotusGuild repo was built from the same template.
What changes
One pipeline:.gitea/workflows/ci.yml runs lint, test, audit, deploy and notify. deploy needs all three checks and runs only on push to main. lint.yml, test.yml and security.yml are removed. The weekly Monday audit cron is kept.
Reproducible builds:npm ci everywhere. eslint comes from the lockfile (new npm run lint), where CI used to run npm install --save-dev eslint@8. setup-node is pinned to Node 20, which matches production and the worker.
Supply chain:actions/checkout and actions/setup-node are pinned to full commit SHAs with the version in a comment, following tinker_tickets.
Permissions: the workflow defaults to contents: read, and only deploy gets write access, for its tag.
Concurrency: deploys queue in a deploy-production group instead of overlapping, and superseded branch runs are cancelled.
Deploy:
The payload now carries sha and a timestamp, so each deploy's signature is unique. The server will verify them in phase 2; until then it still deploys origin/main.
After the webhook, CI waits until Pulse serves again before tagging. This is a liveness check only; /healthz with the SHA comes in phase 2.
Alerts: Matrix now gets an alert for any failed job on main, for a failed weekly audit, and for every successful deploy. Before, only lint failures alerted.
House style: lint fails on em or en dashes (and —, – and escaped forms) in Pulse-owned files.
npm audit fix: the new audit gate caught live advisories in production dependencies. This is a lockfile-only change with no major bumps:
proxy-addr 2.0.8 (critical)
body-parser 2.4.0 (high)
follow-redirects 1.16.3 (high; the worker uses it through axios)
qs and ip-address
The remaining glob/minimatch advisories are moderate, dev-only (jest) and need a breaking upgrade.
Verified
Branch run 3759: lint, test and audit pass; deploy and notify are skipped off main. The pinned v4 actions work on our runner.
Locally: jest passes (61). Both end-to-end harnesses still pass after the dependency bumps: reliability 13/13, and WebSocket auth 15/15 (enforcement off) and 12/12 (on).
After merge: update branch protection (Settings > Branches > main)
Replace the old required check with:
CI / Lint (eslint) (push)
CI / Test (jest) (push)
CI / Security (npm audit) (push)
(Add the (pull_request) variants as well if you want them required on PRs.)
Phase 1 of #45.
## Why
Until now, the deploy job lived in `lint.yml` and needed only eslint, while jest and npm audit ran as separate workflows. **A merge that failed its tests still deployed to production.** Gandalf's pipeline has the same gap, because every LotusGuild repo was built from the same template.
## What changes
- **One pipeline:** `.gitea/workflows/ci.yml` runs `lint`, `test`, `audit`, `deploy` and `notify`. `deploy` needs all three checks and runs only on push to `main`. `lint.yml`, `test.yml` and `security.yml` are removed. The weekly Monday audit cron is kept.
- **Reproducible builds:** `npm ci` everywhere. eslint comes from the lockfile (new `npm run lint`), where CI used to run `npm install --save-dev eslint@8`. `setup-node` is pinned to Node 20, which matches production and the worker.
- **Supply chain:** `actions/checkout` and `actions/setup-node` are pinned to full commit SHAs with the version in a comment, following tinker_tickets.
- **Permissions:** the workflow defaults to `contents: read`, and only `deploy` gets write access, for its tag.
- **Concurrency:** deploys queue in a `deploy-production` group instead of overlapping, and superseded branch runs are cancelled.
- **Deploy:**
- The payload now carries `sha` and a timestamp, so each deploy's signature is unique. The server will verify them in phase 2; until then it still deploys `origin/main`.
- After the webhook, CI waits until Pulse serves again before tagging. This is a liveness check only; `/healthz` with the SHA comes in phase 2.
- **Alerts:** Matrix now gets an alert for any failed job on `main`, for a failed weekly audit, and for every successful deploy. Before, only lint failures alerted.
- **House style:** lint fails on em or en dashes (and `—`, `–` and escaped forms) in Pulse-owned files.
- **`npm audit fix`:** the new audit gate caught live advisories in production dependencies. This is a lockfile-only change with no major bumps:
- `proxy-addr` 2.0.8 (critical)
- `body-parser` 2.4.0 (high)
- `follow-redirects` 1.16.3 (high; the worker uses it through axios)
- `qs` and `ip-address`
The remaining `glob`/`minimatch` advisories are moderate, dev-only (jest) and need a breaking upgrade.
## Verified
- Branch run [3759](https://code.lotusguild.org/LotusGuild/pulse/actions/runs/3759): lint, test and audit pass; deploy and notify are skipped off `main`. The pinned v4 actions work on our runner.
- Locally: jest passes (61). Both end-to-end harnesses still pass after the dependency bumps: reliability 13/13, and WebSocket auth 15/15 (enforcement off) and 12/12 (on).
## After merge: update branch protection (Settings > Branches > main)
Replace the old required check with:
- `CI / Lint (eslint) (push)`
- `CI / Test (jest) (push)`
- `CI / Security (npm audit) (push)`
(Add the `(pull_request)` variants as well if you want them required on PRs.)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
The deploy job lived in lint.yml and needed only eslint, while jest and
npm audit ran in separate workflows. A merge that failed its tests still
deployed to production. (#45 phase 1)
- Combine everything into .gitea/workflows/ci.yml with jobs lint, test,
audit, deploy and notify. Deploy needs all three checks and runs only
on push to main.
- Builds are reproducible: npm ci everywhere, eslint from the lockfile
(new `npm run lint`), and setup-node pinned to Node 20 (production).
- Actions are pinned to full commit SHAs, with the version in a comment,
following tinker_tickets.
- Workflow permissions default to contents: read; only deploy can write
(for its tag). A deploy-production concurrency group queues deploys
instead of running two at once. Superseded branch runs are cancelled.
- The deploy payload now carries the sha and a timestamp, so signatures
differ per deploy (the server verifies them in phase 2). After the
webhook, CI waits until Pulse is serving again before tagging.
- The Matrix alert now fires for any failed job on main, for the weekly
audit, and for every successful deploy.
- New lint step: fail on em or en dashes in Pulse-owned files.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The dash check's own pattern contained the literal entities it searches
for. Use &[mn]dash; so the check doesn't flag itself.
- npm audit fix (lockfile only, no major bumps): proxy-addr 2.0.8
(critical), body-parser 2.4.0 (high), follow-redirects 1.16.3 (high,
used by the worker through axios), qs 6.17.1, ip-address. The remaining
glob/minimatch advisories are moderate, dev-only (jest) and need a
breaking upgrade, so they stay below the high threshold.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jared
scheduled this pull request to auto merge when all checks succeed 2026-11-22 02:14:58 -05:00
jared
merged commit b10ea154dd into main2026-11-22 02:20:38 -05:00
jared
deleted branch ci-phase12026-11-22 02:20:40 -05:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Phase 1 of #45.
Why
Until now, the deploy job lived in
lint.ymland needed only eslint, while jest and npm audit ran as separate workflows. A merge that failed its tests still deployed to production. Gandalf's pipeline has the same gap, because every LotusGuild repo was built from the same template.What changes
One pipeline:
.gitea/workflows/ci.ymlrunslint,test,audit,deployandnotify.deployneeds all three checks and runs only on push tomain.lint.yml,test.ymlandsecurity.ymlare removed. The weekly Monday audit cron is kept.Reproducible builds:
npm cieverywhere. eslint comes from the lockfile (newnpm run lint), where CI used to runnpm install --save-dev eslint@8.setup-nodeis pinned to Node 20, which matches production and the worker.Supply chain:
actions/checkoutandactions/setup-nodeare pinned to full commit SHAs with the version in a comment, following tinker_tickets.Permissions: the workflow defaults to
contents: read, and onlydeploygets write access, for its tag.Concurrency: deploys queue in a
deploy-productiongroup instead of overlapping, and superseded branch runs are cancelled.Deploy:
shaand a timestamp, so each deploy's signature is unique. The server will verify them in phase 2; until then it still deploysorigin/main./healthzwith the SHA comes in phase 2.Alerts: Matrix now gets an alert for any failed job on
main, for a failed weekly audit, and for every successful deploy. Before, only lint failures alerted.House style: lint fails on em or en dashes (and
—,–and escaped forms) in Pulse-owned files.npm audit fix: the new audit gate caught live advisories in production dependencies. This is a lockfile-only change with no major bumps:proxy-addr2.0.8 (critical)body-parser2.4.0 (high)follow-redirects1.16.3 (high; the worker uses it through axios)qsandip-addressThe remaining
glob/minimatchadvisories are moderate, dev-only (jest) and need a breaking upgrade.Verified
main. The pinned v4 actions work on our runner.After merge: update branch protection (Settings > Branches > main)
Replace the old required check with:
CI / Lint (eslint) (push)CI / Test (jest) (push)CI / Security (npm audit) (push)(Add the
(pull_request)variants as well if you want them required on PRs.)🤖 Generated with Claude Code