Repository navigation
fix(command): apply the step env: modifier to the executed command - #4
Merged
Merged
Conversation
The step-level env: modifier (a base #Op field, spec/schema/_common.cue) was schema-declared but never wired: the command verb ran the command with the container's default env, so an env-scoped probe (e.g. OMARCHY_PATH=/tmp/...) silently tested the wrong configuration. RCA: no executor path read op.Env — the command plugin's RunVerb called cc.Exec().RunCapture(ctx, script) with no env, and the runner's EffectiveEnv (variable expansion) excludes op.Env. Fix: prepend the step env as shell exports (sorted keys, spec/shellquote quoting) to the command for the in-container, host-side, and background legs. Tests: TestCommandVerb_StepEnvReachesCommand (the export reaches the script) + TestCommandVerb_NoEnvLeavesCommandUntouched (no spurious exports).
Review — PASSHead SHA: Security screen: PASS — no scope mismatch (diff matches the described env-modifier fix exactly), no secrets/exfiltration, no new dependencies (imports are stdlib + existing Checklist: All applicable rules PASS or NA.
Verdict: PASS ollama/deepseek-v4-flash — pi-review-action. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The step-level
env:modifier (a base #Op field,spec/schema/_common.cue) was schema-declared but never wired: thecommandverb ran the command with the container's default env, so an env-scoped probe (e.g.OMARCHY_PATH=/tmp/missing-omarchy) silently tested the wrong configuration. RCA: no executor path readop.Env— the command plugin'sRunVerbcalledcc.Exec().RunCapture(ctx, script)with no env, and the runner'sEffectiveEnv(variable expansion) excludesop.Env.Fix: prepend the step env as shell exports (sorted keys,
spec/shellquotequoting) to the command for the in-container, host-side, and background legs.How tested
New tests:
TestCommandVerb_StepEnvReachesCommand(theexport KEY='value'reaches the executed script) +TestCommandVerb_NoEnvLeavesCommandUntouched(no spurious exports whenenv:is absent). Both pass; the full existing suite passes.Rulebook compliance
env?on #Op; no executor path reads it) before fixing.spec/shellquote.ShellQuote(the one quoter) rather than a new quoter.Change classification
Assisted-by: pi openrouter/deepseek/deepseek-v4-flash-0731 (fully tested and validated)