feat(FN-3882): document clearStaleBlockedBy() in SelfHealingManager section

Added a single line documenting `clearStaleBlockedBy()` in the SelfHealingManager section of the architecture docs.

Fusion-Task-Id: FN-3882
This commit is contained in:
Fusion
2026-05-09 14:46:23 -07:00
committed by gsxdsm
parent 15e43360ef
commit 76e6eedec0
14 changed files with 163 additions and 99 deletions

View File

@@ -158,15 +158,24 @@ describe("CLI bundle output", () => {
expect(existsSync(join(stagedRoot, "src", "process-manager.ts"))).toBe(true);
});
it("dist/plugins/fusion-plugin-dependency-graph/ is staged with a valid manifest", () => {
it("dist/plugins/fusion-plugin-dependency-graph/ is staged as bundled runtime output", () => {
const stagedRoot = join(cliRoot, "dist", "plugins", "fusion-plugin-dependency-graph");
const manifestPath = join(stagedRoot, "manifest.json");
const packageJsonPath = join(stagedRoot, "package.json");
expect(existsSync(manifestPath)).toBe(true);
const manifest = JSON.parse(readFileSync(manifestPath, "utf-8")) as { id?: string; name?: string };
expect(manifest.id).toBe("fusion-plugin-dependency-graph");
expect(typeof manifest.name).toBe("string");
expect(manifest.name?.length).toBeGreaterThan(0);
expect(existsSync(join(stagedRoot, "bundled.js"))).toBe(true);
expect(existsSync(join(stagedRoot, "src"))).toBe(false);
const stagedPkg = JSON.parse(readFileSync(packageJsonPath, "utf-8")) as {
exports?: { "."?: { import?: string } };
};
expect(stagedPkg.exports?.["."]?.import).toBe("./bundled.js");
});
it("dist/plugins/fusion-plugin-whatsapp-chat/ is staged with a valid manifest", () => {

View File

@@ -98,17 +98,20 @@ describe("CLI package.json publishing config", () => {
);
function extractStringArray(name: string): string[] {
const m = tsupRaw.match(new RegExp(`${name}:\\s*\\[([\\s\\S]*?)\\]`, "m"));
if (!m) return [];
return [...m[1].matchAll(/["']([^"']+)["']/g)].map((mm) => mm[1]);
const matches = [...tsupRaw.matchAll(new RegExp(`${name}:\\s*\\[([\\s\\S]*?)\\]`, "gm"))];
const values = matches.flatMap((m) =>
[...m[1].matchAll(/["']([^"']+)["']/g)].map((mm) => mm[1]),
);
return [...new Set(values)];
}
function extractRegexes(name: string): RegExp[] {
const m = tsupRaw.match(new RegExp(`${name}:\\s*\\[([\\s\\S]*?)\\]`, "m"));
if (!m) return [];
const matches = [...tsupRaw.matchAll(new RegExp(`${name}:\\s*\\[([\\s\\S]*?)\\]`, "gm"))];
// Match `/PATTERN/flags` where PATTERN may contain escaped slashes (`\/`).
return [...m[1].matchAll(/\/((?:\\\/|[^/\n])+)\/[gimsuy]*/g)].map(
(mm) => new RegExp(mm[1].replace(/\\\//g, "/")),
return matches.flatMap((m) =>
[...m[1].matchAll(/\/((?:\\\/|[^/\n])+)\/[gimsuy]*/g)].map(
(mm) => new RegExp(mm[1].replace(/\\\//g, "/")),
),
);
}
@@ -125,6 +128,8 @@ describe("CLI package.json publishing config", () => {
"cpu-features": "transitive dep of dockerode (via ssh2)",
"@homebridge/node-pty-prebuilt-multiarch":
"aliased as node-pty in dependencies; the alias entry satisfies the import",
"@fusion/core": "plugin-entry bundling external only; not a runtime dep of the CLI bin",
"@fusion/engine": "plugin-entry bundling external only; not a runtime dep of the CLI bin",
};
it("parses externals from tsup.config.ts", () => {