[PR #420] [MERGED] feat(javascript): add bounded semantic tracing #1969

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

📋 Pull Request Information

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

Base: main ← Head: codex/issue-404-integration


📝 Commits (4)

  • a26a1c7 feat(javascript): add local semantic call flow
  • b3939ea feat(javascript): add bounded semantic relation graph
  • 8678b57 fix(javascript): preserve candidate trace ambiguity
  • 508a9cc feat(javascript): expose bounded semantic tracing

📊 Changes

62 files changed (+5448 additions, -87 deletions)

View changed files

📝 README.md (+1 -1)
📝 README_ar.md (+1 -1)
📝 README_ja.md (+1 -1)
📝 README_ko.md (+1 -1)
📝 README_zh.md (+1 -1)
📝 docs/javascript-application-workflows.md (+39 -6)
📝 docs/product-catalog.json (+25 -10)
📝 docs/verification/managed-conformance-manifest.json (+2 -2)
📝 scripts/lib/catalog-core.mjs (+3 -0)
📝 scripts/lib/catalog-schemas.mjs (+16 -1)
📝 skills/reverse-engineer-anything/SKILL.md (+2 -2)
📝 src/application/ApplicationWorkflowEvidenceResolver.ts (+42 -0)
📝 src/application/JavaScriptApplicationEvidence.ts (+1 -1)
📝 src/application/JavaScriptApplicationEvidenceGraph.ts (+16 -1)
📝 src/application/JavaScriptApplicationService.ts (+1 -1)
📝 src/application/JavaScriptApplicationWorkflowEvidence.ts (+19 -0)
📝 src/application/JavaScriptArtifactReconstruction.ts (+9 -0)
➕ src/application/JavaScriptSemanticGraphBuilder.ts (+462 -0)
➕ src/application/JavaScriptSemanticGraphConstruction.ts (+256 -0)
➕ src/application/JavaScriptSemanticGraphEvidence.ts (+111 -0)

...and 42 more files

📄 Description

Description

Adds a bounded, provider-neutral semantic companion graph for JavaScript application analysis and exposes deterministic tracing through trace_javascript_semantics and rea trace-javascript-semantics.

The graph links lexical definitions, reads, closure captures, direct local calls, arguments, returns, and assigned call results. Every relation carries source evidence. Ambiguous call targets and complex return expressions remain candidate evidence and are excluded from exact traversal unless requested. Dynamic behavior, runtime causality, fingerprints, promises, events, process/request/config/resource flows, and unsupported relation families remain explicit unknowns rather than inferred facts.

New analyses emit application-analysis schema v2; v1 evidence remains readable. Structural-to-semantic mapping requires the same artifact digest, exact path, and exact source range. Query results use stable ordering, bounded traversal, typed cursors, coverage metadata, and explicit truncation limits.

This advances #404 without claiming its remaining runtime and cross-subsystem roadmap work.

Suggested review order

  1. Domain schemas, evidence rules, and query behavior.
  2. Semantic graph projection from the existing JavaScript IR.
  3. CLI/MCP contracts and application-result integration.
  4. Behavioral tests and generated catalog/documentation updates.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation-only change
  • Refactor (no behavior change)

Testing

  • Unit tests added or updated
  • npm test
  • npm run typecheck
  • npm run lint
  • npm run verify:package
  • npm pack --dry-run
  • Real Hopper smoke test (if applicable)
  • Browser CDP end-to-end verifier (if applicable)

Focused semantic, reconstruction, CLI, and MCP validation passed: 6 files and 58 tests. CI passed both test shards, coverage and timing aggregation, static checks, generated-document validation, Linux and macOS package verification, and the Windows package lane. Real provider verification is not applicable to this execution-free JavaScript analysis change.

Tool Contract Impact

  • MCP tool schemas changed
  • CLI behavior changed
  • Generated product catalog refreshed
  • Documentation updated

Adds one application-analysis tool family and a v2 analysis result containing the semantic companion graph. Existing v1 analysis evidence remains accepted.

Advances #404.


🔄 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/420 **Author:** [@morluto](https://github.com/morluto) **Created:** 7/22/2026 **Status:** ✅ Merged **Merged:** 7/22/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `codex/issue-404-integration` --- ### 📝 Commits (4) - [`a26a1c7`](https://github.com/morluto/rea/commit/a26a1c73df019e060a5ca50208e71dad1eb55f1e) feat(javascript): add local semantic call flow - [`b3939ea`](https://github.com/morluto/rea/commit/b3939ea9ffc79a6f0998af76b0f6c9f166d2963b) feat(javascript): add bounded semantic relation graph - [`8678b57`](https://github.com/morluto/rea/commit/8678b57b5e03b0fb103803eb0a9e9ebda3124647) fix(javascript): preserve candidate trace ambiguity - [`508a9cc`](https://github.com/morluto/rea/commit/508a9ccde9c4beef2fa4dbd39093a1030287e967) feat(javascript): expose bounded semantic tracing ### 📊 Changes **62 files changed** (+5448 additions, -87 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+1 -1) 📝 `README_ar.md` (+1 -1) 📝 `README_ja.md` (+1 -1) 📝 `README_ko.md` (+1 -1) 📝 `README_zh.md` (+1 -1) 📝 `docs/javascript-application-workflows.md` (+39 -6) 📝 `docs/product-catalog.json` (+25 -10) 📝 `docs/verification/managed-conformance-manifest.json` (+2 -2) 📝 `scripts/lib/catalog-core.mjs` (+3 -0) 📝 `scripts/lib/catalog-schemas.mjs` (+16 -1) 📝 `skills/reverse-engineer-anything/SKILL.md` (+2 -2) 📝 `src/application/ApplicationWorkflowEvidenceResolver.ts` (+42 -0) 📝 `src/application/JavaScriptApplicationEvidence.ts` (+1 -1) 📝 `src/application/JavaScriptApplicationEvidenceGraph.ts` (+16 -1) 📝 `src/application/JavaScriptApplicationService.ts` (+1 -1) 📝 `src/application/JavaScriptApplicationWorkflowEvidence.ts` (+19 -0) 📝 `src/application/JavaScriptArtifactReconstruction.ts` (+9 -0) ➕ `src/application/JavaScriptSemanticGraphBuilder.ts` (+462 -0) ➕ `src/application/JavaScriptSemanticGraphConstruction.ts` (+256 -0) ➕ `src/application/JavaScriptSemanticGraphEvidence.ts` (+111 -0) _...and 42 more files_ </details> ### 📄 Description ## Description Adds a bounded, provider-neutral semantic companion graph for JavaScript application analysis and exposes deterministic tracing through `trace_javascript_semantics` and `rea trace-javascript-semantics`. The graph links lexical definitions, reads, closure captures, direct local calls, arguments, returns, and assigned call results. Every relation carries source evidence. Ambiguous call targets and complex return expressions remain candidate evidence and are excluded from exact traversal unless requested. Dynamic behavior, runtime causality, fingerprints, promises, events, process/request/config/resource flows, and unsupported relation families remain explicit unknowns rather than inferred facts. New analyses emit application-analysis schema v2; v1 evidence remains readable. Structural-to-semantic mapping requires the same artifact digest, exact path, and exact source range. Query results use stable ordering, bounded traversal, typed cursors, coverage metadata, and explicit truncation limits. This advances #404 without claiming its remaining runtime and cross-subsystem roadmap work. ### Suggested review order 1. Domain schemas, evidence rules, and query behavior. 2. Semantic graph projection from the existing JavaScript IR. 3. CLI/MCP contracts and application-result integration. 4. Behavioral tests and generated catalog/documentation updates. ## Type of Change - [ ] Bug fix - [x] New feature - [ ] Breaking change - [ ] Documentation-only change - [ ] Refactor (no behavior change) ## Testing - [x] Unit tests added or updated - [x] `npm test` - [x] `npm run typecheck` - [x] `npm run lint` - [x] `npm run verify:package` - [x] `npm pack --dry-run` - [ ] Real Hopper smoke test (if applicable) - [ ] Browser CDP end-to-end verifier (if applicable) Focused semantic, reconstruction, CLI, and MCP validation passed: 6 files and 58 tests. CI passed both test shards, coverage and timing aggregation, static checks, generated-document validation, Linux and macOS package verification, and the Windows package lane. Real provider verification is not applicable to this execution-free JavaScript analysis change. ## Tool Contract Impact - [x] MCP tool schemas changed - [x] CLI behavior changed - [x] Generated product catalog refreshed - [x] Documentation updated Adds one application-analysis tool family and a v2 analysis result containing the semantic companion graph. Existing v1 analysis evidence remains accepted. ## Related Issues Advances #404. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:12:57 +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#1969
No description provided.