Skip to content

fix(cypher+write): anonymous nodes, edge variables, ActionReceipt everywhere - #27

Merged
ManSio merged 3 commits into
mainfrom
fix/cypher-receipts
Sep 8, 2026
Merged

ManSio merged 3 commits into
mainfrom
fix/cypher-receipts

Conversation

@ManSio

@ManSio ManSio commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Three commits from the 2026-09-07 investigation, cherry-picked onto current origin/main.

fix(cypher): support anonymous nodes and edge variables

\MATCH ()-[e:ASSIGNED_FROM]->()\ previously failed with
o such column: e\ /
o such column: n0.id\ because:

  • \ rom_node_alias\ defaulted to
    1\ while joins used
    {path_idx*2}\ for anonymous left nodes
  • edge variable [e:]\ was dropped (alias hardcoded to {idx})

Fix: resolve from_node_alias to the generated alias; register edge vars in edge_vars and map e.type/source_id/target_id to columns; support count(e). 10 regression tests (SQL+E2E) + 5 Red Team attacks covered.

fix(write): record ActionReceipt in all write paths

\WriteTool._contract_record\ now emits an ActionReceipt alongside ChangeIntent via new _contract_receipt(); _contract_record\ added to replace/insert/rename-LSP/move (incl. refs) paths that previously wrote files without any contract artifact. Receipt-write is warning-only, does not break write.

docs(memory): lazy-only verification gap

VOR runs from a single call site (layer.py:1097); idle scheduler is call-gated; 42 of 136 memory nodes hang without TTL since 2026-08-11. Experiment plan logged.

Also

Drops a stray leftover conflict marker '>>>>>>> 86ef986d' from KNOWN_ISSUES.md (survived into main via PR #25 unnoticed by check_known_issues).

Verification

  • targeted: 130 passed (test_cypher_engine + test_write_tools)
  • full suite: 1655 passed / 5 skipped / 91 deselected
  • ruff clean, all pre-commit gates green (verify_diary OK)
  • verified_from_clean_state: not run (no network clean clone this session); local full suite green

MSCodeBase Agent added 3 commits September 8, 2026 11:12
VOR runs from a single call site (layer.py:1097); idle scheduler is call-gated and 2/3 idle tasks are dead stubs; 42 of 136 memory nodes hang without TTL since 2026-08-11. Cherry-picked onto current main; also drops a stray leftover conflict marker '>>>>>>> 86ef986d' from the previous KNOWN_ISSUES resolution (was merged into main via PR #25 unnoticed by check_known_issues).
Root cause: from_node_alias defaulted to n1 while joins used n{idx*2} for anonymous left nodes (no such column: n0.id); edge variable [e:] was dropped (alias hardcoded e{idx}), so e.type resolved to json_extract on a missing table. Fix: resolve from_node_alias to the generated alias; register edge vars in edge_vars and map e.type/source_id/target_id to columns; support count(e). 10 regression tests (SQL+E2E) + 5 Red Team attacks covered.
…onymous nodes

WriteTool._contract_record now emits an ActionReceipt alongside ChangeIntent via new _contract_receipt(); _contract_record itself was added to replace/insert/rename-LSP/move (incl. refs) paths that previously wrote files without any contract artifact.

Cypher engine (cypher_sql.py): resolve from_node_alias for anonymous nodes (n{path_idx*2}), register edge variables ([e:]) into edge_vars/edge_prop_map so e.type/source_id/target_id and count(e) translate to SQL.
@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: e6f845d5-982b-4a83-a86e-f294419af089


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.

@ManSio
ManSio merged commit c3cec2a into main Sep 8, 2026
12 of 13 checks passed
@ManSio
ManSio deleted the fix/cypher-receipts branch September 9, 2026 18:03
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