[PR #6129] [CLOSED] fix(javascript): preserve unavailable source coverage for invalid UTF-8 #7150

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/6129
Author: @tiggachris
Created: 10/21/2026
Status: ❌ Closed

Base: main ← Head: fix/5995-invalid-utf8-coverage


📝 Commits (10+)

  • c9ac658 fix: preserve unknown JSON omission counts
  • 6d4fc84 fix: preserve unknown counts for unselected JSON
  • ceae89a fix: preserve unknown counts for uppercase JSON
  • de067a6 fix: include invalid UTF-8 JavaScript in unavailable-source coverage
  • 3470c66 fix: route unavailable sources through compact projection and report node drops
  • b234a1f Merge branch 'main' into fix/5995-invalid-utf8-coverage
  • 347636a fix(javascript): track node and unknown ceilings reached for unavailable files
  • 350b901 Merge branch 'main' into fix/5995-invalid-utf8-coverage
  • 198f74d fix(javascript): preserve cancellation reason and record interrupted files once
  • 9a5c354 fix(javascript): invoke per-file progress checkpoint for invalid sources

📊 Changes

9 files changed (+517 additions, -101 deletions)

View changed files

📝 scripts/lib/release-proposal.mjs (+5 -1)
📝 src/application/javascript/JavaScriptArtifactAnalysis.ts (+114 -23)
📝 src/application/javascript/JavaScriptSemanticGraphBuilder.test.ts (+84 -0)
📝 src/application/javascript/JavaScriptSemanticGraphBuilder.ts (+97 -71)
📝 src/domain/adb/adbDeviceAnalysis.ts (+1 -1)
📝 src/domain/javascript/javascriptArtifactFiles.ts (+6 -4)
📝 tests/boundary/filesystem/javascript-applications/javascriptApplicationService.test.ts (+61 -0)
📝 tests/boundary/filesystem/javascript-applications/javascriptArtifactReconstruction.test.ts (+129 -1)
📝 tests/boundary/filesystem/javascriptArtifactBomRanges.test.ts (+20 -0)

📄 Description

Summary

Fixes #5995.

Ensures JavaScript files containing invalid UTF-8 are included in semantic unavailable-source coverage across both full and compact projection paths, preserving evidence across cancellation and properly tracking resource ceilings.

Changes

  • Route unavailable and invalid-UTF-8 JavaScript sources through the compact projection path (analyzeAndProjectJavaScriptArtifactFiles).
  • Preserve invalid-utf8 file text failure reasons and Evidence across cancellation in analyzeAndAdoptJavaScriptArtifactFiles.
  • Track nodeCeilingsReached and unknownCeilingsReached in recordUnavailableFile when unavailable files encounter node or unknown capacity limits, preventing RangeError on limited graphs.
  • Add regression tests in JavaScriptSemanticGraphBuilder.test.ts, javascriptArtifactReconstruction.test.ts, and javascriptApplicationService.test.ts.

Verification

  • npm run test:local -- src/application/javascript/JavaScriptSemanticGraphBuilder.test.ts: Passed (73/73 tests).
  • npm run test:focused -- tests/boundary/filesystem/javascript-applications/javascriptArtifactReconstruction.test.ts tests/boundary/filesystem/javascript-applications/javascriptApplicationService.test.ts tests/boundary/filesystem/javascriptArtifactBomRanges.test.ts: Passed (74/74 tests).
  • npm run check:fast: Passed (typecheck and lint clean).
  • git diff --check: Passed (clean, no trailing whitespace or conflicts).

Author readiness

Human owner: @tiggachris

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • 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/6129 **Author:** [@tiggachris](https://github.com/tiggachris) **Created:** 10/21/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/5995-invalid-utf8-coverage` --- ### 📝 Commits (10+) - [`c9ac658`](https://github.com/morluto/rea/commit/c9ac6585611b4089e29b37d46ed398f5068b58d1) fix: preserve unknown JSON omission counts - [`6d4fc84`](https://github.com/morluto/rea/commit/6d4fc8435e447ac162ffeca909a7094faca6d28f) fix: preserve unknown counts for unselected JSON - [`ceae89a`](https://github.com/morluto/rea/commit/ceae89a59e578e4135cbf820d51080a85a5ff633) fix: preserve unknown counts for uppercase JSON - [`de067a6`](https://github.com/morluto/rea/commit/de067a67a2dcd541beb5b7ac3ff11eb959ec3468) fix: include invalid UTF-8 JavaScript in unavailable-source coverage - [`3470c66`](https://github.com/morluto/rea/commit/3470c663707902f38ab296b4aa19d14334f4fddc) fix: route unavailable sources through compact projection and report node drops - [`b234a1f`](https://github.com/morluto/rea/commit/b234a1fe7f50cf59096cb26372536e03efaabcc0) Merge branch 'main' into fix/5995-invalid-utf8-coverage - [`347636a`](https://github.com/morluto/rea/commit/347636a6ad7b8e5f80412c9ad615e72770b41b78) fix(javascript): track node and unknown ceilings reached for unavailable files - [`350b901`](https://github.com/morluto/rea/commit/350b9018ba7de6348ea4e866ed91fd0145dbd97f) Merge branch 'main' into fix/5995-invalid-utf8-coverage - [`198f74d`](https://github.com/morluto/rea/commit/198f74dc8ae6c4403e29caec91ac65efe59d7c2b) fix(javascript): preserve cancellation reason and record interrupted files once - [`9a5c354`](https://github.com/morluto/rea/commit/9a5c3547bcc19682a79f0644c4cf5960de98024c) fix(javascript): invoke per-file progress checkpoint for invalid sources ### 📊 Changes **9 files changed** (+517 additions, -101 deletions) <details> <summary>View changed files</summary> 📝 `scripts/lib/release-proposal.mjs` (+5 -1) 📝 `src/application/javascript/JavaScriptArtifactAnalysis.ts` (+114 -23) 📝 `src/application/javascript/JavaScriptSemanticGraphBuilder.test.ts` (+84 -0) 📝 `src/application/javascript/JavaScriptSemanticGraphBuilder.ts` (+97 -71) 📝 `src/domain/adb/adbDeviceAnalysis.ts` (+1 -1) 📝 `src/domain/javascript/javascriptArtifactFiles.ts` (+6 -4) 📝 `tests/boundary/filesystem/javascript-applications/javascriptApplicationService.test.ts` (+61 -0) 📝 `tests/boundary/filesystem/javascript-applications/javascriptArtifactReconstruction.test.ts` (+129 -1) 📝 `tests/boundary/filesystem/javascriptArtifactBomRanges.test.ts` (+20 -0) </details> ### 📄 Description ## Summary Fixes #5995. Ensures JavaScript files containing invalid UTF-8 are included in semantic unavailable-source coverage across both full and compact projection paths, preserving evidence across cancellation and properly tracking resource ceilings. ## Changes - Route unavailable and invalid-UTF-8 JavaScript sources through the compact projection path (`analyzeAndProjectJavaScriptArtifactFiles`). - Preserve `invalid-utf8` file text failure reasons and Evidence across cancellation in `analyzeAndAdoptJavaScriptArtifactFiles`. - Track `nodeCeilingsReached` and `unknownCeilingsReached` in `recordUnavailableFile` when unavailable files encounter node or unknown capacity limits, preventing `RangeError` on limited graphs. - Add regression tests in `JavaScriptSemanticGraphBuilder.test.ts`, `javascriptArtifactReconstruction.test.ts`, and `javascriptApplicationService.test.ts`. ## Verification - `npm run test:local -- src/application/javascript/JavaScriptSemanticGraphBuilder.test.ts`: Passed (73/73 tests). - `npm run test:focused -- tests/boundary/filesystem/javascript-applications/javascriptArtifactReconstruction.test.ts tests/boundary/filesystem/javascript-applications/javascriptApplicationService.test.ts tests/boundary/filesystem/javascriptArtifactBomRanges.test.ts`: Passed (74/74 tests). - `npm run check:fast`: Passed (typecheck and lint clean). - `git diff --check`: Passed (clean, no trailing whitespace or conflicts). ## Author readiness Human owner: @tiggachris - [x] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] 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:45:46 +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#7150
No description provided.