Skip to content

feat: autonomous graph expansion#38

Merged
realityinspector merged 1 commit intomainfrom
feat/autonomous-expander
Mar 18, 2026
Merged

feat: autonomous graph expansion#38
realityinspector merged 1 commit intomainfrom
feat/autonomous-expander

Conversation

@realityinspector
Copy link
Collaborator

Summary

  • Expander no longer permanently stalls when all nodes exceed degree threshold
  • Three-tier adaptive frontier: base threshold (3) → widened (6, 12) → least-connected fallback
  • New nodes inherit parent_layer + 1 instead of hardcoded layer=1, enabling proper layer tracking
  • Graph is currently stalled at 28 nodes / 377 edges with "No frontier nodes to expand" — this fix makes it self-sustaining

Changes

  • app/core/graph.py: Added get_least_connected_nodes() query
  • app/workers/expander.py: Adaptive frontier selection in _expand_cycle(), layer-aware node creation

Test plan

  • Deploy to Railway and verify expander resumes (logs should show "Autonomous re-seed" or "Frontier widened")
  • Confirm new nodes get layer > 1
  • Monitor graph growth rate (should be ~3-5 nodes per 5-minute cycle)

…d fallback

Expander now self-sustains instead of permanently stalling when all nodes
exceed degree threshold.  Three-tier frontier selection: base threshold (3),
widened thresholds (6, 12), then least-connected node fallback.  New nodes
inherit parent_layer + 1 instead of hardcoded layer=1.
@realityinspector realityinspector merged commit ac2a160 into main Mar 18, 2026
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