Skip to content

[P3] No Web export preset or CI coverage for the localStorage/JavaScriptBridge persistence path #316

Description

@itsmiso-ai

Problem: The web persistence path (localStorage via JavaScriptBridge in game_state.gd) is advertised as a supported runtime (README: "save/load through an autoload (user:// on desktop, localStorage on web)"; docs/DESIGN.md documents the web behavior), and the recent XSS fix (#306/#291) touched exactly this code — yet there is no Web export preset in export_presets.cfg, no web export-validation job in test.yml/release.yml, and the only web-related test (tests/test_local_storage_xss.gd) asserts JSON.stringify() escaping in isolation rather than exercising the actual eval'd statements. Regressions in the eval'd JavaScript (like #291's unsanitized key) or in web-only load/save behavior can therefore ship undetected — the CI matrix validates Linux/Windows/macOS exports only.

Evidence:

  • export_presets.cfg — presets are Linux/X11, Windows Desktop, macOS only; no Web preset
  • README.md / docs/DESIGN.md — document localStorage-on-web as a supported persistence path
  • scripts/game_state.gd:28-39,447-448 — live JavaScriptBridge.eval(...) calls behind OS.has_feature("web")
  • tests/test_local_storage_xss.gd — tests JSON string escaping only; never builds/evaluates the JS
  • .github/workflows/test.yml export-validation jobs: Linux, Windows, macOS only; release.yml uploads no web artifact

Acceptance:

  • Add a Web export preset to export_presets.cfg and an export-validation-web CI job (headless export + artifact presence check, mirroring the existing platform jobs), or explicitly feature-gate/drop the web persistence code and update README/DESIGN
  • Optionally extend the XSS test to build and assert the exact eval'd statement strings produced by _local_storage_write/_local_storage_read/clear_game

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/foreman-coderForeman coding loop worker.auditAudit, review, or investigation work.priority/p3Low priority.status/doneWork is complete.type/choreChore or maintenance.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions