Skip to content

Enable Environment Specification and/or overriding from offload#43

Merged
DanverImbue merged 13 commits intomainfrom
danver/enable-env-overriding
Feb 18, 2026
Merged

Enable Environment Specification and/or overriding from offload#43
DanverImbue merged 13 commits intomainfrom
danver/enable-env-overriding

Conversation

@DanverImbue
Copy link
Copy Markdown
Collaborator

Description

Some tests require local environment variables to succeed. Proper CI might inject these variables via secrets managers, but for an ad-hoc testrunner we want to leverage, e.g. Modal's ability to capture environments variables and set them on the remote boxes.

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Vet found 0 issues.

@danverbraganza danverbraganza force-pushed the danver/enable-env-overriding branch from d48b86d to fb5de33 Compare February 17, 2026 23:04
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Vet found 2 issues.


[test_coverage] (severity 3/5) (confidence 0.85)

The issues tracker lists code-65 (tests for environment variable expansion) as 'open', meaning tests for the new expand_env_value function with actual environment variable lookups (e.g., ${VAR} with VAR set, ${VAR:-default} with VAR unset) were not added. The existing tests only cover pure string parsing (no env vars, escaped dollars, error cases) but don't test the core functionality of actually expanding environment variables. The --env CLI flag, base_env() trait method, and env propagation through the orchestrator also lack test coverage.

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Vet found 1 issue.

@danverbraganza danverbraganza force-pushed the danver/enable-env-overriding branch from 2c5e2d1 to c1692d2 Compare February 17, 2026 23:21
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Vet found 1 issue.

Add environment variable expansion support to config loading:
- ${VAR} - required variable, errors if not set
- ${VAR:-default} - optional with default value
- $$ - escaped literal dollar sign

Applied automatically when loading provider.env values.
Add env field to DefaultSandbox and inject env vars as shell prefix
(KEY=value) into the command string in build_exec_command().

This fixes the issue where provider.env variables were not being passed
to remote sandbox execution, unlike LocalProvider which correctly sets
env vars on the process.

Fixes: code-67
@danverbraganza danverbraganza force-pushed the danver/enable-env-overriding branch from 4c5be3c to 48e773a Compare February 18, 2026 22:15
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Vet found 1 issue.

Tests use reliably existing/non-existing env vars (HOME, _OFFLOAD_TEST_*)
instead of unsafe set_var/remove_var. Covers all expansion cases:
- ${VAR} when set/unset
- ${VAR:-default} when set/unset
- $$ escape sequence
- Mixed expansion
- Empty default

Fixes: code-65
@danverbraganza danverbraganza force-pushed the danver/enable-env-overriding branch from 48e773a to c5b68bc Compare February 18, 2026 22:43
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Vet found 0 issues.

@DanverImbue DanverImbue merged commit be6d7ba into main Feb 18, 2026
3 checks passed
@DanverImbue DanverImbue deleted the danver/enable-env-overriding branch February 18, 2026 22:56
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