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
{{ message }}
Repository navigation
Fix masked DiskGraph batches for high unsigned entity IDs (C-026) - #513
Masked batches failed before delivery when a valid unsigned entity ID exceeded the signed 64-bit range. The assembler now takes the low 32 bits used by the deterministic masking hash before constructing its tensor. The batch retains the full entity IDs.
Verification
Reused the C-026 regression from #447 with DiskGraph and native Parquet anchors. It checks the emitted IDs, mask tokens, and original labels. On main (2a3872ead), 2**63 - 1 passed and 2**63 and 2**64 - 1 failed. All three pass with this change.
The special-token and masking modules passed 42 tests locally. The CUDA parity test skipped on this CPU host. Ruff passed.
The masking tensor overflowed for valid unsigned entity IDs above the signed 64-bit limit. C-026 covers both failing IDs and a signed-range control through the native Parquet-anchor batch API.
Reuse the existing fixture for an unsigned primary key. Check native delivery, full entity IDs, positional sample IDs, mask tokens and original labels.
Exercises the signed limit and both failing unsigned IDs through the package API.
CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.
Parsing warnings: 1
Validation error: Unrecognized key: "tone_instructions" at "reviews"
If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
No actionable comments were generated in the recent review.
Walkthrough
The masking code now constrains integer and boolean entity IDs to their low 32 bits before hashing. Tests cover native-anchor delivery for IDs at the signed 64-bit boundary and at the maximum unsigned 64-bit value. They check that IDs, masked values, target flags, and vocabulary values are preserved.
Severity of issue fixed: Medium
Merge Risk: Minimal · up to 0200a
This change lets masked batches be built for entity IDs above the signed 64-bit range, and the added tests cover those boundary IDs. No merge-blocking risk was identified.
Security architecture risk: Minimal · up to 0200a
Masked batches can now be delivered for valid unsigned entity IDs above the signed 64-bit limit. The fix preserves the full IDs in the batch and leaves masking decisions unchanged for IDs that already worked.
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 available to this run. The checkout contains only the marker text in `docs/development…
Provide the body of the PR conversation comment that begins with <!-- kumo-pr-change-map -->. The PR description links it at #513 (comment). Re-run this check with that text availabl…
Passed checks: 2 passed
Check name
Status
Explanation
Pr Size
The PR changes 2 files, below the threshold of 40. The changed-file inventory from git diff --name-status refs/coderabbit/pre-merge-check/base refs/coderabbit/pre-merge-check/head lists two modified…
Public Resource Access
The check applies only to external resource references (URLs, repository locations, package source locations) that this PR adds or modifies. The reviewed range changes two files: `packages/experimenta…
Full details: Pr Size
Explanation
The PR changes 2 files, below the threshold of 40. The changed-file inventory from git diff --name-status refs/coderabbit/pre-merge-check/base refs/coderabbit/pre-merge-check/head lists two modified files and no additions, deletions, or renames: - packages/experimental/kumo-pytorch/src/kumo/pytorch/assembly.py (M) - packages/experimental/kumo-pytorch/tests/test_special_token_ids.py (M) The check fails only when the file count exceeds 40. Line counts are ignored, as the check requires. Primary PR: NVIDIA/kumo-engine #513, author login nittin-murthi.
Full details: Public Resource Access
Explanation
The check applies only to external resource references (URLs, repository locations, package source locations) that this PR adds or modifies. The reviewed range changes two files: packages/experimental/kumo-pytorch/src/kumo/pytorch/assembly.py and packages/experimental/kumo-pytorch/tests/test_special_token_ids.py. I scanned every added and removed line in the diff for URLs, git or registry sources, package indexes, and cloud storage paths. None matched. The added code only introduces a bitmask (& 0xFFFF_FFFF) and new imports from in-repo modules (conformance.assertions, kumo.pytorch.engines.native_anchors), plus a parameterized test. These are local code references, not external resources. The PR description links to GitHub issue, PR, and commit pages. Those links sit in the PR body, not in the changed repository content, so they fall outside the diff-based scope of this check. No added or modified external resource reference was found, so 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 available to this run. The checkout contains only the marker text in docs/development/review.md, which describes the convention and does not contain the comment's Change map. The PR description links to the comment at https://github.com/NVIDIA/kumo-engine/pull/513#issuecomment-7117255878, but this run has no provider comment-retrieval tool. The review-thread section also returned no threads, and an issue comment is not a review thread. Without the Change map, I cannot judge whether each change is necessary, whether it sits at the right layer, or whether its explanation is accurate. I did not assess the comment's content. Code evidence gathered for the reviewer's use (not a verdict on the table): - The committed diff changes _mask_tokens in assembly.py (lines 1257-1265). The int and bool branch becomes int(value) & 0xFFFF_FFFF. Non-integer IDs still use the first four bytes of SHA-256. - The diff also adds a parameterized test in test_special_token_ids.py. It covers unsigned IDs at and above 2**63. - Design points a reviewer should check in the comment: - Masking now keys on the low 32 bits. Two distinct entity IDs that share those bits get the same masking key. The comment should say whether this collision is acceptable for deterministic masking. - For negative integer IDs, the mask changes the packed value (for example, -1 becomes 4294967295). The comment should say whether negative IDs can reach this path and whether that is intended. - The fix touches only the masking key. The comment should show that the batch still carries the full IDs, as the PR description says.
Resolution
Provide the body of the PR conversation comment that begins with <!-- kumo-pr-change-map -->. The PR description links it at #513 (comment). Re-run this check with that text available. The comment should state the observed failure (#496), the inspected existing behavior of _mask_tokens, the smallest sufficient change, the focused verification, and the stopping condition. Also address the 32-bit masking-key collision and the negative-integer behavior noted above.
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; 5 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Reducing integer IDs to the masking hash’s existing low 32 bits avoids signed packing overflow while preserving original identities and labels. All 19 focused tests passed, including native uint64 boundary cases.
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.
Fixes #496.
File-by-file change map
Masked batches failed before delivery when a valid unsigned entity ID exceeded the signed 64-bit range. The assembler now takes the low 32 bits used by the deterministic masking hash before constructing its tensor. The batch retains the full entity IDs.
Verification
Reused the C-026 regression from #447 with DiskGraph and native Parquet anchors. It checks the emitted IDs, mask tokens, and original labels. On main (
2a3872ead),2**63 - 1passed and2**63and2**64 - 1failed. All three pass with this change.The special-token and masking modules passed 42 tests locally. The CUDA parity test skipped on this CPU host. Ruff passed.