Skip to content

Reject oversized filter array indexes - #235

Merged
Mike Krüger (mkrueger) merged 2 commits into
mainfrom
dev/mkrueger/fix/filter-index-overflow
Oct 6, 2026
Merged

Mike Krüger (mkrueger) merged 2 commits into
mainfrom
dev/mkrueger/fix/filter-index-overflow

Conversation

@mkrueger

Copy link
Copy Markdown
Collaborator

Summary

  • Reject filter indexes outside the Int32 range instead of silently selecting index zero.
  • Preserve null results for valid out-of-range indexes and reject overflow even on optional paths.
  • Add parser and command regressions; document the index range.

Validation

  • 145 focused filter/parser tests passed.
  • App and test projects build with zero warnings/errors.
  • CLI reproduction now rejects index 2147483648 instead of returning the first element.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The focused validation change is consistent with documented behavior and covered by parser and command tests.

Review effort: Balanced
Findings: None

What changed in this PR

Rejects oversized filter array indexes instead of silently treating them as index zero.

Changes:

  • Validates indexes against the Int32 range.
  • Adds parser and command regression tests.
  • Documents index limits and null behavior.
File Description
README.md Documents index limits.
docs/​filter-v1-spec.md Defines index-range semantics.
ExpressionParser.cs Reports overflowing indexes as errors.
FilterPathExpressionTests.cs Tests overflow and maximum indexes.
FilterCommandTests.cs Verifies command rejection preserves input.
CHANGELOG.md Records the fix.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-code-quality

github-code-quality Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Code Coverage Overview

Languages: C#

C# / code-coverage/dotnet

The overall line coverage in commit 8eb1c81 in the dev/mkrueger/fix/fil... branch remains at 66%, unchanged from commit b9aec70 in the main branch.


Updated October 06, 2026 11:16 UTC

@mkrueger
Mike Krüger (mkrueger) enabled auto-merge (squash) October 6, 2026 10:37
@mkrueger

Copy link
Copy Markdown
Collaborator Author

Copilot resolve the merge conflicts in this pull request

…er-index-overflow

Co-authored-by: mkrueger <341098+mkrueger@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 6, 2026 10:44

Copilot AI commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Copilot resolve the merge conflicts in this pull request

Merged main into the PR branch; the merge completed without conflicts. Merge commit: 8eb1c81.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The implementation, tests, and documentation consistently address oversized indexes without changing valid out-of-range semantics.

Review effort: Balanced
Findings: None

@mkrueger
Mike Krüger (mkrueger) merged commit fa2b09c into main Oct 6, 2026
12 checks passed
@mkrueger
Mike Krüger (mkrueger) deleted the dev/mkrueger/fix/filter-index-overflow branch October 6, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants