fix(quality): record current-tree trust boundary
ci/woodpecker/pr/ci Pipeline failed

This commit is contained in:
2026-07-31 22:41:30 -05:00
parent bd603da4b0
commit ada0cbe60e
12 changed files with 248 additions and 43 deletions
+19
View File
@@ -151,6 +151,25 @@ async function applyFixture(root, fixture = {}) {
const target = await safeSandboxWrite(root, entry.path, entry.content, 'fixture write');
if (entry.mode !== undefined) await chmod(target, entry.mode);
}
for (const entry of fixture.replaceFiles ?? []) {
const target = await sandboxPath(root, entry.path, 'fixture replace');
if ((await lstat(target)).isSymbolicLink()) {
throw new Error(`fixture replace: target is a symbolic link (${entry.path})`);
}
const source = await readFile(target, 'utf8');
const occurrences = source.split(entry.find).length - 1;
if (occurrences !== 1) {
throw new Error(
`fixture replace: stale or ambiguous match for ${entry.path} (${occurrences} matches)`,
);
}
await safeSandboxWrite(
root,
entry.path,
source.replace(entry.find, entry.replace),
'fixture replace',
);
}
for (const relativePath of fixture.removePaths ?? []) {
await rm(await sandboxPath(root, relativePath, 'fixture remove'), {
recursive: true,