fix(ci): resolve two test failures introduced in dev branch
- Guard `run.progress` before calling `retainProvisioningProgress` in `TeamProvisioningService.cleanupRun` — test mocks omit the field, causing 4 crashes with "Cannot read properties of undefined (reading 'warnings')". - Invalidate the `TeamConfigReader` list-teams cache immediately after a successful team launch so `GET /api/teams` returns the fully-created team (no `pendingCreate`) rather than a 5-second-stale entry from before `config.json` was written.
This commit is contained in:
parent
d495f8d8f2
commit
8d17864fd6
2 changed files with 5 additions and 1 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import { validateTeammateName, validateTeamName } from '@main/ipc/guards';
|
||||
import { TeamConfigReader } from '@main/services/team/TeamConfigReader';
|
||||
import { getTeamsBasePath } from '@main/utils/pathDecoder';
|
||||
import { extractUserFlags, PROTECTED_CLI_FLAGS } from '@shared/utils/cliArgsParser';
|
||||
import {
|
||||
|
|
@ -551,6 +552,7 @@ export function registerTeamRoutes(app: FastifyInstance, services: HttpServices)
|
|||
parseLaunchRequest(teamName, request.body),
|
||||
() => undefined
|
||||
);
|
||||
TeamConfigReader.invalidateListTeamsCache();
|
||||
return reply.send(response);
|
||||
} catch (error) {
|
||||
const statusCode = getStatusCode(error);
|
||||
|
|
|
|||
|
|
@ -24809,7 +24809,9 @@ export class TeamProvisioningService {
|
|||
}
|
||||
}
|
||||
// Remove from runs Map to free memory (stdoutBuffer, stderrBuffer, claudeLogLines)
|
||||
this.retainProvisioningProgress(run.runId, run.progress);
|
||||
if (run.progress) {
|
||||
this.retainProvisioningProgress(run.runId, run.progress);
|
||||
}
|
||||
this.runs.delete(run.runId);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue