Summary
Five packages send a hardcoded SDK_VERSION string to the Sapiom backend as part of requestFacts.sdk.version / sdkVersion telemetry, instead of reading it from package.json. All five have drifted from their actual published version:
| Package |
Hardcoded SDK_VERSION |
Actual package.json version |
@sapiom/axios |
"1.0.0" |
0.5.1 |
@sapiom/fetch |
"1.0.0" |
0.5.0 |
@sapiom/node-http |
"1.0.0" |
0.4.1 |
@sapiom/langchain-classic |
"1.0.0" (×4 separate declarations, each tagged // TODO: Read from package.json) |
0.5.1 |
@sapiom/langchain |
"0.4.1" (tagged // TODO: Read from package.json at build time) |
0.5.1 |
Impact
This value is sent to Sapiom's transaction API on every request (requestFacts.sdk.version in packages/axios/src/interceptors.ts, packages/fetch/src/interceptors.ts, packages/node-http/src/interceptors.ts, and the LangChain equivalents). Since it never tracks the real package version, any version-based analytics, support triage, or deprecation logic on the backend that keys off this field is working from stale/wrong data for every user of these five packages — every axios/fetch/node-http user currently reports as "1.0.0" regardless of what they actually have installed.
Root cause
@sapiom/tools already solves this correctly: packages/tools/scripts/generate-version.mjs reads package.json at build/test/typecheck time and writes a gitignored src/_generated/version.ts with export const VERSION = <package.json version>, wired in via a gen:version npm script chained into build, test, test:coverage, test:watch, dev, and typecheck — so it can never go stale, including after a Changesets version bump. axios, fetch, node-http, langchain, and langchain-classic never adopted this pattern; they each just wrote a literal string, and in two of the five, a // TODO: Read from package.json comment shows the gap was already known but never closed.
Suggested fix
Apply the same generate-version.mjs / gen:version pattern already used by @sapiom/tools to the other five packages, and replace each hardcoded SDK_VERSION constant with an import from the generated file. Happy to open a PR — I already have this implemented and verified (build/test/typecheck/lint all clean, zero new test failures or lint issues in any of the five packages).
Summary
Five packages send a hardcoded
SDK_VERSIONstring to the Sapiom backend as part ofrequestFacts.sdk.version/sdkVersiontelemetry, instead of reading it frompackage.json. All five have drifted from their actual published version:SDK_VERSIONpackage.jsonversion@sapiom/axios"1.0.0"0.5.1@sapiom/fetch"1.0.0"0.5.0@sapiom/node-http"1.0.0"0.4.1@sapiom/langchain-classic"1.0.0"(×4 separate declarations, each tagged// TODO: Read from package.json)0.5.1@sapiom/langchain"0.4.1"(tagged// TODO: Read from package.json at build time)0.5.1Impact
This value is sent to Sapiom's transaction API on every request (
requestFacts.sdk.versioninpackages/axios/src/interceptors.ts,packages/fetch/src/interceptors.ts,packages/node-http/src/interceptors.ts, and the LangChain equivalents). Since it never tracks the real package version, any version-based analytics, support triage, or deprecation logic on the backend that keys off this field is working from stale/wrong data for every user of these five packages — every axios/fetch/node-http user currently reports as"1.0.0"regardless of what they actually have installed.Root cause
@sapiom/toolsalready solves this correctly:packages/tools/scripts/generate-version.mjsreadspackage.jsonat build/test/typecheck time and writes a gitignoredsrc/_generated/version.tswithexport const VERSION = <package.json version>, wired in via agen:versionnpm script chained intobuild,test,test:coverage,test:watch,dev, andtypecheck— so it can never go stale, including after a Changesets version bump.axios,fetch,node-http,langchain, andlangchain-classicnever adopted this pattern; they each just wrote a literal string, and in two of the five, a// TODO: Read from package.jsoncomment shows the gap was already known but never closed.Suggested fix
Apply the same
generate-version.mjs/gen:versionpattern already used by@sapiom/toolsto the other five packages, and replace each hardcodedSDK_VERSIONconstant with an import from the generated file. Happy to open a PR — I already have this implemented and verified (build/test/typecheck/lintall clean, zero new test failures or lint issues in any of the five packages).