Skip to content

fix(cli): normalize empty Windows profile before imports - #2482

Merged
N0zoM1z0 merged 2 commits into
mainfrom
fix/windows-empty-profile-startup-2345
Oct 13, 2026
Merged

N0zoM1z0 merged 2 commits into
mainfrom
fix/windows-empty-profile-startup-2345

Conversation

@N0zoM1z0

@N0zoM1z0 N0zoM1z0 commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #2345; thanks to @gefrezim for identifying the import-time Windows home lookup failure.

  • Treat USERPROFILE="" as unset at the executable dispatcher, before dependency imports. Windows Node otherwise throws uv_os_homedir during Incur import, before REA's existing account-home fallback can run.
  • Preserve every nonempty selection and use the existing home resolver. No new lookup, fallback abstraction, filesystem query, retry or cache.
  • Reuse tests/acceptance/setup/homeDirectoryFallback.test.ts in the actual Windows curated CI lane. Its public setup dry-run already covers the failure; no duplicate startup test is added.

Real Windows verification

Fresh main baseline 172407787f1842dedbcd27b5385177595f786ce4, Windows 11 10.0.22631.0, official Windows x64 Node 24.18.0, locked production dependencies:

Profile input (HOME empty) Baseline CLI version/help Corrected CLI version/help
Unset Both exit 0 Both exit 0
Empty Both exit 1, uv_os_homedir Both exit 0, no stderr
Nonempty owned profile Both exit 0 Both exit 0
  • Real setup dry runs with empty/nonempty selections choose the expected home, preserve existing configuration bytes and create no configuration under the working directory. No installation was performed.
  • Actual SDK 2.3.1 stdio MCP discovery passes all three inputs before and after: 187 tools, 2,545,790 serialized bytes, identical catalogue digest. MCP was already healthy; no MCP startup repair is claimed.
  • Nine related tests pass: existing home-fallback acceptance, production MCP doctor and curated CI path checks.
  • Runtime build, static gate and documentation checks pass.
  • No IDA or Ghidra engine was used for this CLI startup fix.

Efficiency and limits

Verification and resource record pins the tested dispatcher digest and scope. Version/help replies remain 6 / 15,497 bytes. Corrected single-CLI exit-time resource observations range from 7.968–9.874 seconds CPU and 299,956–301,852 KiB peak working set; these exclude the probe parent. Probes ran serially, BelowNormal, one CPU, 512 MiB child heaps. Baseline resources were not paired and caches were not normalized: no latency, CPU or memory improvement is claimed. Bytes are not model tokens; actual model usage was not measured. Personal paths and ambient environment were not included in the record.

Review / CI follow-up

The original CI shard correctly rejected our missing package-scope registration for the added Windows test entry. Fixed in aca75a5f0 by registering the path in SCOPES.package. All 84 CI scope tests and two curated-path checks now pass. Runtime source and its real-Windows tested dispatcher digest are unchanged.

Final current-head verification: Windows lane executes the home-fallback regression (one Windows test passes; the POSIX lifecycle case is intentionally skipped). The unrelated in-memory server identity 10-second timeout passed on a failed-job rerun without source changes; the current-head CI and coverage gates are green. Current-head Codex review completed with no further findings and the ownership thread is resolved.

Follow up on #2345 and its import-time home lookup diagnosis by @gefrezim. Reuse the existing setup home-fallback acceptance test in the real Windows curated CI lane.

Verified real Windows Node 24.18.0 CLI empty/unset/nonempty controls, setup dry-run home selection and unchanged configuration, and SDK MCP catalog parity. Nine focused tests and static/docs checks passed. No IDA or Ghidra engine was used; resource observations and limits are recorded in experiments/analysis-efficiency/windows-empty-profile.md.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@N0zoM1z0

Copy link
Copy Markdown
Collaborator Author

@codex review

Please check the earliest import boundary, preservation of nonempty caller selections, and reuse of the existing public setup regression in the real Windows lane. Real baseline/fixed CLI and MCP controls plus resource measurement limits are recorded in the PR.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T04:25:55.962503Z aca75a5 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e3ce11c7b7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/ci.yml Resolved
Register the existing acceptance test in SCOPES.package alongside its Windows curated execution entry. This fixes the review finding and original CI ownership failure. All 84 CI scope checks and two curated-path checks pass; runtime code and real-Windows verification remain unchanged.
@N0zoM1z0

Copy link
Copy Markdown
Collaborator Author

@codex review

The package-scope registration finding is fixed in aca75a5. All 84 CI scope checks and two curated-path checks pass. Please review the current head; runtime source remains identical to the real-Windows verified dispatcher.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: aca75a5f0c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@N0zoM1z0
N0zoM1z0 merged commit fa4b828 into main Oct 13, 2026
70 of 73 checks passed
@N0zoM1z0
N0zoM1z0 deleted the fix/windows-empty-profile-startup-2345 branch October 13, 2026 04:43
@morluto morluto mentioned this pull request Oct 13, 2026
3 tasks done
@morluto morluto added bug Something isn't working area: cli CLI adapter and one-shot commands labels Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli CLI adapter and one-shot commands bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants