Queue-North-Website/docs/OPERATIONS.md

307 lines
15 KiB
Markdown
Raw Permalink Normal View History

docs: adopt project template, retire the markdown backlog This repository is the one the template's README describes: 205 issues, zero milestones, and severity labels spelled "P0 Critical" / "P1 High" / "P2 Medium", which privacyllc.dev reports as NOT ADOPTED rather than as 87% complete. Six markdown records described the same work and none pointed at the tracker. Two of them said the project was in "Phase 5" while the code was at 0.9.3. Migrated, then deleted in this commit: FUTURE.md -> docs/history/BATCH_LEDGER.md (Archived). Its open items were all already filed as issues, so nothing needed migrating into the tracker HISTORY.md -> docs/history/DEVELOPMENT_LOG.md, verbatim, 0 lines lost DEVELOPMENT_LOG.md -> the same file, as a second labelled block. Not interleaved: the changelog has three duplicated version headings, so one date order would have implied more than the record supports PROJECT.md -> docs/planning/PROJECT_PLAN.md STRUCTURE.md -> the agent pipeline into README.md; its versioning rules retired BUILD_SUMMARY.md -> BATCH_LEDGER.md. Its embedded SQL schema deliberately NOT carried: it predated the UNIQUE constraint on leads.email, and server/index.js owns the schema SCRIPTS.md -> docs/TOOLS.md, corrected for the SSR + prerender build Moved with history (git detects all four as renames): OVERHAUL_PLAN.md, review.md, project-requirements.md, docs/zoho-setup.md Kept because this project earned them: the five-agent pipeline, the design system in OVERHAUL_PLAN.md (Status: Current, with a front-note saying which half is history), the positioning argument in REDESIGN_REVIEW.md, and REQUIREMENTS.md whole, including its change policy. Deleted from the template because they do not apply, each said out loud in DOC_TRUST_MAP.md: QA pass I (no money moves), the authorisation checklist group and the session-token row (no accounts, no sessions), and one PRECAUTIONARY paragraph in SECURITY.md about holding credentials on behalf of users — there are none, and PROJECT_PLAN.md records accounts as out of scope. Pass H was kept and rewritten: its authorisation half does not apply, its what-a-stranger-can- reach half is the most exposed surface here. Also removed: main.js, the old static site's hash router, referenced by nothing and preserved in .drop/; and test-results/.last-run.json, a May Playwright artifact reading {"status":"failed"} for a suite that does not exist. The repository was made private on Forgejo before this commit. That is what let the internal history be committed rather than exempted — null/fruit-fall is already private and reports normally. Two defects found on the way in and fixed here: zoho-setup.md told admins to edit `server/zoho/`, a directory that has never existed in any commit (the mapping is in server/index.js), and README.md's route list still advertised /8x8, removed at 0.6.6, while omitting /privacy-policy. Branding: icon.webp and logo.webp converted from this project's own marks in assets/. banner.webp is absent and is filed as an issue rather than faked. Verified: verify.sh 3/3, doc-claims 71 claimed paths all present, backup and a first-ever restore of the live leads database (2 tables, 3 rows, under 1s). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 01:19:02 -05:00
# Operations — Queue North Website
```
Status: Current
Owner: _null
Last reviewed: 2026-08-18
Governs: Dockerfile, docker-compose.yml, scripts/status.sh,
scripts/healthcheck.sh, scripts/backup.sh, scripts/restore-check.sh —
what watches this in production, and what to do when it stops
Review trigger: A new alert or a new place errors are sent; a change to the
backup schedule or the restore procedure; any change to the
deploy host, container or image; any incident whose first ten
minutes were spent working out what to run
```
## Why this exists
Every other document here describes what the project *is*. This one describes
what happens when it stops being that at three in the morning, and it is the
only document written for somebody who is not thinking clearly.
The failure it prevents is specific: **the first ten minutes of an incident
spent working out which host, which container, and which command**, while the
thing everybody actually wants to know — is it down, or is it just unreachable
from here — goes unanswered.
## What is deployed, and where
| | |
| --- | --- |
fix(infra): queuenorth.com is the production origin, and it is this deployment _null confirmed queuenorth.com as the permanent public origin, which settles #212 and exposed a wrong claim written earlier the same day. docs/OPERATIONS.md said queuenorth.com "is not this deployment ... do not diagnose against it". That came from a DNS lookup and an assumption. It is this deployment: both hostnames serve the identical bundle and this server's own /api/health shape, 24.41.108.95 is this network's own public IP, and both reach qn-website-dev on nebula — queuenorth.com through nginx-proxy-manager on thor/exodus, qn.isnull.dev through Cloudflare. Two front doors, one container, no non-production environment. That is the worst direction for a runbook to be wrong in, so the correction quotes the wrong sentence rather than replacing it silently. The QA Round 0 table likewise gained the production observations as extra rows instead of having its originals rewritten. Dockerfile: the CORS_ORIGIN fallback was '*'. The server sets credentials:true and browsers reject '*' with credentials outright, so that fallback would have broken every form rather than over-permitting. Now the real origin. healthcheck.sh and preflight.sh now watch production by default, with the second front door reachable through their env overrides — the two ingresses terminate TLS in different places and can rot independently. Also fills a gap adoption left explicitly undone: the deploy path is a Portainer stack, id 58 on nebula, found from the container's own compose labels. OPERATIONS.md documents it, including that the stack file is a separate copy from this repository's docker-compose.yml and the two have already drifted. That drift is all that remains of #212 — one trailing slash on line 21 of the stack file. Left in place: nothing is broken today, and fixing it recreates the container and takes both front doors down together. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 02:08:12 -05:00
| **Public origin** | **`https://queuenorth.com`** — the production front door, and the one customers use |
| Second front door | `https://qn.isnull.dev`, the same container reached through Cloudflare |
| `www` | 301s to `https://queuenorth.com/` |
docs: adopt project template, retire the markdown backlog This repository is the one the template's README describes: 205 issues, zero milestones, and severity labels spelled "P0 Critical" / "P1 High" / "P2 Medium", which privacyllc.dev reports as NOT ADOPTED rather than as 87% complete. Six markdown records described the same work and none pointed at the tracker. Two of them said the project was in "Phase 5" while the code was at 0.9.3. Migrated, then deleted in this commit: FUTURE.md -> docs/history/BATCH_LEDGER.md (Archived). Its open items were all already filed as issues, so nothing needed migrating into the tracker HISTORY.md -> docs/history/DEVELOPMENT_LOG.md, verbatim, 0 lines lost DEVELOPMENT_LOG.md -> the same file, as a second labelled block. Not interleaved: the changelog has three duplicated version headings, so one date order would have implied more than the record supports PROJECT.md -> docs/planning/PROJECT_PLAN.md STRUCTURE.md -> the agent pipeline into README.md; its versioning rules retired BUILD_SUMMARY.md -> BATCH_LEDGER.md. Its embedded SQL schema deliberately NOT carried: it predated the UNIQUE constraint on leads.email, and server/index.js owns the schema SCRIPTS.md -> docs/TOOLS.md, corrected for the SSR + prerender build Moved with history (git detects all four as renames): OVERHAUL_PLAN.md, review.md, project-requirements.md, docs/zoho-setup.md Kept because this project earned them: the five-agent pipeline, the design system in OVERHAUL_PLAN.md (Status: Current, with a front-note saying which half is history), the positioning argument in REDESIGN_REVIEW.md, and REQUIREMENTS.md whole, including its change policy. Deleted from the template because they do not apply, each said out loud in DOC_TRUST_MAP.md: QA pass I (no money moves), the authorisation checklist group and the session-token row (no accounts, no sessions), and one PRECAUTIONARY paragraph in SECURITY.md about holding credentials on behalf of users — there are none, and PROJECT_PLAN.md records accounts as out of scope. Pass H was kept and rewritten: its authorisation half does not apply, its what-a-stranger-can- reach half is the most exposed surface here. Also removed: main.js, the old static site's hash router, referenced by nothing and preserved in .drop/; and test-results/.last-run.json, a May Playwright artifact reading {"status":"failed"} for a suite that does not exist. The repository was made private on Forgejo before this commit. That is what let the internal history be committed rather than exempted — null/fruit-fall is already private and reports normally. Two defects found on the way in and fixed here: zoho-setup.md told admins to edit `server/zoho/`, a directory that has never existed in any commit (the mapping is in server/index.js), and README.md's route list still advertised /8x8, removed at 0.6.6, while omitting /privacy-policy. Branding: icon.webp and logo.webp converted from this project's own marks in assets/. banner.webp is absent and is filed as an issue rather than faked. Verified: verify.sh 3/3, doc-claims 71 claimed paths all present, backup and a first-ever restore of the live leads database (2 tables, 3 rows, under 1s). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 01:19:02 -05:00
| Host | **nebula** (`192.168.1.11`) — the same box as the Forgejo instance |
| Container | `qn-website-dev` |
| Image | `dream.scheller.ltd/null/queue-north-website:dev` |
| Port | 3001 in the container; the reverse proxy in front owns the public one |
| Database | `/app/db/queuenorth.db`, in the named volume `qn-website-dev_queuenorth-db` |
| Logs volume | `qn-website-dev_queuenorth-logs``/app/logs` |
| Runs as | UID 1001, non-root |
fix(infra): queuenorth.com is the production origin, and it is this deployment _null confirmed queuenorth.com as the permanent public origin, which settles #212 and exposed a wrong claim written earlier the same day. docs/OPERATIONS.md said queuenorth.com "is not this deployment ... do not diagnose against it". That came from a DNS lookup and an assumption. It is this deployment: both hostnames serve the identical bundle and this server's own /api/health shape, 24.41.108.95 is this network's own public IP, and both reach qn-website-dev on nebula — queuenorth.com through nginx-proxy-manager on thor/exodus, qn.isnull.dev through Cloudflare. Two front doors, one container, no non-production environment. That is the worst direction for a runbook to be wrong in, so the correction quotes the wrong sentence rather than replacing it silently. The QA Round 0 table likewise gained the production observations as extra rows instead of having its originals rewritten. Dockerfile: the CORS_ORIGIN fallback was '*'. The server sets credentials:true and browsers reject '*' with credentials outright, so that fallback would have broken every form rather than over-permitting. Now the real origin. healthcheck.sh and preflight.sh now watch production by default, with the second front door reachable through their env overrides — the two ingresses terminate TLS in different places and can rot independently. Also fills a gap adoption left explicitly undone: the deploy path is a Portainer stack, id 58 on nebula, found from the container's own compose labels. OPERATIONS.md documents it, including that the stack file is a separate copy from this repository's docker-compose.yml and the two have already drifted. That drift is all that remains of #212 — one trailing slash on line 21 of the stack file. Left in place: nothing is broken today, and fixing it recreates the container and takes both front doors down together. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 02:08:12 -05:00
### Two front doors, one container
**Both hostnames are this application, and there is only one of it.** Verified
feat(release): adapt PrivacyLLC-Web's release.sh, and add the deploy half it deliberately omits scripts/release.sh — publish. Bump, guards, build, verify the image's own version label, push :vX.Y.Z and move :dev, commit last, tag. Adapted, not copied. The arguments are PrivacyLLC's and were paid for there; the mechanism is this project's, because almost none of it transferred. Three differences, each a fact about this repository rather than a preference: - It gates on verify.sh, not a test suite, because there is not one. The original refuses to release on a half-run 1,600-test run. This one says out loud that a build, a secret scan and a doc-header check are not tests and that nothing in the gate touched a route, a form or an API response. - It moves :dev as well as publishing :vX.Y.Z, because Portainer stack 58 follows :dev. That makes :dev a pointer and never evidence. - It checks the public origin in three files, not one. The original passes its origin in as a build arg; here https://queuenorth.com is written out in src/lib/seo.js, src/components/SEO.jsx and scripts/prerender.js and is baked into every canonical URL, og:url, sitemap.xml and robots.txt. The guard asks whether the three still agree. Why this was needed: publishing was `npm run docker:push` with the bump as a separate thing to remember, and it was not remembered. package.json said 0.8.3 while four commits announced "batch 0.9.0" through "0.9.3", and NO image was ever published for any of them — the registry's newest tag is v0.8.3. No prune. The original has one; this project has published thirteen tags in its life, deleting a published image is irreversible, and the one that matters is whichever the container was created from — exactly what a newest-N rule gets wrong. scripts/deploy.sh — deploy, and do not build. The template's deploy.py builds, pushes AND deploys; adopting it beside release.sh would mean two commands that both build, a second image for the same code, and two answers to "what is running". This does only the missing half: point stack 58 at an already published tag, having taken a verified backup first. Its most important guard is not the obvious one. Portainer treats a stack PUT as the whole desired state, so sending it without the stack's Env array would strip twelve variables — the reCAPTCHA secret and the Zoho form tokens among them — and the container would come back HEALTHY while quietly capturing no leads. It reads them, counts them, sends them back, and refuses outright if none. Guards proven to refuse, not assumed: already-published tag, http origin, trailing-slash origin, the three origin constants drifted, dirty tree, bad flag, unpublished deploy tag, missing Portainer key, wrong stack id. One real bug found and fixed while testing: the image-line rewrite used `python3 -` with a heredoc while also piping the stack file to stdin, so python tried to execute the YAML. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 02:49:03 -05:00
2026-08-18: both served byte-identical bundle filenames — index-pTFwovIx.js at
the time, named without backticks because it is a build artefact whose hash
changes with every build and never a path in this repository — and both answer
`/api/health` with this server's exact `{"status":"ok","db":"ok"}` shape.
fix(infra): queuenorth.com is the production origin, and it is this deployment _null confirmed queuenorth.com as the permanent public origin, which settles #212 and exposed a wrong claim written earlier the same day. docs/OPERATIONS.md said queuenorth.com "is not this deployment ... do not diagnose against it". That came from a DNS lookup and an assumption. It is this deployment: both hostnames serve the identical bundle and this server's own /api/health shape, 24.41.108.95 is this network's own public IP, and both reach qn-website-dev on nebula — queuenorth.com through nginx-proxy-manager on thor/exodus, qn.isnull.dev through Cloudflare. Two front doors, one container, no non-production environment. That is the worst direction for a runbook to be wrong in, so the correction quotes the wrong sentence rather than replacing it silently. The QA Round 0 table likewise gained the production observations as extra rows instead of having its originals rewritten. Dockerfile: the CORS_ORIGIN fallback was '*'. The server sets credentials:true and browsers reject '*' with credentials outright, so that fallback would have broken every form rather than over-permitting. Now the real origin. healthcheck.sh and preflight.sh now watch production by default, with the second front door reachable through their env overrides — the two ingresses terminate TLS in different places and can rot independently. Also fills a gap adoption left explicitly undone: the deploy path is a Portainer stack, id 58 on nebula, found from the container's own compose labels. OPERATIONS.md documents it, including that the stack file is a separate copy from this repository's docker-compose.yml and the two have already drifted. That drift is all that remains of #212 — one trailing slash on line 21 of the stack file. Left in place: nothing is broken today, and fixing it recreates the container and takes both front doors down together. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 02:08:12 -05:00
```text
queuenorth.com ──► 24.41.108.95 (this network's own public IP)
└─► nginx-proxy-manager on thor/exodus (192.168.1.14)
└─┐
├──► qn-website-dev on nebula (192.168.1.11:3001)
qn.isnull.dev ──► Cloudflare ─┘
```
`www.queuenorth.com` 301s to the apex. Both origins carry HSTS and redirect
plain HTTP.
**This matters during an incident in two directions.** If only one hostname is
failing it is the ingress, not the app — compare the two before touching the
container. And if you restart that container you are restarting *production*,
not a dev alias, whatever the `-dev` in its name and its `:dev` image tag
suggest.
> **An earlier version of this document said the opposite** — that
> `queuenorth.com` "is not this deployment ... do not diagnose against it". That
> was written on 2026-08-18 from a DNS lookup and an assumption, and it was
> wrong. It is corrected here rather than quietly, because a runbook that sends
> somebody away from the failing host is worse than one that says nothing.
**There is no non-production environment.** These are two doors to the same
room. `npm run docker:test` runs the image locally, which is the closest thing
that exists.
docs: adopt project template, retire the markdown backlog This repository is the one the template's README describes: 205 issues, zero milestones, and severity labels spelled "P0 Critical" / "P1 High" / "P2 Medium", which privacyllc.dev reports as NOT ADOPTED rather than as 87% complete. Six markdown records described the same work and none pointed at the tracker. Two of them said the project was in "Phase 5" while the code was at 0.9.3. Migrated, then deleted in this commit: FUTURE.md -> docs/history/BATCH_LEDGER.md (Archived). Its open items were all already filed as issues, so nothing needed migrating into the tracker HISTORY.md -> docs/history/DEVELOPMENT_LOG.md, verbatim, 0 lines lost DEVELOPMENT_LOG.md -> the same file, as a second labelled block. Not interleaved: the changelog has three duplicated version headings, so one date order would have implied more than the record supports PROJECT.md -> docs/planning/PROJECT_PLAN.md STRUCTURE.md -> the agent pipeline into README.md; its versioning rules retired BUILD_SUMMARY.md -> BATCH_LEDGER.md. Its embedded SQL schema deliberately NOT carried: it predated the UNIQUE constraint on leads.email, and server/index.js owns the schema SCRIPTS.md -> docs/TOOLS.md, corrected for the SSR + prerender build Moved with history (git detects all four as renames): OVERHAUL_PLAN.md, review.md, project-requirements.md, docs/zoho-setup.md Kept because this project earned them: the five-agent pipeline, the design system in OVERHAUL_PLAN.md (Status: Current, with a front-note saying which half is history), the positioning argument in REDESIGN_REVIEW.md, and REQUIREMENTS.md whole, including its change policy. Deleted from the template because they do not apply, each said out loud in DOC_TRUST_MAP.md: QA pass I (no money moves), the authorisation checklist group and the session-token row (no accounts, no sessions), and one PRECAUTIONARY paragraph in SECURITY.md about holding credentials on behalf of users — there are none, and PROJECT_PLAN.md records accounts as out of scope. Pass H was kept and rewritten: its authorisation half does not apply, its what-a-stranger-can- reach half is the most exposed surface here. Also removed: main.js, the old static site's hash router, referenced by nothing and preserved in .drop/; and test-results/.last-run.json, a May Playwright artifact reading {"status":"failed"} for a suite that does not exist. The repository was made private on Forgejo before this commit. That is what let the internal history be committed rather than exempted — null/fruit-fall is already private and reports normally. Two defects found on the way in and fixed here: zoho-setup.md told admins to edit `server/zoho/`, a directory that has never existed in any commit (the mapping is in server/index.js), and README.md's route list still advertised /8x8, removed at 0.6.6, while omitting /privacy-policy. Branding: icon.webp and logo.webp converted from this project's own marks in assets/. banner.webp is absent and is filed as an issue rather than faked. Verified: verify.sh 3/3, doc-claims 71 claimed paths all present, backup and a first-ever restore of the live leads database (2 tables, 3 rows, under 1s). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 01:19:02 -05:00
## Where errors go
**Nowhere. This project has no error tracking.**
Said in one line rather than left blank, because a gap somebody chose is a
different thing from a gap nobody noticed. There is no Sentry project, no DSN and
no alert destination. An unhandled exception is logged to the container's stdout
and takes the process down: `server/index.js` handles `uncaughtException` and
`unhandledRejection` by logging and exiting 1, and Docker's `restart:
unless-stopped` brings it back. **That means a crash loop looks like a running
service to anything that only reads a state.** `scripts/status.sh` reports the
restart count for exactly this reason.
**A liveness tick is not error tracking.** `scripts/healthcheck.sh` answers *is
it up*. Nothing here answers *is it working* — a server returning 500 to every
form submission is up, healthy, and losing every lead.
## What alerts, and to whom
| Signal | Where it goes | Who acts on it |
| --- | --- | --- |
| Container `HEALTHCHECK` fails 3× at 30 s | Docker marks the container unhealthy on nebula | **Nobody, automatically.** It is visible to anyone who looks and notifies no one |
| `scripts/healthcheck.sh` | whoever runs it | not scheduled |
| Everything else | — | — |
**This table is nearly empty and that is the honest state.** Nothing on this
project pages anybody. The site could be down for a day and the first report
would come from the customer.
Two things would change that and neither is filed as work yet: scheduling
`healthcheck.sh` somewhere that can shout, and giving the process somewhere to
send an exception. Recorded here rather than invented into the tracker.
## Backups
| | |
| --- | --- |
| Schedule | **None yet.** `scripts/backup.sh` works and nothing runs it on a timer |
| What is captured | `/app/db/queuenorth.db` — the `leads` and `support_requests` tables. Deliberately not captured: the logs volume, and the environment, which holds the secrets |
| Where it lands | `$HOME/backups/queue-north-website` on the operator's machine, mode 700. **Still one machine** — see below |
| Retention | `BACKUP_KEEP`, default 7 |
| **Last verified restore** | **2026-08-18, by `_null` — 2 tables, 3 rows, restored in under 1 s** |
`scripts/backup.sh` proves a dump is readable before trusting it — it runs
better-sqlite3's online `.backup()` inside the container, copies the result out,
and refuses the run unless `PRAGMA integrity_check` returns `ok` and the table
count is plausible, only then renaming it into place. `scripts/restore-check.sh`
proves it can be restored, which is a different claim: a file that parses is not
a database you can get back.
**A backup nobody has restored is a guess.** The date above is the only line in
this table that says otherwise, and as of 2026-08-18 it says something: a
snapshot was taken from the running container, replayed into a scratch database
from SQL, and counted. It came back.
**Two things that are still true anyway**, and both are tracked in `Batch 15`:
1. **Nothing runs on a schedule.** One backup taken by hand is not a backup
regime. Until a timer exists, the newest dump is as old as the last time
somebody remembered.
2. **The dump lives on one machine, beside nothing.** `backup.sh` says this
itself on every run: *a backup that only exists beside the database it came
from does not survive the disk, the host or the account.* It is currently on
the operator's workstation and nowhere else.
The exposure is worth stating plainly: `/app/db/queuenorth.db` is the only live
copy of every lead and support request the site has ever taken, it lives in one
Docker volume on one host, and it took writes today.
**A number worth knowing before you need it:** the restore took under a second,
because the database is 28 KB and holds three leads. That will stay true for a
long time at this volume — this is a contact form, not a transactional system —
so during an incident, restoring is cheap and there is no reason to hesitate over
it.
`RESTORE_MIN_ROWS` is currently 0, which means the check cannot yet catch the
snapshot-of-an-empty-volume case. Set it to something below the real lead count
once that count is meaningful, and it starts catching the one failure a
structural check never can.
## Rate limits and cost ceilings
*(precautionary — no incident here has yet come from this.)*
| Endpoint or job | What it costs per call | What bounds it |
| --- | --- | --- |
| `POST /api/leads` | one SQLite insert, one reCAPTCHA verify, one Zoho form post | `RATE_LIMIT_PER_MINUTE`, default 5, per IP across all of `/api`. Body capped at 1 MB, request at 30 s |
| `POST /api/support` | the same, plus a Zoho Case when enabled | same limiter |
| Google reCAPTCHA | free at this volume | the same limiter, upstream of it |
| Zoho CRM | free at this volume; the API path has per-org daily credits | fire-and-forget, so exhausting them degrades CRM sync and never the site |
**Where does the spend alert go, and at what number?** Nowhere, and there is no
number. Nothing here bills per call at this volume, which is why that is
tolerable rather than an oversight — but if an LLM, a mail sender or a paid API
is ever added, this table is the first thing that has to change.
## It is down — what now
In this order. Each step is a command that answers one question, and none of them
change anything.
1. **Is it actually down, or unreachable from here?**
`bash scripts/healthcheck.sh` from anywhere, then
`bash scripts/status.sh`. The second distinguishes those two and reports the
restart count. **A climbing restart count with a short uptime is a crash loop**,
not a healthy service, and reads as "running" in every tool that shows only a
state.
2. **What is it saying?** `bash scripts/status.sh --logs 200`.
3. **Is the deployed version the one you think?**
docs: adopt project template, retire the markdown backlog This repository is the one the template's README describes: 205 issues, zero milestones, and severity labels spelled "P0 Critical" / "P1 High" / "P2 Medium", which privacyllc.dev reports as NOT ADOPTED rather than as 87% complete. Six markdown records described the same work and none pointed at the tracker. Two of them said the project was in "Phase 5" while the code was at 0.9.3. Migrated, then deleted in this commit: FUTURE.md -> docs/history/BATCH_LEDGER.md (Archived). Its open items were all already filed as issues, so nothing needed migrating into the tracker HISTORY.md -> docs/history/DEVELOPMENT_LOG.md, verbatim, 0 lines lost DEVELOPMENT_LOG.md -> the same file, as a second labelled block. Not interleaved: the changelog has three duplicated version headings, so one date order would have implied more than the record supports PROJECT.md -> docs/planning/PROJECT_PLAN.md STRUCTURE.md -> the agent pipeline into README.md; its versioning rules retired BUILD_SUMMARY.md -> BATCH_LEDGER.md. Its embedded SQL schema deliberately NOT carried: it predated the UNIQUE constraint on leads.email, and server/index.js owns the schema SCRIPTS.md -> docs/TOOLS.md, corrected for the SSR + prerender build Moved with history (git detects all four as renames): OVERHAUL_PLAN.md, review.md, project-requirements.md, docs/zoho-setup.md Kept because this project earned them: the five-agent pipeline, the design system in OVERHAUL_PLAN.md (Status: Current, with a front-note saying which half is history), the positioning argument in REDESIGN_REVIEW.md, and REQUIREMENTS.md whole, including its change policy. Deleted from the template because they do not apply, each said out loud in DOC_TRUST_MAP.md: QA pass I (no money moves), the authorisation checklist group and the session-token row (no accounts, no sessions), and one PRECAUTIONARY paragraph in SECURITY.md about holding credentials on behalf of users — there are none, and PROJECT_PLAN.md records accounts as out of scope. Pass H was kept and rewritten: its authorisation half does not apply, its what-a-stranger-can- reach half is the most exposed surface here. Also removed: main.js, the old static site's hash router, referenced by nothing and preserved in .drop/; and test-results/.last-run.json, a May Playwright artifact reading {"status":"failed"} for a suite that does not exist. The repository was made private on Forgejo before this commit. That is what let the internal history be committed rather than exempted — null/fruit-fall is already private and reports normally. Two defects found on the way in and fixed here: zoho-setup.md told admins to edit `server/zoho/`, a directory that has never existed in any commit (the mapping is in server/index.js), and README.md's route list still advertised /8x8, removed at 0.6.6, while omitting /privacy-policy. Branding: icon.webp and logo.webp converted from this project's own marks in assets/. banner.webp is absent and is filed as an issue rather than faked. Verified: verify.sh 3/3, doc-claims 71 claimed paths all present, backup and a first-ever restore of the live leads database (2 tables, 3 rows, under 1s). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 01:19:02 -05:00
```bash
bash scripts/status.sh --deployed-version
docs: adopt project template, retire the markdown backlog This repository is the one the template's README describes: 205 issues, zero milestones, and severity labels spelled "P0 Critical" / "P1 High" / "P2 Medium", which privacyllc.dev reports as NOT ADOPTED rather than as 87% complete. Six markdown records described the same work and none pointed at the tracker. Two of them said the project was in "Phase 5" while the code was at 0.9.3. Migrated, then deleted in this commit: FUTURE.md -> docs/history/BATCH_LEDGER.md (Archived). Its open items were all already filed as issues, so nothing needed migrating into the tracker HISTORY.md -> docs/history/DEVELOPMENT_LOG.md, verbatim, 0 lines lost DEVELOPMENT_LOG.md -> the same file, as a second labelled block. Not interleaved: the changelog has three duplicated version headings, so one date order would have implied more than the record supports PROJECT.md -> docs/planning/PROJECT_PLAN.md STRUCTURE.md -> the agent pipeline into README.md; its versioning rules retired BUILD_SUMMARY.md -> BATCH_LEDGER.md. Its embedded SQL schema deliberately NOT carried: it predated the UNIQUE constraint on leads.email, and server/index.js owns the schema SCRIPTS.md -> docs/TOOLS.md, corrected for the SSR + prerender build Moved with history (git detects all four as renames): OVERHAUL_PLAN.md, review.md, project-requirements.md, docs/zoho-setup.md Kept because this project earned them: the five-agent pipeline, the design system in OVERHAUL_PLAN.md (Status: Current, with a front-note saying which half is history), the positioning argument in REDESIGN_REVIEW.md, and REQUIREMENTS.md whole, including its change policy. Deleted from the template because they do not apply, each said out loud in DOC_TRUST_MAP.md: QA pass I (no money moves), the authorisation checklist group and the session-token row (no accounts, no sessions), and one PRECAUTIONARY paragraph in SECURITY.md about holding credentials on behalf of users — there are none, and PROJECT_PLAN.md records accounts as out of scope. Pass H was kept and rewritten: its authorisation half does not apply, its what-a-stranger-can- reach half is the most exposed surface here. Also removed: main.js, the old static site's hash router, referenced by nothing and preserved in .drop/; and test-results/.last-run.json, a May Playwright artifact reading {"status":"failed"} for a suite that does not exist. The repository was made private on Forgejo before this commit. That is what let the internal history be committed rather than exempted — null/fruit-fall is already private and reports normally. Two defects found on the way in and fixed here: zoho-setup.md told admins to edit `server/zoho/`, a directory that has never existed in any commit (the mapping is in server/index.js), and README.md's route list still advertised /8x8, removed at 0.6.6, while omitting /privacy-policy. Branding: icon.webp and logo.webp converted from this project's own marks in assets/. banner.webp is absent and is filed as an issue rather than faked. Verified: verify.sh 3/3, doc-claims 71 claimed paths all present, backup and a first-ever restore of the live leads database (2 tables, 3 rows, under 1s). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 01:19:02 -05:00
bash scripts/status.sh | grep digest
```
**The image running today carries no `org.opencontainers.image.version`
label**, so the first command correctly reports the version as unknown rather
than guessing, and the digest is the only way to tell one deploy from
another. The label was added to the `Dockerfile` on 2026-08-18 and takes
effect on the next build — until an image built after that date is deployed,
use the digest.
Non-zero from `--deployed-version` means it could not be read at all. Stop
there rather than assuming.
docs: adopt project template, retire the markdown backlog This repository is the one the template's README describes: 205 issues, zero milestones, and severity labels spelled "P0 Critical" / "P1 High" / "P2 Medium", which privacyllc.dev reports as NOT ADOPTED rather than as 87% complete. Six markdown records described the same work and none pointed at the tracker. Two of them said the project was in "Phase 5" while the code was at 0.9.3. Migrated, then deleted in this commit: FUTURE.md -> docs/history/BATCH_LEDGER.md (Archived). Its open items were all already filed as issues, so nothing needed migrating into the tracker HISTORY.md -> docs/history/DEVELOPMENT_LOG.md, verbatim, 0 lines lost DEVELOPMENT_LOG.md -> the same file, as a second labelled block. Not interleaved: the changelog has three duplicated version headings, so one date order would have implied more than the record supports PROJECT.md -> docs/planning/PROJECT_PLAN.md STRUCTURE.md -> the agent pipeline into README.md; its versioning rules retired BUILD_SUMMARY.md -> BATCH_LEDGER.md. Its embedded SQL schema deliberately NOT carried: it predated the UNIQUE constraint on leads.email, and server/index.js owns the schema SCRIPTS.md -> docs/TOOLS.md, corrected for the SSR + prerender build Moved with history (git detects all four as renames): OVERHAUL_PLAN.md, review.md, project-requirements.md, docs/zoho-setup.md Kept because this project earned them: the five-agent pipeline, the design system in OVERHAUL_PLAN.md (Status: Current, with a front-note saying which half is history), the positioning argument in REDESIGN_REVIEW.md, and REQUIREMENTS.md whole, including its change policy. Deleted from the template because they do not apply, each said out loud in DOC_TRUST_MAP.md: QA pass I (no money moves), the authorisation checklist group and the session-token row (no accounts, no sessions), and one PRECAUTIONARY paragraph in SECURITY.md about holding credentials on behalf of users — there are none, and PROJECT_PLAN.md records accounts as out of scope. Pass H was kept and rewritten: its authorisation half does not apply, its what-a-stranger-can- reach half is the most exposed surface here. Also removed: main.js, the old static site's hash router, referenced by nothing and preserved in .drop/; and test-results/.last-run.json, a May Playwright artifact reading {"status":"failed"} for a suite that does not exist. The repository was made private on Forgejo before this commit. That is what let the internal history be committed rather than exempted — null/fruit-fall is already private and reports normally. Two defects found on the way in and fixed here: zoho-setup.md told admins to edit `server/zoho/`, a directory that has never existed in any commit (the mapping is in server/index.js), and README.md's route list still advertised /8x8, removed at 0.6.6, while omitting /privacy-policy. Branding: icon.webp and logo.webp converted from this project's own marks in assets/. banner.webp is absent and is filed as an issue rather than faked. Verified: verify.sh 3/3, doc-claims 71 claimed paths all present, backup and a first-ever restore of the live leads database (2 tables, 3 rows, under 1s). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 01:19:02 -05:00
4. **Is it the database?** `/api/health` returns 503 with `db: error` when the
`SELECT 1` fails. That is a real answer and not an outage of the whole site:
the marketing pages keep serving while every form submission is failing.
5. **Did something change recently?** The tracker and `git log` — a deploy, a
config edit, a Cloudflare rule.
fix(infra): queuenorth.com is the production origin, and it is this deployment _null confirmed queuenorth.com as the permanent public origin, which settles #212 and exposed a wrong claim written earlier the same day. docs/OPERATIONS.md said queuenorth.com "is not this deployment ... do not diagnose against it". That came from a DNS lookup and an assumption. It is this deployment: both hostnames serve the identical bundle and this server's own /api/health shape, 24.41.108.95 is this network's own public IP, and both reach qn-website-dev on nebula — queuenorth.com through nginx-proxy-manager on thor/exodus, qn.isnull.dev through Cloudflare. Two front doors, one container, no non-production environment. That is the worst direction for a runbook to be wrong in, so the correction quotes the wrong sentence rather than replacing it silently. The QA Round 0 table likewise gained the production observations as extra rows instead of having its originals rewritten. Dockerfile: the CORS_ORIGIN fallback was '*'. The server sets credentials:true and browsers reject '*' with credentials outright, so that fallback would have broken every form rather than over-permitting. Now the real origin. healthcheck.sh and preflight.sh now watch production by default, with the second front door reachable through their env overrides — the two ingresses terminate TLS in different places and can rot independently. Also fills a gap adoption left explicitly undone: the deploy path is a Portainer stack, id 58 on nebula, found from the container's own compose labels. OPERATIONS.md documents it, including that the stack file is a separate copy from this repository's docker-compose.yml and the two have already drifted. That drift is all that remains of #212 — one trailing slash on line 21 of the stack file. Left in place: nothing is broken today, and fixing it recreates the container and takes both front doors down together. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 02:08:12 -05:00
6. **Is it the ingress rather than the app?** The two front doors take
completely different paths — `queuenorth.com` through nginx-proxy-manager on
thor/exodus, `qn.isnull.dev` through Cloudflare. If one answers and the other
does not, the container is fine and the problem is in front of it:
```bash
curl -s https://queuenorth.com/api/health
curl -s https://qn.isnull.dev/api/health
```
Both failing while `scripts/status.sh` says healthy points at the LAN path or
the host itself.
docs: adopt project template, retire the markdown backlog This repository is the one the template's README describes: 205 issues, zero milestones, and severity labels spelled "P0 Critical" / "P1 High" / "P2 Medium", which privacyllc.dev reports as NOT ADOPTED rather than as 87% complete. Six markdown records described the same work and none pointed at the tracker. Two of them said the project was in "Phase 5" while the code was at 0.9.3. Migrated, then deleted in this commit: FUTURE.md -> docs/history/BATCH_LEDGER.md (Archived). Its open items were all already filed as issues, so nothing needed migrating into the tracker HISTORY.md -> docs/history/DEVELOPMENT_LOG.md, verbatim, 0 lines lost DEVELOPMENT_LOG.md -> the same file, as a second labelled block. Not interleaved: the changelog has three duplicated version headings, so one date order would have implied more than the record supports PROJECT.md -> docs/planning/PROJECT_PLAN.md STRUCTURE.md -> the agent pipeline into README.md; its versioning rules retired BUILD_SUMMARY.md -> BATCH_LEDGER.md. Its embedded SQL schema deliberately NOT carried: it predated the UNIQUE constraint on leads.email, and server/index.js owns the schema SCRIPTS.md -> docs/TOOLS.md, corrected for the SSR + prerender build Moved with history (git detects all four as renames): OVERHAUL_PLAN.md, review.md, project-requirements.md, docs/zoho-setup.md Kept because this project earned them: the five-agent pipeline, the design system in OVERHAUL_PLAN.md (Status: Current, with a front-note saying which half is history), the positioning argument in REDESIGN_REVIEW.md, and REQUIREMENTS.md whole, including its change policy. Deleted from the template because they do not apply, each said out loud in DOC_TRUST_MAP.md: QA pass I (no money moves), the authorisation checklist group and the session-token row (no accounts, no sessions), and one PRECAUTIONARY paragraph in SECURITY.md about holding credentials on behalf of users — there are none, and PROJECT_PLAN.md records accounts as out of scope. Pass H was kept and rewritten: its authorisation half does not apply, its what-a-stranger-can- reach half is the most exposed surface here. Also removed: main.js, the old static site's hash router, referenced by nothing and preserved in .drop/; and test-results/.last-run.json, a May Playwright artifact reading {"status":"failed"} for a suite that does not exist. The repository was made private on Forgejo before this commit. That is what let the internal history be committed rather than exempted — null/fruit-fall is already private and reports normally. Two defects found on the way in and fixed here: zoho-setup.md told admins to edit `server/zoho/`, a directory that has never existed in any commit (the mapping is in server/index.js), and README.md's route list still advertised /8x8, removed at 0.6.6, while omitting /privacy-policy. Branding: icon.webp and logo.webp converted from this project's own marks in assets/. banner.webp is absent and is filed as an issue rather than faked. Verified: verify.sh 3/3, doc-claims 71 claimed paths all present, backup and a first-ever restore of the live leads database (2 tables, 3 rows, under 1s). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 01:19:02 -05:00
feat(release): adapt PrivacyLLC-Web's release.sh, and add the deploy half it deliberately omits scripts/release.sh — publish. Bump, guards, build, verify the image's own version label, push :vX.Y.Z and move :dev, commit last, tag. Adapted, not copied. The arguments are PrivacyLLC's and were paid for there; the mechanism is this project's, because almost none of it transferred. Three differences, each a fact about this repository rather than a preference: - It gates on verify.sh, not a test suite, because there is not one. The original refuses to release on a half-run 1,600-test run. This one says out loud that a build, a secret scan and a doc-header check are not tests and that nothing in the gate touched a route, a form or an API response. - It moves :dev as well as publishing :vX.Y.Z, because Portainer stack 58 follows :dev. That makes :dev a pointer and never evidence. - It checks the public origin in three files, not one. The original passes its origin in as a build arg; here https://queuenorth.com is written out in src/lib/seo.js, src/components/SEO.jsx and scripts/prerender.js and is baked into every canonical URL, og:url, sitemap.xml and robots.txt. The guard asks whether the three still agree. Why this was needed: publishing was `npm run docker:push` with the bump as a separate thing to remember, and it was not remembered. package.json said 0.8.3 while four commits announced "batch 0.9.0" through "0.9.3", and NO image was ever published for any of them — the registry's newest tag is v0.8.3. No prune. The original has one; this project has published thirteen tags in its life, deleting a published image is irreversible, and the one that matters is whichever the container was created from — exactly what a newest-N rule gets wrong. scripts/deploy.sh — deploy, and do not build. The template's deploy.py builds, pushes AND deploys; adopting it beside release.sh would mean two commands that both build, a second image for the same code, and two answers to "what is running". This does only the missing half: point stack 58 at an already published tag, having taken a verified backup first. Its most important guard is not the obvious one. Portainer treats a stack PUT as the whole desired state, so sending it without the stack's Env array would strip twelve variables — the reCAPTCHA secret and the Zoho form tokens among them — and the container would come back HEALTHY while quietly capturing no leads. It reads them, counts them, sends them back, and refuses outright if none. Guards proven to refuse, not assumed: already-published tag, http origin, trailing-slash origin, the three origin constants drifted, dirty tree, bad flag, unpublished deploy tag, missing Portainer key, wrong stack id. One real bug found and fixed while testing: the image-line rewrite used `python3 -` with a heredoc while also piping the stack file to stdin, so python tried to execute the YAML. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 02:49:03 -05:00
### Releasing and deploying — two commands, deliberately
docs: adopt project template, retire the markdown backlog This repository is the one the template's README describes: 205 issues, zero milestones, and severity labels spelled "P0 Critical" / "P1 High" / "P2 Medium", which privacyllc.dev reports as NOT ADOPTED rather than as 87% complete. Six markdown records described the same work and none pointed at the tracker. Two of them said the project was in "Phase 5" while the code was at 0.9.3. Migrated, then deleted in this commit: FUTURE.md -> docs/history/BATCH_LEDGER.md (Archived). Its open items were all already filed as issues, so nothing needed migrating into the tracker HISTORY.md -> docs/history/DEVELOPMENT_LOG.md, verbatim, 0 lines lost DEVELOPMENT_LOG.md -> the same file, as a second labelled block. Not interleaved: the changelog has three duplicated version headings, so one date order would have implied more than the record supports PROJECT.md -> docs/planning/PROJECT_PLAN.md STRUCTURE.md -> the agent pipeline into README.md; its versioning rules retired BUILD_SUMMARY.md -> BATCH_LEDGER.md. Its embedded SQL schema deliberately NOT carried: it predated the UNIQUE constraint on leads.email, and server/index.js owns the schema SCRIPTS.md -> docs/TOOLS.md, corrected for the SSR + prerender build Moved with history (git detects all four as renames): OVERHAUL_PLAN.md, review.md, project-requirements.md, docs/zoho-setup.md Kept because this project earned them: the five-agent pipeline, the design system in OVERHAUL_PLAN.md (Status: Current, with a front-note saying which half is history), the positioning argument in REDESIGN_REVIEW.md, and REQUIREMENTS.md whole, including its change policy. Deleted from the template because they do not apply, each said out loud in DOC_TRUST_MAP.md: QA pass I (no money moves), the authorisation checklist group and the session-token row (no accounts, no sessions), and one PRECAUTIONARY paragraph in SECURITY.md about holding credentials on behalf of users — there are none, and PROJECT_PLAN.md records accounts as out of scope. Pass H was kept and rewritten: its authorisation half does not apply, its what-a-stranger-can- reach half is the most exposed surface here. Also removed: main.js, the old static site's hash router, referenced by nothing and preserved in .drop/; and test-results/.last-run.json, a May Playwright artifact reading {"status":"failed"} for a suite that does not exist. The repository was made private on Forgejo before this commit. That is what let the internal history be committed rather than exempted — null/fruit-fall is already private and reports normally. Two defects found on the way in and fixed here: zoho-setup.md told admins to edit `server/zoho/`, a directory that has never existed in any commit (the mapping is in server/index.js), and README.md's route list still advertised /8x8, removed at 0.6.6, while omitting /privacy-policy. Branding: icon.webp and logo.webp converted from this project's own marks in assets/. banner.webp is absent and is filed as an issue rather than faked. Verified: verify.sh 3/3, doc-claims 71 claimed paths all present, backup and a first-ever restore of the live leads database (2 tables, 3 rows, under 1s). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 01:19:02 -05:00
feat(release): adapt PrivacyLLC-Web's release.sh, and add the deploy half it deliberately omits scripts/release.sh — publish. Bump, guards, build, verify the image's own version label, push :vX.Y.Z and move :dev, commit last, tag. Adapted, not copied. The arguments are PrivacyLLC's and were paid for there; the mechanism is this project's, because almost none of it transferred. Three differences, each a fact about this repository rather than a preference: - It gates on verify.sh, not a test suite, because there is not one. The original refuses to release on a half-run 1,600-test run. This one says out loud that a build, a secret scan and a doc-header check are not tests and that nothing in the gate touched a route, a form or an API response. - It moves :dev as well as publishing :vX.Y.Z, because Portainer stack 58 follows :dev. That makes :dev a pointer and never evidence. - It checks the public origin in three files, not one. The original passes its origin in as a build arg; here https://queuenorth.com is written out in src/lib/seo.js, src/components/SEO.jsx and scripts/prerender.js and is baked into every canonical URL, og:url, sitemap.xml and robots.txt. The guard asks whether the three still agree. Why this was needed: publishing was `npm run docker:push` with the bump as a separate thing to remember, and it was not remembered. package.json said 0.8.3 while four commits announced "batch 0.9.0" through "0.9.3", and NO image was ever published for any of them — the registry's newest tag is v0.8.3. No prune. The original has one; this project has published thirteen tags in its life, deleting a published image is irreversible, and the one that matters is whichever the container was created from — exactly what a newest-N rule gets wrong. scripts/deploy.sh — deploy, and do not build. The template's deploy.py builds, pushes AND deploys; adopting it beside release.sh would mean two commands that both build, a second image for the same code, and two answers to "what is running". This does only the missing half: point stack 58 at an already published tag, having taken a verified backup first. Its most important guard is not the obvious one. Portainer treats a stack PUT as the whole desired state, so sending it without the stack's Env array would strip twelve variables — the reCAPTCHA secret and the Zoho form tokens among them — and the container would come back HEALTHY while quietly capturing no leads. It reads them, counts them, sends them back, and refuses outright if none. Guards proven to refuse, not assumed: already-published tag, http origin, trailing-slash origin, the three origin constants drifted, dirty tree, bad flag, unpublished deploy tag, missing Portainer key, wrong stack id. One real bug found and fixed while testing: the image-line rewrite used `python3 -` with a heredoc while also piping the stack file to stdin, so python tried to execute the YAML. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 02:49:03 -05:00
**Publishing an image and running it are separate decisions.** Nothing about a
published image affects the site until a deploy moves the stack to it.
fix(infra): queuenorth.com is the production origin, and it is this deployment _null confirmed queuenorth.com as the permanent public origin, which settles #212 and exposed a wrong claim written earlier the same day. docs/OPERATIONS.md said queuenorth.com "is not this deployment ... do not diagnose against it". That came from a DNS lookup and an assumption. It is this deployment: both hostnames serve the identical bundle and this server's own /api/health shape, 24.41.108.95 is this network's own public IP, and both reach qn-website-dev on nebula — queuenorth.com through nginx-proxy-manager on thor/exodus, qn.isnull.dev through Cloudflare. Two front doors, one container, no non-production environment. That is the worst direction for a runbook to be wrong in, so the correction quotes the wrong sentence rather than replacing it silently. The QA Round 0 table likewise gained the production observations as extra rows instead of having its originals rewritten. Dockerfile: the CORS_ORIGIN fallback was '*'. The server sets credentials:true and browsers reject '*' with credentials outright, so that fallback would have broken every form rather than over-permitting. Now the real origin. healthcheck.sh and preflight.sh now watch production by default, with the second front door reachable through their env overrides — the two ingresses terminate TLS in different places and can rot independently. Also fills a gap adoption left explicitly undone: the deploy path is a Portainer stack, id 58 on nebula, found from the container's own compose labels. OPERATIONS.md documents it, including that the stack file is a separate copy from this repository's docker-compose.yml and the two have already drifted. That drift is all that remains of #212 — one trailing slash on line 21 of the stack file. Left in place: nothing is broken today, and fixing it recreates the container and takes both front doors down together. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 02:08:12 -05:00
feat(release): adapt PrivacyLLC-Web's release.sh, and add the deploy half it deliberately omits scripts/release.sh — publish. Bump, guards, build, verify the image's own version label, push :vX.Y.Z and move :dev, commit last, tag. Adapted, not copied. The arguments are PrivacyLLC's and were paid for there; the mechanism is this project's, because almost none of it transferred. Three differences, each a fact about this repository rather than a preference: - It gates on verify.sh, not a test suite, because there is not one. The original refuses to release on a half-run 1,600-test run. This one says out loud that a build, a secret scan and a doc-header check are not tests and that nothing in the gate touched a route, a form or an API response. - It moves :dev as well as publishing :vX.Y.Z, because Portainer stack 58 follows :dev. That makes :dev a pointer and never evidence. - It checks the public origin in three files, not one. The original passes its origin in as a build arg; here https://queuenorth.com is written out in src/lib/seo.js, src/components/SEO.jsx and scripts/prerender.js and is baked into every canonical URL, og:url, sitemap.xml and robots.txt. The guard asks whether the three still agree. Why this was needed: publishing was `npm run docker:push` with the bump as a separate thing to remember, and it was not remembered. package.json said 0.8.3 while four commits announced "batch 0.9.0" through "0.9.3", and NO image was ever published for any of them — the registry's newest tag is v0.8.3. No prune. The original has one; this project has published thirteen tags in its life, deleting a published image is irreversible, and the one that matters is whichever the container was created from — exactly what a newest-N rule gets wrong. scripts/deploy.sh — deploy, and do not build. The template's deploy.py builds, pushes AND deploys; adopting it beside release.sh would mean two commands that both build, a second image for the same code, and two answers to "what is running". This does only the missing half: point stack 58 at an already published tag, having taken a verified backup first. Its most important guard is not the obvious one. Portainer treats a stack PUT as the whole desired state, so sending it without the stack's Env array would strip twelve variables — the reCAPTCHA secret and the Zoho form tokens among them — and the container would come back HEALTHY while quietly capturing no leads. It reads them, counts them, sends them back, and refuses outright if none. Guards proven to refuse, not assumed: already-published tag, http origin, trailing-slash origin, the three origin constants drifted, dirty tree, bad flag, unpublished deploy tag, missing Portainer key, wrong stack id. One real bug found and fixed while testing: the image-line rewrite used `python3 -` with a heredoc while also piping the stack file to stdin, so python tried to execute the YAML. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 02:49:03 -05:00
```bash
npm run release # publish: patch bump, guards, build, push, tag
npm run deploy # deploy: move stack 58 to what :dev now points at
```
Both take `--dry-run`, and both refuse rather than guess. Run the dry runs first;
they print exactly what would change.
docs: adopt project template, retire the markdown backlog This repository is the one the template's README describes: 205 issues, zero milestones, and severity labels spelled "P0 Critical" / "P1 High" / "P2 Medium", which privacyllc.dev reports as NOT ADOPTED rather than as 87% complete. Six markdown records described the same work and none pointed at the tracker. Two of them said the project was in "Phase 5" while the code was at 0.9.3. Migrated, then deleted in this commit: FUTURE.md -> docs/history/BATCH_LEDGER.md (Archived). Its open items were all already filed as issues, so nothing needed migrating into the tracker HISTORY.md -> docs/history/DEVELOPMENT_LOG.md, verbatim, 0 lines lost DEVELOPMENT_LOG.md -> the same file, as a second labelled block. Not interleaved: the changelog has three duplicated version headings, so one date order would have implied more than the record supports PROJECT.md -> docs/planning/PROJECT_PLAN.md STRUCTURE.md -> the agent pipeline into README.md; its versioning rules retired BUILD_SUMMARY.md -> BATCH_LEDGER.md. Its embedded SQL schema deliberately NOT carried: it predated the UNIQUE constraint on leads.email, and server/index.js owns the schema SCRIPTS.md -> docs/TOOLS.md, corrected for the SSR + prerender build Moved with history (git detects all four as renames): OVERHAUL_PLAN.md, review.md, project-requirements.md, docs/zoho-setup.md Kept because this project earned them: the five-agent pipeline, the design system in OVERHAUL_PLAN.md (Status: Current, with a front-note saying which half is history), the positioning argument in REDESIGN_REVIEW.md, and REQUIREMENTS.md whole, including its change policy. Deleted from the template because they do not apply, each said out loud in DOC_TRUST_MAP.md: QA pass I (no money moves), the authorisation checklist group and the session-token row (no accounts, no sessions), and one PRECAUTIONARY paragraph in SECURITY.md about holding credentials on behalf of users — there are none, and PROJECT_PLAN.md records accounts as out of scope. Pass H was kept and rewritten: its authorisation half does not apply, its what-a-stranger-can- reach half is the most exposed surface here. Also removed: main.js, the old static site's hash router, referenced by nothing and preserved in .drop/; and test-results/.last-run.json, a May Playwright artifact reading {"status":"failed"} for a suite that does not exist. The repository was made private on Forgejo before this commit. That is what let the internal history be committed rather than exempted — null/fruit-fall is already private and reports normally. Two defects found on the way in and fixed here: zoho-setup.md told admins to edit `server/zoho/`, a directory that has never existed in any commit (the mapping is in server/index.js), and README.md's route list still advertised /8x8, removed at 0.6.6, while omitting /privacy-policy. Branding: icon.webp and logo.webp converted from this project's own marks in assets/. banner.webp is absent and is filed as an issue rather than faked. Verified: verify.sh 3/3, doc-claims 71 claimed paths all present, backup and a first-ever restore of the live leads database (2 tables, 3 rows, under 1s). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 01:19:02 -05:00
fix(infra): queuenorth.com is the production origin, and it is this deployment _null confirmed queuenorth.com as the permanent public origin, which settles #212 and exposed a wrong claim written earlier the same day. docs/OPERATIONS.md said queuenorth.com "is not this deployment ... do not diagnose against it". That came from a DNS lookup and an assumption. It is this deployment: both hostnames serve the identical bundle and this server's own /api/health shape, 24.41.108.95 is this network's own public IP, and both reach qn-website-dev on nebula — queuenorth.com through nginx-proxy-manager on thor/exodus, qn.isnull.dev through Cloudflare. Two front doors, one container, no non-production environment. That is the worst direction for a runbook to be wrong in, so the correction quotes the wrong sentence rather than replacing it silently. The QA Round 0 table likewise gained the production observations as extra rows instead of having its originals rewritten. Dockerfile: the CORS_ORIGIN fallback was '*'. The server sets credentials:true and browsers reject '*' with credentials outright, so that fallback would have broken every form rather than over-permitting. Now the real origin. healthcheck.sh and preflight.sh now watch production by default, with the second front door reachable through their env overrides — the two ingresses terminate TLS in different places and can rot independently. Also fills a gap adoption left explicitly undone: the deploy path is a Portainer stack, id 58 on nebula, found from the container's own compose labels. OPERATIONS.md documents it, including that the stack file is a separate copy from this repository's docker-compose.yml and the two have already drifted. That drift is all that remains of #212 — one trailing slash on line 21 of the stack file. Left in place: nothing is broken today, and fixing it recreates the container and takes both front doors down together. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 02:08:12 -05:00
| | |
| --- | --- |
| Portainer | `https://192.168.1.11:9443` (nebula), API key in `~/.openclaw/credentials/portainer.md` |
| Stack | **id 58**, name `qn-website-dev`, endpoint 3, compose |
| Stack file on disk | `/data/compose/58/docker-compose.yml` on nebula |
**The stack file is NOT this repository's `docker-compose.yml`.** They are two
feat(release): adapt PrivacyLLC-Web's release.sh, and add the deploy half it deliberately omits scripts/release.sh — publish. Bump, guards, build, verify the image's own version label, push :vX.Y.Z and move :dev, commit last, tag. Adapted, not copied. The arguments are PrivacyLLC's and were paid for there; the mechanism is this project's, because almost none of it transferred. Three differences, each a fact about this repository rather than a preference: - It gates on verify.sh, not a test suite, because there is not one. The original refuses to release on a half-run 1,600-test run. This one says out loud that a build, a secret scan and a doc-header check are not tests and that nothing in the gate touched a route, a form or an API response. - It moves :dev as well as publishing :vX.Y.Z, because Portainer stack 58 follows :dev. That makes :dev a pointer and never evidence. - It checks the public origin in three files, not one. The original passes its origin in as a build arg; here https://queuenorth.com is written out in src/lib/seo.js, src/components/SEO.jsx and scripts/prerender.js and is baked into every canonical URL, og:url, sitemap.xml and robots.txt. The guard asks whether the three still agree. Why this was needed: publishing was `npm run docker:push` with the bump as a separate thing to remember, and it was not remembered. package.json said 0.8.3 while four commits announced "batch 0.9.0" through "0.9.3", and NO image was ever published for any of them — the registry's newest tag is v0.8.3. No prune. The original has one; this project has published thirteen tags in its life, deleting a published image is irreversible, and the one that matters is whichever the container was created from — exactly what a newest-N rule gets wrong. scripts/deploy.sh — deploy, and do not build. The template's deploy.py builds, pushes AND deploys; adopting it beside release.sh would mean two commands that both build, a second image for the same code, and two answers to "what is running". This does only the missing half: point stack 58 at an already published tag, having taken a verified backup first. Its most important guard is not the obvious one. Portainer treats a stack PUT as the whole desired state, so sending it without the stack's Env array would strip twelve variables — the reCAPTCHA secret and the Zoho form tokens among them — and the container would come back HEALTHY while quietly capturing no leads. It reads them, counts them, sends them back, and refuses outright if none. Guards proven to refuse, not assumed: already-published tag, http origin, trailing-slash origin, the three origin constants drifted, dirty tree, bad flag, unpublished deploy tag, missing Portainer key, wrong stack id. One real bug found and fixed while testing: the image-line rewrite used `python3 -` with a heredoc while also piping the stack file to stdin, so python tried to execute the YAML. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 02:49:03 -05:00
separate files that happen to look alike, and they have already drifted — the
fix(infra): queuenorth.com is the production origin, and it is this deployment _null confirmed queuenorth.com as the permanent public origin, which settles #212 and exposed a wrong claim written earlier the same day. docs/OPERATIONS.md said queuenorth.com "is not this deployment ... do not diagnose against it". That came from a DNS lookup and an assumption. It is this deployment: both hostnames serve the identical bundle and this server's own /api/health shape, 24.41.108.95 is this network's own public IP, and both reach qn-website-dev on nebula — queuenorth.com through nginx-proxy-manager on thor/exodus, qn.isnull.dev through Cloudflare. Two front doors, one container, no non-production environment. That is the worst direction for a runbook to be wrong in, so the correction quotes the wrong sentence rather than replacing it silently. The QA Round 0 table likewise gained the production observations as extra rows instead of having its originals rewritten. Dockerfile: the CORS_ORIGIN fallback was '*'. The server sets credentials:true and browsers reject '*' with credentials outright, so that fallback would have broken every form rather than over-permitting. Now the real origin. healthcheck.sh and preflight.sh now watch production by default, with the second front door reachable through their env overrides — the two ingresses terminate TLS in different places and can rot independently. Also fills a gap adoption left explicitly undone: the deploy path is a Portainer stack, id 58 on nebula, found from the container's own compose labels. OPERATIONS.md documents it, including that the stack file is a separate copy from this repository's docker-compose.yml and the two have already drifted. That drift is all that remains of #212 — one trailing slash on line 21 of the stack file. Left in place: nothing is broken today, and fixing it recreates the container and takes both front doors down together. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 02:08:12 -05:00
repository commits `CORS_ORIGIN=https://queuenorth.com` and line 21 of the stack
file says `https://queuenorth.com/`, with a trailing slash. Editing the one in
git changes nothing about production. That is the single most important sentence
feat(release): adapt PrivacyLLC-Web's release.sh, and add the deploy half it deliberately omits scripts/release.sh — publish. Bump, guards, build, verify the image's own version label, push :vX.Y.Z and move :dev, commit last, tag. Adapted, not copied. The arguments are PrivacyLLC's and were paid for there; the mechanism is this project's, because almost none of it transferred. Three differences, each a fact about this repository rather than a preference: - It gates on verify.sh, not a test suite, because there is not one. The original refuses to release on a half-run 1,600-test run. This one says out loud that a build, a secret scan and a doc-header check are not tests and that nothing in the gate touched a route, a form or an API response. - It moves :dev as well as publishing :vX.Y.Z, because Portainer stack 58 follows :dev. That makes :dev a pointer and never evidence. - It checks the public origin in three files, not one. The original passes its origin in as a build arg; here https://queuenorth.com is written out in src/lib/seo.js, src/components/SEO.jsx and scripts/prerender.js and is baked into every canonical URL, og:url, sitemap.xml and robots.txt. The guard asks whether the three still agree. Why this was needed: publishing was `npm run docker:push` with the bump as a separate thing to remember, and it was not remembered. package.json said 0.8.3 while four commits announced "batch 0.9.0" through "0.9.3", and NO image was ever published for any of them — the registry's newest tag is v0.8.3. No prune. The original has one; this project has published thirteen tags in its life, deleting a published image is irreversible, and the one that matters is whichever the container was created from — exactly what a newest-N rule gets wrong. scripts/deploy.sh — deploy, and do not build. The template's deploy.py builds, pushes AND deploys; adopting it beside release.sh would mean two commands that both build, a second image for the same code, and two answers to "what is running". This does only the missing half: point stack 58 at an already published tag, having taken a verified backup first. Its most important guard is not the obvious one. Portainer treats a stack PUT as the whole desired state, so sending it without the stack's Env array would strip twelve variables — the reCAPTCHA secret and the Zoho form tokens among them — and the container would come back HEALTHY while quietly capturing no leads. It reads them, counts them, sends them back, and refuses outright if none. Guards proven to refuse, not assumed: already-published tag, http origin, trailing-slash origin, the three origin constants drifted, dirty tree, bad flag, unpublished deploy tag, missing Portainer key, wrong stack id. One real bug found and fixed while testing: the image-line rewrite used `python3 -` with a heredoc while also piping the stack file to stdin, so python tried to execute the YAML. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 02:49:03 -05:00
in this section, and `deploy.sh` does not paper over it: it reads the deployed
file, changes only the `image:` line, and sends the rest back untouched.
fix(infra): queuenorth.com is the production origin, and it is this deployment _null confirmed queuenorth.com as the permanent public origin, which settles #212 and exposed a wrong claim written earlier the same day. docs/OPERATIONS.md said queuenorth.com "is not this deployment ... do not diagnose against it". That came from a DNS lookup and an assumption. It is this deployment: both hostnames serve the identical bundle and this server's own /api/health shape, 24.41.108.95 is this network's own public IP, and both reach qn-website-dev on nebula — queuenorth.com through nginx-proxy-manager on thor/exodus, qn.isnull.dev through Cloudflare. Two front doors, one container, no non-production environment. That is the worst direction for a runbook to be wrong in, so the correction quotes the wrong sentence rather than replacing it silently. The QA Round 0 table likewise gained the production observations as extra rows instead of having its originals rewritten. Dockerfile: the CORS_ORIGIN fallback was '*'. The server sets credentials:true and browsers reject '*' with credentials outright, so that fallback would have broken every form rather than over-permitting. Now the real origin. healthcheck.sh and preflight.sh now watch production by default, with the second front door reachable through their env overrides — the two ingresses terminate TLS in different places and can rot independently. Also fills a gap adoption left explicitly undone: the deploy path is a Portainer stack, id 58 on nebula, found from the container's own compose labels. OPERATIONS.md documents it, including that the stack file is a separate copy from this repository's docker-compose.yml and the two have already drifted. That drift is all that remains of #212 — one trailing slash on line 21 of the stack file. Left in place: nothing is broken today, and fixing it recreates the container and takes both front doors down together. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 02:08:12 -05:00
feat(release): adapt PrivacyLLC-Web's release.sh, and add the deploy half it deliberately omits scripts/release.sh — publish. Bump, guards, build, verify the image's own version label, push :vX.Y.Z and move :dev, commit last, tag. Adapted, not copied. The arguments are PrivacyLLC's and were paid for there; the mechanism is this project's, because almost none of it transferred. Three differences, each a fact about this repository rather than a preference: - It gates on verify.sh, not a test suite, because there is not one. The original refuses to release on a half-run 1,600-test run. This one says out loud that a build, a secret scan and a doc-header check are not tests and that nothing in the gate touched a route, a form or an API response. - It moves :dev as well as publishing :vX.Y.Z, because Portainer stack 58 follows :dev. That makes :dev a pointer and never evidence. - It checks the public origin in three files, not one. The original passes its origin in as a build arg; here https://queuenorth.com is written out in src/lib/seo.js, src/components/SEO.jsx and scripts/prerender.js and is baked into every canonical URL, og:url, sitemap.xml and robots.txt. The guard asks whether the three still agree. Why this was needed: publishing was `npm run docker:push` with the bump as a separate thing to remember, and it was not remembered. package.json said 0.8.3 while four commits announced "batch 0.9.0" through "0.9.3", and NO image was ever published for any of them — the registry's newest tag is v0.8.3. No prune. The original has one; this project has published thirteen tags in its life, deleting a published image is irreversible, and the one that matters is whichever the container was created from — exactly what a newest-N rule gets wrong. scripts/deploy.sh — deploy, and do not build. The template's deploy.py builds, pushes AND deploys; adopting it beside release.sh would mean two commands that both build, a second image for the same code, and two answers to "what is running". This does only the missing half: point stack 58 at an already published tag, having taken a verified backup first. Its most important guard is not the obvious one. Portainer treats a stack PUT as the whole desired state, so sending it without the stack's Env array would strip twelve variables — the reCAPTCHA secret and the Zoho form tokens among them — and the container would come back HEALTHY while quietly capturing no leads. It reads them, counts them, sends them back, and refuses outright if none. Guards proven to refuse, not assumed: already-published tag, http origin, trailing-slash origin, the three origin constants drifted, dirty tree, bad flag, unpublished deploy tag, missing Portainer key, wrong stack id. One real bug found and fixed while testing: the image-line rewrite used `python3 -` with a heredoc while also piping the stack file to stdin, so python tried to execute the YAML. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 02:49:03 -05:00
**What a deploy costs.** It recreates the container, so both public front doors
go down together for the few seconds it takes — they reach the same instance.
There is no non-production environment to rehearse against. `deploy.sh` takes a
verified backup before the irreversible part for that reason, and refuses to
continue if the backup fails.
feat(deploy): production always runs a numbered version Policy set by _null. The stack pins :vX.Y.Z — never :dev, never :latest. The reason is what a pointer cannot do. A stack file naming :dev says "dev" today and will still say "dev" after the image underneath it changes, so the file records a preference rather than a fact and "what is running?" has no answer that survives the next push. Rollback is worse: there is nothing to roll back TO, because a pointer only ever names now. deploy.sh: with no --tag it now resolves the newest published NUMBERED version from the registry and says which it picked, instead of defaulting to :dev. A floating tag is refused outright, with --allow-floating as the loud escape hatch for the one case that is not a mistake — reproducing a fault on whatever a pointer currently is. release.sh: no longer moves :dev. It published both tags until now because the stack followed the pointer; under this policy nothing deploys :dev, so moving it would only publish something that misrepresents what is running. scripts/docker-push.sh deleted, with its npm script. Its entire job was building and pushing an unnumbered :dev with no version bump and no guards, which is now the exact thing the policy exists to prevent. Keeping a command that quietly violates a policy is how the policy stops being true. :dev and :latest stay in the registry, frozen. Not deleted: the running container was created from :dev, and removing the tag an existing deployment names is how a recreate fails to pull. Stack 58 still pins :dev as this lands. Correcting that is the first deploy made under the policy, and it is why the default resolves a version rather than reusing whatever the stack already names. Guards proven: default resolves v0.8.3; --tag dev refused; --tag latest refused; --allow-floating warns and proceeds; unpublished tag still refused. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 02:54:42 -05:00
### Production always runs a numbered version
**Policy, set 2026-08-18.** The stack pins `:vX.Y.Z`. Never `:dev`, never
`:latest`, never any other pointer.
The reason is what a pointer cannot do. A stack file naming `:dev` says `dev`
today and will still say `dev` after the image underneath it changes — so the
file records a preference rather than a fact, and "what is running?" has no
answer that survives the next push. Rollback is worse: there is nothing to roll
back *to*, because a pointer only ever names now.
`deploy.sh` enforces it. With no `--tag` it resolves the **newest published
numbered version** from the registry and says which it picked; given a floating
tag it refuses:
fix(infra): queuenorth.com is the production origin, and it is this deployment _null confirmed queuenorth.com as the permanent public origin, which settles #212 and exposed a wrong claim written earlier the same day. docs/OPERATIONS.md said queuenorth.com "is not this deployment ... do not diagnose against it". That came from a DNS lookup and an assumption. It is this deployment: both hostnames serve the identical bundle and this server's own /api/health shape, 24.41.108.95 is this network's own public IP, and both reach qn-website-dev on nebula — queuenorth.com through nginx-proxy-manager on thor/exodus, qn.isnull.dev through Cloudflare. Two front doors, one container, no non-production environment. That is the worst direction for a runbook to be wrong in, so the correction quotes the wrong sentence rather than replacing it silently. The QA Round 0 table likewise gained the production observations as extra rows instead of having its originals rewritten. Dockerfile: the CORS_ORIGIN fallback was '*'. The server sets credentials:true and browsers reject '*' with credentials outright, so that fallback would have broken every form rather than over-permitting. Now the real origin. healthcheck.sh and preflight.sh now watch production by default, with the second front door reachable through their env overrides — the two ingresses terminate TLS in different places and can rot independently. Also fills a gap adoption left explicitly undone: the deploy path is a Portainer stack, id 58 on nebula, found from the container's own compose labels. OPERATIONS.md documents it, including that the stack file is a separate copy from this repository's docker-compose.yml and the two have already drifted. That drift is all that remains of #212 — one trailing slash on line 21 of the stack file. Left in place: nothing is broken today, and fixing it recreates the container and takes both front doors down together. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 02:08:12 -05:00
```bash
feat(deploy): production always runs a numbered version Policy set by _null. The stack pins :vX.Y.Z — never :dev, never :latest. The reason is what a pointer cannot do. A stack file naming :dev says "dev" today and will still say "dev" after the image underneath it changes, so the file records a preference rather than a fact and "what is running?" has no answer that survives the next push. Rollback is worse: there is nothing to roll back TO, because a pointer only ever names now. deploy.sh: with no --tag it now resolves the newest published NUMBERED version from the registry and says which it picked, instead of defaulting to :dev. A floating tag is refused outright, with --allow-floating as the loud escape hatch for the one case that is not a mistake — reproducing a fault on whatever a pointer currently is. release.sh: no longer moves :dev. It published both tags until now because the stack followed the pointer; under this policy nothing deploys :dev, so moving it would only publish something that misrepresents what is running. scripts/docker-push.sh deleted, with its npm script. Its entire job was building and pushing an unnumbered :dev with no version bump and no guards, which is now the exact thing the policy exists to prevent. Keeping a command that quietly violates a policy is how the policy stops being true. :dev and :latest stay in the registry, frozen. Not deleted: the running container was created from :dev, and removing the tag an existing deployment names is how a recreate fails to pull. Stack 58 still pins :dev as this lands. Correcting that is the first deploy made under the policy, and it is why the default resolves a version rather than reusing whatever the stack already names. Guards proven: default resolves v0.8.3; --tag dev refused; --tag latest refused; --allow-floating warns and proceeds; unpublished tag still refused. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 02:54:42 -05:00
npm run deploy # newest published vX.Y.Z
npm run deploy -- --tag v0.9.4 --dry-run # a specific version, previewed
npm run deploy -- --tag v0.9.4 # deploy it
npm run deploy -- --tag v0.8.3 # roll back to a known image
fix(infra): queuenorth.com is the production origin, and it is this deployment _null confirmed queuenorth.com as the permanent public origin, which settles #212 and exposed a wrong claim written earlier the same day. docs/OPERATIONS.md said queuenorth.com "is not this deployment ... do not diagnose against it". That came from a DNS lookup and an assumption. It is this deployment: both hostnames serve the identical bundle and this server's own /api/health shape, 24.41.108.95 is this network's own public IP, and both reach qn-website-dev on nebula — queuenorth.com through nginx-proxy-manager on thor/exodus, qn.isnull.dev through Cloudflare. Two front doors, one container, no non-production environment. That is the worst direction for a runbook to be wrong in, so the correction quotes the wrong sentence rather than replacing it silently. The QA Round 0 table likewise gained the production observations as extra rows instead of having its originals rewritten. Dockerfile: the CORS_ORIGIN fallback was '*'. The server sets credentials:true and browsers reject '*' with credentials outright, so that fallback would have broken every form rather than over-permitting. Now the real origin. healthcheck.sh and preflight.sh now watch production by default, with the second front door reachable through their env overrides — the two ingresses terminate TLS in different places and can rot independently. Also fills a gap adoption left explicitly undone: the deploy path is a Portainer stack, id 58 on nebula, found from the container's own compose labels. OPERATIONS.md documents it, including that the stack file is a separate copy from this repository's docker-compose.yml and the two have already drifted. That drift is all that remains of #212 — one trailing slash on line 21 of the stack file. Left in place: nothing is broken today, and fixing it recreates the container and takes both front doors down together. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 02:08:12 -05:00
```
docs: adopt project template, retire the markdown backlog This repository is the one the template's README describes: 205 issues, zero milestones, and severity labels spelled "P0 Critical" / "P1 High" / "P2 Medium", which privacyllc.dev reports as NOT ADOPTED rather than as 87% complete. Six markdown records described the same work and none pointed at the tracker. Two of them said the project was in "Phase 5" while the code was at 0.9.3. Migrated, then deleted in this commit: FUTURE.md -> docs/history/BATCH_LEDGER.md (Archived). Its open items were all already filed as issues, so nothing needed migrating into the tracker HISTORY.md -> docs/history/DEVELOPMENT_LOG.md, verbatim, 0 lines lost DEVELOPMENT_LOG.md -> the same file, as a second labelled block. Not interleaved: the changelog has three duplicated version headings, so one date order would have implied more than the record supports PROJECT.md -> docs/planning/PROJECT_PLAN.md STRUCTURE.md -> the agent pipeline into README.md; its versioning rules retired BUILD_SUMMARY.md -> BATCH_LEDGER.md. Its embedded SQL schema deliberately NOT carried: it predated the UNIQUE constraint on leads.email, and server/index.js owns the schema SCRIPTS.md -> docs/TOOLS.md, corrected for the SSR + prerender build Moved with history (git detects all four as renames): OVERHAUL_PLAN.md, review.md, project-requirements.md, docs/zoho-setup.md Kept because this project earned them: the five-agent pipeline, the design system in OVERHAUL_PLAN.md (Status: Current, with a front-note saying which half is history), the positioning argument in REDESIGN_REVIEW.md, and REQUIREMENTS.md whole, including its change policy. Deleted from the template because they do not apply, each said out loud in DOC_TRUST_MAP.md: QA pass I (no money moves), the authorisation checklist group and the session-token row (no accounts, no sessions), and one PRECAUTIONARY paragraph in SECURITY.md about holding credentials on behalf of users — there are none, and PROJECT_PLAN.md records accounts as out of scope. Pass H was kept and rewritten: its authorisation half does not apply, its what-a-stranger-can- reach half is the most exposed surface here. Also removed: main.js, the old static site's hash router, referenced by nothing and preserved in .drop/; and test-results/.last-run.json, a May Playwright artifact reading {"status":"failed"} for a suite that does not exist. The repository was made private on Forgejo before this commit. That is what let the internal history be committed rather than exempted — null/fruit-fall is already private and reports normally. Two defects found on the way in and fixed here: zoho-setup.md told admins to edit `server/zoho/`, a directory that has never existed in any commit (the mapping is in server/index.js), and README.md's route list still advertised /8x8, removed at 0.6.6, while omitting /privacy-policy. Branding: icon.webp and logo.webp converted from this project's own marks in assets/. banner.webp is absent and is filed as an issue rather than faked. Verified: verify.sh 3/3, doc-claims 71 claimed paths all present, backup and a first-ever restore of the live leads database (2 tables, 3 rows, under 1s). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 01:19:02 -05:00
feat(deploy): production always runs a numbered version Policy set by _null. The stack pins :vX.Y.Z — never :dev, never :latest. The reason is what a pointer cannot do. A stack file naming :dev says "dev" today and will still say "dev" after the image underneath it changes, so the file records a preference rather than a fact and "what is running?" has no answer that survives the next push. Rollback is worse: there is nothing to roll back TO, because a pointer only ever names now. deploy.sh: with no --tag it now resolves the newest published NUMBERED version from the registry and says which it picked, instead of defaulting to :dev. A floating tag is refused outright, with --allow-floating as the loud escape hatch for the one case that is not a mistake — reproducing a fault on whatever a pointer currently is. release.sh: no longer moves :dev. It published both tags until now because the stack followed the pointer; under this policy nothing deploys :dev, so moving it would only publish something that misrepresents what is running. scripts/docker-push.sh deleted, with its npm script. Its entire job was building and pushing an unnumbered :dev with no version bump and no guards, which is now the exact thing the policy exists to prevent. Keeping a command that quietly violates a policy is how the policy stops being true. :dev and :latest stay in the registry, frozen. Not deleted: the running container was created from :dev, and removing the tag an existing deployment names is how a recreate fails to pull. Stack 58 still pins :dev as this lands. Correcting that is the first deploy made under the policy, and it is why the default resolves a version rather than reusing whatever the stack already names. Guards proven: default resolves v0.8.3; --tag dev refused; --tag latest refused; --allow-floating warns and proceeds; unpublished tag still refused. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 02:54:42 -05:00
`--allow-floating` exists for the one case that is not a mistake — reproducing a
fault on whatever a pointer currently is — and warns every time.
It also refuses a tag the registry does not hold. A missing tag would otherwise
become an outage: Portainer accepts the file, fails to pull, and leaves the
container stopped.
**Stack 58 pins `:dev` as this is written**, which is the state the policy
corrects. The first deploy made under it repoints the stack at a version, and
after that the stack file answers the question on its own.
`:dev` and `:latest` remain in the registry, frozen. They are not deleted
because the running container was created from `:dev`, and removing the tag an
existing deployment names is how a recreate fails to pull. Nothing publishes to
them any more — `release.sh` stopped moving `:dev` when this policy was set, and
scripts/docker-push.sh — named without backticks because it is gone — was
deleted, its only job having been to push an unnumbered `:dev` with no version
bump and no guards.
feat(release): adapt PrivacyLLC-Web's release.sh, and add the deploy half it deliberately omits scripts/release.sh — publish. Bump, guards, build, verify the image's own version label, push :vX.Y.Z and move :dev, commit last, tag. Adapted, not copied. The arguments are PrivacyLLC's and were paid for there; the mechanism is this project's, because almost none of it transferred. Three differences, each a fact about this repository rather than a preference: - It gates on verify.sh, not a test suite, because there is not one. The original refuses to release on a half-run 1,600-test run. This one says out loud that a build, a secret scan and a doc-header check are not tests and that nothing in the gate touched a route, a form or an API response. - It moves :dev as well as publishing :vX.Y.Z, because Portainer stack 58 follows :dev. That makes :dev a pointer and never evidence. - It checks the public origin in three files, not one. The original passes its origin in as a build arg; here https://queuenorth.com is written out in src/lib/seo.js, src/components/SEO.jsx and scripts/prerender.js and is baked into every canonical URL, og:url, sitemap.xml and robots.txt. The guard asks whether the three still agree. Why this was needed: publishing was `npm run docker:push` with the bump as a separate thing to remember, and it was not remembered. package.json said 0.8.3 while four commits announced "batch 0.9.0" through "0.9.3", and NO image was ever published for any of them — the registry's newest tag is v0.8.3. No prune. The original has one; this project has published thirteen tags in its life, deleting a published image is irreversible, and the one that matters is whichever the container was created from — exactly what a newest-N rule gets wrong. scripts/deploy.sh — deploy, and do not build. The template's deploy.py builds, pushes AND deploys; adopting it beside release.sh would mean two commands that both build, a second image for the same code, and two answers to "what is running". This does only the missing half: point stack 58 at an already published tag, having taken a verified backup first. Its most important guard is not the obvious one. Portainer treats a stack PUT as the whole desired state, so sending it without the stack's Env array would strip twelve variables — the reCAPTCHA secret and the Zoho form tokens among them — and the container would come back HEALTHY while quietly capturing no leads. It reads them, counts them, sends them back, and refuses outright if none. Guards proven to refuse, not assumed: already-published tag, http origin, trailing-slash origin, the three origin constants drifted, dirty tree, bad flag, unpublished deploy tag, missing Portainer key, wrong stack id. One real bug found and fixed while testing: the image-line rewrite used `python3 -` with a heredoc while also piping the stack file to stdin, so python tried to execute the YAML. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 02:49:03 -05:00
**What `deploy.sh` preserves, and why that is the dangerous part.** Portainer
treats a stack `PUT` as the whole desired state. Sending it without the stack's
`Env` array would strip twelve variables — including the reCAPTCHA secret and
the Zoho form tokens — and the container would come back **healthy** while
quietly failing to capture a single lead. The script reads them, counts them,
sends them back, and refuses outright if the stack reports none.
Afterwards it waits for the container's own healthcheck, then checks
`/api/health` on **both** origins, and prints the image digest and version label
from before and after.
docs: adopt project template, retire the markdown backlog This repository is the one the template's README describes: 205 issues, zero milestones, and severity labels spelled "P0 Critical" / "P1 High" / "P2 Medium", which privacyllc.dev reports as NOT ADOPTED rather than as 87% complete. Six markdown records described the same work and none pointed at the tracker. Two of them said the project was in "Phase 5" while the code was at 0.9.3. Migrated, then deleted in this commit: FUTURE.md -> docs/history/BATCH_LEDGER.md (Archived). Its open items were all already filed as issues, so nothing needed migrating into the tracker HISTORY.md -> docs/history/DEVELOPMENT_LOG.md, verbatim, 0 lines lost DEVELOPMENT_LOG.md -> the same file, as a second labelled block. Not interleaved: the changelog has three duplicated version headings, so one date order would have implied more than the record supports PROJECT.md -> docs/planning/PROJECT_PLAN.md STRUCTURE.md -> the agent pipeline into README.md; its versioning rules retired BUILD_SUMMARY.md -> BATCH_LEDGER.md. Its embedded SQL schema deliberately NOT carried: it predated the UNIQUE constraint on leads.email, and server/index.js owns the schema SCRIPTS.md -> docs/TOOLS.md, corrected for the SSR + prerender build Moved with history (git detects all four as renames): OVERHAUL_PLAN.md, review.md, project-requirements.md, docs/zoho-setup.md Kept because this project earned them: the five-agent pipeline, the design system in OVERHAUL_PLAN.md (Status: Current, with a front-note saying which half is history), the positioning argument in REDESIGN_REVIEW.md, and REQUIREMENTS.md whole, including its change policy. Deleted from the template because they do not apply, each said out loud in DOC_TRUST_MAP.md: QA pass I (no money moves), the authorisation checklist group and the session-token row (no accounts, no sessions), and one PRECAUTIONARY paragraph in SECURITY.md about holding credentials on behalf of users — there are none, and PROJECT_PLAN.md records accounts as out of scope. Pass H was kept and rewritten: its authorisation half does not apply, its what-a-stranger-can- reach half is the most exposed surface here. Also removed: main.js, the old static site's hash router, referenced by nothing and preserved in .drop/; and test-results/.last-run.json, a May Playwright artifact reading {"status":"failed"} for a suite that does not exist. The repository was made private on Forgejo before this commit. That is what let the internal history be committed rather than exempted — null/fruit-fall is already private and reports normally. Two defects found on the way in and fixed here: zoho-setup.md told admins to edit `server/zoho/`, a directory that has never existed in any commit (the mapping is in server/index.js), and README.md's route list still advertised /8x8, removed at 0.6.6, while omitting /privacy-policy. Branding: icon.webp and logo.webp converted from this project's own marks in assets/. banner.webp is absent and is filed as an issue rather than faked. Verified: verify.sh 3/3, doc-claims 71 claimed paths all present, backup and a first-ever restore of the live leads database (2 tables, 3 rows, under 1s). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 01:19:02 -05:00
**Write the incident down afterwards**, in `docs/history/DEVELOPMENT_LOG.md` with
the date, and file what broke as an issue with a severity label. An incident
nobody recorded happens again with the same surprise.