Skip to content

feat: the shell step can run inside a Configure-authored environment (goal 0240 S4) - #520

Merged
alicoding merged 1 commit into
mainfrom
feat/0240-s4-shell-execenv
Aug 29, 2026
Merged

feat: the shell step can run inside a Configure-authored environment (goal 0240 S4)#520
alicoding merged 1 commit into
mainfrom
feat/0240-s4-shell-execenv

Conversation

@alicoding

Copy link
Copy Markdown
Owner

S4 of the coding loop (owner session answer #5: "PROFILE is the feature... shell selection is one field of it"). Measured before building: the profile ENTITY already exists — ExecEnv (ADR-0026) carries exactly that list (shell, env vars with vault-refs, cwd, profile mode), so S4 is WIRING, never a parallel entity.

  • process-shell-command gains an optional Execution environment reference (RefKind execenv). Empty keeps S1's documented posture — your real login shell and real environment, byte-for-byte. Set, the block runs under that ExecEnv through the SAME machinery code-execution uses: shellArgv's clean/login flags, resolveDir's per-BLOCK temp-dir mint, explicit-only env with the minimal-PATH default.
  • Block-referenced secrets upsert onto the environment's explicit env, never os.Environ — the two postures cannot mix (test-pinned).
  • The Confirm screen names the environment ("Runs in the Safe sandbox environment (…)") via a secret-free preview seam — deliberately NOT the vault-resolving lookup, so a preview can never trigger vault reads or audit lines.
  • New typedfield contract: OptionalRef marks a RefKind whose empty value is a deliberate posture; graph preflight skips its required-ref check (the rule assumed every ref was required — true until this field).
  • Proofs: 4 domain tests (env argv/dir/env, minimal-PATH default, default-posture byte-parity, explicit-base secret upsert) + the preview seam test. The rendered env line's e2e rides S5's confirm-surface touch (label plumbing is Go-pinned; deferral homed in the goal).
  • Riders: coding-loop seed revision bump (node config grew the resolved default), contract schemas + steps.md regenerated.

🤖 Generated with Claude Code

https://claude.ai/code/session_012im1JxQQV2ahnXzZDdVmZq

…(goal 0240 S4)

process-shell-command gains an optional Execution environment reference
(RefKind execenv) — empty keeps S1's documented posture (your real
login shell and real environment, byte-for-byte); set, the block runs
under that ExecEnv through the SAME machinery code-execution uses
(shellArgv's clean/login flags, resolveDir's per-block temp-dir mint,
explicit-only env with the minimal-PATH default), and block-referenced
secrets upsert onto the environment's explicit env, never os.Environ.
The Confirm screen names the environment (a secret-free preview seam —
never the vault-resolving lookup, so previews can't trigger audit
lines). New typedfield contract: OptionalRef marks a RefKind whose
empty value is a deliberate posture, skipped by preflight's
required-ref check. No new entity: ExecEnv already IS the profile the
goal's session answer described. Coding-loop seed revision bumped (its
node config grew the resolved default); contract schemas regenerated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012im1JxQQV2ahnXzZDdVmZq
@alicoding
alicoding enabled auto-merge (squash) August 29, 2026 18:23
@alicoding
alicoding merged commit ab2e5ec into main Aug 29, 2026
30 checks passed
@alicoding
alicoding deleted the feat/0240-s4-shell-execenv branch August 29, 2026 18:34
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