test(ingest): verify isolated diff postmortem coverage

This commit is contained in:
Andrey Avtomonov 2026-05-17 21:53:18 +02:00
parent 46455e74d1
commit 656e5846aa

View file

@ -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,