Skip to content

fix(graph_falkordb): fail loudly on a missing graph instead of silently falling back - #2292

Merged
dsapandora merged 1 commit into
rocketride-org:developfrom
madhumitha-chandrasekaran-1:fix/RR-2155-falkordb-graph-visibility
Sep 21, 2026
Merged

dsapandora merged 1 commit into
rocketride-org:developfrom
madhumitha-chandrasekaran-1:fix/RR-2155-falkordb-graph-visibility

Conversation

@madhumitha-chandrasekaran-1

@madhumitha-chandrasekaran-1 madhumitha-chandrasekaran-1 commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #2155.

@joshuadarron's investigation on the issue already established that the Manual/default profile fields (including "Default Graph") are correctly exposed in the node inspector and persisted into the .pipe when the node is actually opened and configured — there was no missing UI control. The real defect is what they identified: a node that was never opened in the inspector persists as {"name": "FalkorDB"} with no profile, which resolves through Config.getNodeConfig's no-profile branch to preconfig.default's "graph": "agent" — a plausible-looking but often-wrong silent default, with nothing telling the user which graph is actually in use or that it's a fallback.

FalkorDB compounds this: unlike Neo4j (graph_neo4j), which validates its target database for free by opening a session against it, select_graph() on a nonexistent FalkorDB graph always succeeds — the failure only surfaces on the first real query, as "ERR Invalid graph operation on empty key", an error that gives no hint the graph itself was the problem.

This implements the two concrete fixes from that investigation (the issue's own suggestions #3 and #4):

  1. _open_driver now raises a clear error naming the missing graph and the ones that do exist, at pipeline start instead of on the first query. This reuses the list_graphs() round-trip the driver already made to fail fast on a bad host/credentials — no extra network call.
  2. _probe_connection warns the same way at save time, so a misconfigured graph is visible before the pipeline ever runs.
  3. The canvas tile was empty ("tile": []); it now shows Graph: <name>, so the active graph — or a silent fallback — is visible without opening the inspector, matching how llm_openai surfaces its model.

Both checks are skipped when allow_writes or allow_execute is on: FalkorDB creates a graph lazily on its first write, so a write-capable node may legitimately be pointed at a graph that doesn't exist yet. A strictly read-only node can never create one, so a missing graph there can only ever be a misconfiguration — which is exactly this issue's symptom.

Not changed: the agent default itself. The investigation flagged it as "worth questioning" but hedged rather than recommending removal, and failing closed instead would be a behavior change for every pipeline that already runs correctly against a real graph named agent. This fix only makes an already-broken configuration fail immediately and clearly instead of later and cryptically — it does not change behavior for any pipeline that currently works.

Why I picked this one up

I'd already worked through this repo's node/config patterns fixing #1986 (ai.common.store's writeDocuments), and this issue is the same shape: a silent, undiagnosable failure in a shared config-resolution path, with a human investigation already on the issue that narrowed the fix to two small, well-reasoned, low-risk changes. It's real (P2, confirmed against a live repro), the fix is bounded to one node, and it directly follows through on someone else's careful diagnosis rather than leaving it stranded.

Test plan

  • Added 10 tests to nodes/test/test_graph_falkordb.py: the missing-graph raise/warn paths, the exists-so-silent paths, both write-capable skip paths (parametrized over allow_writes/allow_execute), and confirming the write-capable skip doesn't also swallow a genuine connection failure.
  • Full file: 65 passed (55 pre-existing + 10 new), run directly with pytest — this node's test file already loads the real base classes with only rocketlib/redis/falkordb stubbed, so no compiled engine was needed here.
  • nodes/test/test_contracts.py: 384 passed.
  • python3 scripts/validate-node-readme.py nodes/src/nodes/graph_falkordb: PASS.
  • ruff check / ruff format --check clean.
  • Not run against a live FalkorDB instance.

Summary by CodeRabbit

  • New Features
    • FalkorDB graph names now default to agent when left blank.
    • The service tile displays the active graph name, including the default.
    • Read-only configurations verify that the selected graph exists during saving and pipeline startup.
    • Missing graphs provide clearer errors or warnings, including available graph names.
    • Configurations with writes or execution enabled continue to support graphs created lazily by FalkorDB.
  • Documentation
    • Updated FalkorDB setup and authentication guidance to describe graph validation and startup behavior.

…ly falling back

A read-only node whose "Default Graph" doesn't exist on the server was
silently resolving to whatever preconfig.default declares (agent), rather
than the graph the user actually intended. FalkorDB accepts a query against
a missing graph and only fails on the first result, with "ERR Invalid graph
operation on empty key" -- an error that gives no hint the graph itself was
the problem (rocketride-org#2155).

- _open_driver now raises a clear error naming the missing graph and the
  ones that do exist, at pipeline start rather than on first query.
- _probe_connection warns the same way at save time.
- Both skip the check when allow_writes or allow_execute is on, since
  FalkorDB creates a graph lazily on its first write -- a write-capable
  node may legitimately target one that doesn't exist yet.
- The canvas tile was empty, so the active graph -- or that it had silently
  fallen back to one -- was invisible without opening the inspector. It now
  shows "Graph: <name>".

The original report described the fields as unexposed/unpersisted; they
already were (confirmed by a prior investigation on the issue). The real
defect was the silent, unvalidated fallback, which is what this fixes.
@github-actions

Copy link
Copy Markdown
Contributor
🤖 Internal: Discord sync marker

Auto-managed by the Discord notification workflow. Stores the linked Discord message ID and forum thread ID. Do not edit or delete.

@coderabbitai

coderabbitai Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 6b97a6a9-6807-4b7b-9fc9-17a88cf5b0d7

📥 Commits

Reviewing files that changed from the base of the PR and between 1339a08 and ad0f7af.

📒 Files selected for processing (4)
  • nodes/src/nodes/graph_falkordb/IGlobal.py
  • nodes/src/nodes/graph_falkordb/README.md
  • nodes/src/nodes/graph_falkordb/services.json
  • nodes/test/test_graph_falkordb.py

Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

The FalkorDB node now resolves blank graph names to agent, validates graph existence for read-only configurations, reports missing graphs during probing, and displays the active graph in the service tile.

Changes

FalkorDB graph configuration

Layer / File(s) Summary
Graph resolution and read-only validation
nodes/src/nodes/graph_falkordb/IGlobal.py, nodes/test/test_graph_falkordb.py, nodes/src/nodes/graph_falkordb/README.md
Blank graph names resolve to agent. Read-only startup and probe checks report missing graphs. Write-capable configurations retain lazy graph creation. Tests cover defaults, validation, warnings, and connection failures. Documentation describes the updated behavior.
Active graph display
nodes/src/nodes/graph_falkordb/services.json
The service tile displays the configured or fallback graph.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix · Severity of issue fixed: Medium

Sequence Diagram(s)

sequenceDiagram
  participant Pipeline
  participant IGlobal
  participant FalkorDB
  Pipeline->>IGlobal: Start or probe connection
  IGlobal->>IGlobal: Resolve graph name
  IGlobal->>FalkorDB: Request list_graphs()
  FalkorDB-->>IGlobal: Return available graphs
  IGlobal-->>Pipeline: Raise error or emit warning when graph is absent
Loading

Merge Risk: ⚪ Minimal · up to ad0f7

No actionable merge-blocking risk remains in the reviewed graph validation and display changes.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 36.36% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 22 functions across 2 files. (2 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the primary change: reporting missing FalkorDB graphs instead of silently using a fallback. It is concise and related to the implementation.
Linked Issues check ✅ Passed The changes address the remaining coding objectives in issue #2155. services.json displays the resolved graph, including the agent default. IGlobal.py resolves the configured graph and validates…
Out of Scope Changes check ✅ Passed All changed files support issue #2155. The runtime validation, README documentation, canvas tile display, and tests directly support clearer graph selection visibility and clearer missing-graph failur…
Full details: Docstring Coverage

Explanation

Docstring coverage is 36.36% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 22 functions across 2 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Some tools did not complete. Review the errors below.

🔧 Biome (2.5.11)
nodes/src/nodes/graph_falkordb/services.json

File contains syntax errors that prevent linting: Line 2: Expected a property but instead found '//'.; Line 6: End of file expected; Line 6: End of file expected; Line 6: End of file expected; Line 6: End of file expected; Line 11: End of file expected; Line 11: End of file expected; Line 11: End of file expected; Line 11: End of file expected; Line 18: End of file expected; Line 18: End of file expected; Line 18: End of file expected; Line 18: End of file expected; Line 24: End of file expected; Line 24: End of file expected; Line 24: End of file expected; Line 24: End of file expected; Line 30: End of file expected; Line 30: End of file expected; Line 30: End of file expected; Line 30: End of file expected; Line 36: End of file expected; Line 36: End of file expected; Line 36: End of file expected; Line 36: End of file expected; Line 42: End of file expected; Line 42: End of file expected; Line 42: End of file expected; Line 42: End of file expected; Line 47: End of file expected; Li

... [truncated 1224 characters] ...

le expected; Line 94: End of file expected; Line 94: End of file expected; Line 106: End of file expected; Line 113: End of file expected; Line 113: End of file expected; Line 222: Expected a property but instead found '//'.; Line 113: End of file expected; Line 222: End of file expected; Line 227: End of file expected; Line 227: End of file expected; Line 227: End of file expected; Line 230: End of file expected; Line 231: End of file expected; Line 231: End of file expected; Line 231: End of file expected; Line 234: End of file expected; Line 235: End of file expected; Line 235: End of file expected; Line 235: End of file expected; Line 252: End of file expected; Line 262: End of file expected; Line 262: End of file expected; Line 262: End of file expected; Line 269: End of file expected


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@dsapandora dsapandora left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. The write-capable exclusion is the right call and the reasoning for leaving the agent default alone holds — this only makes an already-broken config fail early and clearly. Two notes inline, neither blocking.

@dsapandora
dsapandora merged commit 11a18b5 into rocketride-org:develop Sep 21, 2026
29 checks passed
AviNormie pushed a commit to AviNormie/rocketride-server that referenced this pull request Nov 9, 2026
…ly falling back (rocketride-org#2292)

A read-only node whose "Default Graph" doesn't exist on the server was
silently resolving to whatever preconfig.default declares (agent), rather
than the graph the user actually intended. FalkorDB accepts a query against
a missing graph and only fails on the first result, with "ERR Invalid graph
operation on empty key" -- an error that gives no hint the graph itself was
the problem (rocketride-org#2155).

- _open_driver now raises a clear error naming the missing graph and the
  ones that do exist, at pipeline start rather than on first query.
- _probe_connection warns the same way at save time.
- Both skip the check when allow_writes or allow_execute is on, since
  FalkorDB creates a graph lazily on its first write -- a write-capable
  node may legitimately target one that doesn't exist yet.
- The canvas tile was empty, so the active graph -- or that it had silently
  fallen back to one -- was invisible without opening the inspector. It now
  shows "Graph: <name>".

The original report described the fields as unexposed/unpersisted; they
already were (confirmed by a prior investigation on the issue). The real
defect was the silent, unvalidated fallback, which is what this fixes.

Co-authored-by: madhumithachandrasekaran31 <madhumitha2110549@ssn.edu.in>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation module:nodes Python pipeline nodes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FalkorDB node does not expose or persist graph selection, causing silent fallback to agent

4 participants