Skip to content

fix(preflight): validate paths and input combinations before side-effecting steps - #165

Open
Alphaxiaoteng wants to merge 1 commit into
openai:mainfrom
Alphaxiaoteng:fix/early-input-and-path-validation-preflight
Open

fix(preflight): validate paths and input combinations before side-effecting steps#165
Alphaxiaoteng wants to merge 1 commit into
openai:mainfrom
Alphaxiaoteng:fix/early-input-and-path-validation-preflight

Conversation

@Alphaxiaoteng

Copy link
Copy Markdown

Summary

  1. Rejects invalid paths early before proxy startup or irreversible side effects (Fixes Invalid prompt-file and working-directory paths fail only after setup side effects #141): Added preflight validation to ensure non-empty prompt-file and working-directory paths exist and are accessible before installing packages, starting the Responses proxy, or running the irreversible drop-sudo step.
  2. Fails early on mutually exclusive or invalid input combinations (Fixes Mutually exclusive inputs are rejected only after irreversible setup steps #139): Added preflight checks to immediately reject invalid combinations (e.g. prompt + prompt-file, output-schema + output-schema-file, permission-profile + sandbox, permission-profile with read-only) right after Node setup, preventing unexpected mutations to the runner before reporting input errors.

Changes

  • src/main.ts:
    • Added validate-inputs subcommand checking mutual exclusivity and path existence.
  • action.yml:
    • Added Preflight validate inputs step immediately after actions/setup-node, executing before check-write-access, proxy installation, or drop-sudo.
  • test/validateInputsPreflight.test.mjs:
    • Added 5 unit tests covering mutually exclusive input rejections, missing path failures, and successful preflights.

Verification

  • npm run build cleanly compiled with esbuild.
  • npm test passed: 149/149 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/early-input-and-path-validation-preflight branch from 3195003 to f8f1bf8 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

1 participant