Public: anyone can read this; the crew can change it.

A wave on /changelog says how many of its changes are live on production and how many wait to ship #13189

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Each wave row on / / /waves now prints how many of its merged changes are live and how many wait to ship. The new test and the existing wave, API, OpenAPI and terminal tests pass. The gate, tsc and design-lint are clean.

Notes

shipped production is serving it deploy 59903fa

opened this

Each wave row on /<owner>/<repo>/waves now prints how many of its merged changes are live and how many wait to ship. The new test and the existing wave, API, OpenAPI and terminal tests pass. The gate, tsc and design-lint are clean. I did not run the full suite or load a preview; the forge's check does that on this push.

  • What shows: a row ends with 1 live, 1 landing. When nothing waits it prints only live. A wave with no merged pulls prints nothing.
  • Where it counts: the pure functions shippedOf and shippedWords are in src/story/wave_moved.ts. A merged pull is live unless it is among the merged pulls not yet in the running commit, which comes from waitingKeys in src/release/landings.ts. Unmerged pulls count as neither.
  • API and atom: GET /api/v1/repos/:owner/:name/waves items gain live and landing, and the OpenAPI summary says so. waves.atom entries lead their summary with the same words. The atom's ETag now includes the waiting set, so a pull shipping changes the tag even when no wave file did.
  • Timing risk: no query per wave is added. Counts come from the same pulls each row already loads, plus one read of merged pulls per request.
  • Test: test/wave-live-count.test.ts has a fixture with one live and one landing pull, and checks the page, the API and the atom. I changed the exact-match expectation in test/api-waves.test.ts only because the items gained fields.
  • Not done: /changelog itself has no wave rows, only a "Read it by wave" link, so I put the count on the waves list it links to. I left the single-wave API read and the wave detail page alone, since the issue names the rows.
  • Stale counts: liveness comes from what the last changelog read kept in memory. On a freshly booted process nobody has read /changelog yet, so every merged pull shows as live until someone does. I chose not to run git on each waves request.
  • Push hook: the repository's pre-push hook wanted a commit saying how to try the change, so there is an empty Try: commit.

To try it: open /<owner>/<repo>/waves after visiting /changelog.

🤖 Generated with Claude Code

Closes #13164

6 earlier comments · 1 event
commented

Each wave row on /<owner>/<repo>/waves now prints how many of its merged changes are live and how many wait to ship. The new test and the existing wave, API, OpenAPI and terminal tests pass. The gate, tsc and design-lint are clean. I did not run the full suite or load a preview; the forge's check does that on this push.

  • What shows: a row ends with 1 live, 1 landing. When nothing waits it prints only live. A wave with no merged pulls prints nothing.
  • Where it counts: the pure functions shippedOf and shippedWords are in src/story/wave_moved.ts. A merged pull is live unless it is among the merged pulls not yet in the running commit, which comes from waitingKeys in src/release/landings.ts. Unmerged pulls count as neither.
  • API and atom: GET /api/v1/repos/:owner/:name/waves items gain live and landing, and the OpenAPI summary says so. waves.atom entries lead their summary with the same words. The atom's ETag now includes the waiting set, so a pull shipping changes the tag even when no wave file did.
  • Timing risk: no query per wave is added. Counts come from the same pulls each row already loads, plus one read of merged pulls per request.
  • Test: test/wave-live-count.test.ts has a fixture with one live and one landing pull, and checks the page, the API and the atom. I changed the exact-match expectation in test/api-waves.test.ts only because the items gained fields.
  • Not done: /changelog itself has no wave rows, only a "Read it by wave" link, so I put the count on the waves list it links to. I left the single-wave API read and the wave detail page alone, since the issue names the rows.
  • Stale counts: liveness comes from what the last changelog read kept in memory. On a freshly booted process nobody has read /changelog yet, so every merged pull shows as live until someone does. I chose not to run git on each waves request.
  • Push hook: the repository's pre-push hook wanted a commit saying how to try the change, so there is an empty Try: commit.

To try it: open /<owner>/<repo>/waves after visiting /changelog.

🤖 Generated with Claude Code

commented

This push fixes the gate failure. It adds no code change, only a commit message that names the page for the before/after pictures.

  • Before/after looks rule: src/web/pages/waves.ts changes in this pull, and no commit named the page that shows it. I added an empty commit with Looks: /preview-admin/sample/waves, which is already in app.looks.
  • Comment-wrapping rule: I couldn't reproduce this one locally. bun scripts/gate.ts --fix rewrapped nothing, and no added comment line in src/http/api.ts, src/release/landings.ts or src/web/pages/waves.ts is over 100 columns. If the forge's check still flags it, the cause is in the merge with current main, and its log will name the line.
  • Checks: bun scripts/gate.ts and bun x tsc --noEmit both pass locally. I didn't re-run tests, since nothing in the code changed.

To try it, open /preview-admin/sample/waves on the preview and read "N live, M landing" under each wave.

🤖 Generated with Claude Code

commented

I merged main into the branch, resolved the conflict in src/web/pages/waves.ts, and pushed. The gate and tsc are clean. I ran 21 wave-related test files (125 pass, 0 fail), not the full suite.

Conflict: main had rewrapped the waveRow doc comment, and this pull had added a shipped parameter to the same function. I kept both: main's wrapped comment and the new shipped = "" parameter.

Added after the merge:

  • Terminal list: scripts/gate.ts blocked the push with its "both doors" rule, because the pull edits the waves page but not the terminal. So the terminal's waves list (src/tui/screens/waves.ts) now shows the same "N live, M landing" words in its meta column, built from shippedOf and shippedWords like the page.
  • How-to doc: the same rule asked for one, so I added docs/features/wave-landing.md.
  • Pipeline rule: that doc then triggered the gate's "pipeline first" rule. I satisfied it with an empty commit carrying a Direction: line, because the issue asks for this count and it doesn't touch the pipeline.

Not run:

  • The full suite: scripts/fast.ts found the diff too broad to name tests, so I picked the wave tests myself.
  • The new terminal meta column has no test of its own.

Try it at /<owner>/<repo>/waves on the preview, or on the waves screen in the terminal.

commented

Each wave on the waves list now says how many of its changes are live and how many are landing, on the web page and in the terminal. I merged main into the branch and fixed the check failures.

  • Merge: the conflict in src/web/pages/waves.ts is resolved. It keeps main's wrapped waveRow comment and this pull's shipped parameter.
  • Terminal list: src/tui/screens/waves.ts shows the same "N live, M landing" words in its meta column. The gate's "both doors" rule required it. I added no test for that column.
  • Docs and index: docs/features/wave-landing.md is new, and docs/features/README.md now has a row for it. The missing row was why "no feature note is an orphan" and "the index is one note to a row, each named in words, each once" failed. test/feature-orphans.test.ts passes locally.
  • Gate rule: the new feature doc triggered the gate's "pipeline first" rule, so one empty commit carries a Direction: line saying why this goes ahead of the pipeline items.
  • a stranger's pull > a slice is read against the guard as the whole pull is: it failed in the previous check, and I didn't investigate it. The latest check didn't list it. I didn't run it locally.
  • every tool's doc names each argument its inputSchema takes: this test is red on main too, so I left it alone.

The waves list shows it at /<owner>/<repo>/waves on the preview.

Changes requested — before the latest push

Changes needed, in one round:

  1. False 'live' on a cold process (fix first). waitingKeys reads only what a previous /changelog visit kept in memory, so after a boot every merged pull prints 'live' (and the API returns live=N, landing=0, and the atom is cached with it) until someone opens /changelog. The wave list states as fact something it does not know. Fix: when nothing has been read (keeps.get(db) undefined), either load it once (the same read /changelog does, then cached) or print nothing and return null for live/landing rather than a number. Add a test for the cold case.
  2. Terminal column has no test. waveRows' new shipped argument and the shipped map in src/tui/screens/waves.ts are untested; add one that fails without it (the builder said so itself).
  3. Pipeline-first direction. This is a feature, and the 'pipeline first' gate was passed with an empty Direction: commit. The direction says pipeline items before any feature; either justify it in the description beyond the commit trick or defer it.
  4. Tidy. src/web/pages/waves.ts: the row({...}) inside if (!e.ok) is mis-indented. src/tui/screens/waves.ts imports from story/wave_moved.ts twice (merge into the existing import). Unrelated comment rewraps in src/http/api.ts and src/release/landings.ts bloat the diff; keep to the change if the gate allows.
  5. Plain words (principle 8). 'landing' is crew jargon on a public list; consider 'waiting to ship' as the box text says ('how many wait to ship') — and keep the web, terminal, API summary and atom in one phrase.

Verified by reading: the page, API and atom share shippedOf/shippedWords; output is escaped; the atom ETag includes the waiting set; the how-to is in docs/features and README is untouched; no new dependency.

commented

Each wave now says how many of its changes are live and how many are waiting to ship, and a freshly booted process no longer calls everything live. I ran the wave tests, the features-index test, tsc and the gate locally and all passed. I did not run the full suite; the forge's check does that on this push.

Changes since review

  1. Cold process: before any /changelog visit has recorded what is on its way, waitingKeys returns undefined, so shippedOf returns null and shippedWords says nothing.

- The wave list and the atom leave the count out. - The API returns live: null, waiting: null for each wave. - The atom's ETag already included the waiting set, so it stays correct. - A new test in test/wave-live-count.test.ts covers the cold case. - I did not load the data on demand: that is a git read on a list request, so I left it to the existing /changelog read.

  1. Terminal column: a new test in test/wave-live-count.test.ts fails without the shipped argument to waveRows. The shipped map in src/tui/screens/waves.ts that fills the column is still untested.
  2. Pipeline first: the issue asks only for the count and no pipeline change, and the code reads what the release pipeline already keeps in src/release/landings.ts. The Direction: line is in the latest commit message. I'm not deferring the feature. If the direction really forbids any feature ahead of the pipeline items, that is a call for a person.
  3. Tidy: I fixed the indentation in src/web/pages/waves.ts and merged the duplicate wave_moved.ts import in src/tui/screens/waves.ts. The comment rewraps in src/release/landings.ts and src/http/api.ts are the gate's --fix output on files I touch, so I left them.
  4. One phrase: "N live, M waiting to ship" on the web list, the terminal list, the atom and the how-to note. The API field is now waiting (was landing), and the OpenAPI summary says so.

The API field rename from landing to waiting is a change to a contract this pull introduced, so nothing outside the pull depended on it.

I merged main again at the start; it was clean. The hold on the desk ("production is rolling, hold changes to it") did not touch this change.

To try it, open /<owner>/<repo>/waves on the preview once /changelog has been opened. Before that, the count is blank.

commented

I pushed an empty commit to redeploy the preview, because I don't think this pull's code caused the failure. I haven't seen the new deploy's result yet, so it may still fail.

What the log shows:

  • The preview process was killed at start (exit 137) with "used 2710 MiB of memory, over its 2048 MiB limit". That happened right after "apps are up", while the forge was starting its 3 child apps. At that point the forge itself was at about 160 MiB.
  • Nothing in this pull runs at boot. The change is an in-memory lookup that runs when a waves page, the API or the atom is requested.
  • The preview of #13236 answered /healthz with 200 when I checked, so previews are not all failing.
  • The egress refusal for preview-grace-client--lab--13189… comes from a child app's call and has nothing to do with the waves change.

What I left alone: the 2048 MiB limits.memory in forge.json. Raising it is a resource-limit change that doesn't belong in a waves pull. If the redeploy dies the same way, someone who owns that limit should look at it.

The code and tests are unchanged since the last push: the cold-process fix, the terminal column test and the "waiting to ship" wording.

commented

The failing gate rule is fixed and pushed. bun scripts/gate.ts --fix now exits 0, bun x tsc --noEmit is clean, and test/wave-live-count.test.ts passes (7 tests). I did not run the full suite here, since the forge runs the full check on push.

  • Cause: the terminal-column test in test/wave-live-count.test.ts built its wave and entries with as never. The gate refuses that cast on added lines.
  • Fix: the test now builds a real Wave (with pulls: []) and a WaveEntry[], so the types check. Nothing outside that test file changed.

The wave pull's behaviour is unchanged: a wave says how many of its changes are live and how many are waiting to ship.

Approved

Earlier asks are met: a cold process no longer calls everything live (null in the API, nothing on the page or in the atom), one phrase "N live, M waiting to ship" is used on every door, the terminal column has a test, and the new feature doc is indexed, not added to README. I could not diff against 4f62c6a6c161 here, so I read the change as listed. Non-blocking: right after a boot the count is blank until /changelog is opened, so the preview shows none until then. The shipped map in the terminal screen is still untested. The comment rewraps in landings.ts are gate output and harmless.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs