Skip to content

fix(napi): return undefined for missing envs#508

Merged
wan9chi merged 1 commit into
mainfrom
codex/fix-napi-env-undefined
Jul 4, 2026
Merged

fix(napi): return undefined for missing envs#508
wan9chi merged 1 commit into
mainfrom
codex/fix-napi-env-undefined

Conversation

@wan9chi

@wan9chi wan9chi commented Jul 4, 2026

Copy link
Copy Markdown
Member

Motivation

Missing env vars requested through @voidzero-dev/vite-task-client need to be exposed as JavaScript undefined, matching the package contract. The napi binding previously returned Rust Option<String> directly, which lets absent values cross the native boundary as null and can break callers that check specifically for undefined.

Changes

  • Return Either<String, Undefined> from the napi getEnv binding so absent envs are created as real JavaScript undefined.
  • Add an e2e snapshot fixture that verifies a missing runner-served env is observed as undefined through the public client package.
  • Add a changelog entry for the user-facing fix.

wan9chi commented Jul 4, 2026

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@wan9chi wan9chi force-pushed the codex/fix-napi-env-undefined branch from 3284206 to 87813ee Compare July 4, 2026 15:52

wan9chi commented Jul 4, 2026

Copy link
Copy Markdown
Member Author

Merge activity

  • Jul 4, 3:55 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jul 4, 3:56 PM UTC: Graphite rebased this pull request as part of a merge.
  • Jul 4, 3:58 PM UTC: @wan9chi merged this pull request with Graphite.

Co-authored-by: GPT-5 Codex <codex@openai.com>
@wan9chi wan9chi force-pushed the codex/fix-napi-env-undefined branch from 87813ee to 5e86972 Compare July 4, 2026 15:55
@wan9chi wan9chi merged commit e68b625 into main Jul 4, 2026
20 checks passed
@wan9chi wan9chi deleted the codex/fix-napi-env-undefined branch July 4, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant