Repository navigation
feat: add bounded polynomial determinants and release benchmarks - #318
Conversation
- 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
|
No actionable comments were generated in the recent review.
|
| 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:
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
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: 
3 · 
1
-
Failed checks: 1 warning Passed checks: 3 passed-
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
#308and#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#316and is tracked for removal in#317. No unrelated change is demonstrated.
-
Full details: Linked Issues check
-
Explanation
#308coding 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.#316implementation requirements are also present: v0.2.4 adoption, parallel 1,403-case suites, provenance retention, archive verification, rejection gates, and focused tests. However,#316still 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 Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
Adds bounded exact polynomial determinants and includes all public benchmark suites in automatic release capture for v0.5.2.
Validation on macOS arm64:
just cipassed 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.just check,just python-check, andjust test-pythonpassed: 303 Python consumer tests in 647.79 seconds, including the complete 1,403-case archive round trip and rejection/approval gates.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