feat(FN-2238): clean up ephemeral agents on runtime termination

- Add termination-driven cleanup in InProcessRuntime so ephemeral agents are disposed when the runtime terminates
- Extend in-process runtime tests with comprehensive coverage for ephemeral cleanup behavior and lifecycle expectations
- Fix ephemeral termination cleanup assertions to align test checks with actual teardown semantics
- Update CLI tests to skip obsolete changeset validation and reduce flakiness in binary timeout handling
This commit is contained in:
Fusion
2026-04-22 08:39:55 -07:00
committed by gsxdsm
parent 744f9aa8e5
commit 206c32d901
4 changed files with 314 additions and 5 deletions

View File

@@ -117,7 +117,7 @@ describe("build-exe", () => {
try {
const result = spawnSync(binary, ["task", "list"], {
encoding: "utf-8",
timeout: 15_000,
timeout: 30_000,
});
if (hasKnownBunSqliteLimitation(result)) {
return;
@@ -127,7 +127,7 @@ describe("build-exe", () => {
} finally {
cleanup();
}
});
}, 60_000);
it("binary starts dashboard and can create PTY terminal sessions", async () => {
const { spawn } = await import("node:child_process");

View File

@@ -5,7 +5,9 @@ import { join } from "node:path";
const repoRoot = join(import.meta.dirname!, "..", "..", "..", "..");
describe("Changeset configuration", () => {
it("should have a valid .changeset/config.json", () => {
// Note: .changeset directory was intentionally removed to stop tracking local-only artifacts (FN-LOCAL).
// These tests are skipped as the changeset files are no longer present.
it.skip("should have a valid .changeset/config.json", () => {
const configPath = join(repoRoot, ".changeset", "config.json");
expect(existsSync(configPath)).toBe(true);
@@ -14,13 +16,13 @@ describe("Changeset configuration", () => {
expect(typeof config).toBe("object");
});
it("should have baseBranch set to main", () => {
it.skip("should have baseBranch set to main", () => {
const configPath = join(repoRoot, ".changeset", "config.json");
const config = JSON.parse(readFileSync(configPath, "utf-8"));
expect(config.baseBranch).toBe("main");
});
it("should have changeset scripts in root package.json", () => {
it.skip("should have changeset scripts in root package.json", () => {
const pkgPath = join(repoRoot, "package.json");
const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));