fix: Fix Cyclical Loop Via Traversal Expansion Errors - BED-8955 - #115
fix: Fix Cyclical Loop Via Traversal Expansion Errors - BED-8955#115LawsonWillard wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThe PostgreSQL translator now supports self-loop expansions. Neo4j path reconstruction preserves cyclic traversal order. Integration fixtures cover self-cycle queries. dawgrun adds ChangesSelf-loop expansion and path reconstruction
Local database connection command
Repository metadata updates
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant CommandRegistry
participant connectLocalCmd
participant openConnection
participant LocalPostgreSQL
User->>CommandRegistry: invoke connect-local
CommandRegistry->>connectLocalCmd: resolve command
connectLocalCmd->>openConnection: pass local credentials and graph initialization
openConnection->>LocalPostgreSQL: open connection
LocalPostgreSQL-->>User: return initialized connection
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tools/dawgrun/README.md (1)
143-144: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse fenced code blocks for the new command examples.
Because
markdownlint-cli2reports MD046 at Line 143 and Line 149, convert both indented examples to fenced code blocks. This removes the lint warnings without changing the rendered content.Proposed documentation fix
- dawgrun > connect-local - Opened pg connection 'local' +```console +dawgrun > connect-local +Opened pg connection 'local' +``` - dawgrun > connect-local dev - Opened pg connection 'dev' +```console +dawgrun > connect-local dev +Opened pg connection 'dev' +```Also applies to: 149-150
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tools/dawgrun/README.md` around lines 143 - 144, Convert both indented command examples in the README, including the connect-local examples, to fenced console code blocks while preserving their content and rendered output.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@tools/dawgrun/README.md`:
- Around line 143-144: Convert both indented command examples in the README,
including the connect-local examples, to fenced console code blocks while
preserving their content and rendered output.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d7f1502d-27d6-415f-afa1-7d618fd1032c
⛔ Files ignored due to path filters (1)
go.sumis excluded by!**/*.sum
📒 Files selected for processing (8)
.gitignorecypher/models/pgsql/translate/expansion.gogo.modintegration/testdata/cases/self_cycles.jsonintegration/testdata/self_cycles.jsontools/dawgrun/README.mdtools/dawgrun/pkg/commands/db.gotools/dawgrun/pkg/commands/registry.go
| ), | ||
| ) | ||
| } | ||
| if previousProjectionFrameID != "" && traversalStep.RightNodeBound { |
There was a problem hiding this comment.
I don't know if this is worth handling here or as a follow-on in another ticket, but if a self-loop is matched in a later frame and is using new bindings that are not exported in the previous frame (for example, match (x) match (n)-[*..]->(n) return n), this endpoint-binding gate will try to reference the right-side identifier through the previous frame and blow up:
dawgrun > query-cypher bloodhound 'MATCH (x) MATCH (n)-[*..]->(n) return n limit 10'
query-cypher failed: error running cypher query 'MATCH (x) MATCH (n)-[*..]->(n) return n limit 10': ERROR: column s0.n1 does not exist (SQLSTATE 42703)
| defaultPGConnectionString = "postgres://dawgs:weneedbetterpasswords@localhost:65432/dawgs?sslmode=disable" | ||
| ) | ||
|
|
||
| func connectLocalCmd() CommandDesc { |
There was a problem hiding this comment.
i love this! could also be neat to accept a path to a bloodhound clone to read the local-harnesses/build.config.json and create a connection from it
AD7ZJ
left a comment
There was a problem hiding this comment.
I did some testing locally and it's working fine for me! Good job figuring that out 🤯 I had some fun trying to understand all of this!

Description
Resolves: BED-8955
Type of Change
Testing
make test_allwithCONNECTION_STRINGset)Driver Impact
drivers/pg)drivers/neo4j)Checklist
go.mod/go.sumare up to date if dependencies changedSummary by CodeRabbit
New Features
connect-localcommand to quickly connect to the default local database and initialize the default graph.Bug Fixes
Documentation
connect-local.Tests