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

The preview's sample issue has an agent run and an open closing pull, so the issue page's looks show those rows #9683

Merged opened this

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

Merged

The preview's sample issue #1 now has a finished agent run and an open pull that closes it. So `/preview-admin/sample/issues/1` should show both the Runs row and the Closes with row in the looks. The new test passes, along with the nine existing test files that seed a preview. `tsc`, the gate and the design lint are clean.

shipped production is serving it deploy ef71500

opened this

The preview's sample issue #1 now has a finished agent run and an open pull that closes it. So /preview-admin/sample/issues/1 should show both the Runs row and the Closes with row in the looks. The new test passes, along with the nine existing test files that seed a preview. tsc, the gate and the design lint are clean.

  • Run: the seed now records one finished agent run on issue #1. It goes through createRun, claimRun and finishRun, so no agent starts and the cost is $0.
  • Pull: the seeded "Say hello" pull's body now ends "Closes #N", where N is the first issue's number. The existing openPull and closesFromBody pick it up, so the pull stays open and keeps its number.
  • Idempotence: the seed already runs once, guarded by the preview_seeded setting. The test seeds a second time and checks that no run is added and that seeded is false.
  • Test: it is a new block in test/preview-looks.test.ts, not a new preview-seed*.test.ts file. It seeds a fresh data directory and asserts the issue page carries <h2>Runs</h2> and <h2>Closes with</h2>.

A preview whose data directory was already seeded keeps its old sample, because the seed won't run again. It picks up the run and the pull on a fresh preview. I didn't add a migration for the old ones.

scripts/fast.ts found the diff too broad to name tests and started running everything. I couldn't stop that run, so it may still be going in the background. Instead I ran every test file that calls seedPreview.

Closes #9678

commented

The preview's sample issue #1 now has a finished agent run and an open pull that closes it. So /preview-admin/sample/issues/1 should show both the Runs row and the Closes with row in the looks. The new test passes, along with the nine existing test files that seed a preview. tsc, the gate and the design lint are clean.

  • Run: the seed now records one finished agent run on issue #1. It goes through createRun, claimRun and finishRun, so no agent starts and the cost is $0.
  • Pull: the seeded "Say hello" pull's body now ends "Closes #N", where N is the first issue's number. The existing openPull and closesFromBody pick it up, so the pull stays open and keeps its number.
  • Idempotence: the seed already runs once, guarded by the preview_seeded setting. The test seeds a second time and checks that no run is added and that seeded is false.
  • Test: it is a new block in test/preview-looks.test.ts, not a new preview-seed*.test.ts file. It seeds a fresh data directory and asserts the issue page carries <h2>Runs</h2> and <h2>Closes with</h2>.

A preview whose data directory was already seeded keeps its old sample, because the seed won't run again. It picks up the run and the pull on a fresh preview. I didn't add a migration for the old ones.

scripts/fast.ts found the diff too broad to name tests and started running everything. I couldn't stop that run, so it may still be going in the background. Instead I ran every test file that calls seedPreview.

Approved

The preview's issue 1 page shows the Runs row (with "A seeded run") and a Closes with section. The seed uses createRun/claimRun/finishRun and openPull, and the test covers the page and a second seed. Next: (1) mention the seeded run and closing pull in docs/features/preview-owner-looks.md next to the sample description; (2) replace the milestone! non-null assertions with a guard that returns an error Result, so a failed issue create does not throw.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs