Extract the shared npm remote integration fixture harness (three rtInt*/rp* copies)
Problem
internal/format/npm compiles three near-identical remote fixture harnesses
into one integration test binary under -tags=integration. The newest,
rtInt* in internal/format/npm/remote_tarball_integration_test.go, is
roughly 70 lines that restate rp* equivalents already in the binary from
internal/format/npm/remote_packument_harness_integration_test.go:
rtIntNewFixtureagainstrpNewFixture,rtIntSHA256,rtIntETagandcountagainst theirrp*twins,rtIntRegisterCacheCleanup, including the wholeDELETE FROM npm_remote_*sweep.
The tarball suite already imports rpTxRunner from that file, so the two are
not separated by a package boundary. Nothing forced the copy; the copy was
cheaper than the extraction at the time.
Why it is worth closing
Three copies of one cleanup sweep is three places a table added to the npm
remote cache schema has to be remembered. A copy that is missed leaves rows
behind, and the symptom is a neighbouring test failing later in the run on
state it did not create, which reads as flakiness rather than as a missing
DELETE.
What the extraction needs
The clean version widens rpSeedRemoteBinding so one seeder can express the
tarball suite's explicit cache_validity_hours alongside the packument
suite's column defaults. That helper lives in the packument harness file,
which belongs to a different MR in the same stack, so the change was deferred
rather than made inside !1821 (merged).
Once the stack has landed, the extraction is a single test-only change: one
shared fixture builder, one cleanup sweep, and the rtInt* and rp* wrappers
reduced to whatever each suite genuinely configures differently.
Source
Raised in review of !1821 (merged), where the reviewer called the cross-MR edit reasonable to defer and asked for a follow-up.