Skip to content

fix(sdks): all four SDKs compile, are gated in CI, and stop reporting work they never did - #327

Merged
scttfrdmn merged 9 commits into
mainfrom
fix/js-sdk-typecheck-and-fabrications
Aug 3, 2026
Merged

scttfrdmn merged 9 commits into
mainfrom
fix/js-sdk-typecheck-and-fabrications

Conversation

@scttfrdmn

@scttfrdmn scttfrdmn commented Aug 3, 2026 •

Copy link
Copy Markdown
Owner

Completes the code half of #325 in all four SDKs (the honest-throw option (2) that issue proposes), and steps 1-3 of #314.

Deliberately not Closes #325: that issue names the real implementation as its remaining scope — "The Python side and the real implementation are this issue" — and this PR transfers no bytes. Auto-closing it would retire the ticket for work nobody has done. #314 is already closed; its remaining dependency bumps are now #328.

What was wrong

npx tsc reported 48 errors across seven files, and had done since before the SDK's first release — so npm run build had never succeeded and dist/ had never existed.

The reason it survived that long is structural, and is the first thing fixed here: npm test runs jest, and ts-jest only typechecks the files a test imports. src/mount.ts imports nothing testable and was compiled by nothing at all, so src/index.ts could ship export { StorageAdapter } from './storage' — a name that has never existed in that module — through a release without one job noticing.

Three real defects behind the type errors

Each was proven with a runtime probe before being fixed, not inferred from the compiler message.

1. The configuration merge was one level deep. The constructor did { s3: {...defaults, ...cfg?.storage?.s3}, ...cfg?.storage }, which puts the caller's whole storage last and discards the s3 it had just merged. Every preset silently lost the defaults it did not itself name, and two of the five shipped presets could not pass their own validate():

  • fromPreset('cost-optimized') produced an S3Config with no region → S3 region is required
  • fromPreset('cluster') set tlsEnabled: true, which validate() rejects without certificate paths a preset cannot know

Fixed with a shared deep merge. The constructor and merge() now take DeepPartial<Configuration>, which is what the preset table always meant — the eleven TS2739 "is missing the following properties" errors were reporting precisely that Partial<T> is one level deep. cluster no longer presets tlsEnabled; the caller holds the certificates.

2. isMounted missed ObjectFS's own mounts. It tested /proc/mounts for fstype === 'fuse' exactly, and ObjectFS mounts report fuse.s3 — internal/fuse/mount.go:134 sets Subtype: "s3". Only the device.includes('objectfs') fallback was saving it. Both isMounted and listMounts now accept the fuse.* form.

3. createClient overrode a caller's config with undefined. {...options, config} with config possibly undefined sets the key, so passing both a file path and options.config silently discarded the latter. It omits the key instead — type-correct under exactOptionalPropertyTypes and behaviour-correct.

Ten methods that reported success for work they never did

The worst wrote to disk. S3StorageAdapter.downloadObject did fs.writeFile(localPath, 'Simulated file content from S3'), called progressCallback(30, 30), and returned 30 — so a caller following the README's own example, which passed /tmp/downloaded-file.txt, destroyed whatever was at that path and was told the transfer succeeded.

Also: listObjects returned two invented objects; getObjectInfo a fixed size and etag for any key whether or not it existed; uploadObject and deleteObject true for transfers and deletions that never happened; joinCluster/leaveCluster true without contacting a node; getClusterStatus a healthy single-node cluster for any configuration, without querying anything; clearCache/warmCache success for every path given.

All now throw a typed error naming #325 — following the precedent already set in this repository by getPerformanceStats, internal/distributed/coordinator.go:547-602 and the loud EROFS stubs in internal/fuse/filesystem.go. This SDK has no S3 client and no control-plane client; the README now says so, and points at the AWS SDK or a mount.

The gate

npm run lint had also never run: eslintConfig.extends said "@typescript-eslint/recommended" without the required plugin: prefix, so eslint exited with "couldn't find the config to extend from" before reading a line of source. A script that always errors and is never invoked is indistinguishable from one that passes.

CI's sdk-metrics job now runs build and lint as their own steps, ordered before npm test, and installs with npm ci against a committed package-lock.json — so what CI tests is what a developer installs, and a Dependabot alert tracks the copy actually in the tree rather than a manifest range.

Verification

before after
npx tsc --noEmit 48 errors 0
npm run build never succeeded succeeds, emits dist/
npm test 1 suite 3 suites, 61 tests
npm run lint could not run 0 errors, 23 pre-existing no-explicit-any warnings

Both behaviour fixes verified by mutation, not by assertion:

  • reverting deepMergeInto to the one-level spread → 6 failures, including every shipped preset validates
  • restoring the fabricating downloadObject → 2 failures, including the assertion that the caller's existing file is untouched

A runtime probe against the built dist/ passed 18/18 checks.

The new configuration assertions come in pairs — override applied and siblings survived — because a one-level spread passes any test that only checks the override, which is how this lived through a release.

The Python SDK, same fabrications, same fix

Added in d7c1d71, which closes the other half of #325. This SDK carried the identical set, and StorageAdapter._download_s3_object did the identical damage — open(local_path, 'wb').write(b"Simulated file content from S3"), progress_callback(30, 30), return 30. Proven by execution before being touched: against a file containing other text it printed returned 30 bytes; file now contains: 'Simulated file content from S3'.

Fifteen fabricating methods, not five. The GCS and Azure backends were copies: _list_gcs_objects, _list_azure_objects and their eight siblings each called the S3 method, so a gs:// or az:// URI returned the same two invented S3 objects under a docstring describing a "simplified implementation" of a different cloud. The ten extra names are now class-level aliases onto one honest raise. Scheme dispatch stays — rejecting an unsupported scheme is a real thing to do.

Three genuine defects found alongside:

  • from_preset('cluster') could not pass its own validate() — it set security.tls_enabled = True, which SecurityConfig.validate() rejects without certificate paths a preset cannot know. Same defect as the JavaScript cluster preset, found the same way: by a loop over the preset names, not by inspection. A hand-written two-preset probe had already missed the equivalent on the JS side.
  • from objectfs import NetworkError was an ImportError. Six exceptions were declared in .exceptions and re-exported by nothing, so the Python README's own error-handling example could not run. CacheError among them — which the newly raising clear_cache/warm_cache require a caller to be able to name.
  • StorageError wrapped in StorageError. Adapter and client both wrapped everything from the layer below, so the CLI printed Failed to list objects: Failed to list objects: <the actual reason>. Nine handlers now re-raise the specific error unchanged.

objectfs-python storage {list,download,upload} keep their subcommands so they fail naming the reason rather than as an unrecognized-argument error, but --help now says NOT IMPLEMENTED on all three; it described them as working, and the README showed storage download s3://my-bucket file.txt ./local-file.txt, which overwrote its target and printed Successfully downloaded 30 bytes.

Verification: 71 tests and 25 subtests across tests/test_storage.py, tests/test_config.py and tests/test_client.py, up from a single metrics suite. Mutation-verified rather than asserted — restoring the fabricating download and the preset's TLS flag produced exactly the five expected failures (including test_existing_file_survives and the cluster subtest), and restoring the double-wrap failed exactly the two assertions written for it. The CI step is renamed from "Python SDK metrics parsing" to "Python SDK tests": it invokes pytest tests/ and had been picking up more than its name claimed.

The Java SDK had never compiled

Added in c48ddd6. Not in #325's report — found by going looking for the same structural gap in the third SDK, on the reasoning that a compiler no CI job invokes is a gate that does not exist. Nothing in this repository had ever run Maven, and mvn compile failed with four errors:

  • ObjectFSClient imports com.fasterxml.jackson.datatype.jsr310.JavaTimeModule and registers it in its constructor, but pom.xml declared only jackson-databind → package com.fasterxml.jackson.datatype.jsr310 does not exist
  • two catch (NotFoundException | ObjectFSException e) clauses, which javac rejects: "Alternatives in a multi-catch statement cannot be related by subclassing." NotFoundException extends ObjectFSException, so catching the supertype alone is legal and exactly equivalent

With it building, the 17 tests ran for the first time and one failed — a real expectation error, not a flake. list_includesPrefixAndLimitParams asserted the path contains prefix=my/prefix; okhttp percent-encodes / in a query value, so it carries prefix=my%2Fprefix. Established by probing okhttp directly rather than from its documentation. The implementation was right. The test now asserts the encoded form and that the server decodes it back to my/prefix, so it still means "the prefix arrives intact" rather than "okhttp escapes slashes."

The compiler plugin also moves from source+target 17 to release 17, which its own build warning had asked for on every run: -source/-target on a newer JDK accepts APIs absent from the target platform, producing a jar that compiles clean and throws NoSuchMethodError on the version it claims to target.

mvn -B test is now a CI step. 17/17 pass, BUILD SUCCESS, no warnings.

The C SDK built, but nothing had linked against its header

Added in 62683d7, the fourth and last SDK. This one did build — sdks/c is a package of the main module, so go build ./... compiled its cgo Go side all along. What no job did was link a C program against the shared library and run it, so objectfs.h, objectfs_types.h and the assertions in tests/test_basic.c were unverified: a header could declare a struct field too narrow for the value written into it and every job would stay green.

Three defects, each proven by execution before being touched:

  • A maximum-length S3 key came back one byte short. objectfs_info_t.key was char[1024] against an S3 key limit of 1024 bytes — 1023 plus the terminator — so fillInfo truncated a legal key with no error returned. Worst in objectfs_list, where the key is the result rather than an input and so cannot be compared against anything: a truncated key names a different object, and handing it back to objectfs_get or objectfs_delete acts on the wrong key. Now char[1025], and fillInfo's capacities derive from the arrays with unsafe.Sizeof instead of repeating 1024/128/128 — widening the declaration alone would have left its only writer still cutting at 1023, which is the shape of the original bug.
  • objectfs_last_error leaked on every call for a freed handle. objectfs.h documents the pointer as library-owned and must-not-free; the freed-or-never-issued arm returned a fresh C.CString each time, so the caller could not free it and the library never did. Three calls, three addresses — now one. This is the path a program takes when it is already failing, frequently in a retry loop.
  • cache_bytes silently lost up to half the requested size. Documented as "size in bytes"; bytesToCacheString integer-divided by 1 GiB / 1 MiB and formatted the quotient, so 1.5 GiB became "1GB" and 2047 MiB became "1GB", losing 1023 MiB. Invisible from C — nothing echoes the size back, and a half-sized cache still works, just with a worse hit rate than was provisioned.

The tests split by what each side can observe. main_test.go is the Go side, which had no tests at all; it cannot use cgo, since go test rejects import "C" in a test file, so it pins the return codes and field widths by parsing objectfs_types.h and comparing against constants written out independently. That is stronger than comparing C.OBJECTFS_OK to itself: it catches the header and the library disagreeing about what a code means, which nothing could before — the C binary uses the macros on both sides of its own assertions and so agrees with the header by construction. The two assertions only reachable from C live in test_basic.c: a 1024-byte key round-tripping through head and list byte-for-byte, and objectfs_last_error returning a stable pointer. The second sits outside the credentials-gated section, because a never-issued handle reaches the leaking arm.

Every fix mutation-verified. Reverting the key width reported char[1024] ... holds 1023 bytes ... but must hold 1024; reverting the leak failed exactly the two pointer-identity checks; reverting the cache-size form failed three cases naming the bytes lost. Two of my own first expectations were wrong and are now recorded as decisions rather than accidents: fillCStr truncates on a byte bound, not a rune bound, which is correct because S3 counts key length in UTF-8 bytes; and the round-trip is exact only to 2^53 — a float64 limit inside ParseBytes that belongs to every caller of it and sits 8 PiB above anything reachable here.

make test is now a CI step. 21 C assertions pass (was 16), 15 Python ctypes, plus the new Go tests. Both suites skip their integration halves without OBJECTFS_TEST_BUCKET, so it needs no credentials and reaches no network. golangci-lint holds at its 6-issue baseline for the package.

Not in scope

Implementing the storage operations for real — against @aws-sdk/client-s3 and boto3 — or deleting the surface. All four SDKs now compile and throw honestly; none transfers bytes. Tracked in #325, which stays open for exactly that.

The remaining #314 items are dependency bumps and are now #328, not #314: that issue is closed, so saying "tracked there" would have meant tracked nowhere. #328 carries the measured recipe — TypeScript 6 needs "ignoreDeprecations": "6.0" and "types": ["node"], because 6.0 stopped auto-including @types/node, and the TS5107 on moduleResolution is a config-level error that aborts before typechecking and so hides 63 source errors behind a count of 1. With this PR's source fixes in place the bump is 0 errors and 65 passing tests. TypeScript 7 remains unreachable while ts-jest peers <7.

The flat eslint.config.js is deferred to the eslint 10 bump rather than written now; eslint 9 still reads the eslintConfig block this PR repaired.

…sults

`npx tsc` reported 48 errors across seven files and had done since before the
SDK's first release, so `npm run build` had never succeeded and `dist/` had
never existed. The reason it went unnoticed is structural: `npm test` runs
jest, and ts-jest only typechecks the files a test imports. `src/mount.ts`
imports nothing testable and was compiled by nothing at all, so `src/index.ts`
could ship `export { StorageAdapter } from './storage'` — a name that has never
existed in that module — through a release without one job noticing.

Three of the errors were real defects, each proven before being fixed:

- `Configuration`'s constructor merged with a one-level object spread, which
  puts the caller's whole `storage` last and discards the `s3` it had just
  merged. Every preset silently lost the defaults it did not itself name, and
  two could not pass their own `validate()`: `cost-optimized` produced an
  `S3Config` with no region, and `cluster` set `tlsEnabled: true`, which
  `validate()` rejects without certificate paths a preset cannot know. Replaced
  with a shared deep merge; the constructor and `merge()` now take
  `DeepPartial<Configuration>`, which is what the preset table always meant —
  the eleven TS2739 errors were reporting exactly that `Partial<T>` is one
  level deep.
- `isMounted` tested `/proc/mounts` for `fstype === 'fuse'` exactly, and
  ObjectFS mounts report `fuse.s3`: internal/fuse/mount.go sets
  `Subtype: "s3"`. Only the `device.includes('objectfs')` fallback was saving
  it.
- `createClient` built `{...options, config}` with `config` possibly undefined,
  which *sets* the key and overrode a config the caller passed in `options`.

Ten methods reported success for work they never performed, and one wrote to
disk: `downloadObject` did `writeFile(localPath, 'Simulated file content from
S3')`, called `progressCallback(30, 30)` and returned 30, so a caller following
the README's own example destroyed whatever was at that path and was told the
transfer succeeded. Those, plus `listObjects`, `getObjectInfo`, `uploadObject`,
`deleteObject`, `joinCluster`, `leaveCluster`, `getClusterStatus`, `clearCache`
and `warmCache`, now throw a typed error naming #325 — the precedent already
set in this repository by `getPerformanceStats` and the EROFS stubs in
internal/fuse. The README's feature list, storage and cluster sections, API
reference and event list are corrected to match.

`npm run lint` also ran for the first time: `eslintConfig.extends` said
`"@typescript-eslint/recommended"` without the `plugin:` prefix, so eslint
exited before reading a line of source.

Verification: tsc 0 errors (from 48), `npm run build` emits dist/, 61 tests
across 3 suites, lint 0 errors with 23 pre-existing no-explicit-any warnings.
Both behaviour fixes verified by mutation — restoring the one-level spread
fails 6 assertions, restoring the fabricating `downloadObject` fails 2
including the one asserting the caller's file survived.

CI gains `build` and `lint` steps, which is the gate whose absence let this
ship, and `npm ci` against a now-committed package-lock.json.

Refs #314, #325
@scttfrdmn scttfrdmn added type: bug Something isn't working as expected priority: high Important issue that should be addressed soon area: sdk Client SDKs (Python, Java, JavaScript) labels Aug 3, 2026
Closes the Python half of #325. The JavaScript half shipped as PR #327; this
SDK carried the identical fabrications, including the one that destroyed data.

`StorageAdapter._download_s3_object` wrote `Simulated file content from S3`
over whatever file was at the caller's `local_path`, called
`progress_callback(30, 30)`, and returned 30. Proven by execution before being
touched: against a file containing other text it printed `returned 30 bytes;
file now contains: 'Simulated file content from S3'`. The raise now happens
before anything opens the path.

Fifteen methods were fabricating, not five: the GCS and Azure backends each
delegated to their S3 counterpart, so a `gs://` or `az://` URI returned the same
two invented *S3* objects under a docstring describing a "simplified
implementation" of a different cloud. The ten extra names are now class-level
aliases onto one honest raise. Scheme dispatch stays -- rejecting an unsupported
scheme is real.

On the client, join_cluster/leave_cluster/get_cluster_status raise
DistributedError and clear_cache/warm_cache raise CacheError, following
get_performance_stats, already written this way in the same file.

Three genuine defects found alongside:

- `from_preset('cluster')` set `security.tls_enabled = True`, which
  `SecurityConfig.validate()` rejects without certificate paths a preset cannot
  know -- so one of five shipped presets could not pass its own validation.
  Found by a loop over the preset names, not by inspection; a two-preset probe
  had already missed the equivalent bug on the JavaScript side.
- `from objectfs import NetworkError` was an ImportError. Six exceptions were
  declared in .exceptions and re-exported by nothing, so the README's own
  error-handling example could not run. CacheError among them, which the newly
  raising cache methods require callers to name.
- Adapter and client both wrapped StorageError in StorageError, so the CLI
  printed `Failed to list objects: Failed to list objects: <reason>`. Nine
  handlers now re-raise the specific error unchanged.

`objectfs-python storage {list,download,upload}` keep their subcommands so they
fail naming the reason, but `--help` says NOT IMPLEMENTED; the README's
`storage download` example overwrote its target and printed success.

tests/test_storage.py, test_config.py and test_client.py: 71 tests, 25 subtests,
up from one metrics suite. Verified by mutation, not inspection -- restoring the
fabricating download and the preset's TLS flag produced exactly the five
expected failures, and restoring the double-wrap failed exactly its two
assertions.
@scttfrdmn scttfrdmn changed the title fix(sdk): make the JavaScript SDK compile, and stop it fabricating results fix(sdks): both SDKs compile, validate their own presets, and stop fabricating results Aug 3, 2026
…ht license

Two defects found by carrying the Python fixes back across (#325). Nothing
checked src/index.ts against what the modules it re-exports actually declare.

CacheError was declared in src/errors.ts and exported by nothing, while
clearCache and warmCache throw it — so a caller could not name it in a catch,
and had no way to tell that failure from any other. Four of eleven classes were
missing; all eleven are exported now.

`export const LICENSE = 'MIT'` — ObjectFS is Apache-2.0, per package.json's own
license field, the repository LICENSE, and every source header. A consumer
reading that constant to build an attribution or compliance list got a wrong
answer from the SDK's public API.

src/index.test.ts covers the entry point as a loop over what ./errors declares,
so a class added later is covered by existing code; asserts the re-exported
binding is the *same* binding, since a divergence would silently break
instanceof in a caller's catch; and pins LICENSE/VERSION to package.json.

The names are looked up dynamically rather than as `index.CacheError` because a
missing export is a TS2339 that fails the suite's compile — verified: the first
attempt reported a type error and took the file's other assertions down with it.
Rewritten, the same mutation fails three assertions and names CacheError.

tsc 0 errors, 4 suites / 65 tests, lint 0 errors, build emits dist/.
`mvn compile` failed with four errors, and presumably always had: nothing in
this repository has ever invoked Maven. Same structural gap that let 48 tsc
errors ship in the JavaScript SDK (#325) — found by going looking for it in the
third SDK, not by a report.

- ObjectFSClient imports com.fasterxml.jackson.datatype.jsr310.JavaTimeModule
  and registers it in its constructor, but pom.xml declared only
  jackson-databind. jackson-datatype-jsr310 is now declared, same version.
- Two `catch (NotFoundException | ObjectFSException e)` clauses, which javac
  rejects: NotFoundException extends ObjectFSException, so the alternatives are
  related by subclassing. Catching the supertype alone is legal and exactly
  equivalent.

With it building, the 17 tests ran for the first time and one failed for a real
reason. list_includesPrefixAndLimitParams asserted the path contains
`prefix=my/prefix`; okhttp percent-encodes `/` in a query value, so it carries
`prefix=my%2Fprefix`. Verified by probing okhttp directly rather than from its
docs. The implementation was right. The test now asserts the encoded form *and*
that the server decodes it back, so it still means "the prefix arrives intact"
rather than "okhttp escapes slashes" — mutation-verified: changing the parameter
to a constant fails it with the actual query in the message.

The compiler plugin moves from source+target 17 to release 17, which its own
build warning had asked for on every run: -source/-target on a newer JDK accepts
APIs that did not exist in 17, yielding a jar that compiles clean and throws
NoSuchMethodError on the version it claims to target.

CI gains a `mvn -B test` step so this cannot regress the same way. The tests use
MockWebServer — no credentials, no network beyond dependency resolution — so
continue-on-error is deliberately absent.

.gitignore gains target/: nothing had ever run mvn here, so nothing had produced
the directory to notice it was untracked.

17/17 tests pass, no build warnings.
…e header

sdks/c differs from the JavaScript and Java SDKs in that it did build — it is a
package of the main module, so `go build ./...` compiled its cgo Go side all
along. What no CI job did was link a C program against the shared library and run
it, so the public headers and the 16 assertions in tests/test_basic.c were
unverified. A header could declare a struct field too narrow for the value written
into it and every job would stay green.

Which is what had happened. Three defects, each proven by execution first:

- objectfs_info_t.key was char[1024] against an S3 key limit of 1024 bytes, so it
  held 1023 plus the terminator and fillInfo truncated a legal maximum-length key
  with no error. Worst in objectfs_list, where the key is the result rather than
  an input and so cannot be compared against anything: a truncated key names a
  different object, and passing it back to objectfs_get or objectfs_delete acts on
  the wrong key. Now char[1025], and fillInfo's capacities derive from the arrays
  with unsafe.Sizeof rather than repeating 1024/128/128 as literals — widening the
  declaration alone would have left its only writer still cutting at 1023.

- objectfs_last_error's freed-handle arm returned a fresh C.CString on every call,
  under a header that documents the pointer as library-owned and must-not-free. So
  the caller could not free it and the library never did. Verified by calling it
  three times and printing the pointers: three addresses, now one. This is the
  path a program takes when it is already failing, often in a retry loop.

- bytesToCacheString integer-divided by 1 GiB / 1 MiB and formatted the quotient,
  so the cache_bytes that objectfs.h documents as "size in bytes" lost its
  remainder: 1.5 GiB became "1GB" and 2047 MiB became "1GB", losing 1023 MiB.
  Silent from C — nothing echoes the size back, and a half-sized cache still
  works. A bare byte count round-trips exactly through utils.ParseBytes.

The tests split by what each side can observe. main_test.go is the Go side, which
had none at all; it cannot use cgo, since `go test` rejects import "C" in a test
file, so it pins the return codes and the field widths by parsing
objectfs_types.h and comparing against constants written out independently. That
is stronger than comparing C.OBJECTFS_OK to itself: it catches the header and the
library disagreeing about what a code means, which nothing could before — the C
binary uses the macros on both sides of its own assertions and so agrees with the
header by construction.

The other two assertions are only reachable from C and live in test_basic.c: a
1024-byte key round-tripping through head and list byte-for-byte, and
objectfs_last_error returning a stable pointer. The second is outside the
credentials-gated section, because a never-issued handle reaches the leaking arm.

Every fix mutation-verified. Reverting the key width reported "char[1024] ...
holds 1023 bytes ... but must hold 1024"; reverting the leak failed exactly the
two pointer-identity checks; reverting the cache-size form failed three cases
naming the bytes lost. Two of my own first expectations were wrong and are now
recorded as decisions rather than accidents: fillCStr truncates on a byte bound,
not a rune bound, which is correct because S3 counts key length in UTF-8 bytes;
and the round-trip is exact only to 2^53, a float64 limit inside ParseBytes that
belongs to every caller of it and sits 8 PiB above anything reachable here.

CI gains a `make test` step in sdk-metrics alongside the other three SDKs. Both C
suites skip their integration halves without OBJECTFS_TEST_BUCKET, so it needs no
credentials and reaches no network. 21 C assertions pass (was 16), 15 Python
ctypes, and the new Go tests. golangci-lint holds at its 6-issue baseline for the
package — the two G103 suppressions are per-line with the reason, since a test for
a bound on an unsafe write cannot avoid taking the pointer.

Refs #325.
@scttfrdmn scttfrdmn changed the title fix(sdks): both SDKs compile, validate their own presets, and stop fabricating results fix(sdks): all four SDKs compile, are gated in CI, and stop reporting work they never did Aug 3, 2026
…he TS6 recipe

The comment block on the JavaScript SDK entry said CI runs `npm install && npm test` and that
"nothing in CI runs `tsc`". Both were true when written and are not now: this PR's sdk-metrics
job installs with `npm ci` and runs build and lint as their own steps. A comment explaining why
a Dependabot group exists is load-bearing — it is what stops the next person from ungrouping it
— so a stale one is worse than none, which is the same argument this PR's other four commits
make about stale headers, stale READMEs, and stale return values.

Also records what the TypeScript 6 bump actually needs, measured on a scratch copy rather than
predicted, because one of the two findings is a trap that reads as its own opposite:

  - `moduleResolution: "node"` is TS5107 under 6.0, and that is a *config-level* error, so tsc
    exits before typechecking any source. The bump therefore reports 1 error while 63 wait
    behind it. Someone bisecting this could reasonably conclude the bump is nearly clean and
    that fixing the deprecation caused a 63-error regression.
  - TypeScript 6 stopped auto-including `@types/node`, which is all 63 of them. `"types":
    ["node"]` takes it to zero; bumping @types/node 18 -> 24 does not, the package being
    typesVersions-only.

Filed as #328 with the same detail, since #314 is closed and was where the bump had been
tracked. Verified: [email protected] + [email protected] + jest/@types/jest@30 with those two keys
gives 0 tsc errors, 65 passing tests, and an emitted dist/.
The two stale claims are a user-facing accuracy fix in a config file that CI reads, and the
TS5107 finding is worth being findable from the changelog rather than only from a comment: it is
the kind of trap that makes a correct bump look like a 63-error regression.
@scttfrdmn
scttfrdmn merged commit 06e0c7f into main Aug 3, 2026
24 checks passed
scttfrdmn added a commit that referenced this pull request Aug 4, 2026
…t has the classes

OkHttp 5 went multiplatform and split the artifact. `com.squareup.okhttp3:okhttp:5.4.0` is a
stub: `unzip -l okhttp-5.4.0.jar | grep -c '\.class'` returns 0. The JVM classes moved to
`com.squareup.okhttp3:okhttp-jvm`, which has 330.

So the version bump alone cannot work — it fails `src/main` with `package okhttp3 does not
exist`, which reads like a sweeping API break rather than a renamed artifact. Two things hid
what was really going on:

  - `src/test` compiles either way. `mockwebserver` depends on `okhttp-jvm` transitively, so
    the classes were already on the test classpath; only `compile` scope was missing them.
  - the error names the package, not the artifact, so the obvious next move is to go looking
    for renamed OkHttp APIs. There are none to find. No source file changes in this commit,
    and all 17 tests pass unmodified.

This is why #291 could never be merged as opened, and why rebasing it would not have helped:
Dependabot bumps versions, and this release moved the coordinates. The two edits have to be in
one commit or neither is correct — which is a shape worth recognising the next time a major
"breaks the build" in a way no upgrade guide explains.

Verified:
  $ unzip -l ~/.m2/.../okhttp-5.4.0.jar     | grep -c '\.class'   ->   0
  $ unzip -l ~/.m2/.../okhttp-jvm-5.4.0.jar | grep -c '\.class'   -> 330
  $ mvn -B dependency:tree | grep -i okhttp
    +- com.squareup.okhttp3:okhttp-jvm:jar:5.4.0:compile
    +- com.squareup.okhttp3:mockwebserver:jar:5.4.0:test
  $ mvn -B test
    Tests run: 17, Failures: 0, Errors: 0, Skipped: 0
    BUILD SUCCESS

The `mvn -B test` CI step added in #327 is what turns this class of breakage into a failing
check instead of a silent one; before it, nothing in this repository had ever run Maven.

Closes #291.
scttfrdmn added a commit that referenced this pull request Aug 4, 2026
…t has the classes (#333)

OkHttp 5 went multiplatform and split the artifact. `com.squareup.okhttp3:okhttp:5.4.0` is a
stub: `unzip -l okhttp-5.4.0.jar | grep -c '\.class'` returns 0. The JVM classes moved to
`com.squareup.okhttp3:okhttp-jvm`, which has 330.

So the version bump alone cannot work — it fails `src/main` with `package okhttp3 does not
exist`, which reads like a sweeping API break rather than a renamed artifact. Two things hid
what was really going on:

  - `src/test` compiles either way. `mockwebserver` depends on `okhttp-jvm` transitively, so
    the classes were already on the test classpath; only `compile` scope was missing them.
  - the error names the package, not the artifact, so the obvious next move is to go looking
    for renamed OkHttp APIs. There are none to find. No source file changes in this commit,
    and all 17 tests pass unmodified.

This is why #291 could never be merged as opened, and why rebasing it would not have helped:
Dependabot bumps versions, and this release moved the coordinates. The two edits have to be in
one commit or neither is correct — which is a shape worth recognising the next time a major
"breaks the build" in a way no upgrade guide explains.

Verified:
  $ unzip -l ~/.m2/.../okhttp-5.4.0.jar     | grep -c '\.class'   ->   0
  $ unzip -l ~/.m2/.../okhttp-jvm-5.4.0.jar | grep -c '\.class'   -> 330
  $ mvn -B dependency:tree | grep -i okhttp
    +- com.squareup.okhttp3:okhttp-jvm:jar:5.4.0:compile
    +- com.squareup.okhttp3:mockwebserver:jar:5.4.0:test
  $ mvn -B test
    Tests run: 17, Failures: 0, Errors: 0, Skipped: 0
    BUILD SUCCESS

The `mvn -B test` CI step added in #327 is what turns this class of breakage into a failing
check instead of a silent one; before it, nothing in this repository had ever run Maven.

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

Labels

area: sdk Client SDKs (Python, Java, JavaScript) priority: high Important issue that should be addressed soon type: bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant