Skip to content

Commit f128aab

Browse files
committed
fix(smoke): wire mechanistic smoke into mise and guard TMP_DIR
- Initialize TMP_DIR before trap to prevent unbound variable on early exit - Add e2e:mechanistic-smoke mise task with gateway setup - Document mechanistic smoke in policy-advisor README
1 parent 02a82b7 commit f128aab

3 files changed

Lines changed: 24 additions & 0 deletions

File tree

e2e/policy-advisor/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,18 @@ bash e2e/policy-advisor/test.sh
5252
Requires Docker, `agent_policy_proposals_enabled=true`, and a GitHub token with
5353
contents write on the repository. The test auto-resolves the token from
5454
`DEMO_GITHUB_TOKEN`, `GITHUB_TOKEN`, `GH_TOKEN`, or `gh auth token`.
55+
56+
## Mechanistic smoke
57+
58+
Lightweight regression for the L4 CONNECT deny → mechanistic chunk pipeline.
59+
No GitHub token or LLM required.
60+
61+
```bash
62+
mise run e2e:mechanistic-smoke
63+
```
64+
65+
Or manually against a running gateway with `agent_policy_proposals_enabled=true`:
66+
67+
```bash
68+
OPENSHELL_BIN=target/debug/openshell bash e2e/policy-advisor/mechanistic-smoke.sh
69+
```

e2e/policy-advisor/mechanistic-smoke.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ step() { printf "\n${BOLD}${CYAN}==> %s${RESET}\n\n" "$1"; }
4343
ok() { printf " ${GREEN}${RESET} %s\n" "$*"; }
4444
fail() { printf "\n${RED}FAIL:${RESET} %s\n" "$*" >&2; exit 1; }
4545

46+
TMP_DIR=""
47+
4648
cleanup() {
4749
if [[ "$KEEP_SANDBOX" != "1" ]]; then
4850
"$OPENSHELL_BIN" sandbox delete "$SANDBOX" >/dev/null 2>&1 || true

tasks/test.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@ run = "e2e/rust/e2e-vm.sh"
7878
description = "Run smoke e2e against a standalone gateway with the Docker compute driver"
7979
run = "e2e/rust/e2e-docker.sh"
8080

81+
["e2e:mechanistic-smoke"]
82+
description = "Run mechanistic L4 smoke against a Docker-backed gateway"
83+
run = [
84+
"cargo build -p openshell-cli --features openshell-core/dev-settings",
85+
"e2e/with-docker-gateway.sh bash -lc 'target/debug/openshell settings set --global --key agent_policy_proposals_enabled --value true --yes && OPENSHELL_BIN=$PWD/target/debug/openshell bash e2e/policy-advisor/mechanistic-smoke.sh'",
86+
]
87+
8188
["e2e:docker:gpu"]
8289
description = "Run GPU e2e against a standalone gateway with the Docker compute driver"
8390
env = { OPENSHELL_E2E_DOCKER_GPU = "1", OPENSHELL_E2E_DOCKER_TEST = "gpu_device_selection", OPENSHELL_E2E_DOCKER_FEATURES = "e2e-docker-gpu" }

0 commit comments

Comments
 (0)