Skip to content

Address Copilot review comments from #34#35

Merged
matt-gribben merged 1 commit into
mainfrom
hypatomic/issue-26-followup
Jul 1, 2026
Merged

Address Copilot review comments from #34#35
matt-gribben merged 1 commit into
mainfrom
hypatomic/issue-26-followup

Conversation

@matt-gribben

Copy link
Copy Markdown
Collaborator

Follow-up to #34 addressing the valid Copilot review comments:

Fixed:

  • Case-insensitive none sentinel (policy.ts): HYPA_PI_CONFIG=NONE / None / none all now disable config file loading.
  • .bat and uppercase extensions in getExecArgs (rewrite-client.ts): Windows .bat wrapper scripts are now handled, and extension matching is case-insensitive (.JS, .CMD, .BAT all work).
  • MCP proxy bypassing getExecArgs (mcp-proxy-bridge.ts): runHypaMcpJson now routes through getExecArgs so Windows .js/.cmd/.bat shims don't produce EFTYPE errors in MCP proxy calls.

Not changed (by design):

  • loadConfigFile still throws on malformed JSON with a descriptive message. Silently swallowing a parse error would hide user typos and make config failures undiagnosable. The descriptive error is intentional.
  • C# JsonConfigLoader changes were already merged with Add JSON config file support to pi-hypa extension #34 and are out of scope here.

- Make HYPA_PI_CONFIG sentinel 'none' case-insensitive so NONE/None
  also disable config file loading
- Handle uppercase and .bat extensions in getExecArgs on Windows
- Use getExecArgs in MCP proxy bridge (runHypaMcpJson) so Windows
  .js/.cmd/.bat binary paths are wrapped correctly

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 1, 2026 00:25
@matt-gribben matt-gribben added the bug Something isn't working label Jul 1, 2026
@matt-gribben matt-gribben merged commit de40e7b into main Jul 1, 2026
8 checks passed
@matt-gribben matt-gribben deleted the hypatomic/issue-26-followup branch July 1, 2026 00:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Follow-up to PR #34 to harden the pi-hypa extension’s config loading and Windows execution behavior, ensuring consistent handling of disable-sentinels and Windows shim scripts across normal and MCP proxy execution paths.

Changes:

  • Made HYPA_PI_CONFIG=none sentinel handling case-insensitive when resolving the config file path.
  • Updated Windows executable argument normalization to treat .js/.cmd/.bat extensions case-insensitively and added .bat support.
  • Routed MCP proxy execution through getExecArgs and added tests covering the new Windows behaviors and sentinel variants.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/pi-hypa/test/rewrite-client.test.ts Adds Windows .bat + uppercase extension coverage for getExecArgs.
packages/pi-hypa/test/policy.test.ts Adds coverage for case-insensitive HYPA_PI_CONFIG=none sentinel behavior.
packages/pi-hypa/extensions/rewrite-client.ts Makes Windows extension matching case-insensitive and adds .bat handling.
packages/pi-hypa/extensions/policy.ts Updates config disable sentinel check to be case-insensitive.
packages/pi-hypa/extensions/mcp-proxy-bridge.ts Ensures MCP proxy calls use getExecArgs to avoid Windows shim execution issues.

export function resolveConfigFilePath(env: NodeJS.ProcessEnv): string | undefined {
const fromEnv = env.HYPA_PI_CONFIG?.trim();
if (fromEnv === "" || fromEnv === "none") return undefined;
if (fromEnv === "" || fromEnv.toLowerCase() === "none") return undefined;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants