Skip to content

feat(agent): record observed egress as http_request side effects (#465 Phase A, 3/5) - #470

Open
AminChirazi wants to merge 1 commit into
feat/465a-2-fs-capturefrom
feat/465a-3-http-capture
Open

feat(agent): record observed egress as http_request side effects (#465 Phase A, 3/5)#470
AminChirazi wants to merge 1 commit into
feat/465a-2-fs-capturefrom
feat/465a-3-http-capture

Conversation

@AminChirazi

Copy link
Copy Markdown
Contributor

Part 3/5 of #465 Phase A. Stacked on 2/5.

What

Every egress the supervisor admits and performs for the agent is recorded as an http_request side effect (ip:port, tcp/udp, monotonic at_ms) into a new EgressLog.observed — never touching blocked, whose emptiness is half the assert_no_egress predicate. Loopback is filtered at capture (flowproof's own proxy/MCP boundaries are already first-class trace data); AF_UNIX and denied attempts are not side effects. A destination admitted by a ${VAR}-bearing allow entry records the unresolved spelling (redaction-first when multiple entries match), the same store-unresolved rule the egress lane follows. Adds AllowSet::allow_all() and Containment::observation_only() plus the egress_engaged parameter on run_against_contained: a run supervised only for observation reports not contained (flow engages side-effect observation only; …) — the tier line never claims enforced for a wildcard policy nobody declared, and non-Linux variants early-return to the uncontained path as defense in depth.

Evidence

fmt 0 · clippy 0 · cargo test --workspace 0 · Linux cross-check 0 (includes the new Linux e2e side_effect_http_e2e.rs, runtime-proven on the Linux CI runner) · ratchets.sh exit 0, diff 396/400.

🤖 Generated with Claude Code

@AminChirazi AminChirazi added the needs-human A loop escalated this: it needs a decision or a protected-path change label Aug 11, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@AminChirazi
AminChirazi force-pushed the feat/465a-3-http-capture branch from 725d957 to be4041e Compare August 11, 2026 19:10
@AminChirazi

Copy link
Copy Markdown
Contributor Author

CI's Linux clippy caught 8 unwrap_used warnings (promoted by -D warnings) in the new Linux-only test module — code macOS clippy never compiles, and the local cross-target gate was cargo check, which doesn't lint. Fixed to the file's .expect("…") convention; range re-measured at 397/400 and the local ratchet still passes. #471/#472 were failing only by inheritance and have been rebased.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-human A loop escalated this: it needs a decision or a protected-path change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant