Skip to content

Compute percentile endpoint Monte Carlo precision - #2190

Draft
seonghobae wants to merge 3 commits into
codex/mc-rank-api-20260927from
codex/mc-endpoint-precision-20260927
Draft

seonghobae wants to merge 3 commits into
codex/mc-rank-api-20260927from
codex/mc-endpoint-precision-20260927

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

현재 권한 — Draft / Proposed

Exact head 9844fe030d21d04ce2380810e08f208b89d248c9, tree 9fe97e11ef713c1b8c8fa93db050d39414293412입니다. Base는 #2189 exact 520b6e7d58b2644b8b37a4a962dada2ecb5cd15d이며, effective delta는 3 commits / 4 source-test paths입니다. Protected main 대비 기존 stack 전체는 8 ahead / 0 behind에서 출발했고 force push나 destructive rebase를 사용하지 않았습니다.

이 PR은 아직 연구 수치 또는 릴리스 권한이 아닙니다. 선행 #2189의 exact-head acceptance와 protected integration, 이 branch의 ordinary/non-force reconciliation, terminal exact-head required Checks, qualifying independent approval이 필요합니다.

작업

독립적인 적격 복제 벡터의 백분위 구간 두 끝점을 fast-mlsirm에서 계산하고, 각 끝점의 이항 순위구간이 허용하는 가장 큰 이동을 구간 반폭으로 나눕니다. Rust 핵심 함수와 Python 공개 API가 비율 및 허용치 통과 여부를 생산합니다. 백분위 위치, 끝점별 신뢰수준, 허용 비율은 호출자가 필수 인자로 지정합니다.

Lu (2020), NIST Technical Note 2119 §5.3, 인쇄 32–33쪽의 독립 표본 분위수 순위구간과 이산분포 하한 설명이 계산 근거입니다. 이 API는 부트스트랩 재적합의 수렴, 범주 손실, 표본추출 타당성 또는 Andrews–Buchinsky (pdb, τ) 절차를 판정하지 않습니다.

Current head는 누락됐던 공개 계약도 보완합니다.

  • McPercentileIntervalPrecision과 10개 public field에 beginner-readable rustdoc을 추가했습니다.
  • 계산 함수에 Lu (2020)의 완전한 APA 7 reference, §5.3 및 pp. 32–33 locator를 결합했습니다.
  • Python 공개 함수에 fixed-draw/per-endpoint/non-goal 문서를 추가하고 __doc__ 회귀 assertion으로 고정했습니다.
  • 계산 로직과 반환 schema는 변경하지 않았습니다.

Exact-head 확인

  • 이전 809a60d4… source에서 새 Python 공개 문서가 없음을 RED로 재현했습니다.
  • Current tree에서 Python test source compile과 git diff --check가 PASS했습니다.
  • macOS arm64 CPython 3.14 작업 트리를 exact head 9844fe03로 fast-forward한 뒤 cargo test -p mlsirm-core bootstrap_mc --lib 3건, cargo check --manifest-path crates/fast-mlsirm-py/Cargo.toml, 변경 Rust 파일 2개의 rustfmt --check, git diff --check가 통과했습니다.
  • 루트 pyproject.toml을 적용해 maturin develop --uv --release로 _core를 새로 빌드했습니다(파일 SHA-256 352bc2b0a142287ba5a890373edf850fb5bd1eb3286b25b430288ae82a7fb80a). .venv/bin/python -m pytest -q tests/test_bootstrap_mc.py 3건이 통과했습니다. --manifest-path만 지정한 첫 빌드는 잘못된 모듈 이름으로 설치돼 기존 _core를 읽었으므로 그 실행의 실패는 제품 판정에서 제외합니다.
  • 전 저장소 cargo fmt --all -- --check는 이 PR 밖의 기존 파일에서도 대량 차이를 보고합니다. 이번 변경의 Rust 파일 2개를 따로 확인한 결과는 통과입니다. 이 로컬 검사는 원격 필수 검사와 독립 검토를 대신하지 않습니다.
  • Fresh exact-head local-owner workflows: CodeQL 36273346948 queued, ClusterFuzzLite 36273346980 skipped (Draft), CI 36273347043 pending.
  • Protected central admission은 stacked base에서 Security Scan, SAST Semgrep, CodeQL PR을 생성하지 않았습니다. Canonical owner ContextualWisdomLab/.github #2109의 stacked-base admission repair가 protected authority가 될 때까지 이 PR은 Draft를 유지합니다.
  • Independent current-head review와 review thread는 0입니다.

Stack / downstream

이 PR은 #2189의 순위구간 API 위에 쌓입니다. 논문 측의 열 개 끝점 범위와 연구 허용치는 late-life #157에 기록합니다. 범용 Andrews 형식 계산은 별도 이슈 #2013에 남습니다.

No self-approval, manual rerun, source-neutral wake commit, protection bypass, force push, destructive rebase, central workflow copy, or predecessor-check transfer is authorized.

@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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: Repository: ContextualWisdomLab/fast-mlsirm/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 14b55e15-35f3-4289-afbc-edbea2d3d1a4

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

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

Copy link
Copy Markdown
Contributor Author

고정 복제 수 범위를 명시한 후속 커밋 809a60d4를 올렸습니다. NIST §5.3의 순위구간 포함확률을 같은 실행의 반복 점검·첫 통과 배치에 그대로 적용하지 않습니다. 공개 함수는 고정된 입력 벡터 한 번의 조건부 정밀도만 계산합니다.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 26, 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 marked this pull request as draft September 26, 2026 21:27

seonghobae commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Exact-head repair receipt — 9844fe030d21d04ce2380810e08f208b89d248c9, tree 9fe97e11ef713c1b8c8fa93db050d39414293412.

Review found one current-head contract defect: the new public Rust result and its ten fields had no public documentation, and the exported Python function had no behavioral docstring despite TRD-NUM-003/TRD-TEST-001. The repair is source/documentation-only:

  • complete beginner-readable rustdoc on McPercentileIntervalPrecision and every public field;
  • explicit fixed-draw/per-endpoint/non-goal scope;
  • Lu (2020) full reference with NIST TN 2119 §5.3, pp. 32–33 locator and DOI;
  • Python __doc__ regression assertion.

The preceding 809a60d4… source provides the RED absence probe. Current tree passes Python source compile and git diff --check; no cargo/rustc or current native module is available in the repair environment, so no new Rust/pytest claim is made.

Fresh exact-head local-owner runs are CodeQL 36273346948 queued, ClusterFuzzLite 36273346980 skipped because the PR is Draft, and CI 36273347043 pending. Central Security/SAST/CodeQL PR admission is absent on the stacked base; the live canary is recorded on ContextualWisdomLab/.github #2109. Draft/Proposed is retained. No force push, rerun, bypass, self-approval, or predecessor-evidence transfer.

@seonghobae

Copy link
Copy Markdown
Contributor Author

현재 head 9844fe030d21d04ce2380810e08f208b89d248c9의 끝점 정밀도 경로를 독립 확인했습니다. Lu (2020), NIST TN 2119 §5.3, 인쇄 32–33쪽은 독립 관측값의 분위수에 대해 이항 개수 K의 r..t-1 확률을 순서통계량 X_(r)..X_(t) 구간과 연결합니다. 현재 Rust 코드는 count_low..count_high를 0기준 관측 순위 count_low-1..count_high에 대응시키므로 해당 식과 일치합니다. 이산값의 경우 문헌이 제시한 포함확률은 하한으로 읽습니다.

이 작업 트리에서 cargo test -p mlsirm-core bootstrap_mc --lib 3건, .venv/bin/python -m pytest -q tests/test_bootstrap_mc.py 3건이 모두 통과했습니다. 합성 B=1000, 백분위 .025/.975, 끝점별 신뢰수준 .95 호출도 유한한 두 순위구간과 .95 이상의 이항 포함확률을 반환했습니다. 이는 연구 자료의 부트스트랩 결과가 아닙니다.

문헌은 이 연구의 허용 비율 .10, 두 끝점의 동시 피복률, 반복 점검 뒤 중지의 보장을 정하지 않습니다. 공개 함수와 논문 호출부는 현재 이를 끝점별·고정 복제 수 판정으로 명시합니다. 이 확인은 draft 상태, 선행 #2189의 병합, 중앙 승인 변경, 현재 head의 호스팅 검사와 독립 검토를 대체하지 않습니다.

@seonghobae seonghobae added the review-priority OpenCode review queue priority (maintainer-applied only) label Sep 29, 2026
@seonghobae
seonghobae marked this pull request as ready for review September 29, 2026 12:50
@seonghobae
seonghobae marked this pull request as draft September 30, 2026 05:40

This branch has not been deployed

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

Labels

review-priority OpenCode review queue priority (maintainer-applied only)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant