ReviewOS

stacks/stx

[S3-015] Add a maintained native RenderSurface primitive

#2108
Open chris opened this 8 days ago ·
8 days ago

S3-015: Add a maintained native RenderSurface primitive

Parent and ownership

Parent epic: https://github.com/stacksjs/the-settlers-iii-remake/issues/6 Source owner: stacksjs/stx. Master roadmap: https://github.com/stacksjs/the-settlers-iii-remake/issues/4.

Problem and observable result

Compile and mount through the shared native contract. Preserve stable node and resource identities. Report unsupported hosts explicitly.

The current application is a browser prototype. Passing the Riverlands campaign does not establish original-game or native parity. This issue is complete only when its stated behavior has retained evidence.

Evidence and interfaces

Craft owns graphics, native hosting, and platform capabilities. stx owns compilation/reactivity. ts-css owns style semantics. Stacks owns build and release orchestration. The game consumes published contracts.

Pin the inspected revisions and fixture hashes in the implementation evidence. Original-game observations govern rules and timing. JSettlers is implementation evidence, not an authoritative balance specification. Unknown values remain explicitly unverified.

Acceptance criteria

  • Compile and mount through the shared native contract.
  • Preserve stable node and resource identities.
  • Report unsupported hosts explicitly.
  • The visible result agrees with the underlying simulation or platform state, including failure paths.
  • Tests exercise the maintained public interface and retain reproducible fixtures or execution receipts.

Test matrix

  • Mount and update a real native surface.
  • Verify teardown and unavailable-host behavior.
  • Exercise invalid input, cancellation or interruption, and repeated execution where this interface permits them.
  • Verify determinism/conservation for simulation changes and resource ownership/disposal for platform changes.
  • Run owning-repository lint, relevant type checks and tests. Capture actual native output for native capability claims.

Scope constraints

Implement this behavior as a complete verifiable slice. Do not silently expand into adjacent tickets or substitute simplified gameplay. Keep the shared TypeScript simulation, shared stx signals, and ts-css conventions. Native gameplay and HUD must not depend on a WebView. HomeOS reuse must not introduce a kernel dependency into the game. Existing unrelated edits and authored guidance must be preserved.

Blocked by

Upstream release and adoption

Fix and test the owning source repository, run its existing bun run release:patch when it is a Bun package repository, verify published artifacts, then install into Stacks and release Stacks when affected. Update the game from verified published packages. HomeOS uses its own build/source provenance.

No node_modules edits, copied runtimes, generated-source string patches, fabricated globals, successful no-op implementations, or skipped release gates. Push tested conventional commits as Chris to the owning origin/main without coauthor trailers or force pushes.

Completion evidence

  • Implementation commits and relevant upstream issue links.
  • Exact checks and results, fixture hashes, and screenshots/native execution evidence where applicable.
  • Published package versions, downstream lockfile identity, and release receipts when affected.
  • Remaining limitations stated explicitly. Partial work does not close this issue.
8 days ago

Dependency audit: rechecked Craft main at 44fac13. Its new Zig Metal surface has macOS presentation evidence, but the iOS/Android/TypeScript packages still expose no shared native RenderSurface node/JS contract to compile or mount. Craft #409 was closed as an accidental duplicate, not implemented: craft-native/craft#395 is the canonical open blocker, with #392/#393/#394 upstream. Craft source is intentionally left to its assigned agent.

STX #2108 remains open and blocked on that contract. No RenderSurface primitive, fake host globals or successful no-op implementation was added. Mount/update/resource identity/interruption/teardown, unavailable-host reporting and visible native output remain unverified. Once Craft supplies its actual public surface contract, STX can implement the primitive and capability checks against it.

Adjacent STX progress is not surface completion: 2c76a92 / 35836c2 preserve transparent keyed native template fragments and control identity, and ef95fa0 adds the maintained HUD/device fixture for #2109. Pinned evidence and explicit limits. These changes are unreleased after STX v0.2.665.

Sign in to comment on this issue.