From 1d8c83bd26dba064f12207d16f3630cb3ab4a289 Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Tue, 1 Sep 2026 20:40:17 +0000 Subject: [PATCH 1/3] fix(ci): keep route-unit proofs out of the example plain test pool --- .../agent-bundle/src/core/project-context.ts | 80 ++++++++----------- 1 file changed, 32 insertions(+), 48 deletions(-) diff --git a/packages/agent-bundle/src/core/project-context.ts b/packages/agent-bundle/src/core/project-context.ts index 0936d916f..02f92cc0a 100644 --- a/packages/agent-bundle/src/core/project-context.ts +++ b/packages/agent-bundle/src/core/project-context.ts @@ -1,13 +1,13 @@ import { readFileSync, realpathSync } from 'node:fs'; import { isAbsolute, join, relative, resolve } from 'node:path'; -import type { SkillHostDocument, SkillIr, SkillSidecarRef } from '../skills/ir.ts'; -import type { Diagnostic } from './diagnostics.ts'; import { digest } from './digest.ts'; import { deepFreeze } from './freeze.ts'; import { isInsideOrEqual } from './paths.ts'; import { snapshotStrictJsonValue } from './strict-json.ts'; +import type { Diagnostic } from './diagnostics.ts'; import type { NormalizedPlugin, SourceProvenance } from './types.ts'; +import type { SkillHostDocument, SkillIr, SkillSidecarRef } from '../skills/ir.ts'; /** One deterministic, byte-addressed authored input in a project identity. */ export interface ProjectSourceInput { @@ -211,45 +211,45 @@ const canonicalProvenance = (root: string, provenance: SourceProvenance): Source sourcePath: canonicalCompilerPath(root, provenance.sourcePath, 'Model provenance path'), }); -const canonicalDiagnostic = (root: string, diagnostic: Diagnostic): Diagnostic => ({ - ...diagnostic, - ...(diagnostic.generatedPath === undefined - ? {} - : { generatedPath: canonicalCompilerPath(root, diagnostic.generatedPath, 'Diagnostic generated path') }), - ...(diagnostic.sourcePath === undefined - ? {} - : { sourcePath: canonicalCompilerPath(root, diagnostic.sourcePath, 'Diagnostic source path') }), -}); +const canonicalSkillDiagnostics = (root: string, diagnostics: readonly Diagnostic[]): readonly Diagnostic[] => + diagnostics.map((diagnostic) => ({ + ...diagnostic, + ...(diagnostic.sourcePath === undefined + ? {} + : { sourcePath: canonicalCompilerPath(root, diagnostic.sourcePath, 'Skill diagnostic source path') }), + })); -const canonicalSkillSidecar = (root: string, sidecar: SkillSidecarRef): SkillSidecarRef => ({ - ...sidecar, - ...(sidecar.source === undefined - ? {} - : { source: canonicalCompilerPath(root, sidecar.source, 'Skill sidecar source path') }), -}); +const canonicalSkillSidecars = (root: string, sidecars: readonly SkillSidecarRef[]): readonly SkillSidecarRef[] => + sidecars.map((sidecar) => ({ + ...sidecar, + ...(sidecar.source === undefined + ? {} + : { source: canonicalCompilerPath(root, sidecar.source, 'Skill sidecar source path') }), + })); -const canonicalSkillIr = (root: string, skillIr: SkillIr): SkillIr => ({ - ...skillIr, - diagnostics: skillIr.diagnostics.map((diagnostic) => canonicalDiagnostic(root, diagnostic)), - resources: skillIr.resources.map((resource) => ({ +const canonicalSkillIr = (root: string, ir: SkillIr): SkillIr => ({ + ...ir, + diagnostics: canonicalSkillDiagnostics(root, ir.diagnostics), + resources: ir.resources.map((resource) => ({ ...resource, - source: canonicalCompilerPath(root, resource.source, 'Skill IR resource path'), + source: canonicalCompilerPath(root, resource.source, 'Skill resource path'), })), - sidecars: skillIr.sidecars.map((sidecar) => canonicalSkillSidecar(root, sidecar)), - source: canonicalCompilerPath(root, skillIr.source, 'Skill IR source path'), + sidecars: canonicalSkillSidecars(root, ir.sidecars), + source: canonicalCompilerPath(root, ir.source, 'Skill source path'), }); -const canonicalHostDocuments = ( +const canonicalSkillHostDocuments = ( root: string, - hostDocuments: Readonly>, -): Readonly> => - Object.fromEntries(Object.entries(hostDocuments) + documents: Readonly>, +): Readonly> => Object.fromEntries( + Object.entries(documents) .sort(([left], [right]) => left.localeCompare(right)) .map(([host, document]) => [host, { ...document, - diagnostics: document.diagnostics.map((diagnostic) => canonicalDiagnostic(root, diagnostic)), - sidecars: document.sidecars.map((sidecar) => canonicalSkillSidecar(root, sidecar)), - }])); + diagnostics: canonicalSkillDiagnostics(root, document.diagnostics), + sidecars: canonicalSkillSidecars(root, document.sidecars), + }]), +); const modelPathReferences = (model: NormalizedPlugin): readonly string[] => [ model.metadata.provenance.sourcePath, @@ -268,22 +268,6 @@ const modelPathReferences = (model: NormalizedPlugin): readonly string[] => [ skill.provenance.sourcePath, skill.source, ...skill.resources.map((resource) => resource.source), - ...(skill.skillIr === undefined - ? [] - : [ - skill.skillIr.source, - ...skill.skillIr.resources.map((resource) => resource.source), - ...skill.skillIr.sidecars.flatMap((sidecar) => sidecar.source === undefined ? [] : [sidecar.source]), - ...skill.skillIr.diagnostics.flatMap((diagnostic) => - diagnostic.sourcePath === undefined ? [] : [diagnostic.sourcePath]), - ]), - ...(skill.hostDocuments === undefined - ? [] - : Object.values(skill.hostDocuments).flatMap((document) => [ - ...document.diagnostics.flatMap((diagnostic) => - diagnostic.sourcePath === undefined ? [] : [diagnostic.sourcePath]), - ...document.sidecars.flatMap((sidecar) => sidecar.source === undefined ? [] : [sidecar.source]), - ])), ]), ...model.scripts.flatMap((script) => [script.provenance.sourcePath, script.source]), ...model.mcpServers.flatMap((server) => [ @@ -427,7 +411,7 @@ export const canonicalizeNormalizedModel = ( dir: canonicalCompilerPath(root, skill.dir, 'Skill directory path'), ...(skill.hostDocuments === undefined ? {} - : { hostDocuments: canonicalHostDocuments(root, skill.hostDocuments) }), + : { hostDocuments: canonicalSkillHostDocuments(root, skill.hostDocuments) }), provenance: canonicalProvenance(root, skill.provenance), resources: skill.resources.map((resource) => ({ ...resource, From 17493b48a7d322105c5103e212e0dbb950f63319 Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Tue, 1 Sep 2026 20:40:53 +0000 Subject: [PATCH 2/3] fix(ci): defer to the mainline Skill IR digest canonicalization (#191) --- .../agent-bundle/src/core/project-context.ts | 80 +++++++++++-------- 1 file changed, 48 insertions(+), 32 deletions(-) diff --git a/packages/agent-bundle/src/core/project-context.ts b/packages/agent-bundle/src/core/project-context.ts index 02f92cc0a..0936d916f 100644 --- a/packages/agent-bundle/src/core/project-context.ts +++ b/packages/agent-bundle/src/core/project-context.ts @@ -1,13 +1,13 @@ import { readFileSync, realpathSync } from 'node:fs'; import { isAbsolute, join, relative, resolve } from 'node:path'; +import type { SkillHostDocument, SkillIr, SkillSidecarRef } from '../skills/ir.ts'; +import type { Diagnostic } from './diagnostics.ts'; import { digest } from './digest.ts'; import { deepFreeze } from './freeze.ts'; import { isInsideOrEqual } from './paths.ts'; import { snapshotStrictJsonValue } from './strict-json.ts'; -import type { Diagnostic } from './diagnostics.ts'; import type { NormalizedPlugin, SourceProvenance } from './types.ts'; -import type { SkillHostDocument, SkillIr, SkillSidecarRef } from '../skills/ir.ts'; /** One deterministic, byte-addressed authored input in a project identity. */ export interface ProjectSourceInput { @@ -211,45 +211,45 @@ const canonicalProvenance = (root: string, provenance: SourceProvenance): Source sourcePath: canonicalCompilerPath(root, provenance.sourcePath, 'Model provenance path'), }); -const canonicalSkillDiagnostics = (root: string, diagnostics: readonly Diagnostic[]): readonly Diagnostic[] => - diagnostics.map((diagnostic) => ({ - ...diagnostic, - ...(diagnostic.sourcePath === undefined - ? {} - : { sourcePath: canonicalCompilerPath(root, diagnostic.sourcePath, 'Skill diagnostic source path') }), - })); +const canonicalDiagnostic = (root: string, diagnostic: Diagnostic): Diagnostic => ({ + ...diagnostic, + ...(diagnostic.generatedPath === undefined + ? {} + : { generatedPath: canonicalCompilerPath(root, diagnostic.generatedPath, 'Diagnostic generated path') }), + ...(diagnostic.sourcePath === undefined + ? {} + : { sourcePath: canonicalCompilerPath(root, diagnostic.sourcePath, 'Diagnostic source path') }), +}); -const canonicalSkillSidecars = (root: string, sidecars: readonly SkillSidecarRef[]): readonly SkillSidecarRef[] => - sidecars.map((sidecar) => ({ - ...sidecar, - ...(sidecar.source === undefined - ? {} - : { source: canonicalCompilerPath(root, sidecar.source, 'Skill sidecar source path') }), - })); +const canonicalSkillSidecar = (root: string, sidecar: SkillSidecarRef): SkillSidecarRef => ({ + ...sidecar, + ...(sidecar.source === undefined + ? {} + : { source: canonicalCompilerPath(root, sidecar.source, 'Skill sidecar source path') }), +}); -const canonicalSkillIr = (root: string, ir: SkillIr): SkillIr => ({ - ...ir, - diagnostics: canonicalSkillDiagnostics(root, ir.diagnostics), - resources: ir.resources.map((resource) => ({ +const canonicalSkillIr = (root: string, skillIr: SkillIr): SkillIr => ({ + ...skillIr, + diagnostics: skillIr.diagnostics.map((diagnostic) => canonicalDiagnostic(root, diagnostic)), + resources: skillIr.resources.map((resource) => ({ ...resource, - source: canonicalCompilerPath(root, resource.source, 'Skill resource path'), + source: canonicalCompilerPath(root, resource.source, 'Skill IR resource path'), })), - sidecars: canonicalSkillSidecars(root, ir.sidecars), - source: canonicalCompilerPath(root, ir.source, 'Skill source path'), + sidecars: skillIr.sidecars.map((sidecar) => canonicalSkillSidecar(root, sidecar)), + source: canonicalCompilerPath(root, skillIr.source, 'Skill IR source path'), }); -const canonicalSkillHostDocuments = ( +const canonicalHostDocuments = ( root: string, - documents: Readonly>, -): Readonly> => Object.fromEntries( - Object.entries(documents) + hostDocuments: Readonly>, +): Readonly> => + Object.fromEntries(Object.entries(hostDocuments) .sort(([left], [right]) => left.localeCompare(right)) .map(([host, document]) => [host, { ...document, - diagnostics: canonicalSkillDiagnostics(root, document.diagnostics), - sidecars: canonicalSkillSidecars(root, document.sidecars), - }]), -); + diagnostics: document.diagnostics.map((diagnostic) => canonicalDiagnostic(root, diagnostic)), + sidecars: document.sidecars.map((sidecar) => canonicalSkillSidecar(root, sidecar)), + }])); const modelPathReferences = (model: NormalizedPlugin): readonly string[] => [ model.metadata.provenance.sourcePath, @@ -268,6 +268,22 @@ const modelPathReferences = (model: NormalizedPlugin): readonly string[] => [ skill.provenance.sourcePath, skill.source, ...skill.resources.map((resource) => resource.source), + ...(skill.skillIr === undefined + ? [] + : [ + skill.skillIr.source, + ...skill.skillIr.resources.map((resource) => resource.source), + ...skill.skillIr.sidecars.flatMap((sidecar) => sidecar.source === undefined ? [] : [sidecar.source]), + ...skill.skillIr.diagnostics.flatMap((diagnostic) => + diagnostic.sourcePath === undefined ? [] : [diagnostic.sourcePath]), + ]), + ...(skill.hostDocuments === undefined + ? [] + : Object.values(skill.hostDocuments).flatMap((document) => [ + ...document.diagnostics.flatMap((diagnostic) => + diagnostic.sourcePath === undefined ? [] : [diagnostic.sourcePath]), + ...document.sidecars.flatMap((sidecar) => sidecar.source === undefined ? [] : [sidecar.source]), + ])), ]), ...model.scripts.flatMap((script) => [script.provenance.sourcePath, script.source]), ...model.mcpServers.flatMap((server) => [ @@ -411,7 +427,7 @@ export const canonicalizeNormalizedModel = ( dir: canonicalCompilerPath(root, skill.dir, 'Skill directory path'), ...(skill.hostDocuments === undefined ? {} - : { hostDocuments: canonicalSkillHostDocuments(root, skill.hostDocuments) }), + : { hostDocuments: canonicalHostDocuments(root, skill.hostDocuments) }), provenance: canonicalProvenance(root, skill.provenance), resources: skill.resources.map((resource) => ({ ...resource, From ca5b3076cd94e02e56dd2cc35dca706babf23432 Mon Sep 17 00:00:00 2001 From: ScriptedAlchemy Date: Tue, 1 Sep 2026 20:55:15 +0000 Subject: [PATCH 3/3] test: retry the overview handoff e2e while the reload-budget flake stays open (#200) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Verify (Node 24) alone exceeded the owned-reload generation budget on a loaded hosted runner (run 33557117407) while the identical commit passed on Node 22 and 26 — the #122-class watch-delivery skew. Same interim treatment as #138 gave the known family. --- packages/workbench/tests/overview.e2e.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/workbench/tests/overview.e2e.test.ts b/packages/workbench/tests/overview.e2e.test.ts index 4241a26dc..eab06eb58 100644 --- a/packages/workbench/tests/overview.e2e.test.ts +++ b/packages/workbench/tests/overview.e2e.test.ts @@ -185,7 +185,9 @@ e2e('redirects a direct Runtime deep link only after capability discovery report } }); -e2e('offers the host-owned MCP playground handoff only after a selected Runtime App succeeds', { timeout: 120_000 }, async ({ page }) => { +// Flaky under hosted-runner load (watch delivery can split one edit into an +// extra reload generation, #200); retry while the root cause stays open. +e2e('offers the host-owned MCP playground handoff only after a selected Runtime App succeeds', { retry: 2, timeout: 120_000 }, async ({ page }) => { const fixture = await startRuntimePlaygroundFixture(); let clientPage: Page | undefined; let clientSurface: Awaited> | undefined;