Skip to content

feat: implement AGE relationship predicates and set operations#512

Merged
savasp merged 1 commit into
mainfrom
codex/feat-age-capabilities-355-357
Jul 22, 2026
Merged

feat: implement AGE relationship predicates and set operations#512
savasp merged 1 commit into
mainfrom
codex/feat-age-capabilities-355-357

Conversation

@savasp-agent

@savasp-agent savasp-agent Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • lower variable-path relationship predicates to indexed server-side filtering and anchored existence predicates to grouped counts
  • recursively run every AGE lowering pass inside nested Union/Concat branches, preserve parameter namespaces, and normalize projection aliases before rendering
  • keep ShortestPath undeclared for AGE 1.7, retain its provider-neutral TCK contract, and defer AGE: implement the ShortestPath capability #355 until AGE 1.8 releases the native shortest-path capability

Validation

  • ./scripts/run-tests.sh --configuration Debug --lane fast --disable-diff-engine (2,383 tests)
  • GRAPHMODEL_COMPLIANCE_STRICT=1 ./scripts/run-tests.sh --configuration Debug --project Graph.Age.Tests --no-build --disable-diff-engine (693 tests: 691 passed, 2 expected ShortestPath / OrderByEntity skips)
  • focused AGE dialect, shortest-path rejection, relationship-predicate, and set-operation coverage (15 tests)
  • pre-push Release warnings-as-errors build and format verification

Checklist

Closes #356, closes #357.

@savasp-agent
savasp-agent Bot requested a review from savasp July 21, 2026 22:35
@savasp-agent
savasp-agent Bot requested a review from savasp as a code owner July 21, 2026 22:35
@savasp-agent
savasp-agent Bot enabled auto-merge July 21, 2026 22:35
@savasp-agent
savasp-agent Bot force-pushed the codex/feat-age-capabilities-355-357 branch from 470e3fd to 4c3ee36 Compare July 21, 2026 23:31
@savasp-agent

savasp-agent Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

Codex review report

I rebased PR #512 onto current main and resolved the merge conflict. This comment is the report for that branch-maintenance pass plus the review findings I had already surfaced; it is not a claim that the broader feature review is fully closed.

Fixes applied

  • Resolved the only merge conflict, in src/Graph.Age/COMPLIANCE.md, by keeping the PR's updated AGE compliance text: ComplianceInventory.MinimumExecuted(declared) is 464 with 1 expected OrderByEntity skip.
  • Amended the rebased commit through gh-app so both author and committer are savasp-agent[bot], avoiding the last-push/self-approval trap.
  • Force-with-lease pushed the PR branch from 470e3fdf to 4c3ee36e, based on main at 22c3411.

Review findings

ID Status Finding
R-001 Fixed PR #512 was merge-conflicted because main still documented the older AGE capability inventory while this PR declares support for ShortestPath, RelationshipPredicates, and SetOperations. The compliance text now matches the branch's declared capability set.
R-002 Fixed The rebase initially produced a bot-authored but human-committed rewritten commit. I amended it with gh-app git commit --amend --no-edit; the new head is bot-authored and bot-committed.
R-003 Not fixed here The PR still combines #355, #356, and #357 even though the issue-tracker comments asked for those AGE capabilities to land as standalone serial PRs. I did not split scope in this merge-conflict pass.
R-004 Not fixed here AgeShortestPathPass still lowers shortest path by enumerating all variable-length paths and only then applying collect(p)/min(length(p)) selection (src/Graph.Age/Querying/Cypher/Lowering/AgeShortestPathPass.cs:94, :106, :107, :129). In a local AGE probe, a 5-node complete directed graph timed out under a 3s statement timeout despite having a direct shortest edge. This likely needs a real BFS/native server-side shortest-path strategy rather than collect-all filtering.
R-005 Not fixed here AgeCorrelatedProjectionPass treats EntityProjectionClause as a terminal (src/Graph.Age/Querying/Cypher/Lowering/AgeCorrelatedProjectionPass.cs:415), but only the ReturnClause terminal path drains and emits the extracted count stages (:379, :395). The entity-projection path falls through the default branch (:402), so entity-returning queries that order by relationship counts can reference generated count aliases that were never emitted.

Validation

  • Local fast lane: ./scripts/run-tests.sh --configuration Debug --lane fast --disable-diff-engine passed, 8 projects / 2,394 tests.
  • Local AGE lane: ./scripts/run-tests.sh --configuration Debug --lane age --no-build --disable-diff-engine passed, 1 project / 700 tests, with the expected OrderByEntity capability skip.
  • Pre-push hook passed the Release build and format gate.
  • Hosted checks are green at 4c3ee36e, including build/test, CodeQL, package validation on macOS/Ubuntu/Windows, docs, dependency review, and repository automation.

GitHub now reports the PR as BLOCKED rather than DIRTY; the merge conflict is cleared and the remaining block is review.

@savasp-agent
savasp-agent Bot disabled auto-merge July 21, 2026 23:44
@savasp-agent
savasp-agent Bot changed the base branch from main to feat/identity-free-model July 21, 2026 23:46
@savasp-agent

savasp-agent Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

Takeover review closure report

This supersedes the earlier report. I reviewed the complete final diff, resolved the original #513 stack conflict, fixed every valid PR-local finding, removed the interim shortest-path implementation at @savasp's direction, and found no remaining actionable review threads or code findings.

AGE documentation decision

The supported release remains Apache AGE 1.7.0, whose published manual does not expose a shortest-path primitive. Apache AGE master contains internal age_shortest_path / age_all_shortest_paths implementations, and their SQL installation is part of the unreleased 1.7.0--1.8.0 upgrade.

The PostgreSQL BFS fallback has therefore been removed. AGE 1.7 continues to omit GraphCapability.ShortestPath; #355 remains open and now explicitly waits for the AGE 1.8 release so support can lower to the native capability. The provider-neutral TCK method ShortestPaths_PinSelectionEndpointDirectionNoPathAndSameNodeSemantics remains unchanged and covers one/all shortest paths, incoming direction, no-path behavior, and same-node exclusion. AGE skips that contract with the standard missing-capability reason until native support lands.

Finding ledger

ID Origin Disposition Resolution
R-001 Rebase / merge conflict Fixed Resolved the #513 conflict, then rebased #512 onto #513's squash merge after #513 landed.
R-002 Repository identity policy Fixed The final commit is authored and committed by savasp-agent[bot].
R-003 Review: combined #355/#356/#357 scope Superseded by maintainer decision #512 now ships #356 and #357 only; #355 remains open for AGE 1.8.
R-004 Review: exhaustive shortest-path lowering Removed / deferred Removed both the original exhaustive Cypher lowering and the interim PostgreSQL BFS strategy; AGE now fails closed through its undeclared capability.
R-005 Review: entity ordering by correlated relationship count Fixed Emit count stages before the paging order and again at the entity projection boundary so the sort key survives hydration. Added a translation regression.
R-006 #513 stack compatibility Fixed Migrated new AGE tests from removed endpoint constructors and universal Id to ConnectAsync and domain TestKey.
R-007 Runtime verification: absent compatible subtype table Removed with shortest-path implementation The catalog-intersection code and its PostgreSQL BFS consumer were removed.
R-008 Runtime verification: hydration ordering scope Removed with shortest-path implementation The provider-local shortest-path hydration path was removed.
R-009 Documentation audit Fixed Compliance and provider docs now declare shortest path missing on AGE 1.7, retain the TCK contract, and defer implementation to AGE 1.8 / #355.

Validation

  • Strict AGE certification: 693 total, 691 passed, 2 expected ShortestPath / OrderByEntity capability skips.
  • Fast lane: 2,383 tests passed across 8 projects.
  • Focused AGE dialect/capability/regression set: 15 passed.
  • Pre-push gate: Release warnings-as-errors build and format verification passed.
  • Hosted CI: all required checks passed, including consolidated build/test, package validation on all three platforms, repository automation, documentation, dependency review, and CodeQL.
  • Final diff check: clean; no shortest-path implementation remains; no unresolved findings.

#513 merged while this follow-up was in progress, so the final head is rebased onto its squash commit on main. Auto-merge remains disabled as requested. Head: c052325f5c04ee6fe804d036046375ff16dcaa6a.

@savasp-agent
savasp-agent Bot force-pushed the codex/feat-age-capabilities-355-357 branch from f7445b7 to 84ce2ea Compare July 22, 2026 00:27
Base automatically changed from feat/identity-free-model to main July 22, 2026 01:10
@savasp-agent
savasp-agent Bot force-pushed the codex/feat-age-capabilities-355-357 branch from 84ce2ea to c052325 Compare July 22, 2026 01:14
@savasp-agent savasp-agent Bot changed the title feat: implement AGE shortest paths, relationship predicates, and set operations feat: implement AGE relationship predicates and set operations Jul 22, 2026
@savasp
savasp added this pull request to the merge queue Jul 22, 2026
Merged via the queue into main with commit 60b49ec Jul 22, 2026
14 checks passed
@savasp
savasp deleted the codex/feat-age-capabilities-355-357 branch July 22, 2026 01:35
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.

AGE: recursively lower SetOperations branches AGE: implement the RelationshipPredicates capability

1 participant