Repository navigation
Fuel target over the radio, track markers from the wheel, setup export, and a sign-in that is safe to go public - #306
Merged
Conversation
Until now signing out only dropped the web cookie or the desktop's stored token; the token itself kept working for up to 24 hours. Every token now carries a jti, and the new signOut mutation stores it as revoked until the token expires. The bearer middleware refuses revoked tokens on every request (GraphQL, live ingest, live stream), so only the device that signed out is affected. The web and the desktop both call signOut when the user signs out; the desktop forgets the token first, so an unreachable server still leaves it signed out. Refs #233 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… guessing login and register had no limits, so a public deployment invited password guessing and account spam. login now allows 5 attempts a minute per email and 20 per client address, register 5 an hour per client address; one more gets a GraphQL error with the code RATE_LIMITED. The limits live in the two resolvers, since every mutation shares /graphql. The client address comes from CF-Connecting-IP, believed only from a loopback or private-network peer (the tunnel, the web), so nobody on the internet can pick their own. The web passes the browser's address on, or every web sign-in would count against the web server's. IPv6 clients are keyed by /64. Refs #234 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A driver can now save any setup version Sprint kept as a .svm file wherever they choose, to share it or to load later by copying it in. Sprint keeps each version's original file byte for byte and writes exactly that: comments, sections and index values untouched, since Sprint edits no setup values yet. Versions captured before files were kept say why they cannot be exported. The host turns away any destination inside the game's install or setups folder before Electron writes, so no export can change what the game loads. Refs #190 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… aims at The pit wall's Radio tile gets a fuel-per-lap stepper next to the target lap. What the engineer sends shows as a radio banner on the wheel and, from the next line, replaces the plan's fuel per lap on the dash (the fuel target widget outside a race and the lap review's fuel line), the same way a radioed target lap replaces the plan's. It lasts while the link does; a newer one replaces it. The link level goes to 6: a driver on an older Sprint would show the text but never put the figure on the dash, so the engineer's side refuses to send it and says the driver needs to update. Refs #27 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… afterwards
A wheel button set to "Mark this spot" drops a marker at the car's lap distance on the
lap being driven, so the driver can flag something mid-lap without stopping to remember
it. When that lap is filed, each marker becomes one of the driver's own lap notes
("Marked while driving"), editable like any note. Presses out of the car, in the garage
or pit lane, or with no lap running are ignored; a lap that is never filed takes its
markers with it.
Refs #18
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…p sample The overview, plan, On track and Analysis shots drew the preview's invented Spa race and a fictional friend. readme-shots.mjs now runs the real app on the committed recordings (Monza and Le Mans, no real names), captures its state, lap traces and plan targets mid-race, and draws that capture in the preview, so the shots show real tracks and laps with release chrome. The run reads setups and results from an empty stand-in folder, never the installed game's. Device, dashes and pit wall stay on the sample: no wheel is attached, Dashes shows no laps, and a pit wall needs a second linked Sprint. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and sign-out always sticks The API believed CF-Connecting-IP from any private-network peer, which the web container always is and Docker's port proxy can make outsiders look like, so anyone reaching a published port could state a fresh address per request and skip the limits. It now believes the header only from loopback and the addresses in SPRINT_TRUSTED_PROXIES: the compose files give the web and the tunnel fixed addresses and list them. The web passes the browser's address on only with SPRINT_BEHIND_TUNNEL=true; without it, web sign-ins share one client address, as the deployment guide now says. Five wrong guesses from anywhere locked an account for a minute. The tight limit now counts per email and address, with a looser 50 an hour per email against guessing from many addresses. Two sign-outs at once could fail the expired-row cleanup and lose the revocation. The token is now stored first, idempotently, and the cleanup runs on its own. ValidateAndGetUserId, which skipped revocation, is gone; tests use a helper. Refs #233, #234 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ark this spot through a radio banner A radioed target lap or fuel per lap was read back from the radio list, which keeps only the last 20 messages, so after 20 more calls the dash quietly fell back to the plan's figure. The targets are now held on their own until a newer one arrives or the link ends. A Mark this spot press while a radio message was on the wheel only acknowledged the message, so the marker was lost; it now drops the marker and leaves the message up, like Ack runs as itself. The pit wall's fuel Send is off up front, with the reason, for a driver whose Sprint cannot take a fuel target, instead of failing after the press. Several presses within one frame now make one marker rather than identical notes at the same spot. Refs #27, #18 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The game-folder check compared path text, but the write follows junctions, symlinks and subst drives, so a link could pass the check and land the file in the game's setups. Electron now resolves the chosen folder before asking the host, the host resolves its game folders through links the same way, and the file goes in by renaming a temporary one over it, so a link already at the target is replaced instead of written through. Export also waits while one is under way, so a double click no longer opens two save dialogs. Refs #190 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… itself If the app died mid-drive, a CDP call never settled and Node exited before the cleanup ran, which could leave the run and its host behind. Calls now fail when the window closes, the agent run exits or 30 s pass, so the run and the build servers are always stopped (once, even on a signal during cleanup). A missing sidebar page, Live Compare lap or qualifying target now fails the capture instead of giving a wrong shot, and the Analysis shot opens the race lap the capture names as fastest instead of a hard-coded lap 6. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… slow sign-out still sticks Fifty wrong guesses an hour at one email, from anywhere, locked its owner out for the rest of the hour. That limit now counts only wrong passwords, and an address the account signed in from in the last 30 days skips it (remembered in memory); the per-address limits still apply to it. Sign-out stored the revocation with the request's cancellation, so a web that gave up after 10 s could report "signed out" while the store was cancelled. It is now stored regardless, and the expired-row cleanup after it is best effort: a deadlock, timeout or cancellation there is logged instead of failing the sign-out. Refs #233, #234 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…heck follows links on a link's own path The outbox sends a message again until it hears back, so a lost target could arrive after a newer one and replace it on the driver's dash. Each target now keeps its message id and only a higher id replaces it. The game-folder check swapped a link for its target but never looked at the folders on the target's path, so a second link there (C:\Games -> D:\Mount\Games with D:\Mount -> E:\) left it comparing the wrong path. The walk now starts again after each swap, and a folder that is still leading through links after 40 swaps refuses every destination. Refs #27, #190 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…guesses cannot pass the limit Counting only wrong passwords, after the check, let a botnet fire guesses at one account all at once: none had failed yet, so about a thousand could get past the limit of 50 an hour. Every attempt from an address the account has not signed in from recently now takes its permit up front again, which makes 50 a hard cap. An address the owner signed in from in the last 30 days still skips that limit, so strangers' guesses cannot lock the owner out; a correct sign-in from a new address now costs one of the 50. Refs #233, #234 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Five open issues, each its own commit, then the fixes from three rounds of fresh-context review.
For drivers
.svmbyte for byte to a place the driver picks. The game folder is refused, also through junctions and symlinks, and the file goes in by temp file plus rename. Sprint can't edit setups yet, so the export is the file as the game saved it. Versions Sprint kept before this change saved only their values, not the file, so they can't be exported, and the button says why.For the API, before going public
jti.signOutstores it until expiry, and the bearer hook refuses it on GraphQL, live ingest and the live stream. Only that device is signed out. The web and desktop both call it, and a slow database or a timed-out request can't drop the revocation. Already-open live connections stay open until they drop.loginallows 20 a minute per address, 5 a minute per account from one address, and 50 an hour per account across all addresses, counted before the password check so a burst can't get past. An address the account signed in from in the last 30 days skips the per-account limit, so strangers can't lock the owner out.registerallows 5 an hour per address.CF-Connecting-IPcounts only from loopback orSPRINT_TRUSTED_PROXIES. The web forwards it only withSPRINT_BEHIND_TUNNEL=true.Both compose files now pin a subnet (
10.203.0.0/24locally,10.203.1.0/24on Komodo) and fixed IPs for web and tunnel, so the trust list stays valid. An existing stack may needdocker compose down(or Komodo Destroy, which keeps the volumes) before redeploying. If10.203.x.xclashes with another network on the host, change it. Both cases are indocs/operations/deployment.md. Without the tunnel flag, all web visitors share one limit; that is documented there too.Screenshots
README and driver-guide screenshots now come from the real recordings in
app/recordings: Monza laps, real map and traces, release status bar.readme-shots.mjscaptures a hidden run of the app on them and renders that capture in the preview harness. It switches away from the real game folder first, refuses a capture containing anything else, and cleans up even when the run crashes. Device, Dashes and the pit wall stay on the sample: no wheel attached, no laps shown, and the pit wall needs a live link.Checks
Not verified
.svmloaded in LMU.RevokedTokenstable, against a real Postgres. Tests use the in-memory provider.Closes #18
Closes #27
Closes #190
Closes #233
Closes #234
🤖 Generated with Claude Code