fix(ci): restore dev test expectations
This commit is contained in:
parent
933e580d03
commit
dc7c9b3c3d
6 changed files with 44 additions and 7 deletions
|
|
@ -734,6 +734,38 @@ export class CliInstallerService {
|
|||
};
|
||||
}
|
||||
|
||||
private getLatestProviderStatusForModelVerification(
|
||||
providerId: CliProviderId,
|
||||
binaryPath: string,
|
||||
installedVersion: string | null
|
||||
): CliProviderStatus | null {
|
||||
const snapshot = this.latestStatusSnapshot;
|
||||
if (
|
||||
!snapshot ||
|
||||
snapshot.flavor !== 'agent_teams_orchestrator' ||
|
||||
snapshot.binaryPath !== binaryPath ||
|
||||
snapshot.installedVersion !== installedVersion
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const provider =
|
||||
cloneCliInstallationStatus(snapshot).providers.find(
|
||||
(candidate) => candidate.providerId === providerId
|
||||
) ?? null;
|
||||
if (
|
||||
!provider ||
|
||||
provider.models.length <= 0 ||
|
||||
provider.supported !== true ||
|
||||
provider.authenticated !== true ||
|
||||
provider.capabilities.oneShot !== true
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return provider;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Public: getStatus
|
||||
// ---------------------------------------------------------------------------
|
||||
|
|
@ -844,10 +876,12 @@ export class CliInstallerService {
|
|||
return nextProviderStatus;
|
||||
}
|
||||
|
||||
const providerStatus = await this.multimodelBridgeService.getProviderStatus(
|
||||
binaryPath,
|
||||
providerId
|
||||
);
|
||||
const providerStatus =
|
||||
this.getLatestProviderStatusForModelVerification(
|
||||
providerId,
|
||||
binaryPath,
|
||||
versionProbe.version
|
||||
) ?? (await this.multimodelBridgeService.getProviderStatus(binaryPath, providerId));
|
||||
const nextProviderStatus = this.applyProviderModelAvailabilityToProvider(
|
||||
binaryPath,
|
||||
versionProbe.version,
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ vi.mock('../../../../src/main/services/team/atomicWrite', () => ({
|
|||
|
||||
vi.mock('../../../../src/main/services/team/fileLock', () => ({
|
||||
withFileLock: async (_path: string, fn: () => Promise<unknown>) => await fn(),
|
||||
withFileLockSync: (_path: string, fn: () => unknown) => fn(),
|
||||
}));
|
||||
|
||||
vi.mock('../../../../src/main/services/team/inboxLock', () => ({
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ vi.mock('../../../../src/main/services/team/atomicWrite', () => ({
|
|||
|
||||
vi.mock('../../../../src/main/services/team/fileLock', () => ({
|
||||
withFileLock: async (_filePath: string, fn: () => Promise<unknown>) => await fn(),
|
||||
withFileLockSync: (_filePath: string, fn: () => unknown) => fn(),
|
||||
}));
|
||||
|
||||
vi.mock('../../../../src/main/services/team/inboxLock', () => ({
|
||||
|
|
|
|||
|
|
@ -346,7 +346,7 @@ describe('TeamProvisioningService post-compact lifecycle', () => {
|
|||
expect(text).not.toContain('continue with any pending work');
|
||||
// Should be context-only
|
||||
expect(text).toContain('Do NOT start new work');
|
||||
expect(text).toContain('Reply with a single word');
|
||||
expect(text).toContain('Reply with one concise user-facing team status line');
|
||||
// Should contain persistent context
|
||||
expect(text).toContain('Constraints:');
|
||||
expect(text).toContain('Do NOT call TeamDelete');
|
||||
|
|
|
|||
|
|
@ -288,7 +288,7 @@ describe('TeamProvisioningService prompt content (solo mode discipline)', () =>
|
|||
);
|
||||
expect(prompt).toContain('Do NOT start implementation in this turn.');
|
||||
expect(prompt).toContain(
|
||||
'Use this turn only to refresh context, review the current board snapshot, and confirm you are ready.'
|
||||
'Use this turn only to review the current board snapshot and confirm operational readiness.'
|
||||
);
|
||||
expect(prompt).toContain(
|
||||
'Do NOT create, assign, or delegate any new task in this turn. If the board is empty, stay silent and wait for a fresh user instruction.'
|
||||
|
|
@ -866,7 +866,7 @@ describe('TeamProvisioningService prompt content (solo mode discipline)', () =>
|
|||
);
|
||||
expect(prompt).toContain('Do NOT use Agent to spawn or restore teammates.');
|
||||
expect(prompt).toContain(
|
||||
'Use this turn only to refresh context and review the current board snapshot.'
|
||||
'Use this turn only to review the current board snapshot and teammate readiness.'
|
||||
);
|
||||
expect(prompt).toContain(
|
||||
'Do NOT create, assign, or delegate any new task in this turn. If the board is empty, stay silent and wait for a fresh user instruction.'
|
||||
|
|
|
|||
|
|
@ -113,6 +113,7 @@ vi.mock('../../../../src/main/services/team/atomicWrite', () => ({
|
|||
|
||||
vi.mock('../../../../src/main/services/team/fileLock', () => ({
|
||||
withFileLock: async (_filePath: string, fn: () => Promise<unknown>) => await fn(),
|
||||
withFileLockSync: (_filePath: string, fn: () => unknown) => fn(),
|
||||
}));
|
||||
|
||||
vi.mock('../../../../src/main/services/team/inboxLock', () => ({
|
||||
|
|
|
|||
Loading…
Reference in a new issue