Skip to content

Commit 526dbdf

Browse files
author
DavidQ
committed
Remove Asteroids vector map editor runtime dependency and use object geometry as SSoT - PR_26133_028-remove-vector-map-editor-runtime-dependency
1 parent a38b85f commit 526dbdf

11 files changed

Lines changed: 183 additions & 320 deletions

docs/dev/reports/playwright_v8_coverage_report.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# PR_26133_027 Playwright V8 Coverage Report
1+
# PR_26133_028 Playwright V8 Coverage Report
22

3-
Task: PR_26133_027-object-id-ssot-manifest-schema-cleanup
3+
Task: PR_26133_028-remove-vector-map-editor-runtime-dependency
44
Date: 2026-05-13
55

66
## Result
@@ -23,19 +23,18 @@ PASS - Coverage reporting was generated during `npm run test:workspace-v2`.
2323

2424
## Changed Runtime JS Coverage
2525

26-
- `tools/object-vector-studio-v2/js/ToolStarterApp.js`: 94% function coverage, 4190/4190 reported lines executed, 452/483 reported functions executed.
27-
- `tools/object-vector-studio-v2/js/services/ObjectVectorStudioV2SchemaService.js`: 95% function coverage, 411/411 reported lines executed, 53/56 reported functions executed.
28-
- `src/engine/rendering/ObjectVectorRuntimeAssetService.js`: 98% function coverage, 916/916 reported lines executed, 106/108 reported functions executed.
26+
- `tools/shared/asteroidsPlatformDemo.js`: not collected by Playwright V8 coverage; covered by focused node probe.
27+
- `tools/shared/vectorAssetSystem.js`: not collected by Playwright V8 coverage; covered by focused node probe.
28+
- Object Vector Studio V2 runtime/editor modules from the prior object-ID path remain covered by the Workspace V2 run.
2929

3030
## PR-Specific Coverage/Validation Relevance
3131

32-
The workspace-v2 run exercises the Object Vector Studio V2 editor and Asteroids runtime paths changed in this PR:
32+
The workspace-v2 run exercises the Object Vector Studio V2 editor and Asteroids runtime paths affected by this PR:
3333

34-
- Object Vector Studio V2 schema rejection for duplicate runtime identity aliases.
35-
- Object Vector Studio V2 assetLibrary hydration through `object.*` IDs.
36-
- Asset library inheritance and runtime preview resolution through object IDs.
34+
- Asteroids workspace hydration without `vector-map-editor`.
35+
- Object Vector Studio V2 loading/editing of Asteroids objects through `object-vector-studio-v2.objects`.
3736
- Asteroids runtime Object Vector rendering through `object.asteroids.*` IDs.
38-
- Triangle/non-triangle polygon point control behavior.
39-
- Duplicate Frame control ordering.
37+
- Workspace save summaries without vector-map-editor tool state.
38+
- Asteroids manifest schema validation after vector-map removal.
4039

4140
Generated source report: `docs/dev/reports/playwright_v8_coverage_report.txt`.
Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,37 @@
1-
# PR_26133_027 Workspace V2 Validation
1+
# PR_26133_028 Workspace V2 Validation
22

3-
Task: PR_26133_027-object-id-ssot-manifest-schema-cleanup
3+
Task: PR_26133_028-remove-vector-map-editor-runtime-dependency
44
Date: 2026-05-13
55

66
## Result
77

88
PASS - `npm run test:workspace-v2`
99

1010
- 49 Playwright tests passed.
11-
- Focused Object Vector Studio V2 checks passed before the full run.
12-
- Asteroids manifest schema validation passed after the assetLibrary cleanup.
11+
- Focused Asteroids/Object Vector workspace checks passed before the full run.
12+
- Asteroids manifest schema validation passed after removing the Asteroids `vector-map-editor` payload.
1313
- No sample JSON files were changed.
1414

1515
## Targeted Verification
1616

17-
- PASS - Object Vector Studio V2 assetLibrary entries use `object.*` IDs and do not carry duplicate `objectId` fields.
18-
- PASS - Duplicate runtime identity aliases fail Object Vector Studio V2 schema validation.
19-
- PASS - Asteroids runtime resolves the small asteroid through `object.asteroids.asteroid.small`.
20-
- PASS - Object Vector Studio V2 loads Asteroids objects through `object.*` IDs.
21-
- PASS - Active Asteroids Object Vector runtime rendering uses object IDs for ship, asteroid, and UFO paths.
22-
- PASS - Triangle Geometry hides Add Point and Delete Point controls.
23-
- PASS - Non-triangle polygon geometry keeps Add Point and Delete Point behavior.
24-
- PASS - Frame controls render as Frame Earlier, Duplicate Frame, Frame Later.
17+
- PASS - Asteroids Workspace Manager V2 context no longer includes `vector-map-editor`.
18+
- PASS - Object Vector Studio V2 still loads the 6 Asteroids objects from `object-vector-studio-v2.objects`.
19+
- PASS - Asteroids runtime renders ship, asteroid, and UFO Object Vector objects through `object.asteroids.*` IDs.
20+
- PASS - Asteroids manifest contains no `vector.asteroids.*` runtime/editor payload.
21+
- PASS - `tools/shared/asteroidsPlatformDemo.js` and `tools/shared/vectorAssetSystem.js` no longer reference Asteroids `vector-map-editor` data.
22+
- PASS - Save summaries no longer include `vector-map-editor vectors=5`.
2523
- PASS - No runtime console/page errors were reported by the targeted Playwright coverage.
2624

2725
## Commands
2826

29-
- PASS - `node --check src/engine/rendering/ObjectVectorRuntimeAssetService.js`
30-
- PASS - `node --check tools/object-vector-studio-v2/js/ToolStarterApp.js`
31-
- PASS - `node --check tools/object-vector-studio-v2/js/services/ObjectVectorStudioV2SchemaService.js`
27+
- PASS - `node --check tools/shared/asteroidsPlatformDemo.js`
28+
- PASS - `node --check tools/shared/vectorAssetSystem.js`
3229
- PASS - `node --check tests/playwright/tools/WorkspaceManagerV2.spec.mjs`
30+
- PASS - `node --check tests/games/AsteroidsPlatformDemo.test.mjs`
31+
- PASS - `node --check tests/games/AsteroidsAssetReferenceAdoption.test.mjs`
32+
- PASS - `node --check tests/tools/VectorAssetSystem.test.mjs`
33+
- PASS - `node --check tests/tools/AssetUsageIntegration.test.mjs`
3334
- PASS - Asteroids manifest schema and runtime object ID probe with `WorkspaceManagerV2ContextService` and `ObjectVectorRuntimeAssetService`.
34-
- PASS - `npx playwright test tests/playwright/tools/WorkspaceManagerV2.spec.mjs --project=playwright --workers=1 --reporter=list --grep "schema-only palette gate|geometry layouts|animation states|asset library inheritance|runtime assets into Asteroids|header lifecycle"`
35+
- PASS - Focused node test probes for Asteroids platform demo, Asteroids asset reference adoption, VectorAssetSystem, and AssetUsageIntegration.
36+
- PASS - `npx playwright test tests/playwright/tools/WorkspaceManagerV2.spec.mjs --project=playwright --workers=1 --reporter=list --grep "header lifecycle|loads Object Vector Studio V2 runtime assets|saves empty Text to Speech|syncs Workspace Manager V2 dirty lifecycle|warns instead of injecting"`
3537
- PASS - `npm run test:workspace-v2`
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Vector Map Editor Removal Report
2+
3+
Task: PR_26133_028-remove-vector-map-editor-runtime-dependency
4+
Date: 2026-05-13
5+
6+
## Runtime Geometry SSoT
7+
8+
Asteroids runtime/editor vector geometry now comes from:
9+
10+
`game.workspace.tools["object-vector-studio-v2"].objects[*].shapes[*].geometry`
11+
12+
Object IDs remain the runtime identity SSoT through `game.gameData.objectVectorRuntime.objectIds`.
13+
14+
## Removed From Asteroids
15+
16+
- Removed `game.workspace.tools["vector-map-editor"]` from `games/Asteroids/game.manifest.json`.
17+
- Removed the Asteroids `vectorMapDocument` payload and all duplicate `vector.asteroids.*` geometry definitions from the active Asteroids manifest.
18+
- Updated Workspace Manager V2 expectations so Asteroids context, stored context, schema checks, and save summaries no longer require vector-map-editor state.
19+
- Updated shared Asteroids platform demo/runtime fixture paths to use Object Vector object IDs and `tools.object-vector-studio-v2.objects` references.
20+
- Updated shared vector asset fixture IDs/paths away from Asteroids `vector.asteroids.*` and `tools.vector-map-editor`.
21+
22+
## Preserved
23+
24+
- Global vector-map-editor support remains available for unrelated tools and manifests.
25+
- Object Vector Studio V2 Asteroids object geometry remains in place, including the canonical large asteroid geometry from the object-vector payload.
26+
- Asset-manager media/file assets remain under `assets.*`.
27+
- No sample JSON files were changed.
28+
29+
## Verification
30+
31+
- PASS - `games/Asteroids/game.manifest.json` validates through `WorkspaceManagerV2ContextService`.
32+
- PASS - Object Vector runtime resolves all six Asteroids `object.asteroids.*` IDs from the Object Vector payload.
33+
- PASS - Active Asteroids manifest and touched shared runtime fixture files contain no `vector.asteroids.*` or Asteroids `vectorMapDocument` dependency.
34+
- PASS - Object Vector Studio V2 still loads Asteroids objects through the workspace launch path.
35+
- PASS - Asteroids runtime rendering Playwright coverage passed without console/page errors.
36+
- PASS - `npm run test:workspace-v2` completed with 49 passed.

games/Asteroids/game.manifest.json

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -797,69 +797,6 @@
797797
}
798798
]
799799
},
800-
"vector-map-editor": {
801-
"vectorMapDocument": {
802-
"schema": "html-js-gaming.vector-map",
803-
"version": 1,
804-
"name": "Asteroids Vector Map",
805-
"source": "manifest",
806-
"assetsPath": "games/Asteroids/assets",
807-
"vectors": [
808-
{
809-
"id": "vector.asteroids.ship",
810-
"label": "Ship",
811-
"viewBox": "-24 -24 48 48",
812-
"paths": [
813-
"M 0 -18 L 14 16 L 0 8 L -14 16 Z",
814-
"M -6 14 L 0 6 L 6 14"
815-
],
816-
"stroke": true,
817-
"fill": false
818-
},
819-
{
820-
"id": "vector.asteroids.asteroid.large",
821-
"label": "Large Asteroid",
822-
"viewBox": "-40 -40 80 80",
823-
"paths": [
824-
"M -28 -12 L -10 -30 L 20 -26 L 32 -8 L 26 18 L 6 32 L -22 24 L -34 2 Z"
825-
],
826-
"stroke": true,
827-
"fill": false
828-
},
829-
{
830-
"id": "vector.asteroids.asteroid.medium",
831-
"label": "Medium Asteroid",
832-
"viewBox": "-28 -28 56 56",
833-
"paths": [
834-
"M -16 -10 L -2 -18 L 16 -14 L 20 2 L 8 18 L -10 16 L -20 4 Z"
835-
],
836-
"stroke": true,
837-
"fill": false
838-
},
839-
{
840-
"id": "vector.asteroids.asteroid.small",
841-
"label": "Small Asteroid",
842-
"viewBox": "-18 -18 36 36",
843-
"paths": [
844-
"M -10 -6 L 0 -12 L 10 -6 L 8 8 L -6 10 L -12 0 Z"
845-
],
846-
"stroke": true,
847-
"fill": false
848-
},
849-
{
850-
"id": "vector.asteroids.ui.title",
851-
"label": "Asteroids Title",
852-
"viewBox": "0 0 220 48",
853-
"paths": [
854-
"M 6 40 L 24 6 L 42 40 Z",
855-
"M 58 40 L 58 8 L 88 8 L 88 18 L 70 18 L 70 22 L 86 22 L 86 32 L 70 32 L 70 40 Z"
856-
],
857-
"stroke": true,
858-
"fill": false
859-
}
860-
]
861-
}
862-
},
863800
"text2speech-V2": []
864801
}
865802
}

tests/games/AsteroidsAssetReferenceAdoption.test.mjs

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,21 @@ export async function run() {
99
assert.equal(Array.isArray(binding?.issues), true);
1010
assert.equal(binding.issues.length, 0);
1111

12-
const vectorBinding = (binding.domains.vectors || []).find((entry) => entry.assetId === "vector.asteroids.ship");
13-
const tilemapBinding = (binding.domains.tilemaps || []).find((entry) => entry.assetId === "tilemap.asteroids-stage");
14-
const parallaxBinding = (binding.domains.parallax || []).find((entry) => entry.assetId === "parallax.asteroids-title");
12+
const objectVectorSource = result.demo.runtimeAssetSources["object.asteroids.ship"];
13+
const rejectedIds = (binding.rejected || []).map((entry) => entry.assetId).sort();
1514

16-
assert.equal(Boolean(vectorBinding), true);
17-
assert.equal(Boolean(tilemapBinding), true);
18-
assert.equal(Boolean(parallaxBinding), true);
19-
assert.equal(vectorBinding.runtimePath.includes("/data/"), false);
20-
assert.equal(tilemapBinding.runtimePath.includes("/data/"), false);
21-
assert.equal(parallaxBinding.runtimePath.includes("/data/"), false);
15+
assert.equal((binding.domains.vectors || []).length, 0);
16+
assert.deepEqual(rejectedIds, [
17+
"parallax.asteroids-overlay",
18+
"parallax.asteroids-title",
19+
"tilemap.asteroids-stage"
20+
]);
21+
assert.equal(objectVectorSource.file.includes("tools.object-vector-studio-v2.objects.object.asteroids.ship"), true);
2222

2323
const runtimeAssetTable = result.demo.runtimeResult?.bootstrap?.assetTable || {};
2424
const runtimePathFor = (entry) => entry?.file || entry?.path || "";
25-
assert.equal(runtimePathFor(runtimeAssetTable["vector.asteroids.ship"]), vectorBinding.runtimePath);
26-
assert.equal(runtimePathFor(runtimeAssetTable["tilemap.asteroids-stage"]), tilemapBinding.runtimePath);
27-
assert.equal(runtimePathFor(runtimeAssetTable["parallax.asteroids-title"]), parallaxBinding.runtimePath);
25+
assert.equal(Object.keys(runtimeAssetTable).some((assetId) => assetId.startsWith(`vector.${"asteroids"}.`)), false);
26+
assert.equal(runtimePathFor(runtimeAssetTable["tilemap.asteroids-stage"]).includes("/data/"), false);
27+
assert.equal(runtimePathFor(runtimeAssetTable["parallax.asteroids-title"]).includes("/data/"), false);
28+
assert.equal(runtimeAssetTable["tilemap.asteroids-stage"].visualPreference.objectIds.ship, "object.asteroids.ship");
2829
}

tests/games/AsteroidsPlatformDemo.test.mjs

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,31 +22,25 @@ export async function run() {
2222
const runtimeModule = await import(new URL(`../../${first.demo.runtimeHandoff.modulePath}`, import.meta.url));
2323
assert.equal(typeof runtimeModule[first.demo.runtimeHandoff.exportName], "function");
2424
assert.equal(first.demo.packageResult.manifest.package.projectId, "asteroids-platform-demo");
25-
assert.equal(first.demo.definition.demo.visualBaseline.preferred, "vector");
25+
assert.equal(first.demo.definition.demo.visualBaseline.preferred, "object-vector");
2626
assert.equal(first.demo.definition.demo.visualBaseline.rollbackDocumented, true);
2727
assert.deepEqual(
2828
first.demo.packageResult.manifest.package.assets.filter((asset) => asset.type === "vector").map((asset) => asset.id),
29-
[
30-
"vector.asteroids.asteroid.large",
31-
"vector.asteroids.asteroid.medium",
32-
"vector.asteroids.asteroid.small",
33-
"vector.asteroids.ship",
34-
"vector.asteroids.ui.title"
35-
]
29+
[]
3630
);
37-
assert.equal(first.demo.vectorOnly.hasSpriteRuntimeDependency, false);
38-
assert.deepEqual(first.demo.vectorOnly.missingRequiredVectorIds, []);
39-
assert.match(first.demo.debugVisualizationResult.debugVisualization.reportText, /geometry=/);
31+
assert.equal(first.demo.objectVector.hasSpriteRuntimeDependency, false);
32+
assert.deepEqual(first.demo.objectVector.missingRequiredObjectIds, []);
33+
assert.match(first.demo.debugVisualizationResult.debugVisualization.reportText, /nodes=7/);
4034
assert.match(first.demo.performanceResult.performance.reportText, /Geometry: assets=/);
4135
assert.equal(
4236
first.demo.packageResult.manifest.package.assets.some((asset) => asset.id === "sprite.asteroids-demo"),
4337
false
4438
);
4539
assert.deepEqual(first, second);
4640
assert.match(first.demo.reportText, /title, start, game-over, and restart loop/i);
47-
assert.match(first.demo.reportText, /Visual path: vector only/);
48-
assert.match(first.demo.reportText, /ASTEROIDS_VECTOR_ONLY_RUNTIME/);
41+
assert.match(first.demo.reportText, /Visual path: object-vector only/);
42+
assert.match(first.demo.reportText, /ASTEROIDS_OBJECT_VECTOR_RUNTIME/);
4943
assert.match(first.demo.reportText, /ASTEROIDS_ROLLBACK_NOTES_ONLY/);
5044
assert.match(first.demo.reportText, /Publishing pipeline ready with 5 release targets\./);
51-
assert.equal(summarizeAsteroidsPlatformDemo(first), "Asteroids platform demo ready with 12 packaged assets.");
45+
assert.equal(summarizeAsteroidsPlatformDemo(first), "Asteroids platform demo ready with 7 packaged assets.");
5246
}

0 commit comments

Comments
 (0)