Context
These are all verified, low-risk fixes on main @ dafc2ce. They are safe as patches because the SDK never runtime-validates responses (zero .parse/.safeParse in src/service/ — every response is a blind cast like resp.data.job as Job, service.ts:84,94,124), so none of these change SDK runtime behavior. The damage today is type-level lies and broken schemas for consumers who parse manually.
Bugs
1. JobSchema Training literals are typo'd
src/service/job.ts:238 — z.literal("TraningO2D") (missing "i")
src/service/job.ts:243 — z.literal("TraningS3D") (missing "i")
- vs
JobType.TRAINING_O2D = "TrainingO2D" / TRAINING_S3D = "TrainingS3D" (job.ts:47–48)
- Regression introduced in merge
e10fe6e (2.1.0, Jan 2026); 6d8b25b was spelled correctly.
- Effect: the inferred
Job union can never narrow to Training variants; consumer-side JobSchema.parse fails on real server payloads.
- Why it survived: no test parses a Training job through
JobSchema (grep → 0 hits); nyc's 90% per-file line coverage cannot catch a wrong string literal inside a covered expression.
2. Public spec types unreachable — missing barrel exports
src/index.node.ts and src/index.web.ts: missing export * from "./specifications/eval_s3d" and "./specifications/clearance" — while job.ts:24,26 imports both and JobType.EVAL_S3D / CLEARANCE_CALCULATION are public.
src/index.node.ts only: missing export * from "./service/detectors" (present in index.web.ts:7; gap introduced by 248facf). Node consumers can call the 13 detector methods on RealityCaptureService but cannot import DetectorBase, DetectorResponse, DetectorUpdate, etc.
- Deep imports are blocked because the
exports map defines only "." — these types are fully unreachable.
- Note: no tsconfig change needed —
tsconfig.web.json already includes "src/specifications/**/*.ts" via glob.
3. ImportPointCloud commented out of JobSchema while live in JobCreateSchema
- Variant commented out at
job.ts:196–200; ImportPCSpecificationsCreateSchema IS in JobCreateSchema (job.ts:108).
- Effect: submit works;
job.type === JobType.IMPORT_POINT_CLOUD is a TS2367 compile error; consumer-side parse fails.
- Safe to re-enable: Python has the variant enabled and tested (
job.py:55,189; tests/test_job_validator.py:187–200); the TS ImportPCSpecificationsSchema matches the Python model field-for-field.
- The commented-out
JobResponseSchema test (src/tests/service/job.test.ts:149–172) uses IMPORT_POINT_CLOUD — evidently disabled because of this variant; re-enable it as the natural regression test.
4. Small defects in the same area
getAppropriateService lists JobType.TRAINING_O2D twice (job.ts:73,75).
class-validator ^0.14.0 is a production dependency (reality-capture/package.json:54) with zero imports anywhere in src/ or tests (also drags in libphonenumber-js). CI uses --frozen-lockfile=true, so the lockfile refresh must be committed in the same PR.
- Download failures report "Upload" errors:
data_handler.ts:90–100 returns code: "UploadInterrupted" / "UploadFailure" from downloadData. Python correctly uses DownloadInterrupted/DownloadFailure (data_handler.py:80–86).
- Empty-token hardening (interim, 2 lines):
data_handler.ts:214 calls getRealityData("", …) and :223 getBlobUrl("", "", …) — works only because resolveAccessToken (RealityDataClient.ts:153–163, self-described "workaround") silently prefers the options-injected authorizationClient. Pass await authorizationClient.getAccessToken() instead of "" to remove the silent dependence on that precedence. (Full rework tracked in the data-handler sub-issue.)
reality-data-client: deleteRealityData passes "POST" to getRequestConfig (RealityDataClient.ts:661) then calls axios.delete (:666) — cosmetic (axios overrides method) but wrong; dissociateRealityData does it correctly (:697).
Task list
⚠️ Branch coordination (required)
origin/feature/AnalyseV2 and origin/feature/AnalyseRelease26.0.2 (June 2026, commit 27a25de "Updated training specs for release") delete TrainingO2D entirely and keep TraningS3D typo'd (line 236 there). Fixing main alone will merge-conflict and the typo will re-ship on the next Analysis release. Open equivalent fixes there (S3D-only where O2D is deleted) or agree merge order before this lands.
Semver
Patch. Runtime-wise strictly a bug fix (exported schemas start accepting real server payloads they previously rejected). Type-wise, a consumer who wrote case "TraningO2D": against the typo'd literal would get a compile error — theoretical, and the SDK's distribution is GitHub Release tarballs (not npm), so the installed base is minimal. Add a changelog note.
Context
These are all verified, low-risk fixes on
main@dafc2ce. They are safe as patches because the SDK never runtime-validates responses (zero.parse/.safeParseinsrc/service/— every response is a blind cast likeresp.data.job as Job,service.ts:84,94,124), so none of these change SDK runtime behavior. The damage today is type-level lies and broken schemas for consumers who parse manually.Bugs
1.
JobSchemaTraining literals are typo'dsrc/service/job.ts:238—z.literal("TraningO2D")(missing "i")src/service/job.ts:243—z.literal("TraningS3D")(missing "i")JobType.TRAINING_O2D = "TrainingO2D"/TRAINING_S3D = "TrainingS3D"(job.ts:47–48)e10fe6e(2.1.0, Jan 2026);6d8b25bwas spelled correctly.Jobunion can never narrow to Training variants; consumer-sideJobSchema.parsefails on real server payloads.JobSchema(grep → 0 hits); nyc's 90% per-file line coverage cannot catch a wrong string literal inside a covered expression.2. Public spec types unreachable — missing barrel exports
src/index.node.tsandsrc/index.web.ts: missingexport * from "./specifications/eval_s3d"and"./specifications/clearance"— whilejob.ts:24,26imports both andJobType.EVAL_S3D/CLEARANCE_CALCULATIONare public.src/index.node.tsonly: missingexport * from "./service/detectors"(present inindex.web.ts:7; gap introduced by248facf). Node consumers can call the 13 detector methods onRealityCaptureServicebut cannot importDetectorBase,DetectorResponse,DetectorUpdate, etc.exportsmap defines only"."— these types are fully unreachable.tsconfig.web.jsonalready includes"src/specifications/**/*.ts"via glob.3.
ImportPointCloudcommented out ofJobSchemawhile live inJobCreateSchemajob.ts:196–200;ImportPCSpecificationsCreateSchemaIS inJobCreateSchema(job.ts:108).job.type === JobType.IMPORT_POINT_CLOUDis a TS2367 compile error; consumer-side parse fails.job.py:55,189;tests/test_job_validator.py:187–200); the TSImportPCSpecificationsSchemamatches the Python model field-for-field.JobResponseSchematest (src/tests/service/job.test.ts:149–172) usesIMPORT_POINT_CLOUD— evidently disabled because of this variant; re-enable it as the natural regression test.4. Small defects in the same area
getAppropriateServicelistsJobType.TRAINING_O2Dtwice (job.ts:73,75).class-validator ^0.14.0is a production dependency (reality-capture/package.json:54) with zero imports anywhere insrc/or tests (also drags inlibphonenumber-js). CI uses--frozen-lockfile=true, so the lockfile refresh must be committed in the same PR.data_handler.ts:90–100returnscode: "UploadInterrupted"/"UploadFailure"fromdownloadData. Python correctly usesDownloadInterrupted/DownloadFailure(data_handler.py:80–86).data_handler.ts:214callsgetRealityData("", …)and:223getBlobUrl("", "", …)— works only becauseresolveAccessToken(RealityDataClient.ts:153–163, self-described "workaround") silently prefers the options-injectedauthorizationClient. Passawait authorizationClient.getAccessToken()instead of""to remove the silent dependence on that precedence. (Full rework tracked in the data-handler sub-issue.)reality-data-client:deleteRealityDatapasses"POST"togetRequestConfig(RealityDataClient.ts:661) then callsaxios.delete(:666) — cosmetic (axios overridesmethod) but wrong;dissociateRealityDatadoes it correctly (:697).Task list
TraningO2D→TrainingO2D(job.ts:238) andTraningS3D→TrainingS3D(job.ts:243)TRAINING_O2DingetAppropriateService(job.ts:73,75)ImportPointCloudvariant inJobSchema(job.ts:196–200)JobResponseSchematest (job.test.ts:149–172)JobSchema.parseregression tests for TrainingO2D / TrainingS3D / ImportPointCloud server-shaped payloadseval_s3d+clearanceexports toindex.node.tsandindex.web.tsdetectorsexport toindex.node.tssrc/service/detectors.tsto thetsconfig.web.jsoninclude whitelist for consistencyclass-validatorfrom dependencies + refreshpnpm-lock.yamlin the same PRdata_handler.ts:90–100data_handler.ts:214,223reality-data-client:"POST"→"DELETE"indeleteRealityData(RealityDataClient.ts:661)origin/feature/AnalyseV2andorigin/feature/AnalyseRelease26.0.2(June 2026, commit27a25de"Updated training specs for release") delete TrainingO2D entirely and keepTraningS3Dtypo'd (line 236 there). Fixingmainalone will merge-conflict and the typo will re-ship on the next Analysis release. Open equivalent fixes there (S3D-only where O2D is deleted) or agree merge order before this lands.Semver
Patch. Runtime-wise strictly a bug fix (exported schemas start accepting real server payloads they previously rejected). Type-wise, a consumer who wrote
case "TraningO2D":against the typo'd literal would get a compile error — theoretical, and the SDK's distribution is GitHub Release tarballs (not npm), so the installed base is minimal. Add a changelog note.