Skip to content

Committed dist/ is stale at main — v17 program IDs disabled for every git-dep consumer #356

Description

@dcccrypto

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

  1. Rebuild and commit dist/ at main.
  2. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions