You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG/APPSEC] Dev Agent Firewall's Agentic Black Hole check reads "max_big_o" off file_data, but it only ever lives on a networkx graph node #372
The only producer of max_big_o is gitgalaxy/core/network_risk_sensor.py:191, which sets it as a networkx graph node attribute:
G.add_node(path, ..., max_big_o=max_big_o, ...)
That value never gets copied back onto file_data/self.parsed_files -- network_risk_sensor.py itself reads it back correctly (G.nodes[path].get("max_big_o", 1), line 284), but dev_agent_firewall.py is a different consumer reading a different object (file_data, not the graph) at a later pipeline phase. max_big_o is always 1 there, so the max_big_o >= 3 half of this guardrail's condition can never be true -- the Agentic Black Hole rule only ever fires on token_mass alone.
🎯 Objective
The Agentic Black Hole guardrail should be able to fire on genuinely high-complexity files, not just high-token-count ones.
🛠️ Proposed Implementation
Thread max_big_o from the networkx graph node back onto each file's file_data dict (similar to how telemetry/network_metrics are already copied back after build_dependency_graph() runs), before DevAgentFirewall.evaluate_ecosystem() reads it in Phase 5.
✅ Acceptance Criteria
A file with real O(N^3)+ complexity and high token mass triggers is_agentic_black_hole, proven by a test using the real pipeline (not a hand-built mock file_data dict).
Activity
Copy max_big_o back onto the file dict, not just the graph node (#372) (