feat: shell-step execution modes — pass-input stdin/args and run-with-admin (goal 0240 S5) - #525
Merged
Merged
Conversation
…-admin (goal 0240 S5) (see branch description; full message identical to prior attempt) - Pass input (code-execution literal): payload to stdin (default) or one arg per line — Shortcuts semantics; procexec.Spec gains Stdin. - Run with admin (shell step): sudo -A + materialized askpass; pam_tid Touch ID first; secrets+admin refused honestly; headless fails closed. - Always-asks policy via composition.AdminForcedAsk at every verdict seam. - Seed revisions bumped (coding loop 3, codeexec 3, secret-guard 2) + fingerprints regenerated. - Proofs: stdin/args + admin units and integration tests, guardrailsvc admin-upgrade test; real PAM prompt in the manual registry; steps.md + contract.json regenerated. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012im1JxQQV2ahnXzZDdVmZq
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.
Closes goal 0240's final slice. Both halves owner-decided this session after a deeper research round (full records in the goal file, mill-docs).
Pass input (code-execution, literal mode)
The converged Shortcuts/Automator semantics: a literal script now receives the upstream payload — piped to stdin (default) or as one argument per line (
$@, via the POSIX-c$0-operand convention). Previously literal mode silently discarded the payload. Source "payload" unchanged.procexec.SpecgainsStdin(written then closed; empty keeps the null-device default).Run with admin rights (process-shell-command)
Escalation via sudo's own documented GUI hook: each step wraps in
sudo -Awith a Mill-materialized 0700 askpass (osascript hidden-answer dialog — never the deprecated administrator-privileges AppleScript API, and no root helper daemon). Wherepam_tidis configured for sudo (it is on the owner's machine), the system Touch ID prompt satisfies authentication before any password is asked — Mill never touches the credential. A block resolving secrets refuses the combination honestly (sudo's env_reset would strip them). Headless/server mode fails closed.Fail-safe policy: an admin run ALWAYS asks. One predicate (
composition.AdminForcedAsk) applied at every verdict seam — runtime gate, canvas badges, dry-run, the Confirm preview'sShellCommandVerdicts(now reading the real seeded node's config so preview and gate can never disagree),mayRequireApproval— upgrades allow→ask; deny still wins.Seed revisions bumped (coding loop→3, codeexec example→3, secret-guard example→2), fingerprints regenerated,
steps.md/contract.jsonregenerated. Config UI derives from the registered fields (verified live: the shell step's checkbox + ASK badge, the code-execution Pass-input options). Proofs: procexec stdin tests, real-shell stdin/args integration tests, argv-wrap/askpass-shape/secrets-refusal units, guardrailsvc admin-upgrade test; the real PAM prompt joins testing.md's manual-only registry with a full installed-build verification script.Note: two local gate runs tripped on
TestWatchChanges_FiresOnRealChange— the QUARANTINE-registered real-pasteboard-contention flake (installed Mill running); passes standalone and is untouched by this change.🤖 Generated with Claude Code
https://claude.ai/code/session_012im1JxQQV2ahnXzZDdVmZq