Skip to content

Commit 404501a

Browse files
authored
feat(server): bounded environment preflight for provider launches (#11)
Run bounded read-only environment preflight before explicit and adapter-default new/recovered provider launches. Separate host checkpoint Git from provider snapshot capabilities and deliver warning findings through authenticated thread activity. Preserve transferred source and current-base integration. Verified source tree05b1021435a52b3a7b25f6f1a365cf046b1a5995; normal CI37630441181 passed; independent automated technical review clear. Native artifact acceptance remains with shared release ownerPR20.
1 parent 08dbb72 commit 404501a

25 files changed

Lines changed: 5695 additions & 82 deletions

‎apps/server/integration/envchkP1WireAcceptance.integration.test.ts‎

Lines changed: 862 additions & 0 deletions
Large diffs are not rendered by default.

‎apps/server/integration/launchPreflightDelivery.integration.test.ts‎

Lines changed: 1027 additions & 0 deletions
Large diffs are not rendered by default.

‎apps/server/integration/orphanedProviderSessionStartup.integration.test.ts‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import * as Stream from "effect/Stream";
2222
import * as SqlClient from "effect/unstable/sql/SqlClient";
2323
import { HttpServer } from "effect/unstable/http";
2424
import * as NetAddress from "effect/unstable/net/NetAddress";
25+
import { ChildProcessSpawner } from "effect/unstable/process";
2526

2627
import * as EnvironmentAuth from "../src/auth/EnvironmentAuth.ts";
2728
import * as ServiceLauncherClient from "../src/cloud/serviceLauncherClient.ts";
@@ -45,6 +46,7 @@ import * as ServerRuntimeStartup from "../src/serverRuntimeStartup.ts";
4546
import * as ServerSettings from "../src/serverSettings.ts";
4647
import * as AnalyticsService from "../src/telemetry/AnalyticsService.ts";
4748
import * as GitVcsDriver from "../src/vcs/GitVcsDriver.ts";
49+
import * as VcsProcess from "../src/vcs/VcsProcess.ts";
4850

4951
const providerInstanceId = ProviderInstanceId.make("codex");
5052
const projectId = ProjectId.make("project-startup-orphan");
@@ -111,6 +113,16 @@ const startupDependencies = Layer.mergeAll(
111113
),
112114
AnalyticsService.layerTest,
113115
Layer.mock(GitVcsDriver.GitVcsDriver)({}),
116+
Layer.mock(VcsProcess.VcsProcess)({
117+
run: () =>
118+
Effect.succeed({
119+
exitCode: ChildProcessSpawner.ExitCode(0),
120+
stdout: "git version 2.55.0\n",
121+
stderr: "",
122+
stdoutTruncated: false,
123+
stderrTruncated: false,
124+
}),
125+
}),
114126
Layer.succeed(ProviderService.ProviderService, {
115127
startSession: () => Effect.die("unused"),
116128
sendTurn: () => Effect.die("unused"),

‎apps/server/integration/providerService.integration.test.ts‎

Lines changed: 515 additions & 9 deletions
Large diffs are not rendered by default.

‎apps/server/package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"@opencode-ai/sdk": "^1.3.15",
3131
"diff": "8.0.3",
3232
"effect": "catalog:",
33+
"jsonc-parser": "^3.3.1",
3334
"node-pty": "^1.1.0",
3435
"stream-chain": "^4.2.5",
3536
"stream-json": "3.6.0",

0 commit comments

Comments
 (0)