[PR #6497] [CLOSED] fix(byte-entropy): report out-of-range offset accurately #7370

Closed
opened 2026-11-01 21:47:23 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/6497
Author: @aryanmehra0
Created: 10/23/2026
Status: ❌ Closed

Base: main ← Head: fix/issue-6482-byte-entropy-offset


📝 Commits (1)

  • 128640a fix(byte-entropy): report out-of-range offset accurately

📊 Changes

2 files changed (+41 additions, -1 deletions)

View changed files

📝 src/application/binaryDiagnostics/ByteEntropyService.test.ts (+35 -0)
📝 src/application/binaryDiagnostics/ByteEntropyService.ts (+6 -1)

📄 Description

Fixes #6482

Summary

When --offset is beyond EOF, the service now reports offset as the invalid input field. An explicitly oversized length still reports length. Empty windows starting exactly at EOF remain valid.

Evidence and validation

  • Added service regression coverage for omitted length with an out-of-file offset, an out-of-file offset with length 0, offset-at-EOF, and an explicit length extending past EOF.
  • npm run check:fast — passed (typecheck and lint).
  • npm exec oxfmt -- --check src/application/binaryDiagnostics/ByteEntropyService.ts src/application/binaryDiagnostics/ByteEntropyService.test.ts — passed.
  • npm run test:local -- src/application/binaryDiagnostics/ByteEntropyService.test.ts — the new regression passed; 15 passed, 1 skipped, 1 failed. The unrelated existing test “reports a changed artifact when its parent directory moves during streaming” failed on Windows because its cleanup attempted to rename a path that no longer existed. The repository guidance notes this test suite has POSIX rename assumptions on Windows.
  • Git pre-push check:fast — passed.

Author readiness

Human owner: @aryanmehra0

  • I reviewed the final diff and take responsibility for the complete PR.
  • I checked the evidence and validation gaps recorded above.
  • I declare this PR ready for initial maintainer review.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/6497 **Author:** [@aryanmehra0](https://github.com/aryanmehra0) **Created:** 10/23/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/issue-6482-byte-entropy-offset` --- ### 📝 Commits (1) - [`128640a`](https://github.com/morluto/rea/commit/128640a89b758c62b6504e2e6d3933fa1660bf6f) fix(byte-entropy): report out-of-range offset accurately ### 📊 Changes **2 files changed** (+41 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/application/binaryDiagnostics/ByteEntropyService.test.ts` (+35 -0) 📝 `src/application/binaryDiagnostics/ByteEntropyService.ts` (+6 -1) </details> ### 📄 Description Fixes #6482 ## Summary When `--offset` is beyond EOF, the service now reports `offset` as the invalid input field. An explicitly oversized `length` still reports `length`. Empty windows starting exactly at EOF remain valid. ## Evidence and validation - Added service regression coverage for omitted length with an out-of-file offset, an out-of-file offset with length 0, offset-at-EOF, and an explicit length extending past EOF. - `npm run check:fast` — passed (typecheck and lint). - `npm exec oxfmt -- --check src/application/binaryDiagnostics/ByteEntropyService.ts src/application/binaryDiagnostics/ByteEntropyService.test.ts` — passed. - `npm run test:local -- src/application/binaryDiagnostics/ByteEntropyService.test.ts` — the new regression passed; 15 passed, 1 skipped, 1 failed. The unrelated existing test “reports a changed artifact when its parent directory moves during streaming” failed on Windows because its cleanup attempted to rename a path that no longer existed. The repository guidance notes this test suite has POSIX rename assumptions on Windows. - Git pre-push `check:fast` — passed. ## Author readiness Human owner: @aryanmehra0 - [ ] I reviewed the final diff and take responsibility for the complete PR. - [ ] I checked the evidence and validation gaps recorded above. - [ ] I declare this PR ready for initial maintainer review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:47:23 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#7370
No description provided.