Skip to content

fix(cypher): translate collect() to json_group_array with typed decode - #31

Merged
ManSio merged 2 commits into
mainfrom
fix/cypher-collect-aggregate
Sep 8, 2026
Merged

ManSio merged 2 commits into
mainfrom
fix/cypher-collect-aggregate

Conversation

@ManSio

@ManSio ManSio commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Translate Cypher COLLECT into a functional SQLite aggregate and decode it back on the executor side. cypher_sql.py: collect(expr) to json_group_array(expr) FILTER (WHERE expr IS NOT NULL), matching Neo4j null-ignoring semantics (empty match to []); collect(*) and nested collect raise explicit ValueError; DISTINCT rejected by parser. cypher_executor.py: marked columns decoded with json.loads (collision-safe). 13 new tests. Full pytest 1663 passed / 6 skipped / 91 deselected. Repo hygiene in second commit: KNOWN_ISSUES dedup (14 entries), temps/deadlines on open items.

MSCodeBase Agent added 2 commits September 8, 2026 15:40
COLLECT(expr) now lowers to json_group_array(expr) FILTER (WHERE expr IS NOT NULL): Neo4j semantics (null-ignored, empty match -> []). collect(*) and nested collect raise explicit ValueError; DISTINCT is rejected by the parser layer. Translator marks collect columns (collect_cols); cypher_executor decodes json.loads only for marked string columns (collision-safe, warning-only on decode failure).

13 new SQL/E2E/error tests incl. decode-collision guard; full pytest 1663 passed / 6 skipped / 91 deselected (verified 5x incl. sanitized-env gate-zero replica); ruff clean; verify_diary 16/0; negative controls: stale_detector PROVEN. Red Team 5/5. Experiments G1/G2 raw-verified on sqlite 3.50.4.

Refs KNOWN_ISSUES 2026-09-07 (collect open -> fixed).
Remove 3 duplicate issue blocks (full version kept), fix false entry counter (11 -> 14) after dedup, set yellow temperature + deadline + owner on open items (VOR lazy-only by 2026-09-15, B4 refactor by 2026-10-01).
@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: c277e233-913f-4159-b256-2eb2a608c4e3


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 abc5b0d into main Sep 8, 2026
12 of 13 checks passed
@ManSio
ManSio deleted the fix/cypher-collect-aggregate branch September 8, 2026 15:27
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