Skip to content

fix(proxy): isolate server-info per workflow attempt and verify proxy PID liveness - #164

Open
Alphaxiaoteng wants to merge 1 commit into
openai:mainfrom
Alphaxiaoteng:fix/proxy-state-isolation-and-liveness-check
Open

fix(proxy): isolate server-info per workflow attempt and verify proxy PID liveness#164
Alphaxiaoteng wants to merge 1 commit into
openai:mainfrom
Alphaxiaoteng:fix/proxy-state-isolation-and-liveness-check

Conversation

@Alphaxiaoteng

Copy link
Copy Markdown

Summary

  1. Isolates Responses proxy server-info across workflow re-run attempts (Fixes Server-info state collides across workflow re-run attempts #144): Replaced raw ${{ github.run_id }} in server-info file keying with ${{ github.run_id }}-${{ github.run_attempt }}. This guarantees that self-hosted / persistent runners do not collide with or reuse stale state from prior failed/cancelled workflow attempts.
  2. Validates Responses proxy PID liveness and purges stale server-info (Fixes Stale server-info files can make later action invocations reuse a dead Responses proxy #133): Added check-proxy-status subcommand. Instead of blindly assuming any existing file means the proxy is running, it inspects the recorded pid and probes process liveness via process.kill(pid, 0). If the PID is dead, it automatically removes the stale file and triggers a fresh proxy launch.

Changes

  • action.yml:
    • Keyed server-info file with CODEX_RUN_ID: ${{ github.run_id }}-${{ github.run_attempt }}.
    • Replaced naive [ -s "$SERVER_INFO_FILE" ] check with node "$ACTION_PATH/dist/main.js" check-proxy-status "$SERVER_INFO_FILE".
  • src/main.ts:
    • Added check-proxy-status CLI command verifying process liveness and auto-cleaning dead PID state.
  • test/proxyLiveness.test.mjs:
    • Added unit tests for alive proxy verification and dead PID detection / stale file purging.

Verification

  • npm run build completed cleanly.
  • npm test passed: 146/146 tests passing.

@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@Alphaxiaoteng
Alphaxiaoteng force-pushed the fix/proxy-state-isolation-and-liveness-check branch from 2f0e6e9 to 8e0a529 Compare August 25, 2026 07:52
@Alphaxiaoteng

Copy link
Copy Markdown
Author

recheck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Server-info state collides across workflow re-run attempts Stale server-info files can make later action invocations reuse a dead Responses proxy

1 participant