[PR #828] [MERGED] refactor(domain): extract source-map envelope walk and disambiguate stringValue #2269

Closed
opened 2026-10-16 21:16:31 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/828
Author: @morluto
Created: 10/7/2026
Status: ✅ Merged
Merged: 10/7/2026
Merged by: @morluto

Base: main ← Head: cleanup/sourcemap-strings


📝 Commits (1)

  • 8688627 refactor(domain): extract source-map envelope walk and disambiguate stringValue

📊 Changes

24 files changed (+300 additions, -200 deletions)

View changed files

📝 src/application/JavaScriptArtifactAnalysis.ts (+3 -14)
📝 src/browser/CdpCaptureDocuments.ts (+17 -17)
📝 src/browser/CdpCaptureEventBodyShapes.ts (+3 -3)
📝 src/browser/CdpCaptureEventHandlers.ts (+26 -26)
📝 src/browser/CdpCaptureEventHelpers.ts (+6 -6)
📝 src/browser/CdpCaptureStorage.ts (+6 -6)
📝 src/browser/CdpCaptureStorageFingerprints.ts (+20 -16)
📝 src/browser/CdpCaptureValues.ts (+2 -2)
📝 src/browser/CdpElectronInspection.ts (+10 -10)
📝 src/browser/CdpElectronScriptEvents.ts (+10 -6)
📝 src/browser/CdpElectronScripts.ts (+2 -2)
📝 src/browser/CdpElectronWorkers.ts (+8 -4)
📝 src/browser/CdpObservationSession.ts (+17 -16)
📝 src/browser/CdpPageCaptureScripts.ts (+2 -2)
📝 src/browser/CdpPageCaptureWorkers.ts (+9 -9)
📝 src/browser/CdpSafeMetadata.ts (+2 -2)
📝 src/browser/CdpScreenshot.ts (+5 -5)
📝 src/browser/CdpWebMcpDiscovery.ts (+17 -14)
📝 src/browser/V8InspectorProvider.ts (+4 -4)
📝 src/browser/WebSourceMapFetcher.ts (+9 -27)

...and 4 more files

📄 Description

Summary

Area 3 of the duplicate-ownership cleanup.

  • New domain/sourceMapEnvelope.ts owns the indexed sections walk (version/shape recursion) shared by WebSourceMapFetcher.validSourceMapEnvelope and JavaScriptArtifactAnalysis.flattenSourceMaps. The fetcher's stricter offset validation is an option; leaf checks (mappings/sources/names/contents) stay with each caller at existing strictness. Status enums and original-source merging explicitly deferred.
  • Rename browser CDP stringValue to cdpStringValue (18 files, mechanical). Fold the identical fingerprint duplicate into the static helper; rename the version-keys unknown-string shadow to nonEmptyString. No cross-layer sharing: AST-literal and CDP-unknown signatures stay disjoint by design.
  • Known remaining fork (out of scope): javascriptAstFingerprint.memberPath keeps "" fallback because it feeds rename-resistant hashes.

Verification

  • New envelope walk tests (both strictness modes, nested maps, bad offsets).
  • Source-map fetcher, document-script, metadata, electron composition, artifact-identity suites green.
  • npm run check: 5/5.

🔄 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/828 **Author:** [@morluto](https://github.com/morluto) **Created:** 10/7/2026 **Status:** ✅ Merged **Merged:** 10/7/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `cleanup/sourcemap-strings` --- ### 📝 Commits (1) - [`8688627`](https://github.com/morluto/rea/commit/8688627a962be269b658455072641f87294cc271) refactor(domain): extract source-map envelope walk and disambiguate stringValue ### 📊 Changes **24 files changed** (+300 additions, -200 deletions) <details> <summary>View changed files</summary> 📝 `src/application/JavaScriptArtifactAnalysis.ts` (+3 -14) 📝 `src/browser/CdpCaptureDocuments.ts` (+17 -17) 📝 `src/browser/CdpCaptureEventBodyShapes.ts` (+3 -3) 📝 `src/browser/CdpCaptureEventHandlers.ts` (+26 -26) 📝 `src/browser/CdpCaptureEventHelpers.ts` (+6 -6) 📝 `src/browser/CdpCaptureStorage.ts` (+6 -6) 📝 `src/browser/CdpCaptureStorageFingerprints.ts` (+20 -16) 📝 `src/browser/CdpCaptureValues.ts` (+2 -2) 📝 `src/browser/CdpElectronInspection.ts` (+10 -10) 📝 `src/browser/CdpElectronScriptEvents.ts` (+10 -6) 📝 `src/browser/CdpElectronScripts.ts` (+2 -2) 📝 `src/browser/CdpElectronWorkers.ts` (+8 -4) 📝 `src/browser/CdpObservationSession.ts` (+17 -16) 📝 `src/browser/CdpPageCaptureScripts.ts` (+2 -2) 📝 `src/browser/CdpPageCaptureWorkers.ts` (+9 -9) 📝 `src/browser/CdpSafeMetadata.ts` (+2 -2) 📝 `src/browser/CdpScreenshot.ts` (+5 -5) 📝 `src/browser/CdpWebMcpDiscovery.ts` (+17 -14) 📝 `src/browser/V8InspectorProvider.ts` (+4 -4) 📝 `src/browser/WebSourceMapFetcher.ts` (+9 -27) _...and 4 more files_ </details> ### 📄 Description ## Summary Area 3 of the duplicate-ownership cleanup. - New `domain/sourceMapEnvelope.ts` owns the indexed `sections` walk (version/shape recursion) shared by `WebSourceMapFetcher.validSourceMapEnvelope` and `JavaScriptArtifactAnalysis.flattenSourceMaps`. The fetcher's stricter offset validation is an option; leaf checks (mappings/sources/names/contents) stay with each caller at existing strictness. Status enums and original-source merging explicitly deferred. - Rename browser CDP `stringValue` to `cdpStringValue` (18 files, mechanical). Fold the identical fingerprint duplicate into the static helper; rename the version-keys unknown-string shadow to `nonEmptyString`. No cross-layer sharing: AST-literal and CDP-unknown signatures stay disjoint by design. - Known remaining fork (out of scope): `javascriptAstFingerprint.memberPath` keeps `""` fallback because it feeds rename-resistant hashes. ## Verification - New envelope walk tests (both strictness modes, nested maps, bad offsets). - Source-map fetcher, document-script, metadata, electron composition, artifact-identity suites green. - npm run check: 5/5. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:16:31 +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#2269
No description provided.