Skip to content

Wire gosub_config settings into the engine. Tracking what's wired, what's reachable, and what's blocked #1079

Description

@jaytaph

The engine holds a gosub_config settings store (Config), threaded through
EngineContext → ZoneContext → BrowsingContext and reachable via
HasConfig::config(). The schema lives in two files:

  • crates/gosub_engine/src/engine/settings.json — engine settings
  • crates/gosub_engine/src/engine/useragent-settings.json — client/UA settings,
    merged under the useragent.* namespace

Right now most settings exist in the store with sensible defaults but are not
read
by any engine code — the engine still uses hardcoded constants or the
separate (and currently unused) EngineSettings struct.

This issue tracks moving each setting from "sits in the store" to "actually drives
behaviour", and documents the ones that can't be wired yet and why.

Status legend

  • Wired — engine reads the value from the store and acts on it.
  • 🟡 Reachable — behaviour exists (hardcoded) and the call site can already
    see a Config; wiring is a localized read swap.
  • Blocked — needs structural work before it can be wired (see reasons below).

Why some settings are blocked

The store is only reachable where a Config handle has been threaded. Common
blockers:

  • Cross-crate constants — values baked into gosub_net, gosub_renderer_*,
    or gosub_render_pipeline as module consts; those crates don't receive a
    Config. They need the value passed in at construction (as done for
    FetcherConfig), or a Config handle plumbed through.
  • Process globals — e.g. device-pixel-ratio is a global atomic in
    gosub_interface; needs an owner that sets it from config at startup.
  • Construction order — e.g. channel capacities are needed to build the
    EngineContext that holds the config (chicken-and-egg).
  • Example-only behaviour — some values (e.g. scroll tuning) live in the
    example apps, not engine core.

Notes

  • EngineSettings (the Arc<EngineSettings> on EngineContext) is entirely
    unused today. 0 of its fields are read. Much of the schema duplicates it; we
    should decide whether EngineSettings converges into gosub_config or is removed.
  • Inconsistencies to reconcile while wiring: hardcoded MAX_REDIRECTS = 20 vs
    redirect_policy = Follow(10); two different default User-Agent strings; Vello
    hardcodes AaConfig::Msaa16, ignoring the MSAA setting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions