feat(enterprise): compile issue scoring requests - #532
Conversation
|
Warning Review limit reached
Next review available in: 34 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling 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 (6)
Comment |
|
@jules Validate and harden the exact current draft head. Run Ruff formatting/lint, focused tests for |
|
@jules One concrete test-helper bug to include in the hardening pass: |
|
@jules Exact-head CI completed with only two objective failures: (1) |
|
@jules The invalid-issue helper fix is now present at exact head |
|
@jules Exact head |
|
@coderabbitai review Review the exact current head |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
expected='eccb0ce47ce3f0b8a571abadcaeddca75c472d1b'
actual="$(git rev-parse HEAD)"
printf 'HEAD=%s\nEXPECTED=%s\n' "$actual" "$expected"
git status --short
printf '\n--- changed files against PR base ---\n'
git diff --name-status "$(git merge-base HEAD origin/main)" HEAD || true
printf '\n--- commit summary ---\n'
git show --no-ext-diff --format=fuller --stat --summary HEAD
printf '\n--- relevant file locations ---\n'
fd -a 'request\.py|test_scoring_enterprise_issue_request\.py|scoring.*\.py' . | sed -n '1,160p'
printf '\n--- request module outline ---\n'
ast-grep outline python/fast_mlsirm/scoring/enterprise_issue/request.py --items all --view expanded || true
printf '\n--- focused test module outline ---\n'
ast-grep outline tests/test_scoring_enterprise_issue_request.py --items all --view expanded || true
printf '\n--- relevant diff ---\n'
git diff --no-ext-diff "$(git merge-base HEAD origin/main)" HEAD -- \
python/fast_mlsirm/scoring/enterprise_issue/request.py \
tests/test_scoring_enterprise_issue_request.py \
| sed -n '1,260p'Length of output: 18138 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- request compiler, remaining implementation ---'
sed -n '220,340p' python/fast_mlsirm/scoring/enterprise_issue/request.py
printf '%s\n' '--- enterprise contract model outline ---'
ast-grep outline python/fast_mlsirm/scoring/enterprise_issue/contracts.py --items all --view expanded
printf '%s\n' '--- enterprise contract source: records and evidence methods ---'
rg -n -A28 -B8 \
'^(class (AtomicIssueRecord|StakeholderPerspective|CandidateIntervention|EvidenceSpan|CounterevidenceRecord|EnterpriseSourceRecord)\b|def evidence_references\b|def to_evidence_reference\b|MAX_ENTERPRISE_)' \
python/fast_mlsirm/scoring/enterprise_issue/contracts.py
printf '%s\n' '--- shared request authorization boundary ---'
ast-grep outline python/fast_mlsirm/scoring/authorization.py --items all --view expanded
rg -n -A100 -B8 '^def build_scoring_request\b' python/fast_mlsirm/scoring/authorization.py
printf '%s\n' '--- metadata safety and shared execution request definition ---'
rg -n -A100 -B8 '^(def (freeze_metadata|bounded_values)\b|class ScoringRequest\b|class EvidenceReference\b)' \
python/fast_mlsirm/scoring/_contract_safety.py \
python/fast_mlsirm/scoring/execution.py \
python/fast_mlsirm/scoring/_validation.py
printf '%s\n' '--- focused request tests ---'
cat -n tests/test_scoring_enterprise_issue_request.py
printf '%s\n' '--- evidence-contract documentation diff at HEAD ---'
git diff --no-ext-diff "$(git merge-base HEAD origin/main)" HEAD -- docs/enterprise_issue_evidence_contracts.mdLength of output: 87227 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- evidence span validation and conversion ---'
sed -n '246,373p' python/fast_mlsirm/scoring/enterprise_issue/contracts.py
printf '%s\n' '--- atomic issue validation and reference collection ---'
sed -n '444,570p' python/fast_mlsirm/scoring/enterprise_issue/contracts.py
printf '%s\n' '--- perspective and intervention validation ---'
sed -n '571,736p' python/fast_mlsirm/scoring/enterprise_issue/contracts.py
printf '%s\n' '--- enterprise sensitive-metadata usage and definitions ---'
rg -n -i -A25 -B12 \
'(sensitive_metadata|source_text|raw.*text|metadata.*sensitive|sensitive.*field)' \
python/fast_mlsirm/scoring tests/test_scoring_enterprise_issue_contracts.py \
tests/test_scoring_contract_sensitive_metadata.py
printf '%s\n' '--- package export diff ---'
git diff --no-ext-diff "$(git merge-base HEAD origin/main)" HEAD -- \
python/fast_mlsirm/scoring/enterprise_issue/__init__.py \
docs/changelog.d/enterprise-issue-scoring-request.md \
CHANGELOG.md
printf '%s\n' '--- complete changed implementation diff ---'
git diff --no-ext-diff "$(git merge-base HEAD origin/main)" HEAD -- \
python/fast_mlsirm/scoring/enterprise_issue \
tests/test_scoring_enterprise_issue_request.py \
| sed -n '1,520p'
printf '%s\n' '--- direct execution/result construction or score arithmetic in new request module ---'
rg -n -i \
'(ScoringEngine|ScoreObservation|ScoringResult|score\s*\(|sentiment|likelihood|calibrat|rank|utility|value.of.information|causal|queue)' \
python/fast_mlsirm/scoring/enterprise_issue/request.py \
docs/enterprise_issue_evidence_contracts.mdLength of output: 74835
I found no findings that apply to this head. The compiler validates the The compiler rejects duplicate compiled The compiler delegates construction to the authoritative shared The metadata path rejects reserved enterprise provenance fields. The shared metadata safety layer rejects sensitive content fields recursively and case-insensitively. The compiler performs no scoring, calibration, ranking, utility, causal-effect, or queue-routing arithmetic. I verified the source and focused tests statically. I did not execute tests or coverage because the review sandbox permits source inspection only. ✅ Action performedReview finished.
|
|
@jules Perform a read-only final review of exact head |
Summary
Advances issue #404 with the smallest incremental slice on top of the accepted enterprise evidence contracts merged in #529.
AtomicIssueRecordinto the existing shared criterion-levelScoringRequestboundary;EvidenceReferencevalues for issue and stakeholder spans without creating a parallel observation/result schema;This slice performs no sentiment, likelihood, calibration, ranking, utility, value-of-information, causal-effect, or queue-routing arithmetic. Existing
ScoringEngine,ScoreObservation, andScoringResultremain authoritative.Refs #404
Validation target