ci: reuse Windows hook builds and shorten test setup and shutdown (#29439)

* ci: remove Windows build and persistence test overhead

* ci: collect unit phase diagnostics during PR checks

* test(ci): seed hook reuse fixture from the canonical prebuild

The hook reuse regression first built into a missing private --output, so it
always reached Cargo (74s warm on Windows). Build through the default output
instead, which reuses a warm canonical prebuild, then copy its executable and
fingerprint into the private fixture root.

* fix(lint): clear inherited max-lines and broad object tab parameter after main merge

Combine the duplicate shared/execution-host imports in runtime-host-services
(301 -> 300 lines) and type the overlap test's tab mapper with the
RuntimeMobileSessionClientTab owner type instead of object.

* fix(ci): align inherited runtime and workflow contracts

* test: establish changed runtime probe signatures deterministically

* test: await asynchronous daemon profile cleanup

* test: shut down owned daemons before deleting profiles

* test: clean up oracle daemons during final app close

* test: recognize verified Linux zombie exit during daemon teardown

* fix: preserve folder SSH ownership when project groups conflict
This commit is contained in:
Neil
2026-10-16 02:52:22 -07:00
committed by GitHub
parent f387c5d19b
commit b16a71c7fb
25 changed files with 512 additions and 70 deletions
+14 -7
View File
@@ -1,4 +1,4 @@
import { mkdirSync, mkdtempSync, rmSync, unlinkSync } from 'node:fs'
import { mkdirSync, mkdtempSync, rmSync, statSync, unlinkSync, utimesSync } from 'node:fs'
import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { afterEach, beforeEach, describe, expect, it } from 'vitest'
@@ -437,6 +437,17 @@ describe('scanOpenCodeUsageDatabases', () => {
return path
}
function appendLiveSessionRow(path: string, sessionId: string, inputTokens: number): void {
const previousMtimeMs = statSync(path).mtimeMs
const db = new Database(path)
insertSessionTotalsRow(db, sessionId, inputTokens)
db.close()
// Why: the row fits the existing page and can land in the same coarse mtime
// tick, so pin a later mtime to change the scanner's mtime+size fingerprint.
const changedAt = new Date(previousMtimeMs + 1000)
utimesSync(path, changedAt, changedAt)
}
it('does not scan disk databases when OPENCODE_DB uses memory', async () => {
writeSessionTotalsDb('opencode.db', [])
process.env.OPENCODE_DB = ':memory:'
@@ -491,9 +502,7 @@ describe('scanOpenCodeUsageDatabases', () => {
// The canonical db keeps growing while the backup stays cached; session-1
// must stay owned by the canonical db.
const db = new Database(canonicalPath)
insertSessionTotalsRow(db, 'session-2', 200)
db.close()
appendLiveSessionRow(canonicalPath, 'session-2', 200)
const third = await scanOpenCodeUsageDatabases([], second.processedDatabases)
expect(
@@ -517,9 +526,7 @@ describe('scanOpenCodeUsageDatabases', () => {
)
expect(firstBackup?.ownedSessionIds).toEqual([])
const db = new Database(canonicalPath)
insertSessionTotalsRow(db, 'session-2', 200)
db.close()
appendLiveSessionRow(canonicalPath, 'session-2', 200)
const second = await scanOpenCodeUsageDatabases([], first.processedDatabases)
const secondBackup = second.processedDatabases.find((database) =>