feat(web): optimize source coverage batching
This commit is contained in:
@@ -53,6 +53,66 @@ PREFERRED_BATCHES = [
|
||||
"production": "tests/golden/{task}/modifier-reader-batch-production.json",
|
||||
"types": ["REMESH", "SKIN", "WEIGHTED_NORMAL", "WARP"],
|
||||
},
|
||||
{
|
||||
"moduleId": "MODIFIER_READER_BATCH_FOUR",
|
||||
"title": "verify modifier reader batch four",
|
||||
"owner": "MODIFIER",
|
||||
"identifiers": ["MOD_uvproject", "MOD_uvwarp", "MOD_normal_edit", "MOD_volume_to_mesh"],
|
||||
"rna": ["UVProjectModifier", "UVWarpModifier", "NormalEditModifier", "VolumeToMeshModifier"],
|
||||
"fixture": "tests/files/web/modifier_reader_batch_four_scene.blend",
|
||||
"test": "web/tests/e2e/wbv2-modifier-reader-batch-two-production.spec.ts",
|
||||
"production": "tests/golden/{task}/modifier-reader-batch-production.json",
|
||||
"types": ["UV_PROJECT", "UV_WARP", "NORMAL_EDIT", "VOLUME_TO_MESH"],
|
||||
},
|
||||
{
|
||||
"moduleId": "MODIFIER_READER_BATCH_FIVE",
|
||||
"title": "verify modifier reader batch five",
|
||||
"owner": "MODIFIER",
|
||||
"identifiers": ["MOD_meshcache", "MOD_meshsequencecache", "MOD_multires", "MOD_ocean"],
|
||||
"rna": ["MeshCacheModifier", "MeshSequenceCacheModifier", "MultiresModifier", "OceanModifier"],
|
||||
"fixture": "tests/files/web/modifier_reader_batch_five_scene.blend",
|
||||
"test": "web/tests/e2e/wbv2-modifier-reader-batch-two-production.spec.ts",
|
||||
"production": "tests/golden/{task}/modifier-reader-batch-production.json",
|
||||
"types": ["MESH_CACHE", "MESH_SEQUENCE_CACHE", "MULTIRES", "OCEAN"],
|
||||
},
|
||||
{
|
||||
"moduleId": "GREASE_PENCIL_MODIFIER_READER_BATCH",
|
||||
"title": "verify Grease Pencil modifier reader batch",
|
||||
"owner": "DRAWING",
|
||||
"identifiers": [
|
||||
"MOD_grease_pencil_armature", "MOD_grease_pencil_array", "MOD_grease_pencil_build",
|
||||
"MOD_grease_pencil_color", "MOD_grease_pencil_dash", "MOD_grease_pencil_envelope",
|
||||
"MOD_grease_pencil_hook", "MOD_grease_pencil_lattice", "MOD_grease_pencil_length",
|
||||
"MOD_grease_pencil_mirror", "MOD_grease_pencil_multiply", "MOD_grease_pencil_noise",
|
||||
"MOD_grease_pencil_offset", "MOD_grease_pencil_opacity", "MOD_grease_pencil_outline",
|
||||
"MOD_grease_pencil_shrinkwrap", "MOD_grease_pencil_simplify", "MOD_grease_pencil_smooth",
|
||||
"MOD_grease_pencil_subdiv", "MOD_grease_pencil_texture", "MOD_grease_pencil_thickness",
|
||||
"MOD_grease_pencil_time", "MOD_grease_pencil_tint", "MOD_grease_pencil_weight_angle",
|
||||
"MOD_grease_pencil_weight_proximity",
|
||||
],
|
||||
"rna": [
|
||||
"GreasePencilArmatureModifier", "GreasePencilArrayModifier", "GreasePencilBuildModifier",
|
||||
"GreasePencilColorModifier", "GreasePencilEnvelopeModifier", "GreasePencilHookModifier",
|
||||
"GreasePencilLatticeModifier", "GreasePencilLengthModifier", "GreasePencilMirrorModifier",
|
||||
"GreasePencilMultiplyModifier", "GreasePencilNoiseModifier", "GreasePencilOffsetModifier",
|
||||
"GreasePencilOpacityModifier", "GreasePencilOutlineModifier", "GreasePencilShrinkwrapModifier",
|
||||
"GreasePencilSimplifyModifier", "GreasePencilSmoothModifier", "GreasePencilSubdivModifier",
|
||||
"GreasePencilTextureModifier", "GreasePencilTimeModifier", "GreasePencilTintModifier",
|
||||
"GreasePencilWeightAngleModifier", "GreasePencilWeightProximityModifier",
|
||||
],
|
||||
"fixture": "tests/files/web/modifier_grease_pencil_scene.blend",
|
||||
"test": "web/tests/e2e/wbv2-modifier-reader-batch-two-production.spec.ts",
|
||||
"production": "tests/golden/{task}/modifier-reader-batch-production.json",
|
||||
"types": [
|
||||
"GREASE_PENCIL_ARMATURE", "GREASE_PENCIL_ARRAY", "GREASE_PENCIL_BUILD", "GREASE_PENCIL_COLOR",
|
||||
"GREASE_PENCIL_DASH", "GREASE_PENCIL_ENVELOPE", "GREASE_PENCIL_HOOK", "GREASE_PENCIL_LATTICE",
|
||||
"GREASE_PENCIL_LENGTH", "GREASE_PENCIL_MIRROR", "GREASE_PENCIL_MULTIPLY", "GREASE_PENCIL_NOISE",
|
||||
"GREASE_PENCIL_OFFSET", "GREASE_PENCIL_OPACITY", "GREASE_PENCIL_OUTLINE", "GREASE_PENCIL_SHRINKWRAP",
|
||||
"GREASE_PENCIL_SIMPLIFY", "GREASE_PENCIL_SMOOTH", "GREASE_PENCIL_SUBDIV", "GREASE_PENCIL_TEXTURE",
|
||||
"GREASE_PENCIL_THICKNESS", "GREASE_PENCIL_TIME", "GREASE_PENCIL_TINT", "GREASE_PENCIL_VERTEX_WEIGHT_ANGLE",
|
||||
"GREASE_PENCIL_VERTEX_WEIGHT_PROXIMITY",
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
@@ -113,6 +173,80 @@ 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:
|
||||
if task.endswith("-000"):
|
||||
return f"""# {task}: authorize module batch
|
||||
|
||||
- task: {task}
|
||||
- parent: {parent}
|
||||
- status: {status}
|
||||
- gap: capability:{batch['moduleId']}
|
||||
- ownerFamily: {batch['owner']}
|
||||
- targetImplementationClass: QUEUE_ONLY
|
||||
- Implementation entrypoint: `{entrypoint}`
|
||||
|
||||
## 目标
|
||||
|
||||
授权一个共享 Blender Main/WASM/Chromium 功能批次:{batch['moduleId']},共 {len(batch['identifiers']) + len(batch['rna'])} 个源码/RNA 单元。
|
||||
|
||||
## 输入与范围
|
||||
|
||||
- Blender source: `blender-5.2.0/source/blender`
|
||||
- Fixture/test: `{batch['fixture']}`, `{batch['test']}`
|
||||
|
||||
## 验收
|
||||
|
||||
- prior evidence and dynamic inventory remain hash-bound and immutable
|
||||
- one shared function chain validates the complete selected batch
|
||||
- missing source, unsupported data, hash drift or false completion remains blocked
|
||||
- `node tools/web/check-task-context.mjs --task {task} --write`
|
||||
|
||||
## 交付与回滚
|
||||
|
||||
- Manifest: `tests/golden/{task}/manifest.json`
|
||||
- Status: `docs/status/{task}.md`
|
||||
- Rollback: restore {parent} as queue parent.
|
||||
"""
|
||||
if len(batch["identifiers"]) + len(batch["rna"]) > 16:
|
||||
return f"""# {task}: {batch['title']}
|
||||
|
||||
- task: {task}
|
||||
- parent: {parent}
|
||||
- status: {status}
|
||||
- gap: capability:{batch['moduleId']}
|
||||
- ownerFamily: {batch['owner']}
|
||||
- targetImplementationClass: LOCAL_EXACT
|
||||
- Implementation entrypoint: `{entrypoint}`
|
||||
|
||||
## 目标
|
||||
|
||||
使用一个共享 Blender Main/WASM/Worker/Chromium 链验证 {len(batch['identifiers'])} 个 modifier source 与 {len(batch['rna'])} 个 RNA unit,形成一个聚合 receipt。
|
||||
|
||||
## 输入与范围
|
||||
|
||||
- Blender source family: `blender-5.2.0/source/blender`
|
||||
- Fixture: `{batch['fixture']}`
|
||||
- Chromium test: `{batch['test']}`
|
||||
- Unit selection: `{len(batch['identifiers']) + len(batch['rna'])} units`(完整列表只在 module plan/manifest)
|
||||
|
||||
## 验收
|
||||
|
||||
- one shared function chain covers every selected unit exactly once
|
||||
- malformed input, unsupported data and hash drift fail closed without Main mutation
|
||||
- save/reopen, deterministic second read and Chromium evidence are exact
|
||||
- `node tools/web/check-task-context.mjs --task {task} --write`
|
||||
|
||||
## 失败边界
|
||||
|
||||
- partial batch success never advances or claims omitted units
|
||||
- existing source/receipt hashes are reused; historical inventory remains read-only
|
||||
|
||||
## 交付与回滚
|
||||
|
||||
- Aggregate receipt: `tests/golden/{task}/module-receipt.json`
|
||||
- Production evidence: `tests/golden/{task}/modifier-reader-batch-production.json`
|
||||
- Manifest: `tests/golden/{task}/manifest.json`
|
||||
- Rollback: restore {parent} as queue parent.
|
||||
"""
|
||||
names = ", ".join(batch["identifiers"])
|
||||
units = ", ".join(f"`modifier-source:{name}`" for name in batch["identifiers"])
|
||||
rna_units = ", ".join(f"`rna-struct:{name}`" for name in batch["rna"])
|
||||
|
||||
Reference in New Issue
Block a user