From 4950755b3d20881e9d8a56ec19e0b5d34d4a317b Mon Sep 17 00:00:00 2001 From: Sam Rolfe Date: Fri, 16 Oct 2026 10:04:09 +1100 Subject: [PATCH] Phase 7a: applied the 6:00am n8n workflow (AUD-115) Imported the SSH credential and schoolMorningBrf, published it, restarted n8n once, and confirmed the activation log line (no Unrecognized node type). A hand run through the published workflow finished green and delivered 8/8 (Harry, Finn, combined Jo + Sam). Record the evidence and the N8N_RUNNERS_BROKER_PORT workaround for 'n8n execute'. --- deploy/DEPLOYMENT.md | 8 ++++---- docs/phase-7a-n8n-schedule.md | 32 +++++++++++++++++++++++++++++--- 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/deploy/DEPLOYMENT.md b/deploy/DEPLOYMENT.md index 489e45e..a4b013c 100644 --- a/deploy/DEPLOYMENT.md +++ b/deploy/DEPLOYMENT.md @@ -122,7 +122,7 @@ Notes: broken morning is visible in n8n instead of silent (FR-12). - The 06:00 schedule is the n8n workflow `Compass / NHS — 6:00am morning brief` (`deploy/n8n-morning-brief.json`), triggered over a restricted SSH key. It runs - on the shared n8n service on `.13`, so its import, publish, and the one-off n8n - restart need approval first. n8n 2.x disables the Execute Command node by default, - so the workflow uses the SSH node plus a Code check that fails the run on a - non-zero exit. + on the shared n8n service on `.13`. Sam approved plan revision 2 and the workflow + was imported, published, and activated on 2026-10-16; the first automatic run is + 06:00 on 2026-10-17. n8n 2.x disables the Execute Command node by default, so the + workflow uses the SSH node plus a Code check that fails the run on a non-zero exit. diff --git a/docs/phase-7a-n8n-schedule.md b/docs/phase-7a-n8n-schedule.md index 0552310..993837a 100644 --- a/docs/phase-7a-n8n-schedule.md +++ b/docs/phase-7a-n8n-schedule.md @@ -137,11 +137,37 @@ log line plus the next morning's `notify status` rows. To prove the full send pa without waiting, run the published workflow once by hand: ```bash -docker exec n8n n8n execute --id=schoolMorningBrf +docker exec -e N8N_RUNNERS_BROKER_PORT=5681 n8n n8n execute --id=schoolMorningBrf ``` -This sends the real briefs, so run it only when a real delivery is wanted. `n8n -execute` starts from the Manual Trigger; both trigger paths reach the same SSH node. +The `N8N_RUNNERS_BROKER_PORT` override gives this short-lived CLI process its own task +broker port. Without it `n8n execute` stops with *"n8n Task Broker's port 5679 is +already in use"*, because the running n8n instance owns 5679. It changes only the one +`docker exec` process; the shared service keeps 5679. + +This sends the real briefs, so run it only when a real delivery is wanted. + +## Applied — 2026-10-16 + +Sam accepted plan revision 2 (`257b4b0a`), and the change was applied to the shared n8n +on `.13`. Evidence from that heartbeat: + +- `deploy/import-n8n-morning-brief.sh --apply`: imported 1 credential and 1 workflow, + published `schoolMorningBrf`, restarted n8n once, and the log then showed + `Activated workflow "Compass / NHS — 6:00am morning brief" (ID: schoolMorningBrf)` + with no `Unrecognized node type` error. `n8n list:workflow --active=true` lists it. +- A hand run through the published workflow finished `"status": "success"`, + `"finished": true`, CLI exit 0. The SSH node reached `sam@192.168.20.13` with the + restricted key, ran `scripts/morning-brief.sh`, scanned both children (Harry 71 + items, Finn 43 items, both `ok`) and delivered 8/8 through Apprise (email + + WhatsApp for Harry, Finn, and the combined brief to Jo and Sam). +- `docker exec compass-teams-nhs /app/school notify status`: `total=26 delivered=26 + failed=0`, new rows 19–26 (Harry 19–20, Finn 21–22, combined Jo 23–24, Sam 25–26), + all `ok` with `sent_at` set. + +The remaining check is the first automatic run: the Schedule Trigger fires at +**06:00 Australia/Melbourne on 2026-10-17**. An issue monitor on AUD-115 wakes the +assignee after that to record the rows. ## Not touched