Skip to content

A computed dead-rule fact can be false: Batfish can leave a smaller earlier line out of Blocking_Lines #453

Open

Description

@ARSH871-bot

What's wrong

_compute_dead_rule_outcome() works out what happens to matching traffic from the lines in Blocking_Lines, and the prompt tells the model the result is "already verified by code and certain". Batfish doesn't always name every earlier line that matches. When a large line with the opposite action covers the dead line, a smaller earlier line with the dead line's own action is left out.

Measured (live Batfish, the same on main db59b00 and #401's 246db8e)

permit tcp host 10.1.1.5 any
deny   tcp 10.1.1.0 0.0.0.255 any
permit tcp 10.1.1.0 0.0.0.255 any eq 443      <- dead

Blocked by:  deny tcp 10.1.1.0 0.0.0.255 any
Fact:        traffic matching it is actually denied
testFilters, tcp/443 to 8.8.8.8:   10.1.1.5 PERMIT    10.1.1.200 DENY

The mirror, with deny host .5, permit /24, deny /24 eq 443: the fact says "actually permitted", and testFilters says 10.1.1.5 is denied.

#401's new "the outcome is the same" sentence is not affected. In 8 cases built to break it, Batfish named the overlapping opposite-action line in six, so the function returned None, and in the other two no such line overlapped and the sentence was true.

Why it matters

The first case is the dangerous direction. The explanation says traffic is denied when one host gets through. The shape is narrow, but "verified and certain" should not be false in any shape.

Decision needed

Either narrow the claim to what is known ("the line Batfish names, X, denies this"), or confirm with testFilters or searchFilters before stating an outcome for all matching traffic. The first is much smaller.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinglayer: aiLayer 2 — local LLM explanation and Q&AsafetyTouches F-4, grounding, or the refuse-rather-than-guess boundary. Review with care

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions