[PR #6019] [MERGED] feat(javascript): retain queryable static route inventories #7124

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/6019
Author: @gensokyo-dev
Created: 10/21/2026
Status: ✅ Merged
Merged: 10/22/2026
Merged by: @gensokyo-dev

Base: main ← Head: feat/4772-route-inventory


📝 Commits (10+)

  • 6c7a725 feat(javascript): retain queryable static route inventories
  • af138bc docs(javascript): record route inventory validation and costs
  • 947084f fix(javascript): share route result budgets and preserve route scope
  • e389435 fix(javascript): retain route ownership and capture omissions
  • b5ffdba fix(javascript): recognize TypeScript App Router page paths
  • 48cc5fb test(javascript): qualify route review fixes through real SDK delivery
  • 4d0630a fix(javascript): preserve inferred deployment root identity
  • 13bfba7 docs(javascript): qualify deployment root corrections
  • 9437a12 fix(javascript): align route expression and configuration ownership
  • 135c56b fix(javascript): keep dynamic route ownership within value expressions

📊 Changes

67 files changed (+74345 additions, -231 deletions)

View changed files

📝 .agents/skills/reverse-engineer-anything/references/javascript-applications.md (+14 -0)
📝 docs/browser-observation.md (+7 -0)
➕ docs/javascript-route-inventory.md (+102 -0)
➕ docs/verification/javascript-route-inventory-2026-10-21.json (+67355 -0)
➕ docs/verification/javascript-route-inventory-2026-10-21.md (+228 -0)
📝 package.json (+2 -2)
📝 src/application/javascript/JavaScriptArtifactReconstruction.ts (+48 -0)
📝 src/browser/WebBundleAnalysisWorkerProtocol.ts (+2 -1)
📝 src/browser/WebBundleAnalysisWorkerServer.test.ts (+38 -0)
📝 src/browser/WebBundleAnalysisWorkerServer.ts (+18 -0)
📝 src/cli/analysisEvidenceDelivery.ts (+5 -2)
📝 src/cli/browserCommands.ts (+20 -6)
📝 src/cli/electronCommands.ts (+50 -39)
📝 src/cli/javascriptApplicationAnalysis.ts (+16 -1)
➕ src/cli/javascriptRouteDelivery.ts (+63 -0)
📝 src/cliObservationOptions.ts (+2 -0)
📝 src/contracts/analysisViewToolContracts.ts (+1 -1)
📝 src/contracts/browserToolContracts.ts (+17 -3)
📝 src/contracts/inputSchemaPresentation.ts (+102 -1)
📝 src/contracts/javascript/electronToolContracts.ts (+24 -10)

...and 47 more files

📄 Description

Summary

Fixes #4772. Add a static JavaScript route inventory shared by CLI and MCP. Analysts can query route patterns and their source occurrences without receiving the full application report.

Change and scope

  • Shared analysis produces stable route, occurrence, source and unknown identities; retained Evidence views provide filters, field selection, batch IDs and paging, including after source deletion.
  • Navigation query/search/hash data remains separate from independent routes. Canonical bindings, read-time mutations, object/array references, source coordinates and Next page classification own interpretation once.
  • Getter returns finish before caller member selections. Explicit continuations replace the suffix-length heuristic; genuinely recursive getters retain unknown gaps without consuming the route budget or hiding unrelated routes.
  • Source/inventory budgets, sealed pages, cancellation and cleanup remain bounded. Complete Evidence stays accessible; CLI selected delivery requires export and MCP checks retention first.

Read-only parsing within existing providers. Maintainer execution/injection/mutation/protection-recovery scope decision: not applicable. No target execution added.

Evidence

Qualified runtime b49ee40bf330b7bf1c5180b14dcc104c1c613a8e integrates main c8ed32853881b08aa83459d4da55a28a4e09b0c8. Verification record pins exact commands, inputs, failed controls and measurement limits.

  • 3847 source tests / 116 compiled public tests passed; typecheck/lint and documentation checks passed. Full/compact SDK profiles, both schema dialects, retained reads after deletion, cancellation/recovery, real workers, CLI and browser adapters are covered.
  • The latest getter review reproduced two failures with 243 passing controls. Three finite/nested getter regressions now pass alongside genuine recursion; both SDK profiles and browser adapters exclude distinct query payloads and preserve exact route counts. Source tests ran on the exact committed tree, verified unchanged by commit hooks.
  • Fresh 67 production scripts: 64 completed / 65 route checkpoints / 3 configured incomplete jobs. 207.348 s / 313.817 CPU s / 502,669,312 bytes peak sampled family RSS. All inputs rehashed; deadlines and partial results retained.
  • Fresh SDK and actual Chromium CLI/SDK capture match all 18 independently inspected shadcn /docs patterns, original URL and SHA-256. The captured production chunk was compiled inertly without executing it; owned browser cleanup passed.
  • Equivalent fresh SDK tasks, full used input declarations plus all calls/replies: tokenx estimates 1,934,534 → 58,902 tokens; 13.785 → 12.243 s, 18.104 → 15.909 CPU s, 1,356,595,200 → 1,303,572,480 bytes family RSS. Whole-catalog costs are recorded separately. Initialization/envelopes and actual model tokens are unmeasured; OS caches were warm. No stable latency or analysis speedup claim.

Compatibility and proof limits

Additive contracts. Static patterns do not establish route reachability, complete application coverage, private issue sample behavior or Windows/macOS execution. Historical CI/review and superseded runtime measurements are pinned separately; current-head checks must qualify this version. Material failed validations, including our corrected ABI-pattern integration error, remain recorded.

Author readiness

Human owner: @gensokyo-dev

Opened ready for initial review under the owner's explicit instruction. The unchecked personal-review declarations are not assertions made on the owner's behalf.

  • 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

  • Concrete issue, resolved static scope, one focused outcome and Conventional Commit title.
  • Owning contracts/docs updated and meaningful failure paths verified.
  • Representative CLI/MCP output, costs and verification limits documented.
  • Diff checked for credentials, unrelated changes and unsupported claims.

🔄 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/6019 **Author:** [@gensokyo-dev](https://github.com/gensokyo-dev) **Created:** 10/21/2026 **Status:** ✅ Merged **Merged:** 10/22/2026 **Merged by:** [@gensokyo-dev](https://github.com/gensokyo-dev) **Base:** `main` ← **Head:** `feat/4772-route-inventory` --- ### 📝 Commits (10+) - [`6c7a725`](https://github.com/morluto/rea/commit/6c7a72505815f72a483b2acccbf09bfe71d5097e) feat(javascript): retain queryable static route inventories - [`af138bc`](https://github.com/morluto/rea/commit/af138bc4eb18daf1eac8a2e60e9421ad61dabf9a) docs(javascript): record route inventory validation and costs - [`947084f`](https://github.com/morluto/rea/commit/947084fcbd6f802db79d602355bab3c90bd83616) fix(javascript): share route result budgets and preserve route scope - [`e389435`](https://github.com/morluto/rea/commit/e3894354544d6bd0565185d8fc96551ac8fa6fcc) fix(javascript): retain route ownership and capture omissions - [`b5ffdba`](https://github.com/morluto/rea/commit/b5ffdba6ffdccb7639db12830ec25aa9a697f3f4) fix(javascript): recognize TypeScript App Router page paths - [`48cc5fb`](https://github.com/morluto/rea/commit/48cc5fbc7c4ed85ee0552b35625d94ab1551db95) test(javascript): qualify route review fixes through real SDK delivery - [`4d0630a`](https://github.com/morluto/rea/commit/4d0630abb2e34675a875a49d5eecba89a6b442b2) fix(javascript): preserve inferred deployment root identity - [`13bfba7`](https://github.com/morluto/rea/commit/13bfba73a6d921cee8452030661030ed6772d45c) docs(javascript): qualify deployment root corrections - [`9437a12`](https://github.com/morluto/rea/commit/9437a1215ee5ea0af13fdc9bdcb2bdabec307e38) fix(javascript): align route expression and configuration ownership - [`135c56b`](https://github.com/morluto/rea/commit/135c56bc2f4d9a5e1c39757c2319460788b73897) fix(javascript): keep dynamic route ownership within value expressions ### 📊 Changes **67 files changed** (+74345 additions, -231 deletions) <details> <summary>View changed files</summary> 📝 `.agents/skills/reverse-engineer-anything/references/javascript-applications.md` (+14 -0) 📝 `docs/browser-observation.md` (+7 -0) ➕ `docs/javascript-route-inventory.md` (+102 -0) ➕ `docs/verification/javascript-route-inventory-2026-10-21.json` (+67355 -0) ➕ `docs/verification/javascript-route-inventory-2026-10-21.md` (+228 -0) 📝 `package.json` (+2 -2) 📝 `src/application/javascript/JavaScriptArtifactReconstruction.ts` (+48 -0) 📝 `src/browser/WebBundleAnalysisWorkerProtocol.ts` (+2 -1) 📝 `src/browser/WebBundleAnalysisWorkerServer.test.ts` (+38 -0) 📝 `src/browser/WebBundleAnalysisWorkerServer.ts` (+18 -0) 📝 `src/cli/analysisEvidenceDelivery.ts` (+5 -2) 📝 `src/cli/browserCommands.ts` (+20 -6) 📝 `src/cli/electronCommands.ts` (+50 -39) 📝 `src/cli/javascriptApplicationAnalysis.ts` (+16 -1) ➕ `src/cli/javascriptRouteDelivery.ts` (+63 -0) 📝 `src/cliObservationOptions.ts` (+2 -0) 📝 `src/contracts/analysisViewToolContracts.ts` (+1 -1) 📝 `src/contracts/browserToolContracts.ts` (+17 -3) 📝 `src/contracts/inputSchemaPresentation.ts` (+102 -1) 📝 `src/contracts/javascript/electronToolContracts.ts` (+24 -10) _...and 47 more files_ </details> ### 📄 Description ## Summary Fixes #4772. Add a static JavaScript route inventory shared by CLI and MCP. Analysts can query route patterns and their source occurrences without receiving the full application report. ## Change and scope - Shared analysis produces stable route, occurrence, source and unknown identities; retained Evidence views provide filters, field selection, batch IDs and paging, including after source deletion. - Navigation query/search/hash data remains separate from independent routes. Canonical bindings, read-time mutations, object/array references, source coordinates and Next page classification own interpretation once. - Getter returns finish before caller member selections. Explicit continuations replace the suffix-length heuristic; genuinely recursive getters retain unknown gaps without consuming the route budget or hiding unrelated routes. - Source/inventory budgets, sealed pages, cancellation and cleanup remain bounded. Complete Evidence stays accessible; CLI selected delivery requires export and MCP checks retention first. Read-only parsing within existing providers. Maintainer execution/injection/mutation/protection-recovery scope decision: not applicable. No target execution added. ## Evidence Qualified runtime `b49ee40bf330b7bf1c5180b14dcc104c1c613a8e` integrates main `c8ed32853881b08aa83459d4da55a28a4e09b0c8`. [Verification record](docs/verification/javascript-route-inventory-2026-10-21.md) pins exact commands, inputs, failed controls and measurement limits. - **3847 source tests / 116 compiled public tests passed**; typecheck/lint and documentation checks passed. Full/compact SDK profiles, both schema dialects, retained reads after deletion, cancellation/recovery, real workers, CLI and browser adapters are covered. - The latest getter review reproduced two failures with 243 passing controls. Three finite/nested getter regressions now pass alongside genuine recursion; both SDK profiles and browser adapters exclude distinct query payloads and preserve exact route counts. Source tests ran on the exact committed tree, verified unchanged by commit hooks. - Fresh **67 production scripts: 64 completed / 65 route checkpoints / 3 configured incomplete jobs**. 207.348 s / 313.817 CPU s / 502,669,312 bytes peak sampled family RSS. All inputs rehashed; deadlines and partial results retained. - Fresh SDK and actual Chromium CLI/SDK capture match **all 18** independently inspected shadcn `/docs` patterns, original URL and SHA-256. The captured production chunk was compiled inertly without executing it; owned browser cleanup passed. - Equivalent fresh SDK tasks, full used input declarations plus all calls/replies: tokenx estimates **1,934,534 → 58,902 tokens**; 13.785 → 12.243 s, 18.104 → 15.909 CPU s, 1,356,595,200 → 1,303,572,480 bytes family RSS. Whole-catalog costs are recorded separately. Initialization/envelopes and actual model tokens are unmeasured; OS caches were warm. No stable latency or analysis speedup claim. ## Compatibility and proof limits Additive contracts. Static patterns do not establish route reachability, complete application coverage, private issue sample behavior or Windows/macOS execution. Historical CI/review and superseded runtime measurements are pinned separately; current-head checks must qualify this version. Material failed validations, including our corrected ABI-pattern integration error, remain recorded. ## Author readiness Human owner: @gensokyo-dev Opened ready for initial review under the owner's explicit instruction. The unchecked personal-review declarations are not assertions made on the owner's behalf. - [ ] 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. - [x] I declare this PR ready for initial maintainer review. ## Before merge - [x] Concrete issue, resolved static scope, one focused outcome and Conventional Commit title. - [x] Owning contracts/docs updated and meaningful failure paths verified. - [x] Representative CLI/MCP output, costs and verification limits documented. - [x] Diff checked for credentials, unrelated changes and unsupported claims. --- <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:34 +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#7124
No description provided.