feat: complete REA remediation program

This commit is contained in:
N0zoM1z0
2026-07-22 22:09:12 +09:00
committed by N0zoM1z0
parent 737940c90c
commit d25e98c3f9
460 changed files with 13985 additions and 1877 deletions
+8 -7
View File
@@ -1,11 +1,12 @@
import fs from "node:fs";
import { mkdtemp, mkdir, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import { mkdir, rm, writeFile } from "node:fs/promises";
import { join } from "node:path";
import { add, commit, init } from "isomorphic-git";
import { describe, expect, it } from "vitest";
import { createTestTempDirectory } from "./fixtures/temporaryDirectory.js";
import {
importReferenceSource,
normalizeHistoricalSourceParseFailures,
@@ -123,7 +124,7 @@ describe("reference source import", () => {
});
it("is relocation-stable, resolves imports, and excludes secrets before capture", async () => {
const parent = await mkdtemp(join(tmpdir(), "rea-reference-import-"));
const parent = await createTestTempDirectory("rea-reference-import-");
try {
const leftRoot = await fixture(parent, "left");
const rightRoot = await fixture(parent, "right");
@@ -157,8 +158,8 @@ describe("reference source import", () => {
});
it("fails closed outside policy and honors cancellation", async () => {
const parent = await mkdtemp(join(tmpdir(), "rea-reference-policy-"));
const outside = await mkdtemp(join(tmpdir(), "rea-reference-outside-"));
const parent = await createTestTempDirectory("rea-reference-policy-");
const outside = await createTestTempDirectory("rea-reference-outside-");
try {
const root = await fixture(outside, "tree");
const denied = await importTree(root, parent);
@@ -182,7 +183,7 @@ describe("reference source import", () => {
});
it("uses a valid reference root when another configured root is missing", async () => {
const parent = await mkdtemp(join(tmpdir(), "rea-reference-roots-"));
const parent = await createTestTempDirectory("rea-reference-roots-");
try {
const root = await fixture(parent, "tree");
const imported = await importTree(root, [
@@ -196,7 +197,7 @@ describe("reference source import", () => {
});
it("records bounded local Git state without invoking Git", async () => {
const parent = await mkdtemp(join(tmpdir(), "rea-reference-git-"));
const parent = await createTestTempDirectory("rea-reference-git-");
try {
const root = await fixture(parent, "repo");
await init({ fs, dir: root, defaultBranch: "main" });