Skip to content

fix(cat): seal administration evidence before NumPy protocols - #1345

Merged
seonghobae merged 24 commits into
mainfrom
fix/cat-administration-evidence-1344
Aug 25, 2026
Merged

fix(cat): seal administration evidence before NumPy protocols#1345
seonghobae merged 24 commits into
mainfrom
fix/cat-administration-evidence-1344

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Closes #1344.
Closes #1347.
Closes #1354.

Defects

Protected-main CAT administration admission allowed _lossless_signed_int64_indices() and _real_response_array() to start with unrestricted np.asarray(...). Caller-defined top-level __array__ providers could therefore synthesize or replace administered item identities or observed 0/1 response evidence during Python validation before Rust CAT ability estimation.

After callback-safe carrier admission was established, exact NumPy EAP/MLE administration/response vectors could still be over-rank, length-mismatched, or longer than the calibrated item bank and yet reach value-wise validation plus dense int64/float64 marshalling first.

Review then exposed an adjacent semantic distinction: ability_standard_error treats administered as a set-valued mask, so duplicate-laden and multidimensional exact NumPy evidence must remain valid and be deduplicated with np.unique. Removing the EAP/MLE uniqueness-specific preflight restored that compatibility, but left no absolute logical-size ceiling before signed-64 value scanning/dense conversion/deduplication. A tiny-backing broadcast view could therefore induce unbounded O(N) Python work on the standard-error surface.

A later exact-head review found one more EAP/MLE ordering gap: when administered itself was an inert exact vector longer than the calibrated bank but responses was an unsupported protocol-bearing provider, the wrapper delegated before applying the over-bank bound. The raw validator could then start dense/value-wise work on an administration that was already structurally impossible.

RED → GREEN

Callback-free scientific evidence — #1344

  • RED 07061034de7903b1f8427c58013dd8730b2ed2dc: hostile administered/response array providers must fail with zero callback execution and before compiled-core use.
  • GREEN 8a564d026808e6fe045e5c8273d174a896bd7ee0: admit only exact NumPy numeric arrays or exact built-in list/tuple vectors whose leaves are package-trusted concrete Python/NumPy numeric scalars before materialization.
  • Compatibility 454ffaa10e6d72997b8c68da66afbc39a7a663d2: concrete NumPy scalar sequences normalize to package-owned int64/float64 Rust payloads.

Bounded EAP/MLE administration metadata — #1347

  • RED 4308892734594d87b74c571824b7d517d67f4dfc: over-bank length, length mismatch, and over-rank EAP/MLE evidence fail before dense conversion/native discovery.
  • GREEN module f4ee035809d2ab26ae9d4b06b334c70288c8a405 + public installation d1cac772cd336bc120e34e6fb9807fe8b66c109c: inert exact-container rank/length preflight preserves unsupported-provider callback/type semantics while rejecting structurally impossible unique administrations.
  • Lint cleanup 4ede92ed0179c507ae37e5cf06e54cca73565f9c.
  • Review-driven RED b6e27dad5971089f970cec582de558104378a715: a 3-entry broadcast administration against a 2-item bank must fail before an unsupported response provider is inspected or invoked.
  • GREEN 8385299cbe96671215eccbc0f8913ab32e76c731: once exact administered metadata is available, apply the impossible-over-bank bound before inspecting the response carrier; unsupported administered providers still retain the original callback/type rejection path.
  • Governed evidence/current head ebcf17f8e56c469d2d152a7364327dfb1fce5654 records the response-independent over-bank ordering contract.

Standard-error set-mask compatibility and resource envelope — #1354

  • Compatibility RED a099969ebef0bc1d60811369d66c08f0c3737efe → GREEN 38e3f20f2223658031dcbf7a559f2a9d9cf4f0c5: preserve duplicate-laden and multidimensional exact NumPy administered evidence; Rust receives the deduplicated set-valued mask.
  • Resource RED 90b715138fd40378816781a3c6361e0cecda9714: with a test-only lowered ceiling, an exact NumPy broadcast mask must fail before _lossless_signed_int64_indices() or compiled-core discovery.
  • GREEN f7d4b867783a289cae08d72bd7f16295664f3988: independently wrap ability_standard_error and bound exact NumPy/list/tuple mask evidence to 20,000,000 logical cells from inert metadata before signed-64 scans, dense conversion, or np.unique. This does not impose EAP/MLE rank/uniqueness semantics on the set-valued mask.

Scientific ownership

No CAT probability, likelihood, posterior/EAP/MLE, Fisher-information, item-selection, stopping, standard-error, or uncertainty arithmetic changes. Those production numerical paths remain Rust-owned. Python changes are validation, bounded materialization, marshalling, package adapter installation, and regression evidence only.

Current integration boundary

Exact head is ebcf17f8e56c469d2d152a7364327dfb1fce5654, open / non-Draft / mergeable. Protected main@7006815a7a4de9e72af4a9dc12103188e2803ddc; fresh comparison is 23 commits ahead / 0 behind with merge base equal to current main. Effective current-main delta is six CAT validation/resource files.

Fresh exact-head repository-local runs are newly generated and remain nonterminal: CI is pending and Security Scan, SAST Semgrep, and CodeQL are queued. Predecessor-head evidence does not transfer. Formal reviews still provide no independent approval. The addressed response-independent over-bank review thread is resolved; the remaining carrier-type thread is informational and describes the intentional callback-safe narrowing away from generic protocol-bearing array-likes.

Ready is not merge authority. Require the repository ruleset's two effective approvals, last-push approval, resolved blocking review threads, and every applicable protected central Analyze (actions), close-empty, scan-pr-queue, required-workflow-bootstrap, coverage-evidence, opencode-review, Python/Rust/package/fuzz, dependency/OSV/Trivy/Scorecard/Strix, SBOM/provenance/release context before merge. No gate weakening, review dismissal, self-approval, force update, or destructive rebase is used.

@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

Next included review available in 59 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 9e7228b4-d06a-4360-960e-95696b0120a2

📥 Commits

Reviewing files that changed from the base of the PR and between 9c12eab and 2bc7ba2.

📒 Files selected for processing (7)
  • CHANGELOG.md
  • docs/changelog.d/1344-cat-administration-evidence.md
  • python/fast_mlsirm/__init__.py
  • python/fast_mlsirm/_cat_administration_resource_safety.py
  • python/fast_mlsirm/cat.py
  • tests/test_cat_administration_evidence_admission.py
  • tests/test_cat_standard_error_resource_admission.py
✨ 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/cat-administration-evidence-1344

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 24, 2026 21:16
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae seonghobae closed this Aug 25, 2026
@seonghobae seonghobae reopened this Aug 25, 2026
@seonghobae seonghobae closed this Aug 25, 2026
@seonghobae seonghobae reopened this Aug 25, 2026
# Conflicts:
#	python/fast_mlsirm/__init__.py

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

Open in Devin Review

Comment thread python/fast_mlsirm/_cat_administration_resource_safety.py
@seonghobae

Copy link
Copy Markdown
Contributor Author

Merge-forward: resolved python/fast_mlsirm/__init__.py package-surface conflict against main@9c12eab1 by combining this branch's CAT administration resource-safety install with main's independently landed CDM response-safety install (both sides kept, install ordering preserved before legacy export copies). Regenerated CHANGELOG.md from the merged fragment set via scripts/render_changelog_fragments.py --update (--check passes). Merge commit 2bc7ba2a; no statistical formula, control domain, or result schema changed.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@seonghobae
seonghobae merged commit 681deb6 into main Aug 25, 2026
37 of 39 checks passed
@seonghobae
seonghobae deleted the fix/cat-administration-evidence-1344 branch August 25, 2026 05:41
seonghobae added a commit that referenced this pull request Aug 25, 2026
Pin the baseline to protected main@9c12eab1 (v0.9.0). The open-PR queue
collapsed from 74 to 6 since the previous snapshot; replace the stale PR
table with the current six lanes (#1363, #1345, #1279, #1029, #1005, #998)
including their merge-forward state. Update gap-matrix evidence columns for
landed work: automatic Rust backend (#951/#1070), crossed multiple-membership
(#1014), the Figma design-boundary ADR now at docs/adr/0016 via merged
#1130, and cross-engine conformance (#1082) after #1077 closed as completed.
No production code, formula, estimator, or release surface changed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant