Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: retain stamped Eidoverse dismount geometry (#9821)

Adam Eivy6ba68ac40286
diff --git a/server/lib/eidoverseSceneInspection.js b/server/lib/eidoverseSceneInspection.js
index 57814a93f4..f01d01ebdb 100644
--- a/server/lib/eidoverseSceneInspection.js
+++ b/server/lib/eidoverseSceneInspection.js
@@ -31,7 +31,7 @@ const record = (value) => value !== null && typeof value === 'object' && !Array.
const validVector = (value) => vector.safeParse(value).success;
/** Only library model references and content-addressed store models, never URLs. */
-export function eidoverseSceneAsset(value) {
+function eidoverseSceneAsset(value) {
if (typeof value !== 'string') return null;
const path = value.replaceAll('\\', '/');
if (path.length > 192 || path.split('/').some((part) => !part || part === '.' || part === '..')) return null;
@@ -113,7 +113,11 @@ export function updateEidoverseSceneView(view, entry) {
if (entity) {
entity.unsupported = true;
if (entry.verb === 'mount') entity.parentId = args.to;
- if (entry.verb === 'dismount') { entity.parentId = null; entity.pos = null; }
+ if (entry.verb === 'dismount') {
+ entity.parentId = null;
+ entity.pos = validVector(args.pos) ? args.pos : null;
+ if (args.yaw !== undefined) entity.yaw = args.yaw;
+ }
}
break;
case 'epoch': case 'behavior': case 'bstate': case 'force': case 'punt':
diff --git a/server/services/eidoverseWorld.runtime.test.js b/server/services/eidoverseWorld.runtime.test.js
index 1bbe3ec24c..754a94d4d6 100644
--- a/server/services/eidoverseWorld.runtime.test.js
+++ b/server/services/eidoverseWorld.runtime.test.js
@@ -1402,6 +1402,16 @@ describe('bounded scene inspection through semantic dispatch', () => {
expect(tool).toMatchObject({ granted: true, output_schema: { properties: { complete: { type: 'boolean' } } } });
});
+ it('returns a detached object at its stamped absolute pose after a live mount/dismount', async () => {
+ await seed({ parent: model([20, 0, 0]), child: model() });
+ emit('mount', { id: 'child', to: 'parent', offset: [1, 0, 0] });
+ expect(await inspect()).toMatchObject({ invalidEntities: 1, complete: false, entities: [] });
+ emit('dismount', { id: 'child', pos: [2, 0, 0], yaw: 1 });
+ const detached = await inspect();
+ expect(detached).toMatchObject({ invalidEntities: 0, complete: true, boundsComplete: false });
+ expect(detached.entities).toEqual([expect.objectContaining({ id: 'child', pos: [2, 0, 0], yaw: 1, boundsState: 'unknown' })]);
+ });
+
it('bounds dense results without exporting components, chat, tickets, credentials or arbitrary paths', async () => {
const entities = Object.fromEntries(Array.from({ length: 30 }, (_, n) => [`model-${n}`, model([0, 0, 0], {
actor: 'synthetic-private-person', comp: { portos: { managedBy: 'portos', ticket: 'synthetic-private-ticket', token: 'Bearer synthetic-secret' },
@@ -1496,4 +1506,20 @@ describe('bounded scene inspection through semantic dispatch', () => {
}));
expect(await inspect()).toMatchObject({ entities: [], unknownBounds: 1, boundsComplete: false });
});
+
+ it('returns unknown geometry when the shared deadline aborts, without a production sleep', async () => {
+ await seed({ existing: model() });
+ const controller = new AbortController();
+ const timeout = vi.spyOn(AbortSignal, 'timeout').mockImplementation((ms) => {
+ expect(ms).toBe(2000);
+ queueMicrotask(() => controller.abort());
+ return controller.signal;
+ });
+ vi.stubGlobal('fetch', vi.fn((_input, { signal }) => new Promise((_resolve, reject) => {
+ signal.addEventListener('abort', () => reject(new Error('synthetic deadline')), { once: true });
+ })));
+ try {
+ expect(await inspect()).toMatchObject({ availability: 'current', complete: true, boundsComplete: false, unknownBounds: 1 });
+ } finally { timeout.mockRestore(); }
+ });
});