Skip to content

feat: add bounded polynomial determinants and release benchmarks - #318

Merged
acgetchell merged 1 commit into
mainfrom
feat/308-polynomial-benchmarks
Oct 29, 2026
Merged

acgetchell merged 1 commit into
mainfrom
feat/308-polynomial-benchmarks

Conversation

@acgetchell

@acgetchell acgetchell commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Adds bounded exact polynomial determinants and includes all public benchmark suites in automatic release capture for v0.5.2.

  • Introduces canonical sparse rational polynomials and complete exact determinant evaluation through order eight. Caller-selected transition/product budgets and typed exponent-overflow errors preserve exact cancellation; the least-exponent term is available only after successful completion.
  • Measures 736 default + 667 exact = 1,403 cases, including polynomial determinants and the earlier column-basis, interval-solve, and rational-dot benchmarks. Default/exact suites run in parallel with 240-minute measurement allowances inside 330-minute jobs.
  • Uses published research-repo-tools 0.2.4 to verify, package, and assemble the suites into one durable release archive. Original runner metadata, exact raw files, and asserted commit/run/attempt identities are retained; measurements from separate runners are not presented as common-host comparisons.
  • Adopts v0.2.4 normally for the existing updater fix. A temporary version-guarded adapter keeps setup and Semgrep fixtures in the standard Python 3.15 environment while preserving shared fixture checks. The upstream fix is Run Semgrep on the shared Python baseline used by all consumers research-repo-tools#165; removal is tracked in Remove the Semgrep environment override after research-repo-tools v0.2.5 adoption #317 and does not block v0.5.2.

Validation on macOS arm64:

  • just ci passed for the polynomial/release-suite implementation: 1,143 Rust tests, default/exact doctests, all 10 examples, benchmark compilation, Clippy, documentation, and tooling checks. Rust sources were unchanged by the subsequent v0.2.4 adoption.
  • On the final dependency/override state, just check, just python-check, and just test-python passed: 303 Python consumer tests in 647.79 seconds, including the complete 1,403-case archive round trip and rejection/approval gates.
  • Production Semgrep scan and fixtures, Markdown/spelling checks, and native benchmark discovery passed. The temporary override tests exercise real native matches and reject missing or extra findings.

No performance improvement is claimed. New benchmark inputs have independent exact coefficient oracles; archive integration uses synthetic full-sample data. Native hosted CI and representative tagged release measurements remain to run.

Closes #308
Closes #316

Related: #304 (incremental package adoption; the broader release-adapter migration remains open), #317 (override removal), and #311 (v0.5.2 release).

Summary by CodeRabbit

  • New Features
    • Added exact sparse-polynomial determinant calculations for matrices up to order eight, with configurable work limits and clear errors when limits are exceeded.
    • Added an example demonstrating exact results when constant terms cancel.
  • Documentation
    • Expanded mathematical and API guidance for polynomial determinants, including supported sizes and resource limits.
    • Updated benchmarking and release guidance to cover broader benchmark suites and separate default and exact-feature measurements.
  • Performance
    • Expanded benchmark coverage to include polynomial determinants and additional numerical workloads.

- Add canonical sparse rational polynomials and exact determinant evaluation
  through order eight with caller-selected work budgets and typed failures.
- Capture all 1,403 public benchmark cases in parallel default/exact release
  suites, then verify and archive their raw samples and original provenance.
- Adopt research-repo-tools v0.2.4 for shared updater and release commands;
  keep Semgrep setup and fixture checks in the standard Python 3.15
  environment until the tracked v0.2.5 cleanup.
- Validate with the full Rust CI pass, final check gate, and 303 Python
  consumer tests after shared-package adoption.

Closes #308
Closes #316
Refs #304
Refs #317
@acgetchell acgetchell added this to the v0.5.2 milestone Oct 28, 2026 — with ChatGPT Codex Connector
@acgetchell acgetchell added enhancement New feature or request performance Performance related issues rust Pull requests that update rust code python Pull requests that update Python code labels Oct 28, 2026 — with ChatGPT Codex Connector
@acgetchell
acgetchell enabled auto-merge (squash) October 28, 2026 23:39
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 1328f9d and 3f9f1be.

Files ignored due to path filters: 1
  • uv.lock is excluded by !**/*.lock
Files selected for processing: 39
  • .github/actions/setup-tools/action.yml
  • .github/workflows/release-benchmarks.yml
  • CONTRIBUTING.md
  • Cargo.toml
  • README.md
  • REFERENCES.md
  • benches/common/polynomial.rs
  • benches/polynomial.rs
  • docs/BENCHMARKING.md
  • docs/RELEASING.md
  • docs/code_organization.md
  • docs/dev/performance-tooling-adoption.md
  • docs/mathematical_basis.md
  • examples/polynomial_determinant.rs
  • justfile
  • pyproject.toml
  • src/error.rs
  • src/lib.rs
  • src/polynomial.rs
  • src/rational.rs
  • tests/polynomial_bench_inputs.rs
  • tests/polynomial_determinant.rs
  • tests/proptest_polynomial.rs
  • tests/tooling/test_justfile_discoverability.py
  • tests/tooling/test_maintenance_integration.py
  • tests/tooling/test_performance_workflow.py
  • tests/tooling/test_release_baseline.py
  • tests/tooling/test_release_publishing.py
  • tests/tooling/test_shared_tooling.py
  • tests/tooling/test_toolchain_integration.py
  • tooling/README.md
  • tooling/criterion-inventory.toml
  • tooling/criterion-saved.toml
  • tooling/examples.toml
  • tooling/measurements/full.toml
  • tooling/performance-policy.toml
  • tooling/performance.just
  • tooling/release_performance.py
  • tooling/shared_tooling.py

Included review availability: This review used your included allowance. 5 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 6 reviews per hour.

Walkthrough

The PR adds an exact sparse-polynomial determinant API, expands benchmark workloads and correctness gates, changes release baseline production to parallel suite capture and assembly, and updates shared tooling integration to version 0.2.4.

Changes: Exact polynomial determinant

Layer / File(s) Summary
Polynomial representation, determinant, and public contract
src/polynomial.rs, src/error.rs, src/rational.rs, src/lib.rs
Adds canonical sparse rational polynomials and a determinant recurrence for matrix orders 0–8. Work budgets and exponent overflow produce typed errors. The exact-feature API is exported from the crate and prelude.
Validation and API documentation
tests/polynomial_determinant.rs, tests/proptest_polynomial.rs, examples/polynomial_determinant.rs, Cargo.toml, tooling/examples.toml, README.md, REFERENCES.md, docs/mathematical_basis.md, docs/code_organization.md
Adds oracle, property, boundary, and example coverage. The documentation describes canonicalization, ordering, budgets, and determinant behavior.

Benchmark workloads and correctness gates

Layer / File(s) Summary
Expanded benchmark selection and polynomial fixtures
benches/common/polynomial.rs, benches/polynomial.rs, tests/polynomial_bench_inputs.rs, Cargo.toml, tooling/criterion-inventory.toml, tooling/criterion-saved.toml, tooling/performance-policy.toml, tooling/measurements/full.toml
Adds polynomial determinant benchmark fixtures and cases. Adds column-basis, interval division and solve, and rational-dot workloads to release selection and saved-sample mappings.
Measurement gates and benchmark guidance
tooling/performance.just, tooling/release_performance.py, tests/tooling/test_performance_workflow.py, tests/tooling/test_justfile_discoverability.py, justfile, docs/BENCHMARKING.md, docs/code_organization.md
Adds the gate-public recipe and updates measurement plans, benchmark command expectations, correctness-gate coverage, and workload documentation.

Parallel release baseline

Layer / File(s) Summary
Suite capture, packaging, and assembly
.github/workflows/release-benchmarks.yml, tests/tooling/test_release_baseline.py, tests/tooling/test_release_publishing.py, justfile
Runs the default and exact suites as separate matrix jobs, packages their artifacts, and assembles the release baseline from both suites. Tests cover suite provenance, artifact contents, workflow structure, and publication checks.
Release instructions and archive format
docs/BENCHMARKING.md, docs/RELEASING.md, docs/code_organization.md, docs/dev/performance-tooling-adoption.md, tooling/README.md
Documents parallel capture, suite validation, archive assembly, provenance, and recovery steps.

Shared tooling integration

Layer / File(s) Summary
Version 0.2.4 setup and Semgrep adapter
tooling/shared_tooling.py, .github/actions/setup-tools/action.yml, CONTRIBUTING.md, justfile, pyproject.toml
Updates setup and fixture-check commands to use the local adapter. The adapter requires shared tooling version 0.2.4, selects the scanner beside the active interpreter during CLI execution, and restores the prior setup values and PATH.
Tooling tests and documentation
tests/tooling/test_shared_tooling.py, tests/tooling/test_toolchain_integration.py, tests/tooling/test_maintenance_integration.py, tooling/README.md, docs/dev/performance-tooling-adoption.md, docs/code_organization.md
Updates package-version expectations and tests adapter behavior, scanner selection, and fixture-check results. Documentation records the shared tooling ownership and temporary scanner override.

Priority: High

Estimated code review effort: 4 (Complex) | ~55 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant ReleaseWorkflow
  participant DefaultRunner
  participant ExactRunner
  participant SharedTooling
  participant ArtifactStore
  participant AssemblyJob
  participant Publisher
  ReleaseWorkflow->>DefaultRunner: Run public-default suite
  ReleaseWorkflow->>ExactRunner: Run public-exact suite
  DefaultRunner->>SharedTooling: Package suite with inventory and host metadata
  ExactRunner->>SharedTooling: Package suite with host metadata
  DefaultRunner->>ArtifactStore: Upload suite artifact
  ExactRunner->>ArtifactStore: Upload suite artifact
  AssemblyJob->>ArtifactStore: Download both suite artifacts
  AssemblyJob->>SharedTooling: Assemble and validate release baseline
  AssemblyJob->>ArtifactStore: Upload assembled baseline
  Publisher->>ArtifactStore: Retrieve baseline for release upload
Loading

Possibly related issues

  • Issue 311 tracks the v0.5.2 release plan, which includes the determinant scope and release benchmark preparation in this PR.
  • Issue 304 tracks shared tooling adoption related to the updated benchmark verification and archive assembly commands.
  • Issue 317 tracks removal of the temporary Semgrep scanner override after the shared Python baseline supports it.

Possibly related PRs

  • acgetchell/la-stack#297: This PR continues the move to installed shared tooling by updating setup, fixture checks, and release-baseline commands.
  • acgetchell/la-stack#313: This PR extends the public-default and public-exact release suites with additional workloads and separate packaging.
  • acgetchell/la-stack#302: This PR continues the release benchmark pipeline by changing suite production, assembly, and archive validation.
Merge Risk: Minimal · up to 3f9f1

No concrete issue currently blocks merging. Complete the planned hosted validation before release.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Linked Issues check Warning #308 coding requirements are implemented. The summary reports the public exact API, canonical coefficients, exact cancellation, bounded work, typed errors, order 0–8 support, independent determinant t… Run and pass the required native Linux/macOS/Windows CI for this implementation. Record the required representative hosted runtime and final validation evidence for #316.
Passed Passed checks: 3 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "feat: add bounded polynomial determinants and release benchmarks" matches the changeset's two main parts. The changeset adds the exact-feature sparse polynomial module (src/polynomial.rs, S…
Out of Scope Changes check Passed The changes support #308 and #316. They add the polynomial API, tests, examples, benchmarks, release inventory, parallel suite workflow, shared-tool adoption, archive verification, and related documen…
Full details: Title check

Explanation

The title "feat: add bounded polynomial determinants and release benchmarks" matches the changeset's two main parts. The changeset adds the exact-feature sparse polynomial module (src/polynomial.rs, SparsePolynomial, polynomial_determinant with work budgets through order eight) and the polynomial benchmark fixtures. It also expands the release benchmark workflow into parallel default and exact suites, with new tooling and archive assembly. The title is concise, uses the conventional feat: prefix, and names the primary change. It omits the tooling migration to research-repo-tools 0.2.4 and the shared_tooling.py adapter, which are secondary to the title's main point.

Full details: Out of Scope Changes check

Explanation

The changes support #308 and #316. They add the polynomial API, tests, examples, benchmarks, release inventory, parallel suite workflow, shared-tool adoption, archive verification, and related documentation. The temporary scanner adapter is explicitly allowed by #316 and is tracked for removal in #317. No unrelated change is demonstrated.

Full details: Linked Issues check

Explanation

#308 coding requirements are implemented. The summary reports the public exact API, canonical coefficients, exact cancellation, bounded work, typed errors, order 0–8 support, independent determinant tests, boundary tests, examples, and benchmarks. #316 implementation requirements are also present: v0.2.4 adoption, parallel 1,403-case suites, provenance retention, archive verification, rejection gates, and focused tests. However, #316 still requires native Linux/macOS/Windows CI for the implementation commit. The PR description states that native hosted CI and representative tagged release measurements remain outstanding.

Resolution

Run and pass the required native Linux/macOS/Windows CI for this implementation. Record the required representative hosted runtime and final validation evidence for #316.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@codecov

codecov Bot commented Oct 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.26%. Comparing base (1328f9d) to head (3f9f1be).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #318      +/-   ##
==========================================
- Coverage   98.32%   98.26%   -0.06%     
==========================================
  Files          15       16       +1     
  Lines        7462     7609     +147     
==========================================
+ Hits         7337     7477     +140     
- Misses        125      132       +7     
Flag Coverage Δ
unittests 98.26% <100.00%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@acgetchell
acgetchell merged commit d87b10b into main Oct 29, 2026
24 checks passed
@acgetchell
acgetchell deleted the feat/308-polynomial-benchmarks branch October 29, 2026 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request performance Performance related issues python Pull requests that update Python code rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adopt shared parallel Criterion suite verification and assembly feat: Provide bounded exact polynomial determinant evaluation

1 participant