sgit newsroom v0.1.29 · snapshot 2026-09-24

Reading room · riskmandate.ai

Reading room / riskmandate.ai · raw text · live ↗

From riskmandate.ai, the page as fetched on 2026-09-24 · open the live page ↗Everything on this sheet is the source site's own text; the newsroom's chrome is outside it.

Two pages were shipping broken JavaScript

The home page and the insurance page↗ were throwing on load. The home page could not parse its own script at all (Unexpected token '}'); the insurance page ended mid-statement (Unexpected end of input). Everything that lives in that script — the menu, the mobile drawer, the in-page scroll buttons, the enquiry button, and on the insurance page the Index card and the level ladder — was dead on both.

How it happened. Moving the insurability component off the home page in v1.20.1 used a regular expression to find the end of the module, and the expression stopped one closing sequence short. The home page kept an orphan })(); and the insurance page lost the one it needed. The insurance page has been broken since it launched in v1.20.0.

Why nothing caught it. The HTML still rendered, so every page looked right in a screenshot. All twenty-six tests passed, the four npm run check gates passed, and the two extra CI checks passed, because not one of them executed or parsed a line of the JavaScript the pages carry. The only signal was an error in a console nobody was reading.

What caught it. A browser being driven through the site by a synthetic-user study, which records pageerror on every step. It reported an error on all five journeys before a word of the study had been written.

The fix, and the test. Both scripts were rebuilt from the last version that parsed, rather than by balancing braces by hand. A new test parses every inline script on every page and fails the build if one does not; it was verified by deliberately breaking a page and watching it fail. It anchors to real <script> tags, because several pages carry the literal string '<script>' inside their own source and a naive search starts reading from the middle of it.

Nothing about what any page says has changed.