test(opencode): prove live team launch path
This commit is contained in:
parent
cdc0798016
commit
a88e9f74b7
1 changed files with 37 additions and 0 deletions
|
|
@ -142,16 +142,41 @@ liveDescribe('OpenCode team provisioning live e2e', () => {
|
||||||
),
|
),
|
||||||
progressDump
|
progressDump
|
||||||
).toBe(true);
|
).toBe(true);
|
||||||
|
expect(
|
||||||
|
progressEvents.some((progress) =>
|
||||||
|
progress.message.includes('Validating OpenCode team launch gate')
|
||||||
|
),
|
||||||
|
progressDump
|
||||||
|
).toBe(true);
|
||||||
|
expect(
|
||||||
|
progressEvents.some((progress) =>
|
||||||
|
progress.message.includes('Starting OpenCode sessions through runtime adapter')
|
||||||
|
),
|
||||||
|
progressDump
|
||||||
|
).toBe(true);
|
||||||
|
expect(progressDump).not.toContain('Starting Claude CLI process for team launch');
|
||||||
|
expect(progressDump).not.toContain('OpenCode team launch is not enabled');
|
||||||
|
|
||||||
const runtimeSnapshot = await svc.getTeamAgentRuntimeSnapshot(teamName);
|
const runtimeSnapshot = await svc.getTeamAgentRuntimeSnapshot(teamName);
|
||||||
|
expect(runtimeSnapshot.runId).toBe(runId);
|
||||||
expect(runtimeSnapshot.members.alice).toMatchObject({
|
expect(runtimeSnapshot.members.alice).toMatchObject({
|
||||||
alive: true,
|
alive: true,
|
||||||
|
providerId: 'opencode',
|
||||||
|
laneId: 'primary',
|
||||||
|
laneKind: 'primary',
|
||||||
runtimeModel: selectedModel,
|
runtimeModel: selectedModel,
|
||||||
|
historicalBootstrapConfirmed: true,
|
||||||
});
|
});
|
||||||
expect(runtimeSnapshot.members.bob).toMatchObject({
|
expect(runtimeSnapshot.members.bob).toMatchObject({
|
||||||
alive: true,
|
alive: true,
|
||||||
|
providerId: 'opencode',
|
||||||
|
laneId: 'primary',
|
||||||
|
laneKind: 'primary',
|
||||||
runtimeModel: selectedModel,
|
runtimeModel: selectedModel,
|
||||||
|
historicalBootstrapConfirmed: true,
|
||||||
});
|
});
|
||||||
|
expect(hasOpenCodeRuntimeHandle(runtimeSnapshot.members.alice)).toBe(true);
|
||||||
|
expect(hasOpenCodeRuntimeHandle(runtimeSnapshot.members.bob)).toBe(true);
|
||||||
await expect(
|
await expect(
|
||||||
readOpenCodeRuntimeLaneIndex(getTeamsBasePath(), teamName)
|
readOpenCodeRuntimeLaneIndex(getTeamsBasePath(), teamName)
|
||||||
).resolves.toMatchObject({
|
).resolves.toMatchObject({
|
||||||
|
|
@ -254,3 +279,15 @@ function createStableBridgeEnv(): NodeJS.ProcessEnv {
|
||||||
USERPROFILE: realHome,
|
USERPROFILE: realHome,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function hasOpenCodeRuntimeHandle(member: {
|
||||||
|
readonly pid?: number;
|
||||||
|
readonly runtimePid?: number;
|
||||||
|
readonly runtimeSessionId?: string;
|
||||||
|
}): boolean {
|
||||||
|
return (
|
||||||
|
(typeof member.pid === 'number' && member.pid > 0) ||
|
||||||
|
(typeof member.runtimePid === 'number' && member.runtimePid > 0) ||
|
||||||
|
(typeof member.runtimeSessionId === 'string' && member.runtimeSessionId.trim().length > 0)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue