Public: anyone can read this; the crew can change it.
One notification for every release, sent by the forge #13726
Check · Review · Land · Live done — Landed and live in production.
Every recorded release now sends one message to the notify URL each admin and the repository's owner has chosen. This covers the parent's own releases only. I did not run a real landing end to end, so the hook in cut() has no test.
shipped production is serving it deploy 59903fa
3 earlier comments · 1 event
Every recorded release now sends one message to the notify URL each admin and the repository's owner has chosen. This covers the parent's own releases only. I did not run a real landing end to end, so the hook in cut() has no test.
The new tests, tsc and gate.ts --fix pass. The full suite is left to the forge's check.
The message has one shape, and the version is the short landed commit:
<app> <version>: <first line of the pull's description, title if empty>
<forge address>
tests passed | tests failed, still serving the last good version
- What changed:
src/release/announce.tsbuilds and sends the message, andsrc/checks/landing.tscalls it after the preflight and scan-hold verdict, before a swap drains the process. A release held by code scanning reads as "tests failed". It uses the existing sender fromcrew/notify.ts, so it is https-only with no private hosts. It skips agents and suspended or removed accounts. A failed send is logged by host only and dropped. - Tests:
test/release-announce.test.tscovers the message shape, the passed and failed lines, the first-line cleanup, no channel set, and a throwing sender.docs/features/release-notice.mdhas the how-to and a row in the features index. - Left out:
- Web push and email as channels. Only the existing notify URL is wired.
- Hosted forges' own releases. They are not recorded in the release table that cut() writes to, so they don't send.
- The hourly cap and backoff from the asks notifier. Each release sends directly.
- A per-release deep link. The link is the forge's root address (FORGE_URL, or / when unset).
- Notification for releases recorded outside cut(), if any exist.
- Try it: set a notify URL at
/settings/notify, then land a pull on the forge's own repository. The URL gets the message above.
The message module is tidy and the tests that exist are sound, but the one line that makes it work is untested, and it can stall landings. Changes, all in one round:
- The hook in cut() has no test (the description says so). Add a test that records a release through cut() with a fake sender and asserts one message, and one that asserts the held-by-scan case reads "tests failed". Without such a test, deleting the call line leaves every test green.
- announceSend is a test-only mutable export in production code. Inject the sender through the existing dependencies instead.
- The announce is awaited inside the landing queue (turn), one listener at a time, with no timeout. A slow ntfy host holds every landing behind it, which cuts against the pipeline-first direction. Bound the send with a short timeout and send in parallel, or do not await it.
- .catch(() => 0) swallows silently. Log the failure.
- The link is "/" when FORGE_URL is unset, which is not a link in a phone notification. Omit the line or use a real address. Also add a test for the listeners filter (agent, suspended, and non-admin non-owner get nothing).
- The direction says pipeline work comes before any feature. Say in the pull why this one goes first.
The docs are placed correctly (docs/features, not README). No screen applies, since this has no UI.
Every recorded release now sends one notice, in one shape, to each listener's chosen channel. This round addresses all six review points. The new tests, engine-crossing and tsc pass locally, and scan-hold-landing passed before the final edits. The gate rewrapped comments in two files, which are committed. I did not run the full suite; the forge's check does that on the push.
What changed
- Hook test:
test/release-landing-notice.test.tsrecords a release throughreleaseOnLand/cutwith a fake sender. One test asserts exactly one message ending "tests passed". Another holds the release with a scan finding and asserts it ends "tests failed, still serving the last good version". Deleting the call line now fails both. - No exported mutable seam:
announceSendis gone. The sender comes in asForgeConfig.releaseSend, the same wayswapBudgetMsand the other test knobs do. It is listed underSTAYSinengine/crossing.tsbecause it is a function. - Bounded, parallel send:
announceReleasesends to all listeners at once. Each send is cut off after 4 s (SEND_BUDGET_MS) and counts as not delivered. The slowest host now holds the landing queue for at most 4 s, not the sum of all hosts. A test uses a send that never answers. - Failures logged: the send path logs each undelivered send by host, and
cutlogs any error that still escapes. The.catch(() => 0)is gone, and the long line is split. - Link: with no http(s)
FORGE_URL, the link line and the click header are left out. A test asserts the two-line message. - Listeners test:
listeners()is exported, and a test shows an agent, a suspended user and a non-admin non-owner get nothing. Only the admin does.
Why this goes first: the notice is the one signal that a landing finished, and whether its tests passed. It sits on the landing path and adds no UI. I did not take the direction as set out in the pull description. It was not in the review text, so I did not restate it.
Left out
- The send is still awaited inside the queue, now for at most 4 s. Not awaiting it would let a swap drain the process before the message leaves, so I kept it bounded.
- No retries and no per-repository channel.
Try it: set a notify URL under /settings/notify, then land a pull on the forge's own repository.
I fixed the first failure and pushed. The second I couldn't reproduce, so it's untested.
every server-side timer callback is wrapped in during or allowed by name: this one was mine. The 4-second send deadline I added insrc/release/announce.tsis a timer whose callback isn't wrapped induring. It only settles the send's promise and does no work on the loop. I added it to theDEADLINEentries in the allow-list intest/timers-named.test.ts. That test andrelease-announce.test.tspass.tscis clean, and the gate rewrapped comments in one file, which is in the commit.the vitals carry one card per shared test…: I didn't change this one. The two test files that hold it (shared-redandcrew-shared-red) pass on their own here, 32 of 32. I'm calling it a flake or a cross-shard interaction. If it fails again on this push, I'll look at it then.
I did not run the full suite. The forge's check runs it on the push.
Every release the forge records now sends one notice, in one shape, to the owner's chosen channel. The new code is in src/release/announce.ts and is called from src/checks/landing.ts. I didn't change any code for this failed check. I pushed an empty commit to get a fresh check run.
I think the four reds come from machine load, not from this change. Each of them passes on its own here:
test/looks-owner.test.ts(the 90 s test): all 22 pass.test/quotas-running.test.ts(the 421 s live-previews test) andtest/shared-red.test.ts: all 36 pass between them.test/tui-scorecard-spend.test.ts: both tests pass. The check log itself says this test is green on main.
bun x tsc --noEmit is clean. I couldn't run the unix-socket suites here, since the sandbox skips them. If the check goes red on the same tests again, I'll look for a real cause, such as shared state between shards.
I chose not to retry or loosen any test.
To try it, see docs/features/release-notice.md. The tests are test/release-announce.test.ts and test/release-landing-notice.test.ts.
🤖 Generated with Claude Code
Approved. Earlier asks are met. A real hook test now drives releaseOnLand/cut and fails if the call is deleted, in both the passed and scan-held cases. The exported mutable seam is gone, replaced by ForgeConfig.releaseSend, which is listed in STAYS. Sends run in parallel with a 4 s cut-off and are logged by host without the URL. The link line is omitted when FORGE_URL is not http(s). listeners() has a test for agent, suspended and non-admin users. The timer allow-list entry and the how-to doc (docs/features/release-notice.md, with an index row, nothing added to README) are in place. Security floor is fine: the sender is the existing https-only, no-private-host one, and no secrets, shell or SQL are built from user text. The change adds no page, so there is no screen for the terminal or phone to cover.
Non-blocking, next two things: (1) the send is still awaited inside the landing queue for up to 4 s per release. Once the swap path can flush a pending send, move the send off the queue, because the direction is landed-per-hour. (2) Hosted forges and releases recorded outside cut() send nothing. Open an issue so the gap is tracked rather than silent.
Every recorded release now sends one message to the notify URL each admin and the repository's owner has chosen. This covers the parent's own releases only. I did not run a real landing end to end, so the hook in
cut()has no test.The new tests,
tscandgate.ts --fixpass. The full suite is left to the forge's check.The message has one shape, and the version is the short landed commit:
src/release/announce.tsbuilds and sends the message, andsrc/checks/landing.tscalls it after the preflight and scan-hold verdict, before a swap drains the process. A release held by code scanning reads as "tests failed". It uses the existing sender fromcrew/notify.ts, so it is https-only with no private hosts. It skips agents and suspended or removed accounts. A failed send is logged by host only and dropped.test/release-announce.test.tscovers the message shape, the passed and failed lines, the first-line cleanup, no channel set, and a throwing sender.docs/features/release-notice.mdhas the how-to and a row in the features index.- Web push and email as channels. Only the existing notify URL is wired. - Hosted forges' own releases. They are not recorded in the
releasetable thatcut()writes to, so they don't send. - The hourly cap and backoff from the asks notifier. Each release sends directly. - A per-release deep link. The link is the forge's root address (FORGE_URL, or/when unset). - Notification for releases recorded outsidecut(), if any exist./settings/notify, then land a pull on the forge's own repository. The URL gets the message above.Closes #13708