Skip to content

fix(api): validate callback contracts before model evaluation - #129

Draft
seonghobae wants to merge 5 commits into
sentinel-input-validation-593108796151447048from
fleet/callback-contracts-on-option-validation
Draft

fix(api): validate callback contracts before model evaluation#129
seonghobae wants to merge 5 commits into
sentinel-input-validation-593108796151447048from
fleet/callback-contracts-on-option-validation

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Stack / authority

This Draft is stacked on canonical option-validation #126 exact 5a4be4cc5e231dc14155b611b4396ec631d5083a. Current exact head is 39d3cad1f4774f5a61bdc31427a90ca6da691bc2, open and mergeable. It owns only the remaining exported callback contracts and release-note follow-through; #126 retains nested / adj / conf.level option-validation authority.

RED → minimal repair

RED exact d735706f967d2ef0f819aa7c647e960e2fdc3fcf changed only tests/testthat/test_exported_input_validation.R. It requires malformed ll1/ll2, score1/score2, and vc1/vc2 values to fail at the exported function boundary before model inspection, with stable diagnostics and conditionCall() == NULL. Positive contract remains: score callbacks may be NULL; likelihood and covariance callbacks must be functions.

Minimal production descendants add only those public-boundary predicates to icci() and vuongtest(). During repair, 4c469c25c51d57be5654ad5e2b94eb0e87007e49 accidentally changed print.icci() Model 2 output from AIC2/BIC2 to AIC1/BIC1; fresh patch review caught that unrelated regression immediately. Ordinary descendant 38f9ee2c569430b91534208660940b59537967d4 restores the exact pre-existing Model 2 print contract. Current #129 diff contains no print-method semantic change. f9c33be0956a0ab8a13e7d28daab906a254cf8d8 adds the vuongtest() callback predicates and current 39d3cad... records the buyer-visible exported validation contract in NEWS.

Current relative delta from #126 is exactly four paths: R/icci.R, R/vuongtest.R, tests/testthat/test_exported_input_validation.R, and NEWS.

#122 succession boundary

#122 still carries distinct callback/NEWS semantics on a stale/diverged base. Those valid semantics are now source/test represented here with broader invalid-value coverage. #122 remains open until this successor earns executable exact-head acceptance; no predecessor workflow/review result is transferred and branch-local generated .jules/sentinel.md doctrine is not treated as protected product authority.

Exact-head execution gap

Fresh exact-head query on 39d3cad1f4774f5a61bdc31427a90ca6da691bc2 returns zero check runs / zero PR workflow runs. This is not GREEN. Live protected master has only .github/workflows/R-CMD-check.yaml, whose pull_request.branches filter is [main, master]; because this dependency-safe PR targets #126's feature branch, the repository R-CMD workflow does not materialize for the stack child.

Do not manufacture execution with a no-op source commit or transfer #126's R-CMD success. Keep Draft until the approved owner path provides exact-head stacked-PR execution or the stack is legitimately reconciled onto protected master, then require current-head R-CMD plus applicable central security/SAST/CodeQL and qualifying independent review.

This is input-contract hardening, not a vulnerability-severity or performance claim. No force push, destructive rebase, self-approval, gate weakening, source-neutral retry, or predecessor GREEN transfer.

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug priority: medium Normal-priority or P2 work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant