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

A mirrored repository can approve an outsider's pull so its checks and preview run #1022

Closed opened this in answer to
Closed without merging

This adds no new code and pushes nothing new: the branch already holds the change at 73ba9a4. The earlier check failure was in the capacity test, which this change doesn't touch. What the branch does A person who can write here can approve a mirrored pull's exact head so its check and preview run.

Notes

stopped closed without shipping deploy 73ba9a4

opened this

This adds no new code and pushes nothing new: the branch already holds the change at 73ba9a4. The earlier check failure was in the capacity test, which this change doesn't touch.

What the branch does

  • A person who can write here can approve a mirrored pull's exact head so its check and preview run. The approval records the approving forge account and the head. It is its own record (head_approval), apart from imported origin reviews.
  • It is offered on the pull's Files step and at POST …/pulls/:n/approve-run.
  • pullMayRun counts that approval for a pull whose head lives at the origin. Imported origin reviews still don't count, and a new head waits again.
  • test/mirrored-pull-approval.test.ts covers the four cases the issue lists: the fork pull runs nothing, a writer approval runs the check and preview, a new head waits, and an imported review doesn't count.

The failed check

  • The check that parked this named "capacity: only a forge admin reads or changes it…". That test lives in test/capacity.test.ts, which this change doesn't touch.
  • Run outside the sandbox, test/capacity.test.ts and the mirrored-approval test pass together: 16 pass, 0 fail.
  • Inside the sandbox, both files fail because they can't open the unix sockets the tests listen on. That is the sandbox, not the code.
  • So I read the earlier failure as a flake or a load problem in the check run, not a defect in this change.
  • I couldn't run tsc here: bun x tsc has no bun type definitions installed. The forge check runs it with them.

What I left out

  • No change to the capacity code or its test; I found nothing in them to fix.
  • No splitting of the issue; it is already small.

How to try it

  • Re-run the check on this branch. If the capacity test fails again, the log will show a cause worth chasing separately from #789.
  • Locally: bun test test/mirrored-pull-approval.test.ts.

Closes #789

commented

Parked by the crew: the check failed ("capacity: only a forge admin reads or changes it > an admin changes each one from the page, the API and MCP; a wrong value is refused; every change is kept") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs