From 656e5846aae2306c7aa1ae8f5a3bf20d33ce17a2 Mon Sep 17 00:00:00 2001 From: Andrey Avtomonov Date: Sun, 17 May 2026 21:53:18 +0200 Subject: [PATCH] test(ingest): verify isolated diff postmortem coverage --- .../context/src/ingest/isolated-diff/patch-integrator.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/context/src/ingest/isolated-diff/patch-integrator.ts b/packages/context/src/ingest/isolated-diff/patch-integrator.ts index d8f807d8..54239ec3 100644 --- a/packages/context/src/ingest/isolated-diff/patch-integrator.ts +++ b/packages/context/src/ingest/isolated-diff/patch-integrator.ts @@ -27,6 +27,14 @@ export async function integrateWorkUnitPatch(input: IntegrateWorkUnitPatchInput) const preApplyHead = await input.integrationGit.revParseHead(); const patch = await readFile(input.patchPath, 'utf-8'); const touchedPaths = parsePatchTouchedPaths(patch).map((entry) => entry.path); + if (touchedPaths.length === 0) { + await input.trace.event('debug', 'integration', 'patch_noop_accepted', { + unitKey: input.unitKey, + patchPath: input.patchPath, + patchBytes: Buffer.byteLength(patch), + }); + return { status: 'accepted', commitSha: preApplyHead ?? '', touchedPaths }; + } try { assertPatchAllowedForWorkUnit({ unitKey: input.unitKey,