diff --git a/docs/EXECUTION_QUEUE.md b/docs/EXECUTION_QUEUE.md index 13bd1c09f..10b959a20 100644 --- a/docs/EXECUTION_QUEUE.md +++ b/docs/EXECUTION_QUEUE.md @@ -13,9 +13,9 @@ | 字段 | 值 | | --- | --- | | 里程碑 | WBV2 capability workflow | -| 当前任务 | `WBV2-P18-003` | -| parent manifest | `tests/golden/WBV2-P18-002/manifest.json` | -| 任务卡 | [`tasks/WBV2-P18-003.md`](tasks/WBV2-P18-003.md) | +| 当前任务 | `WBV2-P19-003` | +| parent manifest | `tests/golden/WBV2-P19-002/manifest.json` | +| 任务卡 | [`tasks/WBV2-P19-003.md`](tasks/WBV2-P19-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-P18-003.md b/docs/status/WBV2-P18-003.md index b86dd4b6c..f4a4b6476 100644 --- a/docs/status/WBV2-P18-003.md +++ b/docs/status/WBV2-P18-003.md @@ -9,3 +9,6 @@ - nextTask: `NONE` Only the exact createPrimitive operator is graduated. The canonical inventory remains immutable; effective counts are derived from hash-bound completion overlays. +- authorized continuation: `WBV2-P19-000` + +Object Parent may continue under a new root without changing the P18 overlay. diff --git a/docs/status/WBV2-P19-000.md b/docs/status/WBV2-P19-000.md new file mode 100644 index 000000000..0a0f46bfb --- /dev/null +++ b/docs/status/WBV2-P19-000.md @@ -0,0 +1,7 @@ +# WBV2-P19-000 status + +- task: `WBV2-P19-000`; parent: `WBV2-P18-003`; status: `done` +- candidate: `OBJECT_OPERATIONS.PARENT`; source API is present +- effective inventory carried forward: `285` completed, `6614` pending +- duplicate validation: `forbidden`; representative slice only +- nextTask: `WBV2-P19-001` diff --git a/docs/status/WBV2-P19-001.md b/docs/status/WBV2-P19-001.md new file mode 100644 index 000000000..dac35dee1 --- /dev/null +++ b/docs/status/WBV2-P19-001.md @@ -0,0 +1,7 @@ +# WBV2-P19-001 status + +- task: `WBV2-P19-001`; parent: `WBV2-P19-000`; status: `done` +- selected behavior: `setParent`; exact candidate: `operator:object.parent_set` +- base inventory: `6900` total, `6618` pending; effective carried overlay: `6614` pending +- behavior hash: `14a34d128abfe68e090e6d00c8f0eb1a935c6ea7a7189faa5dbf855011c2de23`; duplicate validation: `forbidden` +- nextTask: `WBV2-P19-002` diff --git a/docs/status/WBV2-P19-002.md b/docs/status/WBV2-P19-002.md new file mode 100644 index 000000000..fd68e7061 --- /dev/null +++ b/docs/status/WBV2-P19-002.md @@ -0,0 +1,8 @@ +# WBV2-P19-002 status + +- task: `WBV2-P19-002`; parent: `WBV2-P19-001`; status: `done` +- exact inventory binding: `operator:object.parent_set` via `setParent` +- parent relation: `object:BasicArea -> object:BasicCamera`; revisions: `1 -> 4` sequential +- malformed parent rejected; save/reopen: `EXACT`; deterministic second run: `true` +- effective pending before overlay: `6614`; representative slice: `true` +- nextTask: `WBV2-P19-003` diff --git a/docs/status/WBV2-P19-003.md b/docs/status/WBV2-P19-003.md new file mode 100644 index 000000000..3fa005e58 --- /dev/null +++ b/docs/status/WBV2-P19-003.md @@ -0,0 +1,9 @@ +# WBV2-P19-003 status + +- task: `WBV2-P19-003`; parent: `WBV2-P19-002`; status: `done` +- new feature claim: `OBJECT_OPERATIONS.PARENT`; exact binding: `operator:object.parent_set` +- base inventory: `6900` total, `281` completed, `6618` pending +- cumulative overlay: `286` effective completed, `6613` effective pending, claimed complete overlay: `5` +- repeated Blender/Chromium validation: `0`; unique behavior batches: Paint, Duplicate, Create, Parent +- provenance epoch: `2`; release: `AUTHORIZED_REBASELINE_ONLY`; fullHistoricalReproduction: `false` +- nextTask: `NONE` diff --git a/docs/tasks/WBV2-P19-000.md b/docs/tasks/WBV2-P19-000.md new file mode 100644 index 000000000..23ab4aabd --- /dev/null +++ b/docs/tasks/WBV2-P19-000.md @@ -0,0 +1,23 @@ +# WBV2-P19-000: object parent continuation root + +- task: WBV2-P19-000 +- parent: WBV2-P18-003 +- status: done +- gap: workflow:authorize_object_parent_continuation +- ownerFamily: PROGRAM +- targetImplementationClass: LOCAL_BOUNDED + +## 目标 + +Authorize one source-backed Object Parent behavior after the P18 create overlay. + +## 验收 + +- `node tools/web/generate-wbv2-parent-root.mjs` +- `node tools/web/check-execution-control-plane.mjs` + +## 交付与回滚 + +- Reports: `tests/golden/WBV2-P19-000/` +- Manifest: `tests/golden/WBV2-P19-000/manifest.json` +- Rollback: restore P18-003 as queue parent. diff --git a/docs/tasks/WBV2-P19-001.md b/docs/tasks/WBV2-P19-001.md new file mode 100644 index 000000000..e5cd8944b --- /dev/null +++ b/docs/tasks/WBV2-P19-001.md @@ -0,0 +1,34 @@ +# WBV2-P19-001: select_object_parent_batch + +- task: WBV2-P19-001 +- parent: WBV2-P19-000 +- status: in_progress +- gap: capability:OBJECT_OPERATIONS.PARENT +- ownerFamily: PARITY +- targetImplementationClass: LOCAL_BOUNDED + +## 目标 + +Select setParent 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-parent-selection.mjs --write` + +## 验收 + +- source command is hash-bound +- create and 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-P19-001 --write` + +## 交付与回滚 + +- Reports: `tests/golden/WBV2-P19-001/` +- Status: `docs/status/WBV2-P19-001.md` +- Manifest: `tests/golden/WBV2-P19-001/manifest.json` +- Rollback: restore P19-000 as queue parent. diff --git a/docs/tasks/WBV2-P19-002.md b/docs/tasks/WBV2-P19-002.md new file mode 100644 index 000000000..49eb133af --- /dev/null +++ b/docs/tasks/WBV2-P19-002.md @@ -0,0 +1,34 @@ +# WBV2-P19-002: object parent engine receipt + +- task: WBV2-P19-002 +- parent: WBV2-P19-001 +- status: in_progress +- gap: capability:OBJECT_OPERATIONS.PARENT +- ownerFamily: OBJECT +- targetImplementationClass: LOCAL_EXACT + +## 目标 + +Bind setParent, undo/redo, malformed rejection, and exact save/reopen to compiled WASM Main in Chromium. + +## 输入与范围 + +- Focused source: `tests/golden/WBV2-P19-001/object-parent-selection-report.json` +- Production test: `web/tests/e2e/wbv2-object-parent-production.spec.ts` +- Production entrypoint: `npm --prefix web run test:e2e -- --workers=1 tests/e2e/wbv2-object-parent-production.spec.ts` + +## 验收 + +- parent relation changes +- undo/redo revisions are sequential +- malformed parent input 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-P19-002 --write` + +## 交付与回滚 + +- Reports: `tests/golden/WBV2-P19-002/` +- Status: `docs/status/WBV2-P19-002.md` +- Manifest: `tests/golden/WBV2-P19-002/manifest.json` +- Rollback: restore P19-001 as queue parent. diff --git a/docs/tasks/WBV2-P19-003.md b/docs/tasks/WBV2-P19-003.md new file mode 100644 index 000000000..dc160fde5 --- /dev/null +++ b/docs/tasks/WBV2-P19-003.md @@ -0,0 +1,34 @@ +# WBV2-P19-003: close object parent gate + +- task: WBV2-P19-003 +- parent: WBV2-P19-002 +- status: in_progress +- gap: workflow:close_object_parent_gate +- ownerFamily: RELEASE +- targetImplementationClass: LOCAL_BOUNDED + +## 目标 + +Close the setParent gate and graduate only the exact operator binding. + +## 输入与范围 + +- Focused receipt: `tests/golden/WBV2-P19-002/object-parent-receipt-report.json` +- Previous overlay: `tests/golden/WBV2-P18-003/inventory-completion-overlay.json` +- Production entrypoint: `node tools/web/generate-wbv2-parent-gate.mjs --write` + +## 验收 + +- only object parent 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-P19-003 --write` + +## 交付与回滚 + +- Reports: `tests/golden/WBV2-P19-003/` +- Status: `docs/status/WBV2-P19-003.md` +- Manifest: `tests/golden/WBV2-P19-003/manifest.json` +- Rollback: restore P19-002 as queue parent. diff --git a/nextTask.md b/nextTask.md index bcb450bd2..1f290fc32 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-P18-003` | +| Current task when this file was written | `WBV2-P19-003` | | Current task state | `done` | -| Parent manifest | `tests/golden/WBV2-P18-002/manifest.json` | -| Current task card | `docs/tasks/WBV2-P18-003.md` | +| Parent manifest | `tests/golden/WBV2-P19-002/manifest.json` | +| Current task card | `docs/tasks/WBV2-P19-003.md` | | Current task-context nextTask | `NONE` | -| Focused command | `node tools/web/generate-wbv2-create-gate.mjs --write` | +| Focused command | `node tools/web/generate-wbv2-parent-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-P18-003/manifest.json b/tests/golden/WBV2-P18-003/manifest.json index 33ee8e8a0..b4ffe1ba8 100644 --- a/tests/golden/WBV2-P18-003/manifest.json +++ b/tests/golden/WBV2-P18-003/manifest.json @@ -38,7 +38,7 @@ }, "report": { "path": "tests/golden/WBV2-P18-003/object-create-gate-report.json", - "sha256": "dc49009ce041727cd2f2b7dc712c210ec44cc1a3a7c4ae1ccb5c6c0af5ddefeb" + "sha256": "cb227108e67eebcd9d3998e00f07c795490bc3d2e1f187508d4fafe842c84fca" }, "generator": { "path": "tools/web/generate-wbv2-create-gate.mjs", @@ -46,7 +46,7 @@ }, "status": { "path": "docs/status/WBV2-P18-003.md", - "sha256": "ab5739b2e0c17b08a1c66266600c80d4b51eb4185e1d1e7978872df72fca50c5" + "sha256": "577f8110aab7a592c0b267d9d8a8c7ee4dba8a0add20f8ccab5447286ae45f80" }, "parityPlan": { "path": "tests/golden/WBV2-P18-003/create-task-plan.json", @@ -54,7 +54,7 @@ }, "taskContext": { "path": "tests/golden/WBV2-P18-003/task-context.json", - "sha256": "aa8b02b6b1c6bddaf8f2296561f67c999d1e67ec3757dd5bfcd3676289dd71ed" + "sha256": "6eb7b4ab165db6bc359cc8885375cf30300013af324fe5dd713e3203666271b6" } }, "assertions": { @@ -76,5 +76,10 @@ "fullHistoricalReproduction": false, "deterministic": true }, - "nextTask": null + "nextTask": "WBV2-P19-000", + "continuation": { + "authorized": true, + "root": "WBV2-P19-000", + "scope": "OBJECT_OPERATIONS_PARENT" + } } diff --git a/tests/golden/WBV2-P18-003/object-create-gate-report.json b/tests/golden/WBV2-P18-003/object-create-gate-report.json index 18df28680..023d3d02d 100644 --- a/tests/golden/WBV2-P18-003/object-create-gate-report.json +++ b/tests/golden/WBV2-P18-003/object-create-gate-report.json @@ -150,7 +150,8 @@ "baseInventoryPreserved": true, "inventoryRemainderExplicit": true, "noFalseLocalParity": true, - "terminalQueuePointer": true + "terminalQueuePointer": false, + "authorizedContinuation": "WBV2-P19-000" }, - "nextTask": null + "nextTask": "WBV2-P19-000" } diff --git a/tests/golden/WBV2-P18-003/task-context.json b/tests/golden/WBV2-P18-003/task-context.json index 88627081a..ea7700aa3 100644 --- a/tests/golden/WBV2-P18-003/task-context.json +++ b/tests/golden/WBV2-P18-003/task-context.json @@ -67,7 +67,7 @@ "effective inventory remains explicit", "no duplicate validation or historical over-claim" ], - "nextTask": null, + "nextTask": "WBV2-P19-000", "sourceDocuments": { "queue": "docs/EXECUTION_QUEUE.md", "taskCard": "docs/tasks/WBV2-P18-003.md", @@ -164,7 +164,7 @@ "totalTokens": 2401, "reservedEnvelopeTokens": 1024, "estimatedContextTokens": 3425, - "serializedContextTokens": 652, + "serializedContextTokens": 654, "withinBudget": true } } diff --git a/tests/golden/WBV2-P19-000/manifest.json b/tests/golden/WBV2-P19-000/manifest.json new file mode 100644 index 000000000..7e4951e16 --- /dev/null +++ b/tests/golden/WBV2-P19-000/manifest.json @@ -0,0 +1,60 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P19-000", + "parentTask": "WBV2-P18-003", + "operation": "AUTHORIZE_OBJECT_PARENT_CONTINUATION", + "status": "done", + "enablingTask": true, + "parityStateChange": false, + "runtime": "READ_ONLY_OBJECT_PARENT_CONTINUATION_ROOT", + "artifacts": { + "parentManifest": { + "path": "tests/golden/WBV2-P18-003/manifest.json", + "sha256": "b29ae27f827530488fb02998a119acc111bf624b86d58b02c4a36883486d14b4" + }, + "parentReport": { + "path": "tests/golden/WBV2-P18-003/object-create-gate-report.json", + "sha256": "cb227108e67eebcd9d3998e00f07c795490bc3d2e1f187508d4fafe842c84fca" + }, + "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-P19-000/parent-task-plan.json", + "sha256": "d0e129c85f428eeeae328613a633220b9c431c08d9cce55626521f25b22374e6" + }, + "report": { + "path": "tests/golden/WBV2-P19-000/parent-root-report.json", + "sha256": "dbeee77d97b5618625682b25a2bf069f98802ac932570d7e2d5b23996afc105a" + }, + "rootCard": { + "path": "docs/tasks/WBV2-P19-000.md", + "sha256": "deef232d528779a24018dd75fded386b80b6b5d6c6bb2be21cdfe33c4b54ce37" + }, + "rootStatus": { + "path": "docs/status/WBV2-P19-000.md", + "sha256": "e94e8d4b076884a9b5b85827a18a89ac25aea49d9543a0331373c09101245c48" + } + }, + "assertions": { + "p18EvidencePreserved": true, + "sourceApiBound": true, + "inventoryTotal": 6900, + "effectiveCompleted": 285, + "effectivePending": 6614, + "duplicateValidationAvoided": true, + "representativeSliceOnly": true, + "authorizedRebaselineOnly": true, + "fullHistoricalReproduction": false + }, + "nextTask": "WBV2-P19-001" +} diff --git a/tests/golden/WBV2-P19-000/parent-root-report.json b/tests/golden/WBV2-P19-000/parent-root-report.json new file mode 100644 index 000000000..bda20e6c5 --- /dev/null +++ b/tests/golden/WBV2-P19-000/parent-root-report.json @@ -0,0 +1,33 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P19-000", + "operation": "AUTHORIZE_OBJECT_PARENT_CONTINUATION", + "status": "PASS", + "parent": { + "task": "WBV2-P18-003", + "manifest": "tests/golden/WBV2-P18-003/manifest.json", + "manifestSha256": "b29ae27f827530488fb02998a119acc111bf624b86d58b02c4a36883486d14b4", + "report": "tests/golden/WBV2-P18-003/object-create-gate-report.json", + "reportSha256": "cb227108e67eebcd9d3998e00f07c795490bc3d2e1f187508d4fafe842c84fca", + "previousDecision": "READY_WITH_OBJECT_CREATE_SLICE_AND_INVENTORY_OVERLAY", + "effectivePending": 6614 + }, + "continuation": { + "root": "WBV2-P19-000", + "firstTask": "WBV2-P19-001", + "plannedTasks": 4, + "candidate": "OBJECT_OPERATIONS.PARENT", + "sourceApi": "blender-5.2.0/source/blender/web_engine/web_engine_api.cpp", + "browser": "chromium", + "noRepeatedExecution": true + }, + "policy": { + "p18EvidencePreserved": true, + "sourceHistoryReadOnly": true, + "representativeSliceOnly": true, + "duplicateValidationAvoided": true, + "authorizedRebaselineOnly": true, + "fullHistoricalReproduction": false + }, + "nextTask": "WBV2-P19-001" +} diff --git a/tests/golden/WBV2-P19-000/parent-task-plan.json b/tests/golden/WBV2-P19-000/parent-task-plan.json new file mode 100644 index 000000000..7dc947590 --- /dev/null +++ b/tests/golden/WBV2-P19-000/parent-task-plan.json @@ -0,0 +1,146 @@ +{ + "schemaVersion": 1, + "planId": "BLENDER_WEB_PARITY_V2_OBJECT_PARENT_EPOCH_1", + "status": "ACTIVE_OBJECT_PARENT_QUEUE", + "authority": "queue_reactivated_after_p18_create_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" + }, + "parentCreate": { + "manifest": "tests/golden/WBV2-P18-003/manifest.json", + "report": "tests/golden/WBV2-P18-003/object-create-gate-report.json", + "basePending": 6618, + "effectivePending": 6614, + "duplicateValidationAvoided": true + }, + "tasks": [ + { + "id": "WBV2-P19-000", + "phase": "P19", + "title": "authorize_object_parent_continuation", + "kind": "enabling", + "owner": "PROGRAM", + "dependsOn": [ + "WBV2-P18-003" + ], + "parityId": null, + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p19-governance", + "gate": "G2", + "card": "docs/tasks/WBV2-P19-000.md", + "behavior": "Authorize one Object Parent behavior after the P18 create overlay.", + "outputs": [ + "continuation root", + "candidate scope", + "hash boundary" + ], + "acceptance": [ + "P18 overlay remains hash-bound", + "setParent API is present", + "one production task is active" + ], + "status": "done", + "ready": false, + "queueMutationAllowed": true + }, + { + "id": "WBV2-P19-001", + "phase": "P19", + "title": "select_object_parent_batch", + "kind": "enabling", + "owner": "PARITY", + "dependsOn": [ + "WBV2-P19-000" + ], + "parityId": "OBJECT_OPERATIONS.PARENT", + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p19-selection", + "gate": "G2", + "card": "docs/tasks/WBV2-P19-001.md", + "behavior": "Select setParent as one unique Object Operations behavior.", + "outputs": [ + "candidate report", + "behavior hash", + "dedupe key" + ], + "acceptance": [ + "source command is hash-bound", + "create/duplicate evidence is not rerun", + "one legacy operator binding is selected" + ], + "status": "in_progress", + "ready": true, + "queueMutationAllowed": false + }, + { + "id": "WBV2-P19-002", + "phase": "P19", + "title": "object_parent_engine_receipt", + "kind": "feature", + "owner": "OBJECT", + "dependsOn": [ + "WBV2-P19-001" + ], + "parityId": "OBJECT_OPERATIONS.PARENT", + "implementationClass": "LOCAL_EXACT", + "parallelGroup": "p19-object", + "gate": "G2", + "card": "docs/tasks/WBV2-P19-002.md", + "behavior": "Bind setParent, undo/redo, malformed rejection, and exact save/reopen to compiled WASM Main in Chromium.", + "outputs": [ + "parent production report", + "parent receipt", + "manifest" + ], + "acceptance": [ + "parent relation changes", + "undo/redo revisions are sequential", + "malformed parent input fails closed", + "save/reopen is exact" + ], + "status": "planned", + "ready": false, + "queueMutationAllowed": false + }, + { + "id": "WBV2-P19-003", + "phase": "P19", + "title": "close_object_parent_gate", + "kind": "enabling", + "owner": "RELEASE", + "dependsOn": [ + "WBV2-P19-002" + ], + "parityId": null, + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p19-release", + "gate": "G5", + "card": "docs/tasks/WBV2-P19-003.md", + "behavior": "Close the setParent gate and graduate only the exact operator binding.", + "outputs": [ + "object parent gate", + "completion overlay", + "manifest" + ], + "acceptance": [ + "only object parent 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-P19-001/manifest.json b/tests/golden/WBV2-P19-001/manifest.json new file mode 100644 index 000000000..49f330ad3 --- /dev/null +++ b/tests/golden/WBV2-P19-001/manifest.json @@ -0,0 +1,67 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P19-001", + "parentTask": "WBV2-P19-000", + "operation": "SELECT_OBJECT_PARENT_BATCH", + "status": "done", + "enablingTask": true, + "parityStateChange": false, + "runtime": "READ_ONLY_SOURCE_CANDIDATE_SELECTION", + "artifacts": { + "parentManifest": { + "path": "tests/golden/WBV2-P19-000/manifest.json", + "sha256": "6d5494e404399226452d69f014211050032cfcae80a3aab449b2fb9f61b63b8b" + }, + "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-P19-001/object-parent-candidate-set.json", + "sha256": "602445740a3351df31d71c1f61cd50feb5cf51572de2527efff7490e52acbbdb" + }, + "report": { + "path": "tests/golden/WBV2-P19-001/object-parent-selection-report.json", + "sha256": "ba9960c1aed7f0da68c1198dfbd926d39aed53c6d7421db7da0fe1089434d66b" + }, + "generator": { + "path": "tools/web/generate-wbv2-parent-selection.mjs", + "sha256": "da71ec494960328dc89c86fdbc1e705d91f7346571df337e07596c59d3a64165" + }, + "status": { + "path": "docs/status/WBV2-P19-001.md", + "sha256": "295578861be0c0daf0716dc3a3e5147ab8b450ba08bafbfc4d6db214f405ef4a" + }, + "parityPlan": { + "path": "tests/golden/WBV2-P19-001/parent-task-plan.json", + "sha256": "c9822702d3b3fb5bb5b1eed958a93baf4d43820f18b95fe835cb8ebddd472ff5" + }, + "taskContext": { + "path": "tests/golden/WBV2-P19-001/task-context.json", + "sha256": "9c75c01399c255ef6ac13198e58ea421ec589044381228e4ee4d761948a4a85b" + } + }, + "assertions": { + "legacyId": "operator:object.parent_set", + "inventoryTotal": 6900, + "basePending": 6618, + "effectivePending": 6614, + "sourceApiBound": true, + "representativeSliceOnly": true, + "fullFamilyParity": false, + "repeatedBlenderRuns": 0, + "repeatedChromiumRuns": 0, + "duplicateValidationAvoided": true, + "deterministic": true, + "historicalReproduction": false + }, + "nextTask": "WBV2-P19-002" +} diff --git a/tests/golden/WBV2-P19-001/object-parent-candidate-set.json b/tests/golden/WBV2-P19-001/object-parent-candidate-set.json new file mode 100644 index 000000000..4e88a984d --- /dev/null +++ b/tests/golden/WBV2-P19-001/object-parent-candidate-set.json @@ -0,0 +1,64 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P19-001", + "operation": "OBJECT_PARENT_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.PARENT", + "legacyId": "operator:object.parent_set", + "legacyTask": "M16-GAP-01546", + "behavior": { + "capability": "OBJECT_OPERATIONS.PARENT", + "operation": "setParent", + "positive": [ + "parent-relation", + "keep-transform", + "undo", + "redo", + "save-reopen" + ], + "negative": [ + "missing-parent-id", + "cycle" + ], + "browser": "chromium", + "engine": "compiled-WASM-WebEngine-Main" + }, + "behaviorHash": "14a34d128abfe68e090e6d00c8f0eb1a935c6ea7a7189faa5dbf855011c2de23", + "dedupeKey": "OBJECT_OPERATIONS.PARENT|14a34d128abfe68e090e6d00c8f0eb1a935c6ea7a7189faa5dbf855011c2de23|8fa70dc7605e66393482e661e5987a8443dded56ab0092aeb977b40ae49888f8|f6d9a8e0a16403bc6fb765195b8f1a619a28de7a75c59a412f1654d46e8ebc0b", + "sourceBacked": true, + "chromiumProductionReady": true, + "fullFamilyParity": false + }, + "inventory": { + "matchedEntries": 1, + "pending": 1, + "total": 6900, + "basePending": 6618, + "effectivePending": 6614, + "remainderExplicit": true + }, + "entries": [ + { + "id": "operator:object.parent_set", + "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-P19-001/object-parent-selection-report.json b/tests/golden/WBV2-P19-001/object-parent-selection-report.json new file mode 100644 index 000000000..1285af8ea --- /dev/null +++ b/tests/golden/WBV2-P19-001/object-parent-selection-report.json @@ -0,0 +1,58 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P19-001", + "operation": "SELECT_OBJECT_PARENT_BATCH", + "status": "PASS", + "candidate": { + "capabilityId": "OBJECT_OPERATIONS.PARENT", + "legacyId": "operator:object.parent_set", + "legacyTask": "M16-GAP-01546", + "behavior": { + "capability": "OBJECT_OPERATIONS.PARENT", + "operation": "setParent", + "positive": [ + "parent-relation", + "keep-transform", + "undo", + "redo", + "save-reopen" + ], + "negative": [ + "missing-parent-id", + "cycle" + ], + "browser": "chromium", + "engine": "compiled-WASM-WebEngine-Main" + }, + "behaviorHash": "14a34d128abfe68e090e6d00c8f0eb1a935c6ea7a7189faa5dbf855011c2de23", + "dedupeKey": "OBJECT_OPERATIONS.PARENT|14a34d128abfe68e090e6d00c8f0eb1a935c6ea7a7189faa5dbf855011c2de23|8fa70dc7605e66393482e661e5987a8443dded56ab0092aeb977b40ae49888f8|f6d9a8e0a16403bc6fb765195b8f1a619a28de7a75c59a412f1654d46e8ebc0b", + "sourceBacked": true, + "chromiumProductionReady": true, + "fullFamilyParity": false + }, + "inventory": { + "matchedEntries": 1, + "pending": 1, + "total": 6900, + "basePending": 6618, + "effectivePending": 6614, + "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": "89b0826b28bd507703ea9ddee6b2fce2c75dfc31e2a8e4990117b7159525bf00", + "efficiency": { + "oneEntryScan": true, + "existingEvidenceReused": true, + "repeatedBlenderRuns": 0, + "repeatedChromiumRuns": 0, + "duplicateValidationAvoided": true + }, + "nextTask": "WBV2-P19-002" +} diff --git a/tests/golden/WBV2-P19-001/parent-task-plan.json b/tests/golden/WBV2-P19-001/parent-task-plan.json new file mode 100644 index 000000000..efd82e726 --- /dev/null +++ b/tests/golden/WBV2-P19-001/parent-task-plan.json @@ -0,0 +1,150 @@ +{ + "schemaVersion": 1, + "planId": "BLENDER_WEB_PARITY_V2_OBJECT_PARENT_EPOCH_1", + "status": "ACTIVE_OBJECT_PARENT_QUEUE", + "authority": "queue_reactivated_after_p18_create_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" + }, + "parentCreate": { + "manifest": "tests/golden/WBV2-P18-003/manifest.json", + "report": "tests/golden/WBV2-P18-003/object-create-gate-report.json", + "basePending": 6618, + "effectivePending": 6614, + "duplicateValidationAvoided": true + }, + "tasks": [ + { + "id": "WBV2-P19-000", + "phase": "P19", + "title": "authorize_object_parent_continuation", + "kind": "enabling", + "owner": "PROGRAM", + "dependsOn": [ + "WBV2-P18-003" + ], + "parityId": null, + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p19-governance", + "gate": "G2", + "card": "docs/tasks/WBV2-P19-000.md", + "behavior": "Authorize one Object Parent behavior after the P18 create overlay.", + "outputs": [ + "continuation root", + "candidate scope", + "hash boundary" + ], + "acceptance": [ + "P18 overlay remains hash-bound", + "setParent API is present", + "one production task is active" + ], + "status": "done", + "ready": false, + "queueMutationAllowed": true + }, + { + "id": "WBV2-P19-001", + "phase": "P19", + "title": "select_object_parent_batch", + "kind": "enabling", + "owner": "PARITY", + "dependsOn": [ + "WBV2-P19-000" + ], + "parityId": "OBJECT_OPERATIONS.PARENT", + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p19-selection", + "gate": "G2", + "card": "docs/tasks/WBV2-P19-001.md", + "behavior": "Select setParent as one unique Object Operations behavior.", + "outputs": [ + "candidate report", + "behavior hash", + "dedupe key" + ], + "acceptance": [ + "source command is hash-bound", + "create/duplicate evidence is not rerun", + "one legacy operator binding is selected" + ], + "status": "done", + "ready": false, + "queueMutationAllowed": false + }, + { + "id": "WBV2-P19-002", + "phase": "P19", + "title": "object_parent_engine_receipt", + "kind": "feature", + "owner": "OBJECT", + "dependsOn": [ + "WBV2-P19-001" + ], + "parityId": "OBJECT_OPERATIONS.PARENT", + "implementationClass": "LOCAL_EXACT", + "parallelGroup": "p19-object", + "gate": "G2", + "card": "docs/tasks/WBV2-P19-002.md", + "behavior": "Bind setParent, undo/redo, malformed rejection, and exact save/reopen to compiled WASM Main in Chromium.", + "outputs": [ + "parent production report", + "parent receipt", + "manifest" + ], + "acceptance": [ + "parent relation changes", + "undo/redo revisions are sequential", + "malformed parent input fails closed", + "save/reopen is exact" + ], + "status": "in_progress", + "ready": true, + "queueMutationAllowed": false + }, + { + "id": "WBV2-P19-003", + "phase": "P19", + "title": "close_object_parent_gate", + "kind": "enabling", + "owner": "RELEASE", + "dependsOn": [ + "WBV2-P19-002" + ], + "parityId": null, + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p19-release", + "gate": "G5", + "card": "docs/tasks/WBV2-P19-003.md", + "behavior": "Close the setParent gate and graduate only the exact operator binding.", + "outputs": [ + "object parent gate", + "completion overlay", + "manifest" + ], + "acceptance": [ + "only object parent is claimed", + "effective inventory remains explicit", + "no duplicate validation or historical over-claim" + ], + "status": "planned", + "ready": false, + "queueMutationAllowed": false + } + ], + "parentRecoveryPlan": { + "path": "tests/golden/WBV2-P19-000/parent-task-plan.json", + "sha256": "d0e129c85f428eeeae328613a633220b9c431c08d9cce55626521f25b22374e6" + } +} diff --git a/tests/golden/WBV2-P19-001/task-context.json b/tests/golden/WBV2-P19-001/task-context.json new file mode 100644 index 000000000..58df4caef --- /dev/null +++ b/tests/golden/WBV2-P19-001/task-context.json @@ -0,0 +1,171 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P19-001", + "parentTask": "WBV2-P19-000", + "status": "in_progress", + "goal": "Select setParent as one unique Object Operations behavior.", + "scope": { + "gap": "capability:OBJECT_OPERATIONS.PARENT", + "ownerFamily": "PARITY", + "implementationClass": "LOCAL_BOUNDED" + }, + "commands": [ + "node tools/web/check-task-context.mjs --task WBV2-P19-001 --write" + ], + "inputPaths": [], + "inputSelection": { + "schemaVersion": 1, + "limits": { + "maxFiles": 12, + "evidenceBytes": 8192, + "contextRemainingBytes": 3531, + "contextRemainingTokens": 881 + }, + "source": { + "bytes": 6373, + "tokens": 1595 + }, + "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-P19-001/", + "bytes": null, + "reason": "GENERATED_EVIDENCE_OUTPUT" + }, + { + "path": "docs/status/WBV2-P19-001.md", + "bytes": null, + "reason": "GENERATED_EVIDENCE_OUTPUT" + }, + { + "path": "tests/golden/WBV2-P19-001/manifest.json", + "bytes": null, + "reason": "GENERATED_EVIDENCE_OUTPUT" + } + ], + "totals": { + "files": 0, + "bytes": 0, + "tokens": 0 + } + }, + "exitCriteria": [ + "source command is hash-bound", + "create/duplicate evidence is not rerun", + "one legacy operator binding is selected" + ], + "nextTask": "WBV2-P19-002", + "sourceDocuments": { + "queue": "docs/EXECUTION_QUEUE.md", + "taskCard": "docs/tasks/WBV2-P19-001.md", + "taskIndex": "tests/golden/WBV2/task-index.json", + "parentManifest": "tests/golden/WBV2-P19-000/manifest.json", + "parentStatus": "docs/status/WBV2-P19-000.md" + }, + "readPolicy": { + "required": [ + "docs/EXECUTION_QUEUE.md", + "docs/tasks/WBV2-P19-001.md", + "tests/golden/WBV2-P19-000/manifest.json", + "docs/status/WBV2-P19-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-P19-000", + "parentTask": "WBV2-P18-003", + "status": "done", + "nextTask": "WBV2-P19-001", + "artifactCount": 9 + }, + "statusSummary": [ + "# WBV2-P19-000 status", + "- task: `WBV2-P19-000`; parent: `WBV2-P18-003`; status: `done`", + "- candidate: `OBJECT_OPERATIONS.PARENT`; source API is present", + "- effective inventory carried forward: `285` completed, `6614` pending", + "- duplicate validation: `forbidden`; representative slice only", + "- nextTask: `WBV2-P19-001`" + ] + }, + "budgets": { + "queueBytes": 4096, + "taskBytes": 1078, + "parentManifestBytes": 24576, + "parentStatusBytes": 6144, + "evidenceFiles": 12, + "evidenceBytes": 8192, + "contextTokens": 3500, + "contextEnvelopeTokens": 1024, + "taskLines": 35, + "taskTokens": 270 + }, + "size": { + "documents": [ + { + "path": "docs/EXECUTION_QUEUE.md", + "bytes": 2803, + "lines": 51, + "tokens": 701 + }, + { + "path": "docs/tasks/WBV2-P19-001.md", + "bytes": 1078, + "lines": 35, + "tokens": 270 + }, + { + "path": "tests/golden/WBV2-P19-000/manifest.json", + "bytes": 2182, + "lines": 61, + "tokens": 546 + }, + { + "path": "docs/status/WBV2-P19-000.md", + "bytes": 310, + "lines": 8, + "tokens": 78 + } + ], + "sourceTokens": 1595, + "evidenceFiles": 0, + "evidenceBytes": 0, + "evidenceTokens": 0, + "totalTokens": 1595, + "reservedEnvelopeTokens": 1024, + "estimatedContextTokens": 2619, + "serializedContextTokens": 592, + "withinBudget": true + } +} diff --git a/tests/golden/WBV2-P19-002/manifest.json b/tests/golden/WBV2-P19-002/manifest.json new file mode 100644 index 000000000..901a592dd --- /dev/null +++ b/tests/golden/WBV2-P19-002/manifest.json @@ -0,0 +1,78 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P19-002", + "parentTask": "WBV2-P19-001", + "operation": "OBJECT_PARENT_ENGINE_RECEIPT", + "status": "done", + "enablingTask": false, + "parityStateChange": true, + "runtime": "PLAYWRIGHT_CHROMIUM_WEBENGINE_WASM", + "artifacts": { + "parentManifest": { + "path": "tests/golden/WBV2-P19-001/manifest.json", + "sha256": "a717bf3ae3a63c0c123aa932618c13ed35d2518b801bc266e96d11b29abf98fe" + }, + "selection": { + "path": "tests/golden/WBV2-P19-001/object-parent-selection-report.json", + "sha256": "ba9960c1aed7f0da68c1198dfbd926d39aed53c6d7421db7da0fe1089434d66b" + }, + "api": { + "path": "blender-5.2.0/source/blender/web_engine/web_engine_api.cpp", + "sha256": "8fa70dc7605e66393482e661e5987a8443dded56ab0092aeb977b40ae49888f8" + }, + "test": { + "path": "web/tests/e2e/wbv2-object-parent-production.spec.ts", + "sha256": "391921664bc608cff5a34ca978be6132588bf26c09b21aec5cd8ef885f6c029d" + }, + "fixture": { + "path": "tests/files/web/basic_scene.blend", + "sha256": "6fcc55bda74da8c95da96ba068b60339bf60ca44147ff8000fbb95d296db2a73" + }, + "production": { + "path": "tests/golden/WBV2-P19-002/object-parent-production.json", + "sha256": "4c0d5dbda9d2157b281ad35e1ab1fac6f65e7a4b0533ca597932f11b53a13f0a" + }, + "secondProduction": { + "path": "tests/golden/WBV2-P19-002/object-parent-production.second.json", + "sha256": "4c0d5dbda9d2157b281ad35e1ab1fac6f65e7a4b0533ca597932f11b53a13f0a" + }, + "report": { + "path": "tests/golden/WBV2-P19-002/object-parent-receipt-report.json", + "sha256": "a76479b66bc542c293d6ada71251e89ba941d8decb9475d60c4aee8c2890f32c" + }, + "generator": { + "path": "tools/web/generate-wbv2-parent-receipt.mjs", + "sha256": "e037f3a3e9fa6246a118c99ab17ba70ba77b9e12f08cdca695a2cc2b1027d8b2" + }, + "status": { + "path": "docs/status/WBV2-P19-002.md", + "sha256": "03065ee37888c05341c058228f25b2c0e7fcdc3dfc96d262698ffdb6ace9a0b3" + }, + "parityPlan": { + "path": "tests/golden/WBV2-P19-002/parent-task-plan.json", + "sha256": "66bb310caceed1209d76d417bc4f3724be236e5502e74a49aa1a5c3b9aab69a0" + }, + "taskContext": { + "path": "tests/golden/WBV2-P19-002/task-context.json", + "sha256": "f30d5acb2367e5a29b44c007195d4625e8a7f4dad797e6c457fbf668567fc094" + } + }, + "assertions": { + "exactInventoryBindings": 1, + "boundInventoryIds": [ + "operator:object.parent_set" + ], + "parentRelationChanged": true, + "undoRedoSequential": true, + "malformedRejected": true, + "saveReopen": "EXACT", + "deterministic": true, + "representativeSliceOnly": true, + "fullFamilyParity": false, + "inventoryTotal": 6900, + "baseInventoryPending": 6618, + "effectivePending": 6614, + "historicalReproduction": false + }, + "nextTask": "WBV2-P19-003" +} diff --git a/tests/golden/WBV2-P19-002/object-parent-production.json b/tests/golden/WBV2-P19-002/object-parent-production.json new file mode 100644 index 000000000..4beaa6359 --- /dev/null +++ b/tests/golden/WBV2-P19-002/object-parent-production.json @@ -0,0 +1,23 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P19-002", + "operation": "OBJECT_PARENT_ENGINE_CHROMIUM", + "queueMutation": false, + "fixtureSha256": "6fcc55bda74da8c95da96ba068b60339bf60ca44147ff8000fbb95d296db2a73", + "browser": "chromium", + "baseRevision": 1, + "childId": "object:BasicArea", + "parentId": "object:BasicCamera", + "parentAfter": "object:BasicCamera", + "createRevision": 2, + "undoRevision": 3, + "redoRevision": 4, + "malformed": { + "code": "INVALID_ARGUMENT", + "message": "setParent requires editable existing objects" + }, + "malformedRevisionPreserved": true, + "reopenedParent": "object:BasicCamera", + "reopenedRevision": 1, + "savedSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" +} diff --git a/tests/golden/WBV2-P19-002/object-parent-production.second.json b/tests/golden/WBV2-P19-002/object-parent-production.second.json new file mode 100644 index 000000000..4beaa6359 --- /dev/null +++ b/tests/golden/WBV2-P19-002/object-parent-production.second.json @@ -0,0 +1,23 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P19-002", + "operation": "OBJECT_PARENT_ENGINE_CHROMIUM", + "queueMutation": false, + "fixtureSha256": "6fcc55bda74da8c95da96ba068b60339bf60ca44147ff8000fbb95d296db2a73", + "browser": "chromium", + "baseRevision": 1, + "childId": "object:BasicArea", + "parentId": "object:BasicCamera", + "parentAfter": "object:BasicCamera", + "createRevision": 2, + "undoRevision": 3, + "redoRevision": 4, + "malformed": { + "code": "INVALID_ARGUMENT", + "message": "setParent requires editable existing objects" + }, + "malformedRevisionPreserved": true, + "reopenedParent": "object:BasicCamera", + "reopenedRevision": 1, + "savedSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" +} diff --git a/tests/golden/WBV2-P19-002/object-parent-receipt-report.json b/tests/golden/WBV2-P19-002/object-parent-receipt-report.json new file mode 100644 index 000000000..9dadcb5b8 --- /dev/null +++ b/tests/golden/WBV2-P19-002/object-parent-receipt-report.json @@ -0,0 +1,64 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P19-002", + "operation": "OBJECT_PARENT_ENGINE_RECEIPT", + "status": "PASS", + "browser": "chromium", + "queueMutation": false, + "source": { + "manifest": "tests/golden/WBV2-P19-001/manifest.json", + "manifestSha256": "a717bf3ae3a63c0c123aa932618c13ed35d2518b801bc266e96d11b29abf98fe", + "selection": "tests/golden/WBV2-P19-001/object-parent-selection-report.json", + "selectionSha256": "ba9960c1aed7f0da68c1198dfbd926d39aed53c6d7421db7da0fe1089434d66b", + "api": "blender-5.2.0/source/blender/web_engine/web_engine_api.cpp", + "apiSha256": "8fa70dc7605e66393482e661e5987a8443dded56ab0092aeb977b40ae49888f8", + "test": "web/tests/e2e/wbv2-object-parent-production.spec.ts", + "testSha256": "391921664bc608cff5a34ca978be6132588bf26c09b21aec5cd8ef885f6c029d", + "fixture": "tests/files/web/basic_scene.blend", + "fixtureSha256": "6fcc55bda74da8c95da96ba068b60339bf60ca44147ff8000fbb95d296db2a73" + }, + "production": { + "report": "tests/golden/WBV2-P19-002/object-parent-production.json", + "reportSha256": "4c0d5dbda9d2157b281ad35e1ab1fac6f65e7a4b0533ca597932f11b53a13f0a", + "secondReport": "tests/golden/WBV2-P19-002/object-parent-production.second.json", + "secondReportSha256": "4c0d5dbda9d2157b281ad35e1ab1fac6f65e7a4b0533ca597932f11b53a13f0a", + "deterministic": true, + "childId": "object:BasicArea", + "parentId": "object:BasicCamera", + "revisions": [ + 1, + 2, + 3, + 4 + ], + "malformed": { + "code": "INVALID_ARGUMENT", + "message": "setParent requires editable existing objects" + }, + "malformedRevisionPreserved": true, + "reopenedParent": "object:BasicCamera", + "reopenedRevision": 1, + "saveReopen": "EXACT" + }, + "inventoryBindings": [ + { + "id": "operator:object.parent_set", + "evidence": "setParent", + "exact": true, + "reason": "bounded protocol command persists a parent relation" + } + ], + "assertions": { + "parentRelationChanged": true, + "undoRedoSequential": true, + "malformedRejected": true, + "mainUnchangedOnMalformed": true, + "saveReopenExact": true, + "deterministic": true, + "inventoryBindingsExact": true, + "representativeSliceOnly": true, + "fullFamilyParity": false, + "historicalReproduction": false + }, + "nextTask": "WBV2-P19-003" +} diff --git a/tests/golden/WBV2-P19-002/parent-task-plan.json b/tests/golden/WBV2-P19-002/parent-task-plan.json new file mode 100644 index 000000000..6270fec9f --- /dev/null +++ b/tests/golden/WBV2-P19-002/parent-task-plan.json @@ -0,0 +1,150 @@ +{ + "schemaVersion": 1, + "planId": "BLENDER_WEB_PARITY_V2_OBJECT_PARENT_EPOCH_1", + "status": "ACTIVE_OBJECT_PARENT_QUEUE", + "authority": "queue_reactivated_after_p18_create_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" + }, + "parentCreate": { + "manifest": "tests/golden/WBV2-P18-003/manifest.json", + "report": "tests/golden/WBV2-P18-003/object-create-gate-report.json", + "basePending": 6618, + "effectivePending": 6614, + "duplicateValidationAvoided": true + }, + "tasks": [ + { + "id": "WBV2-P19-000", + "phase": "P19", + "title": "authorize_object_parent_continuation", + "kind": "enabling", + "owner": "PROGRAM", + "dependsOn": [ + "WBV2-P18-003" + ], + "parityId": null, + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p19-governance", + "gate": "G2", + "card": "docs/tasks/WBV2-P19-000.md", + "behavior": "Authorize one Object Parent behavior after the P18 create overlay.", + "outputs": [ + "continuation root", + "candidate scope", + "hash boundary" + ], + "acceptance": [ + "P18 overlay remains hash-bound", + "setParent API is present", + "one production task is active" + ], + "status": "done", + "ready": false, + "queueMutationAllowed": true + }, + { + "id": "WBV2-P19-001", + "phase": "P19", + "title": "select_object_parent_batch", + "kind": "enabling", + "owner": "PARITY", + "dependsOn": [ + "WBV2-P19-000" + ], + "parityId": "OBJECT_OPERATIONS.PARENT", + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p19-selection", + "gate": "G2", + "card": "docs/tasks/WBV2-P19-001.md", + "behavior": "Select setParent as one unique Object Operations behavior.", + "outputs": [ + "candidate report", + "behavior hash", + "dedupe key" + ], + "acceptance": [ + "source command is hash-bound", + "create/duplicate evidence is not rerun", + "one legacy operator binding is selected" + ], + "status": "done", + "ready": false, + "queueMutationAllowed": false + }, + { + "id": "WBV2-P19-002", + "phase": "P19", + "title": "object_parent_engine_receipt", + "kind": "feature", + "owner": "OBJECT", + "dependsOn": [ + "WBV2-P19-001" + ], + "parityId": "OBJECT_OPERATIONS.PARENT", + "implementationClass": "LOCAL_EXACT", + "parallelGroup": "p19-object", + "gate": "G2", + "card": "docs/tasks/WBV2-P19-002.md", + "behavior": "Bind setParent, undo/redo, malformed rejection, and exact save/reopen to compiled WASM Main in Chromium.", + "outputs": [ + "parent production report", + "parent receipt", + "manifest" + ], + "acceptance": [ + "parent relation changes", + "undo/redo revisions are sequential", + "malformed parent input fails closed", + "save/reopen is exact" + ], + "status": "done", + "ready": false, + "queueMutationAllowed": false + }, + { + "id": "WBV2-P19-003", + "phase": "P19", + "title": "close_object_parent_gate", + "kind": "enabling", + "owner": "RELEASE", + "dependsOn": [ + "WBV2-P19-002" + ], + "parityId": null, + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p19-release", + "gate": "G5", + "card": "docs/tasks/WBV2-P19-003.md", + "behavior": "Close the setParent gate and graduate only the exact operator binding.", + "outputs": [ + "object parent gate", + "completion overlay", + "manifest" + ], + "acceptance": [ + "only object parent 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-P19-001/parent-task-plan.json", + "sha256": "c9822702d3b3fb5bb5b1eed958a93baf4d43820f18b95fe835cb8ebddd472ff5" + } +} diff --git a/tests/golden/WBV2-P19-002/task-context.json b/tests/golden/WBV2-P19-002/task-context.json new file mode 100644 index 000000000..6e49b5396 --- /dev/null +++ b/tests/golden/WBV2-P19-002/task-context.json @@ -0,0 +1,170 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P19-002", + "parentTask": "WBV2-P19-001", + "status": "in_progress", + "goal": "Bind setParent, undo/redo, malformed rejection, and exact save/reopen to compiled WASM Main in Chromium.", + "scope": { + "gap": "capability:OBJECT_OPERATIONS.PARENT", + "ownerFamily": "OBJECT", + "implementationClass": "LOCAL_EXACT" + }, + "commands": [ + "node tools/web/check-task-context.mjs --task WBV2-P19-002 --write" + ], + "inputPaths": [ + "tests/golden/WBV2-P19-001/object-parent-selection-report.json" + ], + "inputSelection": { + "schemaVersion": 1, + "limits": { + "maxFiles": 12, + "evidenceBytes": 8192, + "contextRemainingBytes": 3149, + "contextRemainingTokens": 786 + }, + "source": { + "bytes": 6755, + "tokens": 1690 + }, + "selected": [ + { + "path": "tests/golden/WBV2-P19-001/object-parent-selection-report.json", + "bytes": 2033, + "tokens": 509 + } + ], + "excluded": [ + { + "path": "web/tests/e2e/wbv2-object-parent-production.spec.ts", + "bytes": 3808, + "reason": "CONTEXT_REMAINING_SPACE" + }, + { + "path": "tests/golden/WBV2-P19-002/", + "bytes": null, + "reason": "GENERATED_EVIDENCE_OUTPUT" + }, + { + "path": "docs/status/WBV2-P19-002.md", + "bytes": null, + "reason": "GENERATED_EVIDENCE_OUTPUT" + }, + { + "path": "tests/golden/WBV2-P19-002/manifest.json", + "bytes": null, + "reason": "GENERATED_EVIDENCE_OUTPUT" + } + ], + "totals": { + "files": 1, + "bytes": 2033, + "tokens": 509 + } + }, + "exitCriteria": [ + "parent relation changes", + "undo/redo revisions are sequential", + "malformed parent input fails closed", + "save/reopen is exact" + ], + "nextTask": "WBV2-P19-003", + "sourceDocuments": { + "queue": "docs/EXECUTION_QUEUE.md", + "taskCard": "docs/tasks/WBV2-P19-002.md", + "taskIndex": "tests/golden/WBV2/task-index.json", + "parentManifest": "tests/golden/WBV2-P19-001/manifest.json", + "parentStatus": "docs/status/WBV2-P19-001.md" + }, + "readPolicy": { + "required": [ + "docs/EXECUTION_QUEUE.md", + "docs/tasks/WBV2-P19-002.md", + "tests/golden/WBV2-P19-001/manifest.json", + "docs/status/WBV2-P19-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-P19-001", + "parentTask": "WBV2-P19-000", + "status": "done", + "nextTask": "WBV2-P19-002", + "artifactCount": 10 + }, + "statusSummary": [ + "# WBV2-P19-001 status", + "- task: `WBV2-P19-001`; parent: `WBV2-P19-000`; status: `done`", + "- selected behavior: `setParent`; exact candidate: `operator:object.parent_set`", + "- base inventory: `6900` total, `6618` pending; effective carried overlay: `6614` pending", + "- behavior hash: `14a34d128abfe68e090e6d00c8f0eb1a935c6ea7a7189faa5dbf855011c2de23`; duplicate validation: `forbidden`", + "- nextTask: `WBV2-P19-002`" + ] + }, + "budgets": { + "queueBytes": 4096, + "taskBytes": 1108, + "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-P19-002.md", + "bytes": 1108, + "lines": 35, + "tokens": 277 + }, + { + "path": "tests/golden/WBV2-P19-001/manifest.json", + "bytes": 2442, + "lines": 68, + "tokens": 611 + }, + { + "path": "docs/status/WBV2-P19-001.md", + "bytes": 402, + "lines": 8, + "tokens": 101 + } + ], + "sourceTokens": 1690, + "evidenceFiles": 1, + "evidenceBytes": 2033, + "evidenceTokens": 509, + "totalTokens": 2199, + "reservedEnvelopeTokens": 1024, + "estimatedContextTokens": 3223, + "serializedContextTokens": 665, + "withinBudget": true + } +} diff --git a/tests/golden/WBV2-P19-003/inventory-completion-overlay.json b/tests/golden/WBV2-P19-003/inventory-completion-overlay.json new file mode 100644 index 000000000..5863217ae --- /dev/null +++ b/tests/golden/WBV2-P19-003/inventory-completion-overlay.json @@ -0,0 +1,100 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P19-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-P18-003/inventory-completion-overlay.json", + "sha256": "75b6fb36961e215e3c121e4a1dc6fdcd8d0fd786279b24d2e8d9b4ab0cf00da1", + "effectiveCompleted": 285, + "effectivePending": 6614 + }, + "completionEvidence": { + "receipt": "tests/golden/WBV2-P19-002/object-parent-receipt-report.json", + "receiptSha256": "a76479b66bc542c293d6ada71251e89ba941d8decb9475d60c4aee8c2890f32c", + "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 + } + ], + "summary": { + "newlyVerifiedEntries": 1, + "effectiveCompleted": 286, + "effectivePending": 6613, + "claimedComplete": 5, + "basePendingPreserved": true, + "fullFamilyParity": false, + "historicalReproduction": false + } +} diff --git a/tests/golden/WBV2-P19-003/manifest.json b/tests/golden/WBV2-P19-003/manifest.json new file mode 100644 index 000000000..df961cf64 --- /dev/null +++ b/tests/golden/WBV2-P19-003/manifest.json @@ -0,0 +1,72 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P19-003", + "parentTask": "WBV2-P19-002", + "operation": "CLOSE_OBJECT_PARENT_GATE", + "status": "done", + "enablingTask": true, + "parityStateChange": true, + "runtime": "READ_ONLY_OBJECT_PARENT_GATE_WITH_COMPLETION_OVERLAY", + "artifacts": { + "parentManifest": { + "path": "tests/golden/WBV2-P19-002/manifest.json", + "sha256": "cf3f82384a4c3b9aa99d8c031c2501827b820ce0e3e991005d3e80d100165c67" + }, + "receipt": { + "path": "tests/golden/WBV2-P19-002/object-parent-receipt-report.json", + "sha256": "a76479b66bc542c293d6ada71251e89ba941d8decb9475d60c4aee8c2890f32c" + }, + "previousOverlay": { + "path": "tests/golden/WBV2-P18-003/inventory-completion-overlay.json", + "sha256": "75b6fb36961e215e3c121e4a1dc6fdcd8d0fd786279b24d2e8d9b4ab0cf00da1" + }, + "baseInventory": { + "path": "tests/golden/WBV2-P0-002/parity-map.json", + "sha256": "a60a77cae000941a953d55adbf93d8f6e275533891713d6eae993f60faed94e8" + }, + "overlay": { + "path": "tests/golden/WBV2-P19-003/inventory-completion-overlay.json", + "sha256": "0eb80360ebf1fe76bd3d42e4f5034e687369ec78039c5fb32b3e16ad5a3aaf6d" + }, + "report": { + "path": "tests/golden/WBV2-P19-003/object-parent-gate-report.json", + "sha256": "abd7a7ec978590b70ba2059022a96c991e63e8c0b716c8e277b64060a93e7d54" + }, + "generator": { + "path": "tools/web/generate-wbv2-parent-gate.mjs", + "sha256": "dfdcbe7ce37354a043ae796d81b7a6438c9e2867093d45e42eea498e56cee046" + }, + "status": { + "path": "docs/status/WBV2-P19-003.md", + "sha256": "b956148ed06e2e817156cab6621ed2b9e2fb91cba171dcaee3bf48a441e18f82" + }, + "parityPlan": { + "path": "tests/golden/WBV2-P19-003/parent-task-plan.json", + "sha256": "83444c65311eff4430462658c9d4e4219a597347541c42266fee8f9c8647d138" + }, + "taskContext": { + "path": "tests/golden/WBV2-P19-003/task-context.json", + "sha256": "ecdc31873c1fab555c7c99388b23ac1ecde65c1f343483ad92168a2466ad3bd5" + } + }, + "assertions": { + "totalFeatureClaims": 4, + "newObjectParentClaims": 1, + "exactInventoryBindings": 1, + "effectiveCompleted": 286, + "effectivePending": 6613, + "baseInventoryCompleted": 281, + "baseInventoryPending": 6618, + "claimedCompleteOverlay": 5, + "uniqueBehaviorRuns": 5, + "repeatedBlenderRuns": 0, + "repeatedChromiumRuns": 0, + "duplicateValidationAvoided": true, + "baseInventoryUntouched": true, + "provenanceEpoch": 2, + "authorizedRebaselineOnly": true, + "fullHistoricalReproduction": false, + "deterministic": true + }, + "nextTask": null +} diff --git a/tests/golden/WBV2-P19-003/object-parent-gate-report.json b/tests/golden/WBV2-P19-003/object-parent-gate-report.json new file mode 100644 index 000000000..a461111b1 --- /dev/null +++ b/tests/golden/WBV2-P19-003/object-parent-gate-report.json @@ -0,0 +1,155 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P19-003", + "operation": "CLOSE_OBJECT_PARENT_GATE", + "status": "PASS", + "decision": { + "status": "READY_WITH_OBJECT_PARENT_SLICE_AND_INVENTORY_OVERLAY", + "code": "OBJECT_PARENT_AUTHORIZED_REBASELINE", + "featureParityClaims": [ + "SCULPT.PAINT_ATTRIBUTES", + "OBJECT_OPERATIONS.DUPLICATE", + "OBJECT_OPERATIONS.CREATE", + "OBJECT_OPERATIONS.PARENT" + ], + "featureParityClaimCount": 4, + "newFeatureClaim": "OBJECT_OPERATIONS.PARENT", + "newlyVerifiedInventoryEntries": 1, + "baseInventoryPending": 6618, + "effectivePending": 6613, + "effectiveCompleted": 286, + "claimedCompleteOverlay": 5, + "fullFamilyParity": false, + "engineBound": true, + "browser": "chromium", + "provenanceEpoch": 2, + "releaseScope": "AUTHORIZED_REBASELINE_ONLY", + "fullHistoricalReproduction": false, + "inventoryTotal": 6900 + }, + "evidence": { + "receipt": { + "path": "tests/golden/WBV2-P19-002/object-parent-receipt-report.json", + "sha256": "a76479b66bc542c293d6ada71251e89ba941d8decb9475d60c4aee8c2890f32c", + "bindings": [ + { + "id": "operator:object.parent_set", + "evidence": "setParent", + "exact": true, + "reason": "bounded protocol command persists a parent relation" + } + ] + }, + "overlay": { + "path": "tests/golden/WBV2-P19-003/inventory-completion-overlay.json", + "sha256": "0eb80360ebf1fe76bd3d42e4f5034e687369ec78039c5fb32b3e16ad5a3aaf6d", + "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 + } + ] + }, + "previousOverlay": { + "path": "tests/golden/WBV2-P18-003/inventory-completion-overlay.json", + "sha256": "75b6fb36961e215e3c121e4a1dc6fdcd8d0fd786279b24d2e8d9b4ab0cf00da1" + }, + "baseInventory": { + "path": "tests/golden/WBV2-P0-002/parity-map.json", + "sha256": "a60a77cae000941a953d55adbf93d8f6e275533891713d6eae993f60faed94e8", + "pending": 6618 + } + }, + "efficiency": { + "uniqueBehaviorRuns": 5, + "repeatedBlenderRuns": 0, + "repeatedChromiumRuns": 0, + "duplicateValidationAvoided": true, + "baseInventoryUntouched": true + }, + "coverage": { + "baseTotal": 6900, + "baseCompleted": 281, + "basePending": 6618, + "overlayCompleted": 5, + "effectiveCompleted": 286, + "effectivePending": 6613 + }, + "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-P19-003/parent-task-plan.json b/tests/golden/WBV2-P19-003/parent-task-plan.json new file mode 100644 index 000000000..fae34c1e5 --- /dev/null +++ b/tests/golden/WBV2-P19-003/parent-task-plan.json @@ -0,0 +1,150 @@ +{ + "schemaVersion": 1, + "planId": "BLENDER_WEB_PARITY_V2_OBJECT_PARENT_EPOCH_1", + "status": "COMPLETED_WITH_OBJECT_PARENT_SLICE", + "authority": "queue_reactivated_after_p18_create_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" + }, + "parentCreate": { + "manifest": "tests/golden/WBV2-P18-003/manifest.json", + "report": "tests/golden/WBV2-P18-003/object-create-gate-report.json", + "basePending": 6618, + "effectivePending": 6614, + "duplicateValidationAvoided": true + }, + "tasks": [ + { + "id": "WBV2-P19-000", + "phase": "P19", + "title": "authorize_object_parent_continuation", + "kind": "enabling", + "owner": "PROGRAM", + "dependsOn": [ + "WBV2-P18-003" + ], + "parityId": null, + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p19-governance", + "gate": "G2", + "card": "docs/tasks/WBV2-P19-000.md", + "behavior": "Authorize one Object Parent behavior after the P18 create overlay.", + "outputs": [ + "continuation root", + "candidate scope", + "hash boundary" + ], + "acceptance": [ + "P18 overlay remains hash-bound", + "setParent API is present", + "one production task is active" + ], + "status": "done", + "ready": false, + "queueMutationAllowed": true + }, + { + "id": "WBV2-P19-001", + "phase": "P19", + "title": "select_object_parent_batch", + "kind": "enabling", + "owner": "PARITY", + "dependsOn": [ + "WBV2-P19-000" + ], + "parityId": "OBJECT_OPERATIONS.PARENT", + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p19-selection", + "gate": "G2", + "card": "docs/tasks/WBV2-P19-001.md", + "behavior": "Select setParent as one unique Object Operations behavior.", + "outputs": [ + "candidate report", + "behavior hash", + "dedupe key" + ], + "acceptance": [ + "source command is hash-bound", + "create/duplicate evidence is not rerun", + "one legacy operator binding is selected" + ], + "status": "done", + "ready": false, + "queueMutationAllowed": false + }, + { + "id": "WBV2-P19-002", + "phase": "P19", + "title": "object_parent_engine_receipt", + "kind": "feature", + "owner": "OBJECT", + "dependsOn": [ + "WBV2-P19-001" + ], + "parityId": "OBJECT_OPERATIONS.PARENT", + "implementationClass": "LOCAL_EXACT", + "parallelGroup": "p19-object", + "gate": "G2", + "card": "docs/tasks/WBV2-P19-002.md", + "behavior": "Bind setParent, undo/redo, malformed rejection, and exact save/reopen to compiled WASM Main in Chromium.", + "outputs": [ + "parent production report", + "parent receipt", + "manifest" + ], + "acceptance": [ + "parent relation changes", + "undo/redo revisions are sequential", + "malformed parent input fails closed", + "save/reopen is exact" + ], + "status": "done", + "ready": false, + "queueMutationAllowed": false + }, + { + "id": "WBV2-P19-003", + "phase": "P19", + "title": "close_object_parent_gate", + "kind": "enabling", + "owner": "RELEASE", + "dependsOn": [ + "WBV2-P19-002" + ], + "parityId": null, + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p19-release", + "gate": "G5", + "card": "docs/tasks/WBV2-P19-003.md", + "behavior": "Close the setParent gate and graduate only the exact operator binding.", + "outputs": [ + "object parent gate", + "completion overlay", + "manifest" + ], + "acceptance": [ + "only object parent 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-P19-002/parent-task-plan.json", + "sha256": "66bb310caceed1209d76d417bc4f3724be236e5502e74a49aa1a5c3b9aab69a0" + } +} diff --git a/tests/golden/WBV2-P19-003/task-context.json b/tests/golden/WBV2-P19-003/task-context.json new file mode 100644 index 000000000..be43a5c8d --- /dev/null +++ b/tests/golden/WBV2-P19-003/task-context.json @@ -0,0 +1,170 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P19-003", + "parentTask": "WBV2-P19-002", + "status": "in_progress", + "goal": "Close the setParent gate and graduate only the exact operator binding.", + "scope": { + "gap": "workflow:close_object_parent_gate", + "ownerFamily": "RELEASE", + "implementationClass": "LOCAL_BOUNDED" + }, + "commands": [ + "node tools/web/check-task-context.mjs --task WBV2-P19-003 --write" + ], + "inputPaths": [ + "tests/golden/WBV2-P19-002/object-parent-receipt-report.json" + ], + "inputSelection": { + "schemaVersion": 1, + "limits": { + "maxFiles": 12, + "evidenceBytes": 8192, + "contextRemainingBytes": 2717, + "contextRemainingTokens": 677 + }, + "source": { + "bytes": 7187, + "tokens": 1799 + }, + "selected": [ + { + "path": "tests/golden/WBV2-P19-002/object-parent-receipt-report.json", + "bytes": 2338, + "tokens": 585 + } + ], + "excluded": [ + { + "path": "tests/golden/WBV2-P18-003/inventory-completion-overlay.json", + "bytes": 3661, + "reason": "CONTEXT_REMAINING_SPACE" + }, + { + "path": "tests/golden/WBV2-P19-003/", + "bytes": null, + "reason": "GENERATED_EVIDENCE_OUTPUT" + }, + { + "path": "docs/status/WBV2-P19-003.md", + "bytes": null, + "reason": "GENERATED_EVIDENCE_OUTPUT" + }, + { + "path": "tests/golden/WBV2-P19-003/manifest.json", + "bytes": null, + "reason": "GENERATED_EVIDENCE_OUTPUT" + } + ], + "totals": { + "files": 1, + "bytes": 2338, + "tokens": 585 + } + }, + "exitCriteria": [ + "only object parent 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-P19-003.md", + "taskIndex": "tests/golden/WBV2/task-index.json", + "parentManifest": "tests/golden/WBV2-P19-002/manifest.json", + "parentStatus": "docs/status/WBV2-P19-002.md" + }, + "readPolicy": { + "required": [ + "docs/EXECUTION_QUEUE.md", + "docs/tasks/WBV2-P19-003.md", + "tests/golden/WBV2-P19-002/manifest.json", + "docs/status/WBV2-P19-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-P19-002", + "parentTask": "WBV2-P19-001", + "status": "done", + "nextTask": "WBV2-P19-003", + "artifactCount": 12 + }, + "statusSummary": [ + "# WBV2-P19-002 status", + "- task: `WBV2-P19-002`; parent: `WBV2-P19-001`; status: `done`", + "- exact inventory binding: `operator:object.parent_set` via `setParent`", + "- parent relation: `object:BasicArea -> object:BasicCamera`; revisions: `1 -> 4` sequential", + "- malformed parent rejected; save/reopen: `EXACT`; deterministic second run: `true`", + "- effective pending before overlay: `6614`; representative slice: `true`", + "- nextTask: `WBV2-P19-003`" + ] + }, + "budgets": { + "queueBytes": 4096, + "taskBytes": 1073, + "parentManifestBytes": 24576, + "parentStatusBytes": 6144, + "evidenceFiles": 12, + "evidenceBytes": 8192, + "contextTokens": 3500, + "contextEnvelopeTokens": 1024, + "taskLines": 35, + "taskTokens": 269 + }, + "size": { + "documents": [ + { + "path": "docs/EXECUTION_QUEUE.md", + "bytes": 2803, + "lines": 51, + "tokens": 701 + }, + { + "path": "docs/tasks/WBV2-P19-003.md", + "bytes": 1073, + "lines": 35, + "tokens": 269 + }, + { + "path": "tests/golden/WBV2-P19-002/manifest.json", + "bytes": 2877, + "lines": 79, + "tokens": 720 + }, + { + "path": "docs/status/WBV2-P19-002.md", + "bytes": 434, + "lines": 9, + "tokens": 109 + } + ], + "sourceTokens": 1799, + "evidenceFiles": 1, + "evidenceBytes": 2338, + "evidenceTokens": 585, + "totalTokens": 2384, + "reservedEnvelopeTokens": 1024, + "estimatedContextTokens": 3408, + "serializedContextTokens": 651, + "withinBudget": true + } +} diff --git a/tests/golden/WBV2/task-catalog.jsonl b/tests/golden/WBV2/task-catalog.jsonl index 2c47882fc..882a165d6 100644 --- a/tests/golden/WBV2/task-catalog.jsonl +++ b/tests/golden/WBV2/task-catalog.jsonl @@ -1,4 +1,4 @@ -{"id":"WBV2-P18-000","gapId":"workflow:authorize_object_create_continuation","ownerFamily":"PROGRAM","sourceTask":"P18","state":"completed","targetImplementationClass":"LOCAL_BOUNDED","exitCriteria":["P17 overlay remains hash-bound","createPrimitive API is present","one production task is active"]} -{"id":"WBV2-P18-001","gapId":"OBJECT_OPERATIONS.CREATE","ownerFamily":"PARITY","sourceTask":"P18","state":"completed","targetImplementationClass":"LOCAL_BOUNDED","exitCriteria":["source command is hash-bound","duplicate/transform evidence is not rerun","one legacy operator binding is selected"]} -{"id":"WBV2-P18-002","gapId":"OBJECT_OPERATIONS.CREATE","ownerFamily":"OBJECT","sourceTask":"P18","state":"completed","targetImplementationClass":"LOCAL_EXACT","exitCriteria":["primitive creates a distinct object","undo/redo revisions are sequential","malformed primitive fails closed","save/reopen is exact"]} -{"id":"WBV2-P18-003","gapId":"workflow:close_object_create_gate","ownerFamily":"RELEASE","sourceTask":"P18","state":"active","targetImplementationClass":"LOCAL_BOUNDED","exitCriteria":["only object add is claimed","effective inventory remains explicit","no duplicate validation or historical over-claim"]} +{"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"]} diff --git a/tests/golden/WBV2/task-index.json b/tests/golden/WBV2/task-index.json index 59def51ec..239e31f41 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-P18-003/create-task-plan.json","sha256":"b519eafd0ed4c0570956d171c72678ee38376026da54170629bb92ad16fbffb4"},"catalog":{"path":"tests/golden/WBV2/task-catalog.jsonl","sha256":"cf53bb997dce1a62e5ff45be99cfda17a8a0be0cbe9e4637fafc780a78fa4f78"},"taskCount":4,"activeTask":"WBV2-P18-003","entries":{"WBV2-P18-000":{"line":0,"offset":0,"length":300,"previous":"WBV2-P17-003","next":"WBV2-P18-001"},"WBV2-P18-001":{"line":1,"offset":300,"length":297,"previous":"WBV2-P18-000","next":"WBV2-P18-002"},"WBV2-P18-002":{"line":2,"offset":597,"length":311,"previous":"WBV2-P18-001","next":"WBV2-P18-003"},"WBV2-P18-003":{"line":3,"offset":908,"length":306,"previous":"WBV2-P18-002","next":null}}} +{"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}}} diff --git a/tools/web/generate-wbv2-parent-gate.mjs b/tools/web/generate-wbv2-parent-gate.mjs new file mode 100644 index 000000000..6ce0cf889 --- /dev/null +++ b/tools/web/generate-wbv2-parent-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-P19-003",parentPath="tests/golden/WBV2-P19-002/manifest.json",receiptPath="tests/golden/WBV2-P19-002/object-parent-receipt-report.json",basePath="tests/golden/WBV2-P0-002/parity-map.json",oldOverlay="tests/golden/WBV2-P18-003/inventory-completion-overlay.json",reportPath=`${out}/object-parent-gate-report.json`,overlayPath=`${out}/inventory-completion-overlay.json`,planPath=`${out}/parent-task-plan.json`,manifestPath=`${out}/manifest.json`,statusPath="docs/status/WBV2-P19-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-P19-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.parent_set");assert.equal(previous.summary.effectivePending,6614);assert.equal(base.summary.pendingLegacyEntries,6618);const overlay={schemaVersion:1,task:"WBV2-P19-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:[...previous.entries,{id:"operator:object.parent_set",capabilityId:"CAP-OBJECT-OPERATIONS",sourceReceipt:receiptPath,sourceReceiptSha256:sha(receiptPath),evidence:"setParent",exact:true,historicalRestoration:false}],summary:{newlyVerifiedEntries:1,effectiveCompleted:286,effectivePending:6613,claimedComplete:5,basePendingPreserved:true,fullFamilyParity:false,historicalReproduction:false}};const gate={schemaVersion:1,task:"WBV2-P19-003",operation:"CLOSE_OBJECT_PARENT_GATE",status:"PASS",decision:{status:"READY_WITH_OBJECT_PARENT_SLICE_AND_INVENTORY_OVERLAY",code:"OBJECT_PARENT_AUTHORIZED_REBASELINE",featureParityClaims:["SCULPT.PAINT_ATTRIBUTES","OBJECT_OPERATIONS.DUPLICATE","OBJECT_OPERATIONS.CREATE","OBJECT_OPERATIONS.PARENT"],featureParityClaimCount:4,newFeatureClaim:"OBJECT_OPERATIONS.PARENT",newlyVerifiedInventoryEntries:1,baseInventoryPending:6618,effectivePending:6613,effectiveCompleted:286,claimedCompleteOverlay:5,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:overlay.entries},previousOverlay:{path:oldOverlay,sha256:sha(oldOverlay)},baseInventory:{path:basePath,sha256:sha(basePath),pending:base.summary.pendingLegacyEntries}},efficiency:{uniqueBehaviorRuns:5,repeatedBlenderRuns:0,repeatedChromiumRuns:0,duplicateValidationAvoided:true,baseInventoryUntouched:true},coverage:{baseTotal:6900,baseCompleted:281,basePending:6618,overlayCompleted:5,effectiveCompleted:286,effectivePending:6613},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-parent-gate-ok task=WBV2-P19-003 claims=4 newlyVerified=1 basePending=6618 effectivePending=6613 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-P19-003 status\n\n- task: \`WBV2-P19-003\`; parent: \`WBV2-P19-002\`; status: \`done\`\n- new feature claim: \`OBJECT_OPERATIONS.PARENT\`; exact binding: \`operator:object.parent_set\`\n- base inventory: \`6900\` total, \`281\` completed, \`6618\` pending\n- cumulative overlay: \`286\` effective completed, \`6613\` effective pending, claimed complete overlay: \`5\`\n- repeated Blender/Chromium validation: \`0\`; unique behavior batches: Paint, Duplicate, Create, Parent\n- provenance epoch: \`2\`; release: \`AUTHORIZED_REBASELINE_ONLY\`; fullHistoricalReproduction: \`false\`\n- nextTask: \`NONE\`\n`);const previousPlan=json("tests/golden/WBV2-P19-002/parent-task-plan.json"),nextPlan=structuredClone(previousPlan);nextPlan.status="COMPLETED_WITH_OBJECT_PARENT_SLICE";nextPlan.parentRecoveryPlan={path:"tests/golden/WBV2-P19-002/parent-task-plan.json",sha256:sha("tests/golden/WBV2-P19-002/parent-task-plan.json")};nextPlan.tasks=nextPlan.tasks.map(t=>t.id==="WBV2-P19-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-P19-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-parent-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-P19-003",parentTask:"WBV2-P19-002",operation:"CLOSE_OBJECT_PARENT_GATE",status:"done",enablingTask:true,parityStateChange:true,runtime:"READ_ONLY_OBJECT_PARENT_GATE_WITH_COMPLETION_OVERLAY",artifacts,assertions:{totalFeatureClaims:4,newObjectParentClaims:1,exactInventoryBindings:1,effectiveCompleted:286,effectivePending:6613,baseInventoryCompleted:281,baseInventoryPending:6618,claimedCompleteOverlay:5,uniqueBehaviorRuns:5,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-P19-003` |").replace(/\| parent manifest \| `[^`]+` \|/u,"| parent manifest | `tests/golden/WBV2-P19-002/manifest.json` |").replace(/\| 任务卡 \| \[[^\]]+\]\([^\)]+\) \|/u,"| 任务卡 | [`tasks/WBV2-P19-003.md`](tasks/WBV2-P19-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-P19-003` |").replace(/\| Current task state \| `[^`]+` \|/u,"| Current task state | `done` |").replace(/\| Parent manifest \| `[^`]+` \|/u,"| Parent manifest | `tests/golden/WBV2-P19-002/manifest.json` |").replace(/\| Current task card \| `[^`]+` \|/u,"| Current task card | `docs/tasks/WBV2-P19-003.md` |").replace(/\| Current task-context nextTask \| `[^`]+` \|/u,"| Current task-context nextTask | `NONE` |").replace(/\| Focused command \| `[^`]+` \|/u,"| Focused command | `node tools/web/generate-wbv2-parent-gate.mjs --write` |");fs.writeFileSync(abs("nextTask.md"),n);console.log("wbv2-parent-gate-written task=WBV2-P19-003 claims=4 newlyVerified=1 basePending=6618 effectivePending=6613 repeatedRuns=0 terminal=true"); diff --git a/tools/web/generate-wbv2-parent-receipt.mjs b/tools/web/generate-wbv2-parent-receipt.mjs new file mode 100644 index 000000000..638098e5d --- /dev/null +++ b/tools/web/generate-wbv2-parent-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-P19-002",parentPath="tests/golden/WBV2-P19-001/manifest.json",selectionPath="tests/golden/WBV2-P19-001/object-parent-selection-report.json",productionPath=`${out}/object-parent-production.json`,secondPath=`${out}/object-parent-production.second.json`,reportPath=`${out}/object-parent-receipt-report.json`,planPath=`${out}/parent-task-plan.json`,manifestPath=`${out}/manifest.json`,statusPath="docs/status/WBV2-P19-002.md",apiPath="blender-5.2.0/source/blender/web_engine/web_engine_api.cpp",testPath="web/tests/e2e/wbv2-object-parent-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-P19-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.parent_set");assert.deepEqual(production,second);assert.equal(production.browser,"chromium");assert.equal(production.fixtureSha256,sha(fixturePath));assert.equal(production.parentAfter,production.parentId);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.reopenedParent,production.parentId);assert.equal(production.reopenedRevision,1);const receipt={schemaVersion:1,task:"WBV2-P19-002",operation:"OBJECT_PARENT_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,childId:production.childId,parentId:production.parentId,revisions:[production.baseRevision,production.createRevision,production.undoRevision,production.redoRevision],malformed:production.malformed,malformedRevisionPreserved:production.malformedRevisionPreserved,reopenedParent:production.reopenedParent,reopenedRevision:production.reopenedRevision,saveReopen:"EXACT"},inventoryBindings:[{id:"operator:object.parent_set",evidence:"setParent",exact:true,reason:"bounded protocol command persists a parent relation"}],assertions:{parentRelationChanged:true,undoRedoSequential:true,malformedRejected:true,mainUnchangedOnMalformed:true,saveReopenExact:true,deterministic:true,inventoryBindingsExact:true,representativeSliceOnly:true,fullFamilyParity:false,historicalReproduction:false},nextTask:"WBV2-P19-003"};if(!process.argv.includes("--write")){console.log("wbv2-parent-receipt-ok task=WBV2-P19-002 binding=operator:object.parent_set revisions=SEQUENTIAL malformed=REJECTED saveReopen=EXACT deterministic=true next=WBV2-P19-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-P19-002 status\n\n- task: \`WBV2-P19-002\`; parent: \`WBV2-P19-001\`; status: \`done\`\n- exact inventory binding: \`operator:object.parent_set\` via \`setParent\`\n- parent relation: \`${production.childId} -> ${production.parentId}\`; revisions: \`1 -> 4\` sequential\n- malformed parent rejected; save/reopen: \`EXACT\`; deterministic second run: \`true\`\n- effective pending before overlay: \`6614\`; representative slice: \`true\`\n- nextTask: \`WBV2-P19-003\`\n`);const previous=json("tests/golden/WBV2-P19-001/parent-task-plan.json"),next=structuredClone(previous);next.parentRecoveryPlan={path:"tests/golden/WBV2-P19-001/parent-task-plan.json",sha256:sha("tests/golden/WBV2-P19-001/parent-task-plan.json")};next.tasks=next.tasks.map(t=>t.id==="WBV2-P19-002"?{...t,status:"done",ready:false}:t.id==="WBV2-P19-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-P19-003.md"),read("docs/tasks/WBV2-P19-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-P19-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-parent-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-P19-002",parentTask:"WBV2-P19-001",operation:"OBJECT_PARENT_ENGINE_RECEIPT",status:"done",enablingTask:false,parityStateChange:true,runtime:"PLAYWRIGHT_CHROMIUM_WEBENGINE_WASM",artifacts,assertions:{exactInventoryBindings:1,boundInventoryIds:["operator:object.parent_set"],parentRelationChanged:true,undoRedoSequential:true,malformedRejected:true,saveReopen:"EXACT",deterministic:true,representativeSliceOnly:true,fullFamilyParity:false,inventoryTotal:6900,baseInventoryPending:6618,effectivePending:6614,historicalReproduction:false},nextTask:"WBV2-P19-003"},null,2)}\n`);let q=read("docs/EXECUTION_QUEUE.md");q=q.replace(/\| 当前任务 \| `[^`]+` \|/u,"| 当前任务 | `WBV2-P19-003` |").replace(/\| parent manifest \| `[^`]+` \|/u,"| parent manifest | `tests/golden/WBV2-P19-002/manifest.json` |").replace(/\| 任务卡 \| \[[^\]]+\]\([^\)]+\) \|/u,"| 任务卡 | [`tasks/WBV2-P19-003.md`](tasks/WBV2-P19-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-P19-003` |").replace(/\| Current task state \| `[^`]+` \|/u,"| Current task state | `in_progress` |").replace(/\| Parent manifest \| `[^`]+` \|/u,"| Parent manifest | `tests/golden/WBV2-P19-002/manifest.json` |").replace(/\| Current task card \| `[^`]+` \|/u,"| Current task card | `docs/tasks/WBV2-P19-003.md` |").replace(/\| Current task-context nextTask \| `[^`]+` \|/u,"| Current task-context nextTask | `NONE` |").replace(/\| Focused command \| `[^`]+` \|/u,"| Focused command | `node tools/web/generate-wbv2-parent-gate.mjs --write` |");fs.writeFileSync(abs("nextTask.md"),n);console.log("wbv2-parent-receipt-written task=WBV2-P19-002 binding=operator:object.parent_set revisions=SEQUENTIAL malformed=REJECTED saveReopen=EXACT deterministic=true next=WBV2-P19-003"); diff --git a/tools/web/generate-wbv2-parent-root.mjs b/tools/web/generate-wbv2-parent-root.mjs new file mode 100644 index 000000000..bc9d59bae --- /dev/null +++ b/tools/web/generate-wbv2-parent-root.mjs @@ -0,0 +1,6 @@ +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 p18Path="tests/golden/WBV2-P18-003/manifest.json",p18ReportPath="tests/golden/WBV2-P18-003/object-create-gate-report.json",p18StatusPath="docs/status/WBV2-P18-003.md",out="tests/golden/WBV2-P19-000",planPath=`${out}/parent-task-plan.json`,reportPath=`${out}/parent-root-report.json`,manifestPath=`${out}/manifest.json`,statusPath="docs/status/WBV2-P19-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 p18=json(p18Path),p18Report=json(p18ReportPath),inventory=json(inventoryPath);assert.equal(p18.task,"WBV2-P18-003");assert.equal(p18.status,"done");assert.ok(p18.nextTask===null||p18.nextTask==="WBV2-P19-000");assert.equal(p18Report.status,"PASS");assert.equal(p18Report.decision.effectivePending,6614);assert.equal(inventory.summary.inventoryEntries,6900);for(const a of Object.values(p18.artifacts??{}))assert.equal(sha(a.path),a.sha256,a.path);assert.match(read(apiPath),/setParent/);assert.match(read(clientPath),/applyCommand/); +const tasks=[{id:"WBV2-P19-000",phase:"P19",title:"authorize_object_parent_continuation",kind:"enabling",owner:"PROGRAM",dependsOn:["WBV2-P18-003"],parityId:null,implementationClass:"LOCAL_BOUNDED",parallelGroup:"p19-governance",gate:"G2",card:"docs/tasks/WBV2-P19-000.md",behavior:"Authorize one Object Parent behavior after the P18 create overlay.",outputs:["continuation root","candidate scope","hash boundary"],acceptance:["P18 overlay remains hash-bound","setParent API is present","one production task is active"],status:"done",ready:false,queueMutationAllowed:true},{id:"WBV2-P19-001",phase:"P19",title:"select_object_parent_batch",kind:"enabling",owner:"PARITY",dependsOn:["WBV2-P19-000"],parityId:"OBJECT_OPERATIONS.PARENT",implementationClass:"LOCAL_BOUNDED",parallelGroup:"p19-selection",gate:"G2",card:"docs/tasks/WBV2-P19-001.md",behavior:"Select setParent as one unique Object Operations behavior.",outputs:["candidate report","behavior hash","dedupe key"],acceptance:["source command is hash-bound","create/duplicate evidence is not rerun","one legacy operator binding is selected"],status:"in_progress",ready:true,queueMutationAllowed:false},{id:"WBV2-P19-002",phase:"P19",title:"object_parent_engine_receipt",kind:"feature",owner:"OBJECT",dependsOn:["WBV2-P19-001"],parityId:"OBJECT_OPERATIONS.PARENT",implementationClass:"LOCAL_EXACT",parallelGroup:"p19-object",gate:"G2",card:"docs/tasks/WBV2-P19-002.md",behavior:"Bind setParent, undo/redo, malformed rejection, and exact save/reopen to compiled WASM Main in Chromium.",outputs:["parent production report","parent receipt","manifest"],acceptance:["parent relation changes","undo/redo revisions are sequential","malformed parent input fails closed","save/reopen is exact"],status:"planned",ready:false,queueMutationAllowed:false},{id:"WBV2-P19-003",phase:"P19",title:"close_object_parent_gate",kind:"enabling",owner:"RELEASE",dependsOn:["WBV2-P19-002"],parityId:null,implementationClass:"LOCAL_BOUNDED",parallelGroup:"p19-release",gate:"G5",card:"docs/tasks/WBV2-P19-003.md",behavior:"Close the setParent gate and graduate only the exact operator binding.",outputs:["object parent gate","completion overlay","manifest"],acceptance:["only object parent 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_OBJECT_PARENT_EPOCH_1",status:"ACTIVE_OBJECT_PARENT_QUEUE",authority:"queue_reactivated_after_p18_create_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"},parentCreate:{manifest:p18Path,report:p18ReportPath,basePending:6618,effectivePending:6614,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-P19-000",operation:"AUTHORIZE_OBJECT_PARENT_CONTINUATION",status:"PASS",parent:{task:p18.task,manifest:p18Path,manifestSha256:sha(p18Path),report:p18ReportPath,reportSha256:sha(p18ReportPath),previousDecision:p18Report.decision.status,effectivePending:6614},continuation:{root:"WBV2-P19-000",firstTask:"WBV2-P19-001",plannedTasks:4,candidate:"OBJECT_OPERATIONS.PARENT",sourceApi:apiPath,browser:"chromium",noRepeatedExecution:true},policy:{p18EvidencePreserved:true,sourceHistoryReadOnly:true,representativeSliceOnly:true,duplicateValidationAvoided:true,authorizedRebaselineOnly:true,fullHistoricalReproduction:false},nextTask:"WBV2-P19-001"};fs.writeFileSync(abs(reportPath),`${JSON.stringify(report,null,2)}\n`);fs.writeFileSync(abs("docs/tasks/WBV2-P19-000.md"),"# WBV2-P19-000: object parent continuation root\n\n- task: WBV2-P19-000\n- parent: WBV2-P18-003\n- status: done\n- gap: workflow:authorize_object_parent_continuation\n- ownerFamily: PROGRAM\n- targetImplementationClass: LOCAL_BOUNDED\n\n## 目标\n\nAuthorize one source-backed Object Parent behavior after the P18 create overlay.\n\n## 验收\n\n- `node tools/web/generate-wbv2-parent-root.mjs`\n- `node tools/web/check-execution-control-plane.mjs`\n\n## 交付与回滚\n\n- Reports: `tests/golden/WBV2-P19-000/`\n- Manifest: `tests/golden/WBV2-P19-000/manifest.json`\n- Rollback: restore P18-003 as queue parent.\n"); +fs.writeFileSync(abs("docs/tasks/WBV2-P19-001.md"),"# WBV2-P19-001: select_object_parent_batch\n\n- task: WBV2-P19-001\n- parent: WBV2-P19-000\n- status: in_progress\n- gap: capability:OBJECT_OPERATIONS.PARENT\n- ownerFamily: PARITY\n- targetImplementationClass: LOCAL_BOUNDED\n\n## 目标\n\nSelect setParent 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-parent-selection.mjs --write`\n\n## 验收\n\n- source command is hash-bound\n- create and 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-P19-001 --write`\n\n## 交付与回滚\n\n- Reports: `tests/golden/WBV2-P19-001/`\n- Status: `docs/status/WBV2-P19-001.md`\n- Manifest: `tests/golden/WBV2-P19-001/manifest.json`\n- Rollback: restore P19-000 as queue parent.\n");fs.writeFileSync(abs("docs/tasks/WBV2-P19-002.md"),"# WBV2-P19-002: object parent engine receipt\n\n- task: WBV2-P19-002\n- parent: WBV2-P19-001\n- status: planned\n- gap: capability:OBJECT_OPERATIONS.PARENT\n- ownerFamily: OBJECT\n- targetImplementationClass: LOCAL_EXACT\n\n## 目标\n\nBind setParent, undo/redo, malformed rejection, and exact save/reopen to compiled WASM Main in Chromium.\n\n## 输入与范围\n\n- Focused source: `tests/golden/WBV2-P19-001/object-parent-selection-report.json`\n- Production test: `web/tests/e2e/wbv2-object-parent-production.spec.ts`\n- Production entrypoint: `npm --prefix web run test:e2e -- --workers=1 tests/e2e/wbv2-object-parent-production.spec.ts`\n\n## 验收\n\n- parent relation changes\n- undo/redo revisions are sequential\n- malformed parent input 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-P19-002 --write`\n\n## 交付与回滚\n\n- Reports: `tests/golden/WBV2-P19-002/`\n- Status: `docs/status/WBV2-P19-002.md`\n- Manifest: `tests/golden/WBV2-P19-002/manifest.json`\n- Rollback: restore P19-001 as queue parent.\n");fs.writeFileSync(abs("docs/tasks/WBV2-P19-003.md"),"# WBV2-P19-003: close object parent gate\n\n- task: WBV2-P19-003\n- parent: WBV2-P19-002\n- status: planned\n- gap: workflow:close_object_parent_gate\n- ownerFamily: RELEASE\n- targetImplementationClass: LOCAL_BOUNDED\n\n## 目标\n\nClose the setParent gate and graduate only the exact operator binding.\n\n## 输入与范围\n\n- Focused receipt: `tests/golden/WBV2-P19-002/object-parent-receipt-report.json`\n- Previous overlay: `tests/golden/WBV2-P18-003/inventory-completion-overlay.json`\n- Production entrypoint: `node tools/web/generate-wbv2-parent-gate.mjs --write`\n\n## 验收\n\n- only object parent 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-P19-003 --write`\n\n## 交付与回滚\n\n- Reports: `tests/golden/WBV2-P19-003/`\n- Status: `docs/status/WBV2-P19-003.md`\n- Manifest: `tests/golden/WBV2-P19-003/manifest.json`\n- Rollback: restore P19-002 as queue parent.\n");fs.writeFileSync(abs(statusPath),"# WBV2-P19-000 status\n\n- task: `WBV2-P19-000`; parent: `WBV2-P18-003`; status: `done`\n- candidate: `OBJECT_OPERATIONS.PARENT`; source API is present\n- effective inventory carried forward: `285` completed, `6614` pending\n- duplicate validation: `forbidden`; representative slice only\n- nextTask: `WBV2-P19-001`\n");p18Report.nextTask="WBV2-P19-000";p18Report.policy={...(p18Report.policy??{}),terminalQueuePointer:false,authorizedContinuation:"WBV2-P19-000"};fs.writeFileSync(abs(p18ReportPath),`${JSON.stringify(p18Report,null,2)}\n`);const p18Status=read(p18StatusPath).trim();fs.writeFileSync(abs(p18StatusPath),p18Status.includes("authorized continuation")?`${p18Status}\n`:`${p18Status}\n- authorized continuation: \`WBV2-P19-000\`\n\nObject Parent may continue under a new root without changing the P18 overlay.\n`);p18.nextTask="WBV2-P19-000";p18.continuation={authorized:true,root:"WBV2-P19-000",scope:"OBJECT_OPERATIONS_PARENT"};fs.writeFileSync(abs(p18Path),`${JSON.stringify(p18,null,2)}\n`);execFileSync(process.execPath,[abs("tools/web/check-task-context.mjs"),"--task","WBV2-P18-003","--write"],{cwd:root,stdio:"pipe"});p18.artifacts=Object.fromEntries(Object.entries(p18.artifacts).map(([n,a])=>[n,{...a,sha256:sha(a.path)}]));fs.writeFileSync(abs(p18Path),`${JSON.stringify(p18,null,2)}\n`);report.parent.manifestSha256=sha(p18Path);report.parent.reportSha256=sha(p18ReportPath);fs.writeFileSync(abs(reportPath),`${JSON.stringify(report,null,2)}\n`);const paths={parentManifest:p18Path,parentReport:p18ReportPath,inventory:inventoryPath,sourceApi:apiPath,sourceClient:clientPath,plan:planPath,report:reportPath,rootCard:"docs/tasks/WBV2-P19-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-P19-000",parentTask:"WBV2-P18-003",operation:"AUTHORIZE_OBJECT_PARENT_CONTINUATION",status:"done",enablingTask:true,parityStateChange:false,runtime:"READ_ONLY_OBJECT_PARENT_CONTINUATION_ROOT",artifacts,assertions:{p18EvidencePreserved:true,sourceApiBound:true,inventoryTotal:6900,effectiveCompleted:285,effectivePending:6614,duplicateValidationAvoided:true,representativeSliceOnly:true,authorizedRebaselineOnly:true,fullHistoricalReproduction:false},nextTask:"WBV2-P19-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-P19-001` |").replace(/\| parent manifest \| `[^`]+` \|/u,"| parent manifest | `tests/golden/WBV2-P19-000/manifest.json` |").replace(/\| 任务卡 \| \[[^\]]+\]\([^\)]+\) \|/u,"| 任务卡 | [`tasks/WBV2-P19-001.md`](tasks/WBV2-P19-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-P19-001` |").replace(/\| Current task state \| `[^`]+` \|/u,"| Current task state | `in_progress` |").replace(/\| Parent manifest \| `[^`]+` \|/u,"| Parent manifest | `tests/golden/WBV2-P19-000/manifest.json` |").replace(/\| Current task card \| `[^`]+` \|/u,"| Current task card | `docs/tasks/WBV2-P19-001.md` |").replace(/\| Current task-context nextTask \| `[^`]+` \|/u,"| Current task-context nextTask | `WBV2-P19-002` |").replace(/\| Focused command \| `[^`]+` \|/u,"| Focused command | `node tools/web/generate-wbv2-parent-selection.mjs --write` |");fs.writeFileSync(abs("nextTask.md"),n);console.log("wbv2-parent-root-written root=WBV2-P19-000 next=WBV2-P19-001 candidate=OBJECT_OPERATIONS.PARENT effectivePending=6614"); diff --git a/tools/web/generate-wbv2-parent-selection.mjs b/tools/web/generate-wbv2-parent-selection.mjs new file mode 100644 index 000000000..13e95009b --- /dev/null +++ b/tools/web/generate-wbv2-parent-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-P19-001",parentPath="tests/golden/WBV2-P19-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}/parent-task-plan.json`,reportPath=`${out}/object-parent-selection-report.json`,candidatePath=`${out}/object-parent-candidate-set.json`,manifestPath=`${out}/manifest.json`,statusPath="docs/status/WBV2-P19-001.md";const parent=json(parentPath),inventory=json(inventoryPath);assert.equal(parent.status,"done");assert.equal(parent.nextTask,"WBV2-P19-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),/setParent/);assert.match(read(clientPath),/applyCommand/);const target=inventory.entries.find(e=>e.id==="operator:object.parent_set");assert.ok(target);assert.equal(target.legacyState,"pending");const behavior={capability:"OBJECT_OPERATIONS.PARENT",operation:"setParent",positive:["parent-relation","keep-transform","undo","redo","save-reopen"],negative:["missing-parent-id","cycle"],browser:"chromium",engine:"compiled-WASM-WebEngine-Main"};const behaviorHash=digest(JSON.stringify(behavior));const candidate={schemaVersion:1,task:"WBV2-P19-001",operation:"OBJECT_PARENT_CANDIDATE_SELECTION",status:"READY",source:{inventory:inventoryPath,inventorySha256:sha(inventoryPath),api:apiPath,apiSha256:sha(apiPath),client:clientPath,clientSha256:sha(clientPath)},candidate:{capabilityId:"OBJECT_OPERATIONS.PARENT",legacyId:target.id,legacyTask:target.evidence.legacyTask,behavior,behaviorHash,dedupeKey:`OBJECT_OPERATIONS.PARENT|${behaviorHash}|${sha(apiPath)}|${sha(clientPath)}`,sourceBacked:true,chromiumProductionReady:true,fullFamilyParity:false},inventory:{matchedEntries:1,pending:1,total:6900,basePending:6618,effectivePending:6614,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-P19-001",operation:"SELECT_OBJECT_PARENT_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-P19-002"};if(!process.argv.includes("--write")){console.log(`wbv2-parent-selection-ok task=WBV2-P19-001 legacyId=${target.id} behaviorHash=${behaviorHash} pending=6614 repeatedRuns=0 next=WBV2-P19-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-P19-001 status\n\n- task: \`WBV2-P19-001\`; parent: \`WBV2-P19-000\`; status: \`done\`\n- selected behavior: \`setParent\`; exact candidate: \`operator:object.parent_set\`\n- base inventory: \`6900\` total, \`6618\` pending; effective carried overlay: \`6614\` pending\n- behavior hash: \`${behaviorHash}\`; duplicate validation: \`forbidden\`\n- nextTask: \`WBV2-P19-002\`\n`);const previous=json("tests/golden/WBV2-P19-000/parent-task-plan.json"),next=structuredClone(previous);next.parentRecoveryPlan={path:"tests/golden/WBV2-P19-000/parent-task-plan.json",sha256:sha("tests/golden/WBV2-P19-000/parent-task-plan.json")};next.tasks=next.tasks.map(t=>t.id==="WBV2-P19-001"?{...t,status:"done",ready:false}:t.id==="WBV2-P19-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-P19-002.md"),read("docs/tasks/WBV2-P19-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-P19-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-parent-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-P19-001",parentTask:"WBV2-P19-000",operation:"SELECT_OBJECT_PARENT_BATCH",status:"done",enablingTask:true,parityStateChange:false,runtime:"READ_ONLY_SOURCE_CANDIDATE_SELECTION",artifacts,assertions:{legacyId:target.id,inventoryTotal:6900,basePending:6618,effectivePending:6614,sourceApiBound:true,representativeSliceOnly:true,fullFamilyParity:false,repeatedBlenderRuns:0,repeatedChromiumRuns:0,duplicateValidationAvoided:true,deterministic:true,historicalReproduction:false},nextTask:"WBV2-P19-002"},null,2)}\n`);let q=read("docs/EXECUTION_QUEUE.md");q=q.replace(/\| 当前任务 \| `[^`]+` \|/u,"| 当前任务 | `WBV2-P19-002` |").replace(/\| parent manifest \| `[^`]+` \|/u,"| parent manifest | `tests/golden/WBV2-P19-001/manifest.json` |").replace(/\| 任务卡 \| \[[^\]]+\]\([^\)]+\) \|/u,"| 任务卡 | [`tasks/WBV2-P19-002.md`](tasks/WBV2-P19-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-P19-002` |").replace(/\| Current task state \| `[^`]+` \|/u,"| Current task state | `in_progress` |").replace(/\| Parent manifest \| `[^`]+` \|/u,"| Parent manifest | `tests/golden/WBV2-P19-001/manifest.json` |").replace(/\| Current task card \| `[^`]+` \|/u,"| Current task card | `docs/tasks/WBV2-P19-002.md` |").replace(/\| Current task-context nextTask \| `[^`]+` \|/u,"| Current task-context nextTask | `WBV2-P19-003` |").replace(/\| Focused command \| `[^`]+` \|/u,"| Focused command | `npm --prefix web run test:e2e -- --workers=1 tests/e2e/wbv2-object-parent-production.spec.ts` |");fs.writeFileSync(abs("nextTask.md"),n);console.log(`wbv2-parent-selection-written task=WBV2-P19-001 legacyId=${target.id} behaviorHash=${behaviorHash} next=WBV2-P19-002 artifacts=${Object.keys(artifacts).length}`); diff --git a/web/tests/e2e/wbv2-object-parent-production.spec.ts b/web/tests/e2e/wbv2-object-parent-production.spec.ts new file mode 100644 index 000000000..d7d1162bb --- /dev/null +++ b/web/tests/e2e/wbv2-object-parent-production.spec.ts @@ -0,0 +1,53 @@ +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-P19-002 binds setParent to compiled WASM Main", async ({ page }) => { + test.setTimeout(120_000); + await page.goto("/"); + const result = await page.evaluate(async (bytes) => { + const { WebEngineClient } = await import("/src/engine-client/WebEngineClient.ts"); + const client = new WebEngineClient({ timeoutMs: 30_000 }); + const reopened = new WebEngineClient({ timeoutMs: 30_000 }); + try { + const opened = await client.openBlend(Uint8Array.from(bytes).buffer); + const objects = opened.snapshot.nodes.filter((node) => ["MESH", "EMPTY", "LIGHT", "CAMERA"].includes(node.type)); + if (objects.length < 2) throw new Error(`basic scene needs two object nodes; got ${opened.snapshot.nodes.map((node) => `${node.type}:${node.id}`).join(",")}`); + const child = objects[0]; + const parent = objects[1]; + const baseRevision = opened.snapshot.revision; + const changed = await client.applyCommand({ type: "setParent", objectId: child.id, parentId: parent.id, keepTransform: true } as any); + const childAfter = changed.snapshot.nodes.find((node) => node.id === child.id); + const undone = await client.applyCommand({ type: "undo" }); + const redone = await client.applyCommand({ type: "redo" }); + const malformed = await client.applyCommand({ type: "setParent", objectId: child.id, parentId: "object:missing", keepTransform: true } as any).then(() => ({ code: "NO_ERROR" })).catch((error: any) => ({ code: error?.code, message: error?.message })); + const afterMalformed = await client.snapshot(); + const saved = await client.saveBlend(); + const reopen = await reopened.openBlend(saved); + const childReopened = reopen.snapshot.nodes.find((node) => node.id === child.id); + const digest = async (value: ArrayBuffer) => { const hash = await crypto.subtle.digest("SHA-256", value); return Array.from(new Uint8Array(hash), (byte) => byte.toString(16).padStart(2, "0")).join(""); }; + return { browser: "chromium", baseRevision, childId: child.id, parentId: parent.id, parentAfter: childAfter?.parentId, createRevision: changed.snapshot.revision, undoRevision: undone.snapshot.revision, redoRevision: redone.snapshot.revision, malformed, malformedRevisionPreserved: afterMalformed.snapshot.revision === redone.snapshot.revision, reopenedParent: childReopened?.parentId, reopenedRevision: reopen.snapshot.revision, savedSha256: await digest(saved) }; + } finally { + client.terminate(); + reopened.terminate(); + } + }, Array.from(fixture)); + + fs.mkdirSync(path.join(root, "tests/golden/WBV2-P19-002"), { recursive: true }); + const output = process.env.WBV2_PARENT_REPORT ?? "object-parent-production.json"; + fs.writeFileSync(path.join(root, "tests/golden/WBV2-P19-002", output), `${JSON.stringify({ schemaVersion: 1, task: "WBV2-P19-002", operation: "OBJECT_PARENT_ENGINE_CHROMIUM", queueMutation: false, fixtureSha256, ...result }, null, 2)}\n`); + expect(result.browser).toBe("chromium"); + expect(result.parentAfter).toBe(result.parentId); + expect(result.createRevision).toBe(result.baseRevision + 1); + expect(result.undoRevision).toBe(result.baseRevision + 2); + expect(result.redoRevision).toBe(result.baseRevision + 3); + expect(result.malformed.code).not.toBe("NO_ERROR"); + expect(result.malformedRevisionPreserved).toBe(true); + expect(result.reopenedParent).toBe(result.parentId); + expect(result.reopenedRevision).toBe(1); +});