Skip to content

refactor(runtime): isolate SPX interpreted run sessions - #1754

Merged
joeykchen merged 1 commit into
goplus:devfrom
joeykchen:refactor/spx-run-session-roots
Aug 21, 2026
Merged

refactor(runtime): isolate SPX interpreted run sessions#1754
joeykchen merged 1 commit into
goplus:devfrom
joeykchen:refactor/spx-run-session-roots

Conversation

@joeykchen

@joeykchen joeykchen commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Extracts the driver-independent interpreted runtime foundation from #1753.

  • Give spx run explicit project, asset, and disposable session roots without changing the parent process working directory.
  • Prepare a session-local GDExtension scaffold and pass one canonical root environment to the Engine child.
  • Make ispxnative pin the project filesystem for deferred resource loads while retaining bounded legacy asset compatibility.
  • Configure Engine filesystem roots before interpreter initialization and publish a new resource schema only after a successful build.

This PR contains no Project Driver declaration, driverprotocol import, XGo dispatch code, runtime bundle/payload code, or driver terminology.

Behavior covered

  • spx run --path <project> keeps the caller working directory unchanged.
  • The Engine runs from <project>/.temp and receives explicit SPX_PROJECT_DIR, SPX_ASSET_DIR, and SPX_SESSION_DIR.
  • Ambient Engine --path values are replaced by the isolated session root.
  • Existing shared external-asset compatibility remains available only through the legacy SPX command path.
  • Project filesystem handles remain valid for deferred Engine resource reads.

Verification

go test ./...
go test -race ./cmd/ispxnative ./cmd/spx/internal/command ./internal/engine ./internal/interpruntime ./internal/scaffold ./pkg/ispx
go test -tags=packmode ./internal/engine ./pkg/ispx
(cd cmd/ispx && go test ./...)
go vet ./cmd/ispxnative ./cmd/spx/internal/command ./internal/engine ./internal/interpruntime ./internal/scaffold ./pkg/ispx
python3 .github/scripts/runtime_lock_snapshot.py check
python3 .github/scripts/runtime_lock_snapshot.py verify-godot
python3 .github/scripts/release_bump_test.py
python3 .github/scripts/runtime_build_contract_test.py
GODOT_SRC=/Users/mac/qiniu/godot make doctor

A real tutorial/05-Animation smoke test also verified spx run and spx runnative session startup and clean child-process termination.

Relationship to #1753

This PR is independent of goplus/mod#165 and goplus/xgo#2849. Keep #1753 unchanged while this PR is reviewed. After merge, #1753 can rebase onto the updated dev branch and drop this shared layer from its diff.

Release metadata

This source change declares SPX v3.2.4 with Engine Runtime 2.4.4; runtime ABI remains 2. The immutable 2.4.4 lock snapshot is included. Since runtime-v2.4.4 is not published, CI resolves it as missing and validates the runtime from source. No release workflow was dispatched and nothing was published.

@joeykchen
joeykchen force-pushed the refactor/spx-run-session-roots branch from b4b3d6e to 16124de Compare August 21, 2026 04:00
@joeykchen
joeykchen marked this pull request as ready for review August 21, 2026 04:04
@joeykchen
joeykchen merged commit c6e8140 into goplus:dev Aug 21, 2026
9 checks passed

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the complete fixed diff for the session-root isolation, Engine filesystem-root handling, native interpreter setup, scaffold generation, and release metadata contracts. I did not find a concrete correctness, compatibility, security, or reliability regression introduced by this PR.

Verification completed:

  • go test ./...
  • go test -tags=packmode ./...
  • go test -race ./cmd/ispxnative ./cmd/spx/internal/command ./internal/engine ./internal/interpruntime ./internal/scaffold ./pkg/ispx
  • go vet ./cmd/ispxnative ./cmd/spx/internal/command ./internal/engine ./internal/interpruntime ./internal/scaffold ./pkg/ispx
  • Runtime lock, Godot ancestry, release bump, and runtime build-contract checks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant