Advance deduplicated object creation coverage
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

This commit is contained in:
mes123456
2026-08-28 14:34:52 +08:00
parent 625a960198
commit dc7e2c98c4
40 changed files with 2140 additions and 26 deletions

View File

@@ -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-P18-003",parentPath="tests/golden/WBV2-P18-002/manifest.json",receiptPath="tests/golden/WBV2-P18-002/object-create-receipt-report.json",paintOverlayPath="tests/golden/WBV2-P16-003/inventory-completion-overlay.json",objectOverlayPath="tests/golden/WBV2-P17-003/inventory-completion-overlay.json",selectionPath="tests/golden/WBV2-P18-001/object-create-selection-report.json",basePath="tests/golden/WBV2-P0-002/parity-map.json",reportPath=`${out}/object-create-gate-report.json`,overlayPath=`${out}/inventory-completion-overlay.json`,planPath=`${out}/create-task-plan.json`,manifestPath=`${out}/manifest.json`,statusPath="docs/status/WBV2-P18-003.md";
const parent=json(parentPath),receipt=json(receiptPath),paint=json(paintOverlayPath),object=json(objectOverlayPath),selection=json(selectionPath),base=json(basePath);assert.equal(parent.status,"done");assert.equal(parent.nextTask,"WBV2-P18-003");for(const a of Object.values(parent.artifacts??{}))assert.equal(sha(a.path),a.sha256,a.path);assert.equal(receipt.status,"PASS");assert.equal(receipt.inventoryBindings[0].id,"operator:object.add");assert.equal(selection.status,"PASS");assert.equal(paint.summary.effectivePending,6616);assert.equal(object.summary.effectivePending,6615);assert.equal(base.summary.pendingLegacyEntries,6618);
const entries=[...paint.entries,...object.entries,{id:"operator:object.add",capabilityId:"CAP-OBJECT-OPERATIONS",sourceReceipt:receiptPath,sourceReceiptSha256:sha(receiptPath),evidence:"createPrimitive(CUBE)",exact:true,historicalRestoration:false}];const overlay={schemaVersion:1,task:"WBV2-P18-003",operation:"INVENTORY_COMPLETION_OVERLAY",status:"PASS",baseInventory:{path:basePath,sha256:sha(basePath),total:6900,pending:6618},previousOverlays:[{path:paintOverlayPath,sha256:sha(paintOverlayPath),effectiveCompleted:paint.summary.effectiveCompleted,effectivePending:paint.summary.effectivePending},{path:objectOverlayPath,sha256:sha(objectOverlayPath),effectiveCompleted:object.summary.effectiveCompleted,effectivePending:object.summary.effectivePending}],completionEvidence:{receipt:receiptPath,receiptSha256:sha(receiptPath),deterministic:true,chromium:true,wasmMain:true,saveReopen:"EXACT"},entries,summary:{newlyVerifiedEntries:1,effectiveCompleted:285,effectivePending:6614,claimedComplete:4,basePendingPreserved:true,fullFamilyParity:false,historicalReproduction:false}};const gate={schemaVersion:1,task:"WBV2-P18-003",operation:"CLOSE_OBJECT_CREATE_GATE",status:"PASS",decision:{status:"READY_WITH_OBJECT_CREATE_SLICE_AND_INVENTORY_OVERLAY",code:"OBJECT_CREATE_AUTHORIZED_REBASELINE",featureParityClaims:["SCULPT.PAINT_ATTRIBUTES","OBJECT_OPERATIONS.DUPLICATE","OBJECT_OPERATIONS.CREATE"],featureParityClaimCount:3,newFeatureClaim:"OBJECT_OPERATIONS.CREATE",newlyVerifiedInventoryEntries:1,baseInventoryPending:6618,effectivePending:6614,effectiveCompleted:285,claimedCompleteOverlay:4,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},previousOverlays:[{path:paintOverlayPath,sha256:sha(paintOverlayPath)},{path:objectOverlayPath,sha256:sha(objectOverlayPath)}],selection:{path:selectionPath,sha256:sha(selectionPath)},baseInventory:{path:basePath,sha256:sha(basePath),pending:base.summary.pendingLegacyEntries}},efficiency:{uniqueBehaviorRuns:4,repeatedBlenderRuns:0,repeatedChromiumRuns:0,duplicateValidationAvoided:true,baseInventoryUntouched:true},coverage:{baseTotal:6900,baseCompleted:281,basePending:6618,overlayCompleted:4,effectiveCompleted:285,effectivePending:6614,remainingObjectOperationsPending:314},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-create-gate-ok task=WBV2-P18-003 claims=3 newlyVerified=1 basePending=6618 effectivePending=6614 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-P18-003 status\n\n- task: \`WBV2-P18-003\`; parent: \`WBV2-P18-002\`; status: \`done\`\n- new feature claim: \`OBJECT_OPERATIONS.CREATE\`; exact binding: \`operator:object.add\`\n- base inventory: \`6900\` total, \`281\` completed, \`6618\` pending\n- cumulative overlay: \`285\` effective completed, \`6614\` effective pending, claimed complete overlay: \`4\`\n- repeated Blender/Chromium validation: \`0\`; unique behavior batches: Paint, Object Duplicate, Object Create\n- provenance epoch: \`2\`; release: \`AUTHORIZED_REBASELINE_ONLY\`; fullHistoricalReproduction: \`false\`\n- nextTask: \`NONE\`\n\nOnly the exact createPrimitive operator is graduated. The canonical inventory remains immutable; effective counts are derived from hash-bound completion overlays.\n`);const previous=json("tests/golden/WBV2-P18-002/create-task-plan.json"),next=structuredClone(previous);next.status="COMPLETED_WITH_OBJECT_CREATE_SLICE";next.parentRecoveryPlan={path:"tests/golden/WBV2-P18-002/create-task-plan.json",sha256:sha("tests/golden/WBV2-P18-002/create-task-plan.json")};next.tasks=next.tasks.map(t=>t.id==="WBV2-P18-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-P18-003","--write"],{cwd:root,stdio:"inherit"});const paths={parentManifest:parentPath,receipt:receiptPath,selection:selectionPath,paintOverlay:paintOverlayPath,objectOverlay:objectOverlayPath,baseInventory:basePath,overlay:overlayPath,report:reportPath,generator:"tools/web/generate-wbv2-create-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-P18-003",parentTask:"WBV2-P18-002",operation:"CLOSE_OBJECT_CREATE_GATE",status:"done",enablingTask:true,parityStateChange:true,runtime:"READ_ONLY_OBJECT_CREATE_GATE_WITH_COMPLETION_OVERLAY",artifacts,assertions:{totalFeatureClaims:3,newObjectCreateClaims:1,exactInventoryBindings:1,effectiveCompleted:285,effectivePending:6614,baseInventoryCompleted:281,baseInventoryPending:6618,claimedCompleteOverlay:4,uniqueBehaviorRuns:4,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-P18-003` |").replace(/\| parent manifest \| `[^`]+` \|/u,"| parent manifest | `tests/golden/WBV2-P18-002/manifest.json` |").replace(/\| 任务卡 \| \[[^\]]+\]\([^\)]+\) \|/u,"| 任务卡 | [`tasks/WBV2-P18-003.md`](tasks/WBV2-P18-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-P18-003` |").replace(/\| Current task state \| `[^`]+` \|/u,"| Current task state | `done` |").replace(/\| Parent manifest \| `[^`]+` \|/u,"| Parent manifest | `tests/golden/WBV2-P18-002/manifest.json` |").replace(/\| Current task card \| `[^`]+` \|/u,"| Current task card | `docs/tasks/WBV2-P18-003.md` |").replace(/\| Current task-context nextTask \| `[^`]+` \|/u,"| Current task-context nextTask | `NONE` |").replace(/\| Focused command \| `[^`]+` \|/u,"| Focused command | `node tools/web/generate-wbv2-create-gate.mjs --write` |");fs.writeFileSync(abs("nextTask.md"),n);console.log("wbv2-create-gate-written task=WBV2-P18-003 claims=3 newlyVerified=1 basePending=6618 effectivePending=6614 repeatedRuns=0 terminal=true");

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,12 @@
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 p17Path="tests/golden/WBV2-P17-003/manifest.json",p17ReportPath="tests/golden/WBV2-P17-003/object-gate-report.json",p17StatusPath="docs/status/WBV2-P17-003.md",rootDir="tests/golden/WBV2-P18-000",planPath=`${rootDir}/create-task-plan.json`,reportPath=`${rootDir}/create-root-report.json`,manifestPath=`${rootDir}/manifest.json`,statusPath="docs/status/WBV2-P18-000.md",inventoryPath="tests/golden/WBV2-P0-002/parity-map.json",apiPath="blender-5.2.0/source/blender/web_engine/web_engine_api.cpp",clientPath="web/app/src/engine-client/WebEngineClient.ts";
const p17=json(p17Path),p17Report=json(p17ReportPath),inventory=json(inventoryPath);assert.equal(p17.task,"WBV2-P17-003");assert.equal(p17.status,"done");assert.ok(p17.nextTask===null||p17.nextTask==="WBV2-P18-000");assert.equal(p17Report.status,"PASS");assert.equal(p17Report.decision.effectivePending,6615);assert.equal(inventory.summary.inventoryEntries,6900);for(const a of Object.values(p17.artifacts??{}))assert.equal(sha(a.path),a.sha256,a.path);assert.match(read(apiPath),/createPrimitive/);assert.match(read(clientPath),/applyCommand/);
const tasks=[{id:"WBV2-P18-000",phase:"P18",title:"authorize_object_create_continuation",kind:"enabling",owner:"PROGRAM",dependsOn:["WBV2-P17-003"],parityId:null,implementationClass:"LOCAL_BOUNDED",parallelGroup:"p18-governance",gate:"G2",card:"docs/tasks/WBV2-P18-000.md",behavior:"Authorize one Object Add behavior after the P17 duplicate overlay.",outputs:["continuation root","candidate scope","hash boundary"],acceptance:["P17 overlay remains hash-bound","createPrimitive API is present","one production task is active"],status:"done",ready:false,queueMutationAllowed:true},{id:"WBV2-P18-001",phase:"P18",title:"select_object_create_batch",kind:"enabling",owner:"PARITY",dependsOn:["WBV2-P18-000"],parityId:"OBJECT_OPERATIONS.CREATE",implementationClass:"LOCAL_BOUNDED",parallelGroup:"p18-selection",gate:"G2",card:"docs/tasks/WBV2-P18-001.md",behavior:"Select createPrimitive as one unique Object Add behavior.",outputs:["candidate report","behavior hash","dedupe key"],acceptance:["source command is hash-bound","duplicate/transform evidence is not rerun","one legacy operator binding is selected"],status:"in_progress",ready:true,queueMutationAllowed:false},{id:"WBV2-P18-002",phase:"P18",title:"object_create_engine_receipt",kind:"feature",owner:"OBJECT",dependsOn:["WBV2-P18-001"],parityId:"OBJECT_OPERATIONS.CREATE",implementationClass:"LOCAL_EXACT",parallelGroup:"p18-object",gate:"G2",card:"docs/tasks/WBV2-P18-002.md",behavior:"Bind createPrimitive, undo/redo, malformed rejection, and exact save/reopen to compiled WASM Main in Chromium.",outputs:["create production report","create receipt","manifest"],acceptance:["primitive creates a distinct object","undo/redo revisions are sequential","malformed primitive fails closed","save/reopen is exact"],status:"planned",ready:false,queueMutationAllowed:false},{id:"WBV2-P18-003",phase:"P18",title:"close_object_create_gate",kind:"enabling",owner:"RELEASE",dependsOn:["WBV2-P18-002"],parityId:null,implementationClass:"LOCAL_BOUNDED",parallelGroup:"p18-release",gate:"G5",card:"docs/tasks/WBV2-P18-003.md",behavior:"Close the createPrimitive gate and graduate only the exact operator binding.",outputs:["object create gate","completion overlay","manifest"],acceptance:["only object add is claimed","effective inventory remains explicit","no duplicate validation or historical over-claim"],status:"planned",ready:false,queueMutationAllowed:false}];
const plan={schemaVersion:1,planId:"BLENDER_WEB_PARITY_V2_OBJECT_CREATE_EPOCH_1",status:"ACTIVE_OBJECT_CREATE_QUEUE",authority:"queue_reactivated_after_p17_duplicate_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"},parentObject:{manifest:p17Path,report:p17ReportPath,basePending:6618,effectivePending:6615,duplicateValidationAvoided:true},tasks};fs.mkdirSync(abs(rootDir),{recursive:true});fs.writeFileSync(abs(planPath),`${JSON.stringify(plan,null,2)}\n`);const report={schemaVersion:1,task:"WBV2-P18-000",operation:"AUTHORIZE_OBJECT_CREATE_CONTINUATION",status:"PASS",parent:{task:p17.task,manifest:p17Path,manifestSha256:sha(p17Path),report:p17ReportPath,reportSha256:sha(p17ReportPath),previousDecision:p17Report.decision.status,effectivePending:6615},continuation:{root:"WBV2-P18-000",firstTask:"WBV2-P18-001",plannedTasks:4,candidate:"OBJECT_OPERATIONS.CREATE",sourceApi:apiPath,browser:"chromium",noRepeatedExecution:true},policy:{p17EvidencePreserved:true,sourceHistoryReadOnly:true,representativeSliceOnly:true,duplicateValidationAvoided:true,authorizedRebaselineOnly:true,fullHistoricalReproduction:false},nextTask:"WBV2-P18-001"};fs.writeFileSync(abs(reportPath),`${JSON.stringify(report,null,2)}\n`);
const rootCard="# WBV2-P18-000: object create continuation root\n\n- task: WBV2-P18-000\n- parent: WBV2-P17-003\n- status: done\n- gap: workflow:authorize_object_create_continuation\n- ownerFamily: PROGRAM\n- targetImplementationClass: LOCAL_BOUNDED\n\n## 目标\n\nAuthorize one source-backed Object Add behavior after the P17 duplicate overlay.\n\n## 验收\n\n- `node tools/web/generate-wbv2-create-root.mjs`\n- `node tools/web/check-execution-control-plane.mjs`\n\n## 交付与回滚\n\n- Reports: `tests/golden/WBV2-P18-000/`\n- Manifest: `tests/golden/WBV2-P18-000/manifest.json`\n- Rollback: restore P17-003 as queue parent.\n";fs.writeFileSync(abs("docs/tasks/WBV2-P18-000.md"),rootCard);
fs.writeFileSync(abs("docs/tasks/WBV2-P18-001.md"),"# WBV2-P18-001: select_object_create_batch\n\n- task: WBV2-P18-001\n- parent: WBV2-P18-000\n- status: in_progress\n- gap: capability:OBJECT_OPERATIONS.CREATE\n- ownerFamily: PARITY\n- targetImplementationClass: LOCAL_BOUNDED\n\n## 目标\n\nSelect createPrimitive as one unique Object Add behavior.\n\n## 输入与范围\n\n- Focused source: `blender-5.2.0/source/blender/web_engine/web_engine_api.cpp`\n- Existing client: `web/app/src/engine-client/WebEngineClient.ts`\n- Inventory: `tests/golden/WBV2-P0-002/parity-map.json`\n- Production entrypoint: `node tools/web/generate-wbv2-create-selection.mjs --write`\n\n## 验收\n\n- source command is hash-bound\n- duplicate and transform evidence is not rerun\n- one legacy operator binding is selected\n- malformed, hash-drift, unsupported, or false-completion input keeps in_progress\n- `node tools/web/check-task-context.mjs --task WBV2-P18-001 --write`\n\n## 交付与回滚\n\n- Reports: `tests/golden/WBV2-P18-001/`\n- Status: `docs/status/WBV2-P18-001.md`\n- Manifest: `tests/golden/WBV2-P18-001/manifest.json`\n- Rollback: restore P18-000 as queue parent.\n");
fs.writeFileSync(abs("docs/tasks/WBV2-P18-002.md"),"# WBV2-P18-002: object create engine receipt\n\n- task: WBV2-P18-002\n- parent: WBV2-P18-001\n- status: planned\n- gap: capability:OBJECT_OPERATIONS.CREATE\n- ownerFamily: OBJECT\n- targetImplementationClass: LOCAL_EXACT\n\n## 目标\n\nBind createPrimitive, undo/redo, malformed rejection, and exact save/reopen to compiled WASM Main in Chromium.\n\n## 输入与范围\n\n- Focused source: `tests/golden/WBV2-P18-001/object-create-selection-report.json`\n- Production test: `web/tests/e2e/wbv2-object-create-production.spec.ts`\n- Production entrypoint: `npm --prefix web run test:e2e -- --workers=1 tests/e2e/wbv2-object-create-production.spec.ts`\n\n## 验收\n\n- primitive creates a distinct object\n- undo/redo revisions are sequential\n- malformed primitive fails closed without Main mutation\n- save/reopen is exact and deterministic\n- malformed, hash-drift, unsupported, or false-completion input keeps in_progress\n- `node tools/web/check-task-context.mjs --task WBV2-P18-002 --write`\n\n## 交付与回滚\n\n- Reports: `tests/golden/WBV2-P18-002/`\n- Status: `docs/status/WBV2-P18-002.md`\n- Manifest: `tests/golden/WBV2-P18-002/manifest.json`\n- Rollback: restore P18-001 as queue parent.\n");
fs.writeFileSync(abs("docs/tasks/WBV2-P18-003.md"),"# WBV2-P18-003: close object create gate\n\n- task: WBV2-P18-003\n- parent: WBV2-P18-002\n- status: planned\n- gap: workflow:close_object_create_gate\n- ownerFamily: RELEASE\n- targetImplementationClass: LOCAL_BOUNDED\n\n## 目标\n\nClose the createPrimitive gate and graduate only the exact operator binding.\n\n## 输入与范围\n\n- Focused receipt: `tests/golden/WBV2-P18-002/object-create-receipt-report.json`\n- Previous overlay: `tests/golden/WBV2-P17-003/inventory-completion-overlay.json`\n- Production entrypoint: `node tools/web/generate-wbv2-create-gate.mjs --write`\n\n## 验收\n\n- only object add is claimed\n- effective inventory remains explicit\n- duplicate validation remains zero\n- malformed, hash-drift, unsupported, or false-completion input keeps in_progress\n- historical reproduction remains false\n- `node tools/web/check-task-context.mjs --task WBV2-P18-003 --write`\n\n## 交付与回滚\n\n- Reports: `tests/golden/WBV2-P18-003/`\n- Status: `docs/status/WBV2-P18-003.md`\n- Manifest: `tests/golden/WBV2-P18-003/manifest.json`\n- Rollback: restore P18-002 as queue parent.\n");
fs.writeFileSync(abs(statusPath),"# WBV2-P18-000 status\n\n- task: `WBV2-P18-000`; parent: `WBV2-P17-003`; status: `done`\n- candidate: `OBJECT_OPERATIONS.CREATE`; source API is present\n- effective inventory carried forward: `284` completed, `6615` pending\n- duplicate validation: `forbidden`; representative slice only\n- nextTask: `WBV2-P18-001`\n");
p17Report.nextTask="WBV2-P18-000";p17Report.policy={...(p17Report.policy??{}),terminalQueuePointer:false,authorizedContinuation:"WBV2-P18-000"};fs.writeFileSync(abs(p17ReportPath),`${JSON.stringify(p17Report,null,2)}\n`);const p17Status=read(p17StatusPath).trim();fs.writeFileSync(abs(p17StatusPath),p17Status.includes("authorized continuation")?`${p17Status}\n`:`${p17Status}\n- authorized continuation: \`WBV2-P18-000\`\n\nObject Add may continue under a new root without changing the P17 overlay.\n`);p17.nextTask="WBV2-P18-000";p17.continuation={authorized:true,root:"WBV2-P18-000",scope:"OBJECT_OPERATIONS_CREATE"};fs.writeFileSync(abs(p17Path),`${JSON.stringify(p17,null,2)}\n`);execFileSync(process.execPath,[abs("tools/web/check-task-context.mjs"),"--task","WBV2-P17-003","--write"],{cwd:root,stdio:"pipe"});p17.artifacts=Object.fromEntries(Object.entries(p17.artifacts).map(([n,a])=>[n,{...a,sha256:sha(a.path)}]));fs.writeFileSync(abs(p17Path),`${JSON.stringify(p17,null,2)}\n`);report.parent.manifestSha256=sha(p17Path);report.parent.reportSha256=sha(p17ReportPath);fs.writeFileSync(abs(reportPath),`${JSON.stringify(report,null,2)}\n`);
const paths={parentManifest:p17Path,parentReport:p17ReportPath,inventory:inventoryPath,sourceApi:apiPath,sourceClient:clientPath,plan:planPath,report:reportPath,rootCard:"docs/tasks/WBV2-P18-000.md",rootStatus:statusPath};const artifacts=Object.fromEntries(Object.entries(paths).map(([n,f])=>[n,{path:f,sha256:sha(f)}]));fs.writeFileSync(abs(manifestPath),`${JSON.stringify({schemaVersion:1,task:"WBV2-P18-000",parentTask:"WBV2-P17-003",operation:"AUTHORIZE_OBJECT_CREATE_CONTINUATION",status:"done",enablingTask:true,parityStateChange:false,runtime:"READ_ONLY_OBJECT_CREATE_CONTINUATION_ROOT",artifacts,assertions:{p17EvidencePreserved:true,sourceApiBound:true,inventoryTotal:6900,effectiveCompleted:284,effectivePending:6615,duplicateValidationAvoided:true,representativeSliceOnly:true,authorizedRebaselineOnly:true,fullHistoricalReproduction:false},nextTask:"WBV2-P18-001"},null,2)}\n`);execFileSync(process.execPath,[abs("tools/web/generate-v2-task-index.mjs"),"--plan-path",abs(planPath)],{cwd:root,stdio:"inherit"});let q=read("docs/EXECUTION_QUEUE.md");q=q.replace(/\| 当前任务 \| `[^`]+` \|/u,"| 当前任务 | `WBV2-P18-001` |").replace(/\| parent manifest \| `[^`]+` \|/u,"| parent manifest | `tests/golden/WBV2-P18-000/manifest.json` |").replace(/\| 任务卡 \| \[[^\]]+\]\([^\)]+\) \|/u,"| 任务卡 | [`tasks/WBV2-P18-001.md`](tasks/WBV2-P18-001.md) |");fs.writeFileSync(abs("docs/EXECUTION_QUEUE.md"),q);let n=read("nextTask.md");n=n.replace(/\| Current task when this file was written \| `[^`]+` \|/u,"| Current task when this file was written | `WBV2-P18-001` |").replace(/\| Current task state \| `[^`]+` \|/u,"| Current task state | `in_progress` |").replace(/\| Parent manifest \| `[^`]+` \|/u,"| Parent manifest | `tests/golden/WBV2-P18-000/manifest.json` |").replace(/\| Current task card \| `[^`]+` \|/u,"| Current task card | `docs/tasks/WBV2-P18-001.md` |").replace(/\| Current task-context nextTask \| `[^`]+` \|/u,"| Current task-context nextTask | `WBV2-P18-002` |").replace(/\| Focused command \| `[^`]+` \|/u,"| Focused command | `node tools/web/generate-wbv2-create-selection.mjs --write` |");fs.writeFileSync(abs("nextTask.md"),n);console.log("wbv2-create-root-written root=WBV2-P18-000 next=WBV2-P18-001 candidate=OBJECT_OPERATIONS.CREATE effectivePending=6615");

File diff suppressed because one or more lines are too long