mirror of
https://github.com/morluto/rea.git
synced 2026-11-06 06:46:10 +00:00
feat(javascript): query retained application facts by exact path (#4265)
Expose exact-path, selected-property, paged reads of retained JavaScript application facts through the shared CLI/MCP analysis view. Preserve original identities, complete row Evidence and partial coverage; retain reproducible real-Joplin and actual-agent measurements, including negative cost results. Fixes #4190. Part of #4027. Code mode remains deferred by #4091. Integrate main after #4274. Validation: 114 distinct focused cases across documented invocations, 106 Python cases, full static/docs checks and 18 version-labelled real-application workflows with 9 complete CLI/MCP view parity controls. Preserve two local fixture deadline failures and the unchanged test passing on an available single CPU. Final-head CI passed all 36 jobs after one Windows timeout retry without source changes; both exact-head automated reviews are clear and all review threads resolved. Downloadable apps and raw large Evidence/transcripts are excluded. Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
This commit is contained in:
1 parent
1b97b0f370
commit
d9d085a15e
18 files changed
+10256
-50
No files matched your search
@@ -0,0 +1,39 @@
|
||||
import { z } from "zod";
|
||||
import { applicationCoverageSchema } from "../javascript/javascriptApplicationEvidenceSchemas.js";
|
||||
import type { JavaScriptApplicationAnalysisResult } from "../javascript/javascriptApplicationAnalysis.js";
|
||||
import { javaScriptSemanticGraphInputSchema } from "../javascript/javascriptSemanticGraphSchemas.js";
|
||||
import { javaScriptSourceSelectionSchema } from "../javascript/javascriptSourceSelection.js";
|
||||
|
||||
/** Source completeness is independent of exhausting a selected fact page. */
|
||||
export const javascriptApplicationSourceCoverageSchema = z.strictObject({
|
||||
source_selection: javaScriptSourceSelectionSchema.exactOptional(),
|
||||
application: applicationCoverageSchema,
|
||||
semantic: javaScriptSemanticGraphInputSchema.shape.coverage.omit({
|
||||
families: true,
|
||||
}),
|
||||
application_unknown_count: z.number().int().nonnegative(),
|
||||
semantic_unknown_count: z.number().int().nonnegative(),
|
||||
});
|
||||
|
||||
export type JavaScriptApplicationSourceCoverage = z.infer<
|
||||
typeof javascriptApplicationSourceCoverageSchema
|
||||
>;
|
||||
|
||||
/** Reuse retained coverage and count its unknowns once for every view. */
|
||||
export const javascriptApplicationSourceCoverage = (
|
||||
analysis: JavaScriptApplicationAnalysisResult,
|
||||
): JavaScriptApplicationSourceCoverage => {
|
||||
const { families: _families, ...semantic } = analysis.semantic_graph.coverage;
|
||||
return {
|
||||
...(analysis.source_selection === undefined
|
||||
? {}
|
||||
: { source_selection: analysis.source_selection }),
|
||||
application: analysis.graph.coverage,
|
||||
semantic,
|
||||
application_unknown_count: analysis.graph.nodes.reduce(
|
||||
(count, node) => count + Number(node.kind === "unknown"),
|
||||
0,
|
||||
),
|
||||
semantic_unknown_count: analysis.semantic_graph.unknowns.length,
|
||||
};
|
||||
};
|
||||
Reference in new issue
Block a user