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

A push to main recombines every open kept-fork pull, so its combined preview is never stale for long #9976

Parked opened this
Closed without merging

A push to a repository's default branch now rebuilds combined/N for every open kept-fork pull into it, so the card's stale line clears once the rebuild finishes. The earlier check on #9941 stayed red, and I did not find why.

Notes

stopped parked by the crew deploy 54e4c39

opened this

A push to a repository's default branch now rebuilds combined/N for every open kept-fork pull into it, so the card's stale line clears once the rebuild finishes. The earlier check on #9941 stayed red, and I did not find why. Rerunning against the current main shows green, so the cause may have been the flaky crawlers-screen test that main's last commit already fixes. This push merges the current main into the branch and adds no new code.

What changed

  • Recombine pass: src/core/recombine.ts runs one pass at a time per repository. Pushes that arrive during a pass coalesce into one more pass that reads the tip as it then stands.
  • Trigger: the post-receive handler in src/http/server.ts starts the pass after the hook has answered, only for a non-delete push to the default branch.
  • Failures: a failed rebuild leaves the card stale with the failure's sentence. The next successful rebuild clears it. The sentence lives in memory only, so a restart loses it.
  • Card: src/core/combined_view.ts words the failure in the stale line.
  • Docs: docs/features/upstream-landing.md drops the "stale until next push" paragraph and the matching "Not yet" item.
  • Tests: test/combined-recombine.test.ts pushes to main alone and asserts combined/N has the new main as a parent and the page shows no "Stale". It also covers a failed rebuild keeping and then clearing its sentence, and a burst of requests running one pass at a time. The stale-after-main-push check in test/combined-fork.test.ts is gone, because that page now recombines by itself and can't be seen stale there. It only pushes main before landing now.

Checks run: bun scripts/gate.ts, tsc --noEmit and the design lint are clean, and 226 tests pass across the combined-fork/check/recombine, pull, check, landing, migration and related files. scripts/fast.ts found the diff too broad to name a set, so I picked those files myself and did not run the full suite.

Left out

  • Default branch only: a pull whose base is another branch is not recombined on a push to that branch.
  • Landing race: a merge landing at the same moment as a background pass can lose the compare-and-set on update-ref, so that merge lands the head instead of the combined branch. I added no retry.

To try it, push to main alone in a repository with an open kept-fork pull and reload the pull page. combined/N has the new main as a parent and no "Stale" line shows.

Closes #9931

3 earlier comments
commented

A push to a repository's default branch now rebuilds combined/N for every open kept-fork pull into it, so the card's stale line clears once the rebuild finishes. The earlier check on #9941 stayed red, and I did not find why. Rerunning against the current main shows green, so the cause may have been the flaky crawlers-screen test that main's last commit already fixes. This push merges the current main into the branch and adds no new code.

What changed

  • Recombine pass: src/core/recombine.ts runs one pass at a time per repository. Pushes that arrive during a pass coalesce into one more pass that reads the tip as it then stands.
  • Trigger: the post-receive handler in src/http/server.ts starts the pass after the hook has answered, only for a non-delete push to the default branch.
  • Failures: a failed rebuild leaves the card stale with the failure's sentence. The next successful rebuild clears it. The sentence lives in memory only, so a restart loses it.
  • Card: src/core/combined_view.ts words the failure in the stale line.
  • Docs: docs/features/upstream-landing.md drops the "stale until next push" paragraph and the matching "Not yet" item.
  • Tests: test/combined-recombine.test.ts pushes to main alone and asserts combined/N has the new main as a parent and the page shows no "Stale". It also covers a failed rebuild keeping and then clearing its sentence, and a burst of requests running one pass at a time. The stale-after-main-push check in test/combined-fork.test.ts is gone, because that page now recombines by itself and can't be seen stale there. It only pushes main before landing now.

Checks run: bun scripts/gate.ts, tsc --noEmit and the design lint are clean, and 226 tests pass across the combined-fork/check/recombine, pull, check, landing, migration and related files. scripts/fast.ts found the diff too broad to name a set, so I picked those files myself and did not run the full suite.

Left out

  • Default branch only: a pull whose base is another branch is not recombined on a push to that branch.
  • Landing race: a merge landing at the same moment as a background pass can lose the compare-and-set on update-ref, so that merge lands the head instead of the combined branch. I added no retry.

To try it, push to main alone in a repository with an open kept-fork pull and reload the pull page. combined/N has the new main as a parent and no "Stale" line shows.

commented

I made no code change for this failure. I pushed an empty commit to re-run the check.

The only failure was shard 20, killed after 23 s while running test/web.test.ts. The log shows no failed assertion; the other 67 shards passed with 0 failures. Locally that file passes in about 2.2 s, 42 of 42, on four consecutive runs. I read the new code that runs after a push to the default branch (src/core/recombine.ts and its call in src/http/server.ts). It runs after the hook has answered, one pass per repository, and catches its own errors, so I found nothing in it that would hang the hook.

I don't know why the shard was killed. A slow or loaded machine is my guess, not something I confirmed. If shard 20 is killed again on the same file, that points at my change and needs a closer look.

What the pull does: a push to a repository's default branch now rebuilds combined/N on the new tip for every open pull from a kept fork, so the combined card goes stale only while the rebuild runs. Passes run one at a time per repository. Pushes that arrive during a pass are coalesced into one more pass. A landing waits for any running pass. A rebuild that fails keeps its failure sentence on the card.

Not done: the rebuild queue is in memory only, so a restart drops any pass that was pending.

To try: push to main of a repository that has a kept-fork pull open, then look at that pull's page. The new tests are in test/combined-recombine.test.ts.

commented

This pull makes no code change in this push. The failed check was the forge killing shard 13 on a loaded machine, not a test failure.

  • Failure: the log shows 262 tests passing and 0 failing in that shard. The kill came at 39 s while it was running test/tui-sentinel.test.ts.
  • Local run: test/tui-sentinel.test.ts passes here, 3 tests in 1.5 s.
  • Shard 20: the test/web.test.ts kill in the same check was the same kind of load kill.
  • What I pushed: an empty commit, 54e4c399, so the forge runs the check again. Nothing else changed.
  • If shard 13 is killed again: the next step is to cut how much the sentinel suite does, or raise the per-shard time limit.
commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs