You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "localhost-copilot (via GitHub)" <gi...@apache.org> on 2026/08/20 05:21:59 UTC

[PR] fix(eval): make install preflight path test portable on macOS [maka]

localhost-copilot opened a new pull request, #3283:
URL: https://github.com/apache/maka/pull/3283

   ## Summary
   
   Fix the Eval install preflight test on macOS by comparing the propagated network policy path with its canonical filesystem path.
   
   On macOS, `os.tmpdir()` can return `/var/folders/...`, while `realpath()` resolves the same location as `/private/var/folders/...`. Production intentionally returns the canonical path to support symlink-containment checks, so the test now reflects that contract instead of expecting the original path spelling.
   
   ## Verification
   
   - `npm run build:test` — passed
   - `node --test packages/eval/dist/__tests__/install-preflight.test.js` — 8 passed, 0 failed
   - Eval Node test suite — 75 passed, 0 failed
   - `git diff --check` — passed
   - The remaining Python checks from `test:dist` were not run successfully because the local Python 3.9.6 interpreter does not support the suite's `int | None` syntax.
   
   ## AI use
   
   Select exactly one:
   
   - [ ] No generative tool made a substantive contribution
   - [x] Generative tooling made a substantive contribution
   
   Tool(s) and scope: OpenAI Codex diagnosed the macOS path canonicalization mismatch, updated the test expectation, and ran the relevant build and test checks.
   
   ## Checklist
   
   - [x] Tests cover the change and fail without it
   - [x] Lint, format, typecheck and the affected suites pass locally
   
   Does this PR entail a change in behavior?
   
   - [ ] Yes — described under Summary above
   - [x] No


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] fix(eval): make install preflight path test portable on macOS [maka]

Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han merged PR #3283:
URL: https://github.com/apache/maka/pull/3283


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [PR] fix(eval): make install preflight path test portable on macOS [maka]

Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han commented on code in PR #3283:
URL: https://github.com/apache/maka/pull/3283#discussion_r3819534621


##########
packages/eval/src/__tests__/install-preflight.test.ts:
##########
@@ -48,7 +48,7 @@ test('preflights the pinned Python framework and Docker before execution', async
   assert.equal(calls[0]?.environment.MAKA_EVAL_EGRESS_ALLOWED_HOST, 'api.example.test');
   assert.equal(
     calls[0]?.environment.MAKA_EVAL_NETWORK_POLICY_PATH,
-    join(egress, 'network-policy.json'),
+    await realpath(join(egress, 'network-policy.json')),

Review Comment:
   [P3] Make the canonicalization contract observable on every platform, not just macOS. The expected value is now derived with the same primitive production uses, so where `tmpdir()` is already canonical — Linux CI, which is where this will usually run — `realpath(join(egress, ...))` equals `join(egress, ...)` and the assertion silently degrades to what it was before. A regression that dropped the canonicalization would then pass CI and fail only on a contributor's Mac, which is the situation this PR is fixing. Placing the egress directory behind a symlink the test creates itself makes the two spellings differ everywhere, so the assertion tests the contract rather than the platform.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org