revert: roll back DB merge, keep useful improvements

Fully revert DB merge patch (WAL, composite PK, SERVICE_ID in IPC/
router_state/sessions). Return to proven split-DB architecture.

Keep:
- Docker/Apple Container cleanup
- Usage dashboard CLAUDE_CODE_OAUTH_TOKEN fallback
- Codex runner heartbeat
- Agent-runner stderr timeout reset
This commit is contained in:
Eyejoker
2026-03-15 22:35:53 +09:00
parent e2d6476cdf
commit 9a6d9f4c4b
7 changed files with 60 additions and 299 deletions

View File

@@ -174,13 +174,19 @@ async function executeTurn(
): Promise<{ result: string; error?: string }> {
const ac = new AbortController();
// Poll close sentinel during turn
// Poll close sentinel + heartbeat during turn
let turnSeconds = 0;
const sentinel = setInterval(() => {
if (shouldClose()) {
log('Close sentinel detected during turn, aborting');
ac.abort();
return;
}
}, IPC_POLL_MS);
turnSeconds += 5;
if (turnSeconds % 60 === 0) {
log(`Turn in progress... (${Math.round(turnSeconds / 60)}min)`);
}
}, 5000);
try {
const turn = await thread.run(input, { signal: ac.signal });