Phase 2 now gives two explicit, copy-paste invocations — polling (no
--seeder-tier) and websocket (with --seeder-tier) — instead of one combined
example that wrongly showed --seeder-tier for every plugin. Adds the
build-CLI-first step, the >= 1.3.1 requirement (the version that fixed the
polling+--yes guard), and a note that a non-zero CLI exit is a hard stop, not
a cue to scaffold by hand.
Phase 4 no longer tells the agent to create the seeder files from scratch:
the websocket scaffold already emits package.json + tsup.config.ts +
src/index.ts, so Phase 4 is reframed as implementing the generated stub. The
reference snippets are kept as the target shape to verify against.
The --yes guard counted the conditionally-skipped seederTier prompt as a
missing required value, so `create <id> --architecture polling ... --yes`
failed even though seeders only apply to websocket plugins. The guard now
only requires seederTier when the resolved architecture is websocket.
This bug shipped in 1.3.0 and was missed in manual UAT (the polling case
was exercised interactively, not with --yes). The new test suite caught it.
Also in this change:
- Add packages/wwv-cli/test/create.test.mjs: 9 integration tests that spawn
the built CLI into temp dirs and assert the scaffolded tree (polling vs
websocket, community vs private seeder tier, billboard/model/point render,
--core, kebab-id naming, icon mapping, and the --yes / invalid-flag /
duplicate-dir failure guards). Uses Node's built-in test runner, no new deps.
- Add .github/workflows/cli.yml: path-scoped to packages/wwv-cli, runs
build (tsc) + the integration tests. Fast versus the full app suite.
- Add paths-ignore for packages/wwv-cli to the heavy app workflows (ci,
playwright, docker-publish, test-setup-scripts, test-local-dev push) so a
CLI-only change runs just cli.yml instead of the whole suite.
- Bump CLI to 1.3.1 and add a test script.
The 'wwv create' command was fully interactive (prompts-only) and the
plugin-implementer agent's documented '--local' flag did not exist, so
agents fell back to slow manual scaffolding.
- Add a positional [pluginId] arg plus a flag for every prompt
(--display-name, --description, --category, --architecture,
--seeder-tier, --render-style) and a --yes guard that fails fast
instead of hanging when a required value is missing. Any omitted
flag still prompts, so interactive use is unchanged.
- Fix seeder output to the real community/private layout:
local-seeders/<tier>/packages/<name>/{package.json,tsup.config.ts,
src/index.ts}, exporting the canonical { name, cron, fn } shape with
name === plugin id (kebab-case) per ADR-0002. Previously it wrote a
bare seeder.mjs to the wrong path with an unusable context.emit stub.
- Update plugin-implementer.md: drop the bogus --local flag, document
the flag-based invocation and the correct seeder location, and note
the CLI build step for fresh worktrees.
- Bump CLI to 1.3.0 and fix the stale hardcoded --version string.
The link_planning pre-start hook created a JUNCTION from each new worktree's
.planning to the shared root, which caused GSD phase bleed across simultaneous
worktree sessions. Rewrite it to create a REAL isolated .planning directory
(phases/debug/surveys + config.json + WORKSPACE/STATE/SHARED-DOCS manifests),
idempotently: preserve an existing real dir, only replace a leftover junction.
Update unlink-planning (pre-remove) to remove only a leftover junction and never
recurse into a real dir; phase history is archived by /branch-cleanup before removal.
Closes the gap flagged in WORKSPACE-OPTIMIZATION-BACKLOG.md. Verified with an
18-check harness (fresh create, idempotency, junction replacement, unlink behavior).
Conductor skill that sequences a WorldWideView plugin from idea to npm-published and cleaned up, delegating to existing agents (worktree-manager, plugin-researcher, plugin-implementer, branch-finisher, branch-cleanup) and GSD (project-per-plugin in the worktree's isolated .planning).
8 stages: kickoff -> isolated worktree+scaffold -> GSD research/plan -> autonomous build+e2e -> UAT -> dual-repo PRs (independent versions) -> npm publish -> teardown. User gates only at the 4 irreversible boundaries: plan approval, UAT sign-off, npm publish, teardown. Docker resources labeled wwv-plugin=<name> at scaffold for exact teardown.
Design decisions: conductor-skill architecture (not a new orchestrator agent), project-per-plugin GSD scope, independent plugin/seeder versioning. Full design rationale in .planning/PLUGIN-PIPELINE-DESIGN.md.
Infra-only (no app code); no semver bump.
Tracked, parameterized template for the machine-local (gitignored) .agents/settings.json. Hook script paths use $CLAUDE_PROJECT_DIR so they resolve per-worktree on any machine/repo location, fixing the prior hardcoded C:/dev/wwv paths. The live settings.json is left untouched (machine-local) to avoid breaking active hooks and because the bash.exe interpreter path is install-specific. New clones copy this template to .agents/settings.json after running the GSD installer.
Update the worktree/planning tooling to the per-worktree isolated .planning model (replaces the dormant shared-.planning-branch model that could not isolate simultaneous sessions):
- worktree-bootstrap: new Step 5 creates a REAL isolated .planning (phases/debug/surveys + WORKSPACE.md/STATE.md/SHARED-DOCS.md + config.json), never a junction; Step 6 wires WWV_SHARED_PLANNING; rewrote the '.planning branch convention' section as '.planning Isolation (per-worktree)'; teardown now routes through /branch-cleanup.
- planning-sync.sh: repurposed from git-branch checkout to a non-destructive isolation CHECK that warns when a worktree's .planning is not isolated (no WORKSPACE.md). Deliberately does not auto-mutate the filesystem from a SessionStart hook.
- branch-cleanup: .planning is now a real isolated dir to ARCHIVE before removal (Phase 3e -> shared archive), not a junction to skip; updated classification + quick-ref; fixed pre-existing em dashes.
- .env.example: document WWV_SHARED_PLANNING (shared cross-feature docs pointer).
No app code touched; no semver bump (infra-only chore). Ecosystem C:/dev/wwv/CLAUDE.md updated separately (outside this repo).
Track the project's own 19 subagents, 3 skills, and commands/worktree.md so they travel to every worktree and clone (previously untracked, so git worktrees never received them - the root cause of missing/inconsistent agents across worktrees).
Gitignore the vendored GSD tool install (~404 files under .agents/get-shit-done, commands/gsd, gsd-* agents/hooks, install state, internal worktrees) - it is a global tool, reinstalled via the GSD installer, not committed.
Hold .agents/settings.json (machine-specific absolute hook paths; portable version TODO before open-source handoff). Ignore stray 'nul' artifact.
* fix(setup): write .env.local not .env, fix npm->pnpm in completion message
setup.mjs was writing AUTH_SECRET to the git-tracked .env file instead of
.env.local, creating a security risk for users who commit their fork.
Also fixes the completion message which incorrectly instructed users to run
npm run dev instead of pnpm dev (project uses pnpm@9).
* ci: add multi-OS matrix for pnpm setup, fix stale action versions
Adds ubuntu/windows/macos matrix to test-setup job so the install
instructions are verified on all three platforms on every PR. Fixes
actions/checkout, pnpm/action-setup, and actions/setup-node all
pointing at non-existent @v6. Splits into two jobs: test-setup
(3 OS) and test-dev (ubuntu-only, needs Docker).
* fix(ci): use pnpm run setup not pnpm setup
pnpm setup is pnpm's built-in shell config command (writes to .bashrc).
pnpm run setup runs the project script. All three occurrences fixed.
* fix(dev): load .env.local in dev.mjs before spawning workers
Turbopack workers inherit process.env at spawn time, before Next.js
completes its own .env.local loading. If ENCRYPTION_MASTER_KEY is not
already in process.env when concurrently spawns next dev, the
instrumentation.ts startup check sees it as unset and crashes the server.
Fix: loadEnv('.env.local') in dev.mjs after loading .env so all secrets
are present in process.env before any child processes are spawned.
Also fix CI idempotency test: pnpm setup calls pnpm's built-in shell
config command, not the project setup script. Changed to pnpm run setup.
* fix(sync): add process.env replacement, inlineDynamicImports, and CSS copy to syncToPublic
- Inline replace-process-env Rollup plugin transforms process.env.NODE_ENV to "production"
to prevent ReferenceError in browser bundles that lack a Node.js environment
- Switch codeSplitting to inlineDynamicImports: true so the build produces a single
self-contained ES module with no bare chunk specifiers that the browser cannot resolve
- Add rollup-plugin-external-globals to remap shared host deps (react, cesium, zustand, SDK)
to globalThis.__WWV_HOST__.* at bundle time
- syncToPublic now copies any .css files emitted alongside the .mjs bundle (e.g. from
gridstack or other CSS-importing libs) into public/plugins-local/<id>/
* docs(plugin): add bundle footguns -- CSP/CSS, inlineDynamicImports, process.env, CORS
* feat(globe): add weather radar overlay with OpenWeatherMap tile proxy
Adds a complete weather overlay system: server-side tile proxy that
hides the OWM API key, Cesium imagery layer integration at 60% opacity,
and a dropdown in Graphics settings to toggle between clouds,
precipitation, temperature, wind, and pressure layers.
Closes#10.
* fix(weather): address PR #153 review feedback
- Remove console.error from tile proxy catch block
- Validate tile x/y against zoom-level upper bound (2^z) and cap zoom at 18
- Fix useEffect race condition in weather overlay with cancelled flag
- Replace stale enableFxaa/msaaSamples in DEFAULT_GRAPHICS with antiAliasing
- Extract shared WEATHER_LAYERS constant into src/lib/weatherLayers.ts
- Normalize indentation in GraphicsSettings.tsx
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix(globe): consolidate weather overlay cleanup into return function
Remove eager top-of-body removal of weatherLayerRef that created a
double-removal pattern. The cleanup function already handled removal
via a local layer variable with a ref guard; the eager removal was
redundant and fragile under React 18 concurrent scheduling.
Also drop the unused cancelled flag (UrlTemplateImageryProvider is
synchronous, so the flag could never flip true inside the effect body).
---------
Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-authored-by: Antigravity AI <[email protected]>
* fix(e2e): guard marketplace webServer and exclude per-app tests from main Playwright config
Root cause: playwright.config.ts unconditionally started the marketplace dev server at
../worldwideview-marketplace. In CI only worldwideview is checked out, so spawn() received
a non-existent cwd which Node.js surfaces as "spawn /bin/sh ENOENT", crashing the entire
test run before any browser launched.
Two targeted fixes:
1. Wrap the marketplace webServer entry in fs.existsSync(MARKETPLACE_DIR) so CI skips it
gracefully. Use playwright.marketplace.config.ts to run cross-app marketplace tests locally.
2. Add testIgnore for web-auth.spec.ts and marketplace-from-instance.spec.ts — both target
sibling repos (worldwideview-web / worldwideview-marketplace) and have their own dedicated
configs (playwright.web.config.ts / playwright.marketplace.config.ts). The main config
should only exercise the worldwideview app itself.
* feat(09-02): add playwright.cross-app.config.ts and .env.test for cross-origin specs
- Add playwright.cross-app.config.ts with dual webServer array (wwv.local:3001 + marketplace.wwv.local:3002)
- testMatch targets both upcoming cross-app spec files; baseURL set to marketplace.wwv.local:3002
- Create worldwideview/.env.test with PLAYWRIGHT_TEST_EMAIL + PLAYWRIGHT_TEST_PASSWORD (gitignored)
- Add explicit .env.test entry to .gitignore (was not covered by existing .env/.env.local patterns)
- Bump version 2.20.2 -> 2.21.0 (feat: minor)
* feat(09-02): add cross-app Playwright specs for redirect handshake and sign-out (REQ-16)
- Add marketplace-redirect-handshake.spec.ts: 2 tests verifying next= param construction and login-then-redirect-back flow
- Add marketplace-sign-out.spec.ts: 1 test verifying avatar dropdown sign-out clears session and returns to marketplace home
- Update playwright.cross-app.config.ts to load .env.test credentials via fs (no dotenv package required)
- All specs target https://marketplace.wwv.local:3002 (never localhost:3002) for correct .wwv.local cookie domain
- 3 tests total listed by playwright --list
* feat: add planning-sync hook script for .planning branch isolation
* fix: guard planning-sync against missing .planning, wrong repo, and silent checkout failures
- Exit early if .planning/.git doesn't exist (avoids false-success on machines without the private repo)
- Exit early if CWD is not a worldwideview repo or worktree (prevents syncing from wwv-data-engine etc.)
- Wrap both checkout calls in exit-code checks so failures emit WARNING messages instead of false success
* feat: add post-checkout hook for .planning auto-sync
* fix: add existence guard to post-checkout hook before calling planning-sync
* docs: add .planning branch convention to worktree-bootstrap skill
* feat(11-01): add LegalFooter component and .legal-footer CSS class
- Create src/components/layout/LegalFooter.tsx as a Server Component
- Export named function LegalFooter with two external anchors
- Both anchors use target="_blank" rel="noopener noreferrer" (T-11-01)
- Links target locked URLs: privacy-policy and cloud-terms-of-service
- Append .legal-footer + a + a:hover rules to globals.css
- position:fixed bottom:0 z-index:10 per UI-SPEC
- Bump version 2.23.2 -> 2.23.3
* feat(11-01): remove Vercel Analytics, mount LegalFooter in root layout
- Remove @vercel/analytics/next import from layout.tsx (D-02)
- Remove {process.env.VERCEL && <Analytics />} JSX (D-02, T-11-02)
- Add import { LegalFooter } from @/components/layout/LegalFooter
- Render <LegalFooter /> as last child of <body> (D-04)
- Remove @vercel/analytics from dependencies in package.json
- Regenerate pnpm-lock.yaml after dependency removal
- AdSense block (lines 27-37) untouched per D-03
- Bump version 2.23.3 -> 2.23.4
* fix(worktree): fix link_planning hook path conversion for Windows
Worktrunk substitutes {{ worktree_path }} as a Unix-style path
(/c/dev/...) which cmd.exe cannot resolve. It also strips $ sigils
from variable names before executing hook commands, making inline
PowerShell variables unusable.
Extract junction logic to .agents/scripts/link-planning.ps1 and
unlink-planning.ps1. The hooks now call powershell -File with
the path as an argument, avoiding both issues entirely.
* docs: add ADR-004 and phase-2 implementation plans
Adds the Supabase session cookies httponly ADR alongside the six
implementation plan documents produced during the auth gate phase.
* feat(auth): implement Phase 2 cloud auth gate (ADR-003 closeout)
- Cloud edition login page redirects to NEXT_PUBLIC_AUTH_HOST_URL;
local/demo editions keep the NextAuth credentials form
- Delete signup pages and Supabase PKCE callback route from worldwideview
(auth host owns them per ADR-003)
- Add Supabase SSR helpers (cookieOptions, server, client) with
httpOnly:true cookies per ADR-004
- Dual-dispatch install-redirect and grant-token: Supabase on cloud,
NextAuth on local/demo; redirect param unified to ?next=
- Add streaming mode to safeFetch for MJPEG camera proxy streams
- Extract LoginForm into its own component
- Update Playwright config to conditionally start marketplace dev server
* fix(types): cast undici ReadableStream body to BodyInit to satisfy DOM types
node:stream/web ReadableStream is structurally incompatible with the DOM
ReadableStream expected by the Response constructor -- the pipeThrough
signature differs on the T | undefined generic bound. Cast to BodyInit
(which is the correct type for the streaming pass-through) to resolve
the TS2345 error in ssrf.ts line 112.
* fix(e2e): exclude cross-app marketplace specs from default Playwright run
marketplace-redirect-handshake.spec.ts and marketplace-sign-out.spec.ts
require a running marketplace.wwv.local:3002 instance (cross-app
environment). They were being picked up by playwright.config.ts in CI
where that host does not exist, causing ERR_NAME_NOT_RESOLVED failures.
Added both files to testIgnore alongside the existing exclusions; they
should be run via playwright.cross-app.config.ts only.
* fix: add pointer event support to bottom panel resize for webkit
Playwright's webkit engine dispatches pointermove/pointerup reliably
during synthetic drags but mousemove sometimes does not fire. Add
pointermove and pointerup listeners alongside the existing mouse
listeners, and add onPointerDown to the drag handle, so the resize
test passes across all three browser engines.
* feat(marketplace): pass from_instance origin when opening marketplace
BrowseLink in PluginsTab now appends ?from_instance=<origin> so the
marketplace can silently capture the instance URL into localStorage,
skipping the manual InstanceConfig modal for users arriving from the app.
* test(e2e): add marketplace instance auto-discovery E2E tests
- playwright.marketplace.config.ts: standalone config that starts only
the marketplace on port 3002, no Docker/Postgres required
- tests/marketplace-from-instance.spec.ts: 4 marketplace-side tests
(capture valid URL, reject javascript: protocol, reject self-origin,
skip when no param) + 1 full-flow test (worldwideview -> marketplace,
auto-skipped when running under marketplace-only config)
- NEXT_PUBLIC_MARKETPLACE_URL env var in BrowseLink lets tests point
to localhost:3002 instead of the production marketplace
- data-testid="browse-plugins-btn" for stable Playwright selector
- playwright.config.ts updated with both webServers for full E2E
Run marketplace tests (no Docker): pnpm exec playwright test --config=playwright.marketplace.config.ts
Run full E2E (Docker required): pnpm test:e2e
* feat: implement Phase 2 install auth gate (ADR-003 closeout)
Closes the three foundational auth gaps that blocked a proper install gate:
2A - SSR session persistence:
- Add @supabase/ssr; create src/lib/supabase/{cookieOptions,server,client}.ts
mirroring the marketplace recipe so both repos issue the same cookie type
- Migrate login/actions.ts from @supabase/supabase-js to createServerClient
(previously the Supabase session was discarded; no cookie was ever set)
- Fix getSafeRedirect to allow trusted subdomain callbacks via
NEXT_PUBLIC_WWV_COOKIE_DOMAIN so marketplace ?callbackUrl= round-trips work
- Add NEXT_PUBLIC_WWV_COOKIE_DOMAIN and NEXT_PUBLIC_AUTH_HOST_URL to .env.example
2B - Signup route at auth host:
- Add /signup page and server action (supabase.auth.signUp with emailRedirectTo)
- Add /auth/callback route to handle Supabase PKCE email verification exchange
- Add "Sign up" link to login page preserving ?callbackUrl=
2C - Install auth gate:
- Swap NextAuth auth() for Supabase getSupabaseUser() in install-redirect route
(local/demo edition still uses NextAuth)
2D - Sweep:
- httpOnly: true added to buildCookieOptions()
- cloud-auth-architecture.md superseded section collapsed to forward-pointer
- ADR-003 status updated to Accepted with implementation notes
* chore: exclude .planning from git (moved to private repo)
* chore(05-01): add Playwright config and E2E specs for worldwideview-web auth UI
- playwright.web.config.ts: targets https://wwv.local:3001 with ignoreHTTPSErrors
- tests/web-auth.spec.ts: 4 describe groups covering reset-password form, /accounts redirect, /auth/verify no-code error, /auth/reset-password/confirm no-hash timeout
- bump version 2.20.0 -> 2.20.1
* fix(gc): narrow mdc-ref detector to eliminate false positives
Pattern now requires a quoted string context (['\"].*\.mdc['\"]) and
only scans .ts/.tsx files, excluding scripts/. Prevents the scanner
from flagging its own source code and rule documentation that explain
the anti-pattern rather than violating it.
- CameraStream.tsx: drop allow-popups from proxied iframe sandbox — third-party
camera pages have no legitimate reason to open new windows; eliminates a
phishing popup vector from compromised or malicious camera providers
- iframe/route.ts: remove Access-Control-Allow-Origin: * and delete the OPTIONS
handler — the iframe proxy is only consumed same-origin so CORS headers served
no purpose and only advertised unnecessary cross-origin access
Special characters (Š, Č, Ž, Đ, etc.) were rendering as garbled glyphs
in the UI because the display environment lacks font coverage for those
code points. Adds a shared transliterate() utility that decomposes
characters via NFD and strips combining diacritical marks, with a
supplemental map for characters that don't decompose cleanly (Đ, Ø, Ł,
ß, etc.). Applied at both Places API routes (search + details) and the
GeoJSON entity converter so all place/airport name sources are covered.
Fixes: [email protected] report – May 13-14 2026 Discord.
Co-authored-by: Claude <[email protected]>
* fix(camera): fix camera stream not displaying — CSP frame-ancestors and HTTP SSRF block
- next.config.ts: add path-scoped header override for /api/camera/proxy/:path*
setting frame-ancestors 'self' and X-Frame-Options SAMEORIGIN so proxy iframe
responses are not blocked by the global frame-ancestors 'none' policy
- ssrf.ts: extend validateOrigin to accept http:// URLs; the stream proxy is a
server-side bridge that must fetch plain-HTTP camera feeds before re-serving
them over HTTPS to the browser to avoid mixed-content blocks
- ssrf.spec.ts: update validateOrigin tests to match new HTTP-allowed behaviour;
add explicit rejection tests for ftp://, file://, data://, javascript://
- scripts/boot-db.mjs: create .env from .env.example in worktrees when missing
so DATABASE_URL injection block is never silently skipped
* fix(camera): sandbox proxied iframes and unblock external stylesheets
The CSP override for /api/camera/proxy/:path* still inherited the app's
restrictive style-src/script-src, which blocked external stylesheets and
scripts inside proxied iframes (YouTube, third-party players, etc).
Relax proxy CSP to default-src * while keeping frame-ancestors 'self'.
Because the proxy iframe is same-origin with the host app, this widened
CSP would have let upstream HTML reach window.parent.localStorage / DOM.
Add sandbox="allow-scripts allow-popups allow-presentation" (no
allow-same-origin) to proxied iframes so they run in an opaque origin
and cannot touch the host app. Major-platform iframes (YouTube/Twitch/
Vimeo) bypass the proxy and remain unsandboxed since the browser already
isolates them via cross-origin.
- next.config.ts: proxy CSP -> default-src * 'unsafe-inline' 'unsafe-eval' data: blob:; frame-ancestors 'self'
- CameraStream.tsx: add sandbox attribute to proxied (non-major-platform) iframes
* fix(camera): add youtube-nocookie.com to major-platform bypass list
getYouTubeEmbedUrl() converts youtube.com watch URLs to youtube-nocookie.com
embed URLs, but the majorPlatformHosts allowlist in CameraStream.tsx was
missing youtube-nocookie.com. This caused YouTube embeds to be routed
through the iframe proxy + sandbox, which broke the YouTube player (Cache
Storage disabled, RUM analytics blocked, writeEmbed not defined).
youtube-nocookie.com is now treated the same as youtube.com: loaded
cross-origin directly without proxying, relying on the browser's same-origin
policy for isolation.
* fix(camera): fix camera stream not displaying — CSP frame-ancestors and HTTP SSRF block
- next.config.ts: add path-scoped header override for /api/camera/proxy/:path*
setting frame-ancestors 'self' and X-Frame-Options SAMEORIGIN so proxy iframe
responses are not blocked by the global frame-ancestors 'none' policy
- ssrf.ts: extend validateOrigin to accept http:// URLs; the stream proxy is a
server-side bridge that must fetch plain-HTTP camera feeds before re-serving
them over HTTPS to the browser to avoid mixed-content blocks
- ssrf.spec.ts: update validateOrigin tests to match new HTTP-allowed behaviour;
add explicit rejection tests for ftp://, file://, data://, javascript://
- scripts/boot-db.mjs: create .env from .env.example in worktrees when missing
so DATABASE_URL injection block is never silently skipped
* fix(camera): sandbox proxied iframes and unblock external stylesheets
The CSP override for /api/camera/proxy/:path* still inherited the app's
restrictive style-src/script-src, which blocked external stylesheets and
scripts inside proxied iframes (YouTube, third-party players, etc).
Relax proxy CSP to default-src * while keeping frame-ancestors 'self'.
Because the proxy iframe is same-origin with the host app, this widened
CSP would have let upstream HTML reach window.parent.localStorage / DOM.
Add sandbox="allow-scripts allow-popups allow-presentation" (no
allow-same-origin) to proxied iframes so they run in an opaque origin
and cannot touch the host app. Major-platform iframes (YouTube/Twitch/
Vimeo) bypass the proxy and remain unsandboxed since the browser already
isolates them via cross-origin.
- next.config.ts: proxy CSP -> default-src * 'unsafe-inline' 'unsafe-eval' data: blob:; frame-ancestors 'self'
- CameraStream.tsx: add sandbox attribute to proxied (non-major-platform) iframes
* fix(incidents): add mapWebsocketPayload default to BaseIncidentPlugin
Default unwraps three WsClient-visible payload shapes:
- scheduler envelope { source, fetchedAt, items, totalCount } -> items
- GeoJSON FeatureCollection { features: [...] } -> normalised GeoEntity[]
- flat GeoEntity[] -> passthrough (with timestamp normalisation)
Resolves the silent-drop bug that left the earthquakes plugin showing an empty
layer when the scheduler's standard wrapping was used. Subclasses can still
override mapWebsocketPayload for domain-specific shapes (iranwarlive pattern
preserved by 2 override tests).
Test deltas:
- 2 it.fails tests flipped to passing (scheduler-wrap, GeoJSON unwrap).
- 2 'currently drops' companion tests deleted (bug is fixed, companions obsolete).
- 1 structural test updated: 'does NOT have mapWebsocketPayload' -> 'has mapWebsocketPayload defined'.
- Net: 12 tests -> 10 tests, all passing.
* test(ssrf): replace placeholder assertions with real tests for DNS pinning and size limits
The two expect(true).toBe(true) stubs in ssrf.spec.ts are replaced with
assertions that verify actual SSRF guard behavior:
- "enforces maxSize" — mocks undici.fetch to return an 11-byte body with a
10-byte limit; verifies response.text() rejects with "size exceeded"
- "does not follow redirects" — mocks dns.lookup + undici.fetch; verifies
redirect:manual is passed, fetch is called once, and the 301 is returned
without being followed; also asserts dispatcher is set (DNS pinning)
Uses vi.hoisted + vi.mock to patch dns/promises and undici at module level.
360/360 tests pass.
* fix(security): close Phase 3 audit blockers and unregistered flags
- WsClient.ts: guard subscribe() against sending frames while awaitingWelcome=true;
prevents pre-auth subscribe race when a second plugin subscribes mid-handshake
- connect/route.ts + callback/route.ts: set PKCE cookie path="/" to satisfy
RFC 6265bis __Host- prefix requirement (Chromium silently rejects __Host- + path!=/)
- pkce.spec.ts: update assertion to match corrected path="/"
- docs/plans/03-SECURITY.md: security audit report (13 closed, 1 fixed, 3 flags filed)
* fix(incidents): add mapWebsocketPayload default to BaseIncidentPlugin
Default unwraps three WsClient-visible payload shapes:
- scheduler envelope { source, fetchedAt, items, totalCount } -> items
- GeoJSON FeatureCollection { features: [...] } -> normalised GeoEntity[]
- flat GeoEntity[] -> passthrough (with timestamp normalisation)
Resolves the silent-drop bug that left the earthquakes plugin showing an empty
layer when the scheduler's standard wrapping was used. Subclasses can still
override mapWebsocketPayload for domain-specific shapes (iranwarlive pattern
preserved by 2 override tests).
Test deltas:
- 2 it.fails tests flipped to passing (scheduler-wrap, GeoJSON unwrap).
- 2 'currently drops' companion tests deleted (bug is fixed, companions obsolete).
- 1 structural test updated: 'does NOT have mapWebsocketPayload' -> 'has mapWebsocketPayload defined'.
- Net: 12 tests -> 10 tests, all passing.
* test(ssrf): replace placeholder assertions with real tests for DNS pinning and size limits
The two expect(true).toBe(true) stubs in ssrf.spec.ts are replaced with
assertions that verify actual SSRF guard behavior:
- "enforces maxSize" — mocks undici.fetch to return an 11-byte body with a
10-byte limit; verifies response.text() rejects with "size exceeded"
- "does not follow redirects" — mocks dns.lookup + undici.fetch; verifies
redirect:manual is passed, fetch is called once, and the 301 is returned
without being followed; also asserts dispatcher is set (DNS pinning)
Uses vi.hoisted + vi.mock to patch dns/promises and undici at module level.
360/360 tests pass.
12 tests across 4 describe blocks document the WsClient payload contract:
- 2 it.fails tests assert the DESIRED post-fix unwrap behaviour for the canonical
scheduler envelope { source, fetchedAt, items, totalCount } and GeoJSON
FeatureCollection { features: [...] } shapes — currently fail because
BaseIncidentPlugin has no mapWebsocketPayload.
- 2 companion 'currently drops' tests explicitly document the live silent-drop
behaviour so anyone reading the file understands the failure mode.
- 4 working-behaviour tests assert flat GeoEntity[] passthrough, timestamp
normalisation, and subclass override precedence — must stay green.
- 4 structural-contract tests document missing mapWebsocketPayload, required
lifecycle methods, polling interval, and layer config defaults.
The it.fails tests will flip to passing in the follow-up fix PR, at which point
the 2 'currently drops' companions are deleted and the 'does NOT have
mapWebsocketPayload' assertion is updated.
* docs: add ADR-003 document and update cloud-auth-architecture superseded notice
* chore: bump version for ADR-001 Workstream C
* fix: remove stray 'r' prefix on import in places/details route
rimport typo on line 1 of src/app/api/places/details/route.ts caused
TS1435 (unknown keyword), ESLint parse error, and a webpack build failure
in Docker CI. Corrected to a valid import statement.
* fix: add id-token write permission and fix invalid inputs in GC workflow
The claude-code-action@v1 uses OIDC for OAuth token auth, which requires
id-token: write in workflow permissions. Without it ACTIONS_ID_TOKEN_REQUEST_URL
is not set and the action fails after 3 retry attempts.
Also moves model and allowed_tools from unsupported top-level inputs into
claude_args where they are valid CLI flags for claude-code-action@v1.
* fix(gc): show agent output and explicit dry-run issue posting
- Add show_full_output: true so Claude responses appear in CI logs
- Replace vague dry-run instruction with explicit gh issue create/comment
commands so output has a concrete destination (tracking issue)
- Bake DRY_RUN value into prompt at workflow-expansion time to eliminate
ambiguity about env var reading
* docs: mark cloud-auth-architecture.md as superseded by ADR-003
* fix(docker): guard community seeder cd and add ENCRYPTION_MASTER_KEY default
- Wrap `cd $SEEDERS_DIR/community` in an existence check so the
data-engine container no longer crashes when local-seeders/community/
is an empty or uncloned nested git repo. The container was entering
Docker's exponential-backoff restart loop (2s→60s) on every boot.
- Add ENCRYPTION_MASTER_KEY to the wwv environment block with a
local-dev fallback, matching the AUTH_SECRET pattern. Without it the
Next.js instrumentation hook throws at startup and the app never
serves a request.
* fix(docker): auto-baseline P3005 when schema exists without migration history
Wraps prisma migrate deploy in the container entrypoint to detect P3005
(schema populated by pnpm dev / prisma db push before the Docker stack was
started). When detected, runs prisma migrate diff to confirm zero schema
drift, then marks each migration as applied via migrate resolve --applied
and retries deploy. Exits with a clear error if drift is found.
Also documents the auto-baseline behavior in database-migrations.md and
fixes duplicate section numbering in that file.
* fix: add id-token write permission and fix invalid inputs in GC workflow
The claude-code-action@v1 uses OIDC for OAuth token auth, which requires
id-token: write in workflow permissions. Without it ACTIONS_ID_TOKEN_REQUEST_URL
is not set and the action fails after 3 retry attempts.
Also moves model and allowed_tools from unsupported top-level inputs into
claude_args where they are valid CLI flags for claude-code-action@v1.
* fix(gc): show agent output and explicit dry-run issue posting
- Add show_full_output: true so Claude responses appear in CI logs
- Replace vague dry-run instruction with explicit gh issue create/comment
commands so output has a concrete destination (tracking issue)
- Bake DRY_RUN value into prompt at workflow-expansion time to eliminate
ambiguity about env var reading
* docs: mark cloud-auth-architecture.md as superseded by ADR-003
* fix(docker): guard community seeder cd and add ENCRYPTION_MASTER_KEY default
- Wrap `cd $SEEDERS_DIR/community` in an existence check so the
data-engine container no longer crashes when local-seeders/community/
is an empty or uncloned nested git repo. The container was entering
Docker's exponential-backoff restart loop (2s→60s) on every boot.
- Add ENCRYPTION_MASTER_KEY to the wwv environment block with a
local-dev fallback, matching the AUTH_SECRET pattern. Without it the
Next.js instrumentation hook throws at startup and the app never
serves a request.
The claude-code-action@v1 uses OIDC for OAuth token auth, which requires
id-token: write in workflow permissions. Without it ACTIONS_ID_TOKEN_REQUEST_URL
is not set and the action fails after 3 retry attempts.
Also moves model and allowed_tools from unsupported top-level inputs into
claude_args where they are valid CLI flags for claude-code-action@v1.
Adds a daily GitHub Actions cron that runs a zero-cost deterministic scan
(gc-scan.mjs) then hands findings to a Haiku subagent for triage:
- Tier A findings (stale TODOs, console.log, @ts-ignore, .mdc refs) → draft PRs
- Tier B findings (oversized files, orphaned rule refs, outdated deps) → Issues
- Max 3 PRs + 5 Issues per run, 150 LOC cap per PR, full idempotency via gc-bot label
- Defaults to dry-run mode for safe initial validation
auth is typed as NextMiddleware; mockResolvedValue(null) fails tsc.
Consistent with all other vi.mocked(auth) calls in the file.
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
* feat(auth): implement ADR-001 Workstream C — ticket auth, SSRF, and pre-flight audit
C1: Boot-time ENCRYPTION_MASTER_KEY / AUTH_SECRET validation (instrumentation.ts);
remove silent fallback in encryption.ts; guard marketplace token from data-plane misuse.
C2: SSRF host-allowlist (PROXY_HOST_ALLOWLIST) in ssrf.ts; route iframe proxy through safeFetch.
C3: ticketClient.ts — exchanges long-lived API key for 5-min EdDSA ticket from Marketplace;
audience fixed to ENGINE_AUDIENCE='wwv-data-engine'; cache keyed by engine not plugin.
C4: WsClient.ts first-message auth — sends {type:'auth',v:1,token} on open; queues subscribes
until {type:'welcome'}; gated by ticketAuthEnabledForPlugin.
C5: edition.ts — ticketAuthEnabledForPlugin reads NEXT_PUBLIC_WWV_TICKET_AUTH_PLUGINS flag.
Step 0: docs/deploys/2026-05-21-adr-001-preflight.md + docs/feature-flags.md audit artifacts.
Tests: ticketClient.spec, WsClient.spec, ssrf.spec updated (342 passing).
Co-Authored-By: Claude Opus 4.7 <[email protected]>
* fix(ci): resolve three PR #171 type-check and startup failures
- auth-contracts.spec.ts: assert WebSocketAuthMessage.token as PluginTicket
(not SensitiveString — distinct branded types fail toEqualTypeOf equality)
- pkce.spec.ts: replace function(){return this} mock with arrow fn to fix
TS2683 implicit-this error in strict mode
- test-local-dev.yml: add ENCRYPTION_MASTER_KEY so instrumentation.ts boot
validation doesn't crash the startup test in CI
Co-Authored-By: Claude Opus 4.7 <[email protected]>
* fix(ci): fix pkce mock constructor and env injection for startup test
- pkce.spec.ts: use function(this: object) instead of arrow fn so the
mock can be called with `new Configuration(...)` (arrow functions are
not constructors)
- test-local-dev.yml: sed-replace ENCRYPTION_MASTER_KEY in .env after
cp .env.example so Next.js instrumentation boot check passes in CI
Co-Authored-By: Claude Opus 4.7 <[email protected]>
* fix(ci): also sed-replace AUTH_SECRET in .env for startup test
.env.example has AUTH_SECRET= (empty), which Next.js loads and overrides
the system env var, causing the same boot crash as ENCRYPTION_MASTER_KEY.
Co-Authored-By: Claude Opus 4.7 <[email protected]>
* fix(setup): auto-generate ENCRYPTION_MASTER_KEY in setup.mjs
The Playwright CI workflow uses `pnpm run setup` which previously only
generated AUTH_SECRET. ENCRYPTION_MASTER_KEY remained empty from
.env.example, causing instrumentation.ts boot validation to crash.
This fix also improves the new-developer onboarding experience — both
required secrets are now generated in a single setup step.
Co-Authored-By: Claude Opus 4.7 <[email protected]>
* test(auth): add unit tests for ticket route, instrumentation boot gate, and edition flag
Covers GET /api/auth/ticket (4 cases), register() startup validation (4 cases),
and ticketAuthEnabledForPlugin() dormant-safety gate (4 cases). All 350 tests pass.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
---------
Co-authored-by: Claude Opus 4.7 <[email protected]>
* feat(auth): implement ADR-001 Workstream C — ticket auth, SSRF, and pre-flight audit
C1: Boot-time ENCRYPTION_MASTER_KEY / AUTH_SECRET validation (instrumentation.ts);
remove silent fallback in encryption.ts; guard marketplace token from data-plane misuse.
C2: SSRF host-allowlist (PROXY_HOST_ALLOWLIST) in ssrf.ts; route iframe proxy through safeFetch.
C3: ticketClient.ts — exchanges long-lived API key for 5-min EdDSA ticket from Marketplace;
audience fixed to ENGINE_AUDIENCE='wwv-data-engine'; cache keyed by engine not plugin.
C4: WsClient.ts first-message auth — sends {type:'auth',v:1,token} on open; queues subscribes
until {type:'welcome'}; gated by ticketAuthEnabledForPlugin.
C5: edition.ts — ticketAuthEnabledForPlugin reads NEXT_PUBLIC_WWV_TICKET_AUTH_PLUGINS flag.
Step 0: docs/deploys/2026-05-21-adr-001-preflight.md + docs/feature-flags.md audit artifacts.
Tests: ticketClient.spec, WsClient.spec, ssrf.spec updated (342 passing).
Co-Authored-By: Claude Opus 4.7 <[email protected]>
* fix(ci): resolve three PR #171 type-check and startup failures
- auth-contracts.spec.ts: assert WebSocketAuthMessage.token as PluginTicket
(not SensitiveString — distinct branded types fail toEqualTypeOf equality)
- pkce.spec.ts: replace function(){return this} mock with arrow fn to fix
TS2683 implicit-this error in strict mode
- test-local-dev.yml: add ENCRYPTION_MASTER_KEY so instrumentation.ts boot
validation doesn't crash the startup test in CI
Co-Authored-By: Claude Opus 4.7 <[email protected]>
* fix(ci): fix pkce mock constructor and env injection for startup test
- pkce.spec.ts: use function(this: object) instead of arrow fn so the
mock can be called with `new Configuration(...)` (arrow functions are
not constructors)
- test-local-dev.yml: sed-replace ENCRYPTION_MASTER_KEY in .env after
cp .env.example so Next.js instrumentation boot check passes in CI
Co-Authored-By: Claude Opus 4.7 <[email protected]>
* fix(ci): also sed-replace AUTH_SECRET in .env for startup test
.env.example has AUTH_SECRET= (empty), which Next.js loads and overrides
the system env var, causing the same boot crash as ENCRYPTION_MASTER_KEY.
Co-Authored-By: Claude Opus 4.7 <[email protected]>
* fix(setup): auto-generate ENCRYPTION_MASTER_KEY in setup.mjs
The Playwright CI workflow uses `pnpm run setup` which previously only
generated AUTH_SECRET. ENCRYPTION_MASTER_KEY remained empty from
.env.example, causing instrumentation.ts boot validation to crash.
This fix also improves the new-developer onboarding experience — both
required secrets are now generated in a single setup step.
Co-Authored-By: Claude Opus 4.7 <[email protected]>
---------
Co-authored-by: Claude Opus 4.7 <[email protected]>
- Remove .agents/context/ from git index (already in .gitignore, files kept locally)
- Correct local-plugins/ from "sandbox" to canonical community plugin repo clone (silvertakana/wwv-plugins)
- Correct local-seeders/community/ and local-seeders/private/ as independent git clones with own remotes
- Remove deprecated worldwideview-plugins repo references; rename wwv-seeders-community → wwv-seeders throughout
- Add nested-git-clone invariant to AGENTS.md, ecosystem-repositories.md, directory-structure.md, monorepo-workflow.md, plugin-architecture.md, data-engine-architecture.md, migrate-legacy-plugin skill
Co-Authored-By: Claude Opus 4.7 <[email protected]>
* fix(ws): exponential backoff + jitter on WsClient reconnect
Replaces the fixed 5-second reconnect delay with an exponential backoff
(5s→10s→20s→40s→60s cap, +4s random jitter) so simultaneous browser
sessions don't thunder-herd the engine on restart.
- Backoff resets only after a stable 5-second connection, not on every
successful open, so rapid reconnect cycles don't mask the retry.
- Stale-timer bookkeeping added to the cleanup/unsubscribe path.
Also bundles two companion fixes discovered during the same session:
fix(scripts): BOM-safe JSON parsing in sync/watch-local-plugins (Fix)
PowerShell 5.1 emits a UTF-8 BOM that Node's JSON.parse rejects;
readJsonFile() strips U+FEFF before parsing, matching pnpm behavior.
docs(agents): add UTF-8 BOM troubleshooting entry (Fix)
Documents diagnosis, fix, and prevention for the BOM crash.
Co-Authored-By: Claude Opus 4.7 <[email protected]>
* test(ws): pin Math.random to 0 so reconnect backoff test is deterministic
With jitter (Math.random()*4000), advancing timers by exactly 5000ms no
longer guaranteed to trigger the reconnect. Mocking Math.random to 0 in
beforeEach makes the delay deterministic (base only, no jitter) across
the full test suite.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
---------
Co-authored-by: Claude Opus 4.7 <[email protected]>
* refactor(marketplace): drive auto-seeding from signed verified registry
Retires the hard-coded DEFAULT_PLUGIN_IDS list and makes the signed
verified registry the single source of truth for what lands in a fresh
install. Publishing a plugin to the verified registry now auto-seeds
it; no code change required to add new defaults.
Also fixes the diagnosed plugins-404: fortiguard and nz-traffic-cameras
were in the static list but not published to npm, causing every fresh
boot to hit manifest 404s. Those entries are gone with the list.
- Delete src/lib/marketplace/defaultPlugins.ts (legacy static list).
- Seeder iterates getVerifiedPluginIds() from registryClient.
- Skip markSeeded when the verified set is empty so a registry outage
doesn't lock fresh installs into zero plugins; the next request
retries (5-min cache in registryClient bounds the request rate).
- Stamp every seeded plugin as trust=verified by definition.
- Tests rewritten against a fake verified set; new test asserts
empty-registry deferral.
- Sync marketplace-architecture rule + migrate-legacy-plugin skill
with the new model.
- Patch bump: 2.15.15 -> 2.15.16.
* fix(engine): resolve plugin 404s and local engine routing (#fix/diagnose-plugins-404)
- fix: engineManifest + resolveEngineUrl: port 5001→5000 to match docker-compose
binding; removed NEXT_PUBLIC_WWV_PLUGIN_DATA_ENGINE_URL from local engine
detection — it was poisoning local routing with the production engine URL (Patch)
- fix: WsClient: added normalizePluginId() converting underscore IDs to kebab-case
so engine WebSocket messages route to the correct frontend plugin (Patch)
- fix: docker-compose: added ./local-seeders:/app/seeders volume mount to
wwv-data-engine so locally-developed seeders are visible to the engine (Patch)
- feat: sync-local-plugins: added wwvHostRedirectPlugin — Vite plugin that
intercepts @/ host-app imports in local plugin builds and redirects them to
runtime host globals, preventing full app tree from being bundled into plugins (Minor)
- docs: plugin-architecture.md: added Plugin Data Delivery Types section (REST-only,
WS-only, hybrid), peerDependencies rule, .tsx extension rule, mapWebsocketPayload
signature contract (Patch)
- docs: data-engine-architecture.md: added §7 WebSocket Payload Format Contract
documenting WsClient's three payload handling cases and the silent-drop footgun
for plugins that send object payloads without mapWebsocketPayload (Patch)
- docs: worldwideview-plugin-creation SKILL.md: fixed ISS example which was missing
mapWebsocketPayload and would have silently dropped all WS data; clarified
mapWebsocketPayload requirement for non-array payloads; fixed architecture
decision tree (Patch)
- docs: cesium-rendering.md: added Sizing Conventions table with defaults/ranges
for point/billboard/model, cross-plugin parity rules, and silent-ignore footgun
warning for size on billboard entities (Patch)
- docs: added ADR-0002 documenting seeder exported name as canonical plugin ID (Patch)
Version bumps: fix × 3 (Patch), feat × 1 (Minor) → 2.15.16 → 2.16.0
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
* test(engine): update resolveEngineUrl test assertion from port 5001 to 5000
Follows the port correction in engineManifest.ts and resolveEngineUrl.ts.
The test was asserting the old default (5001) instead of the corrected
local engine port (5000), causing the Unit Tests CI check to fail.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
---------
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
* fix: disable Firefox MSAA/AT-SPI accessibility on CI to prevent hangs
Adds `accessibility.force_disabled: 1` to Firefox's user prefs in the
Playwright config. On Linux CI (GitHub Actions / ubuntu-latest) Firefox
attempts to connect to the AT-SPI accessibility bus, which causes the
browser to hang for ~20 minutes before timing out. Disabling the
accessibility layer at the browser level eliminates the hang without
affecting test coverage.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
* fix: set NO_AT_BRIDGE=1 for firefox in CI to prevent AT-SPI hang
The firefoxUserPrefs approach alone is insufficient — Firefox on Linux
loads the AT-SPI accessibility bridge at the GTK level before user prefs
apply. Setting NO_AT_BRIDGE=1 cuts the connection at the OS/GTK layer,
which is what actually prevents the ~20 min hang on ubuntu-latest runners.
Scoped to the firefox matrix leg only; chromium and webkit are unaffected.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
* fix: add 20s safety boot fallback for environments where globe never initialises
On headless Linux CI (ubuntu-latest), Firefox uses Mesa software rendering
which can prevent CesiumJS from mounting its WebGL context. When that
happens, the `globeReady` DataBus event never fires, `startBoot()` is
never called, and `data-testid="app-ready"` never appears — causing every
Playwright test to time out at 45 s.
The fix guards `boot.startBoot()` behind a `bootStarted` flag so only the
first caller wins, then adds a 20 s `setTimeout` safety fallback in
AppShell. Normal flow (globe loads) fires the boot immediately via
`globeReady`; the safety timer is cleared. Degraded flow (WebGL absent)
still reaches the `app-ready` state after ~23.5 s (20 s + 3.5 s
animation), well within the 45 s test timeout.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
---------
Co-authored-by: Claude Sonnet 4.6 <[email protected]>