Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

fix(desktop): resolve CI typecheck and test failures from recent changes

Yuewei-LL6ca60ada7fd2
diff --git a/apps/desktop/src/main/cindy-brain/__tests__/nodeRuntimePackaging.test.ts b/apps/desktop/src/main/cindy-brain/__tests__/nodeRuntimePackaging.test.ts
index 917c5fac51..2c12afcd06 100644
--- a/apps/desktop/src/main/cindy-brain/__tests__/nodeRuntimePackaging.test.ts
+++ b/apps/desktop/src/main/cindy-brain/__tests__/nodeRuntimePackaging.test.ts
@@ -29,7 +29,7 @@ describe('Node runtime packaging contract', () => {
expect(worker).toContain('parentPort');
expect(worker).toContain('verifyParent');
expect(worker).toContain('sameForgeScaffoldParentIdentity');
- expect(worker).toContain('fs.promises.rename(staging, request.targetName)');
+ expect(worker).toContain('fs.promises.mkdir(request.targetName)');
expect(worker).not.toContain('ELECTRON_RUN_AS_NODE');
const capability = fs.readFileSync(
path.join(desktopRoot, 'src/main/cindy-brain/forgeScaffoldCapability.ts'),
diff --git a/apps/desktop/src/main/device-link/crossProcessLock.ts b/apps/desktop/src/main/device-link/crossProcessLock.ts
index 7ae3f06acb..d61466bf5b 100644
--- a/apps/desktop/src/main/device-link/crossProcessLock.ts
+++ b/apps/desktop/src/main/device-link/crossProcessLock.ts
@@ -508,7 +508,7 @@ async function findActiveReclaimGate(dirPath: string): Promise<string | null> {
// A leftover .released sidecar from a previous gate instance shares the
// same locked file name — its nonce must match the current gate record's
// nonce, else it belongs to a different instance and must be ignored.
- const expectedNonce = typeof record !== 'string' ? record.nonce : undefined;
+ const expectedNonce = typeof record !== 'string' ? (record.nonce ?? undefined) : undefined;
if (await hasValidGateReleaseMarker(filePath, expectedNonce)) {
await removePathWithRetry(filePath);
await removePathWithRetry(gateReleaseMarkerPath(filePath));