(self) wittgena@wittgenas-MacBook-Pro self % python -m dev.e2e.infra.wasm.gateway [Reactor] macOS detected. Native CPU Affinity pinning is bypassed (OS constraint). [Reactor] UVLoop (epoll) Policy injected. [Reactor] Ignition... Loop: EventLoopPolicy | CPU: Core Virtual-38201 LOG | SYSTEM | INFO | infra.wasm.gateway: [PRE-FLIGHT] Build skipped. Reusing existing 'gateway.wasm'. (Use --build to recompile) LOG | SYSTEM | INFO | infra.wasm.gateway: ========================================================================================== LOG | SYSTEM | INFO | infra.wasm.gateway: [MASTER SUITE] Commencing Decoupled WasmGateway Integration Tests LOG | SYSTEM | INFO | infra.wasm.gateway: ========================================================================================== LOG | SYSTEM | INFO | e2e.wasm.gateway.compute: -------------------------------------------------------------------------------- LOG | SYSTEM | INFO | e2e.wasm.gateway.compute: [GATEWAY SETUP] Initializing Zero-WASI WasmGateway (L0 Firewall)... LOG | SYSTEM | INFO | e2e.wasm.gateway.compute: Gateway Initialized (Pre-allocated Buffer: 1MB & Thread-Safe Locked) LOG | SYSTEM | INFO | e2e.wasm.gateway.compute: -------------------------------------------------------------------------------- LOG | SYSTEM | INFO | e2e.wasm.gateway.compute: [CLI] Initiating L0 Zero-Trust Isolation Tests... LOG | SYSTEM | INFO | e2e.wasm.gateway.compute: [FIREWALL DOMAIN] Scenario: OpCode, Budget, Target, Hex Payload LOG | SYSTEM | INFO | wasm.gateway: [WASM Gateway] Invoking module 'intent_parser' (0.17 KB) LOG | SYSTEM | INFO | wasm.gateway: [WASM Gateway] Execution successful: 'intent_parser' (0.49 ms) LOG | SYSTEM | INFO | e2e.wasm.gateway.compute: Passed L0 Firewall! Extracted AST: {'op_code': 'CALL', 'amount': 15.5, 'ticker': 'USDC', 'target': 'urn:xphi:agent:db_router_01', 'raw_data': '0xDEADBEEF'} LOG | SYSTEM | INFO | e2e.wasm.gateway.compute: [FIREWALL DOMAIN] Scenario: O(1) BDD Logic Matrix Rejection LOG | SYSTEM | INFO | wasm.gateway: [WASM Gateway] Invoking module 'intent_parser' (0.17 KB) LOG | SYSTEM | WARN | wasm.gateway: [WASM Gateway] Execution reverted: 'intent_parser' (Reason: State vector rejected by logic matrix.) LOG | SYSTEM | INFO | e2e.wasm.gateway.compute: Defense mechanism triggered (Revert: State vector rejected by logic matrix.) LOG | SYSTEM | INFO | e2e.wasm.gateway.compute: [FIREWALL DOMAIN] Scenario: Pest Sandbox Defense (SQL Injection Rejection) LOG | SYSTEM | INFO | wasm.gateway: [WASM Gateway] Invoking module 'intent_parser' (0.16 KB) LOG | SYSTEM | WARN | wasm.gateway: [WASM Gateway] Execution reverted: 'intent_parser' (Reason: Syntax error: --> 1:38 | 1 | CALL FEE 100 USDC TO DB_SERVICE WITH DROP TABLE users; | ^--- | = expected raw_data) LOG | SYSTEM | INFO | e2e.wasm.gateway.compute: Defense mechanism triggered (Revert: Syntax error: --> 1:38 | 1 | CALL FEE 100 USDC TO DB_SERVICE WITH DROP TABLE users; | ^--- | = expected raw_data) LOG | SYSTEM | INFO | e2e.wasm.gateway.compute: [FIREWALL DOMAIN] Scenario: AST Pest Parser Rejection (LLM Hallucination) LOG | SYSTEM | INFO | wasm.gateway: [WASM Gateway] Invoking module 'intent_parser' (0.14 KB) LOG | SYSTEM | WARN | wasm.gateway: [WASM Gateway] Execution reverted: 'intent_parser' (Reason: Syntax error: --> 1:1 | 1 | PLEASE CALL FEE 10 USDC TO STORAGE_NODE | ^--- | = expected op_code) LOG | SYSTEM | INFO | e2e.wasm.gateway.compute: Defense mechanism triggered (Revert: Syntax error: --> 1:1 | 1 | PLEASE CALL FEE 10 USDC TO STORAGE_NODE | ^--- | = expected op_code) LOG | SYSTEM | INFO | e2e.wasm.gateway.compute: [FIREWALL DOMAIN] Scenario: Physical Circuit Breaker (Overflow 1MB) LOG | SYSTEM | INFO | wasm.gateway: [WASM Gateway] Invoking module 'intent_parser' (1024.16 KB) LOG | SYSTEM | WARN | wasm.gateway: [Circuit Breaker Triggered] Payload exceeds boundary (1048576B). LOG | SYSTEM | INFO | e2e.wasm.gateway.compute: Defense mechanism triggered (Revert: Memory Boundary Exceeded) LOG | SYSTEM | INFO | e2e.wasm.gateway.fsm: [Gateway] Initiating FSM Determinism & State Transition Tests... LOG | SYSTEM | INFO | e2e.wasm.gateway.fsm: ⚙ [FSM DOMAIN] Scenario: Transaction FSM: Init -> ExecuteVmCmd LOG | SYSTEM | INFO | wasm.gateway: [WASM Gateway] Invoking module 'transaction_fsm' (0.34 KB) LOG | SYSTEM | INFO | wasm.gateway: [WASM Gateway] Execution successful: 'transaction_fsm' (0.15 ms) LOG | SYSTEM | INFO | e2e.wasm.gateway.fsm: [PASS] FSM Transitioned successfully! Next State: {'state': 'ShadowExecution', 'max_fuel_limit': 200000, 'caller': 'urn:xphi:tenant:auth_77a9', 'target_resource': 'urn:xphi:agent:db_router_01', 'charge_amount': 100}, Command: ExecuteVmCmd LOG | SYSTEM | INFO | e2e.wasm.gateway.fsm: ⚙ [FSM DOMAIN] Scenario: Epoch Topology: ZERO -> ANCHOR (Resource Lock) LOG | SYSTEM | INFO | wasm.gateway: [WASM Gateway] Invoking module 'flow_transition_fsm' (0.23 KB) LOG | SYSTEM | INFO | wasm.gateway: [WASM Gateway] Execution successful: 'flow_transition_fsm' (0.17 ms) LOG | SYSTEM | INFO | e2e.wasm.gateway.fsm: [PASS] FSM Transitioned successfully! Next State: {'origin': '0', 'edge': 'ANCHOR', 'reflective': True, 'reversible': True, 'anchored_target': 'urn:surgent:resource:resolved_task_999'}, Command: ResolveAnchorCmd LOG | SYSTEM | INFO | e2e.wasm.gateway.fsm: ⚙ [FSM DOMAIN] Scenario: Epoch Topology: Forced Collapse -> FractureCmd LOG | SYSTEM | INFO | wasm.gateway: [WASM Gateway] Invoking module 'flow_transition_fsm' (0.22 KB) LOG | SYSTEM | INFO | wasm.gateway: [WASM Gateway] Execution successful: 'flow_transition_fsm' (0.13 ms) LOG | SYSTEM | INFO | e2e.wasm.gateway.fsm: [PASS] FSM Transitioned successfully! Next State: {'origin': '0', 'edge': 'COLLAPSED', 'reflective': True, 'reversible': True, 'anchored_target': None}, Command: FractureCmd LOG | SYSTEM | INFO | e2e.wasm.gateway.fsm: ⚙ [FSM DOMAIN] Scenario: Clearing FSM: Rejecting unauthorized/invalid event LOG | SYSTEM | INFO | wasm.gateway: [WASM Gateway] Invoking module 'clearing_fsm' (0.22 KB) LOG | SYSTEM | WARN | wasm.gateway: [WASM Gateway] Execution reverted: 'clearing_fsm' (Reason: Gateway Router Parse Error: unknown variant `InvalidHackingEvent`, expected one of `FsmStartIntent`, `PtaAnchoredEvent`, `WasmExecutedEvent`) LOG | SYSTEM | INFO | e2e.wasm.gateway.fsm: [REJECT] FSM properly rejected transition (Revert: Gateway Router Parse Error: unknown variant `InvalidHackingEvent`, expected one of `FsmStartIntent`, `PtaAnchoredEvent`, `WasmExecutedEvent`) LOG | SYSTEM | INFO | infra.wasm.gateway: ========================================================================================== LOG | SYSTEM | INFO | infra.wasm.gateway: [WASM GATEWAY E2E REPORT: PEST ISOLATION & FSM DETERMINISM] LOG | SYSTEM | INFO | infra.wasm.gateway: ========================================================================================== LOG | SYSTEM | INFO | infra.wasm.gateway: [O] 01. [WASM_GATEWAY] OpCode, Budget, Target, Hex Payload | Result: PASSED LOG | SYSTEM | INFO | infra.wasm.gateway: [O] 02. [WASM_GATEWAY] O(1) BDD Logic Matrix Rejection | Result: PASSED LOG | SYSTEM | INFO | infra.wasm.gateway: [O] 03. [WASM_GATEWAY] Pest Sandbox Defense (SQL Injection Rejection) | Result: PASSED LOG | SYSTEM | INFO | infra.wasm.gateway: [O] 04. [WASM_GATEWAY] AST Pest Parser Rejection (LLM Hallucination) | Result: PASSED LOG | SYSTEM | INFO | infra.wasm.gateway: [O] 05. [WASM_GATEWAY] Physical Circuit Breaker (Overflow 1MB) | Result: PASSED LOG | SYSTEM | INFO | infra.wasm.gateway: [O] 06. [FSM] Transaction FSM: Init -> ExecuteVmCmd | Result: PASSED LOG | SYSTEM | INFO | infra.wasm.gateway: [O] 07. [FSM] Epoch Topology: ZERO -> ANCHOR (Resource Lock) | Result: PASSED LOG | SYSTEM | INFO | infra.wasm.gateway: [O] 08. [FSM] Epoch Topology: Forced Collapse -> FractureCmd | Result: PASSED LOG | SYSTEM | INFO | infra.wasm.gateway: [O] 09. [FSM] Clearing FSM: Rejecting unauthorized/invalid event | Result: PASSED LOG | SYSTEM | INFO | infra.wasm.gateway: ------------------------------------------------------------------------------------------ LOG | SYSTEM | INFO | infra.wasm.gateway: ALL L0 GATEWAY SCENARIOS EXECUTED SUCCESSFULLY. LOG | SYSTEM | INFO | infra.wasm.gateway: ========================================================================================== [Reactor] Lifecycle terminated cleanly.