fix(models): seal model-spec record admission - #1064
Conversation
|
Warning Review limit reached
Next review available in: 56 minutes 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. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
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. Comment |
|
Current-head review request for 96e114f. Exact-type model-spec admission is scoped to validation and preserves the existing unsupported multidimensional estimator contract. Please review this head and regenerate all required checks. @opencode-agent review @cwl-noema-review review |
|
Current-head local review evidence for |
|
Current-head review request for |
|
Current-head review request for b6fa02a.\n\n@opencode-agent review\n@cwl-noema-review review\n\nLocal focused model-spec test evidence is already posted; all completed repository/security checks are passing and remaining CI/Strix jobs are pending. |
|
Root-cause fix pushed at 0b0ef30f1d37d1e12d030c6d37b6814ac46b4bd1. The changelog fragment now has the required level-one title; focused |
|
Correction: the exact current post-fix head is 0b0ef30. The changelog title fix and focused 8/8 contract proof are bound to this SHA; please disregard the previously mistyped long SHA in my comment. |
|
Correction: exact-head local validation for SHA 0b0ef30.
@opencode-agent review @cwl-noema-review review |
|
Reviewed exact current head 0b0ef30.
Please regenerate the protected OpenCode/Noema review evidence for this exact head. @opencode-agent review @cwl-noema-review review |
Pull request was converted to draft
|
@opencode-agent review @cwl-noema-review review Please review exact current HEAD dc65d76. |
seonghobae
left a comment
There was a problem hiding this comment.
Current-head review update for dc65d76.
Found and fixed a real documentation gap in the newly added hostile model-record tests: both nested probe classes and their attribute hooks lacked docstrings. Added only those six lines; the model admission behavior remains unchanged. Focused model tests: 25 passed; Ruff and diff checks pass. The PR remains Draft, so no merge action was attempted.
|
Reviewed exact HEAD dc65d76 with CodeGraph. The trust-boundary fix admits only exact package-owned exploratory/confirmatory records before reading fields, while preserving numeric factor counts and exact model behavior. The 25-model contract tests, Ruff, compilation, diff checks, and 100% model-module docstring coverage pass; hosted Python, Rust, GPU, fuzz, security, CodeQL, Noema, Strix, OpenCode, and coverage checks are green. Ready for normal protected auto-merge; no bypass used. |
|
@opencode-agent review @cwl-noema-review review Please issue independent formal reviews for exact current head |
Closes #1063.
Defect
_resolve_model()already rejected hostile integer factor-count subclasses, but protectedmain@04d0bc21a2a20693bcf16108cd76d394fe844d23still admitted caller-definedExploratoryModel/ConfirmatoryModelsubclasses throughisinstance(...)before readingdimensionsorloading_pattern. A subclass could therefore execute caller-controlled attribute callbacks while the package was still deciding whether the model specification was trusted.RED → GREEN
c23be656e7af67b6e0aaeee7023ee2135ddf396d: focused resolution regressions construct hostile exploratory and confirmatory subclasses without invoking their constructors, arm only the relevant package field access, and require the existing package-ownedTypeErrorwith zero callbacks. The protected-mainisinstance(...)implementation reaches those callbacks.9b897f247c9b4920dfe2a7e914c8280d135b6eae: replace subclass-permissive record admission with exacttype(model) is ExploratoryModel/type(model) is ConfirmatoryModelchecks before any record field read.96e114f92d570b2fda4f408e1f8d37b27e4a7b64: add the governed changelog fragment.An isolated boundary proof confirms the predecessor path dispatches the hostile
dimensions/loading_patterncallbacks, while the exact-type path returns the existingTypeErrorwith zero watched callbacks. Hosted exact-head repository CI/security remains authoritative for integration.Preserved contract
ExploratoryModelandConfirmatoryModelinstances retain their existing behavior;Ownership boundary
Python validation/marshalling only. No likelihood, loading estimation, gradients, optimizer, identification, rotation, factor retention, uncertainty, or structural-model-selection arithmetic changes. Production numerical ownership remains Rust-first.
Verification boundary
Current exact head is
96e114f92d570b2fda4f408e1f8d37b27e4a7b64against protectedmain@04d0bc21a2a20693bcf16108cd76d394fe844d23, with exactly three changed files:python/fast_mlsirm/models.py,tests/test_cov_a_models.py, anddocs/changelog.d/1063-model-spec-record-admission.md. Repository CI, CodeQL, Semgrep, and Security Scan are regenerating on this exact head. Keep this PR Draft until exact-current-head required CI/security/package/coverage and independent review evidence is terminal and clean; predecessor-head evidence does not transfer.