feat(web): add incremental modifier reader batch
This commit is contained in:
@@ -75,6 +75,24 @@ PREFERRED_BATCHES = [
|
||||
"production": "tests/golden/{task}/modifier-reader-batch-production.json",
|
||||
"types": ["MESH_CACHE", "MESH_SEQUENCE_CACHE", "MULTIRES", "OCEAN"],
|
||||
},
|
||||
{
|
||||
"moduleId": "MODIFIER_READER_BATCH_SIX",
|
||||
"title": "verify modifier reader batch six",
|
||||
"owner": "MODIFIER",
|
||||
"identifiers": ["MOD_mesh_to_volume", "MOD_particleinstance", "MOD_surface", "MOD_weightvgedit", "MOD_weightvgmix", "MOD_weightvgproximity"],
|
||||
"rna": ["MeshToVolumeModifier", "ParticleInstanceModifier", "SurfaceModifier", "VertexWeightEditModifier", "VertexWeightMixModifier", "VertexWeightProximityModifier"],
|
||||
"fixtures": [
|
||||
"tests/files/web/generated/M16-GAP-00081-modifier-MESH_TO_VOLUME.blend",
|
||||
"tests/files/web/generated/M16-GAP-00087-modifier-PARTICLE_INSTANCE.blend",
|
||||
"tests/files/web/generated/M16-GAP-00098-modifier-SURFACE.blend",
|
||||
"tests/files/web/generated/M16-GAP-00103-modifier-VERTEX_WEIGHT_EDIT.blend",
|
||||
"tests/files/web/generated/M16-GAP-00104-modifier-VERTEX_WEIGHT_MIX.blend",
|
||||
"tests/files/web/generated/M16-GAP-00105-modifier-VERTEX_WEIGHT_PROXIMITY.blend",
|
||||
],
|
||||
"test": "web/tests/e2e/wbv2-modifier-reader-multi-fixture-production.spec.ts",
|
||||
"production": "tests/golden/{task}/modifier-reader-batch-production.json",
|
||||
"types": ["MESH_TO_VOLUME", "PARTICLE_INSTANCE", "SURFACE", "VERTEX_WEIGHT_EDIT", "VERTEX_WEIGHT_MIX", "VERTEX_WEIGHT_PROXIMITY"],
|
||||
},
|
||||
{
|
||||
"moduleId": "GREASE_PENCIL_MODIFIER_READER_BATCH",
|
||||
"title": "verify Grease Pencil modifier reader batch",
|
||||
@@ -173,6 +191,8 @@ def snapshot(text: str, task: str, parent: str, next_task: str) -> str:
|
||||
|
||||
|
||||
def make_card(task: str, parent: str, status: str, batch: dict, entrypoint: str) -> str:
|
||||
fixture_paths = batch.get("fixtures") or [batch["fixture"]]
|
||||
fixture_text = ", ".join(f"`{fixture}`" for fixture in fixture_paths)
|
||||
if task.endswith("-000"):
|
||||
return f"""# {task}: authorize module batch
|
||||
|
||||
@@ -191,7 +211,7 @@ def make_card(task: str, parent: str, status: str, batch: dict, entrypoint: str)
|
||||
## 输入与范围
|
||||
|
||||
- Blender source: `blender-5.2.0/source/blender`
|
||||
- Fixture/test: `{batch['fixture']}`, `{batch['test']}`
|
||||
- Fixtures/test: {fixture_text}, `{batch['test']}`
|
||||
|
||||
## 验收
|
||||
|
||||
@@ -224,7 +244,7 @@ def make_card(task: str, parent: str, status: str, batch: dict, entrypoint: str)
|
||||
## 输入与范围
|
||||
|
||||
- Blender source family: `blender-5.2.0/source/blender`
|
||||
- Fixture: `{batch['fixture']}`
|
||||
- Fixtures: {fixture_text}
|
||||
- Chromium test: `{batch['test']}`
|
||||
- Unit selection: `{len(batch['identifiers']) + len(batch['rna'])} units`(完整列表只在 module plan/manifest)
|
||||
|
||||
@@ -269,7 +289,7 @@ def make_card(task: str, parent: str, status: str, batch: dict, entrypoint: str)
|
||||
- Blender modifier sources: `blender-5.2.0/source/blender/modifiers/intern/`
|
||||
- RNA source: `blender-5.2.0/source/blender/makesrna/intern/rna_modifier.cc`
|
||||
- Native reader: `blender-5.2.0/source/blender/web_engine/web_engine_blend_reader.cpp`
|
||||
- Fixture: `{batch['fixture']}`
|
||||
- Fixtures: {fixture_text}
|
||||
- Chromium test: `{batch['test']}`
|
||||
- Selected modifier units: {units}
|
||||
- Selected RNA units: {rna_units}
|
||||
@@ -341,12 +361,16 @@ def main() -> int:
|
||||
write_json(current_manifest_path, current_manifest)
|
||||
|
||||
source_paths = [unit["locations"][0]["path"] for unit in batch["units"]]
|
||||
source_paths += ["blender-5.2.0/source/blender/web_engine/web_engine_blend_reader.cpp", batch["test"], batch["fixture"], "web/app/src/vendor/blender/web_engine.wasm"]
|
||||
fixture_paths = batch.get("fixtures") or [batch["fixture"]]
|
||||
source_paths += ["blender-5.2.0/source/blender/web_engine/web_engine_blend_reader.cpp", batch["test"], *fixture_paths, "web/app/src/vendor/blender/web_engine.wasm"]
|
||||
batch_types = json.dumps(batch["types"], separators=(',', ':'))
|
||||
batch_units = json.dumps([unit["id"] for unit in batch["units"]], separators=(',', ':'))
|
||||
fixture_env = f"WBV2_BATCH_FIXTURES='{json.dumps(fixture_paths, separators=(',', ':'))}'" if batch.get("fixtures") else f"WBV2_BATCH_FIXTURE={batch['fixture']}"
|
||||
commands = [
|
||||
"source tools/web/emscripten-env.sh && cmake --build build_web_blender6 --target web_engine -- -j8 && cp build_web_blender6/bin/web_engine.wasm web/app/src/vendor/blender/web_engine.wasm && cp build_web_blender6/bin/web_engine.wasm web/app/public/vendor/blender/web_engine.wasm",
|
||||
"npm --prefix web run typecheck",
|
||||
"npm --prefix web run build",
|
||||
f"WBV2_BATCH_TASK={module_task} WBV2_BATCH_FIXTURE={batch['fixture']} WBV2_BATCH_TYPES='{json.dumps(batch['types'], separators=(',', ':'))}' WBV2_BATCH_UNITS='{json.dumps([unit['id'] for unit in batch['units']], separators=(',', ':'))}' WEB_TEST_PORT=5371 npm --prefix web run test:e2e -- --workers=1 tests/e2e/{Path(batch['test']).name}",
|
||||
f"WBV2_BATCH_TASK={module_task} {fixture_env} WBV2_BATCH_TYPES='{batch_types}' WBV2_BATCH_UNITS='{batch_units}' WEB_TEST_PORT=5371 npm --prefix web run test:e2e -- --workers=1 tests/e2e/{Path(batch['test']).name}",
|
||||
]
|
||||
root_record = {"id": root_task, "phase": str(phase), "title": "authorize_modifier_reader_batch", "kind": "enabling", "owner": "PROGRAM", "dependsOn": [current], "parityId": None, "implementationClass": "QUEUE_ONLY", "parallelGroup": f"module-root-{phase}", "gate": "MODULE", "card": f"docs/tasks/{root_task}.md", "behavior": "Authorize one shared source-backed modifier reader batch.", "outputs": ["successor authorization", "module plan", "manifest", "status"], "acceptance": ["prior evidence remains hash-bound", "batch source mapping is explicit", "inventory remains source-derived"], "commands": ["node tools/web/check-execution-control-plane.mjs"], "status": "done", "ready": False, "queueMutationAllowed": True}
|
||||
module_record = {"id": module_task, "phase": str(phase), "title": batch["title"], "kind": "module", "owner": batch["owner"], "dependsOn": [root_task], "parityId": batch["moduleId"], "implementationClass": "LOCAL_EXACT", "parallelGroup": f"module-{batch['moduleId'].lower()}", "gate": "MODULE", "card": f"docs/tasks/{module_task}.md", "behavior": f"Verify the {batch['moduleId']} batch through Blender Main, WASM and Chromium recovery.", "outputs": ["aggregate module receipt", "coverage bindings", "manifest", "status"], "acceptance": ["source and protocol hashes are bound", "every selected Main reader type is proven", "negative no-mutation and recovery are proven", "Chromium and save/reopen evidence are exact"], "status": "in_progress", "ready": True, "queueMutationAllowed": True, "module": {"moduleId": batch["moduleId"], "sourceBacked": True, "capabilities": [f"CAP-{batch['moduleId']}-READER", f"CAP-{batch['moduleId']}-RECOVERY", f"CAP-{batch['moduleId']}-FAIL-CLOSED"], "sourcePaths": source_paths, "reuseReceipts": [{"manifest": "tests/golden/WBV2-P1107-000/manifest.json", "report": "tests/golden/WBV2-P1107-000/module-receipt.json"}], "positive": [f"{name} type is read from Blender Main" for name in batch["identifiers"]] + ["shared RNA metadata is preserved", "save/reopen preserves the batch metadata"], "negative": ["malformed blend is rejected without Main mutation", "unsupported batch data fails closed", "non-finite metadata is not synthesized"], "recovery": ["save/reopen", "worker termination", "deterministic second read"], "commands": commands, "fullFamilyParity": False, "evidencePaths": [batch["production"].format(task=module_task)], "coverageBindings": [unit["id"] for unit in batch["units"]]}}
|
||||
|
||||
Reference in New Issue
Block a user