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

A merged pull of the forge says "production is serving it" before the running forge has it #17603

opened this in answer to

Merged 15h 28m ago, live in production

For the forge's own repository, a merged pull now reads "shipped" only once the running forge has its commit. I ran the new tests, the other word tests, tsc and the gate locally. The gate's look-page rule only reports that it can't infer a page.

Notes

opened this

For the forge's own repository, a merged pull now reads "shipped" only once the running forge has its commit. I ran the new tests, the other word tests, tsc and the gate locally. The gate's look-page rule only reports that it can't infer a page. The forge's full check hasn't run yet.

What changed

  • The word for a merged pull now comes from the newest release the keeper recorded live and didn't roll back. It no longer comes from the app deployment's commitOid, which moves before the process is replaced.
  • If no release is recorded live, nothing is known to be serving, so the pull reads waiting.
  • When that release is an older commit, the pull reads "waiting": "merged; waiting for the forge to restart on it". The old "production is deploying it now" wording no longer applies to the forge's own repository.
  • Other apps keep their words. A merged tell uses the same word, because it already goes through pullWord.

Where it moved

  • New module src/web/studio/running.ts has runningCommit(app, repo). It returns undefined for any repository but the forge's own.
  • WordCtx in src/web/studio/words.ts gets an optional running field. caughtUp tests ancestry against it, falling back to the deployment's commit when it is absent.
  • All six studio pages that build a WordCtx now pass running (app.ts, change.ts, lists.ts, run.ts, shelf.ts, tell.ts). lists.ts builds two.

Tests (test/pulls-words.test.ts)

  • A deployment ahead of the running release reads waiting.
  • No live release recorded reads waiting.
  • The running commit being the pull's commit reads shipped.
  • Another app keeps shipped.
  • runningCommit skips rolled-back and not-yet-live releases.
  • I didn't run these against the old code first, to confirm they fail there.

Not done

  • The terminal and API don't draw this word, so the commit carries a No door: line. I didn't check whether /infra or release_keeper should show it.
  • The two commit messages carry Try:, Looks: and No look: lines for the gate.
  • I didn't add a review block to this description.

Try it: open a merged pull of trevato/forge on the preview, e.g. /trevato/forge/pulls/17554. It should read waiting until a release containing it is recorded live.

🤖 Generated with Claude Code

Closes #17602

2 earlier comments
commented

For the forge's own repository, a merged pull now reads "shipped" only once the running forge has its commit. I ran the new tests, the other word tests, tsc and the gate locally. The gate's look-page rule only reports that it can't infer a page. The forge's full check hasn't run yet.

What changed

  • The word for a merged pull now comes from the newest release the keeper recorded live and didn't roll back. It no longer comes from the app deployment's commitOid, which moves before the process is replaced.
  • If no release is recorded live, nothing is known to be serving, so the pull reads waiting.
  • When that release is an older commit, the pull reads "waiting": "merged; waiting for the forge to restart on it". The old "production is deploying it now" wording no longer applies to the forge's own repository.
  • Other apps keep their words. A merged tell uses the same word, because it already goes through pullWord.

Where it moved

  • New module src/web/studio/running.ts has runningCommit(app, repo). It returns undefined for any repository but the forge's own.
  • WordCtx in src/web/studio/words.ts gets an optional running field. caughtUp tests ancestry against it, falling back to the deployment's commit when it is absent.
  • All six studio pages that build a WordCtx now pass running (app.ts, change.ts, lists.ts, run.ts, shelf.ts, tell.ts). lists.ts builds two.

Tests (test/pulls-words.test.ts)

  • A deployment ahead of the running release reads waiting.
  • No live release recorded reads waiting.
  • The running commit being the pull's commit reads shipped.
  • Another app keeps shipped.
  • runningCommit skips rolled-back and not-yet-live releases.
  • I didn't run these against the old code first, to confirm they fail there.

Not done

  • The terminal and API don't draw this word, so the commit carries a No door: line. I didn't check whether /infra or release_keeper should show it.
  • The two commit messages carry Try:, Looks: and No look: lines for the gate.
  • I didn't add a review block to this description.

Try it: open a merged pull of trevato/forge on the preview, e.g. /trevato/forge/pulls/17554. It should read waiting until a release containing it is recorded live.

🤖 Generated with Claude Code

commented

I fixed the statement-count regression and pushed it. The tests behind the five failures pass locally, but the forge's full check hasn't run on this push yet.

Cause: Each page built a word context per app, and every context looked up the forge's own repository and the running release. That added one or two SQL statements per app, so /apps, the shelf and the pull page went over their budgets. The terminal assign failure shared that cause, or was a timeout. It passed when I reran its file, so I haven't separated the two.

Fix:

  • The running-release lookup is now a function the word context calls only when a merged pull is actually worded.
  • The lookup result is kept once per page, in the page's ServingHistory object, so a page of many apps asks once.
  • The change is in src/web/studio/running.ts and src/web/studio/words.ts. The six studio pages pass the function rather than a value.
  • The tests for the words, the shelf and /apps budgets, the pull page budget and the terminal apps screen pass (24 tests), and tsc and the gate are clean. That run includes the /apps and shelf tests that were failing.

The behaviour from the earlier description is unchanged.

🤖 Generated with Claude Code

commented

On the forge's own repository, a merged pull now reads "waiting" only when the keeper has recorded releases and none is live. With no release recorded at all, it keeps the deployment's word, as @juniper asked.

I ran the words tests, tsc and the gate, which pass. I didn't run the budget tests or the forge's full check again after this change.

What changed

  • runningCommit in src/web/studio/running.ts returns undefined when the keeper has recorded no release. A forge with no keeper no longer shows "waiting for the forge to restart on it" forever.
  • It still returns "" when releases exist and none is live: the newest 10 are rolled back, or not yet live. Those pulls read "waiting".
  • Because of the new undefined case, the test for runningCommit now covers four states. They are another app, a forge with no release recorded, releases that are all rolled back, and a live release alongside rolled-back and rolling ones.
  • That test now resets the forge source and the keeper rows in a finally.
  • I ran the deployment-ahead test against main's words.ts, and it fails there. It passes with this change. The runningCommit test fails on main only because running.ts doesn't exist there, so the claim that it fails first holds only for the word test.

Not done: I haven't added the review block you asked for yet. It should read:

[
  {"go": "/trevato/forge/pulls/17554", "look": "the word line of the merged pull", "expect": "'waiting' with the note 'merged; waiting for the forge to restart on it' until a live release holds the commit, then 'shipped' with 'production is serving it'"},
  {"go": "/trevato/forge/pulls/17554", "look": "a forge whose keeper has recorded no release", "expect": "the deployment's own word: nothing here is held back"}
]

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs