Repository navigation
feat: bring live Sentry mode back to Glitch Invaders through vault_services - #26
Merged
Merged
Conversation
…rvices The challenge now names the sentry vault service. With SENTRY_AUTH_TOKEN in the environment and real values in the package's sentry.json, the page reports the three failures to the DSN and the page server reads Sentry's record of each back from the Sentry API, so the token never reaches the page. Without both, the game runs in demo mode as before. A Sentry outage falls back to simulated evidence for that incident with a note.
theycallmeswift
marked this pull request as ready for review
October 17, 2026 21:33
theycallmeswift
commented
Oct 17, 2026
theycallmeswift
left a comment
Contributor
Author
There was a problem hiding this comment.
Independent review of f80cdd9 against #25: CHANGES NEEDED. No code defect blocks it; the findings are nits (inline, plus the three below), which this repo's owner wants addressed before hand-off, and one Ready gate row that needs honest marking.
Not inline, since the lines are outside the diff:
- Ready gate, Standalone run row: it is marked ✅ but says no standalone Pi playthrough was done. The template asks for that run, and #25 lists the standalone skill flow as a done criterion; the SKILL change (the
modeprop, new badge wording) has not been exercised. Mark the row⚠️ and name the run as a human step in Decide, as #23 did, since this session has no Gemini key. game/src/ui/overlays.mjs:97: in live mode the start card still says "Demo mode: the diagnostics are realistic simulations." Pass the mode to the start card and show live-mode copy when the page has a reporter.- Ready gate, Secrets row: "a test checks every response, page asset, workspace file, and hook output" overstates it. The test fetches seven URLs and checks setup output, not cleanup output or the other game assets. Say exactly what it checks, or widen the test to match (the inline note on the test suggests both).
Verified: merge with main is clean; npm run verify, npm test (245 passing), and npm run lint all pass on the merged tree with no network and no credentials; CI run 39071443555 is green.
Generated by Claude Code
theycallmeswift
marked this pull request as draft
October 17, 2026 21:43
Limit apiUrl to sentry.io hosts or loopback, refuse cross-site evidence requests and share one lookup per report, abort Sentry work at the deadline, label the boss context as local state, fix the shield frame line, show live copy on the start card, and widen the token test.
Contributor
Author
|
The three review-body items are addressed in 698345f and the updated PR body:
Generated by Claude Code |
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.
Glitch Invaders now names the
sentryvault service. WhenSENTRY_AUTH_TOKENis set and the package'ssentry.jsonholds real values, the page reports the three failures to the DSN. The page server then reads Sentry's record of each one from the Sentry API (issue and stack trace, breadcrumbs, or trace spans), so the token never reaches the page. Without both, the game runs in demo mode as before. Closes #25.boss-spawntransaction with one span per load. It uses no SDK, soscript-src 'self'stays, andconnect-srcadds only the DSN's ingest origin. In live mode the start card and the HUD badge say so.GET /api/sentry-evidence?bug=…&id=<32 hex>.OriginandSec-Fetch-Site, with validated ids.SIMULATED · SENTRY UNAVAILABLEbadge).boot_statepills are labelled "Local game state, not from Sentry".https://sentry.io, an HTTPS subdomain of it, or a loopback stand-in in tests, whateversentry.json's optionalapiUrlsays.GameLoop.framenow readsapp.mjs:111instead of:94, because the live wiring moved thethis.engine.update(call it points at, and the existing source-line test keeps the two in sync. Everything else in demo mode is unchanged: the runtime config ({ attemptId }), the CSP string, the badge, the start card, the console copy, the markers, thedone_whenlines, and the setup output.sentry.jsonwith real values but a malformed one fails setup and names the field. A file that is absent or still holds placeholders means demo mode.Decide
challenges/glitch-invaders/sentry.json:dsn(Project Settings → Client Keys),org, andprojectslugs. Mint a token with theevent:read,project:read, andorg:readscopes and add it to each event vault as servicesentry, bearer, tokenSENTRY_AUTH_TOKEN, hostsentry.io. Recommend: land this PR with placeholders, then fill in the values for an event only after the live playthrough below.modeprop and badge wording. Recommend: a human runs the README's "Run without boothstrap" flow once in demo mode, and once in live mode with the real token. During the live run, record how long transactions take to appear indataset=spans, and whetherspan.description,span.durationandprecise.start_tsare the right fields. Then adjust the 15 s deadline or the spans query if the boss routinely falls back.sentryservice. Withsentryinvault_services, a station whose event vault lacks that service lists the challenge as unavailable, on every boothstrap version. Recommend: add thesentryservice to each event vault that selects this challenge before this PR merges, because merging otherwise takes the challenge offline at those events.Ready gate
npm run verifyreports ok for all 4 packages;npm testruns 258 tests, 258 passing;npm run lintreports 0 issues. No network and no credentials needed.the token never appears in a response, a page asset, the workspace, or hook outputred; reverting turns it green. The shield frame fix is covered by the source-line test, which checksresolveShieldHitatshield.mjs:17.createProgress(,MODE,mode=demo,demo-only,issues/519,connect-src,Demo mode:,game.resource.load. Updatedshared/progress.mjs(modesdemoandlive), the start card, the guide skill'smodeprop, and the README. The staticmode=demoline inindex.htmlis rewritten when the page starts.README.mdhas a "Live Sentry mode" section covering: the event vault service, the token scopes, boothstrap compatibility,boothstrap dev's token requirement, and theapiUrlhost rule. Also updated:intro.md,skills/start-challenge/SKILL.md, andsentry.json's$comment. The root README index entry is still accurate.docs/needs no changes.BOOTHSTRAP_variables) from a copied package, with the game played in Chromium to the weapon jam in demo, live and Sentry-outage modes. Live used a local Sentry API stand-in and a stubbed DSN ingest. Not run: a standalone Pi playthrough of the guide skill, because this session has no Gemini key. That run is listed in Decide.docs/style/, and this round addressed every item of the review on f80cdd9.sentryvault service. The token is read only byserver/serve.mjsfromSENTRY_AUTH_TOKEN, held in a private field of the API client, and sent only to Sentry hosts or loopback. The token test fetches every file undergame/andshared/,/runtime-config.json,/api/progress, and the evidence route: success, bad query, and an outage whose stand-in echoes the Authorization header. It also checks every workspace file and the setup and cleanup output. The page server's own stdio is discarded by setup, so it has no log. The root@mlhacks/boothstrappin is unchanged.