refactor(schedule): make absolute times explicit

This commit is contained in:
Tianyi Cui
2026-08-09 16:30:11 +08:00
parent 3d6498e91b
commit b7ec8429a9
109 changed files with 1248 additions and 3219 deletions

View File

@@ -196,8 +196,6 @@ export interface LaunchOptions {
paceMs?: number
/** Synthetic model capacity for UI scenarios whose seeded history must remain uncompacted. */
replayContextWindow?: number
/** Caller-owned keyless adapter for a fixture that must derive its response at stream time. */
fixtureAdapter?: LlmAdapter
/**
* Tool presentation mode patched onto the shipped `tools` row (`code`
* collapses the wire to run_code + the SDK prompt section). Omit for the
@@ -266,11 +264,6 @@ export async function launchWebScaffold(options: LaunchOptions = {}): Promise<We
if (mode === 'record' && options.deepSeekMissingCredential === true) {
throw new Error('deepSeekMissingCredential is a keyless replay/refresh option')
}
if (options.fixtureAdapter !== undefined
&& (mode === 'record' || options.replayFixture !== undefined
|| options.deepSeekMissingCredential === true)) {
throw new Error('fixtureAdapter is exclusive with record, replayFixture, and deepSeekMissingCredential')
}
const maskDeepSeekCredential = mode !== 'record' && options.deepSeekMissingCredential === true
const originalDeepSeekCredential = process.env.DEEPSEEK_API_KEY
let credentialEnvironmentRestored = false
@@ -449,8 +442,8 @@ export async function launchWebScaffold(options: LaunchOptions = {}): Promise<We
// issues no model calls, and one that slipped in must not pass quietly.
ctx.effect(() => ctx.llm.registerAdapter(
replayProviders(options.replayContextWindow).map(provider => provider.id),
options.fixtureAdapter ?? new RouteOnlyAdapter(replayProviders(options.replayContextWindow)),
), 'web e2e scaffold: fixture adapter')
new RouteOnlyAdapter(replayProviders(options.replayContextWindow)),
), 'web e2e scaffold: route-only adapter')
}
} catch (error) {
if (process.cwd() !== originalCwd) process.chdir(originalCwd)