fix: resolve Greptile P1 close() timer leak, engine git init, dashboard test
- store.ts close(): clear retry timer and buffer before nulling _db to prevent re-opening a new connection after close (Greptile P1) - merger-staging-allowlist.test.ts: use `git init -b main` so the default branch is always named 'main' regardless of git config - SettingsModal.test.tsx: fix expected text for compact DroidCli card — shows "✓ Active" badge, not "✓ Connected — 1.2.3" Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -6251,9 +6251,15 @@ ${stepsSection}`;
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
// Best-effort flush — entries for deleted tasks will fail FK check.
|
// Best-effort flush — entries for deleted tasks will fail FK check.
|
||||||
// Log the error instead of silently swallowing it.
|
// Log the error instead of silently swallowing it.
|
||||||
console.warn(`[fusion] Could not flush remaining agent log entries on close (${this.db.path}):`, err);
|
console.warn(`[fusion] Could not flush remaining agent log entries on close:`, err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Cancel any retry timer armed by a failed flush — the DB is about to close.
|
||||||
|
if (this.agentLogFlushTimer) {
|
||||||
|
clearTimeout(this.agentLogFlushTimer);
|
||||||
|
this.agentLogFlushTimer = null;
|
||||||
|
}
|
||||||
|
this.agentLogBuffer.length = 0;
|
||||||
if (this._db) {
|
if (this._db) {
|
||||||
this._db.close();
|
this._db.close();
|
||||||
this._db = null;
|
this._db = null;
|
||||||
|
|||||||
@@ -1097,7 +1097,7 @@ describe("SettingsModal", () => {
|
|||||||
extension: { status: "ok" },
|
extension: { status: "ok" },
|
||||||
ready: true,
|
ready: true,
|
||||||
},
|
},
|
||||||
expectedText: "✓ Connected — 1.2.3",
|
expectedText: "✓ Active",
|
||||||
},
|
},
|
||||||
])("renders plugin-driven droid card state: $name", async ({ status, expectedText }) => {
|
])("renders plugin-driven droid card state: $name", async ({ status, expectedText }) => {
|
||||||
mockFetchAuthStatus.mockResolvedValueOnce({
|
mockFetchAuthStatus.mockResolvedValueOnce({
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ function initRepo(dir: string): string {
|
|||||||
const git = (cmd: string) =>
|
const git = (cmd: string) =>
|
||||||
execSync(cmd, { cwd: dir, stdio: "pipe" }).toString().trim();
|
execSync(cmd, { cwd: dir, stdio: "pipe" }).toString().trim();
|
||||||
|
|
||||||
git("git init");
|
git("git init -b main");
|
||||||
git('git config user.email "test@example.com"');
|
git('git config user.email "test@example.com"');
|
||||||
git('git config user.name "Test"');
|
git('git config user.name "Test"');
|
||||||
git('git config commit.gpgsign false');
|
git('git config commit.gpgsign false');
|
||||||
|
|||||||
Reference in New Issue
Block a user