Public: anyone can read this; the crew can change it.
`discover` and `provider forge` work against a 0.5.x forge, proven by a fixture of its answers #9486
Discovery and repository listing against a 0.5.x forge already worked on main (viaOlderForge in src/origins/discover.ts, listReposOlder in src/origins/providers/forge.ts). What was missing was a checked-in fixture, a test against it, and a version-naming error. I added those.
stopped parked by the crew deploy 87593a5
3 earlier comments
Discovery and repository listing against a 0.5.x forge already worked on main (viaOlderForge in src/origins/discover.ts, listReposOlder in src/origins/providers/forge.ts). What was missing was a checked-in fixture, a test against it, and a version-naming error. I added those. The type check, scripts/gate.ts and the new test pass, as do the four old-forge test files (22 tests). I did not run the full suite; the forge's check does that on the push.
- Fixture:
test/fixtures/forge-0.5.x.jsonholds the answers of a 0.5.29 forge: health, here,/user, a cursor-paged/repos, and a pull with nocheck. Anything not in it answers 404, as that release does. - Test:
test/forge-origin-fixture-0-5.test.tsreplays the fixture and checks three things:discovernames itforge 0.5.29throughhealth.provider forgelists only the account's own repositories,ben/notesandben/secret, from/repos, not/user/repos.getPullCheckfails with a message naming the version it needs.
- Version error: a pull from a forge older than 0.7.355 carries no
check, andgetPullCheckused to report that as no checks. It now fails withFORGE_PULL_CHECK_NEEDS(insrc/origins/words.ts): "this forge is older than 0.7.355 and does not report a pull's check; it needs 0.7.355 or later". The test pins that message. I took 0.7.355 from the first tag containing commit 2cd71225, which added pull checks. The fixture's missingcheckis my reconstruction, not a capture from a real forge.
The first three boxes were already satisfied by existing code, so the new test would pass without any change. Only the error-message part fails without this change. I couldn't run the new test against the original code to confirm that.
I left out re-checking other old-forge limits (comments, labels, hooks). test/forge-to-forge-walk.test.ts and scripts/forge-compat-lab already cover those.
I couldn't use keep_plan because it isn't available in this session, so no plan is on the issue.
I fixed one of the two check failures and pushed. The other, the 19 failures in shard 41, I couldn't reproduce.
- Cause of the fix:
test/origin-words.test.tspins the number of sentences exported fromsrc/origins/words.tsat 7. MyFORGE_PULL_CHECK_NEEDSmade it 8, so the count is now 8. - Shard 41: the agent-talk tests, the home waiting line test and the OAuth expired-state test failed there. I ran the talk, home-waiting and OAuth-code test files here and they pass. I did not touch any code they cover, so I think the failures came from the shard run, not from this change. I haven't found why they failed there. If they fail again on the next check, send me the log from the start of shard 41.
- Checks run:
bun x tsc --noEmitis clean, and those files plustest/origin-words.test.tspass here (95 tests).
Pull description (unchanged except the count fix):
A 0.5.x forge is now replayed from a checked-in fixture of its answers, test/fixtures/forge-0.5.x.json, and test/forge-origin-fixture-0-5.test.ts checks three things against it:
discovernames itforge 0.5.29through/api/v1/health.provider forgelists the account's own repositories through/repos, not/user/repos.- A pull's check, which that release lacks, fails with
FORGE_PULL_CHECK_NEEDS: "older than 0.7.355 … needs 0.7.355 or later". The test pins that message.
Discovery and listing already worked on main (viaOlderForge, listReposOlder), so only the error-message part of the new test would fail without this change. The 0.7.355 figure is the first tag containing commit 2cd71225, which added pull checks. I did not audit other old-forge limits (comments, labels, hooks); the existing walk test and scripts/forge-compat-lab cover those.
I found no cause in my change for the four shard-36 failures, so I changed no code. I merged current main into the branch and pushed, so the check runs again.
- Failing tests: "home waiting line > three asks show one line linking to /review", "what the tokens bought > the numbers add up …", "a long stream > while a turn runs it says running, then asks the client to reconnect" (it hit the 60 s timeout), and "cost and context (#8822) > …".
- What I ran here: the files holding them are
test/home-kpi-row.test.ts,test/returns.test.tsandtest/talk-page.test.ts. They pass on their own (78 pass). They also pass alongside my two files,test/forge-origin-fixture-0-5.test.tsandtest/origin-words.test.ts(83 pass). - Other checks:
bun x tsc --noEmitis clean, and my two files still pass after the merge. - Why I think it's flaky: my change touches only
src/origins/and one new test. The "home waiting line" test also failed in shard 41 on the previous run, so that test looks flaky under shard load. - If it fails again: please send me the failing shard's log from the start of the shard, not just the end. I'd also need to know whether
mainshows the same failures.
Parked by the crew: the check stayed red through 2 automatic tries
Discovery and repository listing against a 0.5.x forge already worked on main (
viaOlderForgeinsrc/origins/discover.ts,listReposOlderinsrc/origins/providers/forge.ts). What was missing was a checked-in fixture, a test against it, and a version-naming error. I added those. The type check,scripts/gate.tsand the new test pass, as do the four old-forge test files (22 tests). I did not run the full suite; the forge's check does that on the push.test/fixtures/forge-0.5.x.jsonholds the answers of a 0.5.29 forge: health, here,/user, a cursor-paged/repos, and a pull with nocheck. Anything not in it answers 404, as that release does.test/forge-origin-fixture-0-5.test.tsreplays the fixture and checks three things:discovernames itforge 0.5.29throughhealth.provider forgelists only the account's own repositories,ben/notesandben/secret, from/repos, not/user/repos.getPullCheckfails with a message naming the version it needs.check, andgetPullCheckused to report that as no checks. It now fails withFORGE_PULL_CHECK_NEEDS(insrc/origins/words.ts): "this forge is older than 0.7.355 and does not report a pull's check; it needs 0.7.355 or later". The test pins that message. I took 0.7.355 from the first tag containing commit 2cd71225, which added pull checks. The fixture's missingcheckis my reconstruction, not a capture from a real forge.The first three boxes were already satisfied by existing code, so the new test would pass without any change. Only the error-message part fails without this change. I couldn't run the new test against the original code to confirm that.
I left out re-checking other old-forge limits (comments, labels, hooks).
test/forge-to-forge-walk.test.tsandscripts/forge-compat-labalready cover those.I couldn't use
keep_planbecause it isn't available in this session, so no plan is on the issue.Closes #9456