Clubhouse patio and golf event setting
Build recap - June 1, 2026

BetWaggle is verified, pushed, deployed, and ready for field validation.

This page is the working handoff: what shipped, what was tested, which demos are valid, and which real-world launch checks still need proof.

What shipped

The repo now has a cleaner Worker boundary, stronger route/security posture, D1-backed commercial records, scorer identity on hole writes, and registry-backed claim boundaries for formats that are not fully automated yet.

Architecture

Worker modules extracted

Auth crypto, course data, AI clients, runtime utilities, shared helpers, route policy, and demo registry logic are pulled out of the monolithic Worker surface.

Security

Public posture tightened

HTML security headers, same-site CORS defaults, zero active innerHTML inventory, and route-policy regressions are all covered by tests.

Money path

Commercial D1 records

Payments, affiliate attributions, settlement snapshots, settlement transfer rows, lifecycle audit rows, and affiliate network commissions are now covered by migrations and tests.

Affiliate

Four-level network

The four-level affiliate network now covers referred signup, upstream commission creation, network earnings, combined payout requests, mark-paid handling, and the downstream network tree.

Scoring

Scorer status visible

Saved holes now carry selected scorer identity, and the scorecard tells users whether they are commissioner-signed, named-scorer tagged, or spectator-only.

Game claims

Unsupported rules labeled

Hammer is classified as an off-card Wolf house rule, and Bloodsome CTAs now describe the current score-based approximation without claiming alternate-shot automation.

Demos

Known demo registry

Six public demo slugs smoke successfully on production state endpoints, including buddies, scramble, member-guest, and completed-round examples.

Docs

Operational handoff

README, phase gap report, TODOs, and course-pro runbook now describe the verified build instead of aspirational claims.

Demo paths

These are the fastest links for showing the product without relying on fresh event creation. Each route is backed by a production state smoke.

Verification log

The latest source state is intentionally backed by local regression coverage and production read-only smoke checks.

Regression

Full Node suite passed

All checked-in `tests/*.test.js` files completed successfully after the scorer-authority, Hammer classification, and Bloodsome approximation-copy slices.

Smoke

Production demo state passed

`scripts/demo-state-smoke.js` returned 200 responses and valid state for six public demo slugs.

Deploy

Cloudflare deploy completed

`npx wrangler deploy` completed on June 1, 2026, and production demo state smoke passed afterward.

Remaining gates

The newest source is on GitHub and deployed to Cloudflare. Launch sign-off still needs real paid checkout/webhook proof, real mobile payment-link checks, and an outdoor field run from create to settlement.