mirror of
https://github.com/stablyai/orca.git
synced 2026-10-07 08:02:21 +00:00
fix(agent-hooks): preserve Windows background worker stdin contract
This commit is contained in:
@@ -104,6 +104,9 @@ describe('Grok vendor hook replay guard', () => {
|
||||
|
||||
expectGuardBeforeTransport(claude, WINDOWS_GROK_GUARD, 'echo {}')
|
||||
expectGuardBeforeTransport(cursor, WINDOWS_GROK_GUARD, '(echo {})')
|
||||
const backgroundWorkerGuardIndex = claude.indexOf('CLAUDE_JOB_DIR')
|
||||
expect(backgroundWorkerGuardIndex).toBeGreaterThan(-1)
|
||||
expect(backgroundWorkerGuardIndex).toBeLessThan(claude.indexOf(WINDOWS_GROK_GUARD))
|
||||
})
|
||||
|
||||
it.skipIf(process.platform === 'win32')(
|
||||
|
||||
@@ -33,12 +33,12 @@ export function getManagedScript(
|
||||
// Why (#11549): the env guards must outrank the Devin skip — the Devin skip parks in more.com,
|
||||
// and outside an Orca pane the caller can abandon stdin, so more.com never returns.
|
||||
...buildWindowsHookEnvironmentGuardLines(),
|
||||
...(options.skipWhenGrokImportsClaude ? buildWindowsGrokReplayGuardLines() : []),
|
||||
// Why: a backgrounded session runs in a daemon worker that inherited the dispatching
|
||||
// pane's env, so ORCA_PANE_KEY names a pane this session does not run in (#9236).
|
||||
// Why exit, not the drain label: the drain parks in more.com and a worker is outside
|
||||
// an Orca pane — the abandoned-stdin hang #11549 guards against.
|
||||
'if not "%CLAUDE_JOB_DIR%"=="" exit /b 0',
|
||||
...(options.skipWhenGrokImportsClaude ? buildWindowsGrokReplayGuardLines() : []),
|
||||
...(options.skipWhenDevinImportsClaude
|
||||
? [
|
||||
// Why: Devin imports .claude hooks by default; skip Orca's managed hook there so status posts stay attributed to Devin.
|
||||
|
||||
Reference in New Issue
Block a user