Repository navigation
refactor: remove the Shell activity variant and run_shell dispatch [ORB-00374] - #501
Conversation
…RB-00374] Deletes the v2 Shell activity surface end to end: the ActivityV2Spec::Shell variant + ShellSpec, run_shell with its dispatch arm and "shell" label, the ShellProgramNotAllowed / ShellSpawnFailed / ShellExitedUnexpected DispatchError variants, and the cross-crate match arms and re-exports that named them. Removing the variant is the fail-closed resolution of ORB-00363. The shell program allowlist was self-asserted within the same workspace-supplied spec (both program and allowed_programs came from the same YAML, so the gate was a tautology), and run_shell spawned Command::new(program) with no OS sandbox, no cwd confinement, and no policy consultation -- unlike the agent-CLI path. A workspace activity/job declaring `type: shell` now fails to deserialize at load instead of executing. Per the chosen scope, shell-only demos are deleted: 7 pure-shell job fixtures, the shell_reference asset, and the shell smoke legs in both example binaries. The JobKind, round-trip, and workspace-shadow tests are migrated to deterministic specs (the shadow test now uses an unregistered action, so an incorrectly-executed shadow fails the run rather than writing a marker). Two shell-specific tests that asserted the Ok(success=false) message path are removed -- deterministic actions cannot produce that outcome, so the path's only coverage was shell-based. Resolves ORB-00363. Co-Authored-By: Claude Opus 4.8 <[email protected]>
… [ORB-00363] Follow-up to the Shell-variant removal (a005c23): resolves the stale-docs review blocker and the dead-code cleanup item from PR review. - ADR-0194 (proposed): records the fail-closed removal of the v2 `shell` activity surface as the security decision behind ORB-00363, including the cost of the lost Ok(success=false) coverage and the no-compat-shim migration. - Design docs (1_overview, 2_design, 4_decisions): drop `shell` from the activity-type surface, the dispatch table, and the non-retryable error list; note the removal where a reader would otherwise expect the variant; bump last_updated and add ORB-00363/ORB-00374 task references. - Code comments: five doc comments the removal commit missed still named the `shell` variant (activity_v2.rs discriminator example, job_v2.rs retry note, orbit-core activity_v2.rs backend note, dispatcher.rs host note, step.rs retry note). Re-anchored the retained Ok(success=false) machinery rationale to ADR-0194. The `success` field itself stays -- it is load-bearing across parallel/fan-out/loop aggregation, not shell-only scaffolding. No behavior change: comment- and doc-only. make ci-fast passes. Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
Follow-up commit 1. Stale design docs (blocker). The original commit updated the website how-to/reference docs but not the feature design docs under
2. Dead-code cleanup. Five doc comments the removal commit missed still named the Note: the Comment- and doc-only; no behavior change. |
…B-00374] `cargo clippy --workspace --all-targets -- -D warnings` failed on crates/orbit-dashboard/src/tests/serve.rs: two `expect_err()` calls trip `clippy::expect_used` (warn -> error under -D warnings). The sibling test module already silences this -- api/tests/mod.rs and api/mod.rs both carry `allow(clippy::expect_used, clippy::unwrap_used)` -- but the lib-level `tests` module (added in ORB-00360) was missing it. Mirror that allow on tests/mod.rs. Latent on agent-main since ORB-00360; surfaced on this PR because the earlier doc/comment commit invalidated orbit-dashboard's clippy cache, forcing a fresh all-targets lint. No behavior change. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Summary
Removes the v2
Shellactivity surface end to end — the fail-closed resolution of security bug ORB-00363.run_shellspawnedCommand::new(program)with no OS sandbox, no cwd confinement, and no policy consultation (unlike the agent-CLI path), and its program allowlist was self-asserted within the same workspace-supplied spec — bothprogramandallowed_programscame from the same YAML, so the gate was a tautology. A workspace activity/job declaringtype: shellnow fails to deserialize at load instead of executing.What changed
ActivityV2Spec::Shell+ShellSpec, theShellProgramNotAllowed/ShellSpawnFailed/ShellExitedUnexpectedDispatchErrorvariants, and every cross-crate match arm / re-export that named them.run_shell, its dispatch arm, the"shell"label, and the now-deadstd::process::Commandimport.shell_referenceasset, and the shell smoke legs in both example binaries.deterministic: JobKind, round-trip, and workspace-shadow tests. The shadow test now uses an unregistered action, so an incorrectly-executed shadow fails the run rather than writing a marker — same security assertion.write-activity.mdandactivity-job-yaml.mdupdated to drop the shell type.Coverage note
Two shell-specific tests asserting the
Ok(success=false)audit-message path were removed — deterministic actions cannot produce that outcome, so that path's only coverage was shell-based. Flagged in the task execution summary.Verification
orbit-common/orbit-engine/orbit-cli/orbit-coretargeted tests greenmake ci-fastpassed (all guardrail scripts)Resolves ORB-00363.
🤖 Generated with Claude Code