fix(sandbox): add mechanistic smoke test for L4 deny and document the L4/L7 split#1412
Conversation
… L4/L7 split The old smoke script exercised an L7 PUT which hung because the denial aggregator is only wired to L4 CONNECT denies, not L7 enforcement. Add mechanistic-smoke.sh which triggers an L4 deny, waits for the aggregator to flush, and asserts a pending chunk appears under openshell rule get --status pending. Document the intentional L4-only scope of the mechanistic mapper in architecture/sandbox.md. Fixes NVIDIA#1333 Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
…p call Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
|
I tested the new smoke locally on this branch with the Docker-backed e2e wrapper: 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
'It passed: the script created a sandbox, triggered the expected L4 CONNECT deny for A few items still need action before this fully resolves #1333:
The L4 retarget itself looks correct based on the local run; the main gap is making sure this becomes durable regression coverage and that all acceptance items from #1333 are addressed. |
- 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
Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
188cbf8 to
2bcc30e
Compare
|
Addressed all 3 items: wired the smoke into mise, guarded TMP_DIR, and added a unit test in proxy::tests::test_emit_denial_enqueues_denial_event that verifies an L4 deny enqueues a DenialEvent with the correct fields. |
|
/ok to test 2bcc30e |
|
@mesutoezdil please address the format issues on the failed checks. Please ensure these are tested before pushing. |
I remember testing this, but for some reason it’s causing problems. the clippy lint (unused-qualifications) and rustfmt issues in the test function are resolved in the latest commit. verified locally before pushing: cargo test -p openshell-sandbox proxy::tests::test_emit_denial_enqueues_denial_event mise run pre-commit
|
|
/ok to test 18ee550 |
|
Label |


e2e/policy-advisor/mechanistic-smoke.shto test the mechanistic mapper with an L4 CONNECT denyarchitecture/sandbox.mddocumenting the intentional L4-only scopemise run e2e:mechanistic-smokewith gateway setupe2e/policy-advisor/README.mdTMP_DIRreference on early exit (set -uguard)Related Issue: Refs #1333
Testing
bash -n e2e/policy-advisor/mechanistic-smoke.shpassesmarkdownlint-cli2 architecture/sandbox.mdpasses with 0 errorsmise run e2e:mechanistic-smokeruns the full flow against a Docker gateway