April 14, 2026
2 pull requests merged across 1 repo
bahdotsh/wrkflw
toJSON(env)was returning"null"becauseExprValuehad no Object variant — bareenvfell through allresolve()match arms toNull- Adds
Object(HashMap<String, ExprValue>)variant toExprValue, with proper handling inis_truthy,to_output_string,toJSON, and comparison helpers - Bare
envnow resolves to an Object containing user-set env vars (excludes system-injectedGITHUB_*,RUNNER_*,INPUT_*,WRKFLW_*,CIkeys) toJSON(env)produces sorted, pretty-printed JSON matching real GitHub Actions behavior
Test plan
-
tojson_env_returns_object— verifies JSON output contains only user env vars, excludes system vars -
tojson_env_sorted_keys— verifies keys are alphabetically sorted -
bare_env_is_truthy— verifiesenvobject is truthy -
bare_env_to_output_string— verifies${{ env }}renders as[object Object] - All 55 expression tests pass
WorkflowDefinitionwas missing anenvfield — serde silently discarded workflow-levelenv:during YAML deserialization${{ env.GLOBAL_VAR }}evaluated to empty string while$GLOBAL_VARin shell worked fine, because the OS environment got the vars but the expression evaluator never did- Added the
envfield toWorkflowDefinitionand merged it intoenv_contextright aftercreate_github_context(), giving correct precedence: step > job > workflow (matching GitHub Actions)
Test plan
- All existing tests pass (
cargo test) - Verified end-to-end:
${{ env.ANOTHER_VAR }}resolves workflow-level env correctly - Verified precedence: job-level
envoverrides workflow-level when both define the same key - CI passes