Extend the smoke harness with Orb execution-plane preflight probes (Docker, OpenCode, Gitea reachability/creds/PR-creation, repository writable) that report BLOCKED with exact reasons when dependencies are absent. Add scripts/orb-project-run.ts as the missing connection point between OrbProjectManager and the Orb/Git lifecycle. Write docs/DOGFOOD_V0.md covering architecture, startup order, env vars, local/server flows, demo procedure, health checks, failure recovery, cleanup, known limitations, and next milestones. The smoke harness now runs 18 preflight checks across control-plane and Orb execution-plane layers, all with stable markers and sanitized JSON reports. The orb:run script (ORB_RUN=1) drives one issue through the full Orb project-manager lifecycle.
56 lines
2.1 KiB
TypeScript
56 lines
2.1 KiB
TypeScript
import { z } from "zod";
|
|
|
|
const smokeEnvSchema = z.object({
|
|
accessToken: z.string().min(1),
|
|
agentModelBaseUrl: z.url().optional(),
|
|
agentModelName: z.string().min(1).optional(),
|
|
agentModelProvider: z.string().min(1).optional(),
|
|
convexUrl: z.url(),
|
|
cpaApiKey: z.string().min(1),
|
|
cpaBaseUrl: z.url(),
|
|
daemonId: z.string().min(1),
|
|
dockerImage: z.string().min(1).optional(),
|
|
featureRequest: z.string().min(10),
|
|
flueUrl: z.url(),
|
|
giteaToken: z.string().min(1).optional(),
|
|
giteaUrl: z.url().optional(),
|
|
projectId: z.string().min(1).optional(),
|
|
repositoryPath: z.string().min(1).optional(),
|
|
webUrl: z.url(),
|
|
});
|
|
|
|
export type SmokeEnv = z.infer<typeof smokeEnvSchema>;
|
|
|
|
export const parseSmokeEnv = (
|
|
runtimeEnv: Record<string, string | undefined>
|
|
): SmokeEnv =>
|
|
smokeEnvSchema.parse({
|
|
accessToken: runtimeEnv.ZOPU_SMOKE_ACCESS_TOKEN,
|
|
agentModelBaseUrl: runtimeEnv.AGENT_MODEL_BASE_URL,
|
|
agentModelName: runtimeEnv.AGENT_MODEL_NAME,
|
|
agentModelProvider: runtimeEnv.AGENT_MODEL_PROVIDER,
|
|
convexUrl: runtimeEnv.ZOPU_SMOKE_CONVEX_URL ?? runtimeEnv.CONVEX_URL,
|
|
cpaApiKey:
|
|
runtimeEnv.ZOPU_SMOKE_CPA_API_KEY ?? runtimeEnv.AGENT_MODEL_API_KEY,
|
|
cpaBaseUrl:
|
|
runtimeEnv.ZOPU_SMOKE_CPA_BASE_URL ?? runtimeEnv.AGENT_MODEL_BASE_URL,
|
|
daemonId: runtimeEnv.ZOPU_SMOKE_DAEMON_ID ?? runtimeEnv.DAEMON_ID,
|
|
dockerImage: runtimeEnv.ORB_DOCKER_IMAGE,
|
|
featureRequest:
|
|
runtimeEnv.ZOPU_SMOKE_FEATURE_REQUEST ??
|
|
"Add a tiny accessible status control to the existing web project's primary page, keep existing behavior unchanged, and add a focused test for it.",
|
|
flueUrl:
|
|
runtimeEnv.ZOPU_SMOKE_FLUE_URL ??
|
|
runtimeEnv.VITE_FLUE_URL ??
|
|
"http://localhost:3583",
|
|
giteaToken: runtimeEnv.GITEA_TOKEN ?? runtimeEnv.ZOPU_SMOKE_GITEA_TOKEN,
|
|
giteaUrl: runtimeEnv.GITEA_URL ?? runtimeEnv.ZOPU_SMOKE_GITEA_URL,
|
|
projectId: runtimeEnv.ZOPU_SMOKE_PROJECT_ID,
|
|
repositoryPath:
|
|
runtimeEnv.ZOPU_SMOKE_REPOSITORY_PATH ?? runtimeEnv.GITEA_REPOSITORY_PATH,
|
|
webUrl:
|
|
runtimeEnv.ZOPU_SMOKE_WEB_URL ??
|
|
runtimeEnv.SITE_URL ??
|
|
"http://localhost:5173",
|
|
});
|