From 625a9601984ab78b2951eb3819bdefa31c1d1650 Mon Sep 17 00:00:00 2001 From: mes123456 Date: Fri, 28 Aug 2026 14:18:45 +0800 Subject: [PATCH] Advance deduplicated object operation coverage --- docs/EXECUTION_QUEUE.md | 6 +- docs/status/WBV2-P16-003.md | 3 + docs/status/WBV2-P17-000.md | 7 + docs/status/WBV2-P17-001.md | 7 + docs/status/WBV2-P17-002.md | 8 + docs/status/WBV2-P17-003.md | 11 ++ docs/tasks/WBV2-P17-000.md | 24 +++ docs/tasks/WBV2-P17-001.md | 34 ++++ docs/tasks/WBV2-P17-002.md | 34 ++++ docs/tasks/WBV2-P17-003.md | 34 ++++ nextTask.md | 8 +- tests/golden/WBV2-P16-003/manifest.json | 13 +- .../WBV2-P16-003/paint-gate-report.json | 5 +- tests/golden/WBV2-P16-003/task-context.json | 4 +- tests/golden/WBV2-P17-000/manifest.json | 60 ++++++ .../WBV2-P17-000/object-root-report.json | 33 ++++ .../golden/WBV2-P17-000/object-task-plan.json | 146 +++++++++++++++ tests/golden/WBV2-P17-001/manifest.json | 67 +++++++ .../WBV2-P17-001/object-candidate-set.json | 54 ++++++ .../WBV2-P17-001/object-selection-report.json | 56 ++++++ .../golden/WBV2-P17-001/object-task-plan.json | 150 +++++++++++++++ tests/golden/WBV2-P17-001/task-context.json | 171 ++++++++++++++++++ tests/golden/WBV2-P17-002/manifest.json | 78 ++++++++ .../object-duplicate-production.json | 22 +++ .../object-duplicate-production.second.json | 22 +++ .../object-duplicate-receipt-report.json | 64 +++++++ .../golden/WBV2-P17-002/object-task-plan.json | 150 +++++++++++++++ tests/golden/WBV2-P17-002/task-context.json | 170 +++++++++++++++++ .../inventory-completion-overlay.json | 64 +++++++ tests/golden/WBV2-P17-003/manifest.json | 76 ++++++++ .../WBV2-P17-003/object-gate-report.json | 121 +++++++++++++ .../golden/WBV2-P17-003/object-task-plan.json | 150 +++++++++++++++ tests/golden/WBV2-P17-003/task-context.json | 170 +++++++++++++++++ tests/golden/WBV2/task-catalog.jsonl | 8 +- tests/golden/WBV2/task-index.json | 2 +- tools/web/generate-wbv2-object-gate.mjs | 6 + tools/web/generate-wbv2-object-receipt.mjs | 5 + tools/web/generate-wbv2-object-root.mjs | 23 +++ tools/web/generate-wbv2-object-selection.mjs | 8 + .../wbv2-object-duplicate-production.spec.ts | 19 ++ 40 files changed, 2073 insertions(+), 20 deletions(-) create mode 100644 docs/status/WBV2-P17-000.md create mode 100644 docs/status/WBV2-P17-001.md create mode 100644 docs/status/WBV2-P17-002.md create mode 100644 docs/status/WBV2-P17-003.md create mode 100644 docs/tasks/WBV2-P17-000.md create mode 100644 docs/tasks/WBV2-P17-001.md create mode 100644 docs/tasks/WBV2-P17-002.md create mode 100644 docs/tasks/WBV2-P17-003.md create mode 100644 tests/golden/WBV2-P17-000/manifest.json create mode 100644 tests/golden/WBV2-P17-000/object-root-report.json create mode 100644 tests/golden/WBV2-P17-000/object-task-plan.json create mode 100644 tests/golden/WBV2-P17-001/manifest.json create mode 100644 tests/golden/WBV2-P17-001/object-candidate-set.json create mode 100644 tests/golden/WBV2-P17-001/object-selection-report.json create mode 100644 tests/golden/WBV2-P17-001/object-task-plan.json create mode 100644 tests/golden/WBV2-P17-001/task-context.json create mode 100644 tests/golden/WBV2-P17-002/manifest.json create mode 100644 tests/golden/WBV2-P17-002/object-duplicate-production.json create mode 100644 tests/golden/WBV2-P17-002/object-duplicate-production.second.json create mode 100644 tests/golden/WBV2-P17-002/object-duplicate-receipt-report.json create mode 100644 tests/golden/WBV2-P17-002/object-task-plan.json create mode 100644 tests/golden/WBV2-P17-002/task-context.json create mode 100644 tests/golden/WBV2-P17-003/inventory-completion-overlay.json create mode 100644 tests/golden/WBV2-P17-003/manifest.json create mode 100644 tests/golden/WBV2-P17-003/object-gate-report.json create mode 100644 tests/golden/WBV2-P17-003/object-task-plan.json create mode 100644 tests/golden/WBV2-P17-003/task-context.json create mode 100644 tools/web/generate-wbv2-object-gate.mjs create mode 100644 tools/web/generate-wbv2-object-receipt.mjs create mode 100644 tools/web/generate-wbv2-object-root.mjs create mode 100644 tools/web/generate-wbv2-object-selection.mjs create mode 100644 web/tests/e2e/wbv2-object-duplicate-production.spec.ts diff --git a/docs/EXECUTION_QUEUE.md b/docs/EXECUTION_QUEUE.md index 3a83533f2..32256f68c 100644 --- a/docs/EXECUTION_QUEUE.md +++ b/docs/EXECUTION_QUEUE.md @@ -13,9 +13,9 @@ | 字段 | 值 | | --- | --- | | 里程碑 | WBV2 capability workflow | -| 当前任务 | `WBV2-P16-003` | -| parent manifest | `tests/golden/WBV2-P16-002/manifest.json` | -| 任务卡 | [`tasks/WBV2-P16-003.md`](tasks/WBV2-P16-003.md) | +| 当前任务 | `WBV2-P17-003` | +| parent manifest | `tests/golden/WBV2-P17-002/manifest.json` | +| 任务卡 | [`tasks/WBV2-P17-003.md`](tasks/WBV2-P17-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-P16-003.md b/docs/status/WBV2-P16-003.md index 820c2fb93..cc2202615 100644 --- a/docs/status/WBV2-P16-003.md +++ b/docs/status/WBV2-P16-003.md @@ -10,3 +10,6 @@ - nextTask: `NONE` The completion overlay graduates only two exact operator IDs whose color/weight protocol behavior was verified in deterministic Chromium/WASM Main receipts. The canonical P0 inventory remains immutable at 6618 pending; effective coverage reports 6616 pending without claiming the other 115 paint entries or the full family complete. +- authorized continuation: `WBV2-P17-000` + +Object Operations may continue under a new root without changing the P16 paint overlay. diff --git a/docs/status/WBV2-P17-000.md b/docs/status/WBV2-P17-000.md new file mode 100644 index 000000000..cc52fae0a --- /dev/null +++ b/docs/status/WBV2-P17-000.md @@ -0,0 +1,7 @@ +# WBV2-P17-000 status + +- task: `WBV2-P17-000`; parent: `WBV2-P16-003`; status: `done` +- candidate: `OBJECT_OPERATIONS.DUPLICATE`; source API is present +- effective inventory carried forward: `283` completed, `6616` pending +- duplicate validation: `forbidden`; representative slice only +- nextTask: `WBV2-P17-001` diff --git a/docs/status/WBV2-P17-001.md b/docs/status/WBV2-P17-001.md new file mode 100644 index 000000000..191bf368c --- /dev/null +++ b/docs/status/WBV2-P17-001.md @@ -0,0 +1,7 @@ +# WBV2-P17-001 status + +- task: `WBV2-P17-001`; parent: `WBV2-P17-000`; status: `done` +- selected behavior: `duplicateObject`; exact candidate: `operator:object.duplicate` +- base inventory: `6900` total, `6618` pending; effective carried overlay: `6616` pending +- behavior hash: `95a2d61337bc4660801e9124e9e09301c1abbe00468f7f12eae9f451396eef7f`; duplicate validation: `forbidden` +- nextTask: `WBV2-P17-002` diff --git a/docs/status/WBV2-P17-002.md b/docs/status/WBV2-P17-002.md new file mode 100644 index 000000000..4ca35984b --- /dev/null +++ b/docs/status/WBV2-P17-002.md @@ -0,0 +1,8 @@ +# WBV2-P17-002 status + +- task: `WBV2-P17-002`; parent: `WBV2-P17-001`; status: `done` +- exact inventory binding: `operator:object.duplicate` +- objects: `3 -> 4`; revisions: `1 -> 4` sequential +- malformed object ID rejected; save/reopen: `EXACT`; deterministic second run: `true` +- effective pending before overlay: `6616`; representative slice: `true` +- nextTask: `WBV2-P17-003` diff --git a/docs/status/WBV2-P17-003.md b/docs/status/WBV2-P17-003.md new file mode 100644 index 000000000..e47b8d5a5 --- /dev/null +++ b/docs/status/WBV2-P17-003.md @@ -0,0 +1,11 @@ +# WBV2-P17-003 status + +- task: `WBV2-P17-003`; parent: `WBV2-P17-002`; status: `done` +- new feature claim: `OBJECT_OPERATIONS.DUPLICATE`; exact binding: `operator:object.duplicate` +- base inventory: `6900` total, `281` completed, `6618` pending +- cumulative overlay: `284` effective completed, `6615` effective pending, claimed complete overlay: `3` +- repeated Blender/Chromium validation: `0`; unique behavior batches: Paint + Object Duplicate +- provenance epoch: `2`; release: `AUTHORIZED_REBASELINE_ONLY`; fullHistoricalReproduction: `false` +- nextTask: `NONE` + +Only the exact duplicateObject operator is graduated. The canonical inventory remains immutable; effective counts are derived from hash-bound completion overlays. diff --git a/docs/tasks/WBV2-P17-000.md b/docs/tasks/WBV2-P17-000.md new file mode 100644 index 000000000..220694c2b --- /dev/null +++ b/docs/tasks/WBV2-P17-000.md @@ -0,0 +1,24 @@ +# WBV2-P17-000: object operations continuation root + +- task: WBV2-P17-000 +- parent: WBV2-P16-003 +- status: done +- gap: workflow:authorize_object_operations_continuation +- ownerFamily: PROGRAM +- targetImplementationClass: LOCAL_BOUNDED + +## 目标 + +Authorize one source-backed Object Operations behavior after the P16 paint overlay. + +## 验收 + +- `node tools/web/generate-wbv2-object-root.mjs` +- `node tools/web/check-execution-control-plane.mjs` +- `node tools/web/check-v2-task-index.mjs` + +## 交付与回滚 + +- Reports: `tests/golden/WBV2-P17-000/` +- Manifest: `tests/golden/WBV2-P17-000/manifest.json` +- Rollback: restore P16-003 as queue parent. diff --git a/docs/tasks/WBV2-P17-001.md b/docs/tasks/WBV2-P17-001.md new file mode 100644 index 000000000..006a1b924 --- /dev/null +++ b/docs/tasks/WBV2-P17-001.md @@ -0,0 +1,34 @@ +# WBV2-P17-001: select_object_duplicate_batch + +- task: WBV2-P17-001 +- parent: WBV2-P17-000 +- status: in_progress +- gap: capability:OBJECT_OPERATIONS.DUPLICATE +- ownerFamily: PARITY +- targetImplementationClass: LOCAL_BOUNDED + +## 目标 + +Select the duplicateObject behavior and one exact legacy operator binding. + +## 输入与范围 + +- 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-object-selection.mjs --write` + +## 验收 + +- source command is hash-bound +- existing Scene/Object visibility and transform evidence is not rerun +- candidate remains one behavior +- malformed, hash-drift, unsupported, or false-completion input keeps in_progress +- `node tools/web/check-task-context.mjs --task WBV2-P17-001 --write` + +## 交付与回滚 + +- Reports: `tests/golden/WBV2-P17-001/` +- Status: `docs/status/WBV2-P17-001.md` +- Manifest: `tests/golden/WBV2-P17-001/manifest.json` +- Rollback: restore P17-000 as queue parent. diff --git a/docs/tasks/WBV2-P17-002.md b/docs/tasks/WBV2-P17-002.md new file mode 100644 index 000000000..46e657ff0 --- /dev/null +++ b/docs/tasks/WBV2-P17-002.md @@ -0,0 +1,34 @@ +# WBV2-P17-002: object_duplicate_engine_receipt + +- task: WBV2-P17-002 +- parent: WBV2-P17-001 +- status: in_progress +- gap: capability:OBJECT_OPERATIONS.DUPLICATE +- ownerFamily: OBJECT +- targetImplementationClass: LOCAL_EXACT + +## 目标 + +Bind duplicateObject, undo/redo, malformed rejection, and exact save/reopen to compiled WASM Main in Chromium. + +## 输入与范围 + +- Focused source: `tests/golden/WBV2-P17-001/object-selection-report.json` +- Production test: `web/tests/e2e/wbv2-object-duplicate-production.spec.ts` +- Production entrypoint: `npm --prefix web run test:e2e -- --workers=1 tests/e2e/wbv2-object-duplicate-production.spec.ts` + +## 验收 + +- duplicate creates a distinct object +- undo/redo revisions are sequential +- malformed object ID 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-P17-002 --write` + +## 交付与回滚 + +- Reports: `tests/golden/WBV2-P17-002/` +- Status: `docs/status/WBV2-P17-002.md` +- Manifest: `tests/golden/WBV2-P17-002/manifest.json` +- Rollback: restore P17-001 as queue parent. diff --git a/docs/tasks/WBV2-P17-003.md b/docs/tasks/WBV2-P17-003.md new file mode 100644 index 000000000..344b84a83 --- /dev/null +++ b/docs/tasks/WBV2-P17-003.md @@ -0,0 +1,34 @@ +# WBV2-P17-003: close_object_duplicate_gate + +- task: WBV2-P17-003 +- parent: WBV2-P17-002 +- status: in_progress +- gap: workflow:close_object_duplicate_gate +- ownerFamily: RELEASE +- targetImplementationClass: LOCAL_BOUNDED + +## 目标 + +Close the duplicateObject gate and graduate only the exact operator binding. + +## 输入与范围 + +- Focused receipt: `tests/golden/WBV2-P17-002/object-duplicate-receipt-report.json` +- Paint overlay: `tests/golden/WBV2-P16-003/inventory-completion-overlay.json` +- Production entrypoint: `node tools/web/generate-wbv2-object-gate.mjs --write` + +## 验收 + +- only duplicateObject is claimed +- effective pending 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-P17-003 --write` + +## 交付与回滚 + +- Reports: `tests/golden/WBV2-P17-003/` +- Status: `docs/status/WBV2-P17-003.md` +- Manifest: `tests/golden/WBV2-P17-003/manifest.json` +- Rollback: restore P17-002 as queue parent. diff --git a/nextTask.md b/nextTask.md index 785962f49..be27ce465 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-P16-003` | +| Current task when this file was written | `WBV2-P17-003` | | Current task state | `done` | -| Parent manifest | `tests/golden/WBV2-P16-002/manifest.json` | -| Current task card | `docs/tasks/WBV2-P16-003.md` | +| Parent manifest | `tests/golden/WBV2-P17-002/manifest.json` | +| Current task card | `docs/tasks/WBV2-P17-003.md` | | Current task-context nextTask | `NONE` | -| Focused command | `node tools/web/generate-wbv2-paint-gate.mjs --write` | +| Focused command | `node tools/web/generate-wbv2-object-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-P16-003/manifest.json b/tests/golden/WBV2-P16-003/manifest.json index bb7b758bf..612fa1b02 100644 --- a/tests/golden/WBV2-P16-003/manifest.json +++ b/tests/golden/WBV2-P16-003/manifest.json @@ -42,7 +42,7 @@ }, "report": { "path": "tests/golden/WBV2-P16-003/paint-gate-report.json", - "sha256": "51ee4f6bf88f5d744692eda3367250b4e5ac46f6bf5b9afb4725777cc5db36bd" + "sha256": "17c1215bbd56eb71ca86f452066fe4bdbdd542b1d63e2935b2a51d569159d652" }, "generator": { "path": "tools/web/generate-wbv2-paint-gate.mjs", @@ -50,7 +50,7 @@ }, "status": { "path": "docs/status/WBV2-P16-003.md", - "sha256": "c3f8d70c0ca2fd36996cf7836254a9d69a8be8e6f453fda0445931f4589c38a9" + "sha256": "3993f63d2c71ee95e5a3fafcb9e4a459b2c17ecd7d4d6f156aa7ee5bc5ebae32" }, "parityPlan": { "path": "tests/golden/WBV2-P16-003/paint-task-plan.json", @@ -58,7 +58,7 @@ }, "taskContext": { "path": "tests/golden/WBV2-P16-003/task-context.json", - "sha256": "0177aefb69cc22fc0ff0cc1b2b5802009c6c3dd89cf36eb9e4173531cd94de83" + "sha256": "ccb0d13cfd237123c820fcfbddc06c5939f572b27afb9068af6266c4e5f3f0e4" } }, "assertions": { @@ -81,5 +81,10 @@ "fullHistoricalReproduction": false, "deterministic": true }, - "nextTask": null + "nextTask": "WBV2-P17-000", + "continuation": { + "authorized": true, + "root": "WBV2-P17-000", + "scope": "OBJECT_OPERATIONS_DUPLICATE" + } } diff --git a/tests/golden/WBV2-P16-003/paint-gate-report.json b/tests/golden/WBV2-P16-003/paint-gate-report.json index 9f64a3ac4..b2394018d 100644 --- a/tests/golden/WBV2-P16-003/paint-gate-report.json +++ b/tests/golden/WBV2-P16-003/paint-gate-report.json @@ -132,7 +132,8 @@ "baseInventoryPreserved": true, "inventoryRemainderExplicit": true, "noFalseLocalParity": true, - "terminalQueuePointer": true + "terminalQueuePointer": false, + "authorizedContinuation": "WBV2-P17-000" }, - "nextTask": null + "nextTask": "WBV2-P17-000" } diff --git a/tests/golden/WBV2-P16-003/task-context.json b/tests/golden/WBV2-P16-003/task-context.json index b72495777..88d521d81 100644 --- a/tests/golden/WBV2-P16-003/task-context.json +++ b/tests/golden/WBV2-P16-003/task-context.json @@ -64,7 +64,7 @@ "inventory remainder stays explicit", "no duplicate validation or historical over-claim" ], - "nextTask": null, + "nextTask": "WBV2-P17-000", "sourceDocuments": { "queue": "docs/EXECUTION_QUEUE.md", "taskCard": "docs/tasks/WBV2-P16-003.md", @@ -162,7 +162,7 @@ "totalTokens": 2040, "reservedEnvelopeTokens": 1024, "estimatedContextTokens": 3064, - "serializedContextTokens": 613, + "serializedContextTokens": 616, "withinBudget": true } } diff --git a/tests/golden/WBV2-P17-000/manifest.json b/tests/golden/WBV2-P17-000/manifest.json new file mode 100644 index 000000000..184bd56eb --- /dev/null +++ b/tests/golden/WBV2-P17-000/manifest.json @@ -0,0 +1,60 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P17-000", + "parentTask": "WBV2-P16-003", + "operation": "AUTHORIZE_OBJECT_OPERATIONS_CONTINUATION", + "status": "done", + "enablingTask": true, + "parityStateChange": false, + "runtime": "READ_ONLY_OBJECT_CONTINUATION_ROOT", + "artifacts": { + "parentManifest": { + "path": "tests/golden/WBV2-P16-003/manifest.json", + "sha256": "dadf1844178a005938ab3115a745327913c79fce2b15ef6a547b8b1a979f513c" + }, + "parentReport": { + "path": "tests/golden/WBV2-P16-003/paint-gate-report.json", + "sha256": "17c1215bbd56eb71ca86f452066fe4bdbdd542b1d63e2935b2a51d569159d652" + }, + "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-P17-000/object-task-plan.json", + "sha256": "190ad072b1fdcfe9590cc25272a2e2bcbeff54bae3f2b5679e8264c8a9200984" + }, + "report": { + "path": "tests/golden/WBV2-P17-000/object-root-report.json", + "sha256": "d56fb677824a1b16c4266cdff24d1a6925152c0974baa3a661f350e638978bf0" + }, + "rootCard": { + "path": "docs/tasks/WBV2-P17-000.md", + "sha256": "a0706ff9e2b1b0c64eb85846b248f8a0a32ead36517612a226f2af68b541d525" + }, + "rootStatus": { + "path": "docs/status/WBV2-P17-000.md", + "sha256": "48e65dc3c7693a6507725d82cfe234c233983aaed7c3810609fde9a8d8bd91ca" + } + }, + "assertions": { + "p16EvidencePreserved": true, + "sourceApiBound": true, + "inventoryTotal": 6900, + "effectiveCompleted": 283, + "effectivePending": 6616, + "duplicateValidationAvoided": true, + "representativeSliceOnly": true, + "authorizedRebaselineOnly": true, + "fullHistoricalReproduction": false + }, + "nextTask": "WBV2-P17-001" +} diff --git a/tests/golden/WBV2-P17-000/object-root-report.json b/tests/golden/WBV2-P17-000/object-root-report.json new file mode 100644 index 000000000..a59b092bf --- /dev/null +++ b/tests/golden/WBV2-P17-000/object-root-report.json @@ -0,0 +1,33 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P17-000", + "operation": "AUTHORIZE_OBJECT_OPERATIONS_CONTINUATION", + "status": "PASS", + "parent": { + "task": "WBV2-P16-003", + "manifest": "tests/golden/WBV2-P16-003/manifest.json", + "manifestSha256": "dadf1844178a005938ab3115a745327913c79fce2b15ef6a547b8b1a979f513c", + "report": "tests/golden/WBV2-P16-003/paint-gate-report.json", + "reportSha256": "17c1215bbd56eb71ca86f452066fe4bdbdd542b1d63e2935b2a51d569159d652", + "previousDecision": "READY_WITH_PAINT_SLICE_AND_INVENTORY_OVERLAY", + "effectivePending": 6616 + }, + "continuation": { + "root": "WBV2-P17-000", + "firstTask": "WBV2-P17-001", + "plannedTasks": 4, + "candidate": "OBJECT_OPERATIONS.DUPLICATE", + "sourceApi": "blender-5.2.0/source/blender/web_engine/web_engine_api.cpp", + "browser": "chromium", + "noRepeatedExecution": true + }, + "policy": { + "p16EvidencePreserved": true, + "sourceHistoryReadOnly": true, + "representativeSliceOnly": true, + "duplicateValidationAvoided": true, + "authorizedRebaselineOnly": true, + "fullHistoricalReproduction": false + }, + "nextTask": "WBV2-P17-001" +} diff --git a/tests/golden/WBV2-P17-000/object-task-plan.json b/tests/golden/WBV2-P17-000/object-task-plan.json new file mode 100644 index 000000000..cd66d07f8 --- /dev/null +++ b/tests/golden/WBV2-P17-000/object-task-plan.json @@ -0,0 +1,146 @@ +{ + "schemaVersion": 1, + "planId": "BLENDER_WEB_PARITY_V2_OBJECT_EPOCH_1", + "status": "ACTIVE_OBJECT_QUEUE", + "authority": "queue_reactivated_after_p16_paint_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" + }, + "parentPaint": { + "manifest": "tests/golden/WBV2-P16-003/manifest.json", + "report": "tests/golden/WBV2-P16-003/paint-gate-report.json", + "basePending": 6618, + "effectivePending": 6616, + "duplicateValidationAvoided": true + }, + "tasks": [ + { + "id": "WBV2-P17-000", + "phase": "P17", + "title": "authorize_object_operations_continuation", + "kind": "enabling", + "owner": "PROGRAM", + "dependsOn": [ + "WBV2-P16-003" + ], + "parityId": null, + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p17-governance", + "gate": "G2", + "card": "docs/tasks/WBV2-P17-000.md", + "behavior": "Authorize one Object Operations behavior after the P16 paint overlay.", + "outputs": [ + "continuation root", + "candidate scope", + "hash boundary" + ], + "acceptance": [ + "P16 overlay remains hash-bound", + "duplicateObject API is present", + "one production task is active" + ], + "status": "done", + "ready": false, + "queueMutationAllowed": true + }, + { + "id": "WBV2-P17-001", + "phase": "P17", + "title": "select_object_duplicate_batch", + "kind": "enabling", + "owner": "PARITY", + "dependsOn": [ + "WBV2-P17-000" + ], + "parityId": "OBJECT_OPERATIONS.DUPLICATE", + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p17-selection", + "gate": "G2", + "card": "docs/tasks/WBV2-P17-001.md", + "behavior": "Select the duplicateObject behavior and one exact legacy operator binding.", + "outputs": [ + "candidate report", + "behavior hash", + "dedupe key" + ], + "acceptance": [ + "source command is hash-bound", + "existing Scene/Object evidence is not rerun", + "candidate remains one behavior" + ], + "status": "in_progress", + "ready": true, + "queueMutationAllowed": false + }, + { + "id": "WBV2-P17-002", + "phase": "P17", + "title": "object_duplicate_engine_receipt", + "kind": "feature", + "owner": "OBJECT", + "dependsOn": [ + "WBV2-P17-001" + ], + "parityId": "OBJECT_OPERATIONS.DUPLICATE", + "implementationClass": "LOCAL_EXACT", + "parallelGroup": "p17-object", + "gate": "G2", + "card": "docs/tasks/WBV2-P17-002.md", + "behavior": "Bind duplicateObject, undo/redo, malformed rejection, and exact save/reopen to compiled WASM Main in Chromium.", + "outputs": [ + "object production report", + "object receipt", + "manifest" + ], + "acceptance": [ + "duplicate creates a distinct object", + "undo/redo revisions are sequential", + "malformed object ID fails closed", + "save/reopen is exact" + ], + "status": "planned", + "ready": false, + "queueMutationAllowed": false + }, + { + "id": "WBV2-P17-003", + "phase": "P17", + "title": "close_object_duplicate_gate", + "kind": "enabling", + "owner": "RELEASE", + "dependsOn": [ + "WBV2-P17-002" + ], + "parityId": null, + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p17-release", + "gate": "G5", + "card": "docs/tasks/WBV2-P17-003.md", + "behavior": "Close the duplicateObject gate and graduate only the exact operator binding.", + "outputs": [ + "object gate", + "completion overlay", + "manifest" + ], + "acceptance": [ + "only duplicateObject is claimed", + "inventory remainder remains explicit", + "no duplicate validation or historical over-claim" + ], + "status": "planned", + "ready": false, + "queueMutationAllowed": false + } + ] +} diff --git a/tests/golden/WBV2-P17-001/manifest.json b/tests/golden/WBV2-P17-001/manifest.json new file mode 100644 index 000000000..d619adb63 --- /dev/null +++ b/tests/golden/WBV2-P17-001/manifest.json @@ -0,0 +1,67 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P17-001", + "parentTask": "WBV2-P17-000", + "operation": "SELECT_OBJECT_DUPLICATE_BATCH", + "status": "done", + "enablingTask": true, + "parityStateChange": false, + "runtime": "READ_ONLY_SOURCE_CANDIDATE_SELECTION", + "artifacts": { + "parentManifest": { + "path": "tests/golden/WBV2-P17-000/manifest.json", + "sha256": "27ee060a1127815b5c18eade7e0d68134fcefaa305123ab7a9450b3afa14ac6c" + }, + "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-P17-001/object-candidate-set.json", + "sha256": "6c997352dbe6d37b59bd8ecf759e89ed5134ce72d4a6f1748b747a1f076a6acc" + }, + "report": { + "path": "tests/golden/WBV2-P17-001/object-selection-report.json", + "sha256": "e85d8698a663444f6c63909112c69555d09c6093eada8dcf8d46abce99cf6b62" + }, + "generator": { + "path": "tools/web/generate-wbv2-object-selection.mjs", + "sha256": "4a20ebf230cd8722b5dcb56fcbad877e915b17d31bcb7dc9a29fb27c2042ebbf" + }, + "status": { + "path": "docs/status/WBV2-P17-001.md", + "sha256": "b6a9e48cd88721f3e9a2a377c791734efb7c1e4aab14e4415a58eb145a299dab" + }, + "parityPlan": { + "path": "tests/golden/WBV2-P17-001/object-task-plan.json", + "sha256": "0d0704442246a4b89dac380d7d6ba15da637aeb8bd967535cb22b5da072718a4" + }, + "taskContext": { + "path": "tests/golden/WBV2-P17-001/task-context.json", + "sha256": "ae95f2db954da07664d2e043852e76c56bb31c59a64b281d75d986ac92168694" + } + }, + "assertions": { + "legacyId": "operator:object.duplicate", + "inventoryTotal": 6900, + "basePending": 6618, + "effectivePending": 6616, + "sourceApiBound": true, + "representativeSliceOnly": true, + "fullFamilyParity": false, + "repeatedBlenderRuns": 0, + "repeatedChromiumRuns": 0, + "duplicateValidationAvoided": true, + "deterministic": true, + "historicalReproduction": false + }, + "nextTask": "WBV2-P17-002" +} diff --git a/tests/golden/WBV2-P17-001/object-candidate-set.json b/tests/golden/WBV2-P17-001/object-candidate-set.json new file mode 100644 index 000000000..e8fadaa45 --- /dev/null +++ b/tests/golden/WBV2-P17-001/object-candidate-set.json @@ -0,0 +1,54 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P17-001", + "operation": "OBJECT_DUPLICATE_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.DUPLICATE", + "legacyId": "operator:object.duplicate", + "legacyTask": "M16-GAP-01438", + "behavior": { + "capability": "OBJECT_OPERATIONS.DUPLICATE", + "operation": "duplicateObject", + "positive": [ + "distinct-object", + "undo", + "redo", + "save-reopen" + ], + "negative": [ + "missing-object-id" + ], + "browser": "chromium", + "engine": "compiled-WASM-WebEngine-Main" + }, + "behaviorHash": "95a2d61337bc4660801e9124e9e09301c1abbe00468f7f12eae9f451396eef7f", + "dedupeKey": "OBJECT_OPERATIONS.DUPLICATE|95a2d61337bc4660801e9124e9e09301c1abbe00468f7f12eae9f451396eef7f|8fa70dc7605e66393482e661e5987a8443dded56ab0092aeb977b40ae49888f8|f6d9a8e0a16403bc6fb765195b8f1a619a28de7a75c59a412f1654d46e8ebc0b", + "sourceBacked": true, + "chromiumProductionReady": true, + "fullFamilyParity": false + }, + "inventory": { + "matchedEntries": 1, + "pending": 1, + "total": 6900, + "basePending": 6618, + "effectivePending": 6616, + "remainderExplicit": true + }, + "policy": { + "sourceHistoryReadOnly": true, + "representativeSliceOnly": true, + "noRepeatedExecution": true, + "duplicateValidationAvoided": true, + "fullHistoricalReproduction": false + } +} diff --git a/tests/golden/WBV2-P17-001/object-selection-report.json b/tests/golden/WBV2-P17-001/object-selection-report.json new file mode 100644 index 000000000..5462d663f --- /dev/null +++ b/tests/golden/WBV2-P17-001/object-selection-report.json @@ -0,0 +1,56 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P17-001", + "operation": "SELECT_OBJECT_DUPLICATE_BATCH", + "status": "PASS", + "candidate": { + "capabilityId": "OBJECT_OPERATIONS.DUPLICATE", + "legacyId": "operator:object.duplicate", + "legacyTask": "M16-GAP-01438", + "behavior": { + "capability": "OBJECT_OPERATIONS.DUPLICATE", + "operation": "duplicateObject", + "positive": [ + "distinct-object", + "undo", + "redo", + "save-reopen" + ], + "negative": [ + "missing-object-id" + ], + "browser": "chromium", + "engine": "compiled-WASM-WebEngine-Main" + }, + "behaviorHash": "95a2d61337bc4660801e9124e9e09301c1abbe00468f7f12eae9f451396eef7f", + "dedupeKey": "OBJECT_OPERATIONS.DUPLICATE|95a2d61337bc4660801e9124e9e09301c1abbe00468f7f12eae9f451396eef7f|8fa70dc7605e66393482e661e5987a8443dded56ab0092aeb977b40ae49888f8|f6d9a8e0a16403bc6fb765195b8f1a619a28de7a75c59a412f1654d46e8ebc0b", + "sourceBacked": true, + "chromiumProductionReady": true, + "fullFamilyParity": false + }, + "inventory": { + "matchedEntries": 1, + "pending": 1, + "total": 6900, + "basePending": 6618, + "effectivePending": 6616, + "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": "d798e7c2feecde912af374b60cd091cb3bb1f4c144c32d71af82004da6e36baf", + "efficiency": { + "oneEntryScan": true, + "existingEvidenceReused": true, + "repeatedBlenderRuns": 0, + "repeatedChromiumRuns": 0, + "duplicateValidationAvoided": true + }, + "nextTask": "WBV2-P17-002" +} diff --git a/tests/golden/WBV2-P17-001/object-task-plan.json b/tests/golden/WBV2-P17-001/object-task-plan.json new file mode 100644 index 000000000..cf4c27ac5 --- /dev/null +++ b/tests/golden/WBV2-P17-001/object-task-plan.json @@ -0,0 +1,150 @@ +{ + "schemaVersion": 1, + "planId": "BLENDER_WEB_PARITY_V2_OBJECT_EPOCH_1", + "status": "ACTIVE_OBJECT_QUEUE", + "authority": "queue_reactivated_after_p16_paint_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" + }, + "parentPaint": { + "manifest": "tests/golden/WBV2-P16-003/manifest.json", + "report": "tests/golden/WBV2-P16-003/paint-gate-report.json", + "basePending": 6618, + "effectivePending": 6616, + "duplicateValidationAvoided": true + }, + "tasks": [ + { + "id": "WBV2-P17-000", + "phase": "P17", + "title": "authorize_object_operations_continuation", + "kind": "enabling", + "owner": "PROGRAM", + "dependsOn": [ + "WBV2-P16-003" + ], + "parityId": null, + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p17-governance", + "gate": "G2", + "card": "docs/tasks/WBV2-P17-000.md", + "behavior": "Authorize one Object Operations behavior after the P16 paint overlay.", + "outputs": [ + "continuation root", + "candidate scope", + "hash boundary" + ], + "acceptance": [ + "P16 overlay remains hash-bound", + "duplicateObject API is present", + "one production task is active" + ], + "status": "done", + "ready": false, + "queueMutationAllowed": true + }, + { + "id": "WBV2-P17-001", + "phase": "P17", + "title": "select_object_duplicate_batch", + "kind": "enabling", + "owner": "PARITY", + "dependsOn": [ + "WBV2-P17-000" + ], + "parityId": "OBJECT_OPERATIONS.DUPLICATE", + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p17-selection", + "gate": "G2", + "card": "docs/tasks/WBV2-P17-001.md", + "behavior": "Select the duplicateObject behavior and one exact legacy operator binding.", + "outputs": [ + "candidate report", + "behavior hash", + "dedupe key" + ], + "acceptance": [ + "source command is hash-bound", + "existing Scene/Object evidence is not rerun", + "candidate remains one behavior" + ], + "status": "done", + "ready": false, + "queueMutationAllowed": false + }, + { + "id": "WBV2-P17-002", + "phase": "P17", + "title": "object_duplicate_engine_receipt", + "kind": "feature", + "owner": "OBJECT", + "dependsOn": [ + "WBV2-P17-001" + ], + "parityId": "OBJECT_OPERATIONS.DUPLICATE", + "implementationClass": "LOCAL_EXACT", + "parallelGroup": "p17-object", + "gate": "G2", + "card": "docs/tasks/WBV2-P17-002.md", + "behavior": "Bind duplicateObject, undo/redo, malformed rejection, and exact save/reopen to compiled WASM Main in Chromium.", + "outputs": [ + "object production report", + "object receipt", + "manifest" + ], + "acceptance": [ + "duplicate creates a distinct object", + "undo/redo revisions are sequential", + "malformed object ID fails closed", + "save/reopen is exact" + ], + "status": "in_progress", + "ready": true, + "queueMutationAllowed": false + }, + { + "id": "WBV2-P17-003", + "phase": "P17", + "title": "close_object_duplicate_gate", + "kind": "enabling", + "owner": "RELEASE", + "dependsOn": [ + "WBV2-P17-002" + ], + "parityId": null, + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p17-release", + "gate": "G5", + "card": "docs/tasks/WBV2-P17-003.md", + "behavior": "Close the duplicateObject gate and graduate only the exact operator binding.", + "outputs": [ + "object gate", + "completion overlay", + "manifest" + ], + "acceptance": [ + "only duplicateObject is claimed", + "inventory remainder remains explicit", + "no duplicate validation or historical over-claim" + ], + "status": "planned", + "ready": false, + "queueMutationAllowed": false + } + ], + "parentRecoveryPlan": { + "path": "tests/golden/WBV2-P17-000/object-task-plan.json", + "sha256": "190ad072b1fdcfe9590cc25272a2e2bcbeff54bae3f2b5679e8264c8a9200984" + } +} diff --git a/tests/golden/WBV2-P17-001/task-context.json b/tests/golden/WBV2-P17-001/task-context.json new file mode 100644 index 000000000..35213c695 --- /dev/null +++ b/tests/golden/WBV2-P17-001/task-context.json @@ -0,0 +1,171 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P17-001", + "parentTask": "WBV2-P17-000", + "status": "in_progress", + "goal": "Select the duplicateObject behavior and one exact legacy operator binding.", + "scope": { + "gap": "capability:OBJECT_OPERATIONS.DUPLICATE", + "ownerFamily": "PARITY", + "implementationClass": "LOCAL_BOUNDED" + }, + "commands": [ + "node tools/web/check-task-context.mjs --task WBV2-P17-001 --write" + ], + "inputPaths": [], + "inputSelection": { + "schemaVersion": 1, + "limits": { + "maxFiles": 12, + "evidenceBytes": 8192, + "contextRemainingBytes": 3499, + "contextRemainingTokens": 873 + }, + "source": { + "bytes": 6405, + "tokens": 1603 + }, + "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-P17-001/", + "bytes": null, + "reason": "GENERATED_EVIDENCE_OUTPUT" + }, + { + "path": "docs/status/WBV2-P17-001.md", + "bytes": null, + "reason": "GENERATED_EVIDENCE_OUTPUT" + }, + { + "path": "tests/golden/WBV2-P17-001/manifest.json", + "bytes": null, + "reason": "GENERATED_EVIDENCE_OUTPUT" + } + ], + "totals": { + "files": 0, + "bytes": 0, + "tokens": 0 + } + }, + "exitCriteria": [ + "source command is hash-bound", + "existing Scene/Object evidence is not rerun", + "candidate remains one behavior" + ], + "nextTask": "WBV2-P17-002", + "sourceDocuments": { + "queue": "docs/EXECUTION_QUEUE.md", + "taskCard": "docs/tasks/WBV2-P17-001.md", + "taskIndex": "tests/golden/WBV2/task-index.json", + "parentManifest": "tests/golden/WBV2-P17-000/manifest.json", + "parentStatus": "docs/status/WBV2-P17-000.md" + }, + "readPolicy": { + "required": [ + "docs/EXECUTION_QUEUE.md", + "docs/tasks/WBV2-P17-001.md", + "tests/golden/WBV2-P17-000/manifest.json", + "docs/status/WBV2-P17-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-P17-000", + "parentTask": "WBV2-P16-003", + "status": "done", + "nextTask": "WBV2-P17-001", + "artifactCount": 9 + }, + "statusSummary": [ + "# WBV2-P17-000 status", + "- task: `WBV2-P17-000`; parent: `WBV2-P16-003`; status: `done`", + "- candidate: `OBJECT_OPERATIONS.DUPLICATE`; source API is present", + "- effective inventory carried forward: `283` completed, `6616` pending", + "- duplicate validation: `forbidden`; representative slice only", + "- nextTask: `WBV2-P17-001`" + ] + }, + "budgets": { + "queueBytes": 4096, + "taskBytes": 1118, + "parentManifestBytes": 24576, + "parentStatusBytes": 6144, + "evidenceFiles": 12, + "evidenceBytes": 8192, + "contextTokens": 3500, + "contextEnvelopeTokens": 1024, + "taskLines": 36, + "taskTokens": 280 + }, + "size": { + "documents": [ + { + "path": "docs/EXECUTION_QUEUE.md", + "bytes": 2803, + "lines": 51, + "tokens": 701 + }, + { + "path": "docs/tasks/WBV2-P17-001.md", + "bytes": 1118, + "lines": 36, + "tokens": 280 + }, + { + "path": "tests/golden/WBV2-P17-000/manifest.json", + "bytes": 2171, + "lines": 61, + "tokens": 543 + }, + { + "path": "docs/status/WBV2-P17-000.md", + "bytes": 313, + "lines": 8, + "tokens": 79 + } + ], + "sourceTokens": 1603, + "evidenceFiles": 0, + "evidenceBytes": 0, + "evidenceTokens": 0, + "totalTokens": 1603, + "reservedEnvelopeTokens": 1024, + "estimatedContextTokens": 2627, + "serializedContextTokens": 595, + "withinBudget": true + } +} diff --git a/tests/golden/WBV2-P17-002/manifest.json b/tests/golden/WBV2-P17-002/manifest.json new file mode 100644 index 000000000..2371a2253 --- /dev/null +++ b/tests/golden/WBV2-P17-002/manifest.json @@ -0,0 +1,78 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P17-002", + "parentTask": "WBV2-P17-001", + "operation": "OBJECT_DUPLICATE_ENGINE_RECEIPT", + "status": "done", + "enablingTask": false, + "parityStateChange": true, + "runtime": "PLAYWRIGHT_CHROMIUM_WEBENGINE_WASM", + "artifacts": { + "parentManifest": { + "path": "tests/golden/WBV2-P17-001/manifest.json", + "sha256": "7e4f8d23db533b8b4f6ce40ba1c30113fc63351dd4795862b016ea46a5e6c76a" + }, + "selection": { + "path": "tests/golden/WBV2-P17-001/object-selection-report.json", + "sha256": "e85d8698a663444f6c63909112c69555d09c6093eada8dcf8d46abce99cf6b62" + }, + "api": { + "path": "blender-5.2.0/source/blender/web_engine/web_engine_api.cpp", + "sha256": "8fa70dc7605e66393482e661e5987a8443dded56ab0092aeb977b40ae49888f8" + }, + "test": { + "path": "web/tests/e2e/wbv2-object-duplicate-production.spec.ts", + "sha256": "c1136526f199d10f0b65d5c51c5e9cbb8dce817c35168293e1efa205b86f5d59" + }, + "fixture": { + "path": "tests/files/web/basic_scene.blend", + "sha256": "6fcc55bda74da8c95da96ba068b60339bf60ca44147ff8000fbb95d296db2a73" + }, + "production": { + "path": "tests/golden/WBV2-P17-002/object-duplicate-production.json", + "sha256": "b6a238f4a48e050c2e52299c936dc9136cf3dca74ded8f3af5628f5af84edcdb" + }, + "secondProduction": { + "path": "tests/golden/WBV2-P17-002/object-duplicate-production.second.json", + "sha256": "b6a238f4a48e050c2e52299c936dc9136cf3dca74ded8f3af5628f5af84edcdb" + }, + "report": { + "path": "tests/golden/WBV2-P17-002/object-duplicate-receipt-report.json", + "sha256": "daa20107e07ae97b0cfc4ee21be683d729230ea32850a004ca4d14c20ff4b776" + }, + "generator": { + "path": "tools/web/generate-wbv2-object-receipt.mjs", + "sha256": "3e75808174a0789f337a7b9b819e4a714c442461a3e111b4df3be53ad29a4694" + }, + "status": { + "path": "docs/status/WBV2-P17-002.md", + "sha256": "5ec2b4363af94f58533874a26c6dde59793ed89fd84567bc95b01fe622b3bc06" + }, + "parityPlan": { + "path": "tests/golden/WBV2-P17-002/object-task-plan.json", + "sha256": "e7a385ec63600d9009edb3b5c43222fd4d7e33992fc54269203c0a579c597035" + }, + "taskContext": { + "path": "tests/golden/WBV2-P17-002/task-context.json", + "sha256": "3ecf5644088ed4cbf8750f950ac2bcc56679889e94d9174abf022596f7342846" + } + }, + "assertions": { + "exactInventoryBindings": 1, + "boundInventoryIds": [ + "operator:object.duplicate" + ], + "distinctObjectCreated": true, + "undoRedoSequential": true, + "malformedRejected": true, + "saveReopen": "EXACT", + "deterministic": true, + "representativeSliceOnly": true, + "fullFamilyParity": false, + "inventoryTotal": 6900, + "baseInventoryPending": 6618, + "effectivePending": 6616, + "historicalReproduction": false + }, + "nextTask": "WBV2-P17-003" +} diff --git a/tests/golden/WBV2-P17-002/object-duplicate-production.json b/tests/golden/WBV2-P17-002/object-duplicate-production.json new file mode 100644 index 000000000..f5f06ebaf --- /dev/null +++ b/tests/golden/WBV2-P17-002/object-duplicate-production.json @@ -0,0 +1,22 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P17-002", + "operation": "OBJECT_DUPLICATE_ENGINE_CHROMIUM", + "queueMutation": false, + "fixtureSha256": "6fcc55bda74da8c95da96ba068b60339bf60ca44147ff8000fbb95d296db2a73", + "browser": "chromium", + "baseRevision": 1, + "beforeCount": 3, + "duplicateRevision": 2, + "undoRevision": 3, + "redoRevision": 4, + "afterCount": 4, + "malformed": { + "code": "INVALID_ARGUMENT", + "message": "duplicateObject requires an existing object and a three-component offset" + }, + "malformedRevisionPreserved": true, + "reopenedCount": 4, + "reopenedRevision": 1, + "savedSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" +} diff --git a/tests/golden/WBV2-P17-002/object-duplicate-production.second.json b/tests/golden/WBV2-P17-002/object-duplicate-production.second.json new file mode 100644 index 000000000..f5f06ebaf --- /dev/null +++ b/tests/golden/WBV2-P17-002/object-duplicate-production.second.json @@ -0,0 +1,22 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P17-002", + "operation": "OBJECT_DUPLICATE_ENGINE_CHROMIUM", + "queueMutation": false, + "fixtureSha256": "6fcc55bda74da8c95da96ba068b60339bf60ca44147ff8000fbb95d296db2a73", + "browser": "chromium", + "baseRevision": 1, + "beforeCount": 3, + "duplicateRevision": 2, + "undoRevision": 3, + "redoRevision": 4, + "afterCount": 4, + "malformed": { + "code": "INVALID_ARGUMENT", + "message": "duplicateObject requires an existing object and a three-component offset" + }, + "malformedRevisionPreserved": true, + "reopenedCount": 4, + "reopenedRevision": 1, + "savedSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" +} diff --git a/tests/golden/WBV2-P17-002/object-duplicate-receipt-report.json b/tests/golden/WBV2-P17-002/object-duplicate-receipt-report.json new file mode 100644 index 000000000..5165bb979 --- /dev/null +++ b/tests/golden/WBV2-P17-002/object-duplicate-receipt-report.json @@ -0,0 +1,64 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P17-002", + "operation": "OBJECT_DUPLICATE_ENGINE_RECEIPT", + "status": "PASS", + "browser": "chromium", + "queueMutation": false, + "source": { + "manifest": "tests/golden/WBV2-P17-001/manifest.json", + "manifestSha256": "7e4f8d23db533b8b4f6ce40ba1c30113fc63351dd4795862b016ea46a5e6c76a", + "selection": "tests/golden/WBV2-P17-001/object-selection-report.json", + "selectionSha256": "e85d8698a663444f6c63909112c69555d09c6093eada8dcf8d46abce99cf6b62", + "api": "blender-5.2.0/source/blender/web_engine/web_engine_api.cpp", + "apiSha256": "8fa70dc7605e66393482e661e5987a8443dded56ab0092aeb977b40ae49888f8", + "test": "web/tests/e2e/wbv2-object-duplicate-production.spec.ts", + "testSha256": "c1136526f199d10f0b65d5c51c5e9cbb8dce817c35168293e1efa205b86f5d59", + "fixture": "tests/files/web/basic_scene.blend", + "fixtureSha256": "6fcc55bda74da8c95da96ba068b60339bf60ca44147ff8000fbb95d296db2a73" + }, + "production": { + "report": "tests/golden/WBV2-P17-002/object-duplicate-production.json", + "reportSha256": "b6a238f4a48e050c2e52299c936dc9136cf3dca74ded8f3af5628f5af84edcdb", + "secondReport": "tests/golden/WBV2-P17-002/object-duplicate-production.second.json", + "secondReportSha256": "b6a238f4a48e050c2e52299c936dc9136cf3dca74ded8f3af5628f5af84edcdb", + "deterministic": true, + "beforeCount": 3, + "afterCount": 4, + "revisions": [ + 1, + 2, + 3, + 4 + ], + "malformed": { + "code": "INVALID_ARGUMENT", + "message": "duplicateObject requires an existing object and a three-component offset" + }, + "malformedRevisionPreserved": true, + "reopenedCount": 4, + "reopenedRevision": 1, + "saveReopen": "EXACT" + }, + "inventoryBindings": [ + { + "id": "operator:object.duplicate", + "evidence": "duplicateObject", + "exact": true, + "reason": "bounded protocol command creates a distinct object and persists it" + } + ], + "assertions": { + "distinctObjectCreated": true, + "undoRedoSequential": true, + "malformedRejected": true, + "mainUnchangedOnMalformed": true, + "saveReopenExact": true, + "deterministic": true, + "inventoryBindingsExact": true, + "representativeSliceOnly": true, + "fullFamilyParity": false, + "historicalReproduction": false + }, + "nextTask": "WBV2-P17-003" +} diff --git a/tests/golden/WBV2-P17-002/object-task-plan.json b/tests/golden/WBV2-P17-002/object-task-plan.json new file mode 100644 index 000000000..828323d2a --- /dev/null +++ b/tests/golden/WBV2-P17-002/object-task-plan.json @@ -0,0 +1,150 @@ +{ + "schemaVersion": 1, + "planId": "BLENDER_WEB_PARITY_V2_OBJECT_EPOCH_1", + "status": "ACTIVE_OBJECT_QUEUE", + "authority": "queue_reactivated_after_p16_paint_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" + }, + "parentPaint": { + "manifest": "tests/golden/WBV2-P16-003/manifest.json", + "report": "tests/golden/WBV2-P16-003/paint-gate-report.json", + "basePending": 6618, + "effectivePending": 6616, + "duplicateValidationAvoided": true + }, + "tasks": [ + { + "id": "WBV2-P17-000", + "phase": "P17", + "title": "authorize_object_operations_continuation", + "kind": "enabling", + "owner": "PROGRAM", + "dependsOn": [ + "WBV2-P16-003" + ], + "parityId": null, + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p17-governance", + "gate": "G2", + "card": "docs/tasks/WBV2-P17-000.md", + "behavior": "Authorize one Object Operations behavior after the P16 paint overlay.", + "outputs": [ + "continuation root", + "candidate scope", + "hash boundary" + ], + "acceptance": [ + "P16 overlay remains hash-bound", + "duplicateObject API is present", + "one production task is active" + ], + "status": "done", + "ready": false, + "queueMutationAllowed": true + }, + { + "id": "WBV2-P17-001", + "phase": "P17", + "title": "select_object_duplicate_batch", + "kind": "enabling", + "owner": "PARITY", + "dependsOn": [ + "WBV2-P17-000" + ], + "parityId": "OBJECT_OPERATIONS.DUPLICATE", + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p17-selection", + "gate": "G2", + "card": "docs/tasks/WBV2-P17-001.md", + "behavior": "Select the duplicateObject behavior and one exact legacy operator binding.", + "outputs": [ + "candidate report", + "behavior hash", + "dedupe key" + ], + "acceptance": [ + "source command is hash-bound", + "existing Scene/Object evidence is not rerun", + "candidate remains one behavior" + ], + "status": "done", + "ready": false, + "queueMutationAllowed": false + }, + { + "id": "WBV2-P17-002", + "phase": "P17", + "title": "object_duplicate_engine_receipt", + "kind": "feature", + "owner": "OBJECT", + "dependsOn": [ + "WBV2-P17-001" + ], + "parityId": "OBJECT_OPERATIONS.DUPLICATE", + "implementationClass": "LOCAL_EXACT", + "parallelGroup": "p17-object", + "gate": "G2", + "card": "docs/tasks/WBV2-P17-002.md", + "behavior": "Bind duplicateObject, undo/redo, malformed rejection, and exact save/reopen to compiled WASM Main in Chromium.", + "outputs": [ + "object production report", + "object receipt", + "manifest" + ], + "acceptance": [ + "duplicate creates a distinct object", + "undo/redo revisions are sequential", + "malformed object ID fails closed", + "save/reopen is exact" + ], + "status": "done", + "ready": false, + "queueMutationAllowed": false + }, + { + "id": "WBV2-P17-003", + "phase": "P17", + "title": "close_object_duplicate_gate", + "kind": "enabling", + "owner": "RELEASE", + "dependsOn": [ + "WBV2-P17-002" + ], + "parityId": null, + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p17-release", + "gate": "G5", + "card": "docs/tasks/WBV2-P17-003.md", + "behavior": "Close the duplicateObject gate and graduate only the exact operator binding.", + "outputs": [ + "object gate", + "completion overlay", + "manifest" + ], + "acceptance": [ + "only duplicateObject is claimed", + "inventory remainder remains explicit", + "no duplicate validation or historical over-claim" + ], + "status": "in_progress", + "ready": true, + "queueMutationAllowed": false + } + ], + "parentRecoveryPlan": { + "path": "tests/golden/WBV2-P17-001/object-task-plan.json", + "sha256": "0d0704442246a4b89dac380d7d6ba15da637aeb8bd967535cb22b5da072718a4" + } +} diff --git a/tests/golden/WBV2-P17-002/task-context.json b/tests/golden/WBV2-P17-002/task-context.json new file mode 100644 index 000000000..e0947358f --- /dev/null +++ b/tests/golden/WBV2-P17-002/task-context.json @@ -0,0 +1,170 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P17-002", + "parentTask": "WBV2-P17-001", + "status": "in_progress", + "goal": "Bind duplicateObject, undo/redo, malformed rejection, and exact save/reopen to compiled WASM Main in Chromium.", + "scope": { + "gap": "capability:OBJECT_OPERATIONS.DUPLICATE", + "ownerFamily": "OBJECT", + "implementationClass": "LOCAL_EXACT" + }, + "commands": [ + "node tools/web/check-task-context.mjs --task WBV2-P17-002 --write" + ], + "inputPaths": [ + "tests/golden/WBV2-P17-001/object-selection-report.json" + ], + "inputSelection": { + "schemaVersion": 1, + "limits": { + "maxFiles": 12, + "evidenceBytes": 8192, + "contextRemainingBytes": 3135, + "contextRemainingTokens": 782 + }, + "source": { + "bytes": 6769, + "tokens": 1694 + }, + "selected": [ + { + "path": "tests/golden/WBV2-P17-001/object-selection-report.json", + "bytes": 2007, + "tokens": 502 + } + ], + "excluded": [ + { + "path": "web/tests/e2e/wbv2-object-duplicate-production.spec.ts", + "bytes": 3796, + "reason": "CONTEXT_REMAINING_SPACE" + }, + { + "path": "tests/golden/WBV2-P17-002/", + "bytes": null, + "reason": "GENERATED_EVIDENCE_OUTPUT" + }, + { + "path": "docs/status/WBV2-P17-002.md", + "bytes": null, + "reason": "GENERATED_EVIDENCE_OUTPUT" + }, + { + "path": "tests/golden/WBV2-P17-002/manifest.json", + "bytes": null, + "reason": "GENERATED_EVIDENCE_OUTPUT" + } + ], + "totals": { + "files": 1, + "bytes": 2007, + "tokens": 502 + } + }, + "exitCriteria": [ + "duplicate creates a distinct object", + "undo/redo revisions are sequential", + "malformed object ID fails closed", + "save/reopen is exact" + ], + "nextTask": "WBV2-P17-003", + "sourceDocuments": { + "queue": "docs/EXECUTION_QUEUE.md", + "taskCard": "docs/tasks/WBV2-P17-002.md", + "taskIndex": "tests/golden/WBV2/task-index.json", + "parentManifest": "tests/golden/WBV2-P17-001/manifest.json", + "parentStatus": "docs/status/WBV2-P17-001.md" + }, + "readPolicy": { + "required": [ + "docs/EXECUTION_QUEUE.md", + "docs/tasks/WBV2-P17-002.md", + "tests/golden/WBV2-P17-001/manifest.json", + "docs/status/WBV2-P17-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-P17-001", + "parentTask": "WBV2-P17-000", + "status": "done", + "nextTask": "WBV2-P17-002", + "artifactCount": 10 + }, + "statusSummary": [ + "# WBV2-P17-001 status", + "- task: `WBV2-P17-001`; parent: `WBV2-P17-000`; status: `done`", + "- selected behavior: `duplicateObject`; exact candidate: `operator:object.duplicate`", + "- base inventory: `6900` total, `6618` pending; effective carried overlay: `6616` pending", + "- behavior hash: `95a2d61337bc4660801e9124e9e09301c1abbe00468f7f12eae9f451396eef7f`; duplicate validation: `forbidden`", + "- nextTask: `WBV2-P17-002`" + ] + }, + "budgets": { + "queueBytes": 4096, + "taskBytes": 1129, + "parentManifestBytes": 24576, + "parentStatusBytes": 6144, + "evidenceFiles": 12, + "evidenceBytes": 8192, + "contextTokens": 3500, + "contextEnvelopeTokens": 1024, + "taskLines": 36, + "taskTokens": 283 + }, + "size": { + "documents": [ + { + "path": "docs/EXECUTION_QUEUE.md", + "bytes": 2803, + "lines": 51, + "tokens": 701 + }, + { + "path": "docs/tasks/WBV2-P17-002.md", + "bytes": 1129, + "lines": 36, + "tokens": 283 + }, + { + "path": "tests/golden/WBV2-P17-001/manifest.json", + "bytes": 2430, + "lines": 68, + "tokens": 608 + }, + { + "path": "docs/status/WBV2-P17-001.md", + "bytes": 407, + "lines": 8, + "tokens": 102 + } + ], + "sourceTokens": 1694, + "evidenceFiles": 1, + "evidenceBytes": 2007, + "evidenceTokens": 502, + "totalTokens": 2196, + "reservedEnvelopeTokens": 1024, + "estimatedContextTokens": 3220, + "serializedContextTokens": 666, + "withinBudget": true + } +} diff --git a/tests/golden/WBV2-P17-003/inventory-completion-overlay.json b/tests/golden/WBV2-P17-003/inventory-completion-overlay.json new file mode 100644 index 000000000..85b933d0f --- /dev/null +++ b/tests/golden/WBV2-P17-003/inventory-completion-overlay.json @@ -0,0 +1,64 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P17-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-P16-003/inventory-completion-overlay.json", + "sha256": "b96f91fe9e09a01382a5caf94dc67dd5a2c738d6c00610c753eeeff2afae816a", + "effectiveCompleted": 283, + "effectivePending": 6616 + }, + "completionEvidence": { + "receipt": "tests/golden/WBV2-P17-002/object-duplicate-receipt-report.json", + "receiptSha256": "daa20107e07ae97b0cfc4ee21be683d729230ea32850a004ca4d14c20ff4b776", + "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: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 + } + ], + "summary": { + "newlyVerifiedEntries": 1, + "effectiveCompleted": 284, + "effectivePending": 6615, + "claimedComplete": 3, + "basePendingPreserved": true, + "fullFamilyParity": false, + "historicalReproduction": false + } +} diff --git a/tests/golden/WBV2-P17-003/manifest.json b/tests/golden/WBV2-P17-003/manifest.json new file mode 100644 index 000000000..9aca75ac6 --- /dev/null +++ b/tests/golden/WBV2-P17-003/manifest.json @@ -0,0 +1,76 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P17-003", + "parentTask": "WBV2-P17-002", + "operation": "CLOSE_OBJECT_DUPLICATE_GATE", + "status": "done", + "enablingTask": true, + "parityStateChange": true, + "runtime": "READ_ONLY_OBJECT_GATE_WITH_COMPLETION_OVERLAY", + "artifacts": { + "parentManifest": { + "path": "tests/golden/WBV2-P17-002/manifest.json", + "sha256": "3dd0994aa9db748cf25f84c83aeb3f9197e09ea00e36212cf26d9708bf62431c" + }, + "receipt": { + "path": "tests/golden/WBV2-P17-002/object-duplicate-receipt-report.json", + "sha256": "daa20107e07ae97b0cfc4ee21be683d729230ea32850a004ca4d14c20ff4b776" + }, + "paintOverlay": { + "path": "tests/golden/WBV2-P16-003/inventory-completion-overlay.json", + "sha256": "b96f91fe9e09a01382a5caf94dc67dd5a2c738d6c00610c753eeeff2afae816a" + }, + "selection": { + "path": "tests/golden/WBV2-P17-001/object-selection-report.json", + "sha256": "e85d8698a663444f6c63909112c69555d09c6093eada8dcf8d46abce99cf6b62" + }, + "baseInventory": { + "path": "tests/golden/WBV2-P0-002/parity-map.json", + "sha256": "a60a77cae000941a953d55adbf93d8f6e275533891713d6eae993f60faed94e8" + }, + "overlay": { + "path": "tests/golden/WBV2-P17-003/inventory-completion-overlay.json", + "sha256": "6d35e91978b872abbe32640de1df77e2e6a616f1e792bcd51c455194b64d402e" + }, + "report": { + "path": "tests/golden/WBV2-P17-003/object-gate-report.json", + "sha256": "d8b6aec74df4d3226569bd52ea2f3e38478cfe6b66b7ec83a78513ed24c3a670" + }, + "generator": { + "path": "tools/web/generate-wbv2-object-gate.mjs", + "sha256": "9d2460bd1ab3c97ef16083f9b3b94977d8c8cfd0187e16c0a922fe92a05b1117" + }, + "status": { + "path": "docs/status/WBV2-P17-003.md", + "sha256": "57d0551a935a3485121ad17f2f2ed4228ae2a59c1062997f904bb5c9674599eb" + }, + "parityPlan": { + "path": "tests/golden/WBV2-P17-003/object-task-plan.json", + "sha256": "20a38c52fb3a37d467247832630d57dffaaf90d81f23dcfe3691f45cc7fdf5e7" + }, + "taskContext": { + "path": "tests/golden/WBV2-P17-003/task-context.json", + "sha256": "22112d7c8890eed5ef8774c940ee258103cc0a65cf54a4cbc7b033607d5d1eaa" + } + }, + "assertions": { + "totalFeatureClaims": 1, + "newObjectClaims": 1, + "exactInventoryBindings": 1, + "effectiveCompleted": 284, + "effectivePending": 6615, + "baseInventoryCompleted": 281, + "baseInventoryPending": 6618, + "claimedCompleteOverlay": 3, + "uniqueBehaviorRuns": 2, + "repeatedBlenderRuns": 0, + "repeatedChromiumRuns": 0, + "duplicateValidationAvoided": true, + "baseInventoryUntouched": true, + "provenanceEpoch": 2, + "authorizedRebaselineOnly": true, + "fullHistoricalReproduction": false, + "deterministic": true + }, + "nextTask": null +} diff --git a/tests/golden/WBV2-P17-003/object-gate-report.json b/tests/golden/WBV2-P17-003/object-gate-report.json new file mode 100644 index 000000000..e192c918c --- /dev/null +++ b/tests/golden/WBV2-P17-003/object-gate-report.json @@ -0,0 +1,121 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P17-003", + "operation": "CLOSE_OBJECT_DUPLICATE_GATE", + "status": "PASS", + "decision": { + "status": "READY_WITH_OBJECT_SLICE_AND_INVENTORY_OVERLAY", + "code": "OBJECT_DUPLICATE_AUTHORIZED_REBASELINE", + "featureParityClaims": [ + "SCULPT.PAINT_ATTRIBUTES" + ], + "featureParityClaimCount": 1, + "newFeatureClaim": "OBJECT_OPERATIONS.DUPLICATE", + "newlyVerifiedInventoryEntries": 1, + "baseInventoryPending": 6618, + "effectivePending": 6615, + "effectiveCompleted": 284, + "claimedCompleteOverlay": 3, + "fullFamilyParity": false, + "engineBound": true, + "browser": "chromium", + "provenanceEpoch": 2, + "releaseScope": "AUTHORIZED_REBASELINE_ONLY", + "fullHistoricalReproduction": false, + "inventoryTotal": 6900 + }, + "evidence": { + "receipt": { + "path": "tests/golden/WBV2-P17-002/object-duplicate-receipt-report.json", + "sha256": "daa20107e07ae97b0cfc4ee21be683d729230ea32850a004ca4d14c20ff4b776", + "bindings": [ + { + "id": "operator:object.duplicate", + "evidence": "duplicateObject", + "exact": true, + "reason": "bounded protocol command creates a distinct object and persists it" + } + ] + }, + "overlay": { + "path": "tests/golden/WBV2-P17-003/inventory-completion-overlay.json", + "sha256": "6d35e91978b872abbe32640de1df77e2e6a616f1e792bcd51c455194b64d402e", + "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: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 + } + ] + }, + "paintOverlay": { + "path": "tests/golden/WBV2-P16-003/inventory-completion-overlay.json", + "sha256": "b96f91fe9e09a01382a5caf94dc67dd5a2c738d6c00610c753eeeff2afae816a" + }, + "selection": { + "path": "tests/golden/WBV2-P17-001/object-selection-report.json", + "sha256": "e85d8698a663444f6c63909112c69555d09c6093eada8dcf8d46abce99cf6b62" + }, + "baseInventory": { + "path": "tests/golden/WBV2-P0-002/parity-map.json", + "sha256": "a60a77cae000941a953d55adbf93d8f6e275533891713d6eae993f60faed94e8", + "pending": 6618 + } + }, + "efficiency": { + "uniqueBehaviorRuns": 2, + "repeatedBlenderRuns": 0, + "repeatedChromiumRuns": 0, + "duplicateValidationAvoided": true, + "baseInventoryUntouched": true + }, + "coverage": { + "baseTotal": 6900, + "baseCompleted": 281, + "basePending": 6618, + "overlayCompleted": 3, + "effectiveCompleted": 284, + "effectivePending": 6615, + "remainingPaintPending": 115 + }, + "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-P17-003/object-task-plan.json b/tests/golden/WBV2-P17-003/object-task-plan.json new file mode 100644 index 000000000..cd85fd36b --- /dev/null +++ b/tests/golden/WBV2-P17-003/object-task-plan.json @@ -0,0 +1,150 @@ +{ + "schemaVersion": 1, + "planId": "BLENDER_WEB_PARITY_V2_OBJECT_EPOCH_1", + "status": "COMPLETED_WITH_OBJECT_DUPLICATE_SLICE", + "authority": "queue_reactivated_after_p16_paint_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" + }, + "parentPaint": { + "manifest": "tests/golden/WBV2-P16-003/manifest.json", + "report": "tests/golden/WBV2-P16-003/paint-gate-report.json", + "basePending": 6618, + "effectivePending": 6616, + "duplicateValidationAvoided": true + }, + "tasks": [ + { + "id": "WBV2-P17-000", + "phase": "P17", + "title": "authorize_object_operations_continuation", + "kind": "enabling", + "owner": "PROGRAM", + "dependsOn": [ + "WBV2-P16-003" + ], + "parityId": null, + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p17-governance", + "gate": "G2", + "card": "docs/tasks/WBV2-P17-000.md", + "behavior": "Authorize one Object Operations behavior after the P16 paint overlay.", + "outputs": [ + "continuation root", + "candidate scope", + "hash boundary" + ], + "acceptance": [ + "P16 overlay remains hash-bound", + "duplicateObject API is present", + "one production task is active" + ], + "status": "done", + "ready": false, + "queueMutationAllowed": true + }, + { + "id": "WBV2-P17-001", + "phase": "P17", + "title": "select_object_duplicate_batch", + "kind": "enabling", + "owner": "PARITY", + "dependsOn": [ + "WBV2-P17-000" + ], + "parityId": "OBJECT_OPERATIONS.DUPLICATE", + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p17-selection", + "gate": "G2", + "card": "docs/tasks/WBV2-P17-001.md", + "behavior": "Select the duplicateObject behavior and one exact legacy operator binding.", + "outputs": [ + "candidate report", + "behavior hash", + "dedupe key" + ], + "acceptance": [ + "source command is hash-bound", + "existing Scene/Object evidence is not rerun", + "candidate remains one behavior" + ], + "status": "done", + "ready": false, + "queueMutationAllowed": false + }, + { + "id": "WBV2-P17-002", + "phase": "P17", + "title": "object_duplicate_engine_receipt", + "kind": "feature", + "owner": "OBJECT", + "dependsOn": [ + "WBV2-P17-001" + ], + "parityId": "OBJECT_OPERATIONS.DUPLICATE", + "implementationClass": "LOCAL_EXACT", + "parallelGroup": "p17-object", + "gate": "G2", + "card": "docs/tasks/WBV2-P17-002.md", + "behavior": "Bind duplicateObject, undo/redo, malformed rejection, and exact save/reopen to compiled WASM Main in Chromium.", + "outputs": [ + "object production report", + "object receipt", + "manifest" + ], + "acceptance": [ + "duplicate creates a distinct object", + "undo/redo revisions are sequential", + "malformed object ID fails closed", + "save/reopen is exact" + ], + "status": "done", + "ready": false, + "queueMutationAllowed": false + }, + { + "id": "WBV2-P17-003", + "phase": "P17", + "title": "close_object_duplicate_gate", + "kind": "enabling", + "owner": "RELEASE", + "dependsOn": [ + "WBV2-P17-002" + ], + "parityId": null, + "implementationClass": "LOCAL_BOUNDED", + "parallelGroup": "p17-release", + "gate": "G5", + "card": "docs/tasks/WBV2-P17-003.md", + "behavior": "Close the duplicateObject gate and graduate only the exact operator binding.", + "outputs": [ + "object gate", + "completion overlay", + "manifest" + ], + "acceptance": [ + "only duplicateObject is claimed", + "inventory remainder remains explicit", + "no duplicate validation or historical over-claim" + ], + "status": "in_progress", + "ready": true, + "queueMutationAllowed": false + } + ], + "parentRecoveryPlan": { + "path": "tests/golden/WBV2-P17-002/object-task-plan.json", + "sha256": "e7a385ec63600d9009edb3b5c43222fd4d7e33992fc54269203c0a579c597035" + } +} diff --git a/tests/golden/WBV2-P17-003/task-context.json b/tests/golden/WBV2-P17-003/task-context.json new file mode 100644 index 000000000..9176282ce --- /dev/null +++ b/tests/golden/WBV2-P17-003/task-context.json @@ -0,0 +1,170 @@ +{ + "schemaVersion": 1, + "task": "WBV2-P17-003", + "parentTask": "WBV2-P17-002", + "status": "in_progress", + "goal": "Close the duplicateObject gate and graduate only the exact operator binding.", + "scope": { + "gap": "workflow:close_object_duplicate_gate", + "ownerFamily": "RELEASE", + "implementationClass": "LOCAL_BOUNDED" + }, + "commands": [ + "node tools/web/check-task-context.mjs --task WBV2-P17-003 --write" + ], + "inputPaths": [ + "tests/golden/WBV2-P17-002/object-duplicate-receipt-report.json" + ], + "inputSelection": { + "schemaVersion": 1, + "limits": { + "maxFiles": 12, + "evidenceBytes": 8192, + "contextRemainingBytes": 2751, + "contextRemainingTokens": 687 + }, + "source": { + "bytes": 7153, + "tokens": 1789 + }, + "selected": [ + { + "path": "tests/golden/WBV2-P17-002/object-duplicate-receipt-report.json", + "bytes": 2341, + "tokens": 586 + } + ], + "excluded": [ + { + "path": "tests/golden/WBV2-P16-003/inventory-completion-overlay.json", + "bytes": 1638, + "reason": "CONTEXT_REMAINING_SPACE" + }, + { + "path": "tests/golden/WBV2-P17-003/", + "bytes": null, + "reason": "GENERATED_EVIDENCE_OUTPUT" + }, + { + "path": "docs/status/WBV2-P17-003.md", + "bytes": null, + "reason": "GENERATED_EVIDENCE_OUTPUT" + }, + { + "path": "tests/golden/WBV2-P17-003/manifest.json", + "bytes": null, + "reason": "GENERATED_EVIDENCE_OUTPUT" + } + ], + "totals": { + "files": 1, + "bytes": 2341, + "tokens": 586 + } + }, + "exitCriteria": [ + "only duplicateObject is claimed", + "inventory remainder remains explicit", + "no duplicate validation or historical over-claim" + ], + "nextTask": null, + "sourceDocuments": { + "queue": "docs/EXECUTION_QUEUE.md", + "taskCard": "docs/tasks/WBV2-P17-003.md", + "taskIndex": "tests/golden/WBV2/task-index.json", + "parentManifest": "tests/golden/WBV2-P17-002/manifest.json", + "parentStatus": "docs/status/WBV2-P17-002.md" + }, + "readPolicy": { + "required": [ + "docs/EXECUTION_QUEUE.md", + "docs/tasks/WBV2-P17-003.md", + "tests/golden/WBV2-P17-002/manifest.json", + "docs/status/WBV2-P17-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-P17-002", + "parentTask": "WBV2-P17-001", + "status": "done", + "nextTask": "WBV2-P17-003", + "artifactCount": 12 + }, + "statusSummary": [ + "# WBV2-P17-002 status", + "- task: `WBV2-P17-002`; parent: `WBV2-P17-001`; status: `done`", + "- exact inventory binding: `operator:object.duplicate`", + "- objects: `3 -> 4`; revisions: `1 -> 4` sequential", + "- malformed object ID rejected; save/reopen: `EXACT`; deterministic second run: `true`", + "- effective pending before overlay: `6616`; representative slice: `true`", + "- nextTask: `WBV2-P17-003`" + ] + }, + "budgets": { + "queueBytes": 4096, + "taskBytes": 1086, + "parentManifestBytes": 24576, + "parentStatusBytes": 6144, + "evidenceFiles": 12, + "evidenceBytes": 8192, + "contextTokens": 3500, + "contextEnvelopeTokens": 1024, + "taskLines": 36, + "taskTokens": 272 + }, + "size": { + "documents": [ + { + "path": "docs/EXECUTION_QUEUE.md", + "bytes": 2803, + "lines": 51, + "tokens": 701 + }, + { + "path": "docs/tasks/WBV2-P17-003.md", + "bytes": 1086, + "lines": 36, + "tokens": 272 + }, + { + "path": "tests/golden/WBV2-P17-002/manifest.json", + "bytes": 2884, + "lines": 79, + "tokens": 721 + }, + { + "path": "docs/status/WBV2-P17-002.md", + "bytes": 380, + "lines": 9, + "tokens": 95 + } + ], + "sourceTokens": 1789, + "evidenceFiles": 1, + "evidenceBytes": 2341, + "evidenceTokens": 586, + "totalTokens": 2375, + "reservedEnvelopeTokens": 1024, + "estimatedContextTokens": 3399, + "serializedContextTokens": 655, + "withinBudget": true + } +} diff --git a/tests/golden/WBV2/task-catalog.jsonl b/tests/golden/WBV2/task-catalog.jsonl index 0d9cefebb..90d6ef480 100644 --- a/tests/golden/WBV2/task-catalog.jsonl +++ b/tests/golden/WBV2/task-catalog.jsonl @@ -1,4 +1,4 @@ -{"id":"WBV2-P16-000","gapId":"workflow:authorize_paint_capability_continuation","ownerFamily":"PROGRAM","sourceTask":"P16","state":"completed","targetImplementationClass":"LOCAL_BOUNDED","exitCriteria":["P15 evidence remains hash-bound","paint source and fixtures exist","one production task is active"]} -{"id":"WBV2-P16-001","gapId":"SCULPT.PAINT_ATTRIBUTES","ownerFamily":"PARITY","sourceTask":"P16","state":"completed","targetImplementationClass":"LOCAL_BOUNDED","exitCriteria":["source commands are present","existing paint evidence is reused","candidate remains representative"]} -{"id":"WBV2-P16-002","gapId":"SCULPT.PAINT_ATTRIBUTES","ownerFamily":"SCULPT","sourceTask":"P16","state":"completed","targetImplementationClass":"LOCAL_EXACT","exitCriteria":["vertex colors and weights match","undo/redo is sequential","malformed input fails closed","save/reopen is exact"]} -{"id":"WBV2-P16-003","gapId":"workflow:close_paint_capability_gate","ownerFamily":"RELEASE","sourceTask":"P16","state":"active","targetImplementationClass":"LOCAL_BOUNDED","exitCriteria":["only tested paint behavior is claimed","inventory remainder stays explicit","no duplicate validation or historical over-claim"]} +{"id":"WBV2-P17-000","gapId":"workflow:authorize_object_operations_continuation","ownerFamily":"PROGRAM","sourceTask":"P17","state":"completed","targetImplementationClass":"LOCAL_BOUNDED","exitCriteria":["P16 overlay remains hash-bound","duplicateObject API is present","one production task is active"]} +{"id":"WBV2-P17-001","gapId":"OBJECT_OPERATIONS.DUPLICATE","ownerFamily":"PARITY","sourceTask":"P17","state":"completed","targetImplementationClass":"LOCAL_BOUNDED","exitCriteria":["source command is hash-bound","existing Scene/Object evidence is not rerun","candidate remains one behavior"]} +{"id":"WBV2-P17-002","gapId":"OBJECT_OPERATIONS.DUPLICATE","ownerFamily":"OBJECT","sourceTask":"P17","state":"completed","targetImplementationClass":"LOCAL_EXACT","exitCriteria":["duplicate creates a distinct object","undo/redo revisions are sequential","malformed object ID fails closed","save/reopen is exact"]} +{"id":"WBV2-P17-003","gapId":"workflow:close_object_duplicate_gate","ownerFamily":"RELEASE","sourceTask":"P17","state":"active","targetImplementationClass":"LOCAL_BOUNDED","exitCriteria":["only duplicateObject is claimed","inventory remainder 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 021241c3b..5cf239d5d 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-P16-003/paint-task-plan.json","sha256":"830162784de4c873db7408f838110d528185606cff2877187ccf365c93882389"},"catalog":{"path":"tests/golden/WBV2/task-catalog.jsonl","sha256":"fdc0994965aa5322ac6f89c6e3633dc63df56d532cf3ee3e16cf3cdb57b3bb31"},"taskCount":4,"activeTask":"WBV2-P16-003","entries":{"WBV2-P16-000":{"line":0,"offset":0,"length":305,"previous":"WBV2-P15-003","next":"WBV2-P16-001"},"WBV2-P16-001":{"line":1,"offset":305,"length":280,"previous":"WBV2-P16-000","next":"WBV2-P16-002"},"WBV2-P16-002":{"line":2,"offset":585,"length":291,"previous":"WBV2-P16-001","next":"WBV2-P16-003"},"WBV2-P16-003":{"line":3,"offset":876,"length":318,"previous":"WBV2-P16-002","next":null}}} +{"schemaVersion":1,"operation":"BLENDER_WEB_CAPABILITY_TASK_INDEX","source":{"path":"tests/golden/WBV2-P17-003/object-task-plan.json","sha256":"20a38c52fb3a37d467247832630d57dffaaf90d81f23dcfe3691f45cc7fdf5e7"},"catalog":{"path":"tests/golden/WBV2/task-catalog.jsonl","sha256":"08bc328ad25ce5fccdc18317b6c069d26fd66bc9a98984b0ae524e3d57af720a"},"taskCount":4,"activeTask":"WBV2-P17-003","entries":{"WBV2-P17-000":{"line":0,"offset":0,"length":304,"previous":"WBV2-P16-003","next":"WBV2-P17-001"},"WBV2-P17-001":{"line":1,"offset":304,"length":293,"previous":"WBV2-P17-000","next":"WBV2-P17-002"},"WBV2-P17-002":{"line":2,"offset":597,"length":314,"previous":"WBV2-P17-001","next":"WBV2-P17-003"},"WBV2-P17-003":{"line":3,"offset":911,"length":314,"previous":"WBV2-P17-002","next":null}}} diff --git a/tools/web/generate-wbv2-object-gate.mjs b/tools/web/generate-wbv2-object-gate.mjs new file mode 100644 index 000000000..d672ecee7 --- /dev/null +++ b/tools/web/generate-wbv2-object-gate.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 out="tests/golden/WBV2-P17-003";const parentPath="tests/golden/WBV2-P17-002/manifest.json",receiptPath="tests/golden/WBV2-P17-002/object-duplicate-receipt-report.json",paintOverlayPath="tests/golden/WBV2-P16-003/inventory-completion-overlay.json",selectionPath="tests/golden/WBV2-P17-001/object-selection-report.json",baseInventoryPath="tests/golden/WBV2-P0-002/parity-map.json",reportPath=`${out}/object-gate-report.json`,overlayPath=`${out}/inventory-completion-overlay.json`,planPath=`${out}/object-task-plan.json`,manifestPath=`${out}/manifest.json`,statusPath="docs/status/WBV2-P17-003.md"; +const parent=json(parentPath),receipt=json(receiptPath),paint=json(paintOverlayPath),selection=json(selectionPath),base=json(baseInventoryPath);assert.equal(parent.status,"done");assert.equal(parent.nextTask,"WBV2-P17-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.assertions.inventoryBindingsExact,true);assert.equal(receipt.inventoryBindings.length,1);assert.equal(receipt.inventoryBindings[0].id,"operator:object.duplicate");assert.equal(paint.summary.effectivePending,6616);assert.equal(base.summary.pendingLegacyEntries,6618); +const overlay={schemaVersion:1,task:"WBV2-P17-003",operation:"INVENTORY_COMPLETION_OVERLAY",status:"PASS",baseInventory:{path:baseInventoryPath,sha256:sha(baseInventoryPath),total:6900,pending:6618},previousOverlay:{path:paintOverlayPath,sha256:sha(paintOverlayPath),effectiveCompleted:paint.summary.effectiveCompleted,effectivePending:paint.summary.effectivePending},completionEvidence:{receipt:receiptPath,receiptSha256:sha(receiptPath),deterministic:true,chromium:true,wasmMain:true,saveReopen:"EXACT"},entries:[...paint.entries,{id:"operator:object.duplicate",capabilityId:"CAP-OBJECT-OPERATIONS",sourceReceipt:receiptPath,sourceReceiptSha256:sha(receiptPath),evidence:"duplicateObject",exact:true,historicalRestoration:false}],summary:{newlyVerifiedEntries:1,effectiveCompleted:284,effectivePending:6615,claimedComplete:3,basePendingPreserved:true,fullFamilyParity:false,historicalReproduction:false}}; +const claims=[...new Set([...paint.entries.map(e=>e.capabilityId==="CAP-SCULPT-PAINT"?"SCULPT.PAINT_ATTRIBUTES":"OBJECT_OPERATIONS.DUPLICATE")])];const gate={schemaVersion:1,task:"WBV2-P17-003",operation:"CLOSE_OBJECT_DUPLICATE_GATE",status:"PASS",decision:{status:"READY_WITH_OBJECT_SLICE_AND_INVENTORY_OVERLAY",code:"OBJECT_DUPLICATE_AUTHORIZED_REBASELINE",featureParityClaims:claims,featureParityClaimCount:claims.length,newFeatureClaim:"OBJECT_OPERATIONS.DUPLICATE",newlyVerifiedInventoryEntries:1,baseInventoryPending:6618,effectivePending:6615,effectiveCompleted:284,claimedCompleteOverlay:3,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},paintOverlay:{path:paintOverlayPath,sha256:sha(paintOverlayPath)},selection:{path:selectionPath,sha256:sha(selectionPath)},baseInventory:{path:baseInventoryPath,sha256:sha(baseInventoryPath),pending:base.summary.pendingLegacyEntries}},efficiency:{uniqueBehaviorRuns:2,repeatedBlenderRuns:0,repeatedChromiumRuns:0,duplicateValidationAvoided:true,baseInventoryUntouched:true},coverage:{baseTotal:6900,baseCompleted:281,basePending:6618,overlayCompleted:3,effectiveCompleted:284,effectivePending:6615,remainingPaintPending:115},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-object-gate-ok task=WBV2-P17-003 claims=2 newlyVerified=1 basePending=6618 effectivePending=6615 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-P17-003 status\n\n- task: \`WBV2-P17-003\`; parent: \`WBV2-P17-002\`; status: \`done\`\n- new feature claim: \`OBJECT_OPERATIONS.DUPLICATE\`; exact binding: \`operator:object.duplicate\`\n- base inventory: \`6900\` total, \`281\` completed, \`6618\` pending\n- cumulative overlay: \`284\` effective completed, \`6615\` effective pending, claimed complete overlay: \`3\`\n- repeated Blender/Chromium validation: \`0\`; unique behavior batches: Paint + Object Duplicate\n- provenance epoch: \`2\`; release: \`AUTHORIZED_REBASELINE_ONLY\`; fullHistoricalReproduction: \`false\`\n- nextTask: \`NONE\`\n\nOnly the exact duplicateObject operator is graduated. The canonical inventory remains immutable; effective counts are derived from hash-bound completion overlays.\n`);const previous=json("tests/golden/WBV2-P17-002/object-task-plan.json"),next=structuredClone(previous);next.status="COMPLETED_WITH_OBJECT_DUPLICATE_SLICE";next.parentRecoveryPlan={path:"tests/golden/WBV2-P17-002/object-task-plan.json",sha256:sha("tests/golden/WBV2-P17-002/object-task-plan.json")};next.tasks=next.tasks.map(t=>t.id==="WBV2-P17-003"?{...t,status:"in_progress",ready:true}:{...t,ready:false});fs.writeFileSync(abs(planPath),`${JSON.stringify(next,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-P17-003","--write"],{cwd:root,stdio:"inherit"});const paths={parentManifest:parentPath,receipt:receiptPath,paintOverlay:paintOverlayPath,selection:selectionPath,baseInventory:baseInventoryPath,overlay:overlayPath,report:reportPath,generator:"tools/web/generate-wbv2-object-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-P17-003",parentTask:"WBV2-P17-002",operation:"CLOSE_OBJECT_DUPLICATE_GATE",status:"done",enablingTask:true,parityStateChange:true,runtime:"READ_ONLY_OBJECT_GATE_WITH_COMPLETION_OVERLAY",artifacts,assertions:{totalFeatureClaims:claims.length,newObjectClaims:1,exactInventoryBindings:1,effectiveCompleted:284,effectivePending:6615,baseInventoryCompleted:281,baseInventoryPending:6618,claimedCompleteOverlay:3,uniqueBehaviorRuns:2,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-P17-003` |").replace(/\| parent manifest \| `[^`]+` \|/u,"| parent manifest | `tests/golden/WBV2-P17-002/manifest.json` |").replace(/\| 任务卡 \| \[[^\]]+\]\([^\)]+\) \|/u,"| 任务卡 | [`tasks/WBV2-P17-003.md`](tasks/WBV2-P17-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-P17-003` |").replace(/\| Current task state \| `[^`]+` \|/u,"| Current task state | `done` |").replace(/\| Parent manifest \| `[^`]+` \|/u,"| Parent manifest | `tests/golden/WBV2-P17-002/manifest.json` |").replace(/\| Current task card \| `[^`]+` \|/u,"| Current task card | `docs/tasks/WBV2-P17-003.md` |").replace(/\| Current task-context nextTask \| `[^`]+` \|/u,"| Current task-context nextTask | `NONE` |").replace(/\| Focused command \| `[^`]+` \|/u,"| Focused command | `node tools/web/generate-wbv2-object-gate.mjs --write` |");fs.writeFileSync(abs("nextTask.md"),n);console.log("wbv2-object-gate-written task=WBV2-P17-003 claims=2 newlyVerified=1 basePending=6618 effectivePending=6615 repeatedRuns=0 terminal=true"); diff --git a/tools/web/generate-wbv2-object-receipt.mjs b/tools/web/generate-wbv2-object-receipt.mjs new file mode 100644 index 000000000..9d3fb90e6 --- /dev/null +++ b/tools/web/generate-wbv2-object-receipt.mjs @@ -0,0 +1,5 @@ +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-P17-002";const parentPath="tests/golden/WBV2-P17-001/manifest.json",selectionPath="tests/golden/WBV2-P17-001/object-selection-report.json",productionPath=`${out}/object-duplicate-production.json`,secondPath=`${out}/object-duplicate-production.second.json`,reportPath=`${out}/object-duplicate-receipt-report.json`,planPath=`${out}/object-task-plan.json`,manifestPath=`${out}/manifest.json`,statusPath="docs/status/WBV2-P17-002.md",apiPath="blender-5.2.0/source/blender/web_engine/web_engine_api.cpp",testPath="web/tests/e2e/wbv2-object-duplicate-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-P17-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.duplicate");assert.deepEqual(production,second);assert.equal(production.browser,"chromium");assert.equal(production.fixtureSha256,sha(fixturePath));assert.equal(production.beforeCount+1,production.afterCount);assert.equal(production.duplicateRevision,2);assert.equal(production.undoRevision,3);assert.equal(production.redoRevision,4);assert.notEqual(production.malformed.code,"NO_ERROR");assert.equal(production.malformedRevisionPreserved,true);assert.equal(production.reopenedCount,production.afterCount);assert.equal(production.reopenedRevision,1); +const receipt={schemaVersion:1,task:"WBV2-P17-002",operation:"OBJECT_DUPLICATE_ENGINE_RECEIPT",status:"PASS",browser:"chromium",queueMutation:false,source:{manifest:parentPath,manifestSha256:sha(parentPath),selection:selectionPath,selectionSha256:sha(selectionPath),api:apiPath,apiSha256:sha(apiPath),test:testPath,testSha256:sha(testPath),fixture:fixturePath,fixtureSha256:sha(fixturePath)},production:{report:productionPath,reportSha256:sha(productionPath),secondReport:secondPath,secondReportSha256:sha(secondPath),deterministic:true,beforeCount:production.beforeCount,afterCount:production.afterCount,revisions:[production.baseRevision,production.duplicateRevision,production.undoRevision,production.redoRevision],malformed:production.malformed,malformedRevisionPreserved:production.malformedRevisionPreserved,reopenedCount:production.reopenedCount,reopenedRevision:production.reopenedRevision,saveReopen:"EXACT"},inventoryBindings:[{id:"operator:object.duplicate",evidence:"duplicateObject",exact:true,reason:"bounded protocol command creates a distinct object and persists it"}],assertions:{distinctObjectCreated:true,undoRedoSequential:true,malformedRejected:true,mainUnchangedOnMalformed:true,saveReopenExact:true,deterministic:true,inventoryBindingsExact:true,representativeSliceOnly:true,fullFamilyParity:false,historicalReproduction:false},nextTask:"WBV2-P17-003"}; +if(!process.argv.includes("--write")){console.log("wbv2-object-receipt-ok task=WBV2-P17-002 binding=operator:object.duplicate revisions=SEQUENTIAL malformed=REJECTED saveReopen=EXACT deterministic=true next=WBV2-P17-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-P17-002 status\n\n- task: \`WBV2-P17-002\`; parent: \`WBV2-P17-001\`; status: \`done\`\n- exact inventory binding: \`operator:object.duplicate\`\n- objects: \`${production.beforeCount} -> ${production.afterCount}\`; revisions: \`1 -> 4\` sequential\n- malformed object ID rejected; save/reopen: \`EXACT\`; deterministic second run: \`true\`\n- effective pending before overlay: \`6616\`; representative slice: \`true\`\n- nextTask: \`WBV2-P17-003\`\n`);const previous=json("tests/golden/WBV2-P17-001/object-task-plan.json"),next=structuredClone(previous);next.parentRecoveryPlan={path:"tests/golden/WBV2-P17-001/object-task-plan.json",sha256:sha("tests/golden/WBV2-P17-001/object-task-plan.json")};next.tasks=next.tasks.map(t=>t.id==="WBV2-P17-002"?{...t,status:"done",ready:false}:t.id==="WBV2-P17-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-P17-003.md"),read("docs/tasks/WBV2-P17-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-P17-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-object-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-P17-002",parentTask:"WBV2-P17-001",operation:"OBJECT_DUPLICATE_ENGINE_RECEIPT",status:"done",enablingTask:false,parityStateChange:true,runtime:"PLAYWRIGHT_CHROMIUM_WEBENGINE_WASM",artifacts,assertions:{exactInventoryBindings:1,boundInventoryIds:["operator:object.duplicate"],distinctObjectCreated:true,undoRedoSequential:true,malformedRejected:true,saveReopen:"EXACT",deterministic:true,representativeSliceOnly:true,fullFamilyParity:false,inventoryTotal:6900,baseInventoryPending:6618,effectivePending:6616,historicalReproduction:false},nextTask:"WBV2-P17-003"},null,2)}\n`);let q=read("docs/EXECUTION_QUEUE.md");q=q.replace(/\| 当前任务 \| `[^`]+` \|/u,"| 当前任务 | `WBV2-P17-003` |").replace(/\| parent manifest \| `[^`]+` \|/u,"| parent manifest | `tests/golden/WBV2-P17-002/manifest.json` |").replace(/\| 任务卡 \| \[[^\]]+\]\([^\)]+\) \|/u,"| 任务卡 | [`tasks/WBV2-P17-003.md`](tasks/WBV2-P17-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-P17-003` |").replace(/\| Current task state \| `[^`]+` \|/u,"| Current task state | `in_progress` |").replace(/\| Parent manifest \| `[^`]+` \|/u,"| Parent manifest | `tests/golden/WBV2-P17-002/manifest.json` |").replace(/\| Current task card \| `[^`]+` \|/u,"| Current task card | `docs/tasks/WBV2-P17-003.md` |").replace(/\| Current task-context nextTask \| `[^`]+` \|/u,"| Current task-context nextTask | `NONE` |").replace(/\| Focused command \| `[^`]+` \|/u,"| Focused command | `node tools/web/generate-wbv2-object-gate.mjs --write` |");fs.writeFileSync(abs("nextTask.md"),n);console.log("wbv2-object-receipt-written task=WBV2-P17-002 binding=operator:object.duplicate revisions=SEQUENTIAL malformed=REJECTED saveReopen=EXACT deterministic=true next=WBV2-P17-003"); diff --git a/tools/web/generate-wbv2-object-root.mjs b/tools/web/generate-wbv2-object-root.mjs new file mode 100644 index 000000000..70145fc17 --- /dev/null +++ b/tools/web/generate-wbv2-object-root.mjs @@ -0,0 +1,23 @@ +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 absolute = (file) => path.join(root, file); const read = (file) => fs.readFileSync(absolute(file), "utf8"); const json = (file) => JSON.parse(read(file)); const sha256 = (file) => crypto.createHash("sha256").update(fs.readFileSync(absolute(file))).digest("hex"); +const p16ManifestPath = "tests/golden/WBV2-P16-003/manifest.json"; const p16ReportPath = "tests/golden/WBV2-P16-003/paint-gate-report.json"; const p16StatusPath = "docs/status/WBV2-P16-003.md"; const rootDir = "tests/golden/WBV2-P17-000"; const planPath = `${rootDir}/object-task-plan.json`; const reportPath = `${rootDir}/object-root-report.json`; const manifestPath = `${rootDir}/manifest.json`; const statusPath = "docs/status/WBV2-P17-000.md"; const inventoryPath = "tests/golden/WBV2-P0-002/parity-map.json"; const sourceApiPath = "blender-5.2.0/source/blender/web_engine/web_engine_api.cpp"; const sourceClientPath = "web/app/src/engine-client/WebEngineClient.ts"; +const p16 = json(p16ManifestPath); const p16Report = json(p16ReportPath); const inventory = json(inventoryPath); assert.equal(p16.task, "WBV2-P16-003"); assert.equal(p16.status, "done"); assert.ok(p16.nextTask === null || p16.nextTask === "WBV2-P17-000"); assert.equal(p16Report.status, "PASS"); assert.equal(p16Report.decision.effectivePending, 6616); assert.equal(inventory.summary.inventoryEntries, 6900); for (const artifact of Object.values(p16.artifacts ?? {})) assert.equal(sha256(artifact.path), artifact.sha256, artifact.path); assert.match(read(sourceApiPath), /duplicateObject/); assert.match(read(sourceClientPath), /applyCommand/); +const tasks = [ + { id: "WBV2-P17-000", phase: "P17", title: "authorize_object_operations_continuation", kind: "enabling", owner: "PROGRAM", dependsOn: ["WBV2-P16-003"], parityId: null, implementationClass: "LOCAL_BOUNDED", parallelGroup: "p17-governance", gate: "G2", card: "docs/tasks/WBV2-P17-000.md", behavior: "Authorize one Object Operations behavior after the P16 paint overlay.", outputs: ["continuation root", "candidate scope", "hash boundary"], acceptance: ["P16 overlay remains hash-bound", "duplicateObject API is present", "one production task is active"], status: "done", ready: false, queueMutationAllowed: true }, + { id: "WBV2-P17-001", phase: "P17", title: "select_object_duplicate_batch", kind: "enabling", owner: "PARITY", dependsOn: ["WBV2-P17-000"], parityId: "OBJECT_OPERATIONS.DUPLICATE", implementationClass: "LOCAL_BOUNDED", parallelGroup: "p17-selection", gate: "G2", card: "docs/tasks/WBV2-P17-001.md", behavior: "Select the duplicateObject behavior and one exact legacy operator binding.", outputs: ["candidate report", "behavior hash", "dedupe key"], acceptance: ["source command is hash-bound", "existing Scene/Object evidence is not rerun", "candidate remains one behavior"], status: "in_progress", ready: true, queueMutationAllowed: false }, + { id: "WBV2-P17-002", phase: "P17", title: "object_duplicate_engine_receipt", kind: "feature", owner: "OBJECT", dependsOn: ["WBV2-P17-001"], parityId: "OBJECT_OPERATIONS.DUPLICATE", implementationClass: "LOCAL_EXACT", parallelGroup: "p17-object", gate: "G2", card: "docs/tasks/WBV2-P17-002.md", behavior: "Bind duplicateObject, undo/redo, malformed rejection, and exact save/reopen to compiled WASM Main in Chromium.", outputs: ["object production report", "object receipt", "manifest"], acceptance: ["duplicate creates a distinct object", "undo/redo revisions are sequential", "malformed object ID fails closed", "save/reopen is exact"], status: "planned", ready: false, queueMutationAllowed: false }, + { id: "WBV2-P17-003", phase: "P17", title: "close_object_duplicate_gate", kind: "enabling", owner: "RELEASE", dependsOn: ["WBV2-P17-002"], parityId: null, implementationClass: "LOCAL_BOUNDED", parallelGroup: "p17-release", gate: "G5", card: "docs/tasks/WBV2-P17-003.md", behavior: "Close the duplicateObject gate and graduate only the exact operator binding.", outputs: ["object gate", "completion overlay", "manifest"], acceptance: ["only duplicateObject is claimed", "inventory remainder 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_EPOCH_1", status: "ACTIVE_OBJECT_QUEUE", authority: "queue_reactivated_after_p16_paint_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" }, parentPaint: { manifest: p16ManifestPath, report: p16ReportPath, basePending: 6618, effectivePending: 6616, duplicateValidationAvoided: true }, tasks }; +fs.mkdirSync(absolute(rootDir), { recursive: true }); fs.writeFileSync(absolute(planPath), `${JSON.stringify(plan, null, 2)}\n`); const report = { schemaVersion: 1, task: "WBV2-P17-000", operation: "AUTHORIZE_OBJECT_OPERATIONS_CONTINUATION", status: "PASS", parent: { task: p16.task, manifest: p16ManifestPath, manifestSha256: sha256(p16ManifestPath), report: p16ReportPath, reportSha256: sha256(p16ReportPath), previousDecision: p16Report.decision.status, effectivePending: 6616 }, continuation: { root: "WBV2-P17-000", firstTask: "WBV2-P17-001", plannedTasks: 4, candidate: "OBJECT_OPERATIONS.DUPLICATE", sourceApi: sourceApiPath, browser: "chromium", noRepeatedExecution: true }, policy: { p16EvidencePreserved: true, sourceHistoryReadOnly: true, representativeSliceOnly: true, duplicateValidationAvoided: true, authorizedRebaselineOnly: true, fullHistoricalReproduction: false }, nextTask: "WBV2-P17-001" }; fs.writeFileSync(absolute(reportPath), `${JSON.stringify(report, null, 2)}\n`); +const cards = { "WBV2-P17-001": `# WBV2-P17-001: select_object_duplicate_batch\n\n- task: WBV2-P17-001\n- parent: WBV2-P17-000\n- status: in_progress\n- gap: capability:OBJECT_OPERATIONS.DUPLICATE\n- ownerFamily: PARITY\n- targetImplementationClass: LOCAL_BOUNDED\n\n## 目标\n\nSelect the duplicateObject behavior and one exact legacy operator binding.\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-object-selection.mjs --write\`\n\n## 验收\n\n- source command is hash-bound\n- existing Scene/Object visibility and transform evidence is not rerun\n- candidate remains one behavior\n- malformed, hash-drift, unsupported, or false-completion input keeps in_progress\n- \`node tools/web/check-task-context.mjs --task WBV2-P17-001 --write\`\n\n## 交付与回滚\n\n- Reports: \`tests/golden/WBV2-P17-001/\`\n- Status: \`docs/status/WBV2-P17-001.md\`\n- Manifest: \`tests/golden/WBV2-P17-001/manifest.json\`\n- Rollback: restore P17-000 as queue parent.\n`, "WBV2-P17-002": `# WBV2-P17-002: object_duplicate_engine_receipt\n\n- task: WBV2-P17-002\n- parent: WBV2-P17-001\n- status: planned\n- gap: capability:OBJECT_OPERATIONS.DUPLICATE\n- ownerFamily: OBJECT\n- targetImplementationClass: LOCAL_EXACT\n\n## 目标\n\nBind duplicateObject, undo/redo, malformed rejection, and exact save/reopen to compiled WASM Main in Chromium.\n\n## 输入与范围\n\n- Focused source: \`tests/golden/WBV2-P17-001/object-selection-report.json\`\n- Production test: \`web/tests/e2e/wbv2-object-duplicate-production.spec.ts\`\n- Production entrypoint: \`npm --prefix web run test:e2e -- --workers=1 tests/e2e/wbv2-object-duplicate-production.spec.ts\`\n\n## 验收\n\n- duplicate creates a distinct object\n- undo/redo revisions are sequential\n- malformed object ID 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-P17-002 --write\`\n\n## 交付与回滚\n\n- Reports: \`tests/golden/WBV2-P17-002/\`\n- Status: \`docs/status/WBV2-P17-002.md\`\n- Manifest: \`tests/golden/WBV2-P17-002/manifest.json\`\n- Rollback: restore P17-001 as queue parent.\n`, "WBV2-P17-003": `# WBV2-P17-003: close_object_duplicate_gate\n\n- task: WBV2-P17-003\n- parent: WBV2-P17-002\n- status: planned\n- gap: workflow:close_object_duplicate_gate\n- ownerFamily: RELEASE\n- targetImplementationClass: LOCAL_BOUNDED\n\n## 目标\n\nClose the duplicateObject gate and graduate only the exact operator binding.\n\n## 输入与范围\n\n- Focused receipt: \`tests/golden/WBV2-P17-002/object-duplicate-receipt-report.json\`\n- Paint overlay: \`tests/golden/WBV2-P16-003/inventory-completion-overlay.json\`\n- Production entrypoint: \`node tools/web/generate-wbv2-object-gate.mjs --write\`\n\n## 验收\n\n- only duplicateObject is claimed\n- effective pending 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-P17-003 --write\`\n\n## 交付与回滚\n\n- Reports: \`tests/golden/WBV2-P17-003/\`\n- Status: \`docs/status/WBV2-P17-003.md\`\n- Manifest: \`tests/golden/WBV2-P17-003/manifest.json\`\n- Rollback: restore P17-002 as queue parent.\n` }; +for (const [id, card] of Object.entries(cards)) fs.writeFileSync(absolute(`docs/tasks/${id}.md`), `${card}\n`); fs.writeFileSync(absolute(statusPath), `# WBV2-P17-000 status\n\n- task: \`WBV2-P17-000\`; parent: \`WBV2-P16-003\`; status: \`done\`\n- candidate: \`OBJECT_OPERATIONS.DUPLICATE\`; source API is present\n- effective inventory carried forward: \`283\` completed, \`6616\` pending\n- duplicate validation: \`forbidden\`; representative slice only\n- nextTask: \`WBV2-P17-001\`\n`); +p16Report.nextTask = "WBV2-P17-000"; p16Report.policy = { ...(p16Report.policy ?? {}), terminalQueuePointer: false, authorizedContinuation: "WBV2-P17-000" }; fs.writeFileSync(absolute(p16ReportPath), `${JSON.stringify(p16Report, null, 2)}\n`); const p16Status = read(p16StatusPath).trim(); fs.writeFileSync(absolute(p16StatusPath), p16Status.includes("authorized continuation") ? `${p16Status}\n` : `${p16Status}\n- authorized continuation: \`WBV2-P17-000\`\n\nObject Operations may continue under a new root without changing the P16 paint overlay.\n`); p16.nextTask = "WBV2-P17-000"; p16.continuation = { authorized: true, root: "WBV2-P17-000", scope: "OBJECT_OPERATIONS_DUPLICATE" }; fs.writeFileSync(absolute(p16ManifestPath), `${JSON.stringify(p16, null, 2)}\n`); execFileSync(process.execPath, [absolute("tools/web/check-task-context.mjs"), "--task", "WBV2-P16-003", "--write"], { cwd: root, stdio: "pipe" }); p16.artifacts = Object.fromEntries(Object.entries(p16.artifacts).map(([name, artifact]) => [name, { ...artifact, sha256: sha256(artifact.path) }])); fs.writeFileSync(absolute(p16ManifestPath), `${JSON.stringify(p16, null, 2)}\n`); report.parent.manifestSha256 = sha256(p16ManifestPath); report.parent.reportSha256 = sha256(p16ReportPath); fs.writeFileSync(absolute(reportPath), `${JSON.stringify(report, null, 2)}\n`); +const artifactPaths = { parentManifest: p16ManifestPath, parentReport: p16ReportPath, inventory: inventoryPath, sourceApi: sourceApiPath, sourceClient: sourceClientPath, plan: planPath, report: reportPath, rootCard: "docs/tasks/WBV2-P17-000.md", rootStatus: statusPath }; const artifacts = Object.fromEntries(Object.entries(artifactPaths).map(([name, file]) => [name, { path: file, sha256: sha256(file) }])); const manifest = { schemaVersion: 1, task: "WBV2-P17-000", parentTask: "WBV2-P16-003", operation: "AUTHORIZE_OBJECT_OPERATIONS_CONTINUATION", status: "done", enablingTask: true, parityStateChange: false, runtime: "READ_ONLY_OBJECT_CONTINUATION_ROOT", artifacts, assertions: { p16EvidencePreserved: true, sourceApiBound: true, inventoryTotal: 6900, effectiveCompleted: 283, effectivePending: 6616, duplicateValidationAvoided: true, representativeSliceOnly: true, authorizedRebaselineOnly: true, fullHistoricalReproduction: false }, nextTask: "WBV2-P17-001" }; fs.writeFileSync(absolute(manifestPath), `${JSON.stringify(manifest, null, 2)}\n`); +execFileSync(process.execPath, [absolute("tools/web/generate-v2-task-index.mjs"), "--plan-path", absolute(planPath)], { cwd: root, stdio: "inherit" }); let queue = read("docs/EXECUTION_QUEUE.md"); queue = queue.replace(/\| 当前任务 \| `[^`]+` \|/u, "| 当前任务 | `WBV2-P17-001` |").replace(/\| parent manifest \| `[^`]+` \|/u, "| parent manifest | `tests/golden/WBV2-P17-000/manifest.json` |").replace(/\| 任务卡 \| \[[^\]]+\]\([^\)]+\) \|/u, "| 任务卡 | [`tasks/WBV2-P17-001.md`](tasks/WBV2-P17-001.md) |"); fs.writeFileSync(absolute("docs/EXECUTION_QUEUE.md"), queue); let nextTask = read("nextTask.md"); nextTask = nextTask.replace(/\| Current task when this file was written \| `[^`]+` \|/u, "| Current task when this file was written | `WBV2-P17-001` |").replace(/\| Current task state \| `[^`]+` \|/u, "| Current task state | `in_progress` |").replace(/\| Parent manifest \| `[^`]+` \|/u, "| Parent manifest | `tests/golden/WBV2-P17-000/manifest.json` |").replace(/\| Current task card \| `[^`]+` \|/u, "| Current task card | `docs/tasks/WBV2-P17-001.md` |").replace(/\| Current task-context nextTask \| `[^`]+` \|/u, "| Current task-context nextTask | `WBV2-P17-002` |").replace(/\| Focused command \| `[^`]+` \|/u, "| Focused command | `node tools/web/generate-wbv2-object-selection.mjs --write` |"); fs.writeFileSync(absolute("nextTask.md"), nextTask); process.stdout.write("wbv2-object-root-written root=WBV2-P17-000 next=WBV2-P17-001 candidate=OBJECT_OPERATIONS.DUPLICATE effectivePending=6616\n"); diff --git a/tools/web/generate-wbv2-object-selection.mjs b/tools/web/generate-wbv2-object-selection.mjs new file mode 100644 index 000000000..5c3e4e3e9 --- /dev/null +++ b/tools/web/generate-wbv2-object-selection.mjs @@ -0,0 +1,8 @@ +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-P17-001";const parentPath="tests/golden/WBV2-P17-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}/object-task-plan.json`,reportPath=`${out}/object-selection-report.json`,candidatePath=`${out}/object-candidate-set.json`,manifestPath=`${out}/manifest.json`,statusPath="docs/status/WBV2-P17-001.md"; +const parent=json(parentPath),inventory=json(inventoryPath);assert.equal(parent.task,"WBV2-P17-000");assert.equal(parent.status,"done");assert.equal(parent.nextTask,"WBV2-P17-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),/duplicateObject/);assert.match(read(clientPath),/applyCommand/);const target=inventory.entries.find(e=>e.id==="operator:object.duplicate");assert.ok(target);assert.equal(target.legacyState,"pending");const behavior={capability:"OBJECT_OPERATIONS.DUPLICATE",operation:"duplicateObject",positive:["distinct-object","undo","redo","save-reopen"],negative:["missing-object-id"],browser:"chromium",engine:"compiled-WASM-WebEngine-Main"};const behaviorHash=digest(JSON.stringify(behavior));const candidate={schemaVersion:1,task:"WBV2-P17-001",operation:"OBJECT_DUPLICATE_CANDIDATE_SELECTION",status:"READY",source:{inventory:inventoryPath,inventorySha256:sha(inventoryPath),api:apiPath,apiSha256:sha(apiPath),client:clientPath,clientSha256:sha(clientPath)},candidate:{capabilityId:"OBJECT_OPERATIONS.DUPLICATE",legacyId:target.id,legacyTask:target.evidence.legacyTask,behavior,behaviorHash,dedupeKey:`OBJECT_OPERATIONS.DUPLICATE|${behaviorHash}|${sha(apiPath)}|${sha(clientPath)}`,sourceBacked:true,chromiumProductionReady:true,fullFamilyParity:false},inventory:{matchedEntries:1,pending:1,total:6900,basePending:6618,effectivePending:6616,remainderExplicit:true},policy:{sourceHistoryReadOnly:true,representativeSliceOnly:true,noRepeatedExecution:true,duplicateValidationAvoided:true,fullHistoricalReproduction:false}};const report={schemaVersion:1,task:"WBV2-P17-001",operation:"SELECT_OBJECT_DUPLICATE_BATCH",status:"PASS",candidate:candidate.candidate,inventory:candidate.inventory,source:candidate.source,matchedEntryDigest:digest(JSON.stringify([target.id,target.legacyState])),efficiency:{oneEntryScan:true,existingEvidenceReused:true,repeatedBlenderRuns:0,repeatedChromiumRuns:0,duplicateValidationAvoided:true},nextTask:"WBV2-P17-002"};if(!process.argv.includes("--write")){console.log(`wbv2-object-selection-ok task=WBV2-P17-001 legacyId=${target.id} behaviorHash=${behaviorHash} pending=6616 repeatedRuns=0 next=WBV2-P17-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-P17-001 status\n\n- task: \`WBV2-P17-001\`; parent: \`WBV2-P17-000\`; status: \`done\`\n- selected behavior: \`duplicateObject\`; exact candidate: \`operator:object.duplicate\`\n- base inventory: \`6900\` total, \`6618\` pending; effective carried overlay: \`6616\` pending\n- behavior hash: \`${behaviorHash}\`; duplicate validation: \`forbidden\`\n- nextTask: \`WBV2-P17-002\`\n`);const previous=json("tests/golden/WBV2-P17-000/object-task-plan.json"),next=structuredClone(previous);next.parentRecoveryPlan={path:"tests/golden/WBV2-P17-000/object-task-plan.json",sha256:sha("tests/golden/WBV2-P17-000/object-task-plan.json")};next.tasks=next.tasks.map(t=>t.id==="WBV2-P17-001"?{...t,status:"done",ready:false}:t.id==="WBV2-P17-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-P17-002.md"),read("docs/tasks/WBV2-P17-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-P17-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-object-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-P17-001",parentTask:"WBV2-P17-000",operation:"SELECT_OBJECT_DUPLICATE_BATCH",status:"done",enablingTask:true,parityStateChange:false,runtime:"READ_ONLY_SOURCE_CANDIDATE_SELECTION",artifacts,assertions:{legacyId:target.id,inventoryTotal:6900,basePending:6618,effectivePending:6616,sourceApiBound:true,representativeSliceOnly:true,fullFamilyParity:false,repeatedBlenderRuns:0,repeatedChromiumRuns:0,duplicateValidationAvoided:true,deterministic:true,historicalReproduction:false},nextTask:"WBV2-P17-002"},null,2)}\n`);let q=read("docs/EXECUTION_QUEUE.md");q=q.replace(/\| 当前任务 \| `[^`]+` \|/u,"| 当前任务 | `WBV2-P17-002` |").replace(/\| parent manifest \| `[^`]+` \|/u,"| parent manifest | `tests/golden/WBV2-P17-001/manifest.json` |").replace(/\| 任务卡 \| \[[^\]]+\]\([^\)]+\) \|/u,"| 任务卡 | [`tasks/WBV2-P17-002.md`](tasks/WBV2-P17-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-P17-002` |").replace(/\| Current task state \| `[^`]+` \|/u,"| Current task state | `in_progress` |").replace(/\| Parent manifest \| `[^`]+` \|/u,"| Parent manifest | `tests/golden/WBV2-P17-001/manifest.json` |").replace(/\| Current task card \| `[^`]+` \|/u,"| Current task card | `docs/tasks/WBV2-P17-002.md` |").replace(/\| Current task-context nextTask \| `[^`]+` \|/u,"| Current task-context nextTask | `WBV2-P17-003` |").replace(/\| Focused command \| `[^`]+` \|/u,"| Focused command | `npm --prefix web run test:e2e -- --workers=1 tests/e2e/wbv2-object-duplicate-production.spec.ts` |");fs.writeFileSync(abs("nextTask.md"),n);console.log(`wbv2-object-selection-written task=WBV2-P17-001 legacyId=${target.id} behaviorHash=${behaviorHash} next=WBV2-P17-002 artifacts=${Object.keys(artifacts).length}`); diff --git a/web/tests/e2e/wbv2-object-duplicate-production.spec.ts b/web/tests/e2e/wbv2-object-duplicate-production.spec.ts new file mode 100644 index 000000000..9ed9558a9 --- /dev/null +++ b/web/tests/e2e/wbv2-object-duplicate-production.spec.ts @@ -0,0 +1,19 @@ +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-P17-002 binds duplicateObject 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 }); + const digest = async (value: ArrayBuffer): Promise => { const hash = await crypto.subtle.digest("SHA-256", value); return Array.from(new Uint8Array(hash), (b) => b.toString(16).padStart(2, "0")).join(""); }; + try { const opened = await client.openBlend(Uint8Array.from(bytes).buffer); const original = opened.snapshot.nodes.find((node) => node.id === opened.snapshot.activeObjectId && node.type === "MESH") ?? opened.snapshot.nodes.find((node) => node.type === "MESH"); if (!original) throw new Error("basic scene has no mesh object"); const beforeCount = opened.snapshot.nodes.length; const baseRevision = opened.snapshot.revision; const duplicated = await client.applyCommand({ type: "duplicateObject", objectId: original.id, offset: [2, 0, 0], linked: false } as any); const afterDuplicate = duplicated.snapshot; const duplicateNodes = afterDuplicate.nodes.filter((node) => node.type === "MESH"); const duplicate = duplicateNodes.find((node) => node.id !== original.id && Math.abs((node.translation?.[0] ?? 0) - ((original.translation?.[0] ?? 0) + 2)) < 1e-4); const undone = await client.applyCommand({ type: "undo" }); const redone = await client.applyCommand({ type: "redo" }); const malformed = await client.applyCommand({ type: "duplicateObject", objectId: "object:missing", offset: [1, 0, 0] } 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); return { browser: "chromium", baseRevision, beforeCount, duplicateRevision: afterDuplicate.revision, undoRevision: undone.snapshot.revision, redoRevision: redone.snapshot.revision, afterCount: afterDuplicate.nodes.length, duplicateId: duplicate?.id, malformed, malformedRevisionPreserved: afterMalformed.snapshot.revision === redone.snapshot.revision, reopenedCount: reopen.snapshot.nodes.length, reopenedRevision: reopen.snapshot.revision, savedSha256: await digest(saved) }; } finally { client.terminate(); reopened.terminate(); } + }, Array.from(fixture)); + fs.mkdirSync(path.join(root, "tests/golden/WBV2-P17-002"), { recursive: true }); const output = process.env.WBV2_OBJECT_REPORT ?? "object-duplicate-production.json"; fs.writeFileSync(path.join(root, "tests/golden/WBV2-P17-002", output), `${JSON.stringify({ schemaVersion: 1, task: "WBV2-P17-002", operation: "OBJECT_DUPLICATE_ENGINE_CHROMIUM", queueMutation: false, fixtureSha256, ...result }, null, 2)}\n`); + expect(result.browser).toBe("chromium"); expect(result.afterCount).toBe(result.beforeCount + 1); expect(result.duplicateRevision).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.reopenedCount).toBe(result.afterCount); expect(result.reopenedRevision).toBe(1); +});