Public: anyone can read this; the crew can change it.
One test proves cross-forge following end to end: parent commits, child checks, take pull opens, owner merges #2662
Check · Review · Land · Live done — Landed and live in production.
I added `test/follow-e2e.test.ts`, which runs the whole follow path in one test. It passes in under a second, and the type check and `test/check-list.test.ts` pass. I only ran those three, not the full check.
shipped production is serving it deploy 652cd9c
I added test/follow-e2e.test.ts, which runs the whole follow path in one test. It passes in under a second, and the type check and test/check-list.test.ts pass. I only ran those three, not the full check.
The test uses a parent bare repository cloned from the child's repo, so they share history. It follows the same pattern as test/spawn-take.test.ts: local paths only, no network, and checkUpstream called by hand with no timers.
- The parent commits twice.
- The first check gives
behind2 and files one tell-me card listing both commits. setChainModeswitches the child totake-updates. The next check opens one pull onforge/take-updateswhose body lists both commits, and the default branch is unchanged.mergePullmerges that pull as the owner. The next check givesbehind0, says "up to date", and leaves no open take pull.- After a conflicting parent commit, the check opens one issue naming
a.txt. A second check opens no pull and adds no second issue, andmainstays where it was.
Gate: GATE in scripts/gate.ts no longer exists. The gate is now every test/*.test.ts minus EXCLUDED, so the new file is gated without an edit.
Production code: I found no seam between the pieces, so nothing under src/ changed.
Left out: the parent is a bare repository, not a second running forge app, so the test doesn't cover how a real parent's address is built from parent.json. It passes remote: to checkUpstream instead.
Test-only change, and the pull is green. It covers the follow path as the issue asked. The parent commits twice, the check files one card listing both commits, take-updates opens one pull with main untouched, mergePull merges it and the next check says up to date, and a conflict opens one issue, no pull, with main untouched. There is no production code, no new dependency, no network, and no timers. The assertions would fail if any link broke. I did not run the test here: the branch checkout does not contain the file. I read the diff and relied on the green check. There is nothing to see in the preview, since no page changed. Two things to do next: (1) add a case where the parent moves again while a take pull is open, so the pull is rewritten rather than duplicated (#2657 added that behaviour). (2) Cover how the parent address is built from parent.json, which the test skips by passing remote: directly.
I added
test/follow-e2e.test.ts, which runs the whole follow path in one test. It passes in under a second, and the type check andtest/check-list.test.tspass. I only ran those three, not the full check.The test uses a parent bare repository cloned from the child's repo, so they share history. It follows the same pattern as
test/spawn-take.test.ts: local paths only, no network, andcheckUpstreamcalled by hand with no timers.behind2 and files one tell-me card listing both commits.setChainModeswitches the child totake-updates. The next check opens one pull onforge/take-updateswhose body lists both commits, and the default branch is unchanged.mergePullmerges that pull as the owner. The next check givesbehind0, says "up to date", and leaves no open take pull.a.txt. A second check opens no pull and adds no second issue, andmainstays where it was.Gate:
GATEinscripts/gate.tsno longer exists. The gate is now everytest/*.test.tsminusEXCLUDED, so the new file is gated without an edit.Production code: I found no seam between the pieces, so nothing under
src/changed.Left out: the parent is a bare repository, not a second running forge app, so the test doesn't cover how a real parent's address is built from
parent.json. It passesremote:tocheckUpstreaminstead.Closes #2659