perf: cap generated hook posts (#4166)

Generated agent hook POSTs now use short curl and PowerShell request timeouts so best-effort status hooks cannot hold agent subprocesses open on a stalled local listener.
This commit is contained in:
Neil
2026-05-31 06:40:02 -07:00
committed by GitHub
parent 92b05098db
commit d1b9392b49
9 changed files with 22 additions and 3 deletions
+2
View File
@@ -163,7 +163,9 @@ function getManagedScript(target: 'local' | 'posix' = 'local'): string {
'if [ -z "$payload" ]; then',
' exit 0',
'fi',
// Timeout caps best-effort hook posts if the local listener stalls.
'curl -sS -X POST "http://127.0.0.1:${ORCA_AGENT_HOOK_PORT}/hook/command-code" \\',
' --connect-timeout 0.5 --max-time 1.5 \\',
' -H "Content-Type: application/x-www-form-urlencoded" \\',
' -H "X-Orca-Agent-Hook-Token: ${ORCA_AGENT_HOOK_TOKEN}" \\',
' --data-urlencode "paneKey=${ORCA_PANE_KEY}" \\',