Skip to content

Drop the dead url fields that broke every invocation - #17

Merged
iHiD merged 1 commit into
mainfrom
hotfix-baseurl
Aug 13, 2026
Merged

Drop the dead url fields that broke every invocation#17
iHiD merged 1 commit into
mainfrom
hotfix-baseurl

Conversation

@iHiD

@iHiD iHiD commented Aug 13, 2026

Copy link
Copy Markdown
Member

Production is currently failing every request. Merging this immediately.

#16 removed const baseUrl but left the url: fields that reference it, so rawPathToScreenshotData throws ReferenceError: baseUrl is not defined. That call is the first thing the handler does — before the S3 cache check — so even requests that would have been served from cache fail.

url was only read by the Chrome renderer, so it should have gone with it in #16. My mistake.

Verified by actually invoking the handler

/profiles/ihid.jpg                       -> 200 (image)   # S3 cache hit, full path works
/tracks/ruby/.../ihid-1720000000.jpg     -> 500 fetch failed   # can't reach internal ALB locally, as expected
/nonsense                                -> 500 Could not map raw path

Why nothing caught it

Worth recording, because every check I ran was blind to it:

  • node --check parses, it doesn't resolve identifiers
  • The 45 unit tests cover the renderers and tokenizer, not index.js
  • dev/render.js calls generate() directly and never goes through the handler
  • My grep was for baseUrl =, which matched the declaration and not the two uses

The gap is that nothing exercises the handler. A test that calls exports.handler with each path shape would have caught this in a second, and would also have caught the two Dockerfile omissions if it ran in CI against the built image.

#16 removed the baseUrl const but left the url: fields referencing it,
so rawPathToScreenshotData threw ReferenceError. That runs before the S3
cache check, so every request failed - including ones that would have
been served straight from cache.

url was only ever read by the Chrome renderer, so it goes with it.

Nothing caught this: node --check only parses, the unit tests don't
touch index.js, and dev/render.js calls the renderers directly and
bypasses the handler entirely. A grep for "baseUrl =" matched the
declaration and not the uses.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018iQj4EdMfNsWP6NtFTqwUU
@iHiD
iHiD requested a review from a team as a code owner August 13, 2026 22:13
@iHiD
iHiD merged commit 2489a71 into main Aug 13, 2026
1 check passed
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.

1 participant