Skip to content

fix(ci): typedoc in the toolchain group, PR limits that were hiding work, and three TTL tests that raced themselves - #315

Merged
scttfrdmn merged 4 commits into
mainfrom
ci/dependabot-typedoc-group
Aug 3, 2026
Merged

scttfrdmn merged 4 commits into
mainfrom
ci/dependabot-typedoc-group

Conversation

@scttfrdmn

Copy link
Copy Markdown
Owner

The regrouped PR from #306 (#308) still failed npm install. typedoc constrains the TypeScript version as tightly as ts-jest does, and was left out of the group because it does not read like a member of one.

Measuring the peer ranges rather than assuming them turned up two things worth recording in the config comment:

  • [email protected] peers typescript@"4.6.x || … || 5.1.x", so typescript: ^5.0.0 in package.json has been resolving to 5.1.6 — a 2023 compiler, three minors behind what the range reads as.
  • TypeScript 7 is unreachable at any grouping. ts-jest's latest release (29.4.12) peers <7 with nothing above it. The ceiling is TypeScript 6, which [email protected] permits. Verified by installing the four-package set (typescript ^6.0.3, typedoc ^0.28.20, jest ^30.4.2, @types/jest ^30) — resolves clean.

This PR only fixes the grouping. It does not bump anything: the bump needs #314 first, because a typescript ^6 PR would fail tsc if tsc were ever run.

What the install failure was hiding — #314

npm run build in sdks/javascript fails with 48 tsc errors, and nothing in CI or the Makefile runs tsc:

$ grep -rn 'npm run build\|npm run docs\|tsc' .github/workflows/ Makefile
.github/workflows/ci.yml:304:  # tsconfig.json excludes **/*.test.ts from the build.

Two of the 48 name identifiers that do not exist — Configuration (types.ts:308) and a StorageAdapter re-export (index.ts:32, where storage.ts exports S3StorageAdapter) — both dating to bf9c916, the 2025-08 commit that added the SDK. sdk-metrics is green because ts-jest typechecks only prometheus.test.ts and its imports; the rest of the SDK is checked by nothing.

Filed against v0.15.0 with a proposed order that puts npm run build in CI before the toolchain bump, so the fix has a guard.

Closes #314 partially — the grouping half only.

@scttfrdmn scttfrdmn added type: ci-cd Continuous integration or deployment improvements priority: medium Important but not urgent area: sdk Client SDKs (Python, Java, JavaScript) area: ci-cd CI workflows, gates, and release automation labels Aug 3, 2026
@scttfrdmn
scttfrdmn enabled auto-merge (squash) August 3, 2026 20:16
The regrouped PR from #306 still failed to install. typedoc constrains the
TypeScript version as tightly as ts-jest does, and was left out of the group
because it doesn't read like a member of one.

Measuring the peer ranges instead of assuming them turned up two things:
[email protected] peers <=5.1.x, so `typescript: ^5.0.0` has been resolving to
5.1.6 all along; and TypeScript 7 is unreachable at any grouping, since
ts-jest's latest peers <7 with nothing above it. The ceiling is 6.

What the install failure was hiding is filed as #314: `npm run build` fails
with 48 tsc errors, two of which name identifiers that don't exist, and
nothing in CI runs tsc.
…silent

open-pull-requests-limit caps discovery, not display. Once the slots are
full Dependabot stops proposing, and the PR list can't distinguish "nothing
to update" from "no room to say so" — the same condition that hid three
outdated action majors behind #254-#258.

Measured: `go list -u -m all` shows twelve outdated direct modules against
five slots, with client_golang, go-redis, substrate and x/sys absent from
every open PR. pom.xml declares nine artifacts against three slots.

gomod 5 -> 8, maven 3 -> 6. Both npm limits stay at 3: those queues are
full of majors correctly waiting for a human, which is the limit working.
They set a 100ms TTL and then asserted an entry exists "immediately after
Put". Put stamps Timestamp: now on entry and then gzips and writes to disk,
so the clock starts before the bytes land, and any delay before the Get —
GC, scheduler, slow tmpfs — spends the same 100ms the assertion needs.

TestPersistentCache_TTLExpiration failed on a PR that changed nothing but
dependabot.yml, which is the tell. Reproduced by sleeping 120ms after the
Put: the entry is gone before it is read. Optimize was worse — asserting a
final count of 1 needs a fourth Put plus a full index sweep inside the same
window, and losing that looks like Optimize evicting a fresh entry.

The tests change, not the caches: TTL from the start of the write is the
right semantic, since an entry is as old as its data. 2s budget plus an
expiryWait helper. All three verified against an isExpired-returns-false
mutant.
@scttfrdmn scttfrdmn changed the title fix(ci): add typedoc to the typescript-toolchain group fix(ci): typedoc in the toolchain group, PR limits that were hiding work, and three TTL tests that raced themselves Aug 3, 2026
@scttfrdmn

Copy link
Copy Markdown
Owner Author

Two more commits since this was opened, both found by the PR's own CI.

gomod 5 → 8, maven 3 → 6. open-pull-requests-limit caps discovery, not display: once the slots are full Dependabot stops proposing, and the PR list can't distinguish "nothing to update" from "no room to say so." Same condition that hid three action majors behind #254-#258. Measured rather than assumed — go list -u -m all shows twelve outdated direct modules against five slots, with prometheus/client_golang, redis/go-redis, substrate and golang.org/x/sys absent from every open PR and none of them current. pom.xml declares nine artifacts across seven version properties against three slots. Both npm limits stay at 3 deliberately: those queues are full of majors that should wait for a human.

Three cache TTL tests raced their own assertions. TestPersistentCache_TTLExpiration failed the test job on this PR, which changed nothing but .github/dependabot.yml — that's the tell that it was never about the change.

Put stamps Timestamp: now at entry (persistent.go:305) and then gzip-encodes and writes to disk, so the entry's clock starts before its bytes land. With a 100 ms TTL, any delay between Put returning and the "immediately after Put" Get — GC, scheduler contention, slow temp filesystem — spends the same budget the assertion depends on. Reproduced deliberately by sleeping 120 ms after the Put: the entry is gone before it is ever read.

TestPersistentCache_Optimize was the more fragile of the two: it asserts a final count of 1, so it needed a fourth Put and a full index sweep inside the window, and losing that race looks like Optimize evicting a fresh entry. TestLRUCache_TTLExpiration has the identical shape — in-memory, so far less likely to miss, which makes it the one that would have outlived the other two.

The tests are what changed, not the caches. TTL measured from the start of the write is the defensible semantic — an entry is as old as its data — so the fix is a 2 s budget wide enough that scheduling noise can't reach it, plus an expiryWait helper keeping runtime tied to the TTL rather than a second hardcoded sleep.

Verified by mutation, not by watching them pass: each of the three fails with the right message against an isExpired() { return false } mutant, and go test -count=3 -race ./internal/cache/... is clean. Source files restored — the diff is test-only.

@scttfrdmn
scttfrdmn merged commit 76a5b9d into main Aug 3, 2026
24 checks passed
scttfrdmn added a commit that referenced this pull request Aug 3, 2026
Not a bug, but it reads like one, and this repository has already spent five diagnoses on
this workflow — a sixth symptom that looks the same as the first five is worth naming before
someone chases it.

Branch protection on `main` sets `strict: true`, so a PR whose base has moved since its last
push reports mergeStateStatus BEHIND, and `gh pr merge --auto` will not merge it. It waits
indefinitely and silently, because BEHIND is not a failing check and nothing surfaces it: the
PR shows every check green and simply does not merge. With a queue of armed PRs this
serializes them — the first merges, every other becomes BEHIND, and each needs a branch
update before its turn.

Observed while landing the vite overrides: #315 merged, #320 merged behind it, and the next
armed PR sat green-and-BEHIND until `gh pr update-branch` was run by hand.
`allow_update_branch` is false at the repository level, which is what would otherwise offer
the button in the UI.

Comment only; no behaviour change.
@scttfrdmn
scttfrdmn deleted the ci/dependabot-typedoc-group branch September 20, 2026 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci-cd CI workflows, gates, and release automation area: sdk Client SDKs (Python, Java, JavaScript) priority: medium Important but not urgent type: ci-cd Continuous integration or deployment improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The JavaScript SDK has never compiled: 48 tsc errors, and CI never runs the build

1 participant