Repository navigation
Conversation
Configure the engineering skills (GitHub issue tracker, default triage labels, single-context domain docs), start the domain glossary, and record ADR 0001: settings decoding moves from the Koa/Redis backend into the Cloudflare Worker, cached per data center. Spec: #73. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GxexzDRe9BU7mHmH5mLphe
The Worker that serves the SPA now answers GET /api/settings/string: it validates the generator version and settings string, asks the generator, caches successful decodes in the Cloudflare cache for a week, rate-limits cache misses per IP, and translates generator failures into JSON errors (400/429/502/504) without leaking tracebacks. The frontend calls /api on its own origin, so REACT_APP_API_URL is gone, and tells a bad settings string apart from a service problem. npm run dev starts the dev server and the Worker together; npm run preview serves the production build through the Worker. Worker tests run with node --test in CI. Dev branch prefixes move to their own module so the Worker and the frontend share them. Closes #73 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GxexzDRe9BU7mHmH5mLphe
- Log every cache miss once, with its status; dedupe the generator failure paths; fix Prettier formatting in the Worker. - Blame the generator (not "the settings service") for its own outages, and mention the generator version in the 400 message. - Hide the error page's generic hint for settings decode errors, which now carry their own advice; logic-file errors keep it. - Default a fresh browser to the generator's current active version instead of the 9.0.0 fallback (part of #74). - Add "settings service" to the glossary. Refs #73 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GxexzDRe9BU7mHmH5mLphe
`npm run deploy:staging` builds and deploys to hashfrog-tracker-staging at staging.hashfrog-tracker.com, with its own rate limiter and its own settings cache namespace (staging shares the zone's cache with production). README documents the manual deploy and who can run it. Refs #73 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GxexzDRe9BU7mHmH5mLphe
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
hashfrog-tracker | 3439f58 | Commit Preview URL Branch Preview URL |
Nov 03 2026, 05:11 AM |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #73. Refs #74: a fresh browser now defaults to the current active generator version.
Staging: https://staging.hashfrog-tracker.com runs this branch (
3439f58).Summary
The settings service moves out of the separate Koa + Redis backend and into the Worker that already serves the site. See ADR 0001.
sequenceDiagram participant Tracker participant Worker as Worker (/api/settings/string) participant Cache as Cloudflare cache participant Generator as ootrandomizer.com Tracker->>Worker: GET ?version&settingsString Worker->>Cache: match v1:version+settingsString alt HIT Cache-->>Worker: decoded settings else MISS (rate limited, 20/min per IP) Worker->>Generator: /settings/get (8s timeout) Generator-->>Worker: decoded settings, or a traceback Worker->>Cache: store successful decodes for 7 days end Worker-->>Tracker: {settings} + X-Cache, or JSON 400/429/502/504Also included:
AGENTS.mdanddocs/agents/(agent skills setup),GLOSSARY.md, and ADR 0001.Evidence
api.hashfrog-tracker.com(a server and Redis we run). Locally, check tracking is broken unlessREACT_APP_API_URLpoints at production. Every failure says "check your settings string".After: on staging, against the real generator:
npm run test:worker35/35 andnpm test243/243. Lint and build pass, and CI now runs the Worker tests.How to test on staging
X-Cache: MISS, thenHIT.npx wrangler tail --env stagingwhile testing; there is onecache_missline per miss, and no full settings strings.To redeploy staging after new commits, run
npm run deploy:staging. See the README for details.Merge Danger
Door: two-way
The old backend keeps running for 2 weeks after the deploy. Rolling back means reverting this PR or running
wrangler rollback. Nothing is migrated or deleted.Blast Radius: check-tracking
If the Worker misbehaves, check tracking fails to load. The basic tracker without check tracking doesn't touch
/api. Watch for:"status":504shows up in Workers Logs, raise the Worker's timeout (the client allows 10s).api.hashfrog-tracker.comuntil they reload, which is why the old API stays up.After merge
X-Cacheand Workers Logs on https://hashfrog-tracker.com.REACT_APP_API_URLCloudflare build variable.api.hashfrog-tracker.comDNS record.hashfrog_tracker_backendwith a pointer to ADR 0001.🤖 Generated with Claude Code
https://claude.ai/code/session_01GxexzDRe9BU7mHmH5mLphe