Skip to content

fix(api): prefer live graphs for visualizations#151

Open
jonathanhaaswriter wants to merge 7 commits intomainfrom
fix/visualization-live-graph
Open

fix(api): prefer live graphs for visualizations#151
jonathanhaaswriter wants to merge 7 commits intomainfrom
fix/visualization-live-graph

Conversation

@jonathanhaaswriter
Copy link
Copy Markdown
Collaborator

Summary

  • use the current tenant graph view for attack-path, toxic-combination, and report Mermaid endpoints
  • avoid unnecessary snapshot reads when a live graph is already available
  • add regressions to prove these visualizations stay off the snapshot store in live-graph mode

Testing

  • go test ./internal/api -count=1
  • python3 ./scripts/devex.py run --mode changed --base-ref writer/main

@jonathanhaaswriter jonathanhaaswriter force-pushed the fix/visualization-live-graph branch from 7930144 to 9f09b5a Compare March 25, 2026 15:34
@jonathanhaaswriter
Copy link
Copy Markdown
Collaborator Author

One mismatch looks risky here:

  • visualizeAttackPath / visualizeToxicCombination now use currentTenantSecurityGraphView() (live graph), while the list endpoints still compute IDs from tenantAnalysisGraph() (snapshot-backed). If the live graph moves ahead of the snapshot, the list endpoint can return an index/ID that immediately renders a different object or 404s in the visualization endpoint.

Could these endpoints use the same graph source?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant