[PR #1008] [MERGED] fix(javascript): report application analysis progress on the CLI #2575

Closed
opened 2026-10-17 21:07:47 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/javascript-analysis-progress


📝 Commits (4)

  • bbadb3c fix(javascript): report application analysis progress on the CLI
  • 91fdff6 test(cli): preserve progress in filtered output checks
  • acf20bf Merge remote-tracking branch 'origin/main' into fix/javascript-analysis-progress
  • 956190b Merge remote-tracking branch 'origin/main' into fix/javascript-analysis-progress

📊 Changes

7 files changed (+138 additions, -9 deletions)

View changed files

📝 docs/javascript-artifact-reconstruction.md (+5 -0)
📝 src/application/javascript/JavaScriptApplicationService.ts (+15 -1)
📝 src/application/javascript/JavaScriptArtifactReconstruction.ts (+21 -0)
📝 src/cli/javascriptApplicationAnalysis.ts (+8 -1)
📝 tests/boundary/cli/cliOutput.test.ts (+3 -3)
➕ tests/boundary/cli/javascriptApplicationProgress.test.ts (+72 -0)
📝 tests/boundary/mcp/electronMcp.test.ts (+14 -4)

📄 Description

JavaScript application analysis invoked through the CLI did not attach the existing progress reporter, leaving long ASAR and directory analyses silent until the final result. Both the explicit command and the generic analyze route now emit bounded rea_progress JSON lines on stderr at real inventory, parsing, graph, validation, and Evidence stages, while preserving the result on stdout. The application reports completion only after Evidence creation.

Refs #746. The issue-comment empty-string schema failures are already fixed on the frozen main baseline; all nine reported minimal cases succeeded locally. This change addresses the remaining observable CLI progress gap.

Validation:

  • 76 focused tests across 10 suites passed, including real compiled CLI routes, the pinned MCP SDK, Evidence parity, failure diagnostics, empty literals, reconstruction, and filesystem boundaries.
  • npm run check:fast, npm run docs:check, changed-file formatting, and test discovery passed (567 files discovered exactly once). The existing JSON/JSONL/YAML missing-filter tests were also updated to expect the newly documented stderr progress and rerun with the CLI progress regressions.
  • Actual local 24.2 MB ASAR: baseline and branch returned identical Evidence IDs and normalized results; first branch progress was observed at 1.1 seconds versus final output at 9.4 seconds. Peak Linux process-family RSS was about 918 MB. The container holds 147 KB of JavaScript and a padding resource; it is not the original Obsidian corpus.
  • Windows Node 22.19.0: both CLI routes and the same ASAR returned complete Evidence with stage progress; all three native CLI calls exited 0. Peak ASAR working set in the confirmed run was about 672 MB and no test-owned processes remained.
  • node scripts/verify-package.mjs passed: installed CLI/MCP workflows, all 133 tools and 6 prompts, setup and update checks, and cleanup; MCP startup peak RSS was about 381 MB.
  • No real Hopper/Ghidra verification was performed; this change does not use either provider.

Large-result serialization tracked in #623 is being handled separately.


🔄 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/1008 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/7/2026 **Status:** ✅ Merged **Merged:** 10/7/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `fix/javascript-analysis-progress` --- ### 📝 Commits (4) - [`bbadb3c`](https://github.com/morluto/rea/commit/bbadb3c6a7ee357169598c4bfafbb780e67f9191) fix(javascript): report application analysis progress on the CLI - [`91fdff6`](https://github.com/morluto/rea/commit/91fdff63c8a25ec7ff9a6f24f729a1fd8acbcc91) test(cli): preserve progress in filtered output checks - [`acf20bf`](https://github.com/morluto/rea/commit/acf20bf1fad82e94d58d2d7074bb3ebd549eac01) Merge remote-tracking branch 'origin/main' into fix/javascript-analysis-progress - [`956190b`](https://github.com/morluto/rea/commit/956190b07b793d57a88c8466ddc4282ab2882837) Merge remote-tracking branch 'origin/main' into fix/javascript-analysis-progress ### 📊 Changes **7 files changed** (+138 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `docs/javascript-artifact-reconstruction.md` (+5 -0) 📝 `src/application/javascript/JavaScriptApplicationService.ts` (+15 -1) 📝 `src/application/javascript/JavaScriptArtifactReconstruction.ts` (+21 -0) 📝 `src/cli/javascriptApplicationAnalysis.ts` (+8 -1) 📝 `tests/boundary/cli/cliOutput.test.ts` (+3 -3) ➕ `tests/boundary/cli/javascriptApplicationProgress.test.ts` (+72 -0) 📝 `tests/boundary/mcp/electronMcp.test.ts` (+14 -4) </details> ### 📄 Description JavaScript application analysis invoked through the CLI did not attach the existing progress reporter, leaving long ASAR and directory analyses silent until the final result. Both the explicit command and the generic `analyze` route now emit bounded `rea_progress` JSON lines on stderr at real inventory, parsing, graph, validation, and Evidence stages, while preserving the result on stdout. The application reports completion only after Evidence creation. Refs #746. The issue-comment empty-string schema failures are already fixed on the frozen main baseline; all nine reported minimal cases succeeded locally. This change addresses the remaining observable CLI progress gap. Validation: - 76 focused tests across 10 suites passed, including real compiled CLI routes, the pinned MCP SDK, Evidence parity, failure diagnostics, empty literals, reconstruction, and filesystem boundaries. - `npm run check:fast`, `npm run docs:check`, changed-file formatting, and test discovery passed (567 files discovered exactly once). The existing JSON/JSONL/YAML missing-filter tests were also updated to expect the newly documented stderr progress and rerun with the CLI progress regressions. - Actual local 24.2 MB ASAR: baseline and branch returned identical Evidence IDs and normalized results; first branch progress was observed at 1.1 seconds versus final output at 9.4 seconds. Peak Linux process-family RSS was about 918 MB. The container holds 147 KB of JavaScript and a padding resource; it is not the original Obsidian corpus. - Windows Node 22.19.0: both CLI routes and the same ASAR returned complete Evidence with stage progress; all three native CLI calls exited 0. Peak ASAR working set in the confirmed run was about 672 MB and no test-owned processes remained. - `node scripts/verify-package.mjs` passed: installed CLI/MCP workflows, all 133 tools and 6 prompts, setup and update checks, and cleanup; MCP startup peak RSS was about 381 MB. - No real Hopper/Ghidra verification was performed; this change does not use either provider. Large-result serialization tracked in #623 is being handled separately. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:07:47 +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#2575
No description provided.