You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow up on Aaron’s final approvals in #288 and #289: omit categorical columns with no populated cohorts so empty/missing multicategories and future-only timestamps cannot make the entire cohort artifact unreadable. Preserve healthy columns and strict reader validation. Also clarify the trainer comments and explanation documentation.
68 core producer/prediction-explanation tests passed; 57 public prediction-explanation tests passed.
Eight regression/control cases cover empty/missing multicategories, future-only timestamps, and a populated control with/without targets. Six cases fail without the fix.
Changed-file flake8 -j 1 and git diff --check passed.
CI-equivalent core ty checks passed after adding explicit result-type assertions to the regression test.
isort --check-only passes for the test file; both touched source files have existing import-format failures reproduced on pristine upstream/main. Their imports are unchanged; root CI excludes these files.
Existing CI failure: test_the_published_copy_matches_the_source detects stale published kumo-model-explanations skill copies inherited from Expose opt-in batch prediction XAI through the Python API #289. The source and generated skill files are unchanged by this PR; refreshing them is outside this follow-up’s approved scope.
No actionable comments were generated in the recent review.
Walkthrough
ColumnAnalysis.aggregate_category now returns None when all category counts are zero, before calculating predictions or targets. New parameterized tests cover empty, missing, future, and populated category values in prediction and validation stages. The trainer comment and explainability guide also update wording about the default cohort cap, explanation limit, prediction status, and sample membership.
Merge Risk: Minimal · up to bf75d
Categorical columns with no populated cohorts are now omitted instead of making the whole cohort artifact unreadable, and populated columns are unaffected. The earlier type-check concern in the new test is addressed. The only failing check is an inherited stale skill copy unrelated to this change.
Security architecture risk: Minimal · up to bf75d
Empty categories now use the existing omission behavior while populated categories retain their aggregation path. The inspected change introduces no material security, ownership, or failure-containment risk.
Pre-merge checks: 2 · 1
Failed checks: 1 inconclusive
Check name
Status
Explanation
Resolution
Change Map Design Review
The check reviews the PR conversation comment that begins with <!-- kumo-pr-change-map -->. That comment is not in the checkout, and no tool here reads PR conversation comments. The PR description l…
Make the <!-- kumo-pr-change-map --> conversation comment available to the reviewer, or add a retrieval capability for PR issue comments. Then rerun this check. The reviewer must confirm these points in the map: 1. The observed failure, f…
Passed checks: 2 passed
Check name
Status
Explanation
Pr Size
The PR size check fails only when the changed-file count exceeds 40. I ran git diff --name-status over the review range (refs/coderabbit/pre-merge-check/base to refs/coderabbit/pre-merge-check/head)…
Public Resource Access
The check covers only external resource references whose text this PR adds or modifies. I listed the changed files from the review range (column_analysis.py, trainer.py, `test_producer_failures.py…
Full details: Pr Size
Explanation
The PR size check fails only when the changed-file count exceeds 40. I ran git diff --name-status over the review range (refs/coderabbit/pre-merge-check/base to refs/coderabbit/pre-merge-check/head). It lists 4 changed files, all modified (M), with no renames or additions: - packages/kumo-core/src/kumo_core/explain/column_analysis.py - packages/kumo-core/src/kumo_core/train/trainer.py - packages/kumo-core/tests/explain/test_producer_failures.py - packages/kumo-engine/explainability.md The count of 4 is well under 40, so no split recommendation applies. Line counts are ignored by this check.
Full details: Public Resource Access
Explanation
The check covers only external resource references whose text this PR adds or modifies. I listed the changed files from the review range (column_analysis.py, trainer.py, test_producer_failures.py, explainability.md) and scanned the full patch (150 lines). The added and removed lines contain no URLs, git or package source locations, registry references, or Markdown links. The GitHub links in the PR description are not part of the repository diff and are outside this check's scope. With no added or modified external resource reference, the check passes.
Full details: Change Map Design Review
Explanation
The check reviews the PR conversation comment that begins with <!-- kumo-pr-change-map -->. That comment is not in the checkout, and no tool here reads PR conversation comments. The PR description links to it (issuecomment-7031625526), but that link was not retrieved. The only match for the marker in the repository is in docs/development/review.md, which describes the required process and does not contain the map. Without the Change map text, I cannot check its necessity claims, abstraction-layer choices, stated failure or release requirement, rejected alternatives, verification scope, or stopping condition. Partial code evidence from the review range refs/coderabbit/pre-merge-check/base..head (2 commits, 4 files): - column_analysis.py adds an early return None when count > 0 has no True values. It moves the positive-count mask above the weighted division. The later filter reuses that mask. This is a small change. The map's accuracy about it could not be checked. - trainer.py changes only a docstring and a comment. The code is unchanged. Its wording is "Default cohort cap in whole batches, at least the selection budget." The implementation was not compared with that wording. - The test file and the explanation Markdown were not used as design evidence for the map. I found no proven code defect in this review. The verdict is not a PASS, because the design review cannot be completed without the map. It is not a FAIL, because no explicit failure condition was shown.
Resolution
Make the <!-- kumo-pr-change-map --> conversation comment available to the reviewer, or add a retrieval capability for PR issue comments. Then rerun this check. The reviewer must confirm these points in the map: 1. The observed failure, for example the unreadable cohort artifact from empty or future-only columns, and the requirement that drives each change. 2. Why returning None from ColumnAnalysis.aggregate_category is the right layer. Compare it with the existing reader and omission contract. 3. Whether the new regression tests fail without the fix. The description reports six of eight failing without it. 4. Whether the trainer and documentation edits are optional refinements that the map keeps separate from the fix. 5. Any material behavior the map omits, such as the effect on healthy columns and on strict reader validation.
Finishing Touches
Fix failing CI checks
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.
Empty/missing multicategories or future-only timestamps could produce a column with no cohort labels. The strict reader then rejected the entire artifact, including healthy columns. This follow-up uses the existing None omission contract; reader validation stays strict.
Exercise empty/missing multicategories, future-only timestamps, and a populated control in PRED and VAL; round-trip JSON, assert result types, and verify healthy values survive.
Six cases reproduce the bug without the fix; controls cover unchanged populated behavior and targets. Explicit assertions satisfy static checking.
packages/kumo-core/src/kumo_core/train/trainer.py
Trainer._explain_prediction comments/docstring
Lowercase “first” and describe the default cohort cap directly.
Address Aaron’s final-approval wording nit in #288.
packages/kumo-engine/explainability.md
Prediction limits and saved explanation status
Describe omitted limits and saved sample membership directly.
Address Aaron’s final-approval documentation nit in #289.
Verification: 68 core tests and 57 public-reader tests passed; documentation reference validation passed for 375 Markdown files; changed-file flake8 and whitespace checks passed. Direct isort passes for the test; both source files reproduce existing import-format errors on pristine upstream/main (imports untouched and excluded by root CI).
The signed follow-up commit adds two type-narrowing assertions after CI caught optional/union accesses in the new test. Producer tests (29), test-file flake8/isort, and the CI-equivalent core ty check pass afterward.
Unresolved inherited CI failure: test_the_published_copy_matches_the_source reports stale skills/kumo-model-explanations/SKILL.md and skills/kumo-model-explanations/references/artifacts.md from #289. This branch changes neither authored nor published skills. A publisher refresh would repair that baseline drift; it is outside the approved three-thread scope.
Stopping condition: all three deferred final-approval threads are addressed, empty columns are omitted without discarding healthy columns, and populated behavior remains covered. Broader aggregation/import-format cleanup is outside this PR.
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow up on Aaron’s final approvals in #288 and #289: omit categorical columns with no populated cohorts so empty/missing multicategories and future-only timestamps cannot make the entire cohort artifact unreadable. Preserve healthy columns and strict reader validation. Also clarify the trainer comments and explanation documentation.
Review threads: cohort bug, trainer wording, documentation wording.
Change map
File-by-file change map.
Testing Done
flake8 -j 1andgit diff --checkpassed.tychecks passed after adding explicit result-type assertions to the regression test.isort --check-onlypasses for the test file; both touched source files have existing import-format failures reproduced on pristine upstream/main. Their imports are unchanged; root CI excludes these files.test_the_published_copy_matches_the_sourcedetects stale publishedkumo-model-explanationsskill copies inherited from Expose opt-in batch prediction XAI through the Python API #289. The source and generated skill files are unchanged by this PR; refreshing them is outside this follow-up’s approved scope.Checklist