From 5b0a30da88615db055f290d260a7bddff3b6ebe5 Mon Sep 17 00:00:00 2001 From: Lann Martin Date: Fri, 7 Aug 2026 17:40:25 -0400 Subject: [PATCH] js: key the page runner's report by target, not suite MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Several targets may run one suite — a plain and a delegated composition of the same corpus — and the report keyed by suite name collides for them. The target is the identity that is unique per run by construction (one aggregate row each). Caught designing the first consumer, before anything baked the suite keying in. --- js/viewer/page-runner.mjs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/js/viewer/page-runner.mjs b/js/viewer/page-runner.mjs index fd870c6..021a24a 100644 --- a/js/viewer/page-runner.mjs +++ b/js/viewer/page-runner.mjs @@ -45,11 +45,14 @@ function runShard(workerUrl, config, shard, onRow) { } /** - * Run every configured suite and report. `suites` entries carry the - * browser-worker run message minus `shard` (moduleUrl, coreUrls, - * importsUrl, contextUrl?, env?, missing?, caseTimeoutMs?) plus - * `suite` (the results identity) and `target`. `jobs` defaults to the - * capped hardware parallelism; pass 1 for sequential corpora. + * Run every configured suite and report, keyed by `target` — the one + * identity unique per run (several targets may run one suite, e.g. a + * plain and a delegated composition of the same corpus). `suites` + * entries carry the browser-worker run message minus `shard` + * (moduleUrl, coreUrls, importsUrl, contextUrl?, env?, missing?, + * caseTimeoutMs?) plus `suite` (the results identity in the envelope) + * and `target`. `jobs` defaults to the capped hardware parallelism; + * pass 1 for sequential corpora. */ export async function runSuitesInPage({ workerUrl, suites, jobs }) { const pool = jobs ?? workerCount(navigator.hardwareConcurrency ?? 4); @@ -68,7 +71,7 @@ export async function runSuitesInPage({ workerUrl, suites, jobs }) { ); const events = shards.flatMap((s) => s.events); events.sort((a, b) => a.index - b.index); - out[suite] = { + out[target] = { lines: [ JSON.stringify(envelope(target, suite)), ...events.map((e) => JSON.stringify(e.event)),