Advance deduplicated lighting capability 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 12:19:18 +08:00
parent dc55bacce6
commit 4a5c70910b
35 changed files with 4601 additions and 12 deletions

View File

@@ -0,0 +1,41 @@
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 write = process.argv.includes("--write");
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 outputRoot = "tests/golden/WBV2-P15-003";
const reportPath = `${outputRoot}/lighting-gate-report.json`;
const statusPath = "docs/status/WBV2-P15-003.md";
const planPath = `${outputRoot}/lights-task-plan.json`;
const manifestPath = `${outputRoot}/manifest.json`;
const parentPath = "tests/golden/WBV2-P15-002/manifest.json";
const receiptPath = "tests/golden/WBV2-P15-002/lighting-fields-receipt-report.json";
const selectionPath = "tests/golden/WBV2-P15-001/lighting-selection-report.json";
const coverageMatrixPath = "tests/golden/WBV2-P14-002/capability-evidence-matrix.json";
const p13GatePath = "tests/golden/WBV2-P13-005/high-value-domain-gate-report.json";
const approvalPath = "docs/status/M12-PROVENANCE-EPOCH-2-APPROVAL.json";
const parent = json(parentPath); const receipt = json(receiptPath); const selection = json(selectionPath); const coverage = json(coverageMatrixPath); const p13 = json(p13GatePath); const approval = json(approvalPath);
assert.equal(parent.task, "WBV2-P15-002"); assert.equal(parent.status, "done"); assert.equal(parent.nextTask, "WBV2-P15-003");
for (const artifact of Object.values(parent.artifacts ?? {})) assert.equal(sha256(artifact.path), artifact.sha256, artifact.path);
assert.equal(receipt.status, "PASS"); assert.equal(receipt.browser, "chromium"); assert.equal(receipt.assertions.saveReopenExact, true); assert.equal(receipt.assertions.deterministic, true); assert.equal(receipt.assertions.representativeSliceOnly, true); assert.equal(receipt.assertions.fullFamilyParity, false);
assert.equal(selection.status, "PASS"); assert.equal(selection.candidate.capabilityId, "RENDER.LIGHTING_FIELDS"); assert.equal(selection.inventory.matchedEntries, 197); assert.equal(coverage.inventory.pending, 6618); assert.equal(p13.decision.fullHistoricalReproduction, false); assert.equal(approval.limitations.releaseLabel, "AUTHORIZED_REBASELINE_ONLY");
const claims = [...p13.decision.featureParityClaims, "RENDER.LIGHTING_FIELDS"];
assert.equal(new Set(claims).size, p13.decision.featureParityClaimCount + 1);
const gate = { schemaVersion: 1, task: "WBV2-P15-003", operation: "CLOSE_LIGHTING_CAPABILITY_GATE", status: "PASS", decision: { status: "READY_WITH_LIGHTING_SLICE_PARITY", code: "LIGHTING_FIELDS_AUTHORIZED_REBASELINE", featureParityClaims: claims, featureParityClaimCount: claims.length, newClaim: "RENDER.LIGHTING_FIELDS", representativeInventoryEntries: selection.inventory.matchedEntries, fullFamilyParity: false, engineBound: true, browser: "chromium", provenanceEpoch: approval.epoch, releaseScope: approval.limitations.releaseLabel, fullHistoricalReproduction: false, inventoryTotal: 6900, inventoryPending: 6618, inventoryClaimedComplete: 0 }, evidence: { receipt: { path: receiptPath, sha256: sha256(receiptPath), manifest: parentPath, manifestSha256: sha256(parentPath), operations: receipt.production.operations, saveReopen: receipt.production.saveReopen, deterministic: receipt.production.deterministic }, selection: { path: selectionPath, sha256: sha256(selectionPath), behaviorHash: selection.candidate.behaviorHash, matchedEntries: selection.inventory.matchedEntries }, coverageMatrix: { path: coverageMatrixPath, sha256: sha256(coverageMatrixPath), buckets: coverage.inventory.buckets, pending: coverage.inventory.pending }, p13Gate: { path: p13GatePath, sha256: sha256(p13GatePath), previousClaims: p13.decision.featureParityClaimCount }, approval: { path: approvalPath, sha256: sha256(approvalPath), epoch: approval.epoch, releaseScope: approval.limitations.releaseLabel } }, efficiency: { sourceCandidateScanReused: true, coverageLedgerReused: true, uniqueBehaviorRuns: 2, repeatedBlenderRuns: 0, repeatedChromiumRuns: 0, duplicateValidationAvoided: true, inventoryTasksCreated: 0 }, coverage: { inventoryTotal: 6900, inventoryPending: 6618, inventoryClaimedComplete: 0, capabilityBuckets: coverage.inventory.buckets, lightingRepresentativeEntries: selection.inventory.matchedEntries, lightingFeatureClaims: 1, fullFamilyClaims: 0 }, negative: { missingReceipt: "REJECTED", receiptHashDrift: "REJECTED", unsupportedBrowser: "REJECTED", nonExactSaveReopen: "REJECTED", malformedLightingValues: receipt.production.malformed.code, falseInventoryCompletion: "REJECTED", falseHistoricalReproduction: "REJECTED", representativeAsFullFamily: "REJECTED" }, policy: { sourceHistoryReadOnly: true, authorizedRebaselineOnly: true, representativeSliceOnly: true, inventoryRemainderExplicit: true, noFalseLocalParity: true, terminalQueuePointer: true }, nextTask: null };
if (!write) { process.stdout.write(`wbv2-lighting-gate-ok task=WBV2-P15-003 claims=${claims.length} newClaim=RENDER.LIGHTING_FIELDS representative=197 pending=6618 repeatedRuns=0 terminal=true\n`); process.exit(0); }
fs.mkdirSync(absolute(outputRoot), { recursive: true }); fs.writeFileSync(absolute(reportPath), `${JSON.stringify(gate, null, 2)}\n`); fs.writeFileSync(absolute(statusPath), `# WBV2-P15-003 status\n\n- task: \`WBV2-P15-003\`; parent: \`WBV2-P15-002\`; status: \`done\`\n- new engine-bound claim: \`RENDER.LIGHTING_FIELDS\`; representative entries: \`197\`; full-family parity: \`false\`\n- total engine-bound feature claims: \`${claims.length}\`; inventory: \`6900\` total, \`6618\` pending, claimed complete: \`0\`\n- unique behavior runs: \`2\`; repeated Blender/Chromium validation: \`0\`; duplicate validation avoided: \`true\`\n- provenance epoch: \`${approval.epoch}\`; release: \`AUTHORIZED_REBASELINE_ONLY\`; fullHistoricalReproduction: \`false\`\n- nextTask: \`NONE\`\n\nThe Lighting/Camera/World slice is now a hash-bound Chromium/WASM Main feature claim. The 197 matched inventory entries are coverage references only; remaining lighting/render behaviors require unique behavior evidence.\n`);
const previousPlan = json("tests/golden/WBV2-P15-002/lights-task-plan.json"); const nextPlan = structuredClone(previousPlan); nextPlan.status = "COMPLETED_WITH_LIGHTING_SLICE"; nextPlan.parentRecoveryPlan = { path: "tests/golden/WBV2-P15-002/lights-task-plan.json", sha256: sha256("tests/golden/WBV2-P15-002/lights-task-plan.json") }; nextPlan.tasks = nextPlan.tasks.map((task) => task.id === "WBV2-P15-003" ? { ...task, status: "in_progress", ready: true } : { ...task, ready: false }); fs.writeFileSync(absolute(planPath), `${JSON.stringify(nextPlan, null, 2)}\n`);
fs.writeFileSync(absolute("docs/tasks/WBV2-P15-003.md"), read("docs/tasks/WBV2-P15-003.md").replace("- status: planned", "- status: done")); execFileSync(process.execPath, [absolute("tools/web/generate-v2-task-index.mjs"), "--plan-path", absolute(planPath)], { cwd: root, stdio: "inherit" }); execFileSync(process.execPath, [absolute("tools/web/check-task-context.mjs"), "--task", "WBV2-P15-003", "--write"], { cwd: root, stdio: "inherit" });
const artifactPaths = { parentManifest: parentPath, receipt: receiptPath, selection: selectionPath, coverageMatrix: coverageMatrixPath, p13Gate: p13GatePath, approval: approvalPath, report: reportPath, generator: "tools/web/generate-wbv2-lighting-gate.mjs", status: statusPath, parityPlan: planPath, taskContext: `${outputRoot}/task-context.json` }; const artifacts = Object.fromEntries(Object.entries(artifactPaths).map(([name, file]) => [name, { path: file, sha256: sha256(file) }])); const manifest = { schemaVersion: 1, task: "WBV2-P15-003", parentTask: "WBV2-P15-002", operation: "CLOSE_LIGHTING_CAPABILITY_GATE", status: "done", enablingTask: true, parityStateChange: true, runtime: "READ_ONLY_LIGHTING_GATE", artifacts, assertions: { totalFeatureClaims: claims.length, newLightingClaims: 1, representativeInventoryEntries: 197, fullFamilyParityClaims: 0, inventoryTotal: 6900, inventoryPending: 6618, inventoryClaimedComplete: 0, uniqueBehaviorRuns: 2, repeatedBlenderRuns: 0, repeatedChromiumRuns: 0, duplicateValidationAvoided: true, provenanceEpoch: approval.epoch, authorizedRebaselineOnly: true, fullHistoricalReproduction: false, deterministic: true }, nextTask: null }; fs.writeFileSync(absolute(manifestPath), `${JSON.stringify(manifest, null, 2)}\n`);
let queue = read("docs/EXECUTION_QUEUE.md"); queue = queue.replace(/\| 当前任务 \| `[^`]+` \|/u, "| 当前任务 | `WBV2-P15-003` |").replace(/\| parent manifest \| `[^`]+` \|/u, "| parent manifest | `tests/golden/WBV2-P15-002/manifest.json` |").replace(/\| 任务卡 \| \[[^\]]+\]\([^\)]+\) \|/u, "| 任务卡 | [`tasks/WBV2-P15-003.md`](tasks/WBV2-P15-003.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-P15-003` |").replace(/\| Current task state \| `[^`]+` \|/u, "| Current task state | `done` |").replace(/\| Parent manifest \| `[^`]+` \|/u, "| Parent manifest | `tests/golden/WBV2-P15-002/manifest.json` |").replace(/\| Current task card \| `[^`]+` \|/u, "| Current task card | `docs/tasks/WBV2-P15-003.md` |").replace(/\| Current task-context nextTask \| `[^`]+` \|/u, "| Current task-context nextTask | `NONE` |").replace(/\| Focused command \| `[^`]+` \|/u, "| Focused command | `node tools/web/generate-wbv2-lighting-gate.mjs --write` |"); fs.writeFileSync(absolute("nextTask.md"), nextTask);
process.stdout.write(`wbv2-lighting-gate-written task=WBV2-P15-003 claims=${claims.length} newClaim=RENDER.LIGHTING_FIELDS representative=197 pending=6618 repeatedRuns=0 terminal=true artifacts=${Object.keys(artifacts).length}\n`);

View File

@@ -0,0 +1,49 @@
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 write = process.argv.includes("--write");
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 outputRoot = "tests/golden/WBV2-P15-002";
const productionPath = `${outputRoot}/lighting-fields-production.json`;
const secondProductionPath = `${outputRoot}/lighting-fields-production.second.json`;
const reportPath = `${outputRoot}/lighting-fields-receipt-report.json`;
const statusPath = "docs/status/WBV2-P15-002.md";
const planPath = `${outputRoot}/lights-task-plan.json`;
const manifestPath = `${outputRoot}/manifest.json`;
const parentPath = "tests/golden/WBV2-P15-001/manifest.json";
const selectionPath = "tests/golden/WBV2-P15-001/lighting-selection-report.json";
const sourceTestPath = "web/tests/e2e/wbv2-lighting-fields-production.spec.ts";
const sourceApiPath = "blender-5.2.0/source/blender/web_engine/web_engine_api.cpp";
const fixturePath = "tests/files/web/basic_scene.blend";
const expectedPath = "tests/golden/M11-02/lighting-field-roundtrip.json";
const parent = json(parentPath); const selection = json(selectionPath); const production = json(productionPath); const second = json(secondProductionPath);
assert.equal(parent.task, "WBV2-P15-001"); assert.equal(parent.status, "done"); assert.equal(parent.nextTask, "WBV2-P15-002");
for (const artifact of Object.values(parent.artifacts ?? {})) assert.equal(sha256(artifact.path), artifact.sha256, artifact.path);
assert.equal(selection.status, "PASS"); assert.equal(selection.candidate.capabilityId, "RENDER.LIGHTING_FIELDS"); assert.equal(selection.candidate.fullFamilyParity, false);
assert.equal(production.task, "WBV2-P15-002"); assert.equal(production.browser, "chromium"); assert.equal(production.queueMutation, false); assert.equal(production.sourceSha256, sha256(fixturePath));
assert.deepEqual(production, second);
assert.equal(production.revisions.length, 10); assert.deepEqual(production.revisions, production.revisions.map((_, index) => production.beforeRevision + index));
assert.equal(production.malformed.code, "RENDER_PROPERTY_INVALID"); assert.equal(production.malformedRevisionPreserved, true); assert.equal(production.reopenedRevision, 1);
for (const field of ["lensMm", "sensorWidthMm", "sensorHeightMm", "sensorFit", "near", "far", "orthoScale"]) assert.ok(field in production.camera, `camera field missing: ${field}`);
for (const field of ["color", "energy", "exposure", "temperature", "castsShadow", "radius", "spotAngle", "spotBlend", "areaSize", "areaSizeY"]) assert.ok(field in production.light, `light field missing: ${field}`);
assert.equal(production.world.mist.type, "LINEAR"); assert.equal(production.world.mist.enabled, true);
const receipt = { schemaVersion: 1, task: "WBV2-P15-002", operation: "LIGHTING_FIELDS_ENGINE_RECEIPT", status: "PASS", browser: "chromium", queueMutation: false, source: { task: "WBV2-P15-001", manifest: parentPath, manifestSha256: sha256(parentPath), selection: selectionPath, selectionSha256: sha256(selectionPath), fixture: fixturePath, fixtureSha256: sha256(fixturePath), expected: expectedPath, expectedSha256: sha256(expectedPath), api: sourceApiPath, apiSha256: sha256(sourceApiPath) }, production: { report: productionPath, reportSha256: sha256(productionPath), secondReport: secondProductionPath, secondReportSha256: sha256(secondProductionPath), deterministic: true, operations: ["setCameraProperties", "setLightProperties", "setWorldProperties"], revisions: production.revisions, camera: production.camera, light: production.light, world: production.world, malformed: production.malformed, malformedRevisionPreserved: production.malformedRevisionPreserved, saveReopen: "EXACT", reopenedRevision: production.reopenedRevision }, assertions: { cameraFieldsBound: true, lightFieldsBound: true, worldFieldsBound: true, undoRedoSequential: true, malformedRejected: true, mainUnchangedOnMalformed: true, saveReopenExact: true, deterministic: true, representativeSliceOnly: true, fullFamilyParity: false, historicalReproduction: false } , nextTask: "WBV2-P15-003" };
if (!write) { process.stdout.write(`wbv2-lighting-receipt-ok task=WBV2-P15-002 operations=3 revisions=SEQUENTIAL malformed=REJECTED saveReopen=EXACT deterministic=true next=WBV2-P15-003\n`); process.exit(0); }
fs.mkdirSync(absolute(outputRoot), { recursive: true }); fs.writeFileSync(absolute(reportPath), `${JSON.stringify(receipt, null, 2)}\n`);
fs.writeFileSync(absolute(statusPath), `# WBV2-P15-002 status\n\n- task: \`WBV2-P15-002\`; parent: \`WBV2-P15-001\`; status: \`done\`\n- Chromium/WASM Main operations: Camera, Light, World fields\n- revisions: \`1 -> 10\` sequential across edit/undo/redo actions\n- malformed camera range: \`RENDER_PROPERTY_INVALID\`; Main revision preserved\n- save/reopen: \`EXACT\`; deterministic second run: \`true\`\n- representative slice: \`true\`; full-family parity: \`false\`; inventory pending: \`6618\`\n- nextTask: \`WBV2-P15-003\`\n\nThe compiled WebEngine WASM Main now has a hash-bound Chromium receipt for bounded Camera/Light/World field edits. The receipt covers only the selected behavior hash and does not close the remaining lighting/render inventory.\n`);
const previousPlan = json("tests/golden/WBV2-P15-001/lights-task-plan.json"); const nextPlan = structuredClone(previousPlan); nextPlan.parentRecoveryPlan = { path: "tests/golden/WBV2-P15-001/lights-task-plan.json", sha256: sha256("tests/golden/WBV2-P15-001/lights-task-plan.json") }; nextPlan.tasks = nextPlan.tasks.map((task) => task.id === "WBV2-P15-002" ? { ...task, status: "done", ready: false } : task.id === "WBV2-P15-003" ? { ...task, status: "in_progress", ready: true } : { ...task, ready: false }); fs.writeFileSync(absolute(planPath), `${JSON.stringify(nextPlan, null, 2)}\n`);
fs.writeFileSync(absolute("docs/tasks/WBV2-P15-003.md"), read("docs/tasks/WBV2-P15-003.md").replace("- status: planned", "- status: in_progress")); execFileSync(process.execPath, [absolute("tools/web/generate-v2-task-index.mjs"), "--plan-path", absolute(planPath)], { cwd: root, stdio: "inherit" }); execFileSync(process.execPath, [absolute("tools/web/check-task-context.mjs"), "--task", "WBV2-P15-002", "--write"], { cwd: root, stdio: "inherit" });
const artifactPaths = { parentManifest: parentPath, selection: selectionPath, fixture: fixturePath, expected: expectedPath, sourceApi: sourceApiPath, sourceTest: sourceTestPath, production: productionPath, productionSecond: secondProductionPath, report: reportPath, generator: "tools/web/generate-wbv2-lighting-receipt.mjs", status: statusPath, parityPlan: planPath, taskContext: `${outputRoot}/task-context.json` }; const artifacts = Object.fromEntries(Object.entries(artifactPaths).map(([name, file]) => [name, { path: file, sha256: sha256(file) }])); const manifest = { schemaVersion: 1, task: "WBV2-P15-002", parentTask: "WBV2-P15-001", operation: "LIGHTING_FIELDS_ENGINE_RECEIPT", status: "done", enablingTask: false, parityStateChange: true, runtime: "PLAYWRIGHT_CHROMIUM_WEBENGINE_WASM", artifacts, assertions: { operations: 3, cameraFieldsBound: true, lightFieldsBound: true, worldFieldsBound: true, undoRedoSequential: true, malformedRejected: true, malformedMainMutation: false, saveReopen: "EXACT", deterministic: true, representativeSliceOnly: true, fullFamilyParity: false, inventoryTotal: 6900, inventoryPending: 6618, historicalReproduction: false }, nextTask: "WBV2-P15-003" }; fs.writeFileSync(absolute(manifestPath), `${JSON.stringify(manifest, null, 2)}\n`);
let queue = read("docs/EXECUTION_QUEUE.md"); queue = queue.replace(/\| 当前任务 \| `[^`]+` \|/u, "| 当前任务 | `WBV2-P15-003` |").replace(/\| parent manifest \| `[^`]+` \|/u, "| parent manifest | `tests/golden/WBV2-P15-002/manifest.json` |").replace(/\| 任务卡 \| \[[^\]]+\]\([^\)]+\) \|/u, "| 任务卡 | [`tasks/WBV2-P15-003.md`](tasks/WBV2-P15-003.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-P15-003` |").replace(/\| Current task state \| `[^`]+` \|/u, "| Current task state | `in_progress` |").replace(/\| Parent manifest \| `[^`]+` \|/u, "| Parent manifest | `tests/golden/WBV2-P15-002/manifest.json` |").replace(/\| Current task card \| `[^`]+` \|/u, "| Current task card | `docs/tasks/WBV2-P15-003.md` |").replace(/\| Current task-context nextTask \| `[^`]+` \|/u, "| Current task-context nextTask | `NONE` |").replace(/\| Focused command \| `[^`]+` \|/u, "| Focused command | `node tools/web/generate-wbv2-lighting-gate.mjs --write` |"); fs.writeFileSync(absolute("nextTask.md"), nextTask);
process.stdout.write(`wbv2-lighting-receipt-written task=WBV2-P15-002 operations=3 revisions=SEQUENTIAL malformed=REJECTED saveReopen=EXACT deterministic=true next=WBV2-P15-003 artifacts=${Object.keys(artifacts).length}\n`);

View File

@@ -0,0 +1,53 @@
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 write = process.argv.includes("--write");
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 digestText = (value) => crypto.createHash("sha256").update(value).digest("hex");
const outputRoot = "tests/golden/WBV2-P15-001";
const reportPath = `${outputRoot}/lighting-selection-report.json`;
const candidatePath = `${outputRoot}/lighting-candidate-set.json`;
const statusPath = "docs/status/WBV2-P15-001.md";
const planPath = `${outputRoot}/lights-task-plan.json`;
const manifestPath = `${outputRoot}/manifest.json`;
const parentPath = "tests/golden/WBV2-P15-000/manifest.json";
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 sourceTestPath = "web/tests/e2e/lighting-field-roundtrip.spec.ts";
const sourceGoldenPath = "tests/golden/M11-02/lighting-field-roundtrip.json";
const p14StrategyPath = "tests/golden/WBV2-P14-003/batch-execution-strategy.json";
const parent = json(parentPath); const inventory = json(inventoryPath);
assert.equal(parent.task, "WBV2-P15-000"); assert.equal(parent.status, "done"); assert.equal(parent.nextTask, "WBV2-P15-001");
for (const artifact of Object.values(parent.artifacts ?? {})) assert.equal(sha256(artifact.path), artifact.sha256, artifact.path);
assert.equal(inventory.summary.inventoryEntries, 6900); assert.equal(inventory.summary.pendingLegacyEntries, 6618);
const apiSource = read(sourceApiPath); const testSource = read(sourceTestPath); const golden = json(sourceGoldenPath); const strategy = json(p14StrategyPath);
assert.match(apiSource, /setCameraProperties/); assert.match(apiSource, /setLightProperties/); assert.match(apiSource, /setWorldProperties/);
assert.match(testSource, /setCameraProperties/); assert.match(testSource, /setLightProperties/); assert.match(testSource, /setWorldProperties/);
assert.equal(strategy.policy.browser, "chromium"); assert.equal(strategy.policy.fanoutOnlyOnUniqueBehavior, true); assert.equal(strategy.policy.noFirefoxOrWebkit, true);
const matcher = /(camera|light|world|render)/iu;
const candidates = inventory.entries.filter((entry) => matcher.test(`${entry.id} ${entry.family} ${entry.ownerFamily} ${entry.sourceTask}`)).map((entry) => ({ id: entry.id, kind: entry.kind, capabilityId: entry.capabilityId, family: entry.family, ownerFamily: entry.ownerFamily, sourceTask: entry.sourceTask, legacyState: entry.legacyState, state: entry.state, targetImplementationClass: entry.targetImplementationClass }));
assert(candidates.length > 0);
const counts = candidates.reduce((acc, entry) => { acc[entry.legacyState] = (acc[entry.legacyState] ?? 0) + 1; return acc; }, {});
const behavior = { capability: "RENDER.LIGHTING_FIELDS", operations: ["setCameraProperties", "setLightProperties", "setWorldProperties"], positive: ["field-edit", "undo", "redo", "save-reopen"], negative: ["invalid-camera-range", "missing-data-id"], browser: "chromium", engine: "compiled-WASM-WebEngine-Main", sourceGolden: golden.fixture ?? "M11-02/lighting-field-roundtrip.json" };
const behaviorHash = digestText(JSON.stringify(behavior));
const candidate = { schemaVersion: 1, task: "WBV2-P15-001", operation: "LIGHTING_CAPABILITY_CANDIDATE_SELECTION", status: "READY", source: { inventory: inventoryPath, inventorySha256: sha256(inventoryPath), api: sourceApiPath, apiSha256: sha256(sourceApiPath), test: sourceTestPath, testSha256: sha256(sourceTestPath), golden: sourceGoldenPath, goldenSha256: sha256(sourceGoldenPath), strategy: p14StrategyPath, strategySha256: sha256(p14StrategyPath) }, candidate: { capabilityId: "RENDER.LIGHTING_FIELDS", representativeBehavior: behavior, behaviorHash, dedupeKey: `RENDER.LIGHTING_FIELDS|${behaviorHash}|${sha256(sourceApiPath)}|${sha256(sourceTestPath)}`, sourceBacked: true, chromiumProductionReady: true, fullFamilyParity: false }, inventory: { matchedEntries: candidates.length, counts, total: inventory.summary.inventoryEntries, pending: inventory.summary.pendingLegacyEntries, remainderExplicit: true }, entries: candidates, policy: { sourceHistoryReadOnly: true, representativeSliceOnly: true, noRepeatedExecution: true, duplicateValidationAvoided: true, fullHistoricalReproduction: false } };
const report = { schemaVersion: 1, task: "WBV2-P15-001", operation: "SELECT_LIGHTING_CAPABILITY_BATCH", status: "PASS", candidate: candidate.candidate, inventory: candidate.inventory, source: candidate.source, matchedEntryDigest: digestText(JSON.stringify(candidates)), efficiency: { oneSourceScan: true, existingStrategyReused: true, repeatedBlenderRuns: 0, repeatedChromiumRuns: 0, duplicateValidationAvoided: true }, nextTask: "WBV2-P15-002" };
if (!write) { process.stdout.write(`wbv2-lighting-selection-ok task=WBV2-P15-001 matched=${candidates.length} capability=RENDER.LIGHTING_FIELDS behaviorHash=${behaviorHash} pending=6618 repeatedRuns=0 next=WBV2-P15-002\n`); process.exit(0); }
fs.mkdirSync(absolute(outputRoot), { recursive: true }); fs.writeFileSync(absolute(candidatePath), `${JSON.stringify(candidate, null, 2)}\n`); fs.writeFileSync(absolute(reportPath), `${JSON.stringify(report, null, 2)}\n`);
fs.writeFileSync(absolute(statusPath), `# WBV2-P15-001 status\n\n- task: \`WBV2-P15-001\`; parent: \`WBV2-P15-000\`; status: \`done\`\n- selected capability: \`RENDER.LIGHTING_FIELDS\`; operations: Camera, Light, World fields\n- matched inventory entries: \`${candidates.length}\`; inventory remains \`6900\` total, \`6618\` pending\n- behavior hash: \`${behaviorHash}\`\n- dedupe key binds source API/test hashes; repeated Blender/Chromium runs: \`0\`\n- representative slice: \`true\`; full-family parity: \`false\`\n- nextTask: \`WBV2-P15-002\`\n\nThe candidate is selected from the existing parity map and source/test implementations. Only one unique Camera/Light/World behavior batch will be executed; matching inventory entries remain coverage references, not completion claims.\n`);
const previousPlan = json("tests/golden/WBV2-P15-000/lights-task-plan.json"); const nextPlan = structuredClone(previousPlan); nextPlan.parentRecoveryPlan = { path: "tests/golden/WBV2-P15-000/lights-task-plan.json", sha256: sha256("tests/golden/WBV2-P15-000/lights-task-plan.json") }; nextPlan.tasks = nextPlan.tasks.map((task) => task.id === "WBV2-P15-001" ? { ...task, status: "done", ready: false } : task.id === "WBV2-P15-002" ? { ...task, status: "in_progress", ready: true } : { ...task, ready: false }); fs.writeFileSync(absolute(planPath), `${JSON.stringify(nextPlan, null, 2)}\n`);
fs.writeFileSync(absolute("docs/tasks/WBV2-P15-002.md"), read("docs/tasks/WBV2-P15-002.md").replace("- status: planned", "- status: in_progress")); execFileSync(process.execPath, [absolute("tools/web/generate-v2-task-index.mjs"), "--plan-path", absolute(planPath)], { cwd: root, stdio: "inherit" }); execFileSync(process.execPath, [absolute("tools/web/check-task-context.mjs"), "--task", "WBV2-P15-001", "--write"], { cwd: root, stdio: "inherit" });
const artifactPaths = { parentManifest: parentPath, inventory: inventoryPath, strategy: p14StrategyPath, sourceApi: sourceApiPath, sourceTest: sourceTestPath, sourceGolden: sourceGoldenPath, candidate: candidatePath, report: reportPath, generator: "tools/web/generate-wbv2-lighting-selection.mjs", status: statusPath, parityPlan: planPath, taskContext: `${outputRoot}/task-context.json` }; const artifacts = Object.fromEntries(Object.entries(artifactPaths).map(([name, file]) => [name, { path: file, sha256: sha256(file) }])); const manifest = { schemaVersion: 1, task: "WBV2-P15-001", parentTask: "WBV2-P15-000", operation: "SELECT_LIGHTING_CAPABILITY_BATCH", status: "done", enablingTask: true, parityStateChange: false, runtime: "READ_ONLY_SOURCE_CANDIDATE_SELECTION", artifacts, assertions: { capability: "RENDER.LIGHTING_FIELDS", matchedInventoryEntries: candidates.length, inventoryTotal: 6900, inventoryPending: 6618, sourceApiBound: true, chromiumTestBound: true, representativeSliceOnly: true, fullFamilyParity: false, repeatedBlenderRuns: 0, repeatedChromiumRuns: 0, duplicateValidationAvoided: true, deterministic: true, historicalReproduction: false }, nextTask: "WBV2-P15-002" }; fs.writeFileSync(absolute(manifestPath), `${JSON.stringify(manifest, null, 2)}\n`);
let queue = read("docs/EXECUTION_QUEUE.md"); queue = queue.replace(/\| 当前任务 \| `[^`]+` \|/u, "| 当前任务 | `WBV2-P15-002` |").replace(/\| parent manifest \| `[^`]+` \|/u, "| parent manifest | `tests/golden/WBV2-P15-001/manifest.json` |").replace(/\| 任务卡 \| \[[^\]]+\]\([^\)]+\) \|/u, "| 任务卡 | [`tasks/WBV2-P15-002.md`](tasks/WBV2-P15-002.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-P15-002` |").replace(/\| Current task state \| `[^`]+` \|/u, "| Current task state | `in_progress` |").replace(/\| Parent manifest \| `[^`]+` \|/u, "| Parent manifest | `tests/golden/WBV2-P15-001/manifest.json` |").replace(/\| Current task card \| `[^`]+` \|/u, "| Current task card | `docs/tasks/WBV2-P15-002.md` |").replace(/\| Current task-context nextTask \| `[^`]+` \|/u, "| Current task-context nextTask | `WBV2-P15-003` |").replace(/\| Focused command \| `[^`]+` \|/u, "| Focused command | `npm --prefix web run test:e2e -- --workers=1 tests/e2e/wbv2-lighting-fields-production.spec.ts` |"); fs.writeFileSync(absolute("nextTask.md"), nextTask);
process.stdout.write(`wbv2-lighting-selection-written task=WBV2-P15-001 matched=${candidates.length} capability=RENDER.LIGHTING_FIELDS behaviorHash=${behaviorHash} pending=6618 next=WBV2-P15-002 artifacts=${Object.keys(artifacts).length}\n`);

View File

@@ -0,0 +1,53 @@
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 p14ManifestPath = "tests/golden/WBV2-P14-003/manifest.json";
const p14ReportPath = "tests/golden/WBV2-P14-003/inventory-coverage-gate-report.json";
const p14StatusPath = "docs/status/WBV2-P14-003.md";
const p15Root = "tests/golden/WBV2-P15-000";
const planPath = `${p15Root}/lights-task-plan.json`;
const reportPath = `${p15Root}/lights-root-report.json`;
const manifestPath = `${p15Root}/manifest.json`;
const statusPath = "docs/status/WBV2-P15-000.md";
const sourceMapPath = "tests/golden/WBV2-P0-002/parity-map.json";
const sourceTestPath = "web/tests/e2e/lighting-field-roundtrip.spec.ts";
const sourceCommandPath = "blender-5.2.0/source/blender/web_engine/web_engine_api.cpp";
const p14 = json(p14ManifestPath); const p14Report = json(p14ReportPath); const sourceMap = json(sourceMapPath);
assert.equal(p14.task, "WBV2-P14-003"); assert.equal(p14.status, "done"); assert.equal(p14.nextTask, null); assert.equal(p14Report.status, "PASS"); assert.equal(p14Report.decision.inventoryPending, 6618); assert.equal(sourceMap.summary.inventoryEntries, 6900);
for (const artifact of Object.values(p14.artifacts ?? {})) assert.equal(sha256(artifact.path), artifact.sha256, artifact.path);
const tasks = [
{ id: "WBV2-P15-000", phase: "P15", title: "authorize_lighting_capability_continuation", kind: "enabling", owner: "PROGRAM", dependsOn: ["WBV2-P14-003"], parityId: null, implementationClass: "LOCAL_BOUNDED", parallelGroup: "p15-governance", gate: "G2", card: "docs/tasks/WBV2-P15-000.md", behavior: "Authorize a source-backed Lighting/Camera/World capability slice without reopening completed batches.", outputs: ["continuation root", "candidate scope", "hash boundary"], acceptance: ["P14 coverage remains hash-bound", "source command and Chromium test exist", "one production task is active"], status: "done", ready: false, queueMutationAllowed: true },
{ id: "WBV2-P15-001", phase: "P15", title: "select_lighting_capability_batch", kind: "enabling", owner: "PARITY", dependsOn: ["WBV2-P15-000"], parityId: "RENDER.LIGHTING_FIELDS", implementationClass: "LOCAL_BOUNDED", parallelGroup: "p15-selection", gate: "G2", card: "docs/tasks/WBV2-P15-001.md", behavior: "Select one deterministic Lighting/Camera/World behavior batch from existing source and tests.", outputs: ["candidate report", "behavior hash", "dedupe key"], acceptance: ["source API is present", "Chromium test is present", "candidate remains representative rather than full-family completion"], status: "in_progress", ready: true, queueMutationAllowed: false },
{ id: "WBV2-P15-002", phase: "P15", title: "lighting_fields_engine_receipt", kind: "feature", owner: "RENDER", dependsOn: ["WBV2-P15-001"], parityId: "RENDER.LIGHTING_FIELDS", implementationClass: "LOCAL_EXACT", parallelGroup: "p15-lighting", gate: "G2", card: "docs/tasks/WBV2-P15-002.md", behavior: "Bind Camera, Light, and World field edits, undo/redo, and exact save/reopen to compiled WASM Main in Chromium.", outputs: ["lighting production report", "lighting receipt", "manifest"], acceptance: ["camera/light/world fields match", "undo/redo revisions are sequential", "save/reopen is exact", "malformed values fail closed"], status: "planned", ready: false, queueMutationAllowed: false },
{ id: "WBV2-P15-003", phase: "P15", title: "close_lighting_capability_gate", kind: "enabling", owner: "RELEASE", dependsOn: ["WBV2-P15-002"], parityId: null, implementationClass: "LOCAL_BOUNDED", parallelGroup: "p15-release", gate: "G5", card: "docs/tasks/WBV2-P15-003.md", behavior: "Close the Lighting capability gate while preserving partial-family and 6900-entry limitations.", outputs: ["lighting gate", "limited declaration", "manifest"], acceptance: ["only the tested slice is claimed", "inventory remainder remains 6618", "no repeated validation or historical over-claim"], status: "planned", ready: false, queueMutationAllowed: false },
];
const plan = { schemaVersion: 1, planId: "BLENDER_WEB_PARITY_V2_LIGHTING_EPOCH_1", status: "ACTIVE_LIGHTING_QUEUE", authority: "queue_reactivated_after_p14_coverage_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" }, parentCoverage: { manifest: p14ManifestPath, report: p14ReportPath, inventoryTotal: 6900, inventoryPending: 6618, duplicateValidationAvoided: true }, tasks };
fs.mkdirSync(absolute(p15Root), { recursive: true }); fs.writeFileSync(absolute(planPath), `${JSON.stringify(plan, null, 2)}\n`);
const report = { schemaVersion: 1, task: "WBV2-P15-000", operation: "AUTHORIZE_LIGHTING_CAPABILITY_CONTINUATION", status: "PASS", parent: { task: p14.task, manifest: p14ManifestPath, manifestSha256: sha256(p14ManifestPath), report: p14ReportPath, reportSha256: sha256(p14ReportPath), previousDecision: p14Report.decision.status }, continuation: { root: "WBV2-P15-000", firstTask: "WBV2-P15-001", plannedTasks: 4, candidate: "RENDER.LIGHTING_FIELDS", sourceApi: sourceCommandPath, chromiumTest: sourceTestPath, browser: "chromium", inventoryTotal: 6900, inventoryPending: 6618, noRepeatedExecution: true }, policy: { p14EvidencePreserved: true, sourceHistoryReadOnly: true, representativeSliceOnly: true, duplicateValidationAvoided: true, authorizedRebaselineOnly: true, fullHistoricalReproduction: false }, nextTask: "WBV2-P15-001" };
fs.writeFileSync(absolute(reportPath), `${JSON.stringify(report, null, 2)}\n`);
fs.writeFileSync(absolute("docs/tasks/WBV2-P15-000.md"), `# WBV2-P15-000: lighting capability continuation root\n\n- task: WBV2-P15-000\n- parent: WBV2-P14-003\n- status: done\n- gap: workflow:authorize_lighting_capability_continuation\n- ownerFamily: PROGRAM\n- targetImplementationClass: LOCAL_BOUNDED\n\n## 目标\n\nAuthorize a source-backed Lighting/Camera/World continuation. P15 reuses the 6900-entry coverage ledger and runs only one representative Chromium production slice for fields already exposed by the compiled WebEngine API.\n\n## 验收\n\n- \`node tools/web/generate-wbv2-lights-root.mjs\`\n- \`node tools/web/check-execution-control-plane.mjs\`\n- \`node tools/web/check-v2-task-index.mjs\`\n\n## 交付与回滚\n\n- Reports: \`tests/golden/WBV2-P15-000/\`\n- Manifest: \`tests/golden/WBV2-P15-000/manifest.json\`\n- Rollback: restore P14-003 as queue parent without rewriting P14 evidence.\n`);
const cards = {
"WBV2-P15-001": `# WBV2-P15-001: select_lighting_capability_batch\n\n- task: WBV2-P15-001\n- parent: WBV2-P15-000\n- status: in_progress\n- gap: capability:RENDER.LIGHTING_FIELDS\n- ownerFamily: PARITY\n- targetImplementationClass: LOCAL_BOUNDED\n\n## 目标\n\nSelect one deterministic Camera, Light, and World field behavior batch from the existing source API and Chromium test.\n\n## 输入与范围\n\n- Focused source: \`blender-5.2.0/source/blender/web_engine/web_engine_api.cpp\`\n- Existing production test: \`web/tests/e2e/lighting-field-roundtrip.spec.ts\`\n- Inventory: \`tests/golden/WBV2-P0-002/parity-map.json\`\n- Production entrypoint: \`node tools/web/generate-wbv2-lighting-selection.mjs --write\`\n\n## 验收\n\n- source API and Chromium test hashes are bound\n- one behavior hash covers camera/light/world fields\n- representative slice is not promoted to full-family parity\n- malformed, hash-drift, unsupported, or false-completion input keeps in_progress\n- \`node tools/web/check-task-context.mjs --task WBV2-P15-001 --write\`\n\n## 交付与回滚\n\n- Reports: \`tests/golden/WBV2-P15-001/\`\n- Status: \`docs/status/WBV2-P15-001.md\`\n- Manifest: \`tests/golden/WBV2-P15-001/manifest.json\`\n- Rollback: restore P15-000 as queue parent.\n`,
"WBV2-P15-002": `# WBV2-P15-002: lighting_fields_engine_receipt\n\n- task: WBV2-P15-002\n- parent: WBV2-P15-001\n- status: planned\n- gap: capability:RENDER.LIGHTING_FIELDS\n- ownerFamily: RENDER\n- targetImplementationClass: LOCAL_EXACT\n\n## 目标\n\nBind Camera, Light, and World edits, undo/redo, and exact save/reopen to the compiled WASM Main in Chromium.\n\n## 输入与范围\n\n- Focused source: \`tests/golden/WBV2-P15-001/lighting-selection-report.json\`\n- Production test: \`web/tests/e2e/wbv2-lighting-fields-production.spec.ts\`\n- Production entrypoint: \`npm --prefix web run test:e2e -- --workers=1 tests/e2e/wbv2-lighting-fields-production.spec.ts\`\n\n## 验收\n\n- camera/light/world fields match the bounded expected values\n- undo/redo revisions are sequential\n- save/reopen is exact\n- malformed values fail closed without Main mutation\n- Chromium is the only browser\n- \`node tools/web/check-task-context.mjs --task WBV2-P15-002 --write\`\n\n## 交付与回滚\n\n- Reports: \`tests/golden/WBV2-P15-002/\`\n- Status: \`docs/status/WBV2-P15-002.md\`\n- Manifest: \`tests/golden/WBV2-P15-002/manifest.json\`\n- Rollback: restore P15-001 as queue parent.\n`,
"WBV2-P15-003": `# WBV2-P15-003: close_lighting_capability_gate\n\n- task: WBV2-P15-003\n- parent: WBV2-P15-002\n- status: planned\n- gap: workflow:close_lighting_capability_gate\n- ownerFamily: RELEASE\n- targetImplementationClass: LOCAL_BOUNDED\n\n## 目标\n\nClose the Lighting capability gate while preserving partial-family and 6900-entry limitations.\n\n## 输入与范围\n\n- Focused receipt: \`tests/golden/WBV2-P15-002/lighting-fields-receipt-report.json\`\n- Coverage matrix: \`tests/golden/WBV2-P14-002/capability-evidence-matrix.json\`\n- Production entrypoint: \`node tools/web/generate-wbv2-lighting-gate.mjs --write\`\n\n## 验收\n\n- only the tested lighting slice is claimed\n- pending inventory remains 6618\n- duplicate validation remains zero\n- historical reproduction remains false\n- \`node tools/web/check-task-context.mjs --task WBV2-P15-003 --write\`\n\n## 交付与回滚\n\n- Reports: \`tests/golden/WBV2-P15-003/\`\n- Status: \`docs/status/WBV2-P15-003.md\`\n- Manifest: \`tests/golden/WBV2-P15-003/manifest.json\`\n- Rollback: restore P15-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-P15-000 status\n\n- task: \`WBV2-P15-000\`; parent: \`WBV2-P14-003\`; status: \`done\`\n- candidate: \`RENDER.LIGHTING_FIELDS\`; source API and Chromium test are present\n- inventory carried forward: \`6900\` total, \`6618\` pending\n- duplicate validation: \`forbidden\`; representative slice only\n- nextTask: \`WBV2-P15-001\`\n\nP15 is an authorized continuation that reuses the P14 coverage ledger and validates one source-backed Camera/Light/World behavior batch in Chromium.\n`);
const artifactPaths = { parentManifest: p14ManifestPath, parentReport: p14ReportPath, sourceMap: sourceMapPath, sourceApi: sourceCommandPath, sourceTest: sourceTestPath, plan: planPath, report: reportPath, rootCard: "docs/tasks/WBV2-P15-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-P15-000", parentTask: "WBV2-P14-003", operation: "AUTHORIZE_LIGHTING_CAPABILITY_CONTINUATION", status: "done", enablingTask: true, parityStateChange: false, runtime: "READ_ONLY_LIGHTING_CONTINUATION_ROOT", artifacts, assertions: { p14EvidencePreserved: true, sourceApiBound: true, chromiumTestBound: true, inventoryTotal: 6900, inventoryPending: 6618, duplicateValidationAvoided: true, representativeSliceOnly: true, authorizedRebaselineOnly: true, fullHistoricalReproduction: false }, nextTask: "WBV2-P15-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-P15-001` |").replace(/\| parent manifest \| `[^`]+` \|/u, "| parent manifest | `tests/golden/WBV2-P15-000/manifest.json` |").replace(/\| 任务卡 \| \[[^\]]+\]\([^\)]+\) \|/u, "| 任务卡 | [`tasks/WBV2-P15-001.md`](tasks/WBV2-P15-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-P15-001` |").replace(/\| Current task state \| `[^`]+` \|/u, "| Current task state | `in_progress` |").replace(/\| Parent manifest \| `[^`]+` \|/u, "| Parent manifest | `tests/golden/WBV2-P15-000/manifest.json` |").replace(/\| Current task card \| `[^`]+` \|/u, "| Current task card | `docs/tasks/WBV2-P15-001.md` |").replace(/\| Current task-context nextTask \| `[^`]+` \|/u, "| Current task-context nextTask | `WBV2-P15-002` |").replace(/\| Focused command \| `[^`]+` \|/u, "| Focused command | `node tools/web/generate-wbv2-lighting-selection.mjs --write` |"); fs.writeFileSync(absolute("nextTask.md"), nextTask);
process.stdout.write("wbv2-lights-root-written root=WBV2-P15-000 next=WBV2-P15-001 candidate=RENDER.LIGHTING_FIELDS inventoryPending=6618\n");