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

Shipped means production is serving it: the studio's words come from facts, not a regex on a summary #68

Merged opened this

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

Merged

Pushed. Here's the summary of the work:

shipped production is serving it deploy bf488b2

opened this

Pushed. Here's the summary of the work:

wordFor and checkWord decided the studio's five words by matching regexes against run.summary — free text — and defaulted anything unmatched to shipped. That meant a finished agent run that wrote a doc, declined, or pushed a branch with no pull was reported as shipped, and a merged pull was called shipped the instant it merged, regardless of whether production had redeployed.

What changed (src/web/pages/studio.ts, src/core/pulls.ts, docs/STUDIO.md, test/studio.test.ts):

  • runWord and pullWord are now the single place a word is decided, from facts: a run's own state, and — once it's over — the pull it produced (found via the pull's own issueId for review runs, or its head_branch matching the run's branch, the same fact landWork already uses). No pull found on a finished run reads as planned, never shipped.
  • pullWord judges an open pull by its check (checkRunWord), a closed-without-merge pull as stopped, and a merged pull as shipped only once production's live commit is at or past the merge commit — a git ancestry check (mergeBase), not equality, so a later merge that's already live still counts. Between merge and production catching up, the word is honest: working while deploying, stopped if that deploy failed, waiting if it hasn't started.
  • Both the app page's "Now" list and the change page (studioPull) now call these same two functions; pullForBranch is the one new core query, added to core/pulls.ts.
  • Added test/studio.test.ts coverage for the three required cases (merged-but-not-served pull, a no-pull agent run, a deploy serving with failed tests) — all confirmed failing before this change and passing after.

What's left for a reviewer to look at: board.ts was deliberately left untouched — it doesn't currently render these five words (its "Landed" region is a static list, not a word badge), so there's nothing to point at the shared function yet; if a future change adds a word badge there, it should call pullWord/runWord rather than re-deriving. Full check suite passes except three pre-existing failures unrelated to this change (git-push-over-HTTP auth in the sandbox, confirmed to fail identically on main).

Budget reached at $4.28; this is where it stopped.

Closes #54

commented

Pushed. Merged main in and resolved the conflicts:

  • test/studio.test.ts: the two branches had each appended a new describe block at the same spot (mine for runWord/pullWord, main's for the new /:owner/:name/runs/:id transcript page), so git interleaved them into one broken block. Un-interleaved them back into two complete, sequential blocks, and merged the two changed import lists.
  • docs/STUDIO.md: my new explanatory paragraph had landed inside the five-words table, splitting off the "asks you" row. Moved the row back into the table and updated a stale checkWord reference (from main's new "The look" section) to pullWord.
  • src/web/pages/studio.ts / src/web/pages/runs.ts: main added a new studioRun page (the run's own transcript view) that still called the old wordFor, which no longer exists on this branch. Made studioRun and its caller runPage async, and had it build a WordCtx and call runWord — the same fact-based path every other surface uses.
  • One of main's new tests ("a finished run renders in the studio's own word, with no Stop") asserted data-word="look" from a run whose summary text said "opened pull #9", with no real pull behind it — that only worked under the old regex parsing. Updated it to actually open a matching pull on the run's branch, so it now exercises (and passes under) the fact-based runWord.

Verified: tsc --noEmit clean, test/studio.test.ts passes (27/27), and the full check suite from forge.json passes with the same 6 pre-existing, environment-only failures as on main (git-push-over-HTTP auth unavailable in this sandbox) — confirmed identical before and after this merge, so nothing regressed.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs