[PR #4265] [MERGED] feat(analysis-view): select retained JavaScript metadata and native facts #6146

Closed
opened 2026-10-31 01:12:13 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: feat/javascript-retained-facts


📝 Commits (7)

  • f70b8c0 feat(analysis-view): add selected retained JavaScript observations
  • d32547f feat(analysis-view): discover retained fact fields on demand
  • 5f0b1fa chore: merge current main for retained fact verification
  • 7238fd0 test(analysis-view): verify retained facts against current main
  • 7ae159b fix(evaluation): preserve observed versions and cleanup failures
  • 2ca63f4 chore: merge current main for retained facts verification
  • 8ea84cc docs(verification): recheck retained facts on updated main

📊 Changes

18 files changed (+10256 additions, -50 deletions)

View changed files

📝 .agents/skills/reverse-engineer-anything/references/javascript-applications.md (+14 -1)
📝 docs/javascript-application-workflows.md (+59 -0)
➕ docs/verification/javascript-retained-facts-2026-10-15.json (+8063 -0)
➕ docs/verification/javascript-retained-facts-2026-10-15.md (+450 -0)
➕ experiments/analysis-efficiency/javascript-facts-agent-history.json (+25 -0)
➕ experiments/analysis-efficiency/javascript-facts-agent.mjs (+395 -0)
➕ experiments/analysis-efficiency/javascript-facts-grade.py (+80 -0)
➕ experiments/analysis-efficiency/test_javascript_facts_agent.py (+174 -0)
📝 package.json (+1 -0)
➕ scripts/lib/javascript-facts-reference.mjs (+63 -0)
➕ scripts/verify/javascript/retained-facts.mjs (+359 -0)
📝 src/contracts/analysisViewToolContracts.ts (+26 -1)
📝 src/domain/analysisView/analysisView.ts (+22 -2)
➕ src/domain/analysisView/javascriptApplicationCoverage.ts (+39 -0)
📝 src/domain/analysisView/javascriptApplicationView.ts (+34 -33)
➕ src/domain/analysisView/javascriptFactsView.ts (+117 -0)
📝 src/domain/analysisView/javascriptModuleReferences.ts (+0 -13)
➕ tests/boundary/mcp/javascriptFactsViewMcp.test.ts (+335 -0)

📄 Description

Summary

Read retained JavaScript application metadata, native facts and processing gaps by exact Evidence paths, selected properties and pages, using existing CLI/MCP inspect_analysis_view. Preserve original node/observation identities, null versus missing, source-map references, full per-row Evidence and source coverage independently of page exhaustion. Optional property-name discovery avoids returning unselected values. Both adapters share the projector and coverage owner; no executor, cache or target authority is added.

Fixes #4190; part of #4027. Code mode remains deferred by #4091.

Validation

Updated to main 1b97b0f37 after #4274 merged; merge 2ca63f4d9 preserves this feature's implementation. The earlier unrelated ADB CI assertion is fixed upstream and now passes locally.

  • 114 distinct focused cases across seven files passed across documented invocations, plus 106 Python cases, full static checks, docs/metadata, five consistency cases and test discovery. Two unchanged contract-order fixture attempts exceeded their 20-second limit on busy CPU 15. Profiling located default-SDK eager catalog compilation; complete fixture assertions passed, then the original test passed in 11.446 s on one CPU 10 with the same deadline. All failures and controls remain recorded.
  • 18 version-labelled real Joplin workflows, including four fresh current-runtime export/view normal/interruption controls, passed independent export oracles. All nine view controls have exact complete CLI/MCP Evidence parity. Latest normal 12 observations and original per-row Evidence are unchanged; parent/coverage reflect semantic unknowns 41,161→41,162. Interrupted 11-row results match the prior complete answer.
  • All local resource runs use one CPU / 8 GiB, report CPU/time/process-family cgroup memory and verify cleanup; no OOM. Largest new gate peak 5,169,971,200 B includes file cache. Historical agent trials remain pinned separately; no new model trials were run.

Cost tradeoff: latest normal retrieval 4.241 s export/projection versus 0.153 s view, but selected structured BPE 8,947 versus17,421. The generic view contract/Evidence wrapper can cost more context. Seven earlier actual Terra/high Codex trials retain worse field-discovery and slower partial-task outcomes too. No universal token/latency benefit, peak-context reduction or billing claim.

Executed sources, reproduction scripts, all attempts, compact results and limitations.

Verification is Linux x64 static CLI/stdio MCP on shipped Joplin 3.7.21. Live Electron/browser, native-provider execution and macOS/Windows provider behavior are unverified. Downloadable apps, full Evidence and raw large transcripts/profiles are excluded. The earlier runner review fixes preserve actual CLI version and primary/cleanup errors; historical harnesses remain reconstructible.

Final merge evidence: merged as d9d085a15e17bce525a316a48c7e3eeae1f60423. At merge, all 41 status checks succeeded, including all 36 CI jobs. Both exact-head reviews were clear and both prior threads resolved. The first Windows lane attempt exceeded an unchanged 15-second CLI deadline despite complete Evidence output; one unchanged-source lane rerun passed, including curated tests, Node Inspector, packaging and Node 22 path controls. That first failure remains in attempt 1. All 16 authored source hashes, the entire tracked tree versus tested 8ea84cc6, required coauthor and #4190 closure were verified after merge.

Author readiness

Human owner: @N0zoM1z0

The session authorized implementation, validation, ready PRs and merging, including waiving manual declarations. The agent reviewed the diff/evidence. A human final-diff review is not asserted; declarations remain unchecked.

  • 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.

Before merge

  • Scope, shared ownership, caller choices, Evidence and local validation reviewed by the agent.
  • Current-main integration and reproducible real-application checks recorded without discarding negative results.
  • Current-head CI and automated reviews completed; attributable findings addressed.

🔄 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/4265 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/15/2026 **Status:** ✅ Merged **Merged:** 10/16/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `feat/javascript-retained-facts` --- ### 📝 Commits (7) - [`f70b8c0`](https://github.com/morluto/rea/commit/f70b8c0bc512094938e817c083921e69aaacfcbe) feat(analysis-view): add selected retained JavaScript observations - [`d32547f`](https://github.com/morluto/rea/commit/d32547f9ac7769049a8ee6fbc8a27abcb2285a54) feat(analysis-view): discover retained fact fields on demand - [`5f0b1fa`](https://github.com/morluto/rea/commit/5f0b1fa47ffdf25b3775d87c2e07aea6cff26f31) chore: merge current main for retained fact verification - [`7238fd0`](https://github.com/morluto/rea/commit/7238fd0802c399d9349d8f235b2526c57e5682a5) test(analysis-view): verify retained facts against current main - [`7ae159b`](https://github.com/morluto/rea/commit/7ae159bfce56bf82e49e47bc7c8e867b2389d78e) fix(evaluation): preserve observed versions and cleanup failures - [`2ca63f4`](https://github.com/morluto/rea/commit/2ca63f4d9f2e489ce3b5cbccdc204ad0be39551c) chore: merge current main for retained facts verification - [`8ea84cc`](https://github.com/morluto/rea/commit/8ea84cc6d44df24e41f50b2e944f63ff461048f8) docs(verification): recheck retained facts on updated main ### 📊 Changes **18 files changed** (+10256 additions, -50 deletions) <details> <summary>View changed files</summary> 📝 `.agents/skills/reverse-engineer-anything/references/javascript-applications.md` (+14 -1) 📝 `docs/javascript-application-workflows.md` (+59 -0) ➕ `docs/verification/javascript-retained-facts-2026-10-15.json` (+8063 -0) ➕ `docs/verification/javascript-retained-facts-2026-10-15.md` (+450 -0) ➕ `experiments/analysis-efficiency/javascript-facts-agent-history.json` (+25 -0) ➕ `experiments/analysis-efficiency/javascript-facts-agent.mjs` (+395 -0) ➕ `experiments/analysis-efficiency/javascript-facts-grade.py` (+80 -0) ➕ `experiments/analysis-efficiency/test_javascript_facts_agent.py` (+174 -0) 📝 `package.json` (+1 -0) ➕ `scripts/lib/javascript-facts-reference.mjs` (+63 -0) ➕ `scripts/verify/javascript/retained-facts.mjs` (+359 -0) 📝 `src/contracts/analysisViewToolContracts.ts` (+26 -1) 📝 `src/domain/analysisView/analysisView.ts` (+22 -2) ➕ `src/domain/analysisView/javascriptApplicationCoverage.ts` (+39 -0) 📝 `src/domain/analysisView/javascriptApplicationView.ts` (+34 -33) ➕ `src/domain/analysisView/javascriptFactsView.ts` (+117 -0) 📝 `src/domain/analysisView/javascriptModuleReferences.ts` (+0 -13) ➕ `tests/boundary/mcp/javascriptFactsViewMcp.test.ts` (+335 -0) </details> ### 📄 Description ## Summary Read retained JavaScript application metadata, native facts and processing gaps by exact Evidence paths, selected properties and pages, using existing CLI/MCP `inspect_analysis_view`. Preserve original node/observation identities, null versus missing, source-map references, full per-row Evidence and source coverage independently of page exhaustion. Optional property-name discovery avoids returning unselected values. Both adapters share the projector and coverage owner; no executor, cache or target authority is added. Fixes #4190; part of #4027. Code mode remains deferred by #4091. ## Validation Updated to main `1b97b0f37` after #4274 merged; merge `2ca63f4d9` preserves this feature's implementation. The earlier unrelated ADB CI assertion is fixed upstream and now passes locally. - **114 distinct focused cases across seven files passed across documented invocations**, plus **106 Python cases**, full static checks, docs/metadata, five consistency cases and test discovery. Two unchanged contract-order fixture attempts exceeded their 20-second limit on busy CPU 15. Profiling located default-SDK eager catalog compilation; complete fixture assertions passed, then the original test passed in 11.446 s on one CPU 10 with the same deadline. All failures and controls remain recorded. - **18 version-labelled real Joplin workflows**, including four fresh current-runtime export/view normal/interruption controls, passed independent export oracles. All nine view controls have exact complete CLI/MCP Evidence parity. Latest normal 12 observations and original per-row Evidence are unchanged; parent/coverage reflect semantic unknowns 41,161→41,162. Interrupted 11-row results match the prior complete answer. - All local resource runs use one CPU / 8 GiB, report CPU/time/process-family cgroup memory and verify cleanup; no OOM. Largest new gate peak 5,169,971,200 B includes file cache. Historical agent trials remain pinned separately; no new model trials were run. **Cost tradeoff:** latest normal retrieval 4.241 s export/projection versus 0.153 s view, but selected structured BPE 8,947 versus17,421. The generic view contract/Evidence wrapper can cost more context. Seven earlier actual Terra/high Codex trials retain worse field-discovery and slower partial-task outcomes too. No universal token/latency benefit, peak-context reduction or billing claim. [Executed sources, reproduction scripts, all attempts, compact results and limitations](https://github.com/morluto/rea/blob/8ea84cc6d44df24e41f50b2e944f63ff461048f8/docs/verification/javascript-retained-facts-2026-10-15.md). Verification is Linux x64 static CLI/stdio MCP on shipped Joplin 3.7.21. Live Electron/browser, native-provider execution and macOS/Windows provider behavior are unverified. Downloadable apps, full Evidence and raw large transcripts/profiles are excluded. The earlier runner review fixes preserve actual CLI version and primary/cleanup errors; historical harnesses remain reconstructible. Final merge evidence: merged as `d9d085a15e17bce525a316a48c7e3eeae1f60423`. At merge, all **41 status checks** succeeded, including all 36 CI jobs. Both exact-head reviews were clear and both prior threads resolved. The first Windows lane attempt exceeded an unchanged 15-second CLI deadline despite complete Evidence output; one unchanged-source lane rerun passed, including curated tests, Node Inspector, packaging and Node 22 path controls. That first failure remains in [attempt 1](https://github.com/morluto/rea/actions/runs/38850384430/attempts/1). All 16 authored source hashes, the entire tracked tree versus tested `8ea84cc6`, required coauthor and #4190 closure were verified after merge. ## Author readiness Human owner: @N0zoM1z0 The session authorized implementation, validation, ready PRs and merging, including waiving manual declarations. The agent reviewed the diff/evidence. A human final-diff review is not asserted; declarations remain unchecked. - [ ] 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. ## Before merge - [x] Scope, shared ownership, caller choices, Evidence and local validation reviewed by the agent. - [x] Current-main integration and reproducible real-application checks recorded without discarding negative results. - [x] Current-head CI and automated reviews completed; attributable findings addressed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:12:13 +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#6146
No description provided.