Skip to content

Release 0.8.36: hotfix coverage probe uses direct S3 - #634

Merged
neuromechanist merged 4 commits into
mainfrom
dev
May 27, 2026
Merged

neuromechanist merged 4 commits into
mainfrom
dev

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

Summary

Hotfix release on top of 0.8.35. Single fix: GET /admin/summary/coverage was returning HTTP 522 for every published version because probeSummary fetched data.nemar.org/<id>/<v>/summary.json — the same Worker hosting /admin/*. Self-fan-out × 8 concurrent × 130 ids → Cloudflare Worker-to-Worker subrequest timeout. Fix: read S3 directly via loadSummary(), same code path Phase 3's page-bundle uses.

Closes the post-deploy-smoke incident found right after 0.8.35 shipped. Without this, the backfill flow (nemar admin summary check --fix) is blocked.

Included

Companion follow-ups (filed, not blocking)

Test plan

Merge strategy

Regular merge per project rule.

nemar-bot and others added 4 commits May 26, 2026 21:21
…#630)

* fix(admin): probe summary.json directly from S3 (not via self-Worker)

Discovered on first post-deploy smoke of /admin/summary/coverage: all 130
published versions classified as kind: error, status: 522 (Cloudflare
'origin connection timed out'). Direct curl to the same
data.nemar.org/<id>/<v>/summary.json URL from outside returned 200 in
~730ms. The 522 only happens when the call originates inside the Worker.

Root cause: probeSummary used globalThis.fetch against
data.nemar.org/<id>/<v>/summary.json, but that URL is served by the SAME
Worker that hosts /admin/summary/coverage. Fanning out 8 concurrent ×
130 ids triggers Worker-to-Worker subrequest behavior that 522s under
load. Cross-component code-reviewer flagged this as 'option c' on PR
#623 (the cleaner alternative to the cache-bust fix we shipped at the
time); the bill came due on first prod run.

Fix: refactor probeSummary to read S3 directly via loadSummary() — the
same code path Phase 3's page-bundle service uses for its summary fan-in.
Bypasses CF + the self-call entirely, so no subrequest limit and no
24h s-maxage to cache-bust around.

Wiring: introduce SummaryFetcher type + defaultSummaryFetcher(env)
builder, and dependency-inject the fetcher into probeSummary /
buildCoverageReport. Tests stub the fetcher directly instead of swapping
globalThis.fetch.

Tests: 11 unit tests cover the schema classifier (ok / stale /
forward-compat 1.2 / forward-compat 2.0 / missing / error / malformed
JSON / empty schema_version / missing key / non-string schema /
fetcher-args wire contract). Backend typecheck clean.

* review(#630): hang-protection timeout, default-arg fix, ordering + totals tests
@neuromechanist
neuromechanist merged commit 0392194 into main May 27, 2026
23 checks passed

This branch was previously deployed

2 inactive deployments
development — 33d629e6 Deployed May 27, 2026 by neuromechanist via deploy-dev #413
npm — 33d629e6 Deployed May 27, 2026 by neuromechanist via publish #1174
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extend summary.json schema: embed README content (schema_version 1.1)

1 participant