[PR #1410] [MERGED] perf(javascript): aggregate semantic family coverage once #2862

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

📋 Pull Request Information

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

Base: main ← Head: perf/javascript-family-coverage


📝 Commits (1)

  • f3ff320 perf(javascript): aggregate semantic family coverage once

📊 Changes

1 file changed (+17 additions, -9 deletions)

View changed files

📝 src/application/javascript/JavaScriptSemanticGraphBuilder.ts (+17 -9)

📄 Description

Semantic graph completion copied and scanned all retained relations for each of the 12 families, then repeatedly filtered unknowns. Count relations and group unknown IDs once, and reuse the relation array passed to graph construction. Counts, unknown ordering, coverage, node budgets, graph identity, and complete Evidence remain unchanged.

Validation:

  • 99 focused tests across semantic projection/resources, immutable result steps, cancellation, actual SDK MCP cancellation, and compiled CLI JSON/JSONL output passed.
  • Full npm run typecheck -- --singleThreaded, lint/module boundaries, and changed-file formatting passed under the existing two-CPU/2 GiB process-family RSS guard. The single-threaded compiler peaked at 1.48 GB; ordinary parallel typechecking previously exceeded that guard.
  • Before/after compiled application analysis of the same source-owned 80-function fixture produced identical complete Evidence SHA-256, Evidence ID, graph ID, family coverage, and all 2,893 nodes / 2,246 relations / 885 unknowns.

An aggregation-only microbenchmark on that completed graph (50 alternating iterations) measured 1.79 ms versus 0.16 ms median. Whole analysis was 1.129 s versus 1.331 s in the single pair; this is not an end-to-end throughput, memory, or token-use improvement claim. No Notion/Obsidian or real native-provider run was repeated for this provider-independent change.

Refs #1065. This removes one repeated completion scan; the broader cancellation/catalog/result-repetition roadmap remains open.


🔄 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/1410 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/10/2026 **Status:** ✅ Merged **Merged:** 10/10/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `perf/javascript-family-coverage` --- ### 📝 Commits (1) - [`f3ff320`](https://github.com/morluto/rea/commit/f3ff3205713fe7968a9541419137deb9ee839470) perf(javascript): aggregate semantic family coverage once ### 📊 Changes **1 file changed** (+17 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `src/application/javascript/JavaScriptSemanticGraphBuilder.ts` (+17 -9) </details> ### 📄 Description Semantic graph completion copied and scanned all retained relations for each of the 12 families, then repeatedly filtered unknowns. Count relations and group unknown IDs once, and reuse the relation array passed to graph construction. Counts, unknown ordering, coverage, node budgets, graph identity, and complete Evidence remain unchanged. Validation: - 99 focused tests across semantic projection/resources, immutable result steps, cancellation, actual SDK MCP cancellation, and compiled CLI JSON/JSONL output passed. - Full `npm run typecheck -- --singleThreaded`, lint/module boundaries, and changed-file formatting passed under the existing two-CPU/2 GiB process-family RSS guard. The single-threaded compiler peaked at 1.48 GB; ordinary parallel typechecking previously exceeded that guard. - Before/after compiled application analysis of the same source-owned 80-function fixture produced identical complete Evidence SHA-256, Evidence ID, graph ID, family coverage, and all 2,893 nodes / 2,246 relations / 885 unknowns. An aggregation-only microbenchmark on that completed graph (50 alternating iterations) measured 1.79 ms versus 0.16 ms median. Whole analysis was 1.129 s versus 1.331 s in the single pair; this is not an end-to-end throughput, memory, or token-use improvement claim. No Notion/Obsidian or real native-provider run was repeated for this provider-independent change. Refs #1065. This removes one repeated completion scan; the broader cancellation/catalog/result-repetition roadmap remains open. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:11:09 +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#2862
No description provided.