Skip to content

fix(release): require Rust authority for auto acceptance - #865

Merged
seonghobae merged 11 commits into
mainfrom
fix/release-acceptance-rust-authority
Aug 17, 2026
Merged

fix(release): require Rust authority for auto acceptance#865
seonghobae merged 11 commits into
mainfrom
fix/release-acceptance-rust-authority

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Root cause

The release-acceptance smoke treated both numpy and rust as valid outcomes for --backend auto, even though the live production backend contract makes auto Rust-owned and fail-closed when the compiled core is unavailable. That allowed release evidence to certify the reference NumPy backend as the automatic production numerical owner. The canonical release guide also described a Rust-unavailable local auto mode that the live backend contract does not support.

Change

  • Add a fail-first regression that presents a NumPy auto result and requires release acceptance to reject it before downstream diagnostics.
  • Require both fit_summary.json and the CLI fit payload to report rust for the automatic release-acceptance fit.
  • Cover disagreement between persisted Rust evidence and a non-Rust CLI payload.
  • Pin the canonical release guide to the fail-closed automatic-backend contract and remove stale Rustless-auto guidance.
  • Keep explicit NumPy use available only through existing reference/parity surfaces.

Test-first lineage

  • RED numerical-owner contract: 8fafa5c93197f02abf509182a9a2fd6f8bc349ab.
  • GREEN fail-closed implementation: 5cc73e2a5a021c90d68f0caa57b302b50cbb4423.
  • Split-evidence regression: dfe58bad950ee56be8a209295dd7b4bfc657777f.
  • RED canonical-guidance contract: 23b2f67ce3d957a4cc5b116d9e8faaeb686afc80.
  • GREEN canonical guidance: 916cb2d98c3ff666c56091f6135338b53d1b4310.
  • Exact current head: 9f3f913d90368c575f1546d02fd81f50028cd15d.

Exact current evidence

  • Protected base: fb67ced09d8ee00542c05d56374537a9a7239751.
  • The net diff is limited to scripts/release_acceptance.py, tests/test_release_acceptance_backend_authority.py, and docs/release_acceptance.md.
  • GitHub reports the PR mergeable and Ready for review.
  • Exact-head CI, Security Scan, and SAST Semgrep completed successfully.
  • The fresh exact-head inventory contains 34 checks with no failure, queued, or in-progress check; Python/Rust/package/fuzz, coverage evidence, OpenCode, Strix, dependency/security, and provenance contexts are complete.
  • No formal submitted review or unresolved inline review thread is present.

Boundary and remaining gate

This change hardens release evidence only. It does not change numerical formulas, estimator behavior, backend selection policy, package dependencies, security gates, or approval policy. Downstream sales-readiness defense in depth is tracked separately in #866/#867 and is not hidden inside this producer-side slice.

Integration remains blocked by the live qualifying independent non-author approval requirement. Any source-head movement invalidates this evidence and requires a fresh exact-head sweep. No gate is weakened or bypassed.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 7785ce95-500c-4f0b-963e-20a4d3e0b954

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e54e0d20-1587-4d8b-9ca4-1b2846b4643c

📥 Commits

Reviewing files that changed from the base of the PR and between fb67ced and 9f3f913.

📒 Files selected for processing (3)
  • docs/release_acceptance.md
  • scripts/release_acceptance.py
  • tests/test_release_acceptance_backend_authority.py

📝 Walkthrough

Walkthrough

Automatic release acceptance now requires Rust for auto backend fits. The acceptance script validates Rust in both CLI and persisted fit-summary data. Regression tests cover NumPy rejection, backend mismatches, call order, and release documentation.

Changes

Rust acceptance authority

Layer / File(s) Summary
Enforce Rust backend authority
docs/release_acceptance.md, scripts/release_acceptance.py
Release guidance requires compiled Rust for automatic acceptance. Validation rejects NumPy results and mismatches between CLI and persisted backend values.
Cover fail-closed acceptance behavior
tests/test_release_acceptance_backend_authority.py
Tests load the acceptance script, verify simulation-to-fit call order, reject invalid backend results, and check the Rust requirements in release guidance.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: 🔵 Low · up to 9f3f9

The change prevents NumPy results from being certified as the production automatic-backend outcome, reducing the risk of invalid release evidence. The PR is otherwise technically mergeable, but required research or citation evidence for this substantive process change should be added or identified before merge.

Sequence Diagram(s)

sequenceDiagram
  participant release_acceptance.py
  participant CLI fit payload
  participant fit_summary.json
  release_acceptance.py->>CLI fit payload: Run automatic fit
  release_acceptance.py->>fit_summary.json: Read persisted backend
  release_acceptance.py->>CLI fit payload: Require Rust backend
  release_acceptance.py->>fit_summary.json: Require matching Rust backend
Loading

Possibly related issues

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the main change: requiring Rust authority for automatic release acceptance.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/release-acceptance-rust-authority

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@seonghobae
seonghobae marked this pull request as ready for review August 14, 2026 21:53
@seonghobae
seonghobae enabled auto-merge (squash) August 14, 2026 21:53

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 9f3f913d90368c575f1546d02fd81f50028cd15d.

  • Head SHA: 9f3f913d90368c575f1546d02fd81f50028cd15d

  • Workflow run: 31931674048

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Docs: release_acceptance.md"]
  S1 --> I1["operator or user guidance"]
  I1 --> R1["Review risk: Docs: release_acceptance.md"]
  R1 --> V1["docs review"]
  Evidence --> S2["Changed file: release_acceptance.py"]
  S2 --> I2["repository behavior"]
  I2 --> R2["Review risk: Changed file: release_acceptance.py"]
  R2 --> V2["required checks"]
  Evidence --> S3["Test: test_release_acceptance_backend_authority.py"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test: test_release_acceptance_backend_authority.py"]
  R3 --> V3["targeted test run"]
Loading

@opencode-agent

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 9f3f913d90368c575f1546d02fd81f50028cd15d
  • Workflow run: 31931674048
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 9f3f913d90368c575f1546d02fd81f50028cd15d.

  • Head SHA: 9f3f913d90368c575f1546d02fd81f50028cd15d

  • Workflow run: 31931674048

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Docs: release_acceptance.md"]
  S1 --> I1["operator or user guidance"]
  I1 --> R1["Review risk: Docs: release_acceptance.md"]
  R1 --> V1["docs review"]
  Evidence --> S2["Changed file: release_acceptance.py"]
  S2 --> I2["repository behavior"]
  I2 --> R2["Review risk: Changed file: release_acceptance.py"]
  R2 --> V2["required checks"]
  Evidence --> S3["Test: test_release_acceptance_backend_authority.py"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test: test_release_acceptance_backend_authority.py"]
  R3 --> V3["targeted test run"]
Loading

@opencode-agent
opencode-agent Bot disabled auto-merge August 16, 2026 07:16

Copy link
Copy Markdown
Contributor Author

Fresh exact-head lifecycle correction for 9f3f913d90368c575f1546d02fd81f50028cd15d against protected main fb67ced09d8ee00542c05d56374537a9a7239751: the PR body’s claim that no formal review is present is stale. The current OpenCode submission is CHANGES_REQUESTED on this exact head via central run 31931674048. First-causal-boundary RCA shows target metadata materialization, merge-tree materialization, replay guard, and changed-file syntax all succeeded; coverage-evidence then failed at Measure test and docstring evidence because the trusted central coverage layer could not materialize base Python locks: trusted uv archive download failed: HTTPError. This is an owning-layer central .github evidence failure, not evidence of a defect in this three-file release-acceptance slice, and this repository must not weaken or dismiss that review. Returning the PR to Draft until a legitimate current-head coverage/review run supersedes the decision. The Rust-authority implementation remains useful and unchanged.

@seonghobae
seonghobae marked this pull request as draft August 16, 2026 08:07
@seonghobae
seonghobae marked this pull request as ready for review August 17, 2026 10:07
@cursor

cursor Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@seonghobae
seonghobae dismissed opencode-agent[bot]’s stale review August 17, 2026 10:07

Superseded infrastructure-only review. This REQUEST_CHANGES is explicitly anchored to predecessor head 9f3f913 and failed coverage-evidence run 31931674048. The live source head is f5330e4; its exact-head coverage-evidence, OpenCode, Python and other hosted checks observed before the Ready transition are successful, and this review contains no source-code finding. Dismissing only the obsolete predecessor-head blocker; this is not approval and fresh Ready-state required workflows remain authoritative.

@seonghobae
seonghobae enabled auto-merge (squash) August 17, 2026 10:07
@seonghobae
seonghobae merged commit 23fd63e into main Aug 17, 2026
37 checks passed
@seonghobae
seonghobae deleted the fix/release-acceptance-rust-authority branch August 17, 2026 12:36
cursor Bot pushed a commit that referenced this pull request Aug 17, 2026
The merge with main kept the pre-helper regex from #865 after
_require_auto_fit_resolved_to_rust started raising
"fit auto backend must resolve to rust".

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
seonghobae added a commit that referenced this pull request Aug 25, 2026
…faces (#951)

* test(docs): pin Claude runtime support contract

* docs: align Claude guidance with fail-closed runtime

* test(docs): normalize Markdown wrapping in runtime contract

* test(docs): reject marginal fallback claim

* revert: keep runtime guidance lane scoped

* test(docs): require machine-readable runtime contract

* docs: publish machine-readable runtime contract

* test(config): expose integer callback trust gap

* fix(config): reject caller-controlled integer coercion

* test(config): cover bounded integer trust controls

* docs(changelog): record config integer boundary hardening

* docs(doctoring): record config integer trust boundary

* fix(config): validate simulation and fit controls at construction

Strix VULN-0001 failed the current head because MLS2PLMConfig and
FitConfig could be constructed with values that bypass memory-safety
bounds until a later explicit validate() call. Run the existing
validators from __post_init__ so invalid objects cannot exist, and keep
validate() public and idempotent.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>

* fix(config): store trusted integers and harden seed controls

Write admitted NumPy integers back as built-in ints so n_items and
seed + restart cannot wrap, and reject untrusted seed/verbose values
before construction returns.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>

* docs: lock buyer-facing auto backend to fail-closed Rust

Keep the Claude runtime-contract TOML, and stop README, commercial
readiness, PRD, TRD, and ADR-0002 from advertising a silent NumPy
fallback for backend=auto. Purchasers should install the compiled
Rust core or pass explicit backend=numpy for parity testing.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>

* fix: lock leftover auto-backend surfaces to fail-closed Rust

Close the buyer-facing leftovers that #945 missed: README CLI examples,
fit --help, FitConfig comments, commercial Operational Notes, and the
auto fail-closed error now name the next action. Contract tests bind to
resolve_backend and scan those surfaces.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>

* test: tolerate wrapped fit --help and reference/parity wording

The auto-unavailable message uses "reference/parity" as policy language,
not a filesystem path. fit --help wraps the next-action clause, so the
lock now compares whitespace-normalized help text.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>

* fix: lock leftover demo and acceptance auto surfaces to Rust

Buyer demo copy, README layout, sales --check-import help, and
release-acceptance still treated Rust as optional or accepted NumPy
as an automatic fit outcome. Fail those surfaces closed and lock them.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>

* test(sales): expose automatic backend authority gap

* test(sales): defer backend authority to owning PR

* test(backend): cover unloadable Rust core

* fix(backend): fail closed before untrusted controls and loader errors

* test(backend): enforce callback-safe controls

* docs(backend): record loader and control hardening

* docs(backend): unify loader and selector trust boundary

* test(config): align resource-limit regressions with constructor validation

* test(config): keep bifactor objective fixture valid

* fix(test): match auto-fit Rust authority error text

The merge with main kept the pre-helper regex from #865 after
_require_auto_fit_resolved_to_rust started raising
"fit auto backend must resolve to rust".

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>

* fix(diagnostics): trust fold counts before budget products

dimensionality_diagnostics still multiplied untrusted NumPy k_folds
and added untrusted seed offsets, so uint8(32)*32 wrapped past the
fit-budget cap and uint8(250)+6 wrapped to 0. Store built-in ints
the same way seed/verbose already do.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>

* test(config): use raw regex literals in compatibility checks

* fix(diagnostics): trust fit-diagnostic integer controls

fit_diagnostics still coerced parameter_count with int() and left
m2_q_* untrusted, so a hostile __index__ object could execute during
AIC/BIC arithmetic. Marshal those controls through _trusted_integer
the same way seed/verbose already do.

Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>

* test(backend): document import failure fixture

* test(backend): lock reference guidance contract

* fix(adr): preserve accepted backend decision

* fix(docs): distinguish CLI and Python reference paths

* fix(cli): point NumPy parity users to --reference

* test(runtime): align fail-closed reference contract

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Co-authored-by: opencode-agent[bot] <219766164+opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: Claude <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