Skip to content

ci(deps): bump actions/setup-python from 5 to 6#3

Merged
DecisionNerd merged 1 commit into
mainfrom
dependabot/github_actions/actions/setup-python-6
Feb 1, 2026
Merged

ci(deps): bump actions/setup-python from 5 to 6#3
DecisionNerd merged 1 commit into
mainfrom
dependabot/github_actions/actions/setup-python-6

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot Bot commented on behalf of github Feb 1, 2026

Bumps actions/setup-python from 5 to 6.

Release notes

Sourced from actions/setup-python's releases.

v6.0.0

What's Changed

Breaking Changes

Make sure your runner is on version v2.327.1 or later to ensure compatibility with this release. See Release Notes

Enhancements:

Bug fixes:

Dependency updates:

New Contributors

Full Changelog: actions/setup-python@v5...v6.0.0

v5.6.0

What's Changed

Full Changelog: actions/setup-python@v5...v5.6.0

v5.5.0

What's Changed

Enhancements:

Bug fixes:

... (truncated)

Commits
  • a309ff8 Bump urllib3 from 2.6.0 to 2.6.3 in /tests/data (#1264)
  • bfe8cc5 Upgrade @​actions dependencies to Node 24 compatible versions (#1259)
  • 4f41a90 Bump urllib3 from 2.5.0 to 2.6.0 in /tests/data (#1253)
  • 83679a8 Bump @​types/node from 24.1.0 to 24.9.1 and update macos-13 to macos-15-intel ...
  • bfc4944 Bump prettier from 3.5.3 to 3.6.2 (#1234)
  • 97aeb3e Bump requests from 2.32.2 to 2.32.4 in /tests/data (#1130)
  • 443da59 Bump actions/publish-action from 0.3.0 to 0.4.0 & Documentation update for pi...
  • cfd55ca graalpy: add graalpy early-access and windows builds (#880)
  • bba65e5 Bump typescript from 5.4.2 to 5.9.3 and update docs/advanced-usage.md (#1094)
  • 18566f8 Improve wording and "fix example" (remove 3.13) on testing against pre-releas...
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot @github
Copy link
Copy Markdown
Contributor Author

dependabot Bot commented on behalf of github Feb 1, 2026

Labels

The following labels could not be found: dependencies, github-actions. Please create them before Dependabot can add them to a pull request.

Please fix the above issues or remove invalid values from dependabot.yml.

@dependabot dependabot Bot requested a review from DecisionNerd as a code owner February 1, 2026 01:46
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 1, 2026

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'python', 'ignore', 'tools', 'file_types', 'comments', 'thresholds', 'integrations', 'notifications'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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

@DecisionNerd DecisionNerd merged commit c6514f7 into main Feb 1, 2026
17 checks passed
@DecisionNerd DecisionNerd deleted the dependabot/github_actions/actions/setup-python-6 branch February 1, 2026 04:37
DecisionNerd added a commit that referenced this pull request Feb 8, 2026
…TCH (#103)

**Phase 1 (Tasks 1-3) completed: Foundation for v0.3.0 TCK features**

## Changes

### 1. Tree-Based Operator Structure (Task #1)
- Add Union operator for UNION/UNION ALL query combination
- Add Subquery operator for EXISTS/COUNT subquery expressions
- Add OptionalExpandEdges operator for left outer join semantics
- Update executor to handle nested operator dispatch
- Maintain backward compatibility with flat operator lists

### 2. Left Outer Join Primitive (Task #2)
- Implement OptionalExpandEdges operator
- Add _execute_optional_expand() method with NULL preservation
- Handle left join semantics: preserve rows with NULL when no matches

### 3. OPTIONAL MATCH Grammar & AST (Task #3)
- Add OptionalMatchClause to ast/clause.py
- Add OPTIONAL MATCH grammar rule to cypher.lark
- Add parser transformer for optional_match_clause
- Update planner to convert OptionalMatchClause → OptionalExpandEdges
- Add _plan_optional_match() method to QueryPlanner

## Testing
- Add 6 integration tests for OPTIONAL MATCH
- 4/6 tests passing (2 require IS NULL support - Task #5)
- All existing 1736 tests still pass
- Coverage: 91.96% (above 85% threshold)

## Architecture Impact
- Executor now supports nested operator trees (enables UNION, subqueries)
- Planner can emit OptionalExpandEdges alongside ExpandEdges
- Parser recognizes OPTIONAL MATCH in query grammar
- Foundation ready for Phase 2 features (list comprehensions, EXISTS)

## Next Steps (Task #5)
- Add IS NULL / IS NOT NULL expression support
- Handle NULL property access gracefully
- Complete NULL propagation in WHERE/aggregation
- Target: ~150 additional TCK scenarios from OPTIONAL MATCH

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
DecisionNerd added a commit that referenced this pull request Feb 9, 2026
* feat: implement v0.3.0 foundation with tree operators and OPTIONAL MATCH (#103)

**Phase 1 (Tasks 1-3) completed: Foundation for v0.3.0 TCK features**

## Changes

### 1. Tree-Based Operator Structure (Task #1)
- Add Union operator for UNION/UNION ALL query combination
- Add Subquery operator for EXISTS/COUNT subquery expressions
- Add OptionalExpandEdges operator for left outer join semantics
- Update executor to handle nested operator dispatch
- Maintain backward compatibility with flat operator lists

### 2. Left Outer Join Primitive (Task #2)
- Implement OptionalExpandEdges operator
- Add _execute_optional_expand() method with NULL preservation
- Handle left join semantics: preserve rows with NULL when no matches

### 3. OPTIONAL MATCH Grammar & AST (Task #3)
- Add OptionalMatchClause to ast/clause.py
- Add OPTIONAL MATCH grammar rule to cypher.lark
- Add parser transformer for optional_match_clause
- Update planner to convert OptionalMatchClause → OptionalExpandEdges
- Add _plan_optional_match() method to QueryPlanner

## Testing
- Add 6 integration tests for OPTIONAL MATCH
- 4/6 tests passing (2 require IS NULL support - Task #5)
- All existing 1736 tests still pass
- Coverage: 91.96% (above 85% threshold)

## Architecture Impact
- Executor now supports nested operator trees (enables UNION, subqueries)
- Planner can emit OptionalExpandEdges alongside ExpandEdges
- Parser recognizes OPTIONAL MATCH in query grammar
- Foundation ready for Phase 2 features (list comprehensions, EXISTS)

## Next Steps (Task #5)
- Add IS NULL / IS NOT NULL expression support
- Handle NULL property access gracefully
- Complete NULL propagation in WHERE/aggregation
- Target: ~150 additional TCK scenarios from OPTIONAL MATCH

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* feat: complete OPTIONAL MATCH with IS NULL support (#103)

**Task #5 completed: Full OPTIONAL MATCH end-to-end implementation**

## Changes

### 1. IS NULL / IS NOT NULL Support
- Add `IS NULL` and `IS NOT NULL` grammar rules to cypher.lark
- Represent as UnaryOp in AST (distinct from `= NULL`)
- Implement IS NULL evaluation in evaluator (returns true/false, not NULL)
- Handle proper NULL comparison semantics:
  - `x IS NULL` → true if x is NULL (not NULL itself)
  - `x = NULL` → NULL (standard ternary logic)

### 2. NULL Property Access
- Handle property access on NULL values gracefully
- Return NULL when accessing property on NULL (e.g., `f.name` when `f` is NULL)
- Prevents TypeError in OPTIONAL MATCH scenarios

### 3. Test Improvements
- Fix test expectations for NULL handling
- Add comprehensive IS NULL / IS NOT NULL tests
- All 6 OPTIONAL MATCH integration tests pass
- All 731 unit + integration tests pass

## NULL Semantics

**IS NULL (unary operator)**:
- `NULL IS NULL` → true
- `5 IS NULL` → false
- Returns CypherBool, never NULL

**= NULL (binary operator)**:
- `NULL = NULL` → NULL (ternary logic)
- `5 = NULL` → NULL
- Returns NULL for any NULL operand

**Property Access**:
- `node.property` when node is NULL → NULL
- `node.missing_property` → NULL

## Testing
- 731 tests pass (725 unit, 6 new OPTIONAL MATCH)
- 13 skipped (existing grammar limitations)
- Coverage: 91.96%

## Impact
- OPTIONAL MATCH fully functional with NULL handling
- IS NULL / IS NOT NULL work in WHERE clauses
- NULL values propagate correctly through expressions
- Ready for Phase 2 features (UNION, list comprehensions)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* feat: implement UNION and UNION ALL operators (#103)

**Task #4 completed: Full UNION/UNION ALL implementation**

## Changes

### 1. UNION Grammar
- Add `union_query` grammar rule to cypher.lark
- Support UNION and UNION ALL keywords
- Allow multiple query branches to be combined

### 2. Parser Support
- Add `union_query` transformer to parser.py
- Return dict with type='union', branches, and all flag
- Handle `union_distinct` and `union_all` transformers

### 3. API Integration
- Update GraphForge.execute() to detect UNION queries
- Plan each branch separately
- Create Union operator with all branches
- Execute Union operator and return combined results

### 4. Executor Enhancement
- Update execute() to recognize Union as RETURN-producing operator
- Prevent empty result check from failing on UNION queries
- Union._execute_union() already handles deduplication

## Features

**UNION (deduplicates)**:
```cypher
MATCH (p:Person) RETURN p.name
UNION
MATCH (c:Company) RETURN c.name
```

**UNION ALL (preserves duplicates)**:
```cypher
MATCH (p:Person) RETURN p.name
UNION ALL
MATCH (p:Person) RETURN p.name
```

**Multiple branches**:
```cypher
MATCH (p:Person) RETURN p.name
UNION
MATCH (c:Company) RETURN c.name
UNION
MATCH (d:Department) RETURN d.name
```

## Testing
- 9 comprehensive integration tests
- All 740 tests pass (731 previous + 9 new)
- Tests cover: basic UNION, UNION ALL, deduplication, multiple branches,
  ORDER BY, LIMIT, empty results, edge cases

## Impact
- UNION/UNION ALL fully functional
- ~30 TCK scenarios expected to pass
- Foundation supports nested query execution
- Ready for Phase 2 completion (list comprehensions, subqueries)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* feat: implement list comprehensions (#94)

Add support for list comprehension syntax: [x IN list WHERE x > 5 | x * 2]

## Changes
- Add ListComprehension AST node to ast/expression.py
- Extend grammar to support comprehension syntax in cypher.lark
- Add parser transformer for list_comprehension
- Implement evaluation logic in evaluator.py
- Create 12 comprehensive integration tests

## Features
- Basic iteration: [x IN [1,2,3]]
- Filtering with WHERE: [x IN list WHERE x > 5]
- Transformation with |: [x IN list | x * 2]
- Combined filter and map: [x IN list WHERE x > 5 | x * 2]
- Nested comprehensions
- NULL handling in filters

## Test Coverage
- 12 new integration tests (all passing)
- Tests cover basic iteration, filtering, mapping, edge cases
- 752 total integration tests passing
- 91.96% code coverage maintained

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* feat: implement EXISTS and COUNT subquery expressions (#94)

Add support for subquery expressions in WHERE and RETURN clauses.

## Changes
- Add SubqueryExpression AST node to ast/expression.py
- Extend grammar to support EXISTS and COUNT subqueries
- Add parser transformers for exists_expr and count_expr
- Implement subquery evaluation in evaluator.py
- Update executor to pass itself and planner for subquery execution
- Create 13 comprehensive integration tests

## Features
### EXISTS Subquery
- Returns boolean indicating if subquery matches any rows
- Can be used in WHERE clause for filtering
- Can be used in RETURN clause for computed columns
- Supports correlated subqueries (references outer variables)

### COUNT Subquery
- Returns integer count of rows matched by subquery
- Can be used in WHERE/WITH clause with comparisons
- Can be used in RETURN clause for aggregations
- Supports correlated subqueries

## Examples
```cypher
-- EXISTS in WHERE
MATCH (p:Person)
WHERE EXISTS { MATCH (p)-[:KNOWS]->() }
RETURN p.name

-- COUNT in RETURN
MATCH (p:Person)
RETURN p.name, COUNT { MATCH (p)-[:KNOWS]->() } AS friends

-- COUNT in WITH for filtering
MATCH (p:Person)
WITH p, COUNT { MATCH (p)-[:KNOWS]->() } AS friend_count
WHERE friend_count > 2
RETURN p.name
```

## Architecture
- Subqueries execute in isolated context with outer bindings
- Planner and executor passed through evaluation chain
- Supports nested query execution via operator pipeline

## Test Coverage
- 13 new integration tests (all passing)
- 765 total integration tests passing
- Tests cover EXISTS/COUNT in various contexts
- Tests cover correlated subqueries and edge cases

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* feat: implement variable-length path patterns (#94)

Add support for variable-length relationship traversal like -[:KNOWS*1..3]->

## Changes
- Extend RelationshipPattern AST to include min_hops and max_hops
- Add grammar support for *, *1..3, *..3, *1.. syntax
- Add ExpandVariableLength operator for recursive traversal
- Implement depth-first search with cycle detection in executor
- Update planner to emit ExpandVariableLength for var-length patterns
- Create 2 integration tests

## Features
### Variable-Length Syntax
- `*` - 1 or more hops (unbounded)
- `*1..3` - min 1, max 3 hops
- `*..3` - min 1, max 3 hops
- `*2..` - min 2, unbounded hops

### Implementation
- Depth-first search traversal
- Cycle detection to prevent infinite loops
- Edge list binding for paths
- Type and direction filtering

## Examples
```cypher
-- Find all friends (direct and indirect)
MATCH (p:Person {name: 'Alice'})-[:KNOWS*]->(f)
RETURN f.name

-- Find friends within 2 hops
MATCH (p)-[:KNOWS*1..2]->(f)
RETURN f.name

-- Find all ancestors
MATCH (p)-[:PARENT*]->(ancestor)
RETURN ancestor.name
```

## Test Coverage
- 2 new integration tests (all passing)
- 767 total integration tests passing
- Tests cover unbounded and bounded patterns
- Tests verify cycle detection

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* docs: add comprehensive v0.3.0 release notes (#94)

- Document all 8 major features implemented
- OPTIONAL MATCH, UNION, list comprehensions
- EXISTS/COUNT subqueries, variable-length paths
- IS NULL operators, tree-based architecture
- Include syntax examples and use cases
- Implementation details and test coverage
- Architecture improvements and migration guide
- 767 passing integration tests documented

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix: preserve column names for property access in RETURN (#94)

- Add PropertyAccess to executor imports
- Generate dotted notation (e.g., 'p.name') for property access
- Previously used generic 'col_N' names
- Update test to expect proper column names
- Fixes TCK result format expectations

This improves TCK compatibility by matching expected result column names.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* feat: add toBoolean() type conversion function (#94)

- Add toBoolean to TYPE_FUNCTIONS set
- Implement toBoolean in _evaluate_type_function
- Support string-to-boolean conversion ("true"/"false" case-insensitive)
- Add toboolean to FUNCTION_NAME grammar terminal
- Returns null for invalid inputs

Completes type conversion function suite for TCK compatibility.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* feat: implement list quantifier functions (all, any, none, single) (#94)

- Add QuantifierExpression AST node
- Add quantifier_expr grammar rules (ALL, ANY, NONE, SINGLE)
- Implement parser transformers for all quantifiers
- Add evaluation logic in evaluator
- Fix empty list parsing bug (filtered None values)
- Implement correct semantics:
  * ALL: true if all items satisfy (vacuous truth for empty list)
  * ANY: true if at least one item satisfies
  * NONE: true if no items satisfy
  * SINGLE: true if exactly one item satisfies

Expected TCK impact: ~100-150 scenarios

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* feat: support multi-clause queries with UNWIND (#94)

- Add reading_only_query grammar rule for multiple reading clauses
- Support patterns: MATCH + UNWIND + RETURN, UNWIND + MATCH + RETURN
- Add WHERE clause support in reading-only queries
- Fix planner to respect clause order for reading clauses
- Previously MATCH always executed before UNWIND
- Now UNWIND and MATCH execute in declaration order
- Flatten nested reading_clause lists in parser

This enables variable dependencies between UNWIND and MATCH:
- UNWIND ['Alice', 'Bob'] AS name MATCH (p {name: name})
- MATCH (p) UNWIND p.tags AS tag RETURN p, tag

Expected TCK impact: ~10-15 scenarios

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* docs: add parallel testing documentation (#94)

- Document pytest -n flag for parallel execution
- TCK tests run 4x faster with -n auto (54s vs 3.5min)
- Add examples for auto CPU detection and manual worker count

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* test: add comprehensive end-to-end dataset workflow tests (#94)

- Add TestDatasetDiscovery for dataset listing and filtering
- Add TestSmallDatasetLoading for collaboration network queries
- Add TestComplexQueries for v0.3.0 feature patterns
- Add TestDataExportWorkflow for JSON export/import
- Add TestRealWorldUseCases for typical query patterns

Tests demonstrate:
- Dataset discovery and metadata access
- Loading SNAP datasets and querying
- OPTIONAL MATCH, UNION, EXISTS, quantifier usage
- JSON graph export/import roundtrip
- Common patterns: degree queries, paths, aggregation

12 tests passing, 5 skipped (awaiting size() function support)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix: resolve type checking and linting issues (#94)

- Add ExpandVariableLength import to executor.py top-level imports
- Fix type annotations for list comprehension items variable
- Fix type annotations for variable-length path stack
- Update node ID set type to handle str | int
- Fix import ordering in test_end_to_end_workflows.py
- Update test_unknown_type_function_raises_error to use truly unknown function
- All pre-push checks passing: format, lint, type-check, tests, coverage

All 1,790 tests passing with 91.43% coverage.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix: resolve critical bugs in executor and parser (#103)

**Executor Fixes:**
- Fix _execute_union to pass correct op_index for each branch operator
  instead of hardcoded 0, fixing aggregation finalization logic
- Fix _execute_variable_expand cycle detection by properly tracking
  visited nodes per path (initialize with src_node.id, add next_node.id
  when pushing to stack)

**Parser Fixes:**
- Replace union_query dict return with proper UnionQuery AST node
- Add validation to reject mixed UNION/UNION ALL in same query
- Update api.py to handle UnionQuery instead of dict
- Fix list_comprehension disambiguation by adding named sub-rules
  (comp_where_clause, comp_map_clause) to grammar
- Add transformers that return tagged tuples to distinguish WHERE vs MAP

**Test Improvements:**
- Add @pytest.mark.integration to all integration test classes
- Add @pytest.mark.slow to dataset tests loading snap-ca-grqc
- Fix test_quantifier_pattern assertion to validate both Alice and Carol
  are present (not just one) and Bob is excluded
- Rename test_union_different_column_count to test_union_different_value_types
  to accurately describe what it tests
- Add test_union_mismatched_column_count to document current behavior
  with different column counts

All tests passing, no type errors, linting clean.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix: critical executor, evaluator, and parser bugs (#103)

**Evaluator Fixes:**
- Fix subquery operator execution to pass correct op_index (use enumerate)
- Implement proper three-valued logic for quantifiers (ALL/ANY/NONE/SINGLE)
  tracking satisfied_count, false_count, and null_count for openCypher semantics
- Add null-check for executor.planner before calling plan() in subqueries
- ALL: False if any False, True if empty or all True, else NULL
- ANY: True if any True, NULL if any NULL but no True, else False
- NONE: False if any True, NULL if any NULL but no True, else True
- SINGLE: True if exactly one True and no NULLs, else False/NULL

**Executor Fixes:**
- Fix _execute_optional_expand to preserve rows with NULL bindings when
  src_var is missing or not a NodeRef (proper OPTIONAL semantics)
- Fix _execute_variable_expand to bind raw list of EdgeRef objects instead
  of wrapping in CypherList (EdgeRef is not a CypherValue)
- Add OptionalScanNodes operator for single-node OPTIONAL MATCH with
  LEFT JOIN semantics preserving rows with NULL bindings
- Implement _execute_optional_scan method with proper NULL handling

**Parser/Grammar Fixes:**
- Fix read_query ambiguity by splitting into three alternatives:
  match + optional_match+ + where?, match + where?, optional_match + where?
- Add 'size' to FUNCTION_NAME token regex for size() function support

**AST Improvements:**
- Replace UnionQuery dataclass with Pydantic BaseModel (frozen=True)
- Add field validators for branches (non-empty, all CypherQuery)
- Add model validator to ensure at least two branches in UNION

**Planner Improvements:**
- Update single-node OPTIONAL MATCH to use OptionalScanNodes instead of
  ScanNodes for proper NULL preservation
- Add OptionalScanNodes to operators.py with Pydantic validation

**Test Improvements:**
- Add @pytest.mark.integration to all test classes in test_union.py

All tests passing, linting clean, type checking passing.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* feat: implement size() function and add coverage tests (#103)

**size() Function Implementation:**
- Added size() function for lists and strings in evaluator.py
- Returns length of CypherList or CypherString
- Raises TypeError for invalid argument types
- Works in WHERE clauses, RETURN, and property access

**Coverage Improvements:**
- Added tests for subquery planner null-check error paths
- Added integration tests for size() function (3 tests)
- Tests cover node property lists, WHERE clause filtering, string properties

All new tests passing.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix: format test file

* fix: simplify size() implementation per linting

* fix: address code review issues (#103)

- Add QuantifierExpression and UnaryOp to list/dict literal evaluation
- Update max_hops validator to allow 0 (non-negative instead of positive)
- Add model validator to ensure max_hops >= min_hops cross-field validation

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
DecisionNerd added a commit that referenced this pull request Apr 28, 2026
…ations

- Fix mypy: rename projected_type loop var to avoid Literal narrowing conflict
- CRab #3: _validate_expr_variables_in_scope now recursively traverses CASE,
  list/pattern comprehensions, quantifiers, reduce, filter, extract expressions,
  respecting locally-bound variables from comprehension loop vars
- CRab #4: _collect_free_variables now handles PropertyAccess string owners
  (wraps expr.variable as Variable) and PatternComprehension.pattern to extract
  anchor variables as locally-bound before traversing filter/map expressions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
DecisionNerd added a commit that referenced this pull request Apr 28, 2026
* fix: Phase 4 compile-time validations (#370)

- Add VariableAlreadyBound detection for MERGE standalone node/relationship reuse
- Add NoSingleRelationshipType detection for MERGE relationship patterns
- Add UndefinedVariable detection for SET/DELETE/RETURN clause variables
- Add ColumnNameConflict detection for duplicate RETURN aliases
- Add NoVariablesInScope detection for RETURN * with only anonymous variables
- Add InvalidArgumentType for WHERE (n) with bound node variable
- Add scope-aware free-variable collection (_collect_free_variables) to avoid
  false UndefinedVariable errors inside quantifiers/comprehensions/reduce
- Bind path variable after multi-hop variable-length expansion loops
- Propagate OPTIONAL MATCH bound variables to type context
- Propagate CALL subquery RETURN variables to outer type context
- Allow CREATE + MERGE in a single query via grammar rule extension
- Fix ON CREATE/MATCH SET validation ordering (bind pattern vars first)

All 276 planner unit tests, 2418 unit tests, 4256+ total tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: address coderabbitai review issues in Phase 4 compile-time validations

- Fix mypy: rename projected_type loop var to avoid Literal narrowing conflict
- CRab #3: _validate_expr_variables_in_scope now recursively traverses CASE,
  list/pattern comprehensions, quantifiers, reduce, filter, extract expressions,
  respecting locally-bound variables from comprehension loop vars
- CRab #4: _collect_free_variables now handles PropertyAccess string owners
  (wraps expr.variable as Variable) and PatternComprehension.pattern to extract
  anchor variables as locally-bound before traversing filter/map expressions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: handle dict-form PatternComprehension.pattern in _collect_free_variables

Pattern AST nodes come as dicts with 'parts' key rather than raw lists;
extract pattern_parts correctly from the dict before iterating anchors.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: skip SubqueryExpression traversal in free-variable analysis

EXISTS/COUNT subqueries have their own scope — variables bound inside
(e.g. f in COUNT { MATCH (p)-[:KNOWS]->(f) WHERE f.age > 28 }) are not
free in the outer query. Guard both _collect_free_variables and
_validate_expr_variables_in_scope to return early on SubqueryExpression.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
DecisionNerd added a commit that referenced this pull request May 31, 2026
- RemoveType: add constraint cascade (doc.constraints.retain) to fix
  orphaned constraints bug (finding #1)
- apply(): add step contiguity validation — doc.version must match
  steps[0].from_version and each step's from must equal prev's to;
  returns NoMigrationPath on mismatch (finding #5)
- migrate_to(): guard against doc.version != handle.version() before
  planning (finding #2)

Deferred: AddProperty default_json limitation (#3 — intentional for
this milestone) and silent Unknown degradation (#4 — intentional
forward-compatibility design)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
DecisionNerd added a commit that referenced this pull request May 31, 2026
#669)

* feat(ontology): migration engine — plan and apply versioned transforms (#563)

- error.rs: OntologyError::NoMigrationPath { from, to }
- migration.rs: TransformKind enum (RenameType, RenameProperty, AddProperty,
  RemoveProperty, AddType, RemoveType, Unknown), MigrationStep struct,
  MigrationEngine::plan() (BFS shortest-path), MigrationEngine::apply()
  (mutates OntologyDoc then re-compiles via OntologyCompiler)
- handle.rs: OntologyHandle::migrate_to(target_version, doc) convenience method
- lib.rs: re-export MigrationEngine, MigrationStep, TransformKind
- 11 new tests (77 total): plan same/single/multi/no-path/shortest, apply
  rename-type/property, add/remove property, version update, chain

Closes #563

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: address CodeRabbit review on migration engine

- RemoveType: add constraint cascade (doc.constraints.retain) to fix
  orphaned constraints bug (finding #1)
- apply(): add step contiguity validation — doc.version must match
  steps[0].from_version and each step's from must equal prev's to;
  returns NoMigrationPath on mismatch (finding #5)
- migrate_to(): guard against doc.version != handle.version() before
  planning (finding #2)

Deferred: AddProperty default_json limitation (#3 — intentional for
this milestone) and silent Unknown degradation (#4 — intentional
forward-compatibility design)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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