mirror of
https://github.com/morluto/rea.git
synced 2026-11-18 20:53:00 +00:00
perf(ci): optimize semantic graph construction, directory containment checks, gate checkouts, and boundary stragglers (#11851)
* perf(javascript): avoid redundant semantic graph validation and node hashing * perf(resources): deduplicate directory containment checks and root lstat calls * perf(ci): trace script fixture modules, sparse-checkout gate jobs, and parallelize built doc checks * perf(tests): memoize live MCP doctor expectations and reuse CLI and verifier compilation * fix(ci): enforce containment after skipped entries, validate interned contexts, and supervise doc and verifier teardowns * fix(docs): decode buffered check output once to preserve multi-byte UTF-8
This commit is contained in:
1 parent
015f726a9e
commit
84ee604c6d
25 files changed
+1650
-259
No files matched your search
@@ -84,6 +84,7 @@ import {
|
||||
addSemanticGraphRelation as addRelation,
|
||||
createSemanticGraphProjectionState as emptyState,
|
||||
bindSemanticGraphApplicationNodes,
|
||||
semanticNodeIdentityLookupKey,
|
||||
type SemanticGraphProjectionState as BuilderState,
|
||||
} from "./JavaScriptSemanticGraphConstruction.js";
|
||||
import type {
|
||||
@@ -332,7 +333,7 @@ export const createJavaScriptSemanticGraphProjection = (
|
||||
root_artifact_sha256: rootArtifactSha256,
|
||||
application_graph_id: applicationGraph.graph_id,
|
||||
root_node_ids: [...state.roots],
|
||||
evidence_contexts: state.evidenceContexts.contexts,
|
||||
evidence_contexts: state.evidenceContexts.ownedContexts,
|
||||
nodes: [...state.nodes.values()],
|
||||
relations,
|
||||
// The input is transferred to the factory; `fingerprints` is cleared below.
|
||||
@@ -389,6 +390,7 @@ export const createJavaScriptSemanticGraphProjection = (
|
||||
],
|
||||
});
|
||||
state.nodes.clear();
|
||||
state.nodesByLookupKey.clear();
|
||||
state.relations.clear();
|
||||
state.unknowns.clear();
|
||||
state.unknownOmissions.clear();
|
||||
@@ -437,7 +439,10 @@ export const createJavaScriptSemanticGraphProjection = (
|
||||
recordSemanticUnknownOmission(state, omission);
|
||||
for (const context of projection.evidenceContexts)
|
||||
state.evidenceContexts.adopt(context);
|
||||
for (const node of newNodes) state.nodes.set(node.node_id, node);
|
||||
for (const node of newNodes) {
|
||||
state.nodes.set(node.node_id, node);
|
||||
state.nodesByLookupKey.set(semanticNodeIdentityLookupKey(node), node);
|
||||
}
|
||||
for (const relation of projection.relations)
|
||||
state.relations.set(relation.relation_id, relation);
|
||||
for (const unknown of newUnknowns)
|
||||
@@ -582,7 +587,7 @@ export function* projectJavaScriptSemanticFileSteps(
|
||||
const fingerprints = yield* projectFileSteps(file, ir, state, paths);
|
||||
return {
|
||||
roots: [...state.roots],
|
||||
evidenceContexts: state.evidenceContexts.contexts,
|
||||
evidenceContexts: state.evidenceContexts.ownedContexts,
|
||||
nodes: [...state.nodes.values()],
|
||||
relations: [...state.relations.values()],
|
||||
unknowns: [...state.unknowns.values()],
|
||||
|
||||
Reference in new issue
Block a user