fix: run ts-topology entrypoint on Windows#105397
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 12, 2026, 7:58 PM ET / 23:58 UTC. Summary PR surface: Tests +17, Config 0, Other +2. Total +19 across 5 files. Reproducibility: yes. Invoking Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Refresh the branch against current main, retain the canonical Do we have a high-confidence way to reproduce the issue? Yes. Invoking Is this the best way to solve the issue? Yes. Converting the CLI path with Node’s AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f87492539ba2. Label changesLabel justifications:
Evidence reviewedPR surface: Tests +17, Config 0, Other +2. Total +19 across 5 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
6dab010 to
7734774
Compare
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
7734774 to
7728ab9
Compare
|
Maintainer pass complete; this is land-ready.
Thank you @VectorPeak for the fix. |
|
Merged via squash.
|
* fix: run ts-topology entrypoint on Windows Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> * refactor: tighten ts-topology entrypoint guard --------- Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Fixes an issue where Windows developers running the
ts-topologypackage script directly could get a silent no-op because the ESM direct-run guard comparedimport.meta.urlagainst a manually concatenatedfile://path that does not match Windows file URL formatting.Why This Change Was Made
The direct-run guard now converts
process.argv[1]with Node'spathToFileURL(...)before comparing it toimport.meta.url, matching Node's cross-platform path-to-file-URL boundary instead of manually concatenating a file URL. This keeps the behavior change scoped to thets-topologyentrypoint and does not change topology analysis logic.The regression test is also included in
test:windows:ci, so the Windows-only entrypoint behavior is covered by the Windows CI selection rather than only by POSIX-friendly unit-fast runs.User Impact
Developers and automation can run
pnpm ts-topologyornode --import tsx scripts/ts-topology.ts ...on Windows and have the CLI execute instead of exiting successfully with no output.Imported usage through
main(...)is unchanged.Evidence
Before on Windows, the direct script invocation skipped the CLI entrypoint and exited silently:
Observed before:
After on Windows, the same entrypoint reaches the CLI parser and prints usage:
Observed after:
Call chain / sibling surfaces checked:
The PR affects only direct CLI execution. The imported
main(...)test path and topology analysis/reporting helpers remain unchanged.Validation:
Local limitation:
pnpm test:windows:cireaches the updatedtest:windows:ciselection locally, but this Windows machine's WSL harness path currently emitsnode is required to run cross-OS release checksfromtest/scripts/openclaw-cross-os-release-workflow.test.ts; the failure occurs in the pre-existing release-harness execution path and is unrelated to thets-topologycode path changed here.