Skip to content

feat: forall/exists quantifiers + reachable graph traversal (PLE Phase 2)#134

Merged
avrabe merged 1 commit intomainfrom
feat/ple-phase2
Apr 13, 2026
Merged

feat: forall/exists quantifiers + reachable graph traversal (PLE Phase 2)#134
avrabe merged 1 commit intomainfrom
feat/ple-phase2

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented Apr 12, 2026

Summary

Extends the s-expression evaluator with quantifiers and graph traversal:

  • (forall scope predicate) — universal quantifier over the artifact store
  • (exists scope predicate) — existential quantifier
  • (count scope) — boolean: at least one match
  • (reachable-from "REQ-004" "satisfies") — current artifact is reachable from start via link type
  • (reachable-to "TEST-090" "verifies") — target reachable from current artifact

EvalContext extended with optional Store reference. All callers updated to pass store.

Examples

rivet list --filter '(exists (= type "requirement") (has-tag "stpa"))'
rivet list --filter '(reachable-from "REQ-004" "satisfies")'

Implements: REQ-041
Refs: FEAT-109

🤖 Generated with Claude Code

…s-expressions

Extend the s-expression evaluator with:
- forall(scope, predicate) — universal quantifier over store
- exists(scope, predicate) — existential quantifier over store
- count(scope) — boolean: at least one match exists
- reachable-from(start, link-type) — current artifact is downstream
- reachable-to(target, link-type) — target is downstream of current

EvalContext now includes optional Store reference for quantifier access.
All callers (CLI, API, MCP, salsa) pass store via matches_filter_with_store.

Examples:
  rivet list --filter '(exists (= type "requirement") (has-tag "stpa"))'
  rivet list --filter '(reachable-from "REQ-004" "satisfies")'

Implements: REQ-041
Refs: FEAT-109

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 13, 2026

Codecov Report

❌ Patch coverage is 0.81967% with 121 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
rivet-core/src/sexpr_eval.rs 0.82% 120 Missing ⚠️
rivet-core/src/db.rs 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@avrabe avrabe merged commit e13637b into main Apr 13, 2026
17 of 20 checks passed
@avrabe avrabe deleted the feat/ple-phase2 branch April 13, 2026 00:28
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