Skip to content

fix(setup): reject NUL bytes in registration environments - #4335

Merged
morluto merged 2 commits into
morluto:mainfrom
ShuaixinHuang:codex/fix-registration-nul-environment
Oct 16, 2026
Merged

morluto merged 2 commits into
morluto:mainfrom
ShuaixinHuang:codex/fix-registration-nul-environment

Conversation

@ShuaixinHuang

@ShuaixinHuang ShuaixinHuang commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Reject NUL bytes in registration environment names and values before known-setting parsing drops custom keys. doctor reports configuration drift; setup --yes reports needs_human without writing configuration or backup files. Ordinary custom strings, empty values and repaired registrations remain accepted; rejected values are omitted from diagnostics.

The shared environment parser owns byte admission. DSH forwards unresolved expression names to that owner without evaluating expressions. Four changed files; no PR-specific dependency, schema, provider or generated-metadata changes. No target execution or new capability.

Executed evidence

Latest synchronized head: 2e8b0fa6cf9dac516c5c2329a47a0998df13ad98, including upstream main 8ab5024 and its shared browser/MCP lifecycle fixes. Pinned Windows Node 24.18.0/npm 11.16.0 and matching locked dependencies.

  • Original baseline: seven regression failures, plus an unresolved-expression-name case that fails an incomplete literal-only fix.
  • Current-head config/public-CLI selection: 80 passed / 3 failed. All five real setup/doctor NUL scenarios pass, including DSH expression names. Failures are two Hopper launcher platform expectations and an OpenCode merged-registration readiness expectation.
  • All three failures were reproduced with current upstream production in a separate checkout without this NUL change: 3 failed / 71 name-filtered. The full selected suite is not claimed green on Windows.
  • Current-head npm run check: 6/6 tasks and architecture guards passed. git diff --check passed.
  • Earlier pre-sync revision: 138 related environment/setup tests passed, and the dedicated Windows package verifier passed (207 real stdio-MCP tool contracts plus setup/idempotence/uninstall/update). These are historical, not reruns on the synchronized head. Generic package verification previously stopped on Windows symlink EPERM.

No external MCP client or real analysis engine was exercised. Current-head GitHub CI passed, including all five Linux shards and the required aggregate. Codex review completed with no findings; Greptile check passed.

Author readiness

Human owner: @ShuaixinHuang

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • One concrete reproduced defect, with shared producing-boundary validation and related DSH handling.
  • Normal custom values and repaired registrations remain accepted; invalid setup is non-writing.
  • Executed checks, failed attempts and unavailable coverage are reported above.
  • Human owner declares initial readiness.
  • Required current-head CI passes.

@ShuaixinHuang
ShuaixinHuang marked this pull request as ready for review October 16, 2026 02:56
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 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-16T05:25:45.686274Z 2e8b0fa New commits
ℹ️ 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.

@greptile-apps

greptile-apps Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] No code defect was found that blocks merging; the required CI gate still needs to pass.

Summary

Rejects NUL bytes in registration environment names and values before the known-setting schema drops custom keys.

  • Doctor and setup reject NUL bytes in registration environments.

Reviews (2) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile

@morluto
morluto merged commit 5c0fbf4 into morluto:main Oct 16, 2026
36 of 37 checks passed
@morluto

morluto commented Oct 20, 2026

Copy link
Copy Markdown
Owner

Thanks for tightening registration handling, @ShuaixinHuang. Rejecting NUL bytes at the shared environment parser prevents malformed custom settings from slipping past known-setting checks, and keeps their supplied values out of diagnostics.

@morluto morluto added area: setup Setup, packaging, upgrade, install, Doctor, and client registration bug Something isn't working labels Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: setup Setup, packaging, upgrade, install, Doctor, and client registration bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants