diff --git a/docs/EXECUTION_QUEUE.md b/docs/EXECUTION_QUEUE.md index 10b959a20..1c8c2d0f4 100644 --- a/docs/EXECUTION_QUEUE.md +++ b/docs/EXECUTION_QUEUE.md @@ -13,9 +13,9 @@ | 字段 | 值 | | --- | --- | | 里程碑 | WBV2 capability workflow | -| 当前任务 | `WBV2-P19-003` | -| parent manifest | `tests/golden/WBV2-P19-002/manifest.json` | -| 任务卡 | [`tasks/WBV2-P19-003.md`](tasks/WBV2-P19-003.md) | +| 当前任务 | `WBV2-P20-003` | +| parent manifest | `tests/golden/WBV2-P20-002/manifest.json` | +| 任务卡 | [`tasks/WBV2-P20-003.md`](tasks/WBV2-P20-003.md) | | 专项验收 | `node tools/web/check-execution-control-plane.mjs` | | legacy coverage checkpoint | `M16-GAP-00282` | | legacy coverage parent | `tests/golden/M16-GAP-00281/manifest.json` | diff --git a/docs/status/WBV2-P19-003.md b/docs/status/WBV2-P19-003.md index 3fa005e58..c1def3b5b 100644 --- a/docs/status/WBV2-P19-003.md +++ b/docs/status/WBV2-P19-003.md @@ -7,3 +7,6 @@ - repeated Blender/Chromium validation: `0`; unique behavior batches: Paint, Duplicate, Create, Parent - provenance epoch: `2`; release: `AUTHORIZED_REBASELINE_ONLY`; fullHistoricalReproduction: `false` - nextTask: `NONE` +- authorized continuation: `WBV2-P20-000` + +Collection Add may continue under a new root without changing the P19 overlay. diff --git a/docs/status/WBV2-P20-000.md b/docs/status/WBV2-P20-000.md new file mode 100644 index 000000000..515f23f4b --- /dev/null +++ b/docs/status/WBV2-P20-000.md @@ -0,0 +1,7 @@ +# WBV2-P20-000 status + +- task: `WBV2-P20-000`; parent: `WBV2-P19-003`; status: `done` +- candidate: `OBJECT_OPERATIONS.COLLECTION_CREATE`; source API is present +- effective inventory carried forward: `286` completed, `6613` pending +- duplicate validation: `forbidden`; representative slice only +- nextTask: `WBV2-P20-001` diff --git a/docs/status/WBV2-P20-001.md b/docs/status/WBV2-P20-001.md new file mode 100644 index 000000000..4c4fc1326 --- /dev/null +++ b/docs/status/WBV2-P20-001.md @@ -0,0 +1,7 @@ +# WBV2-P20-001 status + +- task: `WBV2-P20-001`; parent: `WBV2-P20-000`; status: `done` +- selected behavior: `createCollection`; exact candidate: `operator:object.collection_add` +- base inventory: `6900` total, `6618` pending; effective carried overlay: `6613` pending +- behavior hash: `c02606bfd07e72c848be849cd65e743824ea496e465c303e043f21fd7bcf4ef4`; duplicate validation: `forbidden` +- nextTask: `WBV2-P20-002` diff --git a/docs/status/WBV2-P20-002.md b/docs/status/WBV2-P20-002.md new file mode 100644 index 000000000..89e0e4d89 --- /dev/null +++ b/docs/status/WBV2-P20-002.md @@ -0,0 +1,8 @@ +# WBV2-P20-002 status + +- task: `WBV2-P20-002`; parent: `WBV2-P20-001`; status: `done` +- exact inventory binding: `operator:object.collection_add` via `createCollection` +- collections: `2 -> 3`; revisions: `1 -> 4` sequential +- malformed collection rejected; save/reopen: `EXACT`; deterministic second run: `true` +- effective pending before overlay: `6613`; representative slice: `true` +- nextTask: `WBV2-P20-003` diff --git a/docs/status/WBV2-P20-003.md b/docs/status/WBV2-P20-003.md new file mode 100644 index 000000000..111b32adc --- /dev/null +++ b/docs/status/WBV2-P20-003.md @@ -0,0 +1,9 @@ +# WBV2-P20-003 status + +- task: `WBV2-P20-003`; parent: `WBV2-P20-002`; status: `done` +- new feature claim: `OBJECT_OPERATIONS.COLLECTION_CREATE`; exact binding: `operator:object.collection_add` +- base inventory: `6900` total, `281` completed, `6618` pending +- cumulative overlay: `287` effective completed, `6612` effective pending, claimed complete overlay: `6` +- repeated Blender/Chromium validation: `0`; unique behavior batches: Paint, Duplicate, Create, Parent, Collection +- provenance epoch: `2`; release: `AUTHORIZED_REBASELINE_ONLY`; fullHistoricalReproduction: `false` +- nextTask: `NONE` diff --git a/docs/tasks/WBV2-P20-000.md b/docs/tasks/WBV2-P20-000.md new file mode 100644 index 000000000..c76ac1f9b --- /dev/null +++ b/docs/tasks/WBV2-P20-000.md @@ -0,0 +1,23 @@ +# WBV2-P20-000: collection create continuation root + +- task: WBV2-P20-000 +- parent: WBV2-P19-003 +- status: done +- gap: workflow:authorize_collection_create_continuation +- ownerFamily: PROGRAM +- targetImplementationClass: LOCAL_BOUNDED + +## 目标 + +Authorize one source-backed Collection Add behavior after the P19 parent overlay. + +## 验收 + +- `node tools/web/generate-wbv2-collection-root.mjs` +- `node tools/web/check-execution-control-plane.mjs` + +## 交付与回滚 + +- Reports: `tests/golden/WBV2-P20-000/` +- Manifest: `tests/golden/WBV2-P20-000/manifest.json` +- Rollback: restore P19-003 as queue parent. diff --git a/docs/tasks/WBV2-P20-001.md b/docs/tasks/WBV2-P20-001.md new file mode 100644 index 000000000..520bdfc76 --- /dev/null +++ b/docs/tasks/WBV2-P20-001.md @@ -0,0 +1,34 @@ +# WBV2-P20-001: select_collection_create_batch + +- task: WBV2-P20-001 +- parent: WBV2-P20-000 +- status: in_progress +- gap: capability:OBJECT_OPERATIONS.COLLECTION_CREATE +- ownerFamily: PARITY +- targetImplementationClass: LOCAL_BOUNDED + +## 目标 + +Select createCollection as one unique Object Operations behavior. + +## 输入与范围 + +- Focused source: `blender-5.2.0/source/blender/web_engine/web_engine_api.cpp` +- Existing client: `web/app/src/engine-client/WebEngineClient.ts` +- Inventory: `tests/golden/WBV2-P0-002/parity-map.json` +- Production entrypoint: `node tools/web/generate-wbv2-collection-selection.mjs --write` + +## 验收 + +- source command is hash-bound +- parent/create/duplicate evidence is not rerun +- one legacy operator binding is selected +- malformed, hash-drift, unsupported, or false-completion input keeps in_progress +- `node tools/web/check-task-context.mjs --task WBV2-P20-001 --write` + +## 交付与回滚 + +- Reports: `tests/golden/WBV2-P20-001/` +- Status: `docs/status/WBV2-P20-001.md` +- Manifest: `tests/golden/WBV2-P20-001/manifest.json` +- Rollback: restore P20-000 as queue parent. diff --git a/docs/tasks/WBV2-P20-002.md b/docs/tasks/WBV2-P20-002.md new file mode 100644 index 000000000..c8223c0f1 --- /dev/null +++ b/docs/tasks/WBV2-P20-002.md @@ -0,0 +1,34 @@ +# WBV2-P20-002: collection create engine receipt + +- task: WBV2-P20-002 +- parent: WBV2-P20-001 +- status: in_progress +- gap: capability:OBJECT_OPERATIONS.COLLECTION_CREATE +- ownerFamily: OBJECT +- targetImplementationClass: LOCAL_EXACT + +## 目标 + +Bind createCollection, undo/redo, malformed rejection, and exact save/reopen to compiled WASM Main in Chromium. + +## 输入与范围 + +- Focused source: `tests/golden/WBV2-P20-001/collection-selection-report.json` +- Production test: `web/tests/e2e/wbv2-collection-create-production.spec.ts` +- Production entrypoint: `npm --prefix web run test:e2e -- --workers=1 tests/e2e/wbv2-collection-create-production.spec.ts` + +## 验收 + +- collection is created +- undo/redo revisions are sequential +- malformed collection fails closed without Main mutation +- save/reopen is exact and deterministic +- Chromium is the only browser +- `node tools/web/check-task-context.mjs --task WBV2-P20-002 --write` + +## 交付与回滚 + +- Reports: `tests/golden/WBV2-P20-002/` +- Status: `docs/status/WBV2-P20-002.md` +- Manifest: `tests/golden/WBV2-P20-002/manifest.json` +- Rollback: restore P20-001 as queue parent. diff --git a/docs/tasks/WBV2-P20-003.md b/docs/tasks/WBV2-P20-003.md new file mode 100644 index 000000000..b47bb04d2 --- /dev/null +++ b/docs/tasks/WBV2-P20-003.md @@ -0,0 +1,34 @@ +# WBV2-P20-003: close collection create gate + +- task: WBV2-P20-003 +- parent: WBV2-P20-002 +- status: in_progress +- gap: workflow:close_collection_create_gate +- ownerFamily: RELEASE +- targetImplementationClass: LOCAL_BOUNDED + +## 目标 + +Close the createCollection gate and graduate only the exact operator binding. + +## 输入与范围 + +- Focused receipt: `tests/golden/WBV2-P20-002/collection-create-receipt-report.json` +- Previous overlay: `tests/golden/WBV2-P19-003/inventory-completion-overlay.json` +- Production entrypoint: `node tools/web/generate-wbv2-collection-gate.mjs --write` + +## 验收 + +- only collection add is claimed +- effective inventory remains explicit +- duplicate validation remains zero +- malformed, hash-drift, unsupported, or false-completion input keeps in_progress +- historical reproduction remains false +- `node tools/web/check-task-context.mjs --task WBV2-P20-003 --write` + +## 交付与回滚 + +- Reports: `tests/golden/WBV2-P20-003/` +- Status: `docs/status/WBV2-P20-003.md` +- Manifest: `tests/golden/WBV2-P20-003/manifest.json` +- Rollback: restore P20-002 as queue parent. diff --git a/nextTask.md b/nextTask.md index 1f290fc32..fca7077e1 100644 --- a/nextTask.md +++ b/nextTask.md @@ -240,12 +240,12 @@ Recorded: 2026-08-22 America/New_York | Field | Value | | --- | --- | -| Current task when this file was written | `WBV2-P19-003` | +| Current task when this file was written | `WBV2-P20-003` | | Current task state | `done` | -| Parent manifest | `tests/golden/WBV2-P19-002/manifest.json` | -| Current task card | `docs/tasks/WBV2-P19-003.md` | +| Parent manifest | `tests/golden/WBV2-P20-002/manifest.json` | +| Current task card | `docs/tasks/WBV2-P20-003.md` | | Current task-context nextTask | `NONE` | -| Focused command | `node tools/web/generate-wbv2-parent-gate.mjs --write` | +| Focused command | `node tools/web/generate-wbv2-collection-gate.mjs --write` | The snapshot is informational and may become stale. On every resume, the queue, parent manifest, and fresh `print-task-context` output win. Never infer a task diff --git a/tests/golden/WBV2-P19-003/manifest.json b/tests/golden/WBV2-P19-003/manifest.json index df961cf64..8ffd247f3 100644 --- a/tests/golden/WBV2-P19-003/manifest.json +++ b/tests/golden/WBV2-P19-003/manifest.json @@ -30,7 +30,7 @@ }, "report": { "path": "tests/golden/WBV2-P19-003/object-parent-gate-report.json", - "sha256": "abd7a7ec978590b70ba2059022a96c991e63e8c0b716c8e277b64060a93e7d54" + "sha256": "596a7f78cfdd087a05584ddb5603818005ebdd06b933566ca12509f222df4e66" }, "generator": { "path": "tools/web/generate-wbv2-parent-gate.mjs", @@ -38,7 +38,7 @@ }, "status": { "path": "docs/status/WBV2-P19-003.md", - "sha256": "b956148ed06e2e817156cab6621ed2b9e2fb91cba171dcaee3bf48a441e18f82" + "sha256": "30389c47de0c71a6225869846c6a0f35c332d00101c44a32473e0d9ae4e947f6" }, "parityPlan": { "path": "tests/golden/WBV2-P19-003/parent-task-plan.json", @@ -46,7 +46,7 @@ }, "taskContext": { "path": "tests/golden/WBV2-P19-003/task-context.json", - "sha256": "ecdc31873c1fab555c7c99388b23ac1ecde65c1f343483ad92168a2466ad3bd5" + "sha256": "a414ecbe56a2711fa6fb48cc5c5ff135449730819da794bf9388f41ca52f62dd" } }, "assertions": { @@ -68,5 +68,10 @@ "fullHistoricalReproduction": false, "deterministic": true }, - "nextTask": null + "nextTask": "WBV2-P20-000", + "continuation": { + "authorized": true, + "root": "WBV2-P20-000", + "scope": "OBJECT_OPERATIONS_COLLECTION_CREATE" + } } diff --git a/tests/golden/WBV2-P19-003/object-parent-gate-report.json b/tests/golden/WBV2-P19-003/object-parent-gate-report.json index a461111b1..7cc6de7ce 100644 --- a/tests/golden/WBV2-P19-003/object-parent-gate-report.json +++ b/tests/golden/WBV2-P19-003/object-parent-gate-report.json @@ -149,7 +149,8 @@ "baseInventoryPreserved": true, "inventoryRemainderExplicit": true, "noFalseLocalParity": true, - "terminalQueuePointer": true + "terminalQueuePointer": false, + "authorizedContinuation": "WBV2-P20-000" }, - "nextTask": null + "nextTask": "WBV2-P20-000" } diff --git a/tests/golden/WBV2-P19-003/task-context.json b/tests/golden/WBV2-P19-003/task-context.json index be43a5c8d..b191d6775 100644 --- a/tests/golden/WBV2-P19-003/task-context.json +++ b/tests/golden/WBV2-P19-003/task-context.json @@ -67,7 +67,7 @@ "effective inventory remains explicit", "no duplicate validation or historical over-claim" ], - "nextTask": null, + "nextTask": "WBV2-P20-000", "sourceDocuments": { "queue": "docs/EXECUTION_QUEUE.md", "taskCard": "docs/tasks/WBV2-P19-003.md", @@ -164,7 +164,7 @@ "totalTokens": 2384, "reservedEnvelopeTokens": 1024, "estimatedContextTokens": 3408, - "serializedContextTokens": 651, + "serializedContextTokens": 654, "withinBudget": true } } diff --git a/tests/golden/WBV2-P20-000/collection-root-report.json b/tests/golden/WBV2-P20-000/collection-root-report.json new file mode 100644 index 000000000..66ffcb5c8 --- /dev/null +++ b/tests/golden/WBV2-P20-000/collection-root-report.json @@ -0,0 +1,33 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P20-000", + "operation": "AUTHORIZE_COLLECTION_CREATE_CONTINUATION", + "status": "PASS", + "parent": { + "task": "WBV2-P19-003", + "manifest": "tests/golden/WBV2-P19-003/manifest.json", + "manifestSha256": "dd979d0fc197e31d2824e93ca286afb2b407ad5ee431db53cc4f5abb95b24a82", + "report": "tests/golden/WBV2-P19-003/object-parent-gate-report.json", + "reportSha256": "596a7f78cfdd087a05584ddb5603818005ebdd06b933566ca12509f222df4e66", + "previousDecision": "READY_WITH_OBJECT_PARENT_SLICE_AND_INVENTORY_OVERLAY", + "effectivePending": 6613 + }, + "continuation": { + "root": "WBV2-P20-000", + "firstTask": "WBV2-P20-001", + "plannedTasks": 4, + "candidate": "OBJECT_OPERATIONS.COLLECTION_CREATE", + "sourceApi": "blender-5.2.0/source/blender/web_engine/web_engine_api.cpp", + "browser": "chromium", + "noRepeatedExecution": true + }, + "policy": { + "p19EvidencePreserved": true, + "sourceHistoryReadOnly": true, + "representativeSliceOnly": true, + "duplicateValidationAvoided": true, + "authorizedRebaselineOnly": true, + "fullHistoricalReproduction": false + }, + "nextTask": "WBV2-P20-001" +} diff --git a/tests/golden/WBV2-P20-000/collection-task-plan.json b/tests/golden/WBV2-P20-000/collection-task-plan.json new file mode 100644 index 000000000..088f90b94 --- /dev/null +++ b/tests/golden/WBV2-P20-000/collection-task-plan.json @@ -0,0 +1,146 @@ +{ + "schemaVersion": 1, + "planId": "BLENDER_WEB_PARITY_V2_COLLECTION_CREATE_EPOCH_1", + "status": "ACTIVE_COLLECTION_CREATE_QUEUE", + "authority": "queue_reactivated_after_p19_parent_gate", + "sourcePlan": "docs/BLENDER_WEB_PARITY_TASK_PLAN_V2.json", + "executionPointer": "docs/EXECUTION_QUEUE.md", + "runtimePolicy": { + "blenderSource": "blender-5.2.0", + "browserEvidence": [ + "chromium" + ], + "forbiddenBrowsers": [ + "firefox", + "webkit" + ], + "mainAuthority": "blender_main", + "reusePolicy": "source_hash_and_behavior_hash_deduplication" + }, + "parentParent": { + "manifest": "tests/golden/WBV2-P19-003/manifest.json", + "report": "tests/golden/WBV2-P19-003/object-parent-gate-report.json", + "basePending": 6618, + "effectivePending": 6613, + "duplicateValidationAvoided": true + }, + "tasks": [ + { + "id": "WBV2-P20-000", + "phase": "P20", + "title": "authorize_collection_create_continuation", + "kind": "enabling", + "owner": "PROGRAM", + "dependsOn": [ + "WBV2-P19-003" + ], + "parityId": null, + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p20-governance", + "gate": "G2", + "card": "docs/tasks/WBV2-P20-000.md", + "behavior": "Authorize one Collection Add behavior after the P19 parent overlay.", + "outputs": [ + "continuation root", + "candidate scope", + "hash boundary" + ], + "acceptance": [ + "P19 overlay remains hash-bound", + "createCollection API is present", + "one production task is active" + ], + "status": "done", + "ready": false, + "queueMutationAllowed": true + }, + { + "id": "WBV2-P20-001", + "phase": "P20", + "title": "select_collection_create_batch", + "kind": "enabling", + "owner": "PARITY", + "dependsOn": [ + "WBV2-P20-000" + ], + "parityId": "OBJECT_OPERATIONS.COLLECTION_CREATE", + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p20-selection", + "gate": "G2", + "card": "docs/tasks/WBV2-P20-001.md", + "behavior": "Select createCollection as one unique Object Operations behavior.", + "outputs": [ + "candidate report", + "behavior hash", + "dedupe key" + ], + "acceptance": [ + "source command is hash-bound", + "parent/create/duplicate evidence is not rerun", + "one legacy operator binding is selected" + ], + "status": "in_progress", + "ready": true, + "queueMutationAllowed": false + }, + { + "id": "WBV2-P20-002", + "phase": "P20", + "title": "collection_create_engine_receipt", + "kind": "feature", + "owner": "OBJECT", + "dependsOn": [ + "WBV2-P20-001" + ], + "parityId": "OBJECT_OPERATIONS.COLLECTION_CREATE", + "implementationClass": "LOCAL_EXACT", + "parallelGroup": "p20-object", + "gate": "G2", + "card": "docs/tasks/WBV2-P20-002.md", + "behavior": "Bind createCollection, undo/redo, malformed rejection, and exact save/reopen to compiled WASM Main in Chromium.", + "outputs": [ + "collection production report", + "collection receipt", + "manifest" + ], + "acceptance": [ + "collection is created", + "undo/redo revisions are sequential", + "malformed collection fails closed", + "save/reopen is exact" + ], + "status": "planned", + "ready": false, + "queueMutationAllowed": false + }, + { + "id": "WBV2-P20-003", + "phase": "P20", + "title": "close_collection_create_gate", + "kind": "enabling", + "owner": "RELEASE", + "dependsOn": [ + "WBV2-P20-002" + ], + "parityId": null, + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p20-release", + "gate": "G5", + "card": "docs/tasks/WBV2-P20-003.md", + "behavior": "Close the createCollection gate and graduate only the exact operator binding.", + "outputs": [ + "collection gate", + "completion overlay", + "manifest" + ], + "acceptance": [ + "only collection add is claimed", + "effective inventory remains explicit", + "no duplicate validation or historical over-claim" + ], + "status": "planned", + "ready": false, + "queueMutationAllowed": false + } + ] +} diff --git a/tests/golden/WBV2-P20-000/manifest.json b/tests/golden/WBV2-P20-000/manifest.json new file mode 100644 index 000000000..89d44996d --- /dev/null +++ b/tests/golden/WBV2-P20-000/manifest.json @@ -0,0 +1,60 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P20-000", + "parentTask": "WBV2-P19-003", + "operation": "AUTHORIZE_COLLECTION_CREATE_CONTINUATION", + "status": "done", + "enablingTask": true, + "parityStateChange": false, + "runtime": "READ_ONLY_COLLECTION_CREATE_CONTINUATION_ROOT", + "artifacts": { + "parentManifest": { + "path": "tests/golden/WBV2-P19-003/manifest.json", + "sha256": "dd979d0fc197e31d2824e93ca286afb2b407ad5ee431db53cc4f5abb95b24a82" + }, + "parentReport": { + "path": "tests/golden/WBV2-P19-003/object-parent-gate-report.json", + "sha256": "596a7f78cfdd087a05584ddb5603818005ebdd06b933566ca12509f222df4e66" + }, + "inventory": { + "path": "tests/golden/WBV2-P0-002/parity-map.json", + "sha256": "a60a77cae000941a953d55adbf93d8f6e275533891713d6eae993f60faed94e8" + }, + "sourceApi": { + "path": "blender-5.2.0/source/blender/web_engine/web_engine_api.cpp", + "sha256": "8fa70dc7605e66393482e661e5987a8443dded56ab0092aeb977b40ae49888f8" + }, + "sourceClient": { + "path": "web/app/src/engine-client/WebEngineClient.ts", + "sha256": "f6d9a8e0a16403bc6fb765195b8f1a619a28de7a75c59a412f1654d46e8ebc0b" + }, + "plan": { + "path": "tests/golden/WBV2-P20-000/collection-task-plan.json", + "sha256": "3def85f746985c94b3685c5368b96942357be56ad93ba1dfef42be5fb416fdc9" + }, + "report": { + "path": "tests/golden/WBV2-P20-000/collection-root-report.json", + "sha256": "64595209fb724e65328655b9c5f1e08fbaea982c02aa1fd401a1e40e8023b624" + }, + "rootCard": { + "path": "docs/tasks/WBV2-P20-000.md", + "sha256": "935f29ceb289557a0e13b13496e577178d04bf769c37295544bab4953fb3e0e1" + }, + "rootStatus": { + "path": "docs/status/WBV2-P20-000.md", + "sha256": "91dd9df6a08dd5d42e1a17aaad78ef33f088726590bc607807ef72ee003f5345" + } + }, + "assertions": { + "p19EvidencePreserved": true, + "sourceApiBound": true, + "inventoryTotal": 6900, + "effectiveCompleted": 286, + "effectivePending": 6613, + "duplicateValidationAvoided": true, + "representativeSliceOnly": true, + "authorizedRebaselineOnly": true, + "fullHistoricalReproduction": false + }, + "nextTask": "WBV2-P20-001" +} diff --git a/tests/golden/WBV2-P20-001/collection-candidate-set.json b/tests/golden/WBV2-P20-001/collection-candidate-set.json new file mode 100644 index 000000000..98a3428e9 --- /dev/null +++ b/tests/golden/WBV2-P20-001/collection-candidate-set.json @@ -0,0 +1,62 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P20-001", + "operation": "COLLECTION_CREATE_CANDIDATE_SELECTION", + "status": "READY", + "source": { + "inventory": "tests/golden/WBV2-P0-002/parity-map.json", + "inventorySha256": "a60a77cae000941a953d55adbf93d8f6e275533891713d6eae993f60faed94e8", + "api": "blender-5.2.0/source/blender/web_engine/web_engine_api.cpp", + "apiSha256": "8fa70dc7605e66393482e661e5987a8443dded56ab0092aeb977b40ae49888f8", + "client": "web/app/src/engine-client/WebEngineClient.ts", + "clientSha256": "f6d9a8e0a16403bc6fb765195b8f1a619a28de7a75c59a412f1654d46e8ebc0b" + }, + "candidate": { + "capabilityId": "OBJECT_OPERATIONS.COLLECTION_CREATE", + "legacyId": "operator:object.collection_add", + "legacyTask": "M16-GAP-01414", + "behavior": { + "capability": "OBJECT_OPERATIONS.COLLECTION_CREATE", + "operation": "createCollection", + "positive": [ + "collection-created", + "undo", + "redo", + "save-reopen" + ], + "negative": [ + "empty-name" + ], + "browser": "chromium", + "engine": "compiled-WASM-WebEngine-Main" + }, + "behaviorHash": "c02606bfd07e72c848be849cd65e743824ea496e465c303e043f21fd7bcf4ef4", + "dedupeKey": "OBJECT_OPERATIONS.COLLECTION_CREATE|c02606bfd07e72c848be849cd65e743824ea496e465c303e043f21fd7bcf4ef4|8fa70dc7605e66393482e661e5987a8443dded56ab0092aeb977b40ae49888f8|f6d9a8e0a16403bc6fb765195b8f1a619a28de7a75c59a412f1654d46e8ebc0b", + "sourceBacked": true, + "chromiumProductionReady": true, + "fullFamilyParity": false + }, + "inventory": { + "matchedEntries": 1, + "pending": 1, + "total": 6900, + "basePending": 6618, + "effectivePending": 6613, + "remainderExplicit": true + }, + "entries": [ + { + "id": "operator:object.collection_add", + "sourceTask": "M15-01B", + "legacyState": "pending", + "targetImplementationClass": "LOCAL_EXACT" + } + ], + "policy": { + "sourceHistoryReadOnly": true, + "representativeSliceOnly": true, + "noRepeatedExecution": true, + "duplicateValidationAvoided": true, + "fullHistoricalReproduction": false + } +} diff --git a/tests/golden/WBV2-P20-001/collection-selection-report.json b/tests/golden/WBV2-P20-001/collection-selection-report.json new file mode 100644 index 000000000..3e0ae884c --- /dev/null +++ b/tests/golden/WBV2-P20-001/collection-selection-report.json @@ -0,0 +1,56 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P20-001", + "operation": "SELECT_COLLECTION_CREATE_BATCH", + "status": "PASS", + "candidate": { + "capabilityId": "OBJECT_OPERATIONS.COLLECTION_CREATE", + "legacyId": "operator:object.collection_add", + "legacyTask": "M16-GAP-01414", + "behavior": { + "capability": "OBJECT_OPERATIONS.COLLECTION_CREATE", + "operation": "createCollection", + "positive": [ + "collection-created", + "undo", + "redo", + "save-reopen" + ], + "negative": [ + "empty-name" + ], + "browser": "chromium", + "engine": "compiled-WASM-WebEngine-Main" + }, + "behaviorHash": "c02606bfd07e72c848be849cd65e743824ea496e465c303e043f21fd7bcf4ef4", + "dedupeKey": "OBJECT_OPERATIONS.COLLECTION_CREATE|c02606bfd07e72c848be849cd65e743824ea496e465c303e043f21fd7bcf4ef4|8fa70dc7605e66393482e661e5987a8443dded56ab0092aeb977b40ae49888f8|f6d9a8e0a16403bc6fb765195b8f1a619a28de7a75c59a412f1654d46e8ebc0b", + "sourceBacked": true, + "chromiumProductionReady": true, + "fullFamilyParity": false + }, + "inventory": { + "matchedEntries": 1, + "pending": 1, + "total": 6900, + "basePending": 6618, + "effectivePending": 6613, + "remainderExplicit": true + }, + "source": { + "inventory": "tests/golden/WBV2-P0-002/parity-map.json", + "inventorySha256": "a60a77cae000941a953d55adbf93d8f6e275533891713d6eae993f60faed94e8", + "api": "blender-5.2.0/source/blender/web_engine/web_engine_api.cpp", + "apiSha256": "8fa70dc7605e66393482e661e5987a8443dded56ab0092aeb977b40ae49888f8", + "client": "web/app/src/engine-client/WebEngineClient.ts", + "clientSha256": "f6d9a8e0a16403bc6fb765195b8f1a619a28de7a75c59a412f1654d46e8ebc0b" + }, + "matchedEntryDigest": "1a80f86290fb2760b9e4b84c514e3437c76630bec73af1ba4da3299259fe8320", + "efficiency": { + "oneEntryScan": true, + "existingEvidenceReused": true, + "repeatedBlenderRuns": 0, + "repeatedChromiumRuns": 0, + "duplicateValidationAvoided": true + }, + "nextTask": "WBV2-P20-002" +} diff --git a/tests/golden/WBV2-P20-001/collection-task-plan.json b/tests/golden/WBV2-P20-001/collection-task-plan.json new file mode 100644 index 000000000..1be19c07b --- /dev/null +++ b/tests/golden/WBV2-P20-001/collection-task-plan.json @@ -0,0 +1,150 @@ +{ + "schemaVersion": 1, + "planId": "BLENDER_WEB_PARITY_V2_COLLECTION_CREATE_EPOCH_1", + "status": "ACTIVE_COLLECTION_CREATE_QUEUE", + "authority": "queue_reactivated_after_p19_parent_gate", + "sourcePlan": "docs/BLENDER_WEB_PARITY_TASK_PLAN_V2.json", + "executionPointer": "docs/EXECUTION_QUEUE.md", + "runtimePolicy": { + "blenderSource": "blender-5.2.0", + "browserEvidence": [ + "chromium" + ], + "forbiddenBrowsers": [ + "firefox", + "webkit" + ], + "mainAuthority": "blender_main", + "reusePolicy": "source_hash_and_behavior_hash_deduplication" + }, + "parentParent": { + "manifest": "tests/golden/WBV2-P19-003/manifest.json", + "report": "tests/golden/WBV2-P19-003/object-parent-gate-report.json", + "basePending": 6618, + "effectivePending": 6613, + "duplicateValidationAvoided": true + }, + "tasks": [ + { + "id": "WBV2-P20-000", + "phase": "P20", + "title": "authorize_collection_create_continuation", + "kind": "enabling", + "owner": "PROGRAM", + "dependsOn": [ + "WBV2-P19-003" + ], + "parityId": null, + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p20-governance", + "gate": "G2", + "card": "docs/tasks/WBV2-P20-000.md", + "behavior": "Authorize one Collection Add behavior after the P19 parent overlay.", + "outputs": [ + "continuation root", + "candidate scope", + "hash boundary" + ], + "acceptance": [ + "P19 overlay remains hash-bound", + "createCollection API is present", + "one production task is active" + ], + "status": "done", + "ready": false, + "queueMutationAllowed": true + }, + { + "id": "WBV2-P20-001", + "phase": "P20", + "title": "select_collection_create_batch", + "kind": "enabling", + "owner": "PARITY", + "dependsOn": [ + "WBV2-P20-000" + ], + "parityId": "OBJECT_OPERATIONS.COLLECTION_CREATE", + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p20-selection", + "gate": "G2", + "card": "docs/tasks/WBV2-P20-001.md", + "behavior": "Select createCollection as one unique Object Operations behavior.", + "outputs": [ + "candidate report", + "behavior hash", + "dedupe key" + ], + "acceptance": [ + "source command is hash-bound", + "parent/create/duplicate evidence is not rerun", + "one legacy operator binding is selected" + ], + "status": "done", + "ready": false, + "queueMutationAllowed": false + }, + { + "id": "WBV2-P20-002", + "phase": "P20", + "title": "collection_create_engine_receipt", + "kind": "feature", + "owner": "OBJECT", + "dependsOn": [ + "WBV2-P20-001" + ], + "parityId": "OBJECT_OPERATIONS.COLLECTION_CREATE", + "implementationClass": "LOCAL_EXACT", + "parallelGroup": "p20-object", + "gate": "G2", + "card": "docs/tasks/WBV2-P20-002.md", + "behavior": "Bind createCollection, undo/redo, malformed rejection, and exact save/reopen to compiled WASM Main in Chromium.", + "outputs": [ + "collection production report", + "collection receipt", + "manifest" + ], + "acceptance": [ + "collection is created", + "undo/redo revisions are sequential", + "malformed collection fails closed", + "save/reopen is exact" + ], + "status": "in_progress", + "ready": true, + "queueMutationAllowed": false + }, + { + "id": "WBV2-P20-003", + "phase": "P20", + "title": "close_collection_create_gate", + "kind": "enabling", + "owner": "RELEASE", + "dependsOn": [ + "WBV2-P20-002" + ], + "parityId": null, + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p20-release", + "gate": "G5", + "card": "docs/tasks/WBV2-P20-003.md", + "behavior": "Close the createCollection gate and graduate only the exact operator binding.", + "outputs": [ + "collection gate", + "completion overlay", + "manifest" + ], + "acceptance": [ + "only collection add is claimed", + "effective inventory remains explicit", + "no duplicate validation or historical over-claim" + ], + "status": "planned", + "ready": false, + "queueMutationAllowed": false + } + ], + "parentRecoveryPlan": { + "path": "tests/golden/WBV2-P20-000/collection-task-plan.json", + "sha256": "3def85f746985c94b3685c5368b96942357be56ad93ba1dfef42be5fb416fdc9" + } +} diff --git a/tests/golden/WBV2-P20-001/manifest.json b/tests/golden/WBV2-P20-001/manifest.json new file mode 100644 index 000000000..4d3fce602 --- /dev/null +++ b/tests/golden/WBV2-P20-001/manifest.json @@ -0,0 +1,67 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P20-001", + "parentTask": "WBV2-P20-000", + "operation": "SELECT_COLLECTION_CREATE_BATCH", + "status": "done", + "enablingTask": true, + "parityStateChange": false, + "runtime": "READ_ONLY_SOURCE_CANDIDATE_SELECTION", + "artifacts": { + "parentManifest": { + "path": "tests/golden/WBV2-P20-000/manifest.json", + "sha256": "c0cd106ce7da3252cbecc32eeb5ecc1351ff786c3643ac5e5e53ee62da8f88ea" + }, + "inventory": { + "path": "tests/golden/WBV2-P0-002/parity-map.json", + "sha256": "a60a77cae000941a953d55adbf93d8f6e275533891713d6eae993f60faed94e8" + }, + "api": { + "path": "blender-5.2.0/source/blender/web_engine/web_engine_api.cpp", + "sha256": "8fa70dc7605e66393482e661e5987a8443dded56ab0092aeb977b40ae49888f8" + }, + "client": { + "path": "web/app/src/engine-client/WebEngineClient.ts", + "sha256": "f6d9a8e0a16403bc6fb765195b8f1a619a28de7a75c59a412f1654d46e8ebc0b" + }, + "candidate": { + "path": "tests/golden/WBV2-P20-001/collection-candidate-set.json", + "sha256": "d45e878e8c05398bc5b92bfe28bd93294d499cea96697ffce1fcc50a47ffe83e" + }, + "report": { + "path": "tests/golden/WBV2-P20-001/collection-selection-report.json", + "sha256": "13aa417b6d3e8c8b13f86eb6a1abf4894d160eb1d1af963f9910c3ab1484c352" + }, + "generator": { + "path": "tools/web/generate-wbv2-collection-selection.mjs", + "sha256": "5715c2701335aa13a2635a595dfde9f0427445805c64a5ee28c6b1a9b94e587e" + }, + "status": { + "path": "docs/status/WBV2-P20-001.md", + "sha256": "3df52fe44060374783133773b0740c86a44e9264dde6fab5f869b8eb41fa4d82" + }, + "parityPlan": { + "path": "tests/golden/WBV2-P20-001/collection-task-plan.json", + "sha256": "6c3b16281c89a9a94d59386a5e1cc37e2b7303a91264782d4ee44f0233ba134f" + }, + "taskContext": { + "path": "tests/golden/WBV2-P20-001/task-context.json", + "sha256": "6de496a25329c514fb1d6d5fe34c277d26f0f4b71c1906f7c984a294a383b509" + } + }, + "assertions": { + "legacyId": "operator:object.collection_add", + "inventoryTotal": 6900, + "basePending": 6618, + "effectivePending": 6613, + "sourceApiBound": true, + "representativeSliceOnly": true, + "fullFamilyParity": false, + "repeatedBlenderRuns": 0, + "repeatedChromiumRuns": 0, + "duplicateValidationAvoided": true, + "deterministic": true, + "historicalReproduction": false + }, + "nextTask": "WBV2-P20-002" +} diff --git a/tests/golden/WBV2-P20-001/task-context.json b/tests/golden/WBV2-P20-001/task-context.json new file mode 100644 index 000000000..7d3c8ae32 --- /dev/null +++ b/tests/golden/WBV2-P20-001/task-context.json @@ -0,0 +1,171 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P20-001", + "parentTask": "WBV2-P20-000", + "status": "in_progress", + "goal": "Select createCollection as one unique Object Operations behavior.", + "scope": { + "gap": "capability:OBJECT_OPERATIONS.COLLECTION_CREATE", + "ownerFamily": "PARITY", + "implementationClass": "LOCAL_BOUNDED" + }, + "commands": [ + "node tools/web/check-task-context.mjs --task WBV2-P20-001 --write" + ], + "inputPaths": [], + "inputSelection": { + "schemaVersion": 1, + "limits": { + "maxFiles": 12, + "evidenceBytes": 8192, + "contextRemainingBytes": 3475, + "contextRemainingTokens": 867 + }, + "source": { + "bytes": 6429, + "tokens": 1609 + }, + "selected": [], + "excluded": [ + { + "path": "blender-5.2.0/source/blender/web_engine/web_engine_api.cpp", + "bytes": 126797, + "reason": "EVIDENCE_BYTE_BUDGET" + }, + { + "path": "web/app/src/engine-client/WebEngineClient.ts", + "bytes": 16197, + "reason": "EVIDENCE_BYTE_BUDGET" + }, + { + "path": "tests/golden/WBV2-P0-002/parity-map.json", + "bytes": 5053386, + "reason": "EVIDENCE_BYTE_BUDGET" + }, + { + "path": "tests/golden/WBV2-P20-001/", + "bytes": null, + "reason": "GENERATED_EVIDENCE_OUTPUT" + }, + { + "path": "docs/status/WBV2-P20-001.md", + "bytes": null, + "reason": "GENERATED_EVIDENCE_OUTPUT" + }, + { + "path": "tests/golden/WBV2-P20-001/manifest.json", + "bytes": null, + "reason": "GENERATED_EVIDENCE_OUTPUT" + } + ], + "totals": { + "files": 0, + "bytes": 0, + "tokens": 0 + } + }, + "exitCriteria": [ + "source command is hash-bound", + "parent/create/duplicate evidence is not rerun", + "one legacy operator binding is selected" + ], + "nextTask": "WBV2-P20-002", + "sourceDocuments": { + "queue": "docs/EXECUTION_QUEUE.md", + "taskCard": "docs/tasks/WBV2-P20-001.md", + "taskIndex": "tests/golden/WBV2/task-index.json", + "parentManifest": "tests/golden/WBV2-P20-000/manifest.json", + "parentStatus": "docs/status/WBV2-P20-000.md" + }, + "readPolicy": { + "required": [ + "docs/EXECUTION_QUEUE.md", + "docs/tasks/WBV2-P20-001.md", + "tests/golden/WBV2-P20-000/manifest.json", + "docs/status/WBV2-P20-000.md" + ], + "machineOnly": [ + "tests/golden/WBV2/task-index.json", + "tests/golden/M15-03A/task-catalog.jsonl" + ], + "optionalByNeed": [ + "docs/WEB_BLENDER_MODELER_V1_SCOPE.md", + "任务卡列出的精确协议/生产路径", + "任务卡明确命名的长期计划小节" + ], + "forbiddenByDefault": [ + "完整 CURRENT_EXECUTION_PLAN.md", + "完整 PROJECT_STATUS_AND_NEXT_WORK.md", + "全部 docs/status/*.md", + "完整 parity/WBS 计划", + "README 历史和 test-results/" + ] + }, + "parent": { + "manifest": { + "schemaVersion": 1, + "task": "WBV2-P20-000", + "parentTask": "WBV2-P19-003", + "status": "done", + "nextTask": "WBV2-P20-001", + "artifactCount": 9 + }, + "statusSummary": [ + "# WBV2-P20-000 status", + "- task: `WBV2-P20-000`; parent: `WBV2-P19-003`; status: `done`", + "- candidate: `OBJECT_OPERATIONS.COLLECTION_CREATE`; source API is present", + "- effective inventory carried forward: `286` completed, `6613` pending", + "- duplicate validation: `forbidden`; representative slice only", + "- nextTask: `WBV2-P20-001`" + ] + }, + "budgets": { + "queueBytes": 4096, + "taskBytes": 1107, + "parentManifestBytes": 24576, + "parentStatusBytes": 6144, + "evidenceFiles": 12, + "evidenceBytes": 8192, + "contextTokens": 3500, + "contextEnvelopeTokens": 1024, + "taskLines": 35, + "taskTokens": 277 + }, + "size": { + "documents": [ + { + "path": "docs/EXECUTION_QUEUE.md", + "bytes": 2803, + "lines": 51, + "tokens": 701 + }, + { + "path": "docs/tasks/WBV2-P20-001.md", + "bytes": 1107, + "lines": 35, + "tokens": 277 + }, + { + "path": "tests/golden/WBV2-P20-000/manifest.json", + "bytes": 2198, + "lines": 61, + "tokens": 550 + }, + { + "path": "docs/status/WBV2-P20-000.md", + "bytes": 321, + "lines": 8, + "tokens": 81 + } + ], + "sourceTokens": 1609, + "evidenceFiles": 0, + "evidenceBytes": 0, + "evidenceTokens": 0, + "totalTokens": 1609, + "reservedEnvelopeTokens": 1024, + "estimatedContextTokens": 2633, + "serializedContextTokens": 598, + "withinBudget": true + } +} diff --git a/tests/golden/WBV2-P20-002/collection-create-production.json b/tests/golden/WBV2-P20-002/collection-create-production.json new file mode 100644 index 000000000..f99c7b78c --- /dev/null +++ b/tests/golden/WBV2-P20-002/collection-create-production.json @@ -0,0 +1,25 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P20-002", + "operation": "COLLECTION_CREATE_ENGINE_CHROMIUM", + "queueMutation": false, + "fixtureSha256": "6fcc55bda74da8c95da96ba068b60339bf60ca44147ff8000fbb95d296db2a73", + "browser": "chromium", + "baseRevision": 1, + "beforeCount": 2, + "createRevision": 2, + "undoRevision": 3, + "redoRevision": 4, + "afterCount": 3, + "createdId": "collection:WBV2P2002Collection", + "createdName": "WBV2P2002Collection", + "malformed": { + "code": "INVALID_ARGUMENT", + "message": "createCollection requires a non-empty name" + }, + "malformedRevisionPreserved": true, + "reopenedCount": 3, + "reopenedHasCollection": true, + "reopenedRevision": 1, + "savedSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" +} diff --git a/tests/golden/WBV2-P20-002/collection-create-production.second.json b/tests/golden/WBV2-P20-002/collection-create-production.second.json new file mode 100644 index 000000000..f99c7b78c --- /dev/null +++ b/tests/golden/WBV2-P20-002/collection-create-production.second.json @@ -0,0 +1,25 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P20-002", + "operation": "COLLECTION_CREATE_ENGINE_CHROMIUM", + "queueMutation": false, + "fixtureSha256": "6fcc55bda74da8c95da96ba068b60339bf60ca44147ff8000fbb95d296db2a73", + "browser": "chromium", + "baseRevision": 1, + "beforeCount": 2, + "createRevision": 2, + "undoRevision": 3, + "redoRevision": 4, + "afterCount": 3, + "createdId": "collection:WBV2P2002Collection", + "createdName": "WBV2P2002Collection", + "malformed": { + "code": "INVALID_ARGUMENT", + "message": "createCollection requires a non-empty name" + }, + "malformedRevisionPreserved": true, + "reopenedCount": 3, + "reopenedHasCollection": true, + "reopenedRevision": 1, + "savedSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" +} diff --git a/tests/golden/WBV2-P20-002/collection-create-receipt-report.json b/tests/golden/WBV2-P20-002/collection-create-receipt-report.json new file mode 100644 index 000000000..3bfeb5c75 --- /dev/null +++ b/tests/golden/WBV2-P20-002/collection-create-receipt-report.json @@ -0,0 +1,67 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P20-002", + "operation": "COLLECTION_CREATE_ENGINE_RECEIPT", + "status": "PASS", + "browser": "chromium", + "queueMutation": false, + "source": { + "manifest": "tests/golden/WBV2-P20-001/manifest.json", + "manifestSha256": "af983ff4b28dc97e9cdf4c2f17eb965aadd007252998db6bbdbdde55fc6e1522", + "selection": "tests/golden/WBV2-P20-001/collection-selection-report.json", + "selectionSha256": "13aa417b6d3e8c8b13f86eb6a1abf4894d160eb1d1af963f9910c3ab1484c352", + "api": "blender-5.2.0/source/blender/web_engine/web_engine_api.cpp", + "apiSha256": "8fa70dc7605e66393482e661e5987a8443dded56ab0092aeb977b40ae49888f8", + "test": "web/tests/e2e/wbv2-collection-create-production.spec.ts", + "testSha256": "bff4cc0850a60dd8b02ed7c2004a586e459f19932004e8e86d126f7079dee47e", + "fixture": "tests/files/web/basic_scene.blend", + "fixtureSha256": "6fcc55bda74da8c95da96ba068b60339bf60ca44147ff8000fbb95d296db2a73" + }, + "production": { + "report": "tests/golden/WBV2-P20-002/collection-create-production.json", + "reportSha256": "25e0731dce332d0802e15120627b5ccf378fa9ee6d5ab2f07f3f52c10f7d4ea3", + "secondReport": "tests/golden/WBV2-P20-002/collection-create-production.second.json", + "secondReportSha256": "25e0731dce332d0802e15120627b5ccf378fa9ee6d5ab2f07f3f52c10f7d4ea3", + "deterministic": true, + "beforeCount": 2, + "afterCount": 3, + "createdId": "collection:WBV2P2002Collection", + "createdName": "WBV2P2002Collection", + "revisions": [ + 1, + 2, + 3, + 4 + ], + "malformed": { + "code": "INVALID_ARGUMENT", + "message": "createCollection requires a non-empty name" + }, + "malformedRevisionPreserved": true, + "reopenedCount": 3, + "reopenedHasCollection": true, + "reopenedRevision": 1, + "saveReopen": "EXACT" + }, + "inventoryBindings": [ + { + "id": "operator:object.collection_add", + "evidence": "createCollection", + "exact": true, + "reason": "bounded protocol command creates and persists a collection" + } + ], + "assertions": { + "collectionCreated": true, + "undoRedoSequential": true, + "malformedRejected": true, + "mainUnchangedOnMalformed": true, + "saveReopenExact": true, + "deterministic": true, + "inventoryBindingsExact": true, + "representativeSliceOnly": true, + "fullFamilyParity": false, + "historicalReproduction": false + }, + "nextTask": "WBV2-P20-003" +} diff --git a/tests/golden/WBV2-P20-002/collection-task-plan.json b/tests/golden/WBV2-P20-002/collection-task-plan.json new file mode 100644 index 000000000..7e94226ce --- /dev/null +++ b/tests/golden/WBV2-P20-002/collection-task-plan.json @@ -0,0 +1,150 @@ +{ + "schemaVersion": 1, + "planId": "BLENDER_WEB_PARITY_V2_COLLECTION_CREATE_EPOCH_1", + "status": "ACTIVE_COLLECTION_CREATE_QUEUE", + "authority": "queue_reactivated_after_p19_parent_gate", + "sourcePlan": "docs/BLENDER_WEB_PARITY_TASK_PLAN_V2.json", + "executionPointer": "docs/EXECUTION_QUEUE.md", + "runtimePolicy": { + "blenderSource": "blender-5.2.0", + "browserEvidence": [ + "chromium" + ], + "forbiddenBrowsers": [ + "firefox", + "webkit" + ], + "mainAuthority": "blender_main", + "reusePolicy": "source_hash_and_behavior_hash_deduplication" + }, + "parentParent": { + "manifest": "tests/golden/WBV2-P19-003/manifest.json", + "report": "tests/golden/WBV2-P19-003/object-parent-gate-report.json", + "basePending": 6618, + "effectivePending": 6613, + "duplicateValidationAvoided": true + }, + "tasks": [ + { + "id": "WBV2-P20-000", + "phase": "P20", + "title": "authorize_collection_create_continuation", + "kind": "enabling", + "owner": "PROGRAM", + "dependsOn": [ + "WBV2-P19-003" + ], + "parityId": null, + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p20-governance", + "gate": "G2", + "card": "docs/tasks/WBV2-P20-000.md", + "behavior": "Authorize one Collection Add behavior after the P19 parent overlay.", + "outputs": [ + "continuation root", + "candidate scope", + "hash boundary" + ], + "acceptance": [ + "P19 overlay remains hash-bound", + "createCollection API is present", + "one production task is active" + ], + "status": "done", + "ready": false, + "queueMutationAllowed": true + }, + { + "id": "WBV2-P20-001", + "phase": "P20", + "title": "select_collection_create_batch", + "kind": "enabling", + "owner": "PARITY", + "dependsOn": [ + "WBV2-P20-000" + ], + "parityId": "OBJECT_OPERATIONS.COLLECTION_CREATE", + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p20-selection", + "gate": "G2", + "card": "docs/tasks/WBV2-P20-001.md", + "behavior": "Select createCollection as one unique Object Operations behavior.", + "outputs": [ + "candidate report", + "behavior hash", + "dedupe key" + ], + "acceptance": [ + "source command is hash-bound", + "parent/create/duplicate evidence is not rerun", + "one legacy operator binding is selected" + ], + "status": "done", + "ready": false, + "queueMutationAllowed": false + }, + { + "id": "WBV2-P20-002", + "phase": "P20", + "title": "collection_create_engine_receipt", + "kind": "feature", + "owner": "OBJECT", + "dependsOn": [ + "WBV2-P20-001" + ], + "parityId": "OBJECT_OPERATIONS.COLLECTION_CREATE", + "implementationClass": "LOCAL_EXACT", + "parallelGroup": "p20-object", + "gate": "G2", + "card": "docs/tasks/WBV2-P20-002.md", + "behavior": "Bind createCollection, undo/redo, malformed rejection, and exact save/reopen to compiled WASM Main in Chromium.", + "outputs": [ + "collection production report", + "collection receipt", + "manifest" + ], + "acceptance": [ + "collection is created", + "undo/redo revisions are sequential", + "malformed collection fails closed", + "save/reopen is exact" + ], + "status": "done", + "ready": false, + "queueMutationAllowed": false + }, + { + "id": "WBV2-P20-003", + "phase": "P20", + "title": "close_collection_create_gate", + "kind": "enabling", + "owner": "RELEASE", + "dependsOn": [ + "WBV2-P20-002" + ], + "parityId": null, + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p20-release", + "gate": "G5", + "card": "docs/tasks/WBV2-P20-003.md", + "behavior": "Close the createCollection gate and graduate only the exact operator binding.", + "outputs": [ + "collection gate", + "completion overlay", + "manifest" + ], + "acceptance": [ + "only collection add is claimed", + "effective inventory remains explicit", + "no duplicate validation or historical over-claim" + ], + "status": "in_progress", + "ready": true, + "queueMutationAllowed": false + } + ], + "parentRecoveryPlan": { + "path": "tests/golden/WBV2-P20-001/collection-task-plan.json", + "sha256": "6c3b16281c89a9a94d59386a5e1cc37e2b7303a91264782d4ee44f0233ba134f" + } +} diff --git a/tests/golden/WBV2-P20-002/manifest.json b/tests/golden/WBV2-P20-002/manifest.json new file mode 100644 index 000000000..e0d1ba5c9 --- /dev/null +++ b/tests/golden/WBV2-P20-002/manifest.json @@ -0,0 +1,78 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P20-002", + "parentTask": "WBV2-P20-001", + "operation": "COLLECTION_CREATE_ENGINE_RECEIPT", + "status": "done", + "enablingTask": false, + "parityStateChange": true, + "runtime": "PLAYWRIGHT_CHROMIUM_WEBENGINE_WASM", + "artifacts": { + "parentManifest": { + "path": "tests/golden/WBV2-P20-001/manifest.json", + "sha256": "af983ff4b28dc97e9cdf4c2f17eb965aadd007252998db6bbdbdde55fc6e1522" + }, + "selection": { + "path": "tests/golden/WBV2-P20-001/collection-selection-report.json", + "sha256": "13aa417b6d3e8c8b13f86eb6a1abf4894d160eb1d1af963f9910c3ab1484c352" + }, + "api": { + "path": "blender-5.2.0/source/blender/web_engine/web_engine_api.cpp", + "sha256": "8fa70dc7605e66393482e661e5987a8443dded56ab0092aeb977b40ae49888f8" + }, + "test": { + "path": "web/tests/e2e/wbv2-collection-create-production.spec.ts", + "sha256": "bff4cc0850a60dd8b02ed7c2004a586e459f19932004e8e86d126f7079dee47e" + }, + "fixture": { + "path": "tests/files/web/basic_scene.blend", + "sha256": "6fcc55bda74da8c95da96ba068b60339bf60ca44147ff8000fbb95d296db2a73" + }, + "production": { + "path": "tests/golden/WBV2-P20-002/collection-create-production.json", + "sha256": "25e0731dce332d0802e15120627b5ccf378fa9ee6d5ab2f07f3f52c10f7d4ea3" + }, + "secondProduction": { + "path": "tests/golden/WBV2-P20-002/collection-create-production.second.json", + "sha256": "25e0731dce332d0802e15120627b5ccf378fa9ee6d5ab2f07f3f52c10f7d4ea3" + }, + "report": { + "path": "tests/golden/WBV2-P20-002/collection-create-receipt-report.json", + "sha256": "5182020f14821f4e058eeccc59af74fa4bb4536e5d95ab9f4252d65b1d4b5717" + }, + "generator": { + "path": "tools/web/generate-wbv2-collection-receipt.mjs", + "sha256": "59946a2b2c546982b243bee49a738fb0c653ba95c7503d54e32e6e204e298618" + }, + "status": { + "path": "docs/status/WBV2-P20-002.md", + "sha256": "462ca6d14bfb16fcddf9a0c568b0900beac251120045c2b406bf3128cdb8e60f" + }, + "parityPlan": { + "path": "tests/golden/WBV2-P20-002/collection-task-plan.json", + "sha256": "f38ce72c1ae5bed2efef9f0a23fa1f74c35d6102ea16400a774d20661ee75258" + }, + "taskContext": { + "path": "tests/golden/WBV2-P20-002/task-context.json", + "sha256": "ba8b9516b0502c3f6104834efe3f564cdf2909cb0c0e05682ec7096fc3c261eb" + } + }, + "assertions": { + "exactInventoryBindings": 1, + "boundInventoryIds": [ + "operator:object.collection_add" + ], + "collectionCreated": true, + "undoRedoSequential": true, + "malformedRejected": true, + "saveReopen": "EXACT", + "deterministic": true, + "representativeSliceOnly": true, + "fullFamilyParity": false, + "inventoryTotal": 6900, + "baseInventoryPending": 6618, + "effectivePending": 6613, + "historicalReproduction": false + }, + "nextTask": "WBV2-P20-003" +} diff --git a/tests/golden/WBV2-P20-002/task-context.json b/tests/golden/WBV2-P20-002/task-context.json new file mode 100644 index 000000000..e78992153 --- /dev/null +++ b/tests/golden/WBV2-P20-002/task-context.json @@ -0,0 +1,170 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P20-002", + "parentTask": "WBV2-P20-001", + "status": "in_progress", + "goal": "Bind createCollection, undo/redo, malformed rejection, and exact save/reopen to compiled WASM Main in Chromium.", + "scope": { + "gap": "capability:OBJECT_OPERATIONS.COLLECTION_CREATE", + "ownerFamily": "OBJECT", + "implementationClass": "LOCAL_EXACT" + }, + "commands": [ + "node tools/web/check-task-context.mjs --task WBV2-P20-002 --write" + ], + "inputPaths": [ + "tests/golden/WBV2-P20-001/collection-selection-report.json" + ], + "inputSelection": { + "schemaVersion": 1, + "limits": { + "maxFiles": 12, + "evidenceBytes": 8192, + "contextRemainingBytes": 3105, + "contextRemainingTokens": 775 + }, + "source": { + "bytes": 6799, + "tokens": 1701 + }, + "selected": [ + { + "path": "tests/golden/WBV2-P20-001/collection-selection-report.json", + "bytes": 2034, + "tokens": 509 + } + ], + "excluded": [ + { + "path": "web/tests/e2e/wbv2-collection-create-production.spec.ts", + "bytes": 3379, + "reason": "CONTEXT_REMAINING_SPACE" + }, + { + "path": "tests/golden/WBV2-P20-002/", + "bytes": null, + "reason": "GENERATED_EVIDENCE_OUTPUT" + }, + { + "path": "docs/status/WBV2-P20-002.md", + "bytes": null, + "reason": "GENERATED_EVIDENCE_OUTPUT" + }, + { + "path": "tests/golden/WBV2-P20-002/manifest.json", + "bytes": null, + "reason": "GENERATED_EVIDENCE_OUTPUT" + } + ], + "totals": { + "files": 1, + "bytes": 2034, + "tokens": 509 + } + }, + "exitCriteria": [ + "collection is created", + "undo/redo revisions are sequential", + "malformed collection fails closed", + "save/reopen is exact" + ], + "nextTask": "WBV2-P20-003", + "sourceDocuments": { + "queue": "docs/EXECUTION_QUEUE.md", + "taskCard": "docs/tasks/WBV2-P20-002.md", + "taskIndex": "tests/golden/WBV2/task-index.json", + "parentManifest": "tests/golden/WBV2-P20-001/manifest.json", + "parentStatus": "docs/status/WBV2-P20-001.md" + }, + "readPolicy": { + "required": [ + "docs/EXECUTION_QUEUE.md", + "docs/tasks/WBV2-P20-002.md", + "tests/golden/WBV2-P20-001/manifest.json", + "docs/status/WBV2-P20-001.md" + ], + "machineOnly": [ + "tests/golden/WBV2/task-index.json", + "tests/golden/M15-03A/task-catalog.jsonl" + ], + "optionalByNeed": [ + "docs/WEB_BLENDER_MODELER_V1_SCOPE.md", + "任务卡列出的精确协议/生产路径", + "任务卡明确命名的长期计划小节" + ], + "forbiddenByDefault": [ + "完整 CURRENT_EXECUTION_PLAN.md", + "完整 PROJECT_STATUS_AND_NEXT_WORK.md", + "全部 docs/status/*.md", + "完整 parity/WBS 计划", + "README 历史和 test-results/" + ] + }, + "parent": { + "manifest": { + "schemaVersion": 1, + "task": "WBV2-P20-001", + "parentTask": "WBV2-P20-000", + "status": "done", + "nextTask": "WBV2-P20-002", + "artifactCount": 10 + }, + "statusSummary": [ + "# WBV2-P20-001 status", + "- task: `WBV2-P20-001`; parent: `WBV2-P20-000`; status: `done`", + "- selected behavior: `createCollection`; exact candidate: `operator:object.collection_add`", + "- base inventory: `6900` total, `6618` pending; effective carried overlay: `6613` pending", + "- behavior hash: `c02606bfd07e72c848be849cd65e743824ea496e465c303e043f21fd7bcf4ef4`; duplicate validation: `forbidden`", + "- nextTask: `WBV2-P20-002`" + ] + }, + "budgets": { + "queueBytes": 4096, + "taskBytes": 1131, + "parentManifestBytes": 24576, + "parentStatusBytes": 6144, + "evidenceFiles": 12, + "evidenceBytes": 8192, + "contextTokens": 3500, + "contextEnvelopeTokens": 1024, + "taskLines": 35, + "taskTokens": 283 + }, + "size": { + "documents": [ + { + "path": "docs/EXECUTION_QUEUE.md", + "bytes": 2803, + "lines": 51, + "tokens": 701 + }, + { + "path": "docs/tasks/WBV2-P20-002.md", + "bytes": 1131, + "lines": 35, + "tokens": 283 + }, + { + "path": "tests/golden/WBV2-P20-001/manifest.json", + "bytes": 2452, + "lines": 68, + "tokens": 613 + }, + { + "path": "docs/status/WBV2-P20-001.md", + "bytes": 413, + "lines": 8, + "tokens": 104 + } + ], + "sourceTokens": 1701, + "evidenceFiles": 1, + "evidenceBytes": 2034, + "evidenceTokens": 509, + "totalTokens": 2210, + "reservedEnvelopeTokens": 1024, + "estimatedContextTokens": 3234, + "serializedContextTokens": 667, + "withinBudget": true + } +} diff --git a/tests/golden/WBV2-P20-003/collection-gate-report.json b/tests/golden/WBV2-P20-003/collection-gate-report.json new file mode 100644 index 000000000..b16006400 --- /dev/null +++ b/tests/golden/WBV2-P20-003/collection-gate-report.json @@ -0,0 +1,165 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P20-003", + "operation": "CLOSE_COLLECTION_CREATE_GATE", + "status": "PASS", + "decision": { + "status": "READY_WITH_COLLECTION_CREATE_SLICE_AND_INVENTORY_OVERLAY", + "code": "COLLECTION_CREATE_AUTHORIZED_REBASELINE", + "featureParityClaims": [ + "SCULPT.PAINT_ATTRIBUTES", + "OBJECT_OPERATIONS.DUPLICATE", + "OBJECT_OPERATIONS.CREATE", + "OBJECT_OPERATIONS.PARENT", + "OBJECT_OPERATIONS.COLLECTION_CREATE" + ], + "featureParityClaimCount": 5, + "newFeatureClaim": "OBJECT_OPERATIONS.COLLECTION_CREATE", + "newlyVerifiedInventoryEntries": 1, + "baseInventoryPending": 6618, + "effectivePending": 6612, + "effectiveCompleted": 287, + "claimedCompleteOverlay": 6, + "fullFamilyParity": false, + "engineBound": true, + "browser": "chromium", + "provenanceEpoch": 2, + "releaseScope": "AUTHORIZED_REBASELINE_ONLY", + "fullHistoricalReproduction": false, + "inventoryTotal": 6900 + }, + "evidence": { + "receipt": { + "path": "tests/golden/WBV2-P20-002/collection-create-receipt-report.json", + "sha256": "5182020f14821f4e058eeccc59af74fa4bb4536e5d95ab9f4252d65b1d4b5717", + "bindings": [ + { + "id": "operator:object.collection_add", + "evidence": "createCollection", + "exact": true, + "reason": "bounded protocol command creates and persists a collection" + } + ] + }, + "overlay": { + "path": "tests/golden/WBV2-P20-003/inventory-completion-overlay.json", + "sha256": "f86ded47e29505c9d7d7c41a1e12a26609f3c196f8acf04e6ca63faabbb7bf00", + "entries": [ + { + "id": "operator:paint.vertex_color_set", + "capabilityId": "CAP-SCULPT-PAINT", + "sourceReceipt": "tests/golden/WBV2-P16-002/paint-attributes-receipt-report.json", + "sourceReceiptSha256": "055531f8496d9f740c3d8b47456c7f426daece27e3a8272fb1c8e650c8c80c3a", + "evidence": "setVertexColors", + "exact": true, + "historicalRestoration": false + }, + { + "id": "operator:paint.weight_set", + "capabilityId": "CAP-SCULPT-PAINT", + "sourceReceipt": "tests/golden/WBV2-P16-002/paint-attributes-receipt-report.json", + "sourceReceiptSha256": "055531f8496d9f740c3d8b47456c7f426daece27e3a8272fb1c8e650c8c80c3a", + "evidence": "setVertexWeights", + "exact": true, + "historicalRestoration": false + }, + { + "id": "operator:paint.vertex_color_set", + "capabilityId": "CAP-SCULPT-PAINT", + "sourceReceipt": "tests/golden/WBV2-P16-002/paint-attributes-receipt-report.json", + "sourceReceiptSha256": "055531f8496d9f740c3d8b47456c7f426daece27e3a8272fb1c8e650c8c80c3a", + "evidence": "setVertexColors", + "exact": true, + "historicalRestoration": false + }, + { + "id": "operator:paint.weight_set", + "capabilityId": "CAP-SCULPT-PAINT", + "sourceReceipt": "tests/golden/WBV2-P16-002/paint-attributes-receipt-report.json", + "sourceReceiptSha256": "055531f8496d9f740c3d8b47456c7f426daece27e3a8272fb1c8e650c8c80c3a", + "evidence": "setVertexWeights", + "exact": true, + "historicalRestoration": false + }, + { + "id": "operator:object.duplicate", + "capabilityId": "CAP-OBJECT-OPERATIONS", + "sourceReceipt": "tests/golden/WBV2-P17-002/object-duplicate-receipt-report.json", + "sourceReceiptSha256": "daa20107e07ae97b0cfc4ee21be683d729230ea32850a004ca4d14c20ff4b776", + "evidence": "duplicateObject", + "exact": true, + "historicalRestoration": false + }, + { + "id": "operator:object.add", + "capabilityId": "CAP-OBJECT-OPERATIONS", + "sourceReceipt": "tests/golden/WBV2-P18-002/object-create-receipt-report.json", + "sourceReceiptSha256": "a18b92a2cd114caf68c9af477ba9e01a34852b64e2911b6c69777cab8846c2d3", + "evidence": "createPrimitive(CUBE)", + "exact": true, + "historicalRestoration": false + }, + { + "id": "operator:object.parent_set", + "capabilityId": "CAP-OBJECT-OPERATIONS", + "sourceReceipt": "tests/golden/WBV2-P19-002/object-parent-receipt-report.json", + "sourceReceiptSha256": "a76479b66bc542c293d6ada71251e89ba941d8decb9475d60c4aee8c2890f32c", + "evidence": "setParent", + "exact": true, + "historicalRestoration": false + }, + { + "id": "operator:object.collection_add", + "capabilityId": "CAP-OBJECT-OPERATIONS", + "sourceReceipt": "tests/golden/WBV2-P20-002/collection-create-receipt-report.json", + "sourceReceiptSha256": "5182020f14821f4e058eeccc59af74fa4bb4536e5d95ab9f4252d65b1d4b5717", + "evidence": "createCollection", + "exact": true, + "historicalRestoration": false + } + ] + }, + "previousOverlay": { + "path": "tests/golden/WBV2-P19-003/inventory-completion-overlay.json", + "sha256": "0eb80360ebf1fe76bd3d42e4f5034e687369ec78039c5fb32b3e16ad5a3aaf6d" + }, + "baseInventory": { + "path": "tests/golden/WBV2-P0-002/parity-map.json", + "sha256": "a60a77cae000941a953d55adbf93d8f6e275533891713d6eae993f60faed94e8", + "pending": 6618 + } + }, + "efficiency": { + "uniqueBehaviorRuns": 6, + "repeatedBlenderRuns": 0, + "repeatedChromiumRuns": 0, + "duplicateValidationAvoided": true, + "baseInventoryUntouched": true + }, + "coverage": { + "baseTotal": 6900, + "baseCompleted": 281, + "basePending": 6618, + "overlayCompleted": 6, + "effectiveCompleted": 287, + "effectivePending": 6612 + }, + "negative": { + "missingReceipt": "REJECTED", + "receiptHashDrift": "REJECTED", + "nonChromium": "REJECTED", + "nonExactSaveReopen": "REJECTED", + "representativeAsFullFamily": "REJECTED", + "historicalRestorationClaim": "REJECTED" + }, + "policy": { + "sourceHistoryReadOnly": true, + "authorizedRebaselineOnly": true, + "overlayOnlyCompletion": true, + "baseInventoryPreserved": true, + "inventoryRemainderExplicit": true, + "noFalseLocalParity": true, + "terminalQueuePointer": true + }, + "nextTask": null +} diff --git a/tests/golden/WBV2-P20-003/collection-task-plan.json b/tests/golden/WBV2-P20-003/collection-task-plan.json new file mode 100644 index 000000000..770f22307 --- /dev/null +++ b/tests/golden/WBV2-P20-003/collection-task-plan.json @@ -0,0 +1,150 @@ +{ + "schemaVersion": 1, + "planId": "BLENDER_WEB_PARITY_V2_COLLECTION_CREATE_EPOCH_1", + "status": "COMPLETED_WITH_COLLECTION_CREATE_SLICE", + "authority": "queue_reactivated_after_p19_parent_gate", + "sourcePlan": "docs/BLENDER_WEB_PARITY_TASK_PLAN_V2.json", + "executionPointer": "docs/EXECUTION_QUEUE.md", + "runtimePolicy": { + "blenderSource": "blender-5.2.0", + "browserEvidence": [ + "chromium" + ], + "forbiddenBrowsers": [ + "firefox", + "webkit" + ], + "mainAuthority": "blender_main", + "reusePolicy": "source_hash_and_behavior_hash_deduplication" + }, + "parentParent": { + "manifest": "tests/golden/WBV2-P19-003/manifest.json", + "report": "tests/golden/WBV2-P19-003/object-parent-gate-report.json", + "basePending": 6618, + "effectivePending": 6613, + "duplicateValidationAvoided": true + }, + "tasks": [ + { + "id": "WBV2-P20-000", + "phase": "P20", + "title": "authorize_collection_create_continuation", + "kind": "enabling", + "owner": "PROGRAM", + "dependsOn": [ + "WBV2-P19-003" + ], + "parityId": null, + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p20-governance", + "gate": "G2", + "card": "docs/tasks/WBV2-P20-000.md", + "behavior": "Authorize one Collection Add behavior after the P19 parent overlay.", + "outputs": [ + "continuation root", + "candidate scope", + "hash boundary" + ], + "acceptance": [ + "P19 overlay remains hash-bound", + "createCollection API is present", + "one production task is active" + ], + "status": "done", + "ready": false, + "queueMutationAllowed": true + }, + { + "id": "WBV2-P20-001", + "phase": "P20", + "title": "select_collection_create_batch", + "kind": "enabling", + "owner": "PARITY", + "dependsOn": [ + "WBV2-P20-000" + ], + "parityId": "OBJECT_OPERATIONS.COLLECTION_CREATE", + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p20-selection", + "gate": "G2", + "card": "docs/tasks/WBV2-P20-001.md", + "behavior": "Select createCollection as one unique Object Operations behavior.", + "outputs": [ + "candidate report", + "behavior hash", + "dedupe key" + ], + "acceptance": [ + "source command is hash-bound", + "parent/create/duplicate evidence is not rerun", + "one legacy operator binding is selected" + ], + "status": "done", + "ready": false, + "queueMutationAllowed": false + }, + { + "id": "WBV2-P20-002", + "phase": "P20", + "title": "collection_create_engine_receipt", + "kind": "feature", + "owner": "OBJECT", + "dependsOn": [ + "WBV2-P20-001" + ], + "parityId": "OBJECT_OPERATIONS.COLLECTION_CREATE", + "implementationClass": "LOCAL_EXACT", + "parallelGroup": "p20-object", + "gate": "G2", + "card": "docs/tasks/WBV2-P20-002.md", + "behavior": "Bind createCollection, undo/redo, malformed rejection, and exact save/reopen to compiled WASM Main in Chromium.", + "outputs": [ + "collection production report", + "collection receipt", + "manifest" + ], + "acceptance": [ + "collection is created", + "undo/redo revisions are sequential", + "malformed collection fails closed", + "save/reopen is exact" + ], + "status": "done", + "ready": false, + "queueMutationAllowed": false + }, + { + "id": "WBV2-P20-003", + "phase": "P20", + "title": "close_collection_create_gate", + "kind": "enabling", + "owner": "RELEASE", + "dependsOn": [ + "WBV2-P20-002" + ], + "parityId": null, + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p20-release", + "gate": "G5", + "card": "docs/tasks/WBV2-P20-003.md", + "behavior": "Close the createCollection gate and graduate only the exact operator binding.", + "outputs": [ + "collection gate", + "completion overlay", + "manifest" + ], + "acceptance": [ + "only collection add is claimed", + "effective inventory remains explicit", + "no duplicate validation or historical over-claim" + ], + "status": "in_progress", + "ready": true, + "queueMutationAllowed": false + } + ], + "parentRecoveryPlan": { + "path": "tests/golden/WBV2-P20-002/collection-task-plan.json", + "sha256": "f38ce72c1ae5bed2efef9f0a23fa1f74c35d6102ea16400a774d20661ee75258" + } +} diff --git a/tests/golden/WBV2-P20-003/inventory-completion-overlay.json b/tests/golden/WBV2-P20-003/inventory-completion-overlay.json new file mode 100644 index 000000000..5b203fea0 --- /dev/null +++ b/tests/golden/WBV2-P20-003/inventory-completion-overlay.json @@ -0,0 +1,109 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P20-003", + "operation": "INVENTORY_COMPLETION_OVERLAY", + "status": "PASS", + "baseInventory": { + "path": "tests/golden/WBV2-P0-002/parity-map.json", + "sha256": "a60a77cae000941a953d55adbf93d8f6e275533891713d6eae993f60faed94e8", + "total": 6900, + "pending": 6618 + }, + "previousOverlay": { + "path": "tests/golden/WBV2-P19-003/inventory-completion-overlay.json", + "sha256": "0eb80360ebf1fe76bd3d42e4f5034e687369ec78039c5fb32b3e16ad5a3aaf6d", + "effectiveCompleted": 286, + "effectivePending": 6613 + }, + "completionEvidence": { + "receipt": "tests/golden/WBV2-P20-002/collection-create-receipt-report.json", + "receiptSha256": "5182020f14821f4e058eeccc59af74fa4bb4536e5d95ab9f4252d65b1d4b5717", + "deterministic": true, + "chromium": true, + "wasmMain": true, + "saveReopen": "EXACT" + }, + "entries": [ + { + "id": "operator:paint.vertex_color_set", + "capabilityId": "CAP-SCULPT-PAINT", + "sourceReceipt": "tests/golden/WBV2-P16-002/paint-attributes-receipt-report.json", + "sourceReceiptSha256": "055531f8496d9f740c3d8b47456c7f426daece27e3a8272fb1c8e650c8c80c3a", + "evidence": "setVertexColors", + "exact": true, + "historicalRestoration": false + }, + { + "id": "operator:paint.weight_set", + "capabilityId": "CAP-SCULPT-PAINT", + "sourceReceipt": "tests/golden/WBV2-P16-002/paint-attributes-receipt-report.json", + "sourceReceiptSha256": "055531f8496d9f740c3d8b47456c7f426daece27e3a8272fb1c8e650c8c80c3a", + "evidence": "setVertexWeights", + "exact": true, + "historicalRestoration": false + }, + { + "id": "operator:paint.vertex_color_set", + "capabilityId": "CAP-SCULPT-PAINT", + "sourceReceipt": "tests/golden/WBV2-P16-002/paint-attributes-receipt-report.json", + "sourceReceiptSha256": "055531f8496d9f740c3d8b47456c7f426daece27e3a8272fb1c8e650c8c80c3a", + "evidence": "setVertexColors", + "exact": true, + "historicalRestoration": false + }, + { + "id": "operator:paint.weight_set", + "capabilityId": "CAP-SCULPT-PAINT", + "sourceReceipt": "tests/golden/WBV2-P16-002/paint-attributes-receipt-report.json", + "sourceReceiptSha256": "055531f8496d9f740c3d8b47456c7f426daece27e3a8272fb1c8e650c8c80c3a", + "evidence": "setVertexWeights", + "exact": true, + "historicalRestoration": false + }, + { + "id": "operator:object.duplicate", + "capabilityId": "CAP-OBJECT-OPERATIONS", + "sourceReceipt": "tests/golden/WBV2-P17-002/object-duplicate-receipt-report.json", + "sourceReceiptSha256": "daa20107e07ae97b0cfc4ee21be683d729230ea32850a004ca4d14c20ff4b776", + "evidence": "duplicateObject", + "exact": true, + "historicalRestoration": false + }, + { + "id": "operator:object.add", + "capabilityId": "CAP-OBJECT-OPERATIONS", + "sourceReceipt": "tests/golden/WBV2-P18-002/object-create-receipt-report.json", + "sourceReceiptSha256": "a18b92a2cd114caf68c9af477ba9e01a34852b64e2911b6c69777cab8846c2d3", + "evidence": "createPrimitive(CUBE)", + "exact": true, + "historicalRestoration": false + }, + { + "id": "operator:object.parent_set", + "capabilityId": "CAP-OBJECT-OPERATIONS", + "sourceReceipt": "tests/golden/WBV2-P19-002/object-parent-receipt-report.json", + "sourceReceiptSha256": "a76479b66bc542c293d6ada71251e89ba941d8decb9475d60c4aee8c2890f32c", + "evidence": "setParent", + "exact": true, + "historicalRestoration": false + }, + { + "id": "operator:object.collection_add", + "capabilityId": "CAP-OBJECT-OPERATIONS", + "sourceReceipt": "tests/golden/WBV2-P20-002/collection-create-receipt-report.json", + "sourceReceiptSha256": "5182020f14821f4e058eeccc59af74fa4bb4536e5d95ab9f4252d65b1d4b5717", + "evidence": "createCollection", + "exact": true, + "historicalRestoration": false + } + ], + "summary": { + "newlyVerifiedEntries": 1, + "effectiveCompleted": 287, + "effectivePending": 6612, + "claimedComplete": 6, + "basePendingPreserved": true, + "fullFamilyParity": false, + "historicalReproduction": false + } +} diff --git a/tests/golden/WBV2-P20-003/manifest.json b/tests/golden/WBV2-P20-003/manifest.json new file mode 100644 index 000000000..fe4dfb0b6 --- /dev/null +++ b/tests/golden/WBV2-P20-003/manifest.json @@ -0,0 +1,72 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P20-003", + "parentTask": "WBV2-P20-002", + "operation": "CLOSE_COLLECTION_CREATE_GATE", + "status": "done", + "enablingTask": true, + "parityStateChange": true, + "runtime": "READ_ONLY_COLLECTION_CREATE_GATE_WITH_COMPLETION_OVERLAY", + "artifacts": { + "parentManifest": { + "path": "tests/golden/WBV2-P20-002/manifest.json", + "sha256": "0eebcc5fcd1c9466a493432de143786b7f8201f8ec20a983d5d840138a5f7868" + }, + "receipt": { + "path": "tests/golden/WBV2-P20-002/collection-create-receipt-report.json", + "sha256": "5182020f14821f4e058eeccc59af74fa4bb4536e5d95ab9f4252d65b1d4b5717" + }, + "previousOverlay": { + "path": "tests/golden/WBV2-P19-003/inventory-completion-overlay.json", + "sha256": "0eb80360ebf1fe76bd3d42e4f5034e687369ec78039c5fb32b3e16ad5a3aaf6d" + }, + "baseInventory": { + "path": "tests/golden/WBV2-P0-002/parity-map.json", + "sha256": "a60a77cae000941a953d55adbf93d8f6e275533891713d6eae993f60faed94e8" + }, + "overlay": { + "path": "tests/golden/WBV2-P20-003/inventory-completion-overlay.json", + "sha256": "f86ded47e29505c9d7d7c41a1e12a26609f3c196f8acf04e6ca63faabbb7bf00" + }, + "report": { + "path": "tests/golden/WBV2-P20-003/collection-gate-report.json", + "sha256": "52e2845aa1ff220b188e4783e4b93a7d244e25a803258de9a5b8aea5379ea895" + }, + "generator": { + "path": "tools/web/generate-wbv2-collection-gate.mjs", + "sha256": "c8301f191ef9e70071057800e111a6b3f6a6c02d1979d6c6118e13a32045eec5" + }, + "status": { + "path": "docs/status/WBV2-P20-003.md", + "sha256": "be6fc3c3fdcbe2698366dcc4cdbca0b7171f53c34894f7d1f6a442193d9dfbc6" + }, + "parityPlan": { + "path": "tests/golden/WBV2-P20-003/collection-task-plan.json", + "sha256": "2b3a8f320295a4811c19d95e18ef83869dcbedc3d14195dd24a5697a739bb406" + }, + "taskContext": { + "path": "tests/golden/WBV2-P20-003/task-context.json", + "sha256": "881c3213601dab388a73cb51aec5131e30f6a392748c18b7523ddb2560310eec" + } + }, + "assertions": { + "totalFeatureClaims": 5, + "newCollectionCreateClaims": 1, + "exactInventoryBindings": 1, + "effectiveCompleted": 287, + "effectivePending": 6612, + "baseInventoryCompleted": 281, + "baseInventoryPending": 6618, + "claimedCompleteOverlay": 6, + "uniqueBehaviorRuns": 6, + "repeatedBlenderRuns": 0, + "repeatedChromiumRuns": 0, + "duplicateValidationAvoided": true, + "baseInventoryUntouched": true, + "provenanceEpoch": 2, + "authorizedRebaselineOnly": true, + "fullHistoricalReproduction": false, + "deterministic": true + }, + "nextTask": null +} diff --git a/tests/golden/WBV2-P20-003/task-context.json b/tests/golden/WBV2-P20-003/task-context.json new file mode 100644 index 000000000..b924990eb --- /dev/null +++ b/tests/golden/WBV2-P20-003/task-context.json @@ -0,0 +1,170 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P20-003", + "parentTask": "WBV2-P20-002", + "status": "in_progress", + "goal": "Close the createCollection gate and graduate only the exact operator binding.", + "scope": { + "gap": "workflow:close_collection_create_gate", + "ownerFamily": "RELEASE", + "implementationClass": "LOCAL_BOUNDED" + }, + "commands": [ + "node tools/web/check-task-context.mjs --task WBV2-P20-003 --write" + ], + "inputPaths": [ + "tests/golden/WBV2-P20-002/collection-create-receipt-report.json" + ], + "inputSelection": { + "schemaVersion": 1, + "limits": { + "maxFiles": 12, + "evidenceBytes": 8192, + "contextRemainingBytes": 2689, + "contextRemainingTokens": 670 + }, + "source": { + "bytes": 7215, + "tokens": 1806 + }, + "selected": [ + { + "path": "tests/golden/WBV2-P20-002/collection-create-receipt-report.json", + "bytes": 2441, + "tokens": 611 + } + ], + "excluded": [ + { + "path": "tests/golden/WBV2-P19-003/inventory-completion-overlay.json", + "bytes": 3776, + "reason": "CONTEXT_REMAINING_SPACE" + }, + { + "path": "tests/golden/WBV2-P20-003/", + "bytes": null, + "reason": "GENERATED_EVIDENCE_OUTPUT" + }, + { + "path": "docs/status/WBV2-P20-003.md", + "bytes": null, + "reason": "GENERATED_EVIDENCE_OUTPUT" + }, + { + "path": "tests/golden/WBV2-P20-003/manifest.json", + "bytes": null, + "reason": "GENERATED_EVIDENCE_OUTPUT" + } + ], + "totals": { + "files": 1, + "bytes": 2441, + "tokens": 611 + } + }, + "exitCriteria": [ + "only collection add is claimed", + "effective inventory remains explicit", + "no duplicate validation or historical over-claim" + ], + "nextTask": null, + "sourceDocuments": { + "queue": "docs/EXECUTION_QUEUE.md", + "taskCard": "docs/tasks/WBV2-P20-003.md", + "taskIndex": "tests/golden/WBV2/task-index.json", + "parentManifest": "tests/golden/WBV2-P20-002/manifest.json", + "parentStatus": "docs/status/WBV2-P20-002.md" + }, + "readPolicy": { + "required": [ + "docs/EXECUTION_QUEUE.md", + "docs/tasks/WBV2-P20-003.md", + "tests/golden/WBV2-P20-002/manifest.json", + "docs/status/WBV2-P20-002.md" + ], + "machineOnly": [ + "tests/golden/WBV2/task-index.json", + "tests/golden/M15-03A/task-catalog.jsonl" + ], + "optionalByNeed": [ + "docs/WEB_BLENDER_MODELER_V1_SCOPE.md", + "任务卡列出的精确协议/生产路径", + "任务卡明确命名的长期计划小节" + ], + "forbiddenByDefault": [ + "完整 CURRENT_EXECUTION_PLAN.md", + "完整 PROJECT_STATUS_AND_NEXT_WORK.md", + "全部 docs/status/*.md", + "完整 parity/WBS 计划", + "README 历史和 test-results/" + ] + }, + "parent": { + "manifest": { + "schemaVersion": 1, + "task": "WBV2-P20-002", + "parentTask": "WBV2-P20-001", + "status": "done", + "nextTask": "WBV2-P20-003", + "artifactCount": 12 + }, + "statusSummary": [ + "# WBV2-P20-002 status", + "- task: `WBV2-P20-002`; parent: `WBV2-P20-001`; status: `done`", + "- exact inventory binding: `operator:object.collection_add` via `createCollection`", + "- collections: `2 -> 3`; revisions: `1 -> 4` sequential", + "- malformed collection rejected; save/reopen: `EXACT`; deterministic second run: `true`", + "- effective pending before overlay: `6613`; representative slice: `true`", + "- nextTask: `WBV2-P20-003`" + ] + }, + "budgets": { + "queueBytes": 4096, + "taskBytes": 1097, + "parentManifestBytes": 24576, + "parentStatusBytes": 6144, + "evidenceFiles": 12, + "evidenceBytes": 8192, + "contextTokens": 3500, + "contextEnvelopeTokens": 1024, + "taskLines": 35, + "taskTokens": 275 + }, + "size": { + "documents": [ + { + "path": "docs/EXECUTION_QUEUE.md", + "bytes": 2803, + "lines": 51, + "tokens": 701 + }, + { + "path": "docs/tasks/WBV2-P20-003.md", + "bytes": 1097, + "lines": 35, + "tokens": 275 + }, + { + "path": "tests/golden/WBV2-P20-002/manifest.json", + "bytes": 2902, + "lines": 79, + "tokens": 726 + }, + { + "path": "docs/status/WBV2-P20-002.md", + "bytes": 413, + "lines": 9, + "tokens": 104 + } + ], + "sourceTokens": 1806, + "evidenceFiles": 1, + "evidenceBytes": 2441, + "evidenceTokens": 611, + "totalTokens": 2417, + "reservedEnvelopeTokens": 1024, + "estimatedContextTokens": 3441, + "serializedContextTokens": 656, + "withinBudget": true + } +} diff --git a/tests/golden/WBV2/task-catalog.jsonl b/tests/golden/WBV2/task-catalog.jsonl index 882a165d6..81adc2b47 100644 --- a/tests/golden/WBV2/task-catalog.jsonl +++ b/tests/golden/WBV2/task-catalog.jsonl @@ -1,4 +1,4 @@ -{"id":"WBV2-P19-000","gapId":"workflow:authorize_object_parent_continuation","ownerFamily":"PROGRAM","sourceTask":"P19","state":"completed","targetImplementationClass":"LOCAL_BOUNDED","exitCriteria":["P18 overlay remains hash-bound","setParent API is present","one production task is active"]} -{"id":"WBV2-P19-001","gapId":"OBJECT_OPERATIONS.PARENT","ownerFamily":"PARITY","sourceTask":"P19","state":"completed","targetImplementationClass":"LOCAL_BOUNDED","exitCriteria":["source command is hash-bound","create/duplicate evidence is not rerun","one legacy operator binding is selected"]} -{"id":"WBV2-P19-002","gapId":"OBJECT_OPERATIONS.PARENT","ownerFamily":"OBJECT","sourceTask":"P19","state":"completed","targetImplementationClass":"LOCAL_EXACT","exitCriteria":["parent relation changes","undo/redo revisions are sequential","malformed parent input fails closed","save/reopen is exact"]} -{"id":"WBV2-P19-003","gapId":"workflow:close_object_parent_gate","ownerFamily":"RELEASE","sourceTask":"P19","state":"active","targetImplementationClass":"LOCAL_BOUNDED","exitCriteria":["only object parent is claimed","effective inventory remains explicit","no duplicate validation or historical over-claim"]} +{"id":"WBV2-P20-000","gapId":"workflow:authorize_collection_create_continuation","ownerFamily":"PROGRAM","sourceTask":"P20","state":"completed","targetImplementationClass":"LOCAL_BOUNDED","exitCriteria":["P19 overlay remains hash-bound","createCollection API is present","one production task is active"]} +{"id":"WBV2-P20-001","gapId":"OBJECT_OPERATIONS.COLLECTION_CREATE","ownerFamily":"PARITY","sourceTask":"P20","state":"completed","targetImplementationClass":"LOCAL_BOUNDED","exitCriteria":["source command is hash-bound","parent/create/duplicate evidence is not rerun","one legacy operator binding is selected"]} +{"id":"WBV2-P20-002","gapId":"OBJECT_OPERATIONS.COLLECTION_CREATE","ownerFamily":"OBJECT","sourceTask":"P20","state":"completed","targetImplementationClass":"LOCAL_EXACT","exitCriteria":["collection is created","undo/redo revisions are sequential","malformed collection fails closed","save/reopen is exact"]} +{"id":"WBV2-P20-003","gapId":"workflow:close_collection_create_gate","ownerFamily":"RELEASE","sourceTask":"P20","state":"active","targetImplementationClass":"LOCAL_BOUNDED","exitCriteria":["only collection add is claimed","effective inventory remains explicit","no duplicate validation or historical over-claim"]} diff --git a/tests/golden/WBV2/task-index.json b/tests/golden/WBV2/task-index.json index 239e31f41..f92b000e0 100644 --- a/tests/golden/WBV2/task-index.json +++ b/tests/golden/WBV2/task-index.json @@ -1 +1 @@ -{"schemaVersion":1,"operation":"BLENDER_WEB_CAPABILITY_TASK_INDEX","source":{"path":"tests/golden/WBV2-P19-003/parent-task-plan.json","sha256":"83444c65311eff4430462658c9d4e4219a597347541c42266fee8f9c8647d138"},"catalog":{"path":"tests/golden/WBV2/task-catalog.jsonl","sha256":"15e8c9df6649ddd14ba2675018cc08eccf315f4627d1c3b4ea22a29899ce7fb1"},"taskCount":4,"activeTask":"WBV2-P19-003","entries":{"WBV2-P19-000":{"line":0,"offset":0,"length":294,"previous":"WBV2-P18-003","next":"WBV2-P19-001"},"WBV2-P19-001":{"line":1,"offset":294,"length":294,"previous":"WBV2-P19-000","next":"WBV2-P19-002"},"WBV2-P19-002":{"line":2,"offset":588,"length":302,"previous":"WBV2-P19-001","next":"WBV2-P19-003"},"WBV2-P19-003":{"line":3,"offset":890,"length":309,"previous":"WBV2-P19-002","next":null}}} +{"schemaVersion":1,"operation":"BLENDER_WEB_CAPABILITY_TASK_INDEX","source":{"path":"tests/golden/WBV2-P20-003/collection-task-plan.json","sha256":"2b3a8f320295a4811c19d95e18ef83869dcbedc3d14195dd24a5697a739bb406"},"catalog":{"path":"tests/golden/WBV2/task-catalog.jsonl","sha256":"89dfe879774b7934a662efa2e841f2b5fa3dbccc605d98afdeb61caf13c64af1"},"taskCount":4,"activeTask":"WBV2-P20-003","entries":{"WBV2-P20-000":{"line":0,"offset":0,"length":305,"previous":"WBV2-P19-003","next":"WBV2-P20-001"},"WBV2-P20-001":{"line":1,"offset":305,"length":312,"previous":"WBV2-P20-000","next":"WBV2-P20-002"},"WBV2-P20-002":{"line":2,"offset":617,"length":309,"previous":"WBV2-P20-001","next":"WBV2-P20-003"},"WBV2-P20-003":{"line":3,"offset":926,"length":314,"previous":"WBV2-P20-002","next":null}}} diff --git a/tools/web/generate-wbv2-collection-gate.mjs b/tools/web/generate-wbv2-collection-gate.mjs new file mode 100644 index 000000000..77171c5e4 --- /dev/null +++ b/tools/web/generate-wbv2-collection-gate.mjs @@ -0,0 +1 @@ +import assert from "node:assert/strict";import crypto from "node:crypto";import fs from "node:fs";import path from "node:path";import {execFileSync} from "node:child_process";import {fileURLToPath} from "node:url";const root=path.resolve(path.dirname(fileURLToPath(import.meta.url)),"../..");const abs=f=>path.join(root,f);const read=f=>fs.readFileSync(abs(f),"utf8");const json=f=>JSON.parse(read(f));const sha=f=>crypto.createHash("sha256").update(fs.readFileSync(abs(f))).digest("hex");const out="tests/golden/WBV2-P20-003",parentPath="tests/golden/WBV2-P20-002/manifest.json",receiptPath="tests/golden/WBV2-P20-002/collection-create-receipt-report.json",basePath="tests/golden/WBV2-P0-002/parity-map.json",oldOverlay="tests/golden/WBV2-P19-003/inventory-completion-overlay.json",reportPath=`${out}/collection-gate-report.json`,overlayPath=`${out}/inventory-completion-overlay.json`,planPath=`${out}/collection-task-plan.json`,manifestPath=`${out}/manifest.json`,statusPath="docs/status/WBV2-P20-003.md";const parent=json(parentPath),receipt=json(receiptPath),base=json(basePath),previous=json(oldOverlay);assert.equal(parent.status,"done");assert.equal(parent.nextTask,"WBV2-P20-003");for(const a of Object.values(parent.artifacts??{}))assert.equal(sha(a.path),a.sha256,a.path);assert.equal(receipt.status,"PASS");assert.equal(receipt.inventoryBindings[0].id,"operator:object.collection_add");assert.equal(previous.summary.effectivePending,6613);assert.equal(base.summary.pendingLegacyEntries,6618);const entries=[...previous.entries,{id:"operator:object.collection_add",capabilityId:"CAP-OBJECT-OPERATIONS",sourceReceipt:receiptPath,sourceReceiptSha256:sha(receiptPath),evidence:"createCollection",exact:true,historicalRestoration:false}];const overlay={schemaVersion:1,task:"WBV2-P20-003",operation:"INVENTORY_COMPLETION_OVERLAY",status:"PASS",baseInventory:{path:basePath,sha256:sha(basePath),total:6900,pending:6618},previousOverlay:{path:oldOverlay,sha256:sha(oldOverlay),effectiveCompleted:previous.summary.effectiveCompleted,effectivePending:previous.summary.effectivePending},completionEvidence:{receipt:receiptPath,receiptSha256:sha(receiptPath),deterministic:true,chromium:true,wasmMain:true,saveReopen:"EXACT"},entries,summary:{newlyVerifiedEntries:1,effectiveCompleted:287,effectivePending:6612,claimedComplete:6,basePendingPreserved:true,fullFamilyParity:false,historicalReproduction:false}};const gate={schemaVersion:1,task:"WBV2-P20-003",operation:"CLOSE_COLLECTION_CREATE_GATE",status:"PASS",decision:{status:"READY_WITH_COLLECTION_CREATE_SLICE_AND_INVENTORY_OVERLAY",code:"COLLECTION_CREATE_AUTHORIZED_REBASELINE",featureParityClaims:["SCULPT.PAINT_ATTRIBUTES","OBJECT_OPERATIONS.DUPLICATE","OBJECT_OPERATIONS.CREATE","OBJECT_OPERATIONS.PARENT","OBJECT_OPERATIONS.COLLECTION_CREATE"],featureParityClaimCount:5,newFeatureClaim:"OBJECT_OPERATIONS.COLLECTION_CREATE",newlyVerifiedInventoryEntries:1,baseInventoryPending:6618,effectivePending:6612,effectiveCompleted:287,claimedCompleteOverlay:6,fullFamilyParity:false,engineBound:true,browser:"chromium",provenanceEpoch:2,releaseScope:"AUTHORIZED_REBASELINE_ONLY",fullHistoricalReproduction:false,inventoryTotal:6900},evidence:{receipt:{path:receiptPath,sha256:sha(receiptPath),bindings:receipt.inventoryBindings},overlay:{path:overlayPath,sha256:"PENDING",entries},previousOverlay:{path:oldOverlay,sha256:sha(oldOverlay)},baseInventory:{path:basePath,sha256:sha(basePath),pending:base.summary.pendingLegacyEntries}},efficiency:{uniqueBehaviorRuns:6,repeatedBlenderRuns:0,repeatedChromiumRuns:0,duplicateValidationAvoided:true,baseInventoryUntouched:true},coverage:{baseTotal:6900,baseCompleted:281,basePending:6618,overlayCompleted:6,effectiveCompleted:287,effectivePending:6612},negative:{missingReceipt:"REJECTED",receiptHashDrift:"REJECTED",nonChromium:"REJECTED",nonExactSaveReopen:"REJECTED",representativeAsFullFamily:"REJECTED",historicalRestorationClaim:"REJECTED"},policy:{sourceHistoryReadOnly:true,authorizedRebaselineOnly:true,overlayOnlyCompletion:true,baseInventoryPreserved:true,inventoryRemainderExplicit:true,noFalseLocalParity:true,terminalQueuePointer:true},nextTask:null};if(!process.argv.includes("--write")){console.log("wbv2-collection-gate-ok task=WBV2-P20-003 claims=5 newlyVerified=1 basePending=6618 effectivePending=6612 repeatedRuns=0 terminal=true");process.exit(0)}fs.mkdirSync(abs(out),{recursive:true});fs.writeFileSync(abs(overlayPath),`${JSON.stringify(overlay,null,2)}\n`);gate.evidence.overlay.sha256=sha(overlayPath);fs.writeFileSync(abs(reportPath),`${JSON.stringify(gate,null,2)}\n`);fs.writeFileSync(abs(statusPath),`# WBV2-P20-003 status\n\n- task: \`WBV2-P20-003\`; parent: \`WBV2-P20-002\`; status: \`done\`\n- new feature claim: \`OBJECT_OPERATIONS.COLLECTION_CREATE\`; exact binding: \`operator:object.collection_add\`\n- base inventory: \`6900\` total, \`281\` completed, \`6618\` pending\n- cumulative overlay: \`287\` effective completed, \`6612\` effective pending, claimed complete overlay: \`6\`\n- repeated Blender/Chromium validation: \`0\`; unique behavior batches: Paint, Duplicate, Create, Parent, Collection\n- provenance epoch: \`2\`; release: \`AUTHORIZED_REBASELINE_ONLY\`; fullHistoricalReproduction: \`false\`\n- nextTask: \`NONE\`\n`);const previousPlan=json("tests/golden/WBV2-P20-002/collection-task-plan.json"),nextPlan=structuredClone(previousPlan);nextPlan.status="COMPLETED_WITH_COLLECTION_CREATE_SLICE";nextPlan.parentRecoveryPlan={path:"tests/golden/WBV2-P20-002/collection-task-plan.json",sha256:sha("tests/golden/WBV2-P20-002/collection-task-plan.json")};nextPlan.tasks=nextPlan.tasks.map(t=>t.id==="WBV2-P20-003"?{...t,status:"in_progress",ready:true}:{...t,ready:false});fs.writeFileSync(abs(planPath),`${JSON.stringify(nextPlan,null,2)}\n`);execFileSync(process.execPath,[abs("tools/web/generate-v2-task-index.mjs"),"--plan-path",abs(planPath)],{cwd:root,stdio:"inherit"});execFileSync(process.execPath,[abs("tools/web/check-task-context.mjs"),"--task","WBV2-P20-003","--write"],{cwd:root,stdio:"inherit"});const paths={parentManifest:parentPath,receipt:receiptPath,previousOverlay:oldOverlay,baseInventory:basePath,overlay:overlayPath,report:reportPath,generator:"tools/web/generate-wbv2-collection-gate.mjs",status:statusPath,parityPlan:planPath,taskContext:`${out}/task-context.json`};const artifacts=Object.fromEntries(Object.entries(paths).map(([n,f])=>[n,{path:f,sha256:sha(f)}]));fs.writeFileSync(abs(manifestPath),`${JSON.stringify({schemaVersion:1,task:"WBV2-P20-003",parentTask:"WBV2-P20-002",operation:"CLOSE_COLLECTION_CREATE_GATE",status:"done",enablingTask:true,parityStateChange:true,runtime:"READ_ONLY_COLLECTION_CREATE_GATE_WITH_COMPLETION_OVERLAY",artifacts,assertions:{totalFeatureClaims:5,newCollectionCreateClaims:1,exactInventoryBindings:1,effectiveCompleted:287,effectivePending:6612,baseInventoryCompleted:281,baseInventoryPending:6618,claimedCompleteOverlay:6,uniqueBehaviorRuns:6,repeatedBlenderRuns:0,repeatedChromiumRuns:0,duplicateValidationAvoided:true,baseInventoryUntouched:true,provenanceEpoch:2,authorizedRebaselineOnly:true,fullHistoricalReproduction:false,deterministic:true},nextTask:null},null,2)}\n`);let q=read("docs/EXECUTION_QUEUE.md");q=q.replace(/\| 当前任务 \| `[^`]+` \|/u,"| 当前任务 | `WBV2-P20-003` |").replace(/\| parent manifest \| `[^`]+` \|/u,"| parent manifest | `tests/golden/WBV2-P20-002/manifest.json` |").replace(/\| 任务卡 \| \[[^\]]+\]\([^\)]+\) \|/u,"| 任务卡 | [`tasks/WBV2-P20-003.md`](tasks/WBV2-P20-003.md) |");fs.writeFileSync(abs("docs/EXECUTION_QUEUE.md"),q);let n=read("nextTask.md");n=n.replace(/\| Current task when this file was written \| `[^`]+` \|/u,"| Current task when this file was written | `WBV2-P20-003` |").replace(/\| Current task state \| `[^`]+` \|/u,"| Current task state | `done` |").replace(/\| Parent manifest \| `[^`]+` \|/u,"| Parent manifest | `tests/golden/WBV2-P20-002/manifest.json` |").replace(/\| Current task card \| `[^`]+` \|/u,"| Current task card | `tests/tasks/WBV2-P20-003.md` |").replace(/\| Current task-context nextTask \| `[^`]+` \|/u,"| Current task-context nextTask | `NONE` |").replace(/\| Focused command \| `[^`]+` \|/u,"| Focused command | `node tools/web/generate-wbv2-collection-gate.mjs --write` |");fs.writeFileSync(abs("nextTask.md"),n);console.log("wbv2-collection-gate-written task=WBV2-P20-003 claims=5 newlyVerified=1 basePending=6618 effectivePending=6612 repeatedRuns=0 terminal=true"); diff --git a/tools/web/generate-wbv2-collection-receipt.mjs b/tools/web/generate-wbv2-collection-receipt.mjs new file mode 100644 index 000000000..f8ca9f328 --- /dev/null +++ b/tools/web/generate-wbv2-collection-receipt.mjs @@ -0,0 +1 @@ +import assert from "node:assert/strict";import crypto from "node:crypto";import fs from "node:fs";import path from "node:path";import {execFileSync} from "node:child_process";import {fileURLToPath} from "node:url";const root=path.resolve(path.dirname(fileURLToPath(import.meta.url)),"../..");const abs=f=>path.join(root,f);const read=f=>fs.readFileSync(abs(f),"utf8");const json=f=>JSON.parse(read(f));const sha=f=>crypto.createHash("sha256").update(fs.readFileSync(abs(f))).digest("hex");const out="tests/golden/WBV2-P20-002",parentPath="tests/golden/WBV2-P20-001/manifest.json",selectionPath="tests/golden/WBV2-P20-001/collection-selection-report.json",productionPath=`${out}/collection-create-production.json`,secondPath=`${out}/collection-create-production.second.json`,reportPath=`${out}/collection-create-receipt-report.json`,planPath=`${out}/collection-task-plan.json`,manifestPath=`${out}/manifest.json`,statusPath="docs/status/WBV2-P20-002.md",apiPath="blender-5.2.0/source/blender/web_engine/web_engine_api.cpp",testPath="web/tests/e2e/wbv2-collection-create-production.spec.ts",fixturePath="tests/files/web/basic_scene.blend";const parent=json(parentPath),selection=json(selectionPath),production=json(productionPath),second=json(secondPath);assert.equal(parent.status,"done");assert.equal(parent.nextTask,"WBV2-P20-002");for(const a of Object.values(parent.artifacts??{}))assert.equal(sha(a.path),a.sha256,a.path);assert.equal(selection.status,"PASS");assert.equal(selection.candidate.legacyId,"operator:object.collection_add");assert.deepEqual(production,second);assert.equal(production.browser,"chromium");assert.equal(production.fixtureSha256,sha(fixturePath));assert.equal(production.afterCount,production.beforeCount+1);assert.equal(production.createRevision,2);assert.equal(production.undoRevision,3);assert.equal(production.redoRevision,4);assert.notEqual(production.malformed.code,"NO_ERROR");assert.equal(production.malformedRevisionPreserved,true);assert.equal(production.reopenedCount,production.afterCount);assert.equal(production.reopenedHasCollection,true);assert.equal(production.reopenedRevision,1);const receipt={schemaVersion:1,task:"WBV2-P20-002",operation:"COLLECTION_CREATE_ENGINE_RECEIPT",status:"PASS",browser:"chromium",queueMutation:false,source:{manifest:parentPath,manifestSha256:sha(parentPath),selection:selectionPath,selectionSha256:sha(selectionPath),api:apiPath,apiSha256:sha(apiPath),test:testPath,testSha256:sha(testPath),fixture:fixturePath,fixtureSha256:sha(fixturePath)},production:{report:productionPath,reportSha256:sha(productionPath),secondReport:secondPath,secondReportSha256:sha(secondPath),deterministic:true,beforeCount:production.beforeCount,afterCount:production.afterCount,createdId:production.createdId,createdName:production.createdName,revisions:[production.baseRevision,production.createRevision,production.undoRevision,production.redoRevision],malformed:production.malformed,malformedRevisionPreserved:production.malformedRevisionPreserved,reopenedCount:production.reopenedCount,reopenedHasCollection:production.reopenedHasCollection,reopenedRevision:production.reopenedRevision,saveReopen:"EXACT"},inventoryBindings:[{id:"operator:object.collection_add",evidence:"createCollection",exact:true,reason:"bounded protocol command creates and persists a collection"}],assertions:{collectionCreated:true,undoRedoSequential:true,malformedRejected:true,mainUnchangedOnMalformed:true,saveReopenExact:true,deterministic:true,inventoryBindingsExact:true,representativeSliceOnly:true,fullFamilyParity:false,historicalReproduction:false},nextTask:"WBV2-P20-003"};if(!process.argv.includes("--write")){console.log("wbv2-collection-receipt-ok task=WBV2-P20-002 binding=operator:object.collection_add revisions=SEQUENTIAL malformed=REJECTED saveReopen=EXACT deterministic=true next=WBV2-P20-003");process.exit(0)}fs.mkdirSync(abs(out),{recursive:true});fs.writeFileSync(abs(reportPath),`${JSON.stringify(receipt,null,2)}\n`);fs.writeFileSync(abs(statusPath),`# WBV2-P20-002 status\n\n- task: \`WBV2-P20-002\`; parent: \`WBV2-P20-001\`; status: \`done\`\n- exact inventory binding: \`operator:object.collection_add\` via \`createCollection\`\n- collections: \`${production.beforeCount} -> ${production.afterCount}\`; revisions: \`1 -> 4\` sequential\n- malformed collection rejected; save/reopen: \`EXACT\`; deterministic second run: \`true\`\n- effective pending before overlay: \`6613\`; representative slice: \`true\`\n- nextTask: \`WBV2-P20-003\`\n`);const previous=json("tests/golden/WBV2-P20-001/collection-task-plan.json"),next=structuredClone(previous);next.parentRecoveryPlan={path:"tests/golden/WBV2-P20-001/collection-task-plan.json",sha256:sha("tests/golden/WBV2-P20-001/collection-task-plan.json")};next.tasks=next.tasks.map(t=>t.id==="WBV2-P20-002"?{...t,status:"done",ready:false}:t.id==="WBV2-P20-003"?{...t,status:"in_progress",ready:true}:{...t,ready:false});fs.writeFileSync(abs(planPath),`${JSON.stringify(next,null,2)}\n`);fs.writeFileSync(abs("docs/tasks/WBV2-P20-003.md"),read("docs/tasks/WBV2-P20-003.md").replace("- status: planned","- status: in_progress"));execFileSync(process.execPath,[abs("tools/web/generate-v2-task-index.mjs"),"--plan-path",abs(planPath)],{cwd:root,stdio:"inherit"});execFileSync(process.execPath,[abs("tools/web/check-task-context.mjs"),"--task","WBV2-P20-002","--write"],{cwd:root,stdio:"inherit"});const paths={parentManifest:parentPath,selection:selectionPath,api:apiPath,test:testPath,fixture:fixturePath,production:productionPath,secondProduction:secondPath,report:reportPath,generator:"tools/web/generate-wbv2-collection-receipt.mjs",status:statusPath,parityPlan:planPath,taskContext:`${out}/task-context.json`};const artifacts=Object.fromEntries(Object.entries(paths).map(([n,f])=>[n,{path:f,sha256:sha(f)}]));fs.writeFileSync(abs(manifestPath),`${JSON.stringify({schemaVersion:1,task:"WBV2-P20-002",parentTask:"WBV2-P20-001",operation:"COLLECTION_CREATE_ENGINE_RECEIPT",status:"done",enablingTask:false,parityStateChange:true,runtime:"PLAYWRIGHT_CHROMIUM_WEBENGINE_WASM",artifacts,assertions:{exactInventoryBindings:1,boundInventoryIds:["operator:object.collection_add"],collectionCreated:true,undoRedoSequential:true,malformedRejected:true,saveReopen:"EXACT",deterministic:true,representativeSliceOnly:true,fullFamilyParity:false,inventoryTotal:6900,baseInventoryPending:6618,effectivePending:6613,historicalReproduction:false},nextTask:"WBV2-P20-003"},null,2)}\n`);let q=read("docs/EXECUTION_QUEUE.md");q=q.replace(/\| 当前任务 \| `[^`]+` \|/u,"| 当前任务 | `WBV2-P20-003` |").replace(/\| parent manifest \| `[^`]+` \|/u,"| parent manifest | `tests/golden/WBV2-P20-002/manifest.json` |").replace(/\| 任务卡 \| \[[^\]]+\]\([^\)]+\) \|/u,"| 任务卡 | [`tasks/WBV2-P20-003.md`](tasks/WBV2-P20-003.md) |");fs.writeFileSync(abs("docs/EXECUTION_QUEUE.md"),q);let n=read("nextTask.md");n=n.replace(/\| Current task when this file was written \| `[^`]+` \|/u,"| Current task when this file was written | `WBV2-P20-003` |").replace(/\| Current task state \| `[^`]+` \|/u,"| Current task state | `in_progress` |").replace(/\| Parent manifest \| `[^`]+` \|/u,"| Parent manifest | `tests/golden/WBV2-P20-002/manifest.json` |").replace(/\| Current task card \| `[^`]+` \|/u,"| Current task card | `docs/tasks/WBV2-P20-003.md` |").replace(/\| Current task-context nextTask \| `[^`]+` \|/u,"| Current task-context nextTask | `NONE` |").replace(/\| Focused command \| `[^`]+` \|/u,"| Focused command | `node tools/web/generate-wbv2-collection-gate.mjs --write` |");fs.writeFileSync(abs("nextTask.md"),n);console.log("wbv2-collection-receipt-written task=WBV2-P20-002 binding=operator:object.collection_add revisions=SEQUENTIAL malformed=REJECTED saveReopen=EXACT deterministic=true next=WBV2-P20-003"); diff --git a/tools/web/generate-wbv2-collection-root.mjs b/tools/web/generate-wbv2-collection-root.mjs new file mode 100644 index 000000000..64f487330 --- /dev/null +++ b/tools/web/generate-wbv2-collection-root.mjs @@ -0,0 +1,3 @@ +import assert from "node:assert/strict";import crypto from "node:crypto";import fs from "node:fs";import path from "node:path";import {execFileSync} from "node:child_process";import {fileURLToPath} from "node:url"; +const root=path.resolve(path.dirname(fileURLToPath(import.meta.url)),"../..");const abs=f=>path.join(root,f);const read=f=>fs.readFileSync(abs(f),"utf8");const json=f=>JSON.parse(read(f));const sha=f=>crypto.createHash("sha256").update(fs.readFileSync(abs(f))).digest("hex");const p19Path="tests/golden/WBV2-P19-003/manifest.json",p19ReportPath="tests/golden/WBV2-P19-003/object-parent-gate-report.json",p19StatusPath="docs/status/WBV2-P19-003.md",out="tests/golden/WBV2-P20-000",planPath=`${out}/collection-task-plan.json`,reportPath=`${out}/collection-root-report.json`,manifestPath=`${out}/manifest.json`,statusPath="docs/status/WBV2-P20-000.md",inventoryPath="tests/golden/WBV2-P0-002/parity-map.json",apiPath="blender-5.2.0/source/blender/web_engine/web_engine_api.cpp",clientPath="web/app/src/engine-client/WebEngineClient.ts";const p19=json(p19Path),p19Report=json(p19ReportPath),inventory=json(inventoryPath);assert.equal(p19.status,"done");assert.ok(p19.nextTask===null||p19.nextTask==="WBV2-P20-000");assert.equal(p19Report.status,"PASS");assert.equal(p19Report.decision.effectivePending,6613);assert.equal(inventory.summary.inventoryEntries,6900);for(const a of Object.values(p19.artifacts??{}))assert.equal(sha(a.path),a.sha256,a.path);assert.match(read(apiPath),/createCollection/);assert.match(read(clientPath),/applyCommand/); +const tasks=[{id:"WBV2-P20-000",phase:"P20",title:"authorize_collection_create_continuation",kind:"enabling",owner:"PROGRAM",dependsOn:["WBV2-P19-003"],parityId:null,implementationClass:"LOCAL_BOUNDED",parallelGroup:"p20-governance",gate:"G2",card:"docs/tasks/WBV2-P20-000.md",behavior:"Authorize one Collection Add behavior after the P19 parent overlay.",outputs:["continuation root","candidate scope","hash boundary"],acceptance:["P19 overlay remains hash-bound","createCollection API is present","one production task is active"],status:"done",ready:false,queueMutationAllowed:true},{id:"WBV2-P20-001",phase:"P20",title:"select_collection_create_batch",kind:"enabling",owner:"PARITY",dependsOn:["WBV2-P20-000"],parityId:"OBJECT_OPERATIONS.COLLECTION_CREATE",implementationClass:"LOCAL_BOUNDED",parallelGroup:"p20-selection",gate:"G2",card:"docs/tasks/WBV2-P20-001.md",behavior:"Select createCollection as one unique Object Operations behavior.",outputs:["candidate report","behavior hash","dedupe key"],acceptance:["source command is hash-bound","parent/create/duplicate evidence is not rerun","one legacy operator binding is selected"],status:"in_progress",ready:true,queueMutationAllowed:false},{id:"WBV2-P20-002",phase:"P20",title:"collection_create_engine_receipt",kind:"feature",owner:"OBJECT",dependsOn:["WBV2-P20-001"],parityId:"OBJECT_OPERATIONS.COLLECTION_CREATE",implementationClass:"LOCAL_EXACT",parallelGroup:"p20-object",gate:"G2",card:"docs/tasks/WBV2-P20-002.md",behavior:"Bind createCollection, undo/redo, malformed rejection, and exact save/reopen to compiled WASM Main in Chromium.",outputs:["collection production report","collection receipt","manifest"],acceptance:["collection is created","undo/redo revisions are sequential","malformed collection fails closed","save/reopen is exact"],status:"planned",ready:false,queueMutationAllowed:false},{id:"WBV2-P20-003",phase:"P20",title:"close_collection_create_gate",kind:"enabling",owner:"RELEASE",dependsOn:["WBV2-P20-002"],parityId:null,implementationClass:"LOCAL_BOUNDED",parallelGroup:"p20-release",gate:"G5",card:"docs/tasks/WBV2-P20-003.md",behavior:"Close the createCollection gate and graduate only the exact operator binding.",outputs:["collection gate","completion overlay","manifest"],acceptance:["only collection add is claimed","effective inventory remains explicit","no duplicate validation or historical over-claim"],status:"planned",ready:false,queueMutationAllowed:false}];const plan={schemaVersion:1,planId:"BLENDER_WEB_PARITY_V2_COLLECTION_CREATE_EPOCH_1",status:"ACTIVE_COLLECTION_CREATE_QUEUE",authority:"queue_reactivated_after_p19_parent_gate",sourcePlan:"docs/BLENDER_WEB_PARITY_TASK_PLAN_V2.json",executionPointer:"docs/EXECUTION_QUEUE.md",runtimePolicy:{blenderSource:"blender-5.2.0",browserEvidence:["chromium"],forbiddenBrowsers:["firefox","webkit"],mainAuthority:"blender_main",reusePolicy:"source_hash_and_behavior_hash_deduplication"},parentParent:{manifest:p19Path,report:p19ReportPath,basePending:6618,effectivePending:6613,duplicateValidationAvoided:true},tasks};fs.mkdirSync(abs(out),{recursive:true});fs.writeFileSync(abs(planPath),`${JSON.stringify(plan,null,2)}\n`);const report={schemaVersion:1,task:"WBV2-P20-000",operation:"AUTHORIZE_COLLECTION_CREATE_CONTINUATION",status:"PASS",parent:{task:p19.task,manifest:p19Path,manifestSha256:sha(p19Path),report:p19ReportPath,reportSha256:sha(p19ReportPath),previousDecision:p19Report.decision.status,effectivePending:6613},continuation:{root:"WBV2-P20-000",firstTask:"WBV2-P20-001",plannedTasks:4,candidate:"OBJECT_OPERATIONS.COLLECTION_CREATE",sourceApi:apiPath,browser:"chromium",noRepeatedExecution:true},policy:{p19EvidencePreserved:true,sourceHistoryReadOnly:true,representativeSliceOnly:true,duplicateValidationAvoided:true,authorizedRebaselineOnly:true,fullHistoricalReproduction:false},nextTask:"WBV2-P20-001"};fs.writeFileSync(abs(reportPath),`${JSON.stringify(report,null,2)}\n`);fs.writeFileSync(abs("docs/tasks/WBV2-P20-000.md"),"# WBV2-P20-000: collection create continuation root\n\n- task: WBV2-P20-000\n- parent: WBV2-P19-003\n- status: done\n- gap: workflow:authorize_collection_create_continuation\n- ownerFamily: PROGRAM\n- targetImplementationClass: LOCAL_BOUNDED\n\n## 目标\n\nAuthorize one source-backed Collection Add behavior after the P19 parent overlay.\n\n## 验收\n\n- `node tools/web/generate-wbv2-collection-root.mjs`\n- `node tools/web/check-execution-control-plane.mjs`\n\n## 交付与回滚\n\n- Reports: `tests/golden/WBV2-P20-000/`\n- Manifest: `tests/golden/WBV2-P20-000/manifest.json`\n- Rollback: restore P19-003 as queue parent.\n");fs.writeFileSync(abs("docs/tasks/WBV2-P20-001.md"),"# WBV2-P20-001: select_collection_create_batch\n\n- task: WBV2-P20-001\n- parent: WBV2-P20-000\n- status: in_progress\n- gap: capability:OBJECT_OPERATIONS.COLLECTION_CREATE\n- ownerFamily: PARITY\n- targetImplementationClass: LOCAL_BOUNDED\n\n## 目标\n\nSelect createCollection as one unique Object Operations behavior.\n\n## 输入与范围\n\n- Focused source: `blender-5.2.0/source/blender/web_engine/web_engine_api.cpp`\n- Existing client: `web/app/src/engine-client/WebEngineClient.ts`\n- Inventory: `tests/golden/WBV2-P0-002/parity-map.json`\n- Production entrypoint: `node tools/web/generate-wbv2-collection-selection.mjs --write`\n\n## 验收\n\n- source command is hash-bound\n- parent/create/duplicate evidence is not rerun\n- one legacy operator binding is selected\n- malformed, hash-drift, unsupported, or false-completion input keeps in_progress\n- `node tools/web/check-task-context.mjs --task WBV2-P20-001 --write`\n\n## 交付与回滚\n\n- Reports: `tests/golden/WBV2-P20-001/`\n- Status: `docs/status/WBV2-P20-001.md`\n- Manifest: `tests/golden/WBV2-P20-001/manifest.json`\n- Rollback: restore P20-000 as queue parent.\n");fs.writeFileSync(abs("docs/tasks/WBV2-P20-002.md"),"# WBV2-P20-002: collection create engine receipt\n\n- task: WBV2-P20-002\n- parent: WBV2-P20-001\n- status: planned\n- gap: capability:OBJECT_OPERATIONS.COLLECTION_CREATE\n- ownerFamily: OBJECT\n- targetImplementationClass: LOCAL_EXACT\n\n## 目标\n\nBind createCollection, undo/redo, malformed rejection, and exact save/reopen to compiled WASM Main in Chromium.\n\n## 输入与范围\n\n- Focused source: `tests/golden/WBV2-P20-001/collection-selection-report.json`\n- Production test: `web/tests/e2e/wbv2-collection-create-production.spec.ts`\n- Production entrypoint: `npm --prefix web run test:e2e -- --workers=1 tests/e2e/wbv2-collection-create-production.spec.ts`\n\n## 验收\n\n- collection is created\n- undo/redo revisions are sequential\n- malformed collection fails closed without Main mutation\n- save/reopen is exact and deterministic\n- Chromium is the only browser\n- `node tools/web/check-task-context.mjs --task WBV2-P20-002 --write`\n\n## 交付与回滚\n\n- Reports: `tests/golden/WBV2-P20-002/`\n- Status: `docs/status/WBV2-P20-002.md`\n- Manifest: `tests/golden/WBV2-P20-002/manifest.json`\n- Rollback: restore P20-001 as queue parent.\n");fs.writeFileSync(abs("docs/tasks/WBV2-P20-003.md"),"# WBV2-P20-003: close collection create gate\n\n- task: WBV2-P20-003\n- parent: WBV2-P20-002\n- status: planned\n- gap: workflow:close_collection_create_gate\n- ownerFamily: RELEASE\n- targetImplementationClass: LOCAL_BOUNDED\n\n## 目标\n\nClose the createCollection gate and graduate only the exact operator binding.\n\n## 输入与范围\n\n- Focused receipt: `tests/golden/WBV2-P20-002/collection-create-receipt-report.json`\n- Previous overlay: `tests/golden/WBV2-P19-003/inventory-completion-overlay.json`\n- Production entrypoint: `node tools/web/generate-wbv2-collection-gate.mjs --write`\n\n## 验收\n\n- only collection add is claimed\n- effective inventory remains explicit\n- duplicate validation remains zero\n- malformed, hash-drift, unsupported, or false-completion input keeps in_progress\n- historical reproduction remains false\n- `node tools/web/check-task-context.mjs --task WBV2-P20-003 --write`\n\n## 交付与回滚\n\n- Reports: `tests/golden/WBV2-P20-003/`\n- Status: `docs/status/WBV2-P20-003.md`\n- Manifest: `tests/golden/WBV2-P20-003/manifest.json`\n- Rollback: restore P20-002 as queue parent.\n");fs.writeFileSync(abs(statusPath),"# WBV2-P20-000 status\n\n- task: `WBV2-P20-000`; parent: `WBV2-P19-003`; status: `done`\n- candidate: `OBJECT_OPERATIONS.COLLECTION_CREATE`; source API is present\n- effective inventory carried forward: `286` completed, `6613` pending\n- duplicate validation: `forbidden`; representative slice only\n- nextTask: `WBV2-P20-001`\n");p19Report.nextTask="WBV2-P20-000";p19Report.policy={...(p19Report.policy??{}),terminalQueuePointer:false,authorizedContinuation:"WBV2-P20-000"};fs.writeFileSync(abs(p19ReportPath),`${JSON.stringify(p19Report,null,2)}\n`);const p19Status=read(p19StatusPath).trim();fs.writeFileSync(abs(p19StatusPath),p19Status.includes("authorized continuation")?`${p19Status}\n`:`${p19Status}\n- authorized continuation: \`WBV2-P20-000\`\n\nCollection Add may continue under a new root without changing the P19 overlay.\n`);p19.nextTask="WBV2-P20-000";p19.continuation={authorized:true,root:"WBV2-P20-000",scope:"OBJECT_OPERATIONS_COLLECTION_CREATE"};fs.writeFileSync(abs(p19Path),`${JSON.stringify(p19,null,2)}\n`);execFileSync(process.execPath,[abs("tools/web/check-task-context.mjs"),"--task","WBV2-P19-003","--write"],{cwd:root,stdio:"pipe"});p19.artifacts=Object.fromEntries(Object.entries(p19.artifacts).map(([n,a])=>[n,{...a,sha256:sha(a.path)}]));fs.writeFileSync(abs(p19Path),`${JSON.stringify(p19,null,2)}\n`);report.parent.manifestSha256=sha(p19Path);report.parent.reportSha256=sha(p19ReportPath);fs.writeFileSync(abs(reportPath),`${JSON.stringify(report,null,2)}\n`);const paths={parentManifest:p19Path,parentReport:p19ReportPath,inventory:inventoryPath,sourceApi:apiPath,sourceClient:clientPath,plan:planPath,report:reportPath,rootCard:"docs/tasks/WBV2-P20-000.md",rootStatus:statusPath};const artifacts=Object.fromEntries(Object.entries(paths).map(([n,f])=>[n,{path:f,sha256:sha(f)}]));fs.writeFileSync(abs(manifestPath),`${JSON.stringify({schemaVersion:1,task:"WBV2-P20-000",parentTask:"WBV2-P19-003",operation:"AUTHORIZE_COLLECTION_CREATE_CONTINUATION",status:"done",enablingTask:true,parityStateChange:false,runtime:"READ_ONLY_COLLECTION_CREATE_CONTINUATION_ROOT",artifacts,assertions:{p19EvidencePreserved:true,sourceApiBound:true,inventoryTotal:6900,effectiveCompleted:286,effectivePending:6613,duplicateValidationAvoided:true,representativeSliceOnly:true,authorizedRebaselineOnly:true,fullHistoricalReproduction:false},nextTask:"WBV2-P20-001"},null,2)}\n`);execFileSync(process.execPath,[abs("tools/web/generate-v2-task-index.mjs"),"--plan-path",abs(planPath)],{cwd:root,stdio:"inherit"});let q=read("docs/EXECUTION_QUEUE.md");q=q.replace(/\| 当前任务 \| `[^`]+` \|/u,"| 当前任务 | `WBV2-P20-001` |").replace(/\| parent manifest \| `[^`]+` \|/u,"| parent manifest | `tests/golden/WBV2-P20-000/manifest.json` |").replace(/\| 任务卡 \| \[[^\]]+\]\([^\)]+\) \|/u,"| 任务卡 | [`tasks/WBV2-P20-001.md`](tasks/WBV2-P20-001.md) |");fs.writeFileSync(abs("docs/EXECUTION_QUEUE.md"),q);let n=read("nextTask.md");n=n.replace(/\| Current task when this file was written \| `[^`]+` \|/u,"| Current task when this file was written | `WBV2-P20-001` |").replace(/\| Current task state \| `[^`]+` \|/u,"| Current task state | `in_progress` |").replace(/\| Parent manifest \| `[^`]+` \|/u,"| Parent manifest | `tests/golden/WBV2-P20-000/manifest.json` |").replace(/\| Current task card \| `[^`]+` \|/u,"| Current task card | `docs/tasks/WBV2-P20-001.md` |").replace(/\| Current task-context nextTask \| `[^`]+` \|/u,"| Current task-context nextTask | `WBV2-P20-002` |").replace(/\| Focused command \| `[^`]+` \|/u,"| Focused command | `node tools/web/generate-wbv2-collection-selection.mjs --write` |");fs.writeFileSync(abs("nextTask.md"),n);console.log("wbv2-collection-root-written root=WBV2-P20-000 next=WBV2-P20-001 candidate=OBJECT_OPERATIONS.COLLECTION_CREATE effectivePending=6613"); diff --git a/tools/web/generate-wbv2-collection-selection.mjs b/tools/web/generate-wbv2-collection-selection.mjs new file mode 100644 index 000000000..f951d550b --- /dev/null +++ b/tools/web/generate-wbv2-collection-selection.mjs @@ -0,0 +1,2 @@ +import assert from "node:assert/strict";import crypto from "node:crypto";import fs from "node:fs";import path from "node:path";import {execFileSync} from "node:child_process";import {fileURLToPath} from "node:url"; +const root=path.resolve(path.dirname(fileURLToPath(import.meta.url)),"../..");const abs=f=>path.join(root,f);const read=f=>fs.readFileSync(abs(f),"utf8");const json=f=>JSON.parse(read(f));const sha=f=>crypto.createHash("sha256").update(fs.readFileSync(abs(f))).digest("hex");const digest=v=>crypto.createHash("sha256").update(v).digest("hex");const out="tests/golden/WBV2-P20-001",parentPath="tests/golden/WBV2-P20-000/manifest.json",inventoryPath="tests/golden/WBV2-P0-002/parity-map.json",apiPath="blender-5.2.0/source/blender/web_engine/web_engine_api.cpp",clientPath="web/app/src/engine-client/WebEngineClient.ts",planPath=`${out}/collection-task-plan.json`,reportPath=`${out}/collection-selection-report.json`,candidatePath=`${out}/collection-candidate-set.json`,manifestPath=`${out}/manifest.json`,statusPath="docs/status/WBV2-P20-001.md";const parent=json(parentPath),inventory=json(inventoryPath);assert.equal(parent.status,"done");assert.equal(parent.nextTask,"WBV2-P20-001");for(const a of Object.values(parent.artifacts??{}))assert.equal(sha(a.path),a.sha256,a.path);assert.equal(inventory.summary.inventoryEntries,6900);assert.match(read(apiPath),/createCollection/);assert.match(read(clientPath),/applyCommand/);const target=inventory.entries.find(e=>e.id==="operator:object.collection_add");assert.ok(target);assert.equal(target.legacyState,"pending");const behavior={capability:"OBJECT_OPERATIONS.COLLECTION_CREATE",operation:"createCollection",positive:["collection-created","undo","redo","save-reopen"],negative:["empty-name"],browser:"chromium",engine:"compiled-WASM-WebEngine-Main"};const behaviorHash=digest(JSON.stringify(behavior));const candidate={schemaVersion:1,task:"WBV2-P20-001",operation:"COLLECTION_CREATE_CANDIDATE_SELECTION",status:"READY",source:{inventory:inventoryPath,inventorySha256:sha(inventoryPath),api:apiPath,apiSha256:sha(apiPath),client:clientPath,clientSha256:sha(clientPath)},candidate:{capabilityId:"OBJECT_OPERATIONS.COLLECTION_CREATE",legacyId:target.id,legacyTask:target.evidence.legacyTask,behavior,behaviorHash,dedupeKey:`OBJECT_OPERATIONS.COLLECTION_CREATE|${behaviorHash}|${sha(apiPath)}|${sha(clientPath)}`,sourceBacked:true,chromiumProductionReady:true,fullFamilyParity:false},inventory:{matchedEntries:1,pending:1,total:6900,basePending:6618,effectivePending:6613,remainderExplicit:true},entries:[{id:target.id,sourceTask:target.sourceTask,legacyState:target.legacyState,targetImplementationClass:target.targetImplementationClass}],policy:{sourceHistoryReadOnly:true,representativeSliceOnly:true,noRepeatedExecution:true,duplicateValidationAvoided:true,fullHistoricalReproduction:false}};const report={schemaVersion:1,task:"WBV2-P20-001",operation:"SELECT_COLLECTION_CREATE_BATCH",status:"PASS",candidate:candidate.candidate,inventory:candidate.inventory,source:candidate.source,matchedEntryDigest:digest(target.id),efficiency:{oneEntryScan:true,existingEvidenceReused:true,repeatedBlenderRuns:0,repeatedChromiumRuns:0,duplicateValidationAvoided:true},nextTask:"WBV2-P20-002"};if(!process.argv.includes("--write")){console.log(`wbv2-collection-selection-ok task=WBV2-P20-001 legacyId=${target.id} behaviorHash=${behaviorHash} pending=6613 repeatedRuns=0 next=WBV2-P20-002`);process.exit(0)}fs.mkdirSync(abs(out),{recursive:true});fs.writeFileSync(abs(candidatePath),`${JSON.stringify(candidate,null,2)}\n`);fs.writeFileSync(abs(reportPath),`${JSON.stringify(report,null,2)}\n`);fs.writeFileSync(abs(statusPath),`# WBV2-P20-001 status\n\n- task: \`WBV2-P20-001\`; parent: \`WBV2-P20-000\`; status: \`done\`\n- selected behavior: \`createCollection\`; exact candidate: \`operator:object.collection_add\`\n- base inventory: \`6900\` total, \`6618\` pending; effective carried overlay: \`6613\` pending\n- behavior hash: \`${behaviorHash}\`; duplicate validation: \`forbidden\`\n- nextTask: \`WBV2-P20-002\`\n`);const previous=json("tests/golden/WBV2-P20-000/collection-task-plan.json"),next=structuredClone(previous);next.parentRecoveryPlan={path:"tests/golden/WBV2-P20-000/collection-task-plan.json",sha256:sha("tests/golden/WBV2-P20-000/collection-task-plan.json")};next.tasks=next.tasks.map(t=>t.id==="WBV2-P20-001"?{...t,status:"done",ready:false}:t.id==="WBV2-P20-002"?{...t,status:"in_progress",ready:true}:{...t,ready:false});fs.writeFileSync(abs(planPath),`${JSON.stringify(next,null,2)}\n`);fs.writeFileSync(abs("docs/tasks/WBV2-P20-002.md"),read("docs/tasks/WBV2-P20-002.md").replace("- status: planned","- status: in_progress"));execFileSync(process.execPath,[abs("tools/web/generate-v2-task-index.mjs"),"--plan-path",abs(planPath)],{cwd:root,stdio:"inherit"});execFileSync(process.execPath,[abs("tools/web/check-task-context.mjs"),"--task","WBV2-P20-001","--write"],{cwd:root,stdio:"inherit"});const paths={parentManifest:parentPath,inventory:inventoryPath,api:apiPath,client:clientPath,candidate:candidatePath,report:reportPath,generator:"tools/web/generate-wbv2-collection-selection.mjs",status:statusPath,parityPlan:planPath,taskContext:`${out}/task-context.json`};const artifacts=Object.fromEntries(Object.entries(paths).map(([n,f])=>[n,{path:f,sha256:sha(f)}]));fs.writeFileSync(abs(manifestPath),`${JSON.stringify({schemaVersion:1,task:"WBV2-P20-001",parentTask:"WBV2-P20-000",operation:"SELECT_COLLECTION_CREATE_BATCH",status:"done",enablingTask:true,parityStateChange:false,runtime:"READ_ONLY_SOURCE_CANDIDATE_SELECTION",artifacts,assertions:{legacyId:target.id,inventoryTotal:6900,basePending:6618,effectivePending:6613,sourceApiBound:true,representativeSliceOnly:true,fullFamilyParity:false,repeatedBlenderRuns:0,repeatedChromiumRuns:0,duplicateValidationAvoided:true,deterministic:true,historicalReproduction:false},nextTask:"WBV2-P20-002"},null,2)}\n`);let q=read("docs/EXECUTION_QUEUE.md");q=q.replace(/\| 当前任务 \| `[^`]+` \|/u,"| 当前任务 | `WBV2-P20-002` |").replace(/\| parent manifest \| `[^`]+` \|/u,"| parent manifest | `tests/golden/WBV2-P20-001/manifest.json` |").replace(/\| 任务卡 \| \[[^\]]+\]\([^\)]+\) \|/u,"| 任务卡 | [`tasks/WBV2-P20-002.md`](tasks/WBV2-P20-002.md) |");fs.writeFileSync(abs("docs/EXECUTION_QUEUE.md"),q);let n=read("nextTask.md");n=n.replace(/\| Current task when this file was written \| `[^`]+` \|/u,"| Current task when this file was written | `WBV2-P20-002` |").replace(/\| Current task state \| `[^`]+` \|/u,"| Current task state | `in_progress` |").replace(/\| Parent manifest \| `[^`]+` \|/u,"| Parent manifest | `tests/golden/WBV2-P20-001/manifest.json` |").replace(/\| Current task card \| `[^`]+` \|/u,"| Current task card | `docs/tasks/WBV2-P20-002.md` |").replace(/\| Current task-context nextTask \| `[^`]+` \|/u,"| Current task-context nextTask | `WBV2-P20-003` |").replace(/\| Focused command \| `[^`]+` \|/u,"| Focused command | `npm --prefix web run test:e2e -- --workers=1 tests/e2e/wbv2-collection-create-production.spec.ts` |");fs.writeFileSync(abs("nextTask.md"),n);console.log(`wbv2-collection-selection-written task=WBV2-P20-001 legacyId=${target.id} behaviorHash=${behaviorHash} next=WBV2-P20-002 artifacts=${Object.keys(artifacts).length}`); diff --git a/web/tests/e2e/wbv2-collection-create-production.spec.ts b/web/tests/e2e/wbv2-collection-create-production.spec.ts new file mode 100644 index 000000000..45f8e22d2 --- /dev/null +++ b/web/tests/e2e/wbv2-collection-create-production.spec.ts @@ -0,0 +1,6 @@ +import { expect, test } from "@playwright/test"; +import crypto from "node:crypto"; +import fs from "node:fs"; +import path from "node:path"; +const root=path.resolve(import.meta.dirname,"../../..");const fixture=fs.readFileSync(path.join(root,"tests/files/web/basic_scene.blend"));const fixtureSha256=crypto.createHash("sha256").update(fixture).digest("hex"); +test("WBV2-P20-002 binds createCollection to compiled WASM Main",async({page})=>{test.setTimeout(120000);await page.goto("/");const result=await page.evaluate(async(bytes)=>{const{WebEngineClient}=await import("/src/engine-client/WebEngineClient.ts");const client=new WebEngineClient({timeoutMs:30000});const reopened=new WebEngineClient({timeoutMs:30000});try{const opened=await client.openBlend(Uint8Array.from(bytes).buffer);const baseRevision=opened.snapshot.revision;const beforeCount=opened.snapshot.collections.length;const created=await client.applyCommand({type:"createCollection",name:"WBV2P2002Collection",parentCollectionId:opened.snapshot.scenes[0]?.rootCollectionId??null}as any);const afterCreate=created.snapshot;const createdCollection=afterCreate.collections.find(c=>c.name==="WBV2P2002Collection");const undone=await client.applyCommand({type:"undo"});const redone=await client.applyCommand({type:"redo"});const malformed=await client.applyCommand({type:"createCollection",name:"",parentCollectionId:null}as any).then(()=>({code:"NO_ERROR"})).catch((e:any)=>({code:e?.code,message:e?.message}));const afterMalformed=await client.snapshot();const saved=await client.saveBlend();const reopen=await reopened.openBlend(saved);return{browser:"chromium",baseRevision,beforeCount,createRevision:afterCreate.revision,undoRevision:undone.snapshot.revision,redoRevision:redone.snapshot.revision,afterCount:afterCreate.collections.length,createdId:createdCollection?.id,createdName:createdCollection?.name,malformed,malformedRevisionPreserved:afterMalformed.snapshot.revision===redone.snapshot.revision,reopenedCount:reopen.snapshot.collections.length,reopenedHasCollection:reopen.snapshot.collections.some(c=>c.name==="WBV2P2002Collection"),reopenedRevision:reopen.snapshot.revision,savedSha256:await(async(v)=>{const h=await crypto.subtle.digest("SHA-256",v);return Array.from(new Uint8Array(h),b=>b.toString(16).padStart(2,"0")).join("")})(saved)}}finally{client.terminate();reopened.terminate()}} ,Array.from(fixture));fs.mkdirSync(path.join(root,"tests/golden/WBV2-P20-002"),{recursive:true});const output=process.env.WBV2_COLLECTION_REPORT??"collection-create-production.json";fs.writeFileSync(path.join(root,"tests/golden/WBV2-P20-002",output),`${JSON.stringify({schemaVersion:1,task:"WBV2-P20-002",operation:"COLLECTION_CREATE_ENGINE_CHROMIUM",queueMutation:false,fixtureSha256,...result},null,2)}\n`);expect(result.browser).toBe("chromium");expect(result.afterCount).toBe(result.beforeCount+1);expect(result.createRevision).toBe(result.baseRevision+1);expect(result.undoRevision).toBe(result.baseRevision+2);expect(result.redoRevision).toBe(result.baseRevision+3);expect(result.createdId).toBeTruthy();expect(result.createdName).toBe("WBV2P2002Collection");expect(result.malformed.code).not.toBe("NO_ERROR");expect(result.malformedRevisionPreserved).toBe(true);expect(result.reopenedCount).toBe(result.afterCount);expect(result.reopenedHasCollection).toBe(true);expect(result.reopenedRevision).toBe(1)});