Skip to content

Release 26.4.0 - #41

Merged
discreteds merged 20 commits into
mainfrom
release/26.4.0
Apr 28, 2026
Merged

Release 26.4.0#41
discreteds merged 20 commits into
mainfrom
release/26.4.0

Conversation

@discreteds

Copy link
Copy Markdown
Member

Summary

Production release of mountainash-utils-rules v26.4.0.

What's in this release

Expression-based engine (landed via PR #38, included in this release branch)

  • Single-pass vectorised rule evaluation using mountainash expressions
  • 11 match strategies: EXACT, NOT_EQUAL, RANGE, GT, LT, PREFIX, SUFFIX, CONTAINS, REGEX, SET_MEMBERSHIP, SET_EXCLUSION
  • Backend-agnostic: Polars, Pandas, Ibis (DuckDB/SQLite/Polars), Narwhals
  • Cross-backend test parameterisation across all 7 backends

Performance benchmarks (new in this release)

  • Scaling matrix: 3 rule counts × 3 dimension counts × 6 backends
  • Per-strategy isolation: 11 strategies × 6 backends
  • Synthetic data generator with seeded RNG for reproducibility
  • hatch run test:test-perf and test-perf-save commands

Cleanup

  • Removed 14 stale phase 1-3 benchmark/test scripts from repo root
  • Updated pyrightconfig for local .venv, Python 3.12
  • README rewritten with problem-first structure and working examples
  • GitHub repo description and topics updated

CI fixes

  • Hatch 1.14.2 → 1.16.5, Hatchling 1.25.0 → 1.29.0
  • mountainash-expressions renamed to mountainash in references
  • Debug output for missing-dataframes CI error

Upstream issues filed

Test plan

  • hatch run test:test-quick — 490 passed, 30 skipped, 27 xfailed
  • hatch run test:test-perf — 94 passed, 26 skipped
  • Existing test suite unaffected by benchmark additions

🤖 Generated with Claude Code

discreteds and others added 20 commits April 28, 2026 21:50
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ibis-polars fails the engine pipeline due to missing with_row_index
translation (mountainash-io/mountainash#78). Use BENCH_BACKENDS (6
backends) instead of ALL_BACKENDS (7) for benchmark parametrisation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds tests/benchmark_data.py with four public functions (assign_strategies,
generate_rules, generate_context, build_engine) that produce deterministic
seeded rule sets and contexts across all 11 match strategies.
Adds tests/test_benchmark_data.py with 26 tests covering shape, sentinel
density, determinism, and engine round-trip evaluation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds tests/test_benchmarks.py with TestScalingMatrix (3x3x6 rule/dim/backend
grid) and TestStrategyIsolation (all 11 MatchStrategies × 6 backends) using
pytest-benchmark pedantic mode; excludes ibis-polars per upstream bug #78.

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

PREFIX, SUFFIX, CONTAINS fail on pandas/narwhals backends where the
mountainash string operations pass Expr objects to str accessor methods
that expect plain strings. Added skip logic alongside existing SET
strategy skips. Also adds .benchmarks/ to .gitignore.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace auto-generated boilerplate with problem-first README covering:
- Quick start with working code example
- 11 match strategies table
- 7 backend support matrix
- Development commands reference
- Architecture overview (ternary logic, single-pass evaluation)

Also updated GitHub repo description and topics.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Lead with the core value proposition: rules as data, not code.
Immediate updates without deploys, auditable per-dimension results,
scales to thousands of rules without branching logic.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- pyrightconfig: use local .venv instead of hatch ephemeral path, bump to 3.12
- coverage: remove tests from source_pkgs (not a coverage target)
- gitignore: add sp_productpricingmatrix_discretion_combos.sql

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
These standalone scripts targeted the now-deleted HybridRulesEngine,
VectorizedRulesEngine, and NumpyRuleProcessor. Replaced by the
expression-based engine and tests/test_benchmarks.py benchmark suite.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Old JSON and markdown benchmark outputs from August 2025, targeting
engines that no longer exist. Current benchmarks use pytest-benchmark
with JSON saved to .benchmarks/ (gitignored).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tests for HybridRulesEngine, VectorizedRulesEngine, NumpyRuleProcessor,
and real-data infrastructure — all superseded by the expression-based
engine and its cross-backend test suite.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- docs/future opportunities/ — phase 1-3 hype documents
- docs/opencode/ — OpenCode session docs for deleted VectorizedRulesEngine
- docs/recommendations/ — outdated code consistency review

Current architecture docs live in docs/superpowers/specs/ and
docs/superpowers/plans/.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Test commands are documented in README's Development section and
CLAUDE.md's Build/Test/Lint Commands section. TESTING.md referenced
deleted test files (test_rule_engine.py) and was out of date.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
All phase 1-4 planning, retrospectives, and performance analysis docs
are superseded by the expression-based engine rewrite. Current specs
and plans live in docs/superpowers/. The additive engine analysis is
preserved in docs/superpowers/specs/2026-04-07-additive-rules-architecture-analysis.md.

Removed:
- docs/planning/ (8 files — phases 1-6 roadmaps)
- docs/retrospectives/ (7 files — phase 1-4 retros, architecture analysis)
- docs/ root (benchmarking plan, outstanding tasks, optimisation strategies,
  performance analysis)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The PMX_DB SQL reference is documented in the additive-rules
architecture analysis spec; the raw file doesn't need to live in
this repo.

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

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
28 Security Hotspots

See analysis details on SonarQube Cloud

@discreteds
discreteds merged commit ea9fda4 into main Apr 28, 2026
2 of 3 checks passed
@discreteds
discreteds deleted the release/26.4.0 branch April 28, 2026 15:11
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