Skip to content

[Architecture] Define the worldgen provider concurrency contract before enabling parallel provider execution #24

@ogyrec-o

Description

@ogyrec-o

Problem / Motivation

The current v1 behavior is intentionally conservative and correct:
each hosted worldgen provider session executes through a serial execution domain.

That is the right first step for off-main-thread worldgen, but it is not yet a
contract for safe parallel provider execution. Before Freven runs multiple
columns concurrently for the same provider/session, it needs explicit answers
for:

  • reentrancy expectations
  • mutable session coupling
  • determinism across worker counts / CPU counts
  • provider fault boundaries
  • cancellation / stale completion semantics under wider concurrency

Send + Sync alone is not enough to define gameplay/runtime correctness.

Target direction

Design and document an explicit concurrency contract for worldgen providers.

Possible acceptable directions:

  1. stateless provider / factory-per-job model
  2. explicit parallel-safe capability with documented guarantees

The result must say clearly:

  • what concurrency modes exist
  • what determinism guarantees exist
  • what the host is allowed to schedule in parallel
  • how faults / stale completions / shutdown interact with the model

Non-goals

  • do not silently enable parallel execution just because it benchmarks faster
  • do not treat the current serial lane as a temporary hack to bypass
    architecture work
  • do not widen guest threading generally

Done when

  • provider concurrency modes are explicit
  • determinism expectations are documented and testable
  • future parallel worldgen work has a real contract to build on

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:guest-runtimeRuntime-loaded guest execution model, host/runtime behavior, guest session semantics.area:runtimeRuntime behavior, lifecycle, ticking, session behavior, execution flow.area:world-loadingWorld/instance loading, chunk/world bootstrap, load/unload behavior.component:enginefreven-engine: core engine/runtime/simulation/client-server internals.component:sdkPublic SDK / author-facing crates, examples, ergonomics, contracts exposed to modders.priority:p2Normal priority. Planned work, worthwhile but not urgent.status:confirmedConfirmed bug/request. Reproduced, accepted, or clearly valid.transport:cross-transportShared semantic work that must align across builtin/wasm/native/external.type:architectureLong-term structural / contract / system design work, not just isolated implementation.

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions