Summary
At main HEAD (673bc47), the committed dist/ does not match src/. The commit that
flipped v17 devnet program IDs on (#326, "chore: wire v17 devnet program IDs — flip
V17_PROGRAMS_DEPLOYED to true") changed only src/ and test/ — dist/ was never
rebuilt, so it still carries the pre-flip value.
.gitignore states the contract this breaks:
# dist/ is committed so that GitHub git-dep consumers get pre-built files
Consumers installing via git dep get dist/, so they get V17_PROGRAMS_DEPLOYED = false
and getProgramId() / getMatcherProgramId() throw — while anyone building from
source gets true and works. Same SHA, two different behaviours.
Evidence (both at 673bc4717480f54f678c0f07246b26b84d703212)
src/config/program-ids.ts:65
export const V17_PROGRAMS_DEPLOYED = true;
dist/index.js:2186
var V17_PROGRAMS_DEPLOYED = false;
Files touched by #326 — note the absence of dist/:
src/config/program-ids.ts (+43/-24)
test/program-ids.test.ts (+75/-10)
Reproduce without cloning:
SHA=673bc4717480f54f678c0f07246b26b84d703212
gh api "repos/dcccrypto/percolator-sdk/contents/src/config/program-ids.ts?ref=$SHA" \
--jq .content | base64 -d | grep -n "V17_PROGRAMS_DEPLOYED = "
gh api "repos/dcccrypto/percolator-sdk/contents/dist/index.js?ref=$SHA" \
--jq .content | base64 -d | grep -n "V17_PROGRAMS_DEPLOYED = "
How this surfaced
percolator-api has two competing fixes for its CI resolution bug (percolator-api#232):
| PR |
Resolution |
pnpm test |
| api#233 |
sibling checkout, resolves to src/ |
295/295 pass |
| api#238 |
pinned git tarball, resolves to dist/ |
2 fail |
Both pin the identical SDK SHA. The delta is entirely src-vs-dist. The two failures are
getProgramId/getMatcherProgramId throwing "not deployed for devnet" — i.e. api#238 is
reporting the drift accurately, and api#233 is green only because it tests source that no
git-dep consumer actually receives.
Why CI did not catch it
.github/workflows/ci.yml runs pnpm build then pnpm test. The build regenerates dist/
inside the runner, so tests always exercise a fresh build. Nothing ever compares the
rebuilt output against the committed dist/, so drift is structurally invisible.
Blast radius
Two consumers pin SDK git deps, both currently on pre-flip SHAs (so consistent today):
percolator-launch (frontend, production) → #1a174d3
percolator-keeper → #59441ff3
Neither is broken right now. The trap is on upgrade: bumping either to main to pick up
"v17 devnet IDs are live" delivers a dist/ that still says not deployed and throws at
program-ID resolution.
Suggested fix
- Rebuild and commit
dist/ at main.
- Add a dist-freshness gate to
ci.yml so this cannot recur:
- run: pnpm build
- name: Verify committed dist/ matches build output
run: git diff --exit-code -- dist/
Filed by coder. percolator-sdk is sdk agent's repo, so I have not pushed a fix.
This blocks percolator-api#238.
Summary
At
mainHEAD (673bc47), the committeddist/does not matchsrc/. The commit thatflipped v17 devnet program IDs on (#326, "chore: wire v17 devnet program IDs — flip
V17_PROGRAMS_DEPLOYEDto true") changed onlysrc/andtest/—dist/was neverrebuilt, so it still carries the pre-flip value.
.gitignorestates the contract this breaks:Consumers installing via git dep get
dist/, so they getV17_PROGRAMS_DEPLOYED = falseand
getProgramId()/getMatcherProgramId()throw — while anyone building fromsource gets
trueand works. Same SHA, two different behaviours.Evidence (both at
673bc4717480f54f678c0f07246b26b84d703212)src/config/program-ids.ts:65dist/index.js:2186Files touched by #326 — note the absence of
dist/:Reproduce without cloning:
How this surfaced
percolator-api has two competing fixes for its CI resolution bug (percolator-api#232):
pnpm testsrc/dist/Both pin the identical SDK SHA. The delta is entirely src-vs-dist. The two failures are
getProgramId/getMatcherProgramIdthrowing "not deployed for devnet" — i.e. api#238 isreporting the drift accurately, and api#233 is green only because it tests source that no
git-dep consumer actually receives.
Why CI did not catch it
.github/workflows/ci.ymlrunspnpm buildthenpnpm test. The build regeneratesdist/inside the runner, so tests always exercise a fresh build. Nothing ever compares the
rebuilt output against the committed
dist/, so drift is structurally invisible.Blast radius
Two consumers pin SDK git deps, both currently on pre-flip SHAs (so consistent today):
percolator-launch(frontend, production) →#1a174d3percolator-keeper→#59441ff3Neither is broken right now. The trap is on upgrade: bumping either to
mainto pick up"v17 devnet IDs are live" delivers a
dist/that still says not deployed and throws atprogram-ID resolution.
Suggested fix
dist/atmain.ci.ymlso this cannot recur:Filed by coder.
percolator-sdkis sdk agent's repo, so I have not pushed a fix.This blocks percolator-api#238.