Skip to content

Rift v0.2: semantic declaration matching (Ruling 3.1) - #26

Merged
GodSpeed313 merged 1 commit into
mainfrom
rift/ruling-3.1-semantic-matching
Jul 8, 2026
Merged

GodSpeed313 merged 1 commit into
mainfrom
rift/ruling-3.1-semantic-matching

Conversation

@GodSpeed313

Copy link
Copy Markdown
Owner

Summary

  • Two-tier declaration matcher (rift/matcher.py): exact pattern match with capture extraction, semantic-similarity fallback (own MiniLM instance, independent of pi_script per the layer boundary)
  • Spec-first: Rift Ruling 3.1 written and locked before implementation (docs/rift_v02_ruling_3_1_semantic_declaration_matching.md)
  • Calibrated defaults: similarity threshold 0.30, ambiguity margin 0.05 — low confidence or ambiguous top-2 candidates both resolve to a defined no-match, never a guess
  • Independence from Layer 2 (pi_script/resolver.py's Ruling 9.8 semantic matching) enforced by two permanent tests, TestRiftMatcherIndependence
  • Tests: 240 → 260, all additions, zero existing tests modified
  • Built via a Fable 5 session using a reviewed /goal prep doc; independently re-verified locally (zero pi_script references via grep + fresh-interpreter import check, full 260-test run, diff scope confirmed) before this PR

Test plan

  • python -m pytest -q passes locally (260 passed)
  • Confirm CI workflow runs green on this PR

Two-tier declaration matcher in rift/matcher.py: exact pattern match
with capture extraction, semantic-similarity fallback (own MiniLM
instance, independent of pi_script per the layer boundary). Calibrated
defaults (threshold 0.30, ambiguity margin 0.05), inspectable match
traces, defined no-match on low confidence or ambiguity.

Spec-first: Rift Ruling 3.1 written and locked before implementation.
Tests 240 -> 260; independence enforced by permanent tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@GodSpeed313
GodSpeed313 merged commit 4ff5e7f into main Jul 8, 2026
2 checks passed
@GodSpeed313
GodSpeed313 deleted the rift/ruling-3.1-semantic-matching branch July 8, 2026 23:45
GodSpeed313 added a commit that referenced this pull request Jul 22, 2026
TODO.md still read as the pre-M7 tracker: 240/240 tests, milestone list
ending at M6, none of the last two weeks recorded. Now truthful: 563+7xfail
with the xfail census itemized, M7 milestone line (engineering complete, not
live), shipped log for PRs #26-#27 and #30-#43 with real squash commits, and
open-items sections (T2 re-sample, first-live-post go decision, blocked
constraint threads, hooks + PAT infrastructure debt). test_validator_unit.py
recreation section kept — still the oldest open item.

Co-authored-by: Claude Fable 5 <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