Audit passes
337
Bugs fixed
279+
CRITICAL bugs
48
Total commits
295+
Batch CG (pass 300) β€” verified the pass-299 fixes hold, closed a rate-limiter gap the verification exposed, and load-tested the live worker. A skeptical re-check of every pass-299 fix (grep the actual sink, fetch the LIVE deployed file). All held: the 5 XSS escapers are applied at the interpolation site live (+ a 6th feed page, insider-clusters, was already escaped); the honesty pages show 0 promissory phrases + drift caveats live; the worker fixes are live on pass-299. The verification also caught a real gap in one fix: the pass-299 per-IP limiter is per-isolate (in-memory RL_HITS), so a burst spread across Cloudflare isolates slips through β€” and /auth/register CREATES keys. Added a global KV-backed per-IP daily signup cap (pass 300, 20/IP/day, 24h TTL, counted only on successful create) that hard-bounds user:* growth across every isolate; /track intentionally stays on the in-memory limiter (a KV counter there would defund the very budget we protect). Load test (live, 2026-07-08): 1,000 requests across the 7 hot polled endpoints at concurrency 100 β†’ 588 req/s, 99.8% success (998Γ—200, 2Γ—429 β€” the limiter firing correctly under concentrated load), p50 82ms / p95 616ms. Full capacity math in the repo (_scale-capacity.md): after the pass-296 visibility-gate + jitter, ~0.08 req/s per visible client, so 1,000 concurrent β‰ˆ 80–100 req/s (well under measured), and the one scale prerequisite is the $5/mo Cloudflare Workers Paid plan (for the KV read volume + the cron's own writes). L3/4 DDoS is already absorbed free at Cloudflare's edge. Net: fixes verified live, the self-found limiter gap closed, and the desk is load-proven for thousands of concurrent clients.
Batch CF (pass 299, MULTI-AGENT AUDIT) β€” a 28-agent adversarial sweep for Goldman-credibility + thousands-of-clients readiness found 18 verified defects; all 18 fixed. Ran an exhaustive multi-agent audit (7 parallel dimension auditors β€” honesty, fabrication, live-render, worker-scale, client-scale, security, correctness β€” each finding adversarially re-verified at file:line by an independent agent), then a 14-agent parallel fix pass, then a self-review + live verification. Confirmed + fixed: 5 high, 7 medium, 6 low. Highlights: (SECURITY, 5 XSS) remote news headlines/sources/URLs and SEC insider names were interpolated into innerHTML unescaped on news-pulse / news-reactions / news / ticker / insider-live β€” a crafted feed item could inject script; added HTML-escapers + http(s)-only URL validation to all five. (HONESTY, 4) model-results.html and brain-grade.html graded the brain on raw accuracy vs a 50% coin flip with promissory verdicts ("Press the bet", "Solidly profitable", "Brain is firing well") β€” the exact overclaim the credibility thesis forbids; reframed every grade against the market-drift bar, stripped all promissory copy, added honest caveats linking the Edge Scorecard (same fix on mobile-dashboard's "Crushing it"; index.html hero stats de-hardcoded so a stale number can't read as live). (SCALE, worker) /brain/quotes did a KV write-on-read that fired every request for a permanently-unresolvable symbol (now gated on a dirty flag); /brain/bars was the last uncached hot read (now colo-cached + Cache-Control); the write-heavy unauthenticated POSTs (/auth/register, /track) are now rate-limited so they can't exhaust the brain's KV write budget; admin-token checks made constant-time. (SCALE, client) the Stooq/Coinbase pollers (data-provider.js), the 60s worker-bridge sync, and continuous-learner's 3s/30s ticks were polling forever in hidden background tabs β€” all now visibility-gated like worker-quotes.js. (FABRICATION) spread-scanner.html priced spreads off a synthetic Black-Scholes chain with no demo banner (its sibling options-chain.html had one) β€” added the SAMPLE banner; risk-parity.html requested off-universe symbols β†’ real-looking allocations from guessed vol β†’ swapped to a real-universe ETF + flagged estimate cells. Worker redeployed pass-299 + verified; frontend v214. Net: the entire desk survived an adversarial Goldman-diligence + load-scale review β€” every confirmed defect closed.
Batch CE (pass 298, scale) β€” completed the read-endpoint cache rollout the pass-296 sweep missed: 8 more polled endpoints were still hitting KV on every request. A live header audit (curl every /brain/* endpoint the site polls, check for Cache-Control) caught that pass 296 only cached the 5 hottest (health/state/signals/picks/quotes) β€” but metrics, symbols, journal, model, learning, confluence-score, flow-score and constraints (GET) had NO caching. Several are polled by the Proof + Edge-Scorecard demo pages, so at thousands of clients each was a full KV read per visitor per load. Added per-colo kvGet read caching (cacheTtl 30–60s, matched to how slowly each key changes β€” model/champions/metrics on the ~minute cron, constraints only on admin edit) plus a matching response Cache-Control to every one. All read-only; the write paths (cron, bootstrap, auth, POST constraints) are untouched. Worker linted valid ESM, pass-298. Net: the ENTIRE polled read surface is now colo-cached β€” a thousand concurrent tabs collapse to a handful of KV reads per key per colo per cache-window, instead of thousands.
Batch CD (pass 297, scale/abuse) β€” worker-native per-IP rate limiting, closing the last "thousands of clients includes bad actors" gap. Pass 296 hardened legitimate load; this closes malicious load. Initially I documented a Cloudflare-dashboard WAF rate-limit rule as a Brandon action β€” then caught that it wouldn't even work: the brain is served from *.workers.dev, which is NOT fronted by the zone WAF, so dashboard rate-limiting rules don't apply to it. The correct layer is the worker itself. Added an in-memory sliding-window per-IP limiter (module-scope Map, survives across requests in an isolate): GET /brain/* is capped at ~12 req/s per IP (120 / 10s window) and returns 429 (with a 5s cache so even the rejection is cheap under a flood). Zero KV writes β€” a per-request KV counter would have defeated the pass-296 read-caching that keeps the worker in budget, so this is memory-only. Honest scope, stated in-code and on worker-setup: isolates are per-colo + ephemeral, so this stops the realistic threat cold (one abusive IP hammering an endpoint from one colo β†’ Yahoo IP-blocking the worker, CPU burn) while a distributed botnet is left to Cloudflare's always-on L3/L4 DDoS protection underneath. Legit clients poll ~2Γ—/min, ~0.03 req/s β€” the limit only ever trips bots; even a 50-user corporate NAT (~1.6 req/s aggregate) is far under it. Auth POSTs keep their own per-email brute-force throttle; the cron tick is admin-token gated. Worker linted valid ESM, bumped to pass-297; worker-setup.html abuse card rewritten (rate-limiting is now built-in, nothing to configure β€” only the Paid-plan check remains). Net: the read surface can no longer be driven into a cost/availability failure by a single abusive client, without spending a single KV write.
Batch CC (pass 296, CRITICAL β€” scale) β€” production-hardened the desk for thousands of concurrent clients: killed three load amplifiers that would have melted the Workers/KV budget (one of which could have killed the brain itself). A scale audit of "what happens when thousands of browsers are open at once." Three findings, all fixed two-sided. (1) CRITICAL β€” analytics could starve the brain's own writes. Every pageview did a read-modify-write on ONE KV key (recordTrack). KV hard-caps ~1 write/sec/key and daily write quotas are finite β€” at volume, pageview writes would race (losing counts anyway) and exhaust the KV write budget the cron tick needs for model/journal writes: traffic success = brain death. Fix: pageviews are now sampled 1-in-5 at write time with counts pre-multiplied Γ—5 (statistically equivalent at volume; disclosed in the analytics payload as sampling); rare, high-value events (feedback, signup) are always recorded exactly. (2) Thundering herd on /brain/quotes. The moment the 60s quote cache expired, EVERY concurrent request refetched Yahoo (24 subrequests each) and raced to rewrite the cache. Now stale-while-revalidate: a stale-but-recent cache (<15 min) is served immediately and only ~1-in-4 requests takes the refresh; a very old/empty cache still refreshes synchronously (first-visitor correctness). Quotes are ~15-min delayed anyway β€” briefly-stale-served is honest. (3) The tab fleet was the whole load profile. Every open tab polled the worker 3Γ—/25s forever, even hidden in the background, and every client's fixed timer synchronized into herds. worker-quotes.js now skips polls while the tab is hidden (immediate refresh on return β€” the user loses nothing) and uses a per-client jittered cadence (30–45s) that spreads load flat. Background tabs dominate volume at scale, so this alone cuts total requests by an order of magnitude. Plus the read path: hot read-only endpoints (/brain/signals, /brain/picks, /brain/health, /brain/state, the quotes cache) now use per-colo KV read caching (cacheTtl: 30 β€” the cron rewrites these ~1/min, so 30s of read lag is invisible) and return short Cache-Control headers, so the polling herd shares reads instead of each hitting KV. Also in this pass: two leftover model-edge overclaims on smart-money-confluence.html ("real ~53% walk-forward edge", "the brain's edge is real but marginal") corrected to the pass-295 truth β€” the brain has NO proven timing edge; the insider leg carries it. Worker linted as valid ESM; v214 cache bump. Net: the desk's cost and stability now scale sub-linearly with traffic β€” a thousand open tabs behaves like dozens β€” and growth can no longer starve the brain of its own KV writes. (Requires Brandon cd worker && npx wrangler deploy for the pass-296 server half; the client half β€” visibility gating + jitter β€” is live on push.)
Batch CB (pass 295, CRITICAL β€” honesty) β€” the confluence verdict was crediting "fusing signals" when the edge is entirely the INSIDER signal; fixed the attribution. Found during an MD-lens render sweep of the demo pages. The Edge Scorecard's verdict banner read "YES β€” fusing signals adds edge… paying for richer flow data is justified." The per-leg data says otherwise: insider-alone hits 67.4% over 230 graded (z vs selection-adjusted drift +2.94, +3.5%/call, beats drift at 95%) β€” a real, significant edge (the documented insider-buying anomaly). The TA brain alone hits 53.0% β€” NO edge, pure drift. Confluence (both agree) hits 67.1% over 164 β€” which does NOT beat insider-alone (67.4%); it just rides it. Root cause: the worthIt test only compared confluence to brain-only, never to insider-only, so any time confluence beat the (edgeless) brain it declared "fusion adds edge" and turned the banner green. That is a subtle but real overclaim β€” exactly the misleading-edge framing this whole project refuses. Fix (two layers, honesty-first): (1) worker verdict now also compares to the best single component (insider); if fusion doesn't beat insider-alone by a real margin it attributes the edge honestly β€” "REAL EDGE, but it is the INSIDER signal, not the model… credit the insider data, not the fusion" β€” and the banner goes amber, not green (new fields insider_edge_found, fusion_beats_insider). (2) A client safety-net in edge-scorecard.html applies the identical correction immediately on git push (verified live: banner now amber + insider-attributed), a no-op once the worker ships pass-295. Net: the desk's one genuine edge is now stated truthfully β€” it's the insiders, not the model β€” which is a stronger, more credible finding than the overclaim it replaced. (Requires Brandon cd worker && npx wrangler deploy for the pass-295 server half; the client half is already live.)
Batch CA (pass 294, CRITICAL) β€” the live-data error Brandon spotted: a stale 60-symbol cap was dropping the entire sector-ETF complex, leaving ~15 names stuck on months-old seed prices site-wide. Brandon: "I'm seeing errors in the live data β€” you said it was perfect." He was right. Root cause: /brain/quotes capped each request at .slice(0, 60), a limit set when the universe was smaller. The universe is now 75, and the shared browser poller (worker-quotes.js β†’ pollQuotes) requests the whole set in one call. The cap silently dropped the trailing 15 symbols β€” AVGO, MU, JPM, BAC, GS, and the ENTIRE sector-ETF complex (XLF, XLK, XLV, XLY, XLP, XLI, XLU, XLC, XLB, XLRE) β€” before the KV cache was even consulted, so they could never get a real price and fell back to their (potentially months-old) SEED value. That's the visible symptom: sector-rotation / heatmap boards showing wrong or frozen sector prices, and a few large caps stale, on every page reading the global feed. Verified live: /brain/quotes for the full universe returned exactly 60/75, the same 15 missing on repeated fetches (stable = a hard cap, not a Yahoo hiccup). Two-layer fix. (1) Client β€” pollQuotes now batches the request into ≀50-symbol chunks (Promise.all), so every chunk stays under the cap and ALL 75 get real delayed prices; ships on git push alone, works against the currently-deployed worker, and is robust even if the universe grows again. (2) Server (pass-294) β€” raised the request cap to 128 (the real cost governor is the separate 24-fetch-per-request throttle, untouched), belt-and-suspenders. The full-universe scan otherwise came back clean: real 2026 prices (SPY $746, NVDA $200, TSLA $420), no absurd change%, no zero prices; the only other flag was VIX showing zero volume, which is correct (an index has no share volume). Net: the site-wide stale-sector-price error is fixed at the client the moment this pushes; the worker cap raise removes the root cause on next deploy. (Requires: Brandon cd worker && npx wrangler deploy for the pass-294 server half β€” the client half is already live.)
Batch BZ (pass 293 + noise-gate) β€” fixed a misleading health flag, then cut the daily "pick" noise (front-end sit-out gate) after Brandon noticed the brain "feels wrong very often." Two user-driven fixes. (293) The /brain/health "healthy" flag was crying wolf off-hours. Brandon flagged healthy: False. Root cause: healthy was hardcoded to lastTickAgo < 180s (strict 3-min), but off-hours/weekends the cron is deliberately throttled (~30m, pass 244), so a large lastTickAgo at night is NORMAL β€” audit_pass + self_sustaining were both true the whole time. A flag literally named "healthy" reading false while the system is fine is misleading (and trips naive uptime monitors). Made healthy market-aware (= self_sustaining: tick fresh for the session + model trained); kept the old strict signal honestly as tick_fresh_strict; worker-setup's tick dot made market-aware too. Deployed pass-293, verified live: healthy=true, tick_fresh_strict=false (16m, market closed), issues=[]. (noise gate) "The brain feels wrong very often β€” limit some noise." Honest diagnosis: it IS wrong often = no proven edge + a structural short-bias fighting market drift (down-calls miss in an up-drifting tape β€” that's the 30% Pick-of-Day hit rate). Pulled the live broadcast constraints and found the culprit: potd_min_conviction was 0 β€” the Pick of the Day was forced to name a call EVERY day, even on coin-flip days. Added a front-end "sit out on weak days" gate to BOTH pick-of-day.html and today.html: when even the #1 name is below 40% conviction, it shows "😴 No clear pick today β€” sit out" instead of a near-50/50 call (tunable WEAK_CONVICTION constant + link to constraints.html). Honest scope (stated on-page and to Brandon): this cuts the VOLUME of low-conviction noise, NOT the error RATE β€” confident-but-imperfect calls still show; only real edge (the flow/insider experiments) fixes accuracy. Also recommended Brandon raise the server-side floors (potd_min_conviction 0.20, min_conviction 0.18) for belt-and-suspenders quiet. Net: an honest health signal that no longer false-alarms, and a desk that sits out the coin-flip days instead of crying wolf daily.
Batch BY (pass 291-292) β€” the free options-flow EDGE EXPERIMENT: a real flow board (replacing a fake page) + a graded forward-test, end to end. Took the wheel on "what's next": the only thing that moves the desk is finding edge from different data, and there was a free, untested source β€” the CBOE chain's volume + open interest. (291) Real options-flow. New read-only worker endpoint GET /brain/options-flow aggregates the free CBOE chain into a compact per-name flow summary (call/put volume, OI, $-flow, net direction, unusual=vol>OI) across a 14-name liquid basket, 15-min cached, zero changes to the cron/training paths. Rewrote options-flow.html: killed the fully-fabricated SAMPLE page (fake $4.82B premium, fake "84 sweeps", fake max-pain) and replaced it with a REAL board off that endpoint, honestly scoped (real daily-aggregate flow, NOT real-time sweeps β€” that tape needs a paid feed; experimental, not yet graded). Verified live: index ETFs put-heavy / single names call-heavy β€” real, structured signal, not noise. (292) Graded forward-test. maybeFlowScorecard captures the daily $-flow direction per liquid name (entry price from KV SIGNALS) and resolves the 5-day move; GET /brain/flow-score grades it with the identical honest machinery as the confluence scorer (hit-rate vs the per-direction drift null, profitability, 95% bound; ready=false until ≥20 graded). Fully ISOLATED from the precious confluence experiment β€” its own flow_log_v1, own snap-day key, own try/catch β€” so it can never disturb it (verified: confluence still ok after deploy). The options-flow page and this Edge Scorecard both surface the live verdict (ACCRUING → EDGE / NO-EDGE). Worker linted as valid ESM each pass; Brandon deployed pass-291 then pass-292; both verified live + healthy; /brain/flow-score returns ACCRUING 0/20 and begins capturing on the next fresh-signal weekday tick. Honest prior: free 15-min daily-aggregate flow probably won't beat drift β€” but now it self-reports over the coming weeks instead of us guessing, and rigorously ruling out the last free signal is itself the deliverable. Net: the desk now tests a genuinely new, free edge hypothesis end to end, honestly graded β€” the one move that could eventually make this more than an honest information terminal.
Batch BX (pass 326) β€” light-mode safety pass (one real dark-on-dark bug fixed) + a 2-week launch content calendar. Polish round. Light-mode pass: rendered the desk locally in the light theme and ran a programmatic contrast scan across the key pages. The token system is theme-safe β€” the --text/--bg aliases are defined as var(--text-primary)/var(--bg-primary), which CSS resolves lazily at use-site, so every var(--text) flips correctly once the light block overrides the canonical tokens. Body copy, headings, cards, and the honest metric tiles are all readable. One real bug found + fixed: the fixed #brain-status-bar (bottom bar, present on every page) hardcoded a dark background, but its inner text uses theme vars (--text-primary headline, --text-muted metrics) that flip dark in light mode → dark-on-dark, the metrics line was barely legible. Added a scoped override β€” html[data-theme=light] #brain-status-bar { background: rgba(255,255,255,0.95) } β€” so the bar goes light and the now-dark text is readable; dark mode untouched. Verified in-browser: bar bg flips to white, metrics gray (#64748b) legible, headline keeps its semantic status color. Everything else (accent links, callout headers, the rgba(0,0,0,0.3) tool inputs that composite to light-gray over a white page, the dark feedback FAB) is readable as-is β€” borderline by luminance but legible by hue β€” and left alone rather than risk regressions. CSS change → cache bump v207→v214. Content calendar: wrote _content-calendar.md (private) β€” a 2-week, 10-weekday launch posting plan (Pick-of-the-Day rhythm, the drift-not-coin-flip explainer, a "what the brain got wrong" miss-post, weekly scorecard, insider/congress highlights, a build-in-public model post) with example copy + a 10-format evergreen bank, so the feed isn't empty after the launch thread. Net: light mode is verified safe for public users (the one real dark-on-dark bar is fixed), and there are two weeks of honest content queued.
Batch BW (pass 325) β€” launch-readiness polish: honest social-share cards on the proof pages, verified traffic-spike resilience, and a LinkedIn companion to the launch thread. Continuing the pre-public prep. Open Graph audit: the 8 front-door pages already had a full OG / Twitter-card suite pointing at a clean, honest assets/og-card.png (1200×630, "Live market data · self-learning brain · graded honestly" β€” verified live 200, on-message). The gap: proof.html and money-made.html β€” the two "does it actually work?" pages, and proof is the one the launch thread links to β€” had no card, so a shared link rendered imageless. Added the full suite to both (reusing the honest card). Also caught that money-made's meta description was itself a backward-looking profit-implication ("…this is how much you would have made") → softened to "graded honestly against the market's drift… Research, not advice." Verified live (curl): both cards present, old description gone. Traffic-spike resilience (verified, no fix needed): confirmed every hot worker endpoint edge-caches via caches.default + Cache-Control: max-age (quotes 120s, metrics/news/insider 3600s, options-chain 300s, profiles 6–12h), so a launch spike of thousands of visitors collapses to a handful of upstream calls per cache window β€” Finnhub/Stooq/CBOE won't be hammered and the live-data story holds under load. LinkedIn copy: added a professional single-post version to _x-launch-thread.md (analyst-reflecting-on-rigor angle β€” doubles as a credibility artifact to send the MD). All inline <head> + underscore-file changes → no cache bump. Net: any link Brandon shares now renders a clean, honest card; the desk is confirmed spike-resilient; and there's both retail (X) and professional (LinkedIn) launch copy ready.
Batch BV (pass 324) β€” pre-public hardening: a hostile-read pass of the public copy (could any single screenshot read as a performance guarantee?) and softened every overclaim, ahead of a marketing push. Brandon asked whether to start marketing (Discord / Twitter) or harden first. Recommendation: don't lead with a Discord or a signals product β€” the desk's whole value is that it admits it has no proven edge over drift, and a daily-signals room creates a profit expectation it can't honestly meet; market the rigor on X under a real name instead, and land the MD first. Then ran the gating pre-public work. Hostile-read (good news): the honesty doctrine held β€” every social share-card (og/twitter description) is already honest ("metrics that admit what's unproven", "currently mostly drift, not proven skill", "Research, not advice"); the legal disclaimer (educational only, not investment advice, options carry substantial risk of loss, past performance ≠ future results) is already site-wide via the shared footer; options-101's "5x-10x" leverage line is balanced by an adjacent "options can go to ZERO β€” you lose 100%" warning. But how-to-make-money.html was a real liability and got the most work: the hero claimed the brain "tilts the odds in your favor" and "turns its signals into real dollars" (both edge/profit claims the rest of the site refuses to make) → rewritten to "hasn't proven it can beat the market's drift… process first; profits are never promised"; the growth section "The realistic math: $1,000 → $100,000 / Year 4: financial freedom math" projected wealth off an unproven "1.5% expected weekly return" → fully reframed into an honesty lesson ("the assumption it hides": a table of what you'd have to actually earn, led by the honest base case "0% above drift ≈ track the market", with a danger callout that the data says the edge is ~zero so an index fund likely beats the stress). Also fixed a real display bug: the calculator's hardcoded default outputs ($4,432 / +343%) didn't even match its own 1.5%/wk input (that's ~2.9%/wk math) and the live default was a lure-y +117%/yr → default lowered to a modest 0.5%/wk (+30%/yr) with matching placeholders and a "hypothetical, not a forecast" label. Smaller softenings: footer tagline "Institutional-grade technical analysis… Built by traders, for traders" → "Real-data options & TA research… states its edge plainly and admits what is still unproven. Research, not investment advice." (app.js, site-wide); homepage hero "unusual options flow" (a paid feed the desk doesn't deliver) → "live options-chain data" (now true via the CBOE feed); bankroll-milestones "the long path… to financial freedom" → "Real P&L only β€” no projections, no promises"; brier-skill scale legend "institutional-grade" → "rare in practice". Also drafted (private, not deployed): _x-launch-thread.md β€” an 8-tweet honesty-angle launch thread + bio + alt hooks + posting notes, with today's real numbers and a "refresh before posting" guard. JS-module change (footer) → cache bump v206→v214 (3,043 refs across 419 files + CACHE_BUST + LV). Net: nothing on the public surface can be screenshotted as a profit promise; the worst page is now a credibility asset; and there's a ready-to-post launch thread for the moment Brandon pulls the trigger.
Batch BU (worker pass-290) β€” real option premiums, FREE, for every visitor: CBOE delayed-quotes chain (no key, no account). The Options Play Lab priced spreads with Black-Scholes ESTIMATES because there was no free options feed. Brandon was about to wire Tradier (paid/account-gated) for real prices. Found a better path: CBOE publishes a free, no-auth delayed-quotes options JSON (cdn.cboe.com/api/global/delayed_quotes/options/<SYM>.json) with full greeks (delta/gamma/theta/vega/IV) + bid/ask/OI/volume, and the worker fetches public endpoints server-side with no CORS limits. Wired fetchCboeOptionsChain() + an OCC-symbol parser; made CBOE the default provider on /brain/options-chain (a configured Tradier/Polygon key is now just an optional real-time upgrade). Verified live end-to-end: NVDA Jul-17 = 214 contracts, ATM $210 call mid $9.02 / IV 35.8% / delta 0.54 / OI 32,014; SPY = 13,944 contracts across 34 expirations; and the Options Lab's own chain helpers return a real $210/$220 call spread at a real $4.17 net debit from real mids. The page shows a green LIVE CHAIN tag + real "MID PX" whenever it renders a spread (gated on a directional-conviction day; a flat/closed market shows the honest "no clear edge / WAIT" instead). Net: the flagship tool's premiums are now real for everyone at zero cost and zero setup β€” the Tradier dependency is gone.
Batch BT (pass 321-322) β€” MD-demo prep: killed a site-wide mobile horizontal-overflow bug, wrote the live demo script, and fixed the homepage underselling its own track record. Pass 322 (front door): the homepage — the MD's first impression — still showed the stale forward-test framing: hero stat "0 / 20 calls graded", a "track record" band saying "the record starts empty and fills in over the coming weeks", and a nonsensical "556 / 20" once the confluence count passed 20. But the desk has 1,012 real resolved predictions (shown on proof / money-made / brain-proof). Wired all three to the authoritative /brain/metrics: hero stat → "1,012 real predictions graded", track-record band → "1,012 graded, 55.4% directional vs 52.4% drift, mostly drift — and we publish that", and the "proving the edge" line → an honest "556 graded · no edge over drift yet". Honest static fallbacks so it never reads worse than truth. The front door now matches the proof pages. Prepping the exact path an MD clicks. Mobile fix (pass 321): a mobile pass of the demo path (homepage → Start Here → Pick of Day → Proof → Options Lab) found ~110px of horizontal overflow on EVERY page — the page could be swiped sideways on a phone. Root cause: the sticky marquee ticker is wider than the viewport; body had overflow-x:hidden but html was overflow-x:visible, so the overflow leaked to the page level. Fixed with overflow-x: clip on html — deliberately clip, not hidden, because the navbar + ticker are position:sticky and overflow:hidden creates a scroll container that breaks sticky, whereas clip doesn't. Verified on all 5 path pages at 390px: overflow 0, no sideways scroll, sticky nav still pins (below the sticky ticker). Global CSS → cache bump v205→v214. Demo script: wrote _md-demo-script.md (private, not deployed) — the ~3-minute talking track for presenting live: what to say + point at on each page, the killer "does it work?" line (lead with the real ~1,000-call record, "we publish the null — most AI-signal sites fake exactly the edge we refuse to claim"), anticipated MD questions with honest answers, and don'ts. Net: the desk looks sharp on a phone now, and there's a tight, honest script to walk an MD through it.
Batch BS (pass 320) β€” first step of the data roadmap: real options chain wired into the Play Lab, replacing the Black-Scholes estimates the moment a feed is connected. Acting on the roadmap memo, built the cheapest credibility win: real option premiums. Worker (pass-289): new fetchOptionsChain() + GET /brain/options-chain β€” provider-agnostic (Polygon v3 snapshot OR Tradier chains, selected by OPTIONS_PROVIDER), keyed by a server-side OPTIONS_API_KEY (same pattern as the Finnhub key β€” the browser never sees it), normalized to a clean {provider, delayedMin, expirations, contracts:[{strike, bid, ask, mid, iv, delta, ...}]} shape, 5-min edge cache. When no key is set it returns an honest no-options-feed so the page degrades cleanly. options-lab: legPlay() now prefers the real mid price + real greeks for each leg when the exact (type, strike, expiration) contract is found, recomputes net debit / max gain / breakeven / reward-risk from real prices, and flags it with a green LIVE CHAIN tag + "MID PX" header; falls back to the Black-Scholes estimate (and says so) otherwise. Ships dark, lights up on deploy: the live worker is still pass-288 so fetchChain returns null and the play renders exactly as before (verified: no-edge path clean, inline script parses, no NaN). It turns real the moment Brandon deploys pass-289 and sets one secret. Recommendation: Polygon Options Starter ($29/mo) β€” instant key, no brokerage account, 15-min delay is irrelevant at a 5-day horizon; Tradier is the $0 alternative if he trades there. Net: the flagship tool's premiums stop being estimates the instant a feed is wired β€” the first concrete move on the paid-data path to a real edge.
Batch BR (pass 317-319) β€” carried the honest track-record story across every "does it work?" page, gave the desk a clean MD front door, and scoped the path to a real edge. A three-part goal after the money-made track-record work. (317) Consistency across the proof pages. Audited edge-scorecard, proof, brain-proof so none contradicts money-made's honest 1,000+-call record. proof.html still had the RETIRED bar as a section header β€” "Does it beat a coin flip?" → "Does it beat the market's drift?" (the doctrine gates on skill-vs-drift, never a coin flip; edge-scorecard's title was fixed pass-306, proof's header was missed), same in its meta. Also surfaced the live resolved record from /brain/metrics.live_resolved on proof ("Live record so far: 1,012 real predictions resolved, 55.4% directional, BSS -0.021 — the same running track record shown on Money Made") so the headline number matches everywhere. Verified the others were already consistent (edge-scorecard's coin-flip mentions are all the honest contrast, drift is the bar; brain-proof surfaces the 1,012 count; proof's forward-calls section reads the 553 by-conviction breakdown). No contradictions remain. (318) MD front door. start-here.html is already a strong 3-minute narrative (what it is → 3 key pages → real-vs-proving → how it learns, with live proof-of-life) but was only linked from today.html — an MD landing on the homepage had no entry. Added a prominent hero pill on index.html ("New here? Start Here — the 2-minute orientation"), fixed the "Does it work?" CTA tooltip + start-here's proof-card to the drift framing. MD demo flow is now clean: homepage → Start Here → Today/Pick → Proof (the 1,012-call honest record). (319) Scoped the path to a real edge. Free data is tapped out (proven); chose the paid-data scoping branch over the insider-cluster forward-test (the free Form-4 basket currently has zero open-market buy clusters, no history to backtest, and a forward-test accrues over weeks). Wrote a private decision memo (_data-roadmap.md, underscore = not deployed): what each feed unlocks for this desk (Tradier / Polygon options / Unusual Whales / ThetaData / SqueezeMetrics) with rough cost + edge potential, a highest-ROI sequence (real option prices ~$0-29/mo first → options flow as the actual edge experiment ~$50-100/mo, de-risked with cheap historical), and an integration plan that fits the architecture (keys server-side in the worker, signal rides the existing Edge Lab/confluence forward-test rails, drift-bar gate before any green badge). Net: every page an MD opens to judge "does it work?" now tells one honest story, there's a clean guided front door, and there's a concrete, costed plan for the next real edge.
Batch BQ (pass 315-316) β€” the "does it actually work?" answer, made real: money-made now shows the brain's true 937-call track record (was a confluence-gated $0), and the contradictory red "Brain UNTRAINED" banner is gone. Asked what to build next, Brandon chose real track record β€” the one question an MD always asks. (315) money-made.html: the headline "Live 24/7 Brain β€” real track record" card was wired ONLY to /brain/confluence-score (the slow forward-test, barely graded), so it showed "Capturing… this is why the number is $0" while the worker's 1,518 real predictions sat unused. Reworked it to lead with /brain/metrics (the authoritative aggregate over every resolved prediction): hero = real sample size (937 graded of 1,518, 581 pending β€” credible, makes no edge claim per the honesty doctrine), an honest verdict chip ("beats a coin flip but not yet the market's drift (52.4%) at 95% β€” the +2.3pp skill isn't significant; we publish this rather than hide it"), and a stat grid (live acc 56.6%, walk-forward 54.7%, drift 52.4%, skill +2.3pp, Brier/BSS 0.245/+0.019, calibration 5.5%). The confluence forward-test stays as a secondary line. (316) brain-coach.js: the screenshot of the new card caught a red "Brain UNTRAINED β€” no model weights" banner right below it β€” alarming, and a direct contradiction of the 937-call record. Root cause: the coach judged the brain solely by the local browser model, which is empty on a fresh visit by design (the 24/7 worker is authoritative and the local trainers defer to it, pass-199). Reframed the untrained state from a red five-alarm to an honest, calm line β€” "This browser session hasn't trained a local model yet β€” the always-on 24/7 worker is the authoritative brain (see its real, resolved track record on Money Made / Edge Scorecard)." Verified live keyless: the worker card renders 937/1,518 with real stats, the red UNTRAINED banner is gone, zero console errors. JS-module change → cache bumped v204→v205 (3,040 refs + LV + CACHE_BUST) so it reaches returning visitors. Net: the desk's headline "money / track record" page now tells the real, honest story β€” large real sample, no edge claim it can't back, no scary banner fighting it.
Batch BP (pass 312-314) β€” Brandon reported seeing live-data errors after an "all clear." Ran a rendered-DOM audit and fixed every real one. (The worker layer was healthy; the bugs were in how pages displayed the data.) Rather than trust the code, I drove the live site like a user. Probed all 14 worker endpoints directly — all healthy, returning real data (quotes, picks, predict, recommendations, profile, fundamentals, earnings, news, insider, insider-feed, bars, confluence, metrics, premarket/halts/econ). Link integrity: extracted all 258 internal .html targets and confirmed every one resolves to a real file (zero broken nav/footer links). Rendered-DOM scan of ~28 live pages in real browser iframes for NaN / undefined / Infinity / [object Object] / $0.00 — which surfaced the actual bugs an MD would see: (312) Options Play Lab's 5-column option-leg grid overflowed on narrow phones → collapses to 3 columns under 560px (desktop unchanged). (313) the real fixes: (a) insider tables printed "$0.00" for Form-4 grants/awards/option-exercises (codes A/M/G — which legitimately have no open-market price) → now a "—" with tooltip, in ticker.html, smart-money.html (price + $-value columns) and insider-clusters.html. (b) fundamentals.html read four metric fields under wrong/missing keys, so a flagship name like NVDA showed blank "—" for live data: Shares Outstanding (lives in profile, not metric), P/E forward (peForwardforwardPE), EV/EBITDA (→evEbitdaTTM), EV/Sales (→evRevenueTTM, also mislabeled). Verified NVDA now renders 24.20B shares, P/E-fwd 20.8, EV/EBITDA 30.47, EV/Sales 19.90. (c) fundamentals.html ignored ?sym= and always loaded the NVDA input default, so fundamentals.html?sym=AAPL showed NVDA → now parses the URL param (verified ?sym=AAPL → Apple Inc, $4.36T, 14.69B sh). (314) searching a popular-but-uncovered symbol (HOOD/SOFI/RBLX, not in the brain's 75-name universe) told the user to "try a liquid large-cap" — reads as broken for a liquid stock; now says "<SYM> is not in the brain's covered universe yet (~75 large-caps)" with covered-name suggestions (predict 404 body was being discarded; added a body-preserving fetch). Confirmed graceful: ticker + options-lab both degrade to honest "data unavailable" states for uncovered symbols — no NaN/zeros. All inline HTML/JS (network-first) — no cache bump. Net: the specific glitches a viewer would actually hit (zero prices, blank fundamentals, NVDA-only deep links, a misleading "not liquid" message) are gone — verified in-browser, not just in code.
Batch BO (pass 309-311) β€” distribution + reach: shareable plays, daily-pick share, a shares plan for non-options traders, and a clean site-integrity audit. With the product built + honest, the leverage shifted to getting it used. (309) Options Play Lab β€” Copy / share this play: a button builds a self-contained one-paste summary (symbol + price + the brain's lean % + the exact spread/strikes/expiration/R:R + deep link + educational disclaimer) and copies it to the clipboard β€” so every generated play is a text/tweet/Substack-ready artifact that links back. (310) Pick of the Day β€” Copy / share the pick: same pattern for the daily alpha pick (live: XLE @ $54.69, LONG 80% up-prob, 61% conviction). (311) Options Play Lab β€” Shares plan card: alongside the options spread it now renders a stock plan (entry / 1.5-ATR stop / 2× + 3.5×-ATR targets / reward:risk / share count for a $500 risk budget) from the same real ATR + direction, so the flagship tool is actionable for anyone who trades shares, not just options (verified: AAPL entry $295.95 / stop $283.59 / T1 $312.43 1.3:1). All three are inline, network-first HTML β€” no cache bump. Site-integrity audit (clean): all 111 JS modules + the worker + the 2 data scripts lint; every curated nav + footer link resolves to a real file (no breakage from the pass-305 SAMPLE-trim or the new pages); options-lab + edge-lab present in page + sitemap; and every one of the ~370 sitemap URLs maps to an existing file (the 40-entry trim orphaned nothing). Verified each new surface live keyless: real values, no NaN / undefined, zero console errors. Net: the genuinely-good, honest product is now self-distributing (every play + pick is one tap from a share) and usable by options AND shares traders, with site integrity confirmed after a heavy session of changes.
Batch BN (pass 308) β€” hunted for a real edge, honestly. New Edge Lab page: every signal graded vs market drift; current verdict = no free-data edge (and we say so). Brandon asked for the highest-leverage move and chose "hunt a real edge." Rather than tune TA (tapped out per pass-267) or fake a backtest, I rigorously tested whether the desk's UNIQUE free data beats the market's natural drift. Method (no look-ahead, bar = beat the unconditional drift base rate at one-sided 95%): pulled deep Yahoo daily history + the worker's Finnhub recommendation trends and measured forward 1-month returns. Results: (1) Analyst-revision momentum — upgrades +9.1% vs +11.1% drift base (n=30, z=−0.59) → NO EDGE (priced in). (2) Price momentum (3mo→1mo) — top-tercile +2.29% vs +2.22% base (n=460, z=0.12; high-minus-low z=−0.56) → NO EDGE. Combined with the brain's own walk-forward (54.7% vs 52.4% drift, +2.3pp, not significant → MOSTLY DRIFT) and the live confluence test (now n=104, still NOT YET), none of the free signals clear the drift bar. That's the efficient market, and it confirms the pass-267 doctrine rigorously. Shipped it as edge-lab.html — an honest, automated edge scorecard: the two backtested signals come from a committed data/edge-lab.json (recomputed weekly by .github/workflows/edge-lab.yml from real Yahoo+rec data, parser _edge_lab.js, only commits a healthy ≥20-name run), and the brain-TA + confluence rows are pulled live from the worker. The verdict banner is honest: "No signal clears the drift bar — yet; the day one does, this turns green." Why this is the right move: it's the question an MD asks ("does it work?"), answered transparently — most "AI signal" sites fake exactly the edge we refuse to claim, so publishing the null is itself the differentiator. Verified live keyless: 4 rows render with real numbers, no NaN, zero console errors; honest no-edge verdict. Wired into the Brain dropdown + brainGrp + all-tools + sitemap; cache bumped v203→v204. Banked the finding to memory so it's not re-litigated: free-data alpha is ruled out — a real edge needs different/paid data (order/option flow) or a forward-tested insider-cluster signal, not more free indicators.
Batch BM (pass 307) β€” new feature: the Options Play Lab. Search a ticker → the robot hands you a concrete, defined-risk options play. Brandon asked for a "search a company → the robot gives TA + options advice with expirations and exact plays, while it keeps learning." Built options-lab.html: type any ticker and it makes ONE call to /brain/predict?sym= (live price + the brain's calibrated 5-day directional lean + conviction + VIX) plus /brain/bars (real daily OHLC), /brain/recommendations, and /brain/earnings, then renders four sections: (1) snapshot + lean (LONG/SHORT, conviction %, analyst skew) with the honest "no proven timing edge — it's mostly drift" caveat; (2) real technical read (trend vs 20/50-day, RSI, ATR, 20-day range, annualized realized vol — all computed from real bars); (3) a concrete options structure — a defined-risk debit spread (call if bullish, put if bearish) with exact strikes (long ATM, short ~1.5 ATR OTM, rounded to real strike increments), two real expirations (near-term + swing, computed as actual 3rd-Friday monthlies), and per-leg Black-Scholes-estimated premium / net debit / max gain / breakeven / reward-risk; (4) what to monitor (next earnings = IV-crush risk, real support/resistance from the 20-day range, VIX regime, the conviction threshold). Honesty rails throughout: if conviction is within ~5pp of a coin flip it refuses to force a play and says WAIT/monitor; premiums are explicitly labeled Black-Scholes ESTIMATES from realized vol (there's no live options-chain feed on the free tier — confirm fills on your broker); and the whole thing is framed educational-not-advice. Verified live keyless: NVDA → BUY $210 / SELL $220 call spread, real Jul-17 + Aug-21 expirations, near-term 1.7:1 R:R, no NaN; SPY ($750) → $755/$780 spread, 2.3:1; zero console errors; strike increments correct across price tiers. Caught + fixed one math issue in build (long strike landed ITM → debit ate the width / 0.13:1 R:R; moved the long to ATM-slightly-OTM and widened to ~1.5 ATR → healthy 1.5-2.3:1). Wired into the Daily nav dropdown + playsGrp + all-tools catalog + sitemap; cache bumped v202→v203. Also answered Brandon's first question: yes — the alpha pick already exists live (/brain/picks → Pick of the Day / Best Long, today XLE "LEAN BUY 78% up", on pick-of-day.html); the Lab is the per-symbol, on-demand companion to it.
Batch BL (pass 306) β€” MD front-door walkthrough: clicked every page an MD opens, all clean; one off-message title fixed. Loaded the front-door + headline pages keyless in-browser (no API key, the real MD-visitor experience) and checked each for console errors, real-data render, and the trimmed nav: index, today, dashboard, proof, edge-scorecard, plus the already-verified ticker?NVDA / fundamentals?NVDA / sector-flow / congress-trades / all-toolszero console errors anywhere, real data rendering, no undefined/NaN/[object Object] leaks, and the nav shows no trimmed sample links. proof + edge-scorecard both present the honest story (drift vs skill, "not yet" verdict) with no fabricated-edge claim. The remaining front-door pages (pick-of-day, morning-brief, about, start-here) checked structurally clean (200, app.js@v202, no stray v201, no Liquid). One rough edge fixed: edge-scorecard.html's <title> + social meta still led with "does it beat a coin flip?" — the exact framing the pass 296-297 honesty doctrine retired (a coin flip is 50%; market drift already beats that, so the real bar is "beats drift"). The page body was already honest; just relabeled the tab/share text to "does it beat the market's drift?" so even a glance at the browser tab is on-message. Net: the desk is MD-clean end-to-end — real live data on every page an MD will click, the honest brain story intact, and no fake-feed pages in the nav.
Batch BK (pass 305) β€” trimmed the paid-feed SAMPLE pages out of nav so the desk surfaces only real data (MD-clean). With every real-data / honesty pass landed and the demo-data audit clean, the remaining drag for an MD walkthrough was the ~40 honestly-labeled-but-not-live placeholder pages (options flow/chain/GEX/0DTE, dark pool / L2 tape / order-book, short-interest + squeeze family, MOC, ETF flows, sweep counter, plus a few seeded scanner/demo pages). They stay reachable by direct URL but are no longer discoverable: (1) all-tools.html (the data-driven catalog) now filters a canonical SAMPLE_FILES set out of every category and shows a transparent footnote ("34 paid-feed tools hidden β€” need a paid feed to be live") instead of scattering mock pages among the real ones; (2) the 6 sample links that appeared in the curated top-nav dropdowns + footer were swapped for real pages — Squeeze Radar→Algo Signals, Macro→VIX Pulse, Market Internals→Breadth, Options Chain→Fundamentals, Options Flow→Hot Movers, (footer) Options Chain→Sector Flow; (3) 40 sample URLs were removed from sitemap.xml (410→370) so they aren't advertised. Legit calculators (backtester, portfolio-builder, risk dashboards) and everything already real were KEPT. Cache bumped v201→v202 (3,028 refs + CACHE_BUST + LV) so the new nav reaches returning visitors. Verified live keyless: all-tools shows 127 real tiles with ZERO sample tiles leaked + the footnote; the nav no longer links squeeze-radar / macro / options-chain and does link the real replacements; zero console errors. Net for the MD: clicking through the desk now lands only on real, live-data pages. (The hidden pages light back up automatically the day a paid feed is wired — just remove them from SAMPLE_FILES.)
Batch BJ (pass 303-304) β€” sector best/projected leaders + a whole-site demo-data audit (result: no unlabeled fabrications, 5 gray-area hardening fixes). Pass 303 (feature): added two cards to sector-flow.htmlBest Performing Sectors (top 3 by real today / 1-week / 1-month return) and Projected Leaders — Momentum Outlook (ranked by real relative-strength + momentum vs SPY, the RRG leading read). Both reuse the page's existing REAL /brain/quotes + /brain/bars data — nothing synthesized — and the "projected" card is labeled explicitly as a momentum lean from live price data, NOT a forecast (honesty doctrine: no invented prediction). Verified live: XLF leads (today +1.47%, 1mo +6.36%), projected XLF/XLB/XLU/XLI. Pass 304 (deep demo-data audit): fanned a sub-agent across ALL ~415 pages + JS modules for the full fabrication-idiom watchlist (Math.random, seeded-sin, LCG, charCodeAt-seeded, hardcoded "live" arrays, unlabeled SAMPLE paths). Headline: ZERO bucket-C fabrications — every fake/sample number reaching a user sits under a visible SAMPLE/ILLUSTRATIVE/EXAMPLE/Demo banner or derives from real sources / legit math; the pass-280-286 honesty sweep held with no regression. Fixed the 5 gray-area items it surfaced: (1) dark-pool.html showed a contradictory green "FEED LIVE" pill above its own "synthetic" banner (an MD could screenshot it out of context) → changed to a yellow "SYNTHETIC FEED" pill. (2-3) CRITICAL-ish data hygiene: two SAMPLE pages (squeeze-composite.html, dark-pool-pro.html) were writing findings built from synthetic numbers (fake SI/DTC/util; fake DPI/block notionals) into the shared bpleone_brain_findings_v1 store that ~55 brain/feed pages read — some NOT sample-labeled — so a fabricated "finding" could surface as a real brain signal on an unlabeled feed. Disabled both emits (the real brain ingests only live signals via js/brain-loop.js); corrected dark-pool-pro's now-false "the brain ingests from this page" blurb. (4-5) two cold-load price fallbacks (moc-imbalance.html, liquidity-health.html: last: 80 + Math.random()*200) could momentarily render a random price before the feed warms → replaced with a fixed placeholder (never a random price). Verified: zero Math.random()*200 left, only legit findings writers remain (brain-loop.js + user-driven active-learning), squeeze-composite still paints, dark-pool pill reads SYNTHETIC FEED, all edited pages serve clean. Bottom line for the MD: no unlabeled fake data is presented as live anywhere on the desk.
Batch BI (pass 302) β€” worker deployed (pass-288) and the full keyless per-symbol experience verified LIVE end-to-end. Passes 299-300 shipped three worker endpoints that couldn't auto-deploy (the GitHub Action skips with no CLOUDFLARE_* secrets). Brandon asked me to deploy; rather than the Cloudflare dashboard, I confirmed the local wrangler OAuth token was still valid (whoami → brandonpleone@gmail.com, workers:write scope) and ran wrangler deploy straight from the terminal — no credentials entered or handled by me, just an already-authorized deploy of the committed code. Verified the live worker flipped pass-286 → pass-288 (KV binding + 1-min cron intact) and all three endpoints now return REAL data: /brain/recommendations?symbol=NVDA → 68 analysts (24 strong-buy / 39 buy, period 2026-06-01); /brain/profile → "NVIDIA Corp", NASDAQ, $5.06T cap; /brain/fundamentals → P/E 31.7, 52wk-high $236.54, ROE 111.7%. Then verified the PAGES keyless in-browser (no key configured): ticker.html fully populated — profile, valuation (Mkt Cap $5.06T, P/E 31.7, P/S 19.97), growth (Rev +70.68% / EPS +110.34% TTM), the analyst-rec bar (24/39/4/1/0 with the "counts not price targets" footnote), 8 insider rows, 12 headlines; and fundamentals.html went from a dead "Finnhub key required" wall to a complete live page ($209.05 −1.60%, full valuation/growth/margins/52-week/recs). Zero console errors on both. Net: the per-symbol pages now show real Finnhub data to every visitor with no API key — the dead-page problem behind passes 299-301 is fully closed. (Lesson banked: verify the live worker_version after any deploy — a green deploy log alone wasn't proof earlier, and a live version check is what confirmed this one.)
Batch BH (pass 301) β€” ticker.html insider + news cards now keyless too (and LIVE immediately, no deploy needed). With profile/valuation/growth/recs unlocked (passes 299-300), the last two browser-key-gated cards on ticker.html were Insider Activity (Form 4) and Recent News. Both worker endpoints — /brain/insider and /brain/news — were already deployed (pass-286), so unlike 287/288 this needed no worker deploy: just point the two cards at the worker. Rewired loadInsider() and loadNews() worker-first (real SEC Form-4 transactions + real company headlines for everyone, no key) → browser-key fallback → honest empty ("No insider transactions" / "No headlines"); never fabricated. Verified LIVE in-browser against the production worker (NVDA, no key configured): the insider card rendered 8 real Form-4 rows (e.g. 2026-06-10 GAWEL SCOTT +13,860 sh) and the news card rendered 12 real headlines, zero console errors. So ticker.html is now fully keyless on the live data it can get free: quote (live feed), price chart (/brain/bars), insider + news (live now), with profile/valuation/growth/recs lighting up the moment Brandon deploys pass-288. Frontend-only change on a network-first HTML page — no cache bump, ships on the Pages build. Lesson: check what's already deployed before assuming a feature needs a new endpoint — two of these cards could go live today because the plumbing already existed.
Batch BG (pass 300) β€” finished the keyless per-symbol unlock: company profile + fundamentals now worker-proxied too, so ticker.html and fundamentals.html render in full for every visitor. Pass 299 unlocked the analyst-recs card but left the rest of the per-symbol view gated on a browser Finnhub key — fundamentals.html was a dead "Finnhub key required" wall for ~all visitors, and ticker.html's profile/valuation/growth cards showed "Connect Finnhub in Settings". This closes that gap. Worker (pass-288): added fetchFinnhubProfile() + GET /brain/profile (/stock/profile2, 12h edge-cache) and fetchFinnhubMetrics() + GET /brain/fundamentals (/stock/metric?metric=all, returns the metric object verbatim, 6h cache) — same server-side-key proxy pattern as /brain/recommendations, both accepting ?symbol= or ?sym=. Frontend: rewired ticker.html loadProfile() and the whole fundamentals.html load path to go worker-first (profile + fundamentals + recs + quote, all keyless) — falling back to a configured browser key if present, then to an honest empty/error state ("Fundamentals unavailable … nothing fabricated"). Drop-in: the worker returns the exact shapes the existing render code already consumed (raw profile2 object; the metric object; the recs array), so no render changes. Verified pre-deploy against the live worker (still pass-286, so /brain/profile + /brain/fundamentals 404): both pages fall back cleanly — ticker shows the honest per-card messages, fundamentals shows "Fundamentals unavailable for NVDA — nothing fabricated", zero console errors, no fabricated metrics. Deploy [RESOLVED — deployed pass-288 + verified live, see Batch BI]: the deploy-worker Action still skips (no CLOUDFLARE_* repo secrets), so the live worker is pass-286 and BOTH pass-287 (recs) and pass-288 (profile/fundamentals) ship together when Brandon runs cd worker && npx wrangler deploy once. WORKER_VERSION + worker-setup EXPECTED_WORKER_VERSION now pass-288. Lesson: an honest "needs your key" wall is still a dead page for almost everyone — the fix is to move the key server-side, not to lower the bar.
Batch BF (pass 299) β€” free unlock: analyst recommendations now show for EVERY visitor (worker-proxied Finnhub), not just users with their own key. Item #2 was "Seeking Alpha for analyst-ratings pages." SA has no free machine feed and needs a login I can't perform, so — same lesson as the congress pass — I looked for the real free primary source. The per-symbol pages (ticker.html, fundamentals.html) already rendered the exact Finnhub recommendation-trends shape (strongBuy/buy/hold/sell/strongSell per month) and were honest — they showed "Connect Finnhub in Settings" rather than fabricating — but that meant the analyst card was dead for the ~all visitors without a browser key, exactly the state news/insider/earnings were in before pass 284-285 proxied them through the worker. Fix (worker pass-287): added fetchFinnhubRecommendations() + GET /brain/recommendations?symbol= (Finnhub free tier, server-side key, 6h edge-cache, accepts ?symbol= or ?sym=) — the same proxy pattern as /brain/insider. Rewired ticker.html's Analyst Recommendations card to go worker-first (real recs for everyone, no key), falling back to a configured browser key if present, and an honest empty state ("No analyst recommendations available for X") if neither — never fabricated. Added an explicit footnote that these are recommendation counts, not price targets (Finnhub gates price targets behind a paid plan, so we don't show invented ones). Honest scoping: fundamentals.html stays key-gated for now — its profile/valuation/growth cards need /stock/profile2 + /stock/metric which aren't worker-proxied yet, so a half-unlock there would be incoherent (flagged as a follow-up). Verified pre-deploy: the live worker (still pass-286) 404s on the new endpoint, and ticker.html correctly falls back to the honest empty state with zero console errors and no fabricated rating bar — so it degrades cleanly until Brandon deploys. Deploy [RESOLVED — deployed pass-288 + verified live, see Batch BI]: I expected the deploy-worker Action to auto-ship pass-287 on push, but the run log shows it is gated on CLOUDFLARE_API_TOKEN/CLOUDFLARE_ACCOUNT_ID repo secrets that are NOT set — so it logged "Skipping worker deploy" and exited green without deploying. Confirmed against the live worker: still reports pass-286 and /brain/recommendations returns "not found". So Brandon must run cd worker && npx wrangler deploy for the analyst card to populate. Until then ticker.html shows its honest empty state ("No analyst recommendations available") — verified: clean fallback on the 404, no fabrication, zero console errors. WORKER_VERSION + worker-setup EXPECTED_WORKER_VERSION bumped to pass-287 so the redeploy banner flags it. (Lesson: a green CI check is not proof of deploy — verify the live worker_version, which is exactly what caught this.) Lesson reinforced (again): the honest unlock is almost never the paywalled aggregator a feature was named after — it's the free primary feed, proxied so the key lives server-side, with the one thing it can't give you (price targets) labeled as absent rather than faked.
Batch BE (pass 298) β€” free unlock: congress-trades flipped from "FEED OFFLINE" to a real, official, live filing-level feed. The page had been honestly dark since pass 248 (the community STOCK-Act mirrors went offline and the API alternatives are paid), so following the "continue 1-3" thread I re-probed the data landscape instead of trusting that "it's paid-only." The official US House Clerk financial-disclosure archive turns out to be free and live: the annual FD.zip ships a tab-separated index of every filing — member, state/district, filing type, date, DocID — and FilingType P is a Periodic Transaction Report (the actual stock-trade disclosure), each DocID resolving to an official PDF (verified HTTP 200, 255 PTRs filed YTD 2026). What the free index does not carry is the ticker / buy-sell / dollar amount — those live inside each PDF — so this is a genuine filing-level feed, not ticker-level, and the page says exactly that rather than fabricating a SYM/SIDE/SIZE table (which is what the pre-248 version had done). Build: reused the proven econ-calendar pattern — a daily GitHub Action (.github/workflows/congress-ptr.yml) downloads + unzips the current-year archive (with prior-year fallback for early January), runs a small parser (_parse_congress.js, underscore-prefixed so Jekyll never deploys it but the Action still gets it on checkout), and commits data/congress-trades.json (150 most-recent PTRs) for the page to read same-origin — the Cloudflare worker has no native unzip and the browser can't reach the archive (no CORS), so a once-daily commit is the clean free path. Rewired congress-trades.html: green LIVE · HOUSE badge, real KPIs computed from the data (150 filings YTD, 47 in the last 30 days, 70 distinct members, most-recent filer + date), a most-active-filers leaderboard (real PTR counts), and a recent-filings table where every row links to the official House PDF for the trade detail. Honest about scope: House only (the Senate eFD system is session-gated with no free machine feed) with a pointer to Insider Trades Live (SEC Form 4) for real ticker-level activity. Verified in-browser against the live repo (caught a stale preview-server pointing at an old agent-session snapshot mid-verify; re-pointed to the real checkout, confirmed badge + KPIs + official PDF links render and that no fabricated BUY/SELL/$ columns survive). SAMPLE/offline pages: one fewer. Lesson: "it's paid-only" is a claim to re-test, not inherit — the official primary source was free the whole time; the honest move was to ship what it actually contains (filings) and label what it doesn't (trade detail), not to fake the gap.
Batch BD (pass 297) β€” coin-flip-gating sweep: hunt the rest of the class after the confluence CRITICAL. The pass-296 fix proved the "beats a 50% coin flip" mistake was a class, not a one-off, so this pass grepped the whole codebase for it (literal "coin flip", z-tests vs 0.5, and any accuracy/hit_rate/win_rate > 0.5 driving a GREEN/edge verdict). Six real instances fixed: edge-scorecard (held-out accuracy was colored green at >50% β€” now gated on beating the base rate, matching the walk-forward side it sits next to); proof and today (the headline accuracy number went green at >50% right beside their own "mostly drift" note β€” now base-rate-gated); ml-status (a checklist item literally read "Accuracy above random (>50%)" β€” relabeled "Directional accuracy above drift (β‰₯53%)", since 50% is not the random baseline for a drifting market); trade-selectivity.js (returned ok:true, score 85, "above coin flip" at β‰₯50% β€” now 50-53% is a neutral "around the drift base rate, no clear edge", not a green go-signal); and brain-vs-coin-flip.html (a whole page printing "βœ“ REAL EDGE β€” beating random with strong confidence" off a vs-0.5 test β€” reframed to "clears the coin-flip bar" with the explicit caveat that drift already beats 50%, pointing to the drift-adjusted Edge Scorecard). Reviewed and deliberately left as-is (not edge claims): diagnostic heatmap colour-scales (ensemble, model-postmortem, symbol-leaderboard, monthly-calendar) and two internal trade-quality gates (pre-trade-checklist, trade-quality-scorer) β€” none present a verdict to a viewer, and behavioural thresholds were left unchanged. All six parse clean + div-balanced; cache bumped v200→v201 so the one JS module (trade-selectivity) reaches returning users. Lesson reinforced: "beats a coin flip" is never the bar anywhere on this desk β€” "beats drift, and makes money" is.
Batch BC (pass 296) β€” CRITICAL honesty fix: the confluence forward-test was about to show an MD a fabricated "proven edge." Asked "is the edge experiment actually resolving?", probed /brain/confluence-score, and found it had flipped to a GREEN verdict: "YES β€” fusing adds edge, confluence hits 72.1%, beats a coin flip at 95%, paying for richer flow data is justified." That directly contradicts the product's own honest spine (pass-267: the brain is mostly drift, 54.66% walk-forward, no proven timing edge) β€” so it got adversarial scrutiny instead of trust. Root cause: the live scorer's score() gated on beating a 50% coin flip β€” the exact trap pass-267 fixed in the backtest metrics but never applied to this scorer. The brain is structurally short-biased, so in a directional window a book "hits" >50% on market drift alone. Two tells confirmed it: the "brain hit rate" read 69.5% live vs the rigorous 54.66% walk-forward, and the alpha/POTD legs showed positive hit rates with negative average returns (directionally "right" yet losing money β€” small wins, big losses). Fix (worker pass-286): score() now computes the market-drift base rate (the unconditional move-rate in each call's direction) and gates on beating THAT at 95% (beats_drift_95), plus tracks profitability (avg directional return > 0); the "worth paying for flow" verdict now requires beat-drift AND profitable AND beat-brain-only. Back-compat fields kept so no reader broke. The three MD-facing consumers (edge-scorecard banner + leg cards, pick-of-day, proof) now display the drift-and-profitability bar instead of a coin-flip badge. Verified live after deploy: confluence 72.1% hit vs a 69.9% drift-null → beats_drift_95 FALSE; verdict now reads "NOT YET β€” the hit rate is explained by drift, not timing edge. Paying for flow data is not justified." Brain 69.5% vs 68.9% drift-null (finally consistent with the walk-forward). Lesson: a too-good live number that contradicts your own backtest is a metric bug until proven otherwise β€” and "beats a coin flip" is never the bar; "beats drift, and makes money" is.
Batch BB (pass 295) β€” two more free unlocks: real headline-sentiment + a cold-working earnings calendar. SAMPLE 33 → 32 (sentiment-heat); earnings-calendar was key-gated, not SAMPLE-bannered, and now works for everyone cold. With the Finnhub key restored (it had been wiped by the old deploy.ps1 secret bug), two pages that needed it went live. sentiment-heat dropped its Math.random sentiment for a transparent keyword model scored over each name's real Finnhub company-news headlines (/brain/news?symbol=, edge-cached): per-symbol tone = mean keyword score, mentions = real article count, sector tone = average of covered names; names with no recent headlines render an honest "no coverage" tile, never a fabricated score. Verified the data is genuinely per-company (AMD returns AMD/Intel stories at the 80-article cap; MRNA returns biotech stories, 32 articles — differing counts rule out a general-news fallback). earnings-calendar got worker pass-285's /brain/earnings (Finnhub free /calendar/earnings, 1h cache) and was rewired off its per-user "Finnhub key required → Open Settings" gate — the worker holds the key, so it now works for every visitor cold (the same cold-viewer fix as brain-proof); the failure path is an honest Retry, nothing fabricated. Verified live after wrangler deploy: 150 real upcoming reports, 60 rows + 10 day cards, first row GMS 6/16 AMC EPS \$1.55. Both pages: balance OK, scripts parse, zero PRNG, zero Liquid, no console errors. Two endpoints deployed and verified by me directly (the operator's stored Cloudflare login made the deploys promptless).
Batch BA (pass 293) β€” Phase 1 free unlocks: three SAMPLE pages wired to real free feeds (worker pass-284). The SAMPLE list shrinks 36 → 33 with zero feed spend. Worker pass-284 adds three display-only endpoints (none touch the brain's journal or training): /brain/premarket (latest extended-hours trade + session detection via Yahoo 1m includePrePost; gap vs the session-correct reference close; 120s edge cache), /brain/halts (NASDAQ Trader public RSS — https + browser UA required, plain http returns empty; regex-parsed reason codes and resumption times), and /brain/econ (ForexFactory weekly calendar; the free feed carries forecast/prior but NO actual prints — disclosed on-page). All three sources probed live before any code was written. Page rewires: pre-market-gappers lost its seeded-sin PRNG table AND its fabricated columns (RVOL, catalyst, gap-fill probability are not in any free feed — honest columns only); halt-tracker lost its fake halted-symbols list and fabricated halt/reopen prices — and renders "0 halts" as the honest live state; economic-events got LIVE This Week / Next Week sections while the FedWatch card, yields table, and reaction charts are explicitly chipped ILLUSTRATIVE — including retitling the "Top Event Edges — desk realized" card to "Classic event playbooks" with a NOT-desk-results disclaimer (the fabricated-track-record class, previously masked by the page-wide banner). insider-congress-flow stays honestly SAMPLE: the free volunteer congress datasets now 403 and the official Clerk/eFD archives need dedicated parsing work — the banner says exactly that and points to the live SEC Form-4 page. Tightened: div balance verified on all four pages (caught and fixed a missing close-div introduced mid-edit — the audit habit catching the auditor), inline scripts parse, zero Liquid braces, zero PRNG idioms remain, honest empty states verified in-browser against the live pass-283 worker (the new endpoints 404 until the pass-284 deploy — the pages say so instead of faking). Deployed and verified live (pass 294): worker pass-284 deployed; gappers render 40/40 real extended-hours rows (session POST), halt-tracker shows 100 real NASDAQ halts (70 LULD, real resume times), economic-events lists 75 real events / 13 high-impact. One mid-flight fix: faireconomy blocks Cloudflare-worker egress AND sends no CORS header, so the calendar now ships same-origin — a daily GitHub Action commits data/econ-calendar-thisweek.json (validated non-empty before commit) and the page reads repo data first with the worker as fallback; the upstream "nextweek" JSON does not exist, so the second card became "High-Impact This Week" instead of a dead Next Week. Separately, the deploy uncovered a CRITICAL ops bug: deploy.ps1 piped blank prompt input straight into wrangler secret put, so the pass-283 deploy ERASED the working FINNHUB_API_KEY (news + insider endpoints down; pages degrade to honest empty states, nothing fabricated). Script fixed — Enter now keeps the existing secret — and the key restore is a one-time operator action.
Batch AY (passes 289-291) β€” the test suite catches two real batching bugs, then a smoke-test mismatch unmasks a CRITICAL: 70 lazy-loaded modules were never cache-versioned. Ran the repo's full 33-file headless test suite: 28 green, 5 not. Diagnosed each one. Two real module bugs (pass-87 batching left gaps): LabelSmoothing.stats() omitted the in-memory pending count (under-reported by up to 60s of smooths; pass 87 added that term to SampleDecay but missed the sibling), and BOTH modules' reset() cleared localStorage while leaving the in-memory batch alive — pre-reset pending counts flushed INTO the fresh state and the cached pre-reset state kept serving reads for up to 60s. Three stale tests updated to match intentional, documented module changes (adversarial-validator pool cap 500→5000 from pass 79; brain-coach's honest UNTRAINED gate needs a seeded model in the mock; auto-pause's pass-98 safety guards need the BrierSkill n≥20 data gate + 3 consecutive low checks — plus NEW assertions that the guards themselves work, and the empty-history crash guarded). Suite now 33/33 green. CRITICAL (the big one): the in-browser smoke test of the fix kept executing the OLD module (count 1, expected 2) even after a cache bump — node and the network both served the fixed file. Traced it: live.js lazy-loads 70 modules with BARE unversioned URLs (the entire brain stack — continuous-learner, auto-trainer, historical-bootstrap, auto-trade, high-conviction-alerts, unified-predictor, every calibrator, knn-recall, multi-horizon, drawdown-protector, 55 more). The service worker serves static assets stale-while-revalidate, so an unversioned URL returns the PREVIOUS cached copy on every visit — returning users executed the prior deploy's copy of all 70 modules; every shipped fix reached them one visit late, and a once-per-deploy visitor stays one deploy behind forever. The pass-286 frozen-lazy-loader fix caught the 4 hardcoded-version loads but missed these 70 bare ones. Fixed: all 70 now load with ?v=' + LV; bumped v200 site-wide so the loader fix itself ships on a never-cached URL. Verified in-browser at v200: the lazy tag is js/label-smoothing.js?v=v214 and both fixed modules report the correct count (2) after reset+2 calls. Lesson logged: a green node test plus a wrong browser result is a CACHE finding, not a flake — chase the URL, not the code. Also this batch: a site-wide structural scan (div/heading/table/list, all 415 pages) found and fixed the only 2 imbalances (a stray div from this session's own audit-log append; brain-hub's malformed Activity card — unclosed <h4> orphaning its 5 stats outside the card box), both verified in-browser; 415/415 pages now balanced. Bars-scanner inline TA independently verified correct (AX item 7). Mixed-content scan clean; all 3,027 asset refs uniform. Pass 291 (follow-the-thread): the service worker's runtime cache was growing without bound. The cache name is VERSION-suffixed but the SW VERSION had not changed since v1.2 (pass 174) — so bpleone-runtime-v1.2 had been accumulating every versioned asset URL ever requested for months (each ?v= bump adds ~110 entries, nothing ever deleted; v17x through v200 all coexisting, plus every distinct query-string navigation cached separately). Beyond disk waste, that is a data-loss risk: under storage-quota pressure the browser can evict the whole origin INCLUDING localStorage — the brain journal, model weights, and auto-trade state. Fixed: SW v1.3 (activate purges the old caches for every returning user) + a putPruned() write path that deletes any other cached entry for the same pathname, keeping the runtime cache bounded at one entry per asset forever — so it cannot regress when ?v= bumps outpace SW version bumps again. Verified live: after reload only the v1.3 caches exist; navigating the same page with two different query strings leaves exactly one cached entry (the newest), zero duplicate paths across all 93 runtime entries. Pass 292 (runtime sweep + news dedupe): cold-loaded 18 high-traffic pages with cache-busters across two tiers (front-door: dashboard, today, money-made, make-money, morning-brief, trade-of-the-day-pro, conviction-stack, journal, options-flow, settings, news; scanners/brain: hot-movers, sector-flow, breadth-pro, vix-pulse, brain-coach-live, model-confidence, risk-radar) — zero console errors on every page. One visible live-data defect found and fixed: news.html rendered every headline TWICE (the worker's Google-News-style feed returns summary equal to the headline plus the source name, and the renderer showed both unconditionally). The summary now renders only when its normalized text adds words beyond the headline. Verified live: 0 duplicate rows (was all rows); real Reuters headlines intact. Inline-script change on a network-first HTML page — no cache bump needed.
Batch AX (passes 287-288) β€” the MD opens it cold: the proof page that showed nothing real + the disclaimer gaps. Walked the exact path a managing director would take with no prior setup (fresh browser, WorkerBridge unconfigured) and watched each MD-facing page render. CRITICAL find: brain-proof.html — THE proof page — showed nothing real cold. All four of its worker-fetch functions (metrics, per-symbol, journal picks, champions) gated on WorkerBridge.isEnabled() and returned early with NO fallback URL. Default WorkerBridge state is empty/disabled (no auto-connect), so every worker card stayed hidden and a cold viewer saw only local browser state: "Brain UNTRAINED, model.n_trained = 0" — the opposite of impressive, and misleading in the other direction (reads as "the brain doesn't work"). Every other live-data page (~47, incl. the sibling proof.html) already used const url = (WorkerBridge && WorkerBridge.getUrl()) || '<public worker>'; brain-proof was the lone holdout on the old gate. Swapped all four guards to the public-URL fallback (the /brain/* read endpoints are public GET, no auth). Verified cold in-browser: the worker card now renders real held-out results (test set 1,652) with the honest verdicts intact — "BELOW BASELINE — no timing skill above drift (BSS -0.082)" and "MOSTLY DRIFT — only +2.3pp above base rate, not yet significant"; no false "edge confirmed." A grep confirmed brain-proof was the only page with the gated-no-fallback pattern. Disclaimer gap-closure: mobile-money.html (loads no app.js) and brain-mobile.html (phone-optimized single-screen, where the 5-column desktop footer is wrong) showed high-conviction alerts / brain P&L / Sharpe with no "not investment advice" disclaimer, because buildFooter() never ran on them. Added a compact static risk-disclosure to each. analytics.html reviewed and intentionally left as-is (OWNER-only product-usage dashboard, no buy/sell signals). order-flow.html's "Live Print Tape" card retitled "Print Tape" (it is SAMPLE data; the word "Live" contradicted the page banner). Re-verified clean (cold render, no console errors): the full MD path — index.html (zero overclaim hits; hero is positioning, not a performance claim; a "Does it work?" link that invites scrutiny), pick-of-day.html, brain-proof.html, proof.html — all show real data with honest significance gating, no Liquid placeholders, no undefined/NaN. All 18 remaining PRNG-seeded sample pages confirmed to carry a visible SAMPLE/ILLUSTRATIVE banner with no contradicting "real-time/live" claim. Lesson logged: "the page works" must be tested the way the audience arrives — cold, unconfigured. A proof page that only proves itself to the person who built it proves nothing. Live-data sweep (the original "I'm seeing errors in the live data" question, chased to ground): (1) 0 broken internal links across 362 distinct href/src targets. (2) Bars-scanners (trend-strength, candlestick-scanner, +siblings) degrade honestly-empty cold while /brain/bars 404s on pass-280 — no NaN/undefined leak. (3) Quotes-scanner dollar-leaders shows real sane data ($411B tracked, top $67.87B). (4) Crypto (BTC/ETH) is live Coinbase, fresh, sane change% (prevClose within the day range). (5) 111 JS modules lint clean. (6) Worker aliveaudit_pass:true, 26,640 trained, Platt a=0.914; its raw healthy:false off-hours flag is correctly superseded by audit_pass on the MD pages (proof.html reads audit_pass, not the raw flag), so no false "unhealthy" alarm. (7) Inline TA verified correct across all 6 bars-scanners (the numbers go live on the pass-283 deploy, so a latent error would surface then): trend-strength Wilder ADX/±DI + EMA, mean-reversion Wilder ATR/RSI + population stdev, algo-signals MACD(12,26,9)/RSI/Bollinger, pivot-finder floor-trader P/R1/R2/S1/S2 from prior-period OHLC, candlestick-scanner's 14 patterns (with correctly-defined up/down trend context — no silent-never-fire), retracement-finder Fib 38.2/50/61.8 from swing high/low — all mathematically correct with div-by-zero/bounds guards and honest empty states. The ONE real live-data error: the site-wide ticker + every change% column shows INFLATED moves because pass-280 /brain/quotes computes changePct against a ~6-trading-day-stale prevClose (proven: SPY prevClose 759.57 sits above today's dayHigh 746.90; MSFT -8.6% with prevClose far above its range — while same-code crypto change% is sane because Coinbase supplies a correct prevClose). No correct frontend fix exists (the browser has no access to the right prior close); pass-283 fixes it at the source and self-heals the whole site on deploy (task #158, Brandon's — I hold no Cloudflare creds).
Batch AW (passes 284-286) β€” the fabrication-idiom sweep: three PRNG idioms that hid from every Math.random scan. Continuing the live honesty audit, re-verified pages earlier classed "legit" without opening them — the gap that had hidden a fabricated price chart on ticker.html (every mover links to it; fixed to real bars / honest empty). That rigor surfaced a class of fabrication a Math.random grep structurally cannot catch: deterministic PRNGs filling tables with fake-but-real-looking data. (1) Seeded-sin PRNG (const rand = k => { const x = Math.sin(seed+k)*10000; return x - Math.floor(x); }) on 13 scanner pages — short-squeeze-alerts (subtitle "real-time triggers," every trigger a coin-flip), dollar-leaders ("where capital is actually moving," fake share volume), trend-strength (fake ADX/±DI/MA-stack), pre-market-gappers, mean-reversion-scanner, retracement-finder, pair-scanner, symbol-diff, options-skew-radar, iv-crush-tracker, sentiment-vs-model, earnings-reactor, heat-clock. Then wired real where free-derivable: dollar-leaders fully LIVE now (last × today's volume from /brain/quotes — verified: MU $67.87B, $407.6B universe), and trend-strength / mean-reversion-scanner / retracement-finder rebuilt on daily /brain/bars (Wilder ADX/±DI + EMA-stack, SMA/stdev z-score + Wilder RSI/ATR, swing-high/low Fib levels) with honest empty states that auto-populate on the pass-283 deploy. The rest keep an accurate SAMPLE banner (paid or intraday feeds they genuinely need). market-map's Math.sin(charCodeAt)*2 fallback de-faked to neutral 0. (2) LCG / seedRand (s=(s*9301+49297)%233280) on order-flow, seasonality, squeeze-radar, volume-profile (labeled), and the worst case — CRITICAL: brain-vs-spy compared the REAL brain against a synthetic SPY random walk, so its alpha / beta / Sharpe / outperformance were all measured against noise with no label. Rewired to real SPY daily returns from /brain/bars (apples-to-apples over the covered window), with an explicit "benchmark unavailable" state until that feed deploys — never synthetic. (3) day-pnl-calendar's synthetic P&L is now EXAMPLE-labeled. Array.from series + hardcoded chart arrays were also swept — all found legit (execution = real Almgren-Chriss calculator, brain-time-of-day = real journal aggregation) or already labeled (macro / market-internals / sectors / risk-dashboard demo banners). CLAUDE.md gained a fabrication-idiom watchlist so these can't be re-introduced. Lesson logged: a "0 fabrications" result is only as good as the per-item checks behind it — grep for sin*10000 and 9301/233280, not just Math.random.
Batch AV (pass 277) β€” LIVE in-browser honesty audit (what the static pass-276 audit structurally could NOT catch). Pass 276 concluded "the code holds up" — true of the code, useless to the user: the real errors were in rendered content and data labeling, which only appear when you actually open the pages in a browser. So I opened the live site in Chrome and read what a visitor sees. Found and fixed five real issues, each re-verified in the rendered DOM: (1) The banner lied. It claimed "finnhub real-time — every tick is current market data" off the provider name, while the equities were verified worker-yahoo and 9 hours stale (last close). Now labels by the actual age of the index bellwethers: "delayed ~15 min" intraday, "last close (Nh ago) — change % is from the prior session" when the market's shut. (2) Fabricated ticker change%. The scrolling tape rendered never-updated seed symbols (e.g. VIX) with a confident change% — a market move that never happened. Seeds now show muted with no fabricated %, and flip to a real arrow the instant a live tick lands. (3) Overclaiming pill. The site-wide data pill said "LIVE · FINNHUB" regardless of staleness; now "DELAYED · LAST CLOSE" when the bellwethers are >45 min old. (4) CRITICAL — frozen lazy-loader. After the banner fix deployed, the browser still rendered the old lie. Root cause: app.js's companion-loader hard-coded CACHE_BUST='v188' while the HTML had advanced to v191, so every lazily-loaded module (data-mode-banner, model, brain-loop, …) was requested at a cache key the browser had frozen long ago and never re-fetched. An unknown number of past fixes to lazy modules never reached returning users. Fixed by deriving the cache-bust from the loader's own ?v= (app.js + live.js) so it can never drift again; also un-pinned 4 live.js modules stuck at ?v=v189/v184. (5) Unstable freshness signal → clock-based truth. The first helper took min-age across ALL equities, which one real-time single-name skewed to ~0; re-basing on the SPY/QQQ/DIA/IWM bellwethers fixed that — but verifying today.html exposed a deeper race: Finnhub's connected WS resets a bellwether's liveAt to ~now on an off-hours heartbeat, so the pill flashed LIVE while SPY was 9.7h stale. Final fix: the live-vs-stale call is made by the ET market clock (detectSession()) in the pill, banner and dashboard — robust regardless of which feed wrote last; equityDataAgeMin() now reads only the market-timestamp feeds (worker/Yahoo/Stooq) and supplies just the "N ago" detail. Plus the dashboard's static "LIVE" title badge + "Live · <time>" stamp now read DELAYED / "Last close" off-hours. Cache v190→v194; verified on today.html AND dashboard.html (both pre-market → every element consistent through a 2.5s heartbeat settle). Every fix was re-loaded in the live browser and confirmed: banner, pill, badge, ticker and the SPY card now tell one consistent, honest story. The lesson, logged: "the code is correct" is not "the page is honest" — verify in the rendered browser, not just the source. (Known follow-up: the same static feat-live "LIVE" title badge sits on ~42 other pages; the authoritative banner+pill on them is now honest, so it's cosmetic — a batch sweep can de-static them later.)
Batch AU (pass 276) β€” deep adversarial audit of the whole session's work. Re-checked every live-data field read against the real API responses (picks / metrics / confluence-score / insider-feed / health), ran a full lint of all 111 JS modules + the worker, and swept for XSS, null-derefs, broken nav wiring, dangling links from the prune, and reviewed the untested share-card canvas. Result: the code holds up. All field reads correct (incl. the nested walk_forward_test + top-level model_trained), every glossary key resolves, honesty gating is on beats_base_rate_95 everywhere, the analytics dashboard escapes every string from the public /track endpoint, the canvas is sound, and all five new pages are nav-wired. Two findings: (a) the em-dash "mojibake" in the confluence verdict was real in the old pass-267 worker, but the clean repo source + the pass-269 deploy already fixed it (live now serves a proper em-dash) β€” no action. (b) Cleaned the insider-cluster render to use the real cluster fields {buyers, count, value} (it was carrying a dead names branch from when I guessed the shape while clusters were empty). One architectural caveat, flagged deliberately: the new /track analytics writes to the same BRAIN_KV namespace as the brain, one write per event. On Cloudflare's free KV tier (1,000 writes/day/namespace) a real traffic spike could exhaust the shared daily budget and make the brain's own writes fail that day (kvPut swallows the error, so nothing crashes β€” but the brain would stop learning + the heartbeat goes stale until the next day). Low risk at early-stage traffic; the clean fix when traffic grows is paid KV ($5/mo = 1M writes/day) or moving analytics to its own namespace / Cloudflare Analytics Engine. Documented so it's a known, deliberate tradeoff β€” not a surprise.
Batch AT (pass 275) β€” lean into what's REAL (data + honest signals) while the edge question self-resolves. Four shipped, all frontend (no worker deploy). (1) Insider Buying product (insider-clusters.html): a standalone real SEC Form-4 signal on the existing /brain/insider-feed — net open-market buy/sell flow, buy clusters (2+ insiders buying the same name, the classic bullish tell), and the biggest recent buys. Honest framing (P/S carry the signal, A/M/G/F grants/exercises filtered out; insider buying is a weak-but-real bullish signal, selling is noise). Right now insiders are net sellers with no clusters — and the page says exactly that. (2) Daily Post content engine (daily-post.html): auto-writes today's pick as ready-to-post copy for X / Reddit / Discord with the honest edge line baked in (you can't accidentally hype), one-click copy, live Twitter char-count, links to the share card. Posting the honest call daily is the growth play. (3) Data-terminal reframe: the homepage now leads with a "what's actually real here — the data, not a magic predictor" row (Insider Buying, Live News, Proving-the-edge-in-public, Smart Alerts) — selling what's genuinely valuable instead of a prediction edge that isn't proven. (4) Confluence verdict surfaced: homepage shows the live graded/needed count; today.html's proof strip now reads "N / 20 graded · proving in public." First calls grade tomorrow; full verdict ~3 weeks — it self-reports. (Noted for the next worker touch: a cosmetic em-dash mojibake in the worker's confluence-verdict string; sanitized client-side for now.)
Batch AS (pass 274) β€” kill a nightly false "unhealthy" signal (caught while verifying the pass-269 deploy). Right after deploying, /brain/health showed healthy:false — but every audit check passed, audit_pass:true, issues:[], self_sustaining:true. The worker's healthy flag is intentionally strict (lastTickAgo < 180s, "back-compat"); off-hours the cron tick is throttled to ~30 min, so it naturally goes false at night. The market-aware signal is self_sustaining / audit_pass (the worker even comments "MONITOR THIS, not healthy"). Two user-facing pages still read the strict flag: alpha-scanner rendered a πŸ”΄ red dot every evening (now 🟑 via self_sustaining || audit_pass), and start-here read healthy || ok — which is always true since ok is always true, so it would have shown "Brain is alive" even if the brain were genuinely down (now gates on self_sustaining || audit_pass || healthy — honest in both directions). No worker change needed. Exactly the kind of "looks broken" first-impression to kill before putting it in front of traders. Also confirmed end-to-end: analytics pageview and feedback-text both persist through the new /track path (KV ~20s propagation).
Batch AR (pass 273) β€” sharpen the learning instrument. Counting pageviews isn't enough to learn from 5-10 real users; their paths and their words are. (1) analytics.js now auto-tracks the clicks pageviews miss — outbound links (leaving the site) and any data-ev CTA. Internal nav is deliberately skipped (the destination's own pageview already captures it), so no double-counting or wasted writes. (2) New floating feedback widget (js/feedback.js): πŸ‘/πŸ‘Ž + one line + optional email, posted as a feedback event — the single richest signal from early users. (3) analytics.html gained a Feedback panel and was XSS-hardened: every string from the public, unauthenticated /track endpoint is now escaped before it's rendered into the owner's dashboard (a visitor could otherwise POST a malicious event name / feedback string). Worker stores feedback text → pass-269; deploy when convenient (cd worker; npx wrangler deploy --config wrangler.toml) — the click-tracking already works on the live endpoint, only feedback-text persistence waits on the deploy.
Batch AQ (pass 272) β€” the get-users-and-learn kit (the honest "what next"). The bottleneck was never more features — it's that we don't know if anyone wants this. Built the kit to put it in front of real traders and actually learn. (1) Shareable honest pick card (share.html): renders today's Pick of the Day as a clean card with a real downloadable PNG (vanilla canvas, no new deps), plus copy-share-text and copy-link. The card states the real edge status front-and-center — when the brain is mostly drift, the card says so. Honest sharing is the whole differentiator. (2) Conversion touches on the homepage: a "Share the pick" CTA + a 3-point honest value strip (real data + SEC insider flow / honest metrics that admit no edge / free to look). (3) First-party usage analytics: js/analytics.js beacons anonymous page views + named events (share_view, share_download, copy, …) to a new worker /track endpoint; analytics.html is the owner dashboard (unique visitors, new users, top pages, actions taken, referrers, daily traffic, live feed). No third party, no cookies, no PII; opt-out via localStorage.bpleone_no_track. Worker bumped to pass-268deploy it once (cd worker && npx wrangler deploy --config wrangler.toml) to switch on recording. The frontend ships immediately; analytics simply starts filling in after the deploy.
Batch AP (pass 271) β€” honesty-consistency fix: the Edge Scorecard was overclaiming. The "is it real?" scorecard still gated its verdicts on the raw significance test — accuracy vs a 50% coin flip, which IS significant (p=0.0002) — and read "already statistically significant / beats random / real signal, not luck." That directly contradicted the honest drift-vs-skill framing now on Today / Proof / Start Here, on the one page whose entire job is honesty. Re-gated every verdict (walk-forward + held-out pills, the card colors, the plain-English summary) on beats_base_rate_95 — skill above the market's natural drift, which is false. Replaced the "vs coin flip" row with market drift (base rate) + timing skill vs drift, and rewrote the copy: 54.7% accuracy = 52.4% drift + ~2.3pp skill that is NOT yet significant ("mostly drift, little proven timing edge"). Added glossary chips (walk-forward, base rate, drift vs skill). Also softened "proven edge" → "learned positive edge" on trade-sizing-advisor. A follow-up site-wide grep then caught the same leak in three more places: proof.html and today.html were still rendering "Statistically significant? Yes" (green) straight off the raw flag — directly beside their own "mostly drift" verdict — and brain-proof.html keyed its REAL/WEAK/BELOW verdict off a stale verdict string, so the worker's honest "MOSTLY DRIFT" fell through to a harsh red "no better than guessing." All three re-gated on beats_base_rate_95 + skill_above_base. The whole desk now tells one honest story — not a single surface claims a proven edge the data doesn't support.
Batch AO (passes 268-270) β€” UX learning layer + an honest prune (415 → 411 pages): (1) Start Here page. A plain-English guided front door over the whole desk: what it is (honest — research, not advice), the 3 pages that actually matter (Today / Proof / Constraints), a real-vs-still-proving honesty split, a glossary of every term, and how the brain learns in 4 steps. Pulls live numbers from /brain/health, /brain/metrics, /brain/confluence-score (degrades to static copy if the worker is unreachable). Wired as the first nav item + a pill on Today + sitemap priority 1.0. (2) In-context glossary tooltips. js/glossary.js — one shared definitions engine (single source of truth). Hover / tap / keyboard-focus a "?" chip for a plain-English definition. Chips placed on Proof (walk-forward accuracy, statistically significant, Brier skill, conviction band), Constraints (conviction), and Today (conviction). Reusable: any page adds an explainer with one data-term span. (3) First-visit nudge. js/starthere-nudge.js — a non-modal corner pill that points a brand-new visitor to Start Here exactly once, then sets bpleone_seen_starthere_v1 and never shows again. Lazy-loaded site-wide via live.js. (Surfaced that the older onboarding.js tour was dead — not loaded by any page.) (4) The honest prune. Hunted dead/duplicate pages across four analyses — unreachable orphans, content-skeleton hashing, and Jaccard body-vocabulary similarity at 0.72 and 0.55. Result: 0 unreachable orphans, 0 content duplicates, 0 near-duplicates. Every one of the 415 pages was reachable and substantively distinct — the desk's size is real breadth, not dead-weight bloat (a good sign about past work). Removed the only genuine non-product scaffolding: dns-test (a done DNS-troubleshooting one-off), squarespace-preview + SQUARESPACE-TILE (one-time hub-tile setup helpers), and brain-smoke-test (internal QA), cleaning every inbound nav / sitemap / link reference. Kept self-test and site-diagnostics (load-bearing). 415 → 411 pages.
Batch AN (passes 260-267) β€” edge stability, then the honesty reckoning (worker pass-258 → pass-267): (1) Fixed a silent edge regression (walk-forward 53% → 44%). Champion selection had been sorting purely by Brier skill (BSS), which promoted a better-calibrated but directionally-worse model. Switched champion selection to rank by validation accuracy with BSS as the tiebreaker, and added a promotion guard: a fresh bootstrap only replaces the incumbent champion if its walk-forward accuracy is within 0.015 of the incumbent's (incumbentWf = prevChamps.champion_wf_acc), so a noisy run can't overwrite a good model with a worse one. Added an edge-recovery auto-bootstrap: when champion_wf_acc drops below 0.50 the worker re-bootstraps itself (20h cooldown) instead of silently serving a sub-coin-flip model. (2) Made the metric actually transfer. Cross-validated config selection (cvScoreConfig, K=5 forward-chaining folds) so hyperparameters are chosen on a larger combined out-of-sample window, not one lucky split. Added 6 stability features (addStabilityFeatures, f[9]-f[14]: 50d SMA distance, 50d range position, mom5-mom20 divergence, mom10, up-day fraction, ATR5/ATR20 vol ratio), wired into BOTH feature builders (bootstrap richFeatures + live extractRichFeatures) so train and live stay in lockstep. (3) THE HONESTY RECKONING (most important). Switched to dense labeling (LABEL_THRESHOLD = 0, mid-horizon HORIZON_MIN_MOVE = 0), which fed far more examples (17,784 → 26,496). Dense labeling reported 54.66% accuracy and flagged it "significant" β€” which looked like a win. The base-rate check told the real story: 54.66% = 52.36% market drift (the unconditional 5-day up-rate) + only 2.3pp of actual timing skill, which is NOT statistically significant. computeMetrics now returns base_rate, skill_above_base, beats_base_rate_95 and a verdict that reads "MOSTLY DRIFT (little timing edge)" when skill-above-base isn't significant. The edge badges on today.html / pick-of-day.html / proof.html now gate GREEN on skill beating its 95% bound, AMBER on positive-but-not-significant skill, RED on negative skill β€” never on raw accuracy again. Honest conclusion: at a 5-day horizon, TA features carry no proven directional timing edge β€” the apparent accuracy is beta (drift), not alpha (skill). Real edge needs different data (smart-money confluence / flow), not more TA. (4) Built the confluence verdict so the open question answers itself. /brain/confluence-score now returns a verdict object (ready=false until n≥20 graded confluence calls, then YES / PARTIAL / NO on whether brain+insider agreement beats a coin flip), surfaced as a banner on the Edge Scorecard. 0 graded today; first grades ~2 trading days out, ~20 needed = weeks of calendar accrual. It self-reports when the data lands β€” no further code required.
Batch AM (pass 259) β€” apply the evidence-based min-conviction floor + kill the false "DEMO DATA" banner: (1) min_conviction = 0.12, live. The segmented learning (batch AL) showed the edge concentrates above the ~0.10-0.20 conviction line. Set the broadcast floor to 0.12 β€” persisted to the broadcast_constraints_v1 KV key via wrangler (Cloudflare account auth, NOT the app ADMIN_TOKEN, so no secret handling). Verified: /brain/picks reports min_conviction 0.12 in force and the Alpha list now floors there (cutting the 0.05-0.12 noise band on quiet days); Pick of the Day stays at 0 so it always shows. constraints.html loads the saved 0.12 from the server. (2) CRITICAL trust fix β€” false DEMO banner. The red "⚠ DEMO DATA β€” prices are simulated, Brain is NOT training" strip was firing on any page where BPLEONE_DATA_MODE !== 'live' β€” i.e. any page without an active live-price binding β€” even though the feed was LIVE·FINNHUB and the 24/7 worker brain trains on real data regardless. Both claims were false (demo mode was never even on). Re-gated the banner to show ONLY in genuine explicit demo mode AND when no live provider / worker brain is connected, and to re-check on DataProvider status changes. The scary contradiction with the green live pill is gone. Cache bumped v188→v189.
Batch AL (pass 258) β€” "make it perfect": fix the ERROR pill, noise-control constraints, self-audit, segmented learning, deep proof: Five threads. (1) CRITICAL β€” green pill: the front-door nav showed a red ● ERROR. Root-caused live (not guessed): a configured Finnhub provider with subscribeAll hit the free-tier WS cap and returned "Subscribing to too many symbols", which latched the status to fatal ERROR even though 85k messages were flowing fine. Fixed in data-provider.js β€” cap WS subscriptions to 45 (the rest get REST /quote snapshots) and treat the soft "too many symbols" message as non-fatal so the socket stays green. (2) Editable constraints (noise control): new KV broadcast_constraints_v1 + GET/POST /brain/constraints (read open, write admin-gated) β€” min conviction, rel-volume, price band, alpha size, focus/exclude lists, long-only + day-move-agreement gates. /brain/picks now filters POTD/Alpha/BestLong through them and reports universe_scored / passed / filtered_out. The brain still trains on the FULL universe β€” constraints only govern broadcasts. New constraints.html editor (live preview of what passes). (3) Self-audit: /brain/health adds a structured audit[] with audit_pass β€” cron-fresh, model-trained, weights-finite, calibration-not-inverted (Platt a≥0.2), scanner-present. Verified all 5 green, Platt a=0.695, model 17,676 examples (up from 17,600 β€” learning confirmed). (4) Segmented learning: /brain/segments buckets graded calls by conviction so the brain shows which confidence bands actually carry edge β€” the 0.20-0.30 band hits 56.7% (n=483) in the backtest vs 49% noise in 0.10-0.20, with a suggested_min_conviction floor. (5) Deep proof: new proof.html ("Is this real? The brain, audited") β€” self-audit vitals, coin-flip metrics, edge-by-conviction, live records, noise stats, why-each-call rationale, and the end-to-end methodology. WORKER_VERSION pass-258; new pages wired into Brain nav + sitemap; cache bumped v186→v187 so the pill fix + nav reach returning visitors.
Batch AK (pass 257) β€” Brandon's "do #1-4": focus the product + make the pick actionable, delivered, and shareable: Four shipped together. (1) Nav trim β€” the buildNav menu had ~385 links across 6 bloated dropdowns (Brain alone had ~170 ML-diagnostic pages); replaced with 5 curated menus (Daily, Picks, Brain, Data, Tools β€” ~8 real pages each) + an "All tools" catalog link, keeping every active-state variable so highlighting still works. 36 KB of nav markup removed; verified in-browser (7 top items, active state correct). (2) Best Long β€” /brain/picks now also returns best_long (the single most-bullish name), so there's always an actionable long even when the #1 conviction call is a short; a weak flag fires when even the best lean is <52% (honest "no long edge today"). Surfaced on today.html + pick-of-day.html β€” verified live (POTD=GOOGL, Best Long=EWT 44% flagged weak). (3) Daily delivery β€” worker cron now posts the Pick of the Day + Best Long to a Discord webhook once per ET weekday morning (9-12 ET, dedup'd, fresh-signal gated); webhook comes from the DISCORD_WEBHOOK_URL secret (silent no-op until set, so safe to deploy now). New admin-gated POST /brain/digest-now lets Brandon test-fire instantly. (4) Growth β€” free-signup CTA on Today + Pick of the Day (deep-links to the Sign-up tab via login.html?signup=1, auto-hides for logged-in users). WORKER_VERSION pass-257, deployed via --config wrangler.toml; owner-checklist + worker-setup version pins bumped.
Batch AJ (pass 256) — full "is it all live + training?" audit: Top-to-bottom verification. Worker endpoints (11/11 live + real data): health, learning, metrics, signals, picks, confluence-score, news (80), insider (100), insider-feed (150/16 syms), predict, journal (780) — every one returns real data, none dead. Training is genuinely advancing (not stalled): live captures grew 216→288→360, journal 708→780, and the 1-day early-read pipeline resolved 179 predictions at 52.5% (was 43.8%) — proving the capture→resolve loop actually runs; backtest stays significant (53.2%, p=0.032, n=1,101). Live 5-day training begins as the first mid-resolutions land (~1 day out). Links (0 broken): scanned every href/src across 412 pages + the nav for local html/js/css/json/svg targets — zero broken (the only 2 hits were literal "X.html"/"js/X.js" inside an audit-log doc sentence). Fixed: owner-checklist expected-version was stale (pass-251 → pass-254) so its deploy row reads correct. Verdict: links live, data real, brain training — all green.
Batch AI (pass 255) β€” clean front door: the "Today" command center: 400 pages, but only ~7 are real + valuable β€” buried under diagnostic/sample noise. New today.html is the focused front door: (1) today's Pick of the Day live from the worker (GOOGL β–Ό DOWN, 32% up, conviction shown) + a 🐻/πŸ‚ regime banner; (2) a "does it work?" proof strip (backtest 53.2%, p=0.032, live picks graded N/total, brain trained on 17,600); (3) clean cards to the 7 pages that matter (Pick of Day, Alpha Scanner, Smart-Money Confluence, Edge Scorecard, Money Made, News, Insider) + a quiet "everything else β†’" link. Wired as the first nav item (πŸ“… Today) and the homepage hero is decluttered from 8 scattered CTAs to 3 focused ones led by "Open Today's Command Center." Verified live: real pick, real proof strip, 7 tools, no console errors. Index cache bumped to v184.
Batch AH (pass 254) β€” Pick of the Day + Alpha (broadcast the signal, train on the noise): Brandon's call: surface only the brain's high-conviction picks; keep the full 72-name universe as background training. Worker: /brain/confluence-score now also reports a POTD record (single highest-conviction call per day) and an Alpha record (top-8 by conviction) β€” graded at 5 days like everything else. New /brain/picks returns today's live Pick of the Day + Alpha shortlist, ranked by how far the brain's 5-day P(up) is from a coin flip. New page pick-of-day.html (Daily nav): big hero for the #1 call, a 🐻/πŸ‚ regime banner (honest when the brain is one-directional β€” today it's all DOWN on mega-cap tech), the Alpha shortlist with the "why," and the live POTD/Alpha track records (accruing, graded at 5 days). Verified: POTD=GOOGL DOWN (32% up, highest conviction), 8-name Alpha list, records show honest "accruing." The full-universe firehose stays in the background where it belongs. WORKER_VERSION pass-254.
Batch AG (pass 253) β€” "why no money?" β†’ Money Made now reads the REAL 24/7 brain: Brandon saw $0.00 on Money Made and asked if the brain was broken / needed training. Diagnosed live: brain is trained (17,600 real examples) + capturing (288 live), but mid_resolved=0 β€” zero live 5-day calls have finished their clock yet (first resolves ~next day). The $0 was the clock, not the brain; and the page was reading the browser brain (only counts with a tab open) while pushing a "Generate demo data" (fake) button as the hero. Fix: added a recent_resolved trade feed to /brain/confluence-score and a new "πŸ›° Live 24/7 Brain β€” real track record" card at the top of money-made.html that computes real $ P&L from the worker's resolved calls (sized off the bankroll/risk inputs), with an honest "capturing β€” first real trades resolve in ~N days, no demo needed" state until calls grade. Verified: card shows the real 144 logged calls. De-heroed the demo button β†’ "πŸ‘ Preview layout (sample)", relabeled the browser-session empty state honestly, cross-linked the Edge Scorecard. No fake numbers anywhere.
Batch AF (pass 252) β€” Edge Scorecard: prove it beats a coin flip (Brandon's P2): We showed brain + confluence signals but never proved they beat random in the wild. Now we do. New worker engine snapshots every daily directional call (brain dir + insider dir + entry price) once per ET weekday into confluence_log_v1, then grades each against the REAL 5-trading-day move (resolution capped at 6 Yahoo fetches/tick; 1 KV write/day β€” negligible). New endpoint /brain/confluence-score reports hit-rate vs a coin flip with a one-sided z-test, split into three legs: brain-only, insiders-only, and confluence (both agree). New page edge-scorecard.html ("THE RECEIPT") shows it honestly in two parts: (1) backtest β€” the brain's already-significant held-out edge (walk-forward 53.2%, +3.22pp, p=0.032, n=1,101); (2) live forward test β€” accruing, no cherry-picking. Verified end-to-end: the snapshot fired and logged 72 real calls with entry prices; first grades land in ~7 days. This is the data that will tell us whether fusing paid options-flow adds edge (if the confluence leg beats brain-only). Self-contained + gated like the watchdog, deployed via --config wrangler.toml (no stray-worker). Wired into Brain nav + sitemap.
Batch AE (pass 251) β€” self-sustaining hardening (Brandon's P1): Make the brain never silently die without you knowing. CRITICAL β€” stray-worker deploy trap recurred: wrangler 4.x walks UP the directory tree and deployed the root wrangler.jsonc (the unused static-assets "bpleone-trading" worker, a 0.31 KiB stub) instead of the real brain β€” even from inside worker/. The real brain silently stayed on the old version. Fixed by (a) redeploying with explicit --config wrangler.toml, and (b) neutralizing the footgun for good β€” renamed root wrangler.jsonc β†’ wrangler.jsonc.disabled so no deploy can ever hit the stray again. Self-healing watchdog: the cron now checks if the model is missing/untrained every tick and auto-re-bootstraps within ~3h (throttled so it can't spam) β€” previously a wiped model would stay dead up to 7 days until the scheduled re-competition. Market-aware health: /brain/health now returns self_sustaining (true only if the tick is fresh AND the model is trained) + an issues array β€” and it's market-aware so off-hours heartbeat throttling (pass 244) no longer reads as "down." Free external monitor: new GitHub Action (brain-health.yml) pings the worker every 30 min and emails the owner if self_sustaining is ever false (3 retries first, to ignore blips). owner-checklist updated: uptime is now automatic, deploy command hardened with --config, version pin bumped to pass-251.
Batch AD (pass 250) β€” no-fake-numbers audit + brain-learning verification: Full-site sweep for fabricated numbers presented as live. Brain verified LIVE + learning: worker ticking (pass-248), trained on 17,600 real examples + 636 live captures; walk-forward 53.2% directional accuracy, p=0.032 (statistically significant), honestly labeled "weak signal" (real but modest edge, mild over-confidence β€” no inflated numbers); live 5-day self-learning begins in ~2 days (a 5-trading-day call literally can't be graded sooner). Stale labels removed (were calling REAL data fake): the sample-data banner still tagged insider-live and news-pulse as "illustrative" even though they're now real worker feeds β€” removed them (verified: insider-live shows 120 real rows, zero banner); also dropped the banner from news-impact/congress-trades which carry their own accurate in-page notices. Unlabeled fabrication found + fixed: a precise grep for Math.random assigned to market fields flagged 19 pages; a second broader sweep (synthesized stats: breadth, skew, VVIX, credit-spread, candlestick patterns) caught more. All 11 still-unlabeled mocks now carry the honest banner β€” tape, trade-tape, strike-chaser, sector-flow, sentiment-heat, daily-stats, live-watcher, algo-signals, breadth-pro, risk-radar, candlestick-scanner; algo-signals also lost its false "LIVE" nav badge (the live version is the Alpha Scanner). trade-plan showed a Math.random() 60–85 "Score /100" β€” rewired to a deterministic reward:risk-based plan score (no fabrication), clearly labeled as rating the plan, not predicting the market. Banner module cache-busted (was loaded with no ?v=) so the corrections actually reach returning users.
Batch AC (pass 249) — Smart-Money Confluence: fusing the free signals into "my own brain": Instead of paying for Unusual Whales to re-display the crowd's view, we proved the data→brain→edge thesis on FREE data. New page smart-money-confluence.html fuses three independent free signals client-side: (1) the brain's 5-day P(up) from /brain/signals, (2) net open-market insider buying/selling from real SEC Form 4 (/brain/insider-feed, grants/options excluded — only cash trades), (3) keyword news sentiment (/brain/news, layered on the top agreeing names). Confluence = how many legs agree on direction; STRONG BUY/AVOID needs all three, and disagreement is honestly shown as "mixed" rather than forced. Verified live: 12 names fused across 150 real filings — AMD/COIN/MSFT/NVDA flagged BEARISH (brain bearish + insiders selling), AAPL/PLTR correctly "mixed" (insiders selling but news positive). Zero added cost (both feeds edge-cached), zero fabrication. This is the template for later piping paid flow into the brain as features — the difference between renting a subscription and owning proprietary signals. Wired into Scanners nav + sitemap.
Batch AB (passes 246-248) β€” turning "sample" into REAL: news + insider now live & free: Brandon asked "why is it not real?" about the sample-labeled feeds. Answer: cost/licensing β€” but two of them were free all along and just weren't wired. 248 (news, REAL): news.html already had a Finnhub-backed UI but blocked on a browser-side API key, so it showed empty for everyone. Moved the fetch to a new worker endpoint /brain/news (the worker holds the Finnhub key as a server-side secret) β†’ live general/company headlines for every customer, no key, no Settings step. Verified: 80 real Reuters/Yahoo headlines, sentiment scoring live. 248 (insider, REAL): insider-live.html was 100% Math.random() fabrication (fake "J. Smith" names, a fake "64% hit-rate" claim). Replaced with real SEC Form 3/4/5 via /brain/insider + aggregated /brain/insider-feed (one edge-cached call, server-computed buy-clusters). Verified: 150 real filings β€” Arthur Levinson (AAPL chair), Paul Grewal (COIN CLO), Colette Kress (NVDA CFO) β€” real codes/prices/dates, 0 fabricated rows. 248 (congress, HONEST): congress-trades.html was also Math.random() fake. The free community feeds (House/Senate Stock Watcher) are offline and the API alternatives are paid, so rather than fake it the page now says so plainly and routes users to the real insider feed. Cost: both feeds use Cloudflare's free edge cache (caches.default) β€” ZERO extra KV writes, Finnhub 60/min limit shielded no matter the traffic. + 3 secondary news pages cleaned: news-pulse.html (was a Math.random() headline generator that even streamed a fresh fake headline every 18s β€” now real worker news + keyword sentiment, no fake 1-10 "impact" score; verified 222 real headlines); news-reactions.html (was browser-key-gated β†’ now worker-fed real headlines, no key); news-impact.html (was Math.random reactions reshuffling per load β†’ relabeled ILLUSTRATIVE with deterministic examples + a link to the real News Reactions). Cache token v182β†’v183 across all touched pages.
Batch AA (passes 243-245) β€” self-sustaining + live everywhere + owner checklist: CRITICAL 243: pages like Morning Brief showed SEED prices (SPY 619) not the real worker-yahoo value (756) β€” worker-quotes.js was loaded inside live.js's 5-SECOND lazy block + an 800ms delay, so real prices landed ~6s after custom one-time renders had already painted seeds and never re-ran. Now eager-loaded immediately + first poll instant + emits bpleone:quotes; Morning Brief re-renders its pulse/levels on it (verified: SPY 756 live within ~1s). The brain was never affected β€” it learns from the worker's server-side Yahoo data regardless of browser display. CRITICAL 244 (self-sustaining): the cron wrote LAST_TICK every minute 24/7 + JOURNAL/SIGNALS every market-minute = ~2,500 KV writes/day, over the free-tier 1,000/day cap (past which writes silently fail and the brain stops persisting). Cut to ~660/day weekdays / ~48 weekends: market-closed heartbeat twice/hr, JOURNAL only on change, LAST_TICK every 2 min, SIGNALS every 3 min β€” no data loss. 245: live owner-checklist.html β€” auto-checks the worker and lists the exact owner actions (re-auth+deploy, rotate token, KV/uptime/Pages/Actions, optional data feed), flipping to βœ“ as done. Note: 244 is committed but not yet deployed (the local Wrangler login expired β€” owner re-auth + deploy is checklist item #1).
Batch Z (passes 239-242) β€” live data, free accounts, no fake numbers: CRITICAL 239: the site defaulted to an Ornstein-Uhlenbeck random walk that FABRICATED price movement every 1.5s, and the in-browser Stooq fallback returned nothing (0 real prices in 15s). Killed the simulator by default (demo mode only) and added js/worker-quotes.js β€” a PRIMARY real-price feed from our own worker's Yahoo data (same source the brain uses; one audited source of truth). Verified: 74/74 quotes real (72 worker-yahoo + 2 coinbase), zero stale-seed, dataMode=live. Gated the "Generate demo data" FAB behind demo mode. 240: free customer accounts β€” worker /auth/* (PBKDF2-hashed passwords, KV sessions w/ TTL, login throttle), js/auth.js + login.html + my-account.html (watchlist + alert prefs). Verified end-to-end (register/login/me/logout/prefs, 7/7). 241: "large trades before close" detector β€” final-hour (>=3pm ET) unusual volume = institutional positioning into the close (accumulation/distribution), surfaced on the scanner. 242: sample-data honesty banner on the 22 pages that simulate paid-feed data (dark pool, options flow, GEX, congress/insider, MOC, order book) so nothing fabricated is presented as live; cache token v178->v180 so all fixes reach returning users.
Batch Y (passes 230-237) β€” alpha: unusual-volume scanner + buy/sell signals + live-data proof + per-symbol sharpening + cross-sectional signals: 236/237: fixed "the brain comes back SHORT on everything." Absolute P(up) drifts with the regime, so absolute thresholds collapse to all-SELL (down tape) / all-HOLD (flat). The scanner now ranks each name CROSS-SECTIONALLY vs the current universe (top 15% = BUY, bottom 15% = SELL, volume a conviction modifier), so the list is always balanced + actionable (verified: 11 BUY / 11 SELL in a bearish tape). Added a regime banner (bullish/neutral/bearish from the universe-mean P(up)) so it's honest β€” in a down tape a "BUY" is the relatively strongest name, not a promise it rises. 234/235: guarded per-symbol recalibration β€” a small per-symbol logit shift = logit(symbol's 5d up-rate) - logit(its mean predicted prob), shrunk by sample count and capped, so the heavily-regularized model differentiates between symbols (it was clustering every prediction ~0.46). Kept only if it doesn't worsen held-back walk-forward Brier (it improved it: 0.286 -> 0.264 on 66 symbols, accuracy held at 53.2%). 235 fixed a double-calibration the verification caught (Platt must be fit on the symBias-adjusted chain, not raw, or both stack a base-rate shift). Net: real per-symbol differentiation, guard-proven not to hurt the edge. 233: "make sure the data is live" β€” verified the whole path (worker ticking, model trained on 13,194 real Yahoo examples, live quotes e.g. AAPL $312/44.6M vol) and added a self-verifying live-status bar to the scanner (LIVE/market-closed, brain trained-count, worker version, last-tick age, data source) + /brain/health enrichment, so liveness is undeniable on the page rather than undermined by the site-wide local-brain "untrained" banner. Brandon asked for whale-style unusual-activity scanning. 230 (real volume): the live RVOL feature was a DEAD signal β€” Finnhub /quote has no volume field, so it was fed 0 every tick even though the model trains on real volume from Yahoo history. Added fetchYahooQuote (carries today's cumulative volume) + a Yahoo-primary live-quote resolver; volume now flows (verified: NVDA 89M, TSLA 23M shares). Also moved the once-per-day capture to near close (>=3pm ET) instead of the 8am pre-market open, so the snapshot matches the daily bar the bootstrap enters on. 231 (the scanner): each tick now computes a time-of-day-normalized RVOL Γ— the brain's 5-day conviction β†’ a plain BUY / SELL / WATCH / HOLD per symbol, served by GET /brain/signals and rendered on the new alpha-scanner.html (color-coded, auto-refresh, plain-English "why" per row). Honest scope: this is unusual VOLUME + price action on free equity data β€” the real TA proxy for institutional activity β€” NOT options-flow whale prints (sweeps/blocks/premium), which need a paid OPRA feed. The page says so. Verified live: /brain/signals returns real per-symbol signals as the worker rotates.
Batch X (passes 227-229) β€” the brain now experiments on its own: 227: live accuracy metrics (/brain/metrics live_resolved + /brain/symbols per-symbol) were keyed on resolved.mid || resolved.short. The short fallback was meant for legacy entries, but in practice fired for EVERY entry younger than the 5-day horizon (short resolves at 24h, mid at 168h), so the live "accuracy" number silently reported 1-day outcomes mixed with 5-day. The model predicts a 5-day move; now mid-only β€” entries are excluded until they mature (honest "pending" instead of a 1-day proxy). 228: added autonomous WEEKLY champion re-competition so the brain re-races configs on its own, not just on manual trigger. First attempt fired via a self-subrequest β€” which silently failed (a Worker fetching its own workers.dev URL is unreliable). 229: switched it to call runBootstrap() inline (same audited path), claim the KV timestamp before running (anti double-fire) with rollback-on-failure, and exposed auto_bootstrap_ts on /brain/health. Verified live: reset the timer, watched the cron auto-fire the full bootstrap, complete in ~11.6s, and promote a fresh champion (C_heavy, 3rd straight win, honest held-back acc 55.1%). The brain is now genuinely self-experimenting 24/7.
Batch W (passes 220-226b) β€” the brain experiments, then we made the experiment honest: 220: Platt is now kept only if it improves held-back final-test Brier (a valid a≈1 fit can still hurt under regime shift). 221: flag-based journal clear applied atomically at the top of tick(), fixing a race where a concurrent cron tick overwrote ?clear=1 under KV last-write-wins. 222: CHAMPION/CHALLENGER β€” each bootstrap now trains 4 configs (varying L2 + epochs), races them on a validation slice, promotes the winner, and persists its L2 so the live tick keeps training with whatever last won. First live run: C_heavy (L2=0.05, 3 epochs) won at 59% val acc β€” heaviest regularization, as theory predicts on noisy financial data. 223: that first run also exposed a fragility β€” the champion was picked on one contiguous validation slice that scored 59% while the held-back half scored 47% (different regimes). Switched to a STRIDED (even/odd) split so selection spans every regime; disjoint samples keep the final number selection-free. 224: applied the same strided split to the Platt calibration set, and added apples-to-apples raw-final-test metrics so the JSON stops making calibration look harmful when it isn't (full-set vs half-set comparison). 225: avgLoss divided by one epoch's example count instead of total steps, so it inflated with epoch count (jumped 1.43→2.15 when the 3-epoch champion won despite identical true loss); now divides by totalSteps. CRITICAL 226: the live loop captured each symbol ~90x/day but all resolve to the SAME 5-day outcome — the trainer saw one (symbol, week) observation ~90 times, overweighting weekly movers AND flooding the 35k journal to only ~5 days of retention. Now captures once per ET trading day (independent samples, ~1yr retention). That made it safe to also fix the horizon: mid was 120h = 5 CALENDAR days ≈ only ~3 trading days mid-week, shorter than the bootstrap's 5-TRADING-day label; now 168h = exactly 5 weekdays. 226b: mirrored the trading-day horizons onto the browser continuous-learner for honest UI labels.
Batch V (passes 218n + 219) β€” recovery + browser-side defense-in-depth: Probed the LIVE worker (still on pass-213) and found live_resolved.accuracy = 14.88% over n=6,029 β€” alarming until I diagnosed it as two interacting bugs: pass-213's metric counts flat outcomes in the denominator (cosmetic; pass 218k fixes), AND pass-213's live training fires on the wrong horizon (real; pass 218 fixes, ~14k corrupted gradient steps since last bootstrap). 218n: added ?clear=1 option to /brain/bootstrap so Brandon can do a fully-clean reset (model + journal + Platt) after the corrupted-era window. 219: mirrored worker pass 214's Platt inversion guard onto the browser Calibrator + RegimeCalibrator β€” both used the same vulnerable Platt fit code with no a < 0.2 reject. Now any fit that would invert directional sign is stored with rejected=true and calibrate() returns identity.
Batch U (passes 216-218l) — closing the deployment loop: Pass 216 added the Live Brain Picks card. Pass 217 added /brain/predict?sym=X ad-hoc endpoint. Pass 218 (CRITICAL): found that live training was triggering on 24h-horizon resolutions while bootstrap labels are 5-day forward — two prediction problems fighting on every resolve cycle. Plus MAX_JOURNAL=12,000 was evicting captures before they could be 5-day-resolved (~2.6 days vs 5 days needed). Fixed both: live training keys on mid, MAX_JOURNAL 12k→35k. Passes 218b-218l: rippled the 5d-horizon alignment through every dependent module — continuous-learner, auto-trainer, auto-trade defaults (24h hold → 120h, stop 1%→2.5%, target 2.5%→5%), brain-bet ATR multipliers (1.5x→3x stop), trade-plan-gen copy, money-tracker stopRet and resolution filter, sharpe-tracker periodsPerYear (252→50 because 5d returns), knn-recall + CL stats isResolved to accept mid, entry.outcome prefers mid, worker /brain/symbols + /brain/metrics surface mid resolutions. Added /brain/proof's Live Resolutions card (post-deployment truth-test) that will populate once the first cohort of pass-218 captures resolves at 5d. The whole stack now speaks one language: 5-day forward direction at ±1pp.
Batch T (passes 211-215) β€” the brain found real edge: Pass 210's bootstrap confirmed the framework worked (random-split BSS β‰ˆ 0, walk-forward BSS = -0.45 β€” diagnosed regime shift). Pass 211 cut bootstrap training from 250 days to 120 days so walk-forward train+test would share regime. Walk-forward accuracy jumped from 42.2% to 52.93% β€” a real +2.93pp directional edge confirmed on unseen future data. Pass 212 tightened L2 calibration. 213 added a Platt scaling layer (logit-sigmoid post-calibration) plus a per-symbol BSS surface on brain-proof.html. 214 (CRITICAL guard): first live Platt fit returned a=-0.777 β€” would have INVERTED the model's directional sign on a 12-day calibration set that hit a different sub-regime than the final test set. Added a < 0.2 rejection guard so a noisy fit falls back to raw predictions (preserves the 52.93% edge). 215: per-symbol surface was showing noise as signal β€” at ~15 samples/symbol, a 3-for-3 lucky streak looked like real edge. Combined random_split + walk_forward heldouts, added `stable` flag at nβ‰₯10, UI dims noise rows. Final state: brain has real walk-forward edge, calibration is honest, per-symbol surface is decision-useful.
Batch S (passes 206-210) β€” finding the signal: Pass 210's bootstrap on a fresh model produced avgLoss=3.56 (the textbook fingerprint of "training on data with no predictive signal"). Pass 206 had already pivoted the prediction problem from 1-day-Β±0.3% (famously near-random on liquid stocks) to 5-day-Β±1% (real swing-trade horizon). Pass 207 added L2 weight decay to the worker logistic (was none). Pass 208 (CRITICAL) fixed runBootstrap loading the existing model instead of starting fresh β€” successive bootstraps had been accumulating on stale weights. Pass 209 (cost) added a market-hours gate (8am-5pm ET, M-F) at the top of tick() and stopped writing BARS_HISTORY on intraday updates β€” slashed ~70% of off-hours cron cost. Pass 210 bumped L2 5Γ— (0.003 β†’ 0.015) and cut epochs 5β†’2 to force honest "I don't know" outputs near 0.5 when features have no signal β€” the textbook overfit dropped from avgLoss 3.56 to 1.43.
Batch R (passes 202-204) β€” silent feature-vector corruption (defense in depth): 14 call sites across 9 modules call model.train(features, label). The pattern f.features || extract(f) was used in two places to prefer a stored feature snapshot β€” but [] || x evaluates to [] in JS (arrays are truthy regardless of length). A journal entry with an empty or stale-schema feature array would silently train on a partial-length vector, leaving the upper weights of the model PERMANENTLY un-updated.

202: caller-side fix in model.js trainBatch + predictForFinding. 203: same pattern in multi-horizon trainHorizon (3 horizon models) and bootstrap-ensemble train + predict (K=5 bagged models). 204 (defense in depth): moved the guard one layer deeper into Model.train and Model.predict themselves β€” every caller is now protected by a single guard, returning {skipped: 'bad-features-length'} instead of silently mistraining. Also catches non-finite labels which would NaN-ify the Adam moment buffers. 205 (CRITICAL): pass 199 gated 3 browser trainers (continuous-learner, auto-trainer, historical-bootstrap) but missed a fourth β€” ModelTrainer.trainBatch() called every 5 min by brain-loop's tickMLFeedback. While the worker was authoritative, that fourth path still trained the locally-mirrored model on rated outcomes and was then silently overwritten by next syncFromWorker β€” double-counting outcomes the worker had already trained on and biasing the model toward whatever this browser session saw. Gated at ModelTrainer.trainBatch entry so any caller (brain-loop, training-scheduler.html, ml-status.html, train-now.html, model-trainer.html) inherits the defer.
Batch Q (passes 198-201) β€” worker↔browser boundary hardening: With the worker brain shipping (Batch P), the seams where browser and worker disagree became the new failure surface. Batch Q fixes four of them.

198: worker-bridge.js syncFromWorker had three brittle spots β€” JSON.parse of a corrupted local journal threw and killed the whole sync silently forever; s.journal.filter() assumed array (could be undefined on malformed response); s.model.weights accepted any truthy value but downstream loaders need a 22-element array. All now defensively guarded. 199: the browser brain (continuous-learner + auto-trainer + historical-bootstrap) was fighting the worker β€” every 30-60s the browser trained its locally-mirrored model on local Stooq captures; next worker sync overwrote those gradients; meanwhile both brains were double-counting the same outcomes. Now all three browser trainers check WorkerBridge.isEnabled() and defer to the worker. Browser capture/resolve still runs so brain-proof can show the loop is alive. 200: Brandon's deployed worker was N passes behind the repo source and there was no way to tell at a glance. Added WORKER_VERSION constant baked into the worker, exposed via /brain/health, and worker-setup.html now shows a green "current" banner or a yellow "redeploy" banner with the exact git pull && wrangler deploy command. 201: three worker endpoints had unguarded destructure / parseInt paths β€” /brain/journal?n=garbage returned the entire journal; /brain/symbols would 500 if any heldout entry was null; /brain/metrics computeMetrics polluted BSS with NaN p/y. All three now filter to typed, finite values before computing.
Batch P (passes 188-197) β€” Cloudflare Worker brain (24/7 server-side ML): The browser brain only learns while a Chrome tab is open. Batch P built a Cloudflare Worker that runs every minute on Cloudflare's edge β€” captures Finnhub quotes, resolves outcomes at 24h/5d/20d, trains a logistic model in KV. Browser pages mirror state via js/worker-bridge.js. Endpoints: /brain/health, /brain/state, /brain/metrics, /brain/symbols, /brain/bootstrap.

188: rotating 12-sym slice per tick to stay under Finnhub's 60/min free-tier limit. 189: Yahoo Finance v8 chart API as primary historical source (Stooq CORS-blocked from CF Workers, Finnhub /candle paid-only). 190 (CRITICAL): cron tick was overwriting bootstrapped model with stale n_trained=0 β€” fixed by only persisting model if trained > 0 in the tick. 191: proper 80/20 held-out test + /brain/metrics endpoint with Brier Skill Score + ECE + binomial p-value. 192: walk-forward (time-ordered) split alongside random-split β€” the honest "trained on past, predicting future" test. 193: per-symbol bar history persisted in KV so live captures use the SAME rich features the bootstrap trained on (was previously using neutral 0.5 features β†’ live model couldn't learn). 194: /brain/symbols per-symbol accuracy breakdown. 195: Cloudflare Pro unlocked 30s CPU; bootstrap now does 5 epochs with re-shuffling each pass (~2-3pp accuracy improvement). 196: GH Actions workflow now skips gracefully when CF secrets missing (Brandon deploys via local wrangler deploy). 197 (CRITICAL): walk-forward was training 1 epoch while random-split trained 5 β€” apples-to-oranges. Now both use identical training procedure so the two BSS values on /brain/metrics are directly comparable. Also made clamp() NaN-safe (returns midpoint instead of propagating NaN to downstream model).
Batch O (passes 174-187): deeper-coverage browser audits: more TZ-naive day-bucketing finds, more journal-repair migrations, more PSI dual-export checks, more lazy-load race surfaces around the model. None individually CRITICAL but ~12 small fixes that tighten the brain's data attribution to ET trading calendar across more diagnostic surfaces.
Pass 172-173: ai-narrative.html "session unfolds vs closes" wording used local getHours() β€” at PT 1pm (=ET 4pm market just closed) still said "unfolds". Fixed. Pass 173 β€” 4 HTML pages with unguarded JSON.parse(localStorage) in render paths could crash the page if localStorage was corrupted: day-trader-pro.html paintPnl(), drawdown-protector.html history dots, outlier-detection.html OOD log, webhook-bridge.html KPI counters. All now have try/catch with sensible defaults so pages degrade gracefully on bad data.
Pass 170 (6 more TZ bugs in stats pages): brain-time-of-day.html "Best/Worst/Busiest hour" labels Β· brain-questions.html "best hour of day" + "worst day of week" Q's Β· cohort-analysis.html session cohorts (Open/Morning/Midday/Close ET labels) Β· setup-compare.html per-hour win-rate Β· performance-attribution-pro.html day-of-week chart Β· model-postmortem.html had a particularly nasty bug β€” the render loop iterates h=9..16 (ET market hours) but the bucketing used local getHours(). For PT users, the 9-16 range would only catch trades in PT afternoons β€” morning ET data (= early-morning PT) was excluded ENTIRELY. All 6 now use the toLocaleString('en-US', {timeZone: 'America/New_York'}) re-parse pattern.
CRITICAL Batch L (passes 168-169) β€” model-state race conditions:
168: auto-trainer.js loaded the model at function start, then did 30+s of async Stooq fetches with model.train() calls intermixed, then saved at end. Continuous-learner (every 30s) could load β†’ train β†’ save its OWN update during that window; auto-trainer's later save() then overwrote CL's gradient changes. Rough estimate: ~33% of auto-trainer's 4 daily runs collided with a CL save β†’ ~16 CL training events silently lost per day. Fix: split into Phase 1 (async fetches gather examples into memory, NO model touches) + Phase 2 (one synchronous block: load β†’ train all β†’ save). JS single-thread guarantees atomicity from CL's perspective.
169: auto-trainer.js had a dead check for window._historicalTrainerRunning β€” NOTHING ever set it. Bootstrap ran for minutes without claiming any lock. Wired the cross-module lock end-to-end: historical-bootstrap sets _historicalTrainerRunning (cleared in 4 exit paths), auto-trainer sets _autoTrainerRunning, continuous-learner now checks BOTH and defers its train+save block when either is true. Deferred resolutions stay unresolved in the journal so the next 30s tick (after the long-running trainer completes) reprocesses them against the freshest model state.
CRITICAL Batch K (pass 167): last 2 internal JS modules with TZ-naive day bucketing β€” continuous-learner.js stats() "capturedToday"/"resolvedToday" and streak-tracker.js trend() 14-day rolling bucket. Both bucketed by local midnight; for PT user, 3 hours of every late-evening trade was attributed to the wrong day. Both fixed with Intl en-CA ET-date key matching. After batches J+K, all 7 user-facing surfaces and 2 internal modules now consistently attribute trade timestamps to the ET trading calendar.
CRITICAL Batch J (passes 163-166) β€” same TZ-naive bug class as pass 119, but on the REPORT surface:
163 brain-monthly-calendar bucketed trades by local Y/M/D β€” for PT user Brandon, every trade 9pm-12am PT (= 12am-3am ET next day) appeared in the wrong calendar cell. Fixed with Intl.DateTimeFormat('en-CA', America/New_York) ET-date keys. "Today" highlight also uses ET-today.
164 daily-report.html: findings filtered by local-midnight start/end. Date-picker value (YYYY-MM-DD) now interpreted as ET-date directly.
164 brain-weekly-report.html: week boundaries built from local Sun-Sat and day-of-week chart used local getDay(). Fixed with etDow() helper + ET-attributed week filter.
164 daily-replay.html: 4 separate filters (HighConvictionAlerts, MoneyTracker trades, AutoTrade opened/closed) all bucketed by local-day window. Now all use ET YYYY-MM-DD bucketing.
165 time-of-day-brain.html: byHour and byDow used local getHours()/getDay(). Session labels (Pre-market 4-9:30am, Open 9:30-11am, Lunch, etc.) are ET. PT user's data was off-by-3-hours on every hour bucket. Now uses ET clock.
166 time-of-day-pnl.html: already uses the toLocaleString('en-US', {timeZone}) trick correctly β€” getHours/getDay on the re-parsed Date returns ET values. Verified clean.
Batch I (passes 161-162): 161: performance audit of hot tick functions (continuous-learner runCycle 30s Β· brain-loop ticks 1m/2m/5m/15m Β· stooqPoll 12s Β· live tickOnce). Only tickConfluence had multiple JSON.parse β€” they're pre-loop (not inside per-symbol forEach), so no per-iteration overhead. Pattern already optimal. 162: all 9 model-* + brain-* pages that use ModelStore.load() / Model() explicitly load <script src="js/model.js"> BEFORE the inline script β€” zero crash risk from undefined globals. No lazy-load race surface in model-explorer, model-versions, model-compare, brain-truth, feature-engineering, etc.
Batch H (passes 158-160): money-pages product-surface audit β€” make-money, money-made, mobile-money, mobile-dashboard, how-to-make-money all have clean inline-JS (lint passes) Β· every global reference (UnifiedPredictor, MoneyTracker, AutoTrade, HighConvictionAlerts) properly defensively guarded with if (typeof window.X !== 'undefined') or if (window.X) + setTimeout retry pattern Β· zero risk of crashes from lazy-load race conditions on these high-traffic Brandon-facing pages.
Batch G (passes 155-157): 0 insecure http:// resource refs across 402 HTML pages Β· 0 pages missing <meta name="viewport"> Β· only 2 pages don't link css/style.css (brain-mobile.html standalone inline styles, dns-test.html intentional minimal diagnostic). Mobile rendering + HTTPS-only externally-served resources both verified clean across the entire static site.
Batch F (passes 147-154): 147: localStorage key naming β€” 83 _v1 + 1 _v2 + 3 unversioned (notify_prefs, status_bar_dismissed, subscriber β€” leaving as-is to preserve existing user data). 148: 46 JSON.parse(localStorage) calls verified β€” every one has same-line or preceding try/catch (zero will crash on malformed data). 149: all 5 training tick functions (brain-loop, continuous-learner, auto-trainer, historical-bootstrap, weekly-refresh) wrap iterations in try/catch β€” a single training error can't cascade into a page crash. 150: 38 division-by-variable patterns spot-checked β€” every one guarded (n===0 early-return OR Math.max floor OR std-floor 1e-10). 151-152: 84+ localStorage keys cross-referenced read↔write across all JS+HTML β€” only 1 orphan-write (subscriber form data, intentional snapshot for Brandon), 0 orphan-reads (all 4 candidates verified written by HTML pages). 153: <script src="js/X.js"> references across 402 HTML pages β€” 0 broken refs. 154: href="X.html" references across 402 HTML pages β€” 0 broken targets.
Batch E (passes 141-146): Pass 141 (real fix): 23 HTML pages had buildNav('X') activePage strings that didn't match ANY entry in the 7 nav-group arrays in app.js β€” meaning their "active page" highlight pill was permanently dark on every visit. Added missing entries to tradeGrp (big-bets, day-trader-pro, gex-pro, options-builder, options-pricer, opex-tracker, orderbook, trade-tape, vol-term, etc.), brainGrp (trade-coach), playsGrp (trade-of-the-day), and toolsGrp (dashboard, education, live-quote-grid, live-watcher, paper-portfolio, pnl-diagram, vwap-pnl, watchlist-pro). Now 0 broken activePage refs across 402 pages. Pass 142: sitemap.xml covers 401 of 402 HTML pages (only 404.html excluded β€” intentional). Pass 143: service-worker v1.1 stale-while-revalidate cache list current. Pass 144: QUOTES (74 syms) ↔ STOOQ_MAP (74 syms) β€” perfect 1-to-1 mapping verified, zero orphans, zero unmapped. Pass 145: buildNav() called without activePage on exactly 4 standalone pages + 404 β€” all intentional. Pass 146: journal-repair.js auto-loaded via live.js lazy-load on every page; migration M1 fires 4s post-DOMContentLoaded, gated by version flag.
Batch D (passes 135-140): all 10 charts.js render functions guard against missing canvas Β· feature-store/model-explorer correctly render post-Adam state Β· alerts dedup TTLs verified Β· confidence-penalty + isotonic don't double-fire on retrain Β· all data-live="SYM:field" bindings across 402 HTML pages reference real QUOTES symbols (zero broken).
Batch C (passes 128-134): only 2 console.* calls in entire codebase, none in hot paths Β· 34 CSS custom props all defined, zero undefined refs (the "undefined" ones flagged by regex were inline-defined or false positives) Β· 221 inline onclick attrs documented (style preference, not a security issue without CSP) Β· NaN-guards verified on all 4 critical division ops in model.js / continuous-learner / auto-trade Β· all localStorage.setItem calls verified inside try/catch Β· zero visible TODO/FIXME/XXX/HACK/WIP markers in any HTML body.
Batch B (passes 121-127): earnings-awareness + brain-loop TZ usage verified intentional (local-time digest alignment) Β· auto-trade timeStop uses absolute UTC ms β€” TZ-independent Β· localStorage.setItem non-JSON values verified safe (strings only) Β· all data-provider.js fetches now wrapped in fetchT() with 10s AbortController timeout Β· webhook-bridge POST also gets 10s timeout Β· continuous-learner journal IDs now include Math.random suffix (prevents 2-tab same-ms collision) Β· zero unhandled .then() chains.
New: js/journal-repair.js β€” past corruption auto-fix. Built an idempotent migration framework. Migration M1 recomputes feature[20] in ET for every past journal entry (repairs the pass-119 timezone bug retroactively). Auto-fires 4s after every page load, gated by version flag so it runs at most once. Visible on /brain-debug.html under "Journal repair migrations." Manual re-run button also added under Quick Actions.
CRITICAL pass 119 β€” TWO timezone bugs: (a) model.js feature[20] (hour-of-session) used new Date().getHours() β€” LOCAL time. For Brandon in PT, that's 3 hours behind ET. Feature was reporting "before market open" while ET market was active, on every single capture. The brain's input vector had a SYSTEMATICALLY WRONG feature for non-ET users β€” corrupting every prediction. (b) trade-selectivity.js session/dow signals same bug: at 1pm PT (= 4pm ET, market closing), it would report "Mid-session (stable trading window)" because local hour was still 13. Fix: both now use Intl.DateTimeFormat with America/New_York TZ.
Improvements 116-120: all 102 module window-exports verified Β· demo-fab + notify auto-subscribe got reentrancy guards Β· zero real loose-equality bugs (== / !=) found Β· Notification.permission safety hardened in autoSubscribeSignals Β· charts.js DOM access patterns verified called-on-demand safe.
Passes 111-115: onboarding tour flow verified Β· toast + sound-synth + daily-card clean Β· brain-coach correctly reads DriftPSI.status() (works thanks to pass-76 alias) Β· alerts-builder/feed/dashboard polling at sensible 5-10s cadences Β· final lint of 102 JS modules and 402 HTML pages all clean.
Pending external action β€” TLS cert on options.bpleone.com: Brandon reported betting.bpleone.com is ALSO Bitdefender-blocked for unmatching cert. Means the subdomain isn't currently provisioned with a Let's Encrypt cert from its host. Full fix in SQUARESPACE-FIX.md: DNS record on bpleone.com β†’ GitHub Pages custom-domain setting β†’ wait 5-15 min β†’ Enforce HTTPS. Once Brandon does the DNS+settings steps, a fresh incognito reload confirms the cert.
Passes 105-110 + data verification: pattern-recall clean Β· command-palette refreshed with 14 new pages from today's session Β· recent-tickers + symbol-linker clean Β· 11 high-impact landing pages all parse + load core scripts + close cleanly Β· Math.random scan: every use verified safe (ID generation, mock data, stochastic ML β€” no real-data poisoning) Β· model.js fullRetrain() upgraded to Fisher-Yates shuffle Β· QUOTES seeds in plausible Nov 2026 ranges and gated by stale-seed flag Β· flow audit: 74 symbols all mapped, 5 journal writers + 13 readers consistent.
CRITICAL pass 102: hotkeys.js and money-hotkeys.js both bound g [letter] chord shortcuts with 17 conflicting destinations (e.g. g d β†’ dashboard vs data-reliability). Both handlers fired on every keydown; whichever set location.href last won. Old hotkeys.js routes were silently broken. Fix: hotkeys.js defers ALL g-chord handling when MoneyHotkeys is loaded.
Passes 101-103: charts.js clean (Chart.js helpers properly guarded) Β· onboarding + command-palette + hotkeys reviewed (g-chord conflict fixed) Β· money-hotkeys + sound-synth + symbol-linker reviewed (no further conflicts).
πŸŽ‰ 100 audit passes complete. Every JS module reviewed at least once Β· 16 CRITICAL bugs fixed (each was silently corrupting metrics or breaking an entire safety chain) Β· 84+ smaller fixes Β· zero remaining know-broken modules Β· all changes deployed.
Passes 97-99: cross-source-check now uses in-memory state + 10s flush cadence (was writing on every Coinbase tick β€” many/sec) Β· source-preference clean Β· auto-pause hysteresis + cold-start gate verified Β· trade-selectivity + equity-protector verified Β· learn.js (legacy) now also exposes window.Learn per pass-76b convention.
Passes 89-95: self-distillation gets same cache+flush write-storm fix as sample-decay/label-smoothing Β· counterfactual-replay clean Β· feature-importance clean Β· service-worker now stale-while-revalidate (was cache-first β€” JS fixes never reached cached users until manual VERSION bump) Β· voice-coach clean Β· mixup clean Β· hindsight-replay clean.
CRITICAL pass 80: RegimeCalibrator uses regime names 'bull','bear','chop','high-vol','mixed' but MultiHorizon.detectRegime() returns 'trending_bull','choppy','volatile_bear'. continuous-learner passes the MultiHorizon names into RegimeCalibrator.recordPair() β€” none matched, so EVERY pair was bucketed as 'mixed'. Per-regime calibration was completely inert; unified-predictor always fell back to global Platt. Added a normalizeRegime() translation layer.
CRITICAL pass 79: AdversarialValidator.MAX_POOL = 500 couldn't accommodate the 24h OLD_THRESHOLD β€” at ~900 captures/RTH-day, the pool only held the last ~13 hours, so the old-pool filter always returned 0 entries and fit() always returned { fitted: false }. Covariate-shift detection never fired site-wide. Bumped to 5000 (~5.5 days).
Passes 79-87: adversarial-validator now uses symmetric shift detection (|AUC-0.5|) and a 10Γ— larger pool Β· regime-calibrator name normalization Β· swa cap n at 200 so it actually reflects recent training Β· webhook-bridge only marks alerts as seen on success OR 4xx, retries 5xx/network errors next tick Β· sample-decay + label-smoothing now cache state + flush every 60s instead of writing localStorage on every call (was thousands of writes/min on heavy resolveRound batches).
CRITICAL pass 76 (1c9901e): drift-psi.js exposed window.PSIDrift.summary() but FIVE callers (TradeTrust, Brain Coach, Daily Card, Brain Mobile, Brain Truth) all read window.DriftPSI.status() β€” a complete name + method mismatch. Every drift-aware safety check silently no-op'd; the brain could be 20pp away from the historical feature distribution and TradeTrust would still show green. Fix: add status() returning flat {psi, status} and expose API under BOTH PSIDrift and DriftPSI so legacy correct callers stay working.
Passes 72-76b: auto-trade was anchoring paper trades to the journal's captured price (up to 5 min stale) but computing stops against current QUOTES β€” volatile names could open already-stopped (pass 72) Β· ConfidenceKelly silently ignored input.fraction in favor of localStorage state, so AutoTrade's per-config Kelly fraction did nothing (pass 74) Β· five modules (AIClient, BS, DataProvider, Feed, Notify) declared with top-level const never auto-attached to window β€” defensive callers got undefined (pass 76b) Β· drift-psi alias + status method (pass 76).
CRITICAL passes 67-68 (1e2758c, 99e58cc, c4a31e0): THREE separate Sharpe modules β€” SharpeTracker, SymbolSharpe, SectorPerf β€” all used PERIODS_PER_YEAR = 23400 (assumed 10-min returns) but every caller (continuous-learner, historical-bootstrap) feeds DAILY returns. Annualization formula sharpe Γ— sqrt(N) over-reported annSharpe by sqrt(23400/252) β‰ˆ 9.6Γ— everywhere. Effect: TradeTrust's "Sharpe<1.0" penalty rarely fired; symbol/sector leaderboards pushed everything into "world-class" tier; the brain looked far better than it actually was. Fix: 252 trading-days default across all three.
CRITICAL pass 66 (3809278): market-map.html's paint() function declared const bySec twice in the same function scope (lines 164 + 203) β€” SyntaxError prevented the function from parsing. Market map treemap, KPIs, and sector breakdown never rendered. Renamed the second to bySecForKpis.
CRITICAL pass 65 (4f40c48): streak-tracker.js recovery loop skipped trades with ts <= biggestLoss.ts, which excluded the biggest loss itself from runCum. As soon as ANY positive trade landed after the loss, the function reported instant recovery β€” even though equity was still well below pre-loss level. Rewrote as a single forward pass.
CRITICAL pass 60 (101b271): KNNRecall.predict() returned "fraction of similar past predictions that were directionally correct" β€” but UnifiedPredictor blends it into the final probability AS IF it were P(LONG). A neighbor that predicted DOWN and was right voted toward UP under the old logic. Fixed: compute symbolWentUp = (predUp === wasRight) and count actual UP-events. Affects every page that consumes the blended prob (brain-bet, brain-conviction, make-money).
CRITICAL pass 53 (d4df5be): EnsembleAgreement.categorize() returned LOWERCASE tier names ('strong','moderate','mixed','fragmented') but THREE callers compared against UPPERCASE β€” confidence-kelly's agreementMult, trade-trust-score's fragmentation penalty, and brain-bet.html's tier color. Every case-sensitive check silently failed and agreement-based size adjustments + colors NEVER fired. Brain was sizing trades without considering cross-method disagreement, even though the score was being computed. Returns UPPERCASE now to match callers.
Passes 40-54: Adam optimizer state now persisted across page reloads (model.js) Β· Coinbase WS reconnect now uses exponential backoff (was fixed 5s) Β· DataReliability fetch recording throttled 5s (was per-message, flooding ring buffer) Β· CONNECTING-state guard on WS prevents socket leaks Β· RSI flat-tape returns 50 not 100 (historical-bootstrap) Β· is_reversion feature requires idxβ‰₯2 not idxβ‰₯1 Β· calibrator first-fit no longer needs 50 pairs (uses MIN_PAIRS_TO_FIT) Β· bayesian-dropout percentile linear-interp (was off-by-one) Β· portfolio-allocator + confidence-kelly emit sharesError instead of absurd share counts when riskPerShare missing Β· stale-refresh reentrancy guard prevents concurrent-tab double-fires.
CRITICAL pass 26 (e1106c5): 50+ pages used var(--bg) + 24 used var(--text) but neither was defined in style.css β€” they fell back to initial values (black/transparent), breaking dark theme on those pages. Added 5 aliases in :root so both naming conventions resolve.
Passes 22-36: 49 return-shape candidates investigated (false positives in critical paths after pass 21) Β· 9 onclick "missing handler" all if keyword Β· sort()-without-comparator clean (all string sorts) Β· zero eval() in production js/ Β· zero non-null == bugs Β· 47 critical money pages verified with proper structure Β· 0 broken script srcs Β· 0 broken hrefs.
CRITICAL pass 21 (20ef6bc): HistoricalBootstrap.run() returned { fetched, trained, errors } but WeeklyRefresh + dashboard pages all checked result.trainingExamples / result.symbolsFetched which DIDN'T EXIST. WeeklyRefresh never recorded a successful auto-refresh β€” lastSuccessAt stayed 0, status always read "NEVER". Bootstrap itself worked; only the return value was misnamed. Fixed by returning both naming conventions for back-compat.
Passes 16-21: 10s fetch timeout on auto-trainer Β· timer double-init guards verified Β· symbolHealth no-data trap fixed (3 modules) Β· pre-trade-checklist falsy-undefined bug fixed Β· weekly-refresh defensive load merge Β· HistoricalBootstrap return field mismatch fixed.
Want to verify yourself? Open /self-test.html for live in-browser tests of every module. Runs 32 functional checks in < 1 second. All green = installation is healthy.
DONE

Pass 1 Β· Static analysis 3f8160e

Ran _deep_audit.py (new) checking module exports, dead method calls, localStorage keys, broken script srcs, orphan JS, broken hrefs, dead getElementById, sitemap coverage.

FIXED Β· seed-detector.js orphan β€” built last batch but never wired into live.js. Now lazy-loaded.
FIXED Β· model-results.html broken IDs β€” JS called classList.toggle on kAccBig/kPnlBig/kHrBig/kTrendBig but HTML uses kpiAccBig/kpiPnlBig/etc. Page partially rendered then halted on first null reference. Now fixed.
CLEAN Β· 0 broken script srcs Β· 0 broken internal hrefs Β· 0 dead method calls Β· 81 modules properly exported.
DONE

Pass 2 Β· Lazy-load timing fix eb34599

ROOT CAUSE FOUND: live.js lazy-loaded 17 critical modules inside a 5-second setTimeout. Pages call render() at 500ms. So there was a 4.5s window where window.MoneyTracker (etc) was undefined β€” render bailed to "Loading…" placeholder. setInterval(8s) eventually rescued it but first impression was broken.

Wrote _fix_direct_loads.py to scan every HTML page for window.X references, verify js/X.js is loaded directly. Auto-inserted <script src> tags right after live.js on the affected pages.

FIXED Β· 19 pages got direct loads: ai-market-pulse, bankroll-milestones, brain-health-pro (+10 modules!), brain-insights (+8), brain-time-of-day, daily-replay, earnings-awareness, goal-tracker, hot-symbols, index, outcome-distribution, pattern-recall, risk-gauge, smart-defaults (+6), source-performance, source-quality, symbol-deep-dive (+4), trade-plans, voice-coach.
EFFECT Β· Every empty-state page now renders correctly the moment the JS evaluates. No more "Loading…" lockup.
DONE

Pass 3 Β· Data flow audit

Ran _flow_audit.py tracing Stooq β†’ DataReliability β†’ QUOTES β†’ ContinuousLearner β†’ journal β†’ MoneyTracker render. Cross-checked STOOQ_MAP coverage vs QUOTES seeds vs UNIVERSE.

FIXED Β· 7 forex symbols (UUP, FXE, FXY, FXB, FXC, FXA, FXF) were in QUOTES but missing from STOOQ_MAP β€” they would never receive live updates. Now mapped to Stooq tickers (uup.us, fxe.us, etc).
VERIFIED Β· journal writers (5) + readers (13) all use the same key bpleone_pred_journal_v1. No drift.
VERIFIED Β· DataReliability validation thresholds β€” max price jump 30% (intentional, handles crypto volatility) Β· equity stale 5min Β· crypto stale 2min Β· all sane.
VERIFIED Β· ContinuousLearner UNIVERSE covers 24 of 60 QUOTES β€” intentional (only the most-liquid tickers worth training on).
VERIFIED Β· isLiveQuote() correctly rejects seed values (requires priceSource + liveAt within 30 min).
DONE

Pass 4 Β· Journal retention bug dd6defd

CRITICAL FIX: continuous-learner.js had MAX_JOURNAL = 5000. At ~48 brain captures/hour during market hours, that retains only ~3 days. Money Made's "Lifetime" + 30d windows were silently truncating data.

FIXED Β· MAX_JOURNAL: 5000 β†’ 12000 (~25 days of captures). Plus age-based filter MAX_JOURNAL_AGE_DAYS=120 so old entries get age-trimmed first. Quota-exceeded fallback to 3000.
FIXED Β· DemoData cap also bumped 5000 β†’ 12000 to match.
DONE

Pass 5-7 Β· Timers Β· Features Β· Page structure

VERIFIED Β· All setInterval timers reasonable. Stooq 12s Β· Coinbase REST 30s Β· brain cycle 30s Β· regime 60s Β· seed-detector decorate 10s. No DoS-level polling.
VERIFIED Β· Features array consistency. demo-data, historical-bootstrap, model all generate 22-dim vectors matching N_FEATURES=22 in drift-psi + outlier-detector.
VERIFIED Β· Page structure. 5 pages flagged for missing nav/footer β€” all intentional (mobile views, embeds). 0 script-order issues.
DONE

Pass 8 Β· localStorage write-safety 89850c6

Grep'd every localStorage.setItem for missing try/catch. Found goal-tracker.html had an unprotected raw setItem. Wrapped in try/catch (could crash on quota exceeded).

FIXED Β· goal-tracker.html setItem now wrapped.
SHIPPED Β· self-test.html β€” in-browser runtime test harness, 32 functional tests, color-coded results.
DONE

Pass 9 Β· ConfidenceKelly defensive clamp 8c08436

FIXED Β· ConfidenceKelly.size() uncertaintyMult was Math.max(0.3, 1 - std * 4). Missing upper clamp β€” if std went negative (defensive case), would return >1.0 and over-size. Now clamped to [0.3, 1.0].
VERIFIED Β· 0 duplicate script-src tags across 397 pages.
DONE

Pass 14 Β· CRITICAL: prevClose overwrite bug 5e38a1f

THE SINGLE BIGGEST BUG OF THE AUDIT. Every poll update (Stooq, Coinbase WS, Coinbase REST, stale-refresh) was overwriting q.prevClose with the previous q.last. This destroyed yesterday's authoritative close (from live.js seed values) within seconds of the first poll. After a minute, ticker change% showed "move over last 12 seconds" instead of "today vs yesterday".

FIXED in 5 places Β· Stooq path Β· Coinbase WS Β· Coinbase REST Β· Stooq stale-refresh Β· Coinbase stale-refresh. All preserve seed prevClose (yesterday's close). change/changePct now measure true day-over-day move.
DONE

Pass 15 Β· model.js NaN-safe sigmoid 6a74de6

If feature vector or weights were corrupted, sigmoid(NaN) returned NaN. predict() emitted {prob: NaN}. Every downstream calibration + Kelly sizing silently propagated NaN.

FIXED Β· sigmoid() now returns 0.5 (no signal) when input is not finite. Defensive against any upstream corruption.
DONE

Pass 12-13 Β· Honest banner + QUOTES seed sanity f671728

FIXED Β· data-mode-banner.js was claiming "Finnhub WebSocket connected" for ALL connected providers. Now reads actual provider name and shows "LIVE Β· {provider} real-time" or "LIVE (delayed ~15 min) Β· {provider} free tier" β€” honest.
VERIFIED Β· All 60 QUOTES seed values pass sanity (no 0s, no extremes, VIX in [5,100], BTC in [10k,200k], implied changes < 30%).
DONE

Pass 10-11 Β· CRITICAL: seed-quote rejection 343bf69

CRITICAL BUG FOUND IN 2 MODULES. high-conviction-alerts.js and auto-trade.js both checked freshness with if (q.liveAt && ...). If q.liveAt was UNSET (seed-only price from live.js init), the conditional was falsy and the gate PASSED. Meaning real alerts/trades could fire on the placeholder seed prices that were never live-fed.

FIXED Β· Both now explicitly require q.liveAt is set BEFORE checking age. AutoTrade + HC Alerts only fire on prices that have actually been live-fed by a real source.
SHIPPED Β· DemoData also seeds bpleone_spy_history_v1 (30 synthetic SPY closes) so Brain-vs-SPY page works with demo. Gated to not overwrite real Historical Bootstrap output.
πŸ›  Audit scripts (run yourself)
python _full_audit.py β€” Brace balance, inline script syntax, sitemap coverage
python _deep_audit.py β€” Module exports vs callers, orphan JS, dead getById, broken hrefs
python _fix_direct_loads.py β€” Auto-inserts direct script tags for lazy-load races
python _flow_audit.py β€” Stooq β†’ QUOTES β†’ journal β†’ render data flow
πŸ”— Related
❀️ Brain Health πŸ“Š Data Reliability πŸ“‘ Live Status