Skip to content

fix(world): reset sessions and release retired GPU resources - #35

Merged
MelaBuilt-AI merged 2 commits into
mainfrom
fix/reset-session-agent-release
Oct 6, 2026
Merged

MelaBuilt-AI merged 2 commits into
mainfrom
fix/reset-session-agent-release

Conversation

@MelaBuilt-AI

@MelaBuilt-AI MelaBuilt-AI commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Fix Escape → Reset Session leaving all four agent choices disabled: the previous callback only cleared browser presentation while the backend roster remained active and full.
  • Add serialized, retryable constellation reset: end only World-owned roster sessions, retain operator-persistent identities, then persist a fresh empty World identity. Duplicate reset requests replay their result without ending a replacement roster.
  • Release single World-owned attachments too; await authoritative success before clearing roster/avatar/target/movement state and returning to agent selection.
  • Preserve saved discovery registrations, identity/avatar data and native history; update reset confirmation text and show pending/failure feedback.

Diagnosis

Read-only inspection of the retained TEST45492 after the reported reset showed an active constellation at revision 8, four connected agents, entryReady true and no terminal outcomes. The UI's rosterFull guard therefore correctly disabled choices against stale occupied state. Calling the existing end operation alone was insufficient because it leaves a terminal roster with no new-world rollover.

Verification

  • Focused RED → GREEN for missing reset route/client/menu wiring.
  • 60 focused tests across seven files passed.
  • Full pnpm check:core: 1,620 tests / 286 files PASS, formatting/lint/TypeScript/architecture/build/startup+API smoke PASS.
  • Imported-avatar input and compatibility checks PASS.
  • Callback tests execute the actual component callback with closure ports, not browser journeys or real React scheduling. API tests use the actual server/service with disposable persisted state and lifecycle fixtures; native-harness/manual acceptance is still pending.
  • Existing Three CommonJS and bundle-size warnings remain non-fatal. An initial fixture status-code mismatch and a formatting failure were corrected before the green gate.
  • Exact-head GitHub CI pending at creation; draft until hands-on acceptance. No automated product-navigation journeys run.

Operator acceptance — pending

  • Four-agent Clone test → reset → same four agents can start a new multi-agent World.
  • Reset → any discovered single agent can start a new World.
  • Single-agent reset → different single agent or multi-agent setup works.
  • Discovery registrations/identity/avatar choices remain; teardown failure stays visible and retryable.

TEST45492 remains untouched/running on merged main. No test-lane switch, merge, release, provider change or original AgentIntersect modification is included.

Prior performance observation

Aaron reports the four-agent Clone test sat for at least one hour with all graphics enabled and reported GPU RAM never exceeding 5.9. Provisional memory-stability acceptance for that scenario; not complete leak-elimination or FPS evidence. Residual effects-on slowdown/city-view pause remains separate.

Details: docs/internal/SESSION_RESET_FIX.md.

October 6: GPU lifecycle follow-up (same PR, authorized by Aaron)

  • Functional reset accepted by Aaron after repeated sessions, different repos, multi-to-single and real Claude coding.
  • Fix the proven Fiber9/WebGPU teardown mismatch: canvas cleanup now explicitly reaches renderer disposal once.
  • Release clone-owned avatar skeleton textures, and release cached source geometry/material/texture resources only after the last avatar/preview/city consumer leaves. Keep CPU model data reusable; preserve active shared resources and Strict Mode replay.
  • Node24.18.0 check:core PASS: 1,624 tests / 289 files, format/lint/types/architecture/build/startup smoke. Four new lifecycle regressions pass, including real React/Fiber component and canvas teardown with GPU/loader fixtures. Static avatar gates pass.
  • Physical VRAM stabilization is NOT established by fixture tests. Retained TEST45493 remains on064f7f8, unchanged and running; controlled manual reset/repo/avatar transition retest pending. No automated product journey, merge or release.
  • Diagnosis, evidence boundaries and retest sequence: docs/internal/GPU_SESSION_LIFECYCLE_FIX.md.

@MelaBuilt-AI

Copy link
Copy Markdown
Owner Author

Exact-head verification complete for 064f7f8: push run 37482318860 and draft PR run 37482610890 both SUCCESS. Local check:core passed 1,620 tests / 286 files plus format/lint/types/architecture/build/API smoke; static asset checks passed. Draft merge gate is not applicable, not a merge approval. Manual reset/reselection acceptance remains pending; TEST45492 was left unchanged.

@MelaBuilt-AI MelaBuilt-AI changed the title fix(world): release agents and renew roster on session reset fix(world): reset sessions and release retired GPU resources Oct 6, 2026
@MelaBuilt-AI

Copy link
Copy Markdown
Owner Author

GPU-lifecycle follow-up exact-head verification: 4eaae65. Push37497292002 and PR37497298301 both SUCCESS. Local check:core passed1,624tests/289files, normal build/startup API smoke and asset gates; four focused new lifecycle tests PASS. Actual Fiber teardown and React component ownership are exercised with GPU/loader fixtures, not physical VRAM proof. Aaron already passed functional reset on064f7f8. The retained TEST45493 remains healthy, byte-unchanged and running on064f7f8. Controlled hands-on session/repo/avatar transition retest remains pending; draft/unmerged, no release.

@MelaBuilt-AI

Copy link
Copy Markdown
Owner Author

Manual acceptance recorded for GPU lifecycle correction at 4eaae65 (2026-10-06). Aaron reports normal post-reset visuals and exercised session resets, changed avatars/agents, Clone test then Claude new session test repository, Codex coding, spatial screens and commit. Whole-adapter acknowledgement samples: 3372, 3551, 3553, 3373 MiB; reported displayed usage did not exceed 3.7 (display unit unspecified). These support acceptance for the exercised workload, not universal leak elimination or continuously captured peak proof. Reset functional acceptance remains PASS. Aaron explicitly authorizes merge once green (Discord 1557119806040445110). Require fresh non-draft exact-head merge-gate, then independently verify merged-main CI. Preserve live TEST45494 and saved state; no release/publication authorized.

@MelaBuilt-AI
MelaBuilt-AI marked this pull request as ready for review October 6, 2026 19:58
@MelaBuilt-AI
MelaBuilt-AI merged commit 3c4b358 into main Oct 6, 2026
15 checks passed
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