Skip to content

Fix cluster-free demo hangs on unavailable Kubernetes APIs - #97

Merged
CodeBuildder merged 4 commits into
mainfrom
agent/fix-local-demo-kube-hang
Jul 18, 2026
Merged

CodeBuildder merged 4 commits into
mainfrom
agent/fix-local-demo-kube-hang

Conversation

@CodeBuildder

@CodeBuildder CodeBuildder commented Jul 18, 2026 •

Copy link
Copy Markdown
Owner

Closes #96

Root cause

The console polls /cluster-overview immediately after startup. Although that FastAPI route is async, it performs synchronous Kubernetes configuration and API calls. A stale or unreachable kubeconfig can therefore block the event loop, causing /health and /simulate-threats to time out as well. /infra-observability had the same behavior. The command-center simulation request also had no client timeout, leaving its loading state active indefinitely whenever the backend stopped responding.

What changed

  • launch the backend with explicit ARGUS_LOCAL_DEMO=true and IN_CLUSTER=false settings from make demo-local
  • bypass all Kubernetes discovery in both cluster overview and infrastructure observability when local-demo mode is active
  • continue returning deterministic incident-derived fallback telemetry to the console
  • expose mode: local_demo through /health for troubleshooting
  • avoid noisy Kubernetes fallback warnings during the intentionally cluster-free path
  • bound command-center simulation and refresh requests to five seconds
  • always clear the Simulating state and show an actionable success, timeout, or failure message
  • add regression tests for health mode and both fallback endpoints

User impact

make demo-local no longer becomes unresponsive because an unrelated kubeconfig points at a missing cluster. Threat generation remains entirely local and should return immediately. If the backend becomes unavailable for another reason, the UI now stops spinning and tells the operator to restart the demo. Cluster-backed launches retain the existing Kubernetes discovery behavior.

Verification

  • 53 action, enrichment, and reasoning tests passed
  • 17 local-demo, simulation, and World Model tests passed
  • focused local-demo and simulation suite passed after the UI follow-up
  • UI TypeScript and Vite production build passed
  • git diff --check passed

Mark the cluster-free launcher explicitly and return fallback telemetry without blocking the FastAPI event loop on stale Kubernetes endpoints.\n\nCloses #96
Stop the command-center spinner after five seconds and surface actionable success or failure status instead of logging failures only to the console.\n\nRefs #96
Pin the Vite API proxy to the IPv4 address used by Uvicorn so Node cannot resolve localhost to an unbound IPv6 loopback.\n\nRefs #96
Let make demo-local bootstrap missing dependencies, launch both services, inject one controlled batch, and keep the console running. Remove hidden dashboard auto-injections so the command is the single source of demo data.\n\nRefs #96
@CodeBuildder
CodeBuildder marked this pull request as ready for review July 18, 2026 06:31
@CodeBuildder
CodeBuildder merged commit fb6ddf8 into main Jul 18, 2026
3 checks passed
@CodeBuildder
CodeBuildder deleted the agent/fix-local-demo-kube-hang branch July 18, 2026 06:31
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.

Local demo can hang while probing an unavailable Kubernetes API

1 participant