refactor(javascript): own runtime reconciliation failures

Return expected source and semantic failures from the runtime input owner as tagged Results. Bind source schema validation to concrete schemas, preserve nested active-capture paths, and let unexpected interpretation and derivation failures reach the adapter boundary.

Remove broad protocol-error wrappers, duplicate active identity validation, and redundant JSON result parsing. Migrate parsed-fact consumers and retain CLI/MCP contracts. Relevant source and public-boundary tests pass; six injected implementation-fault controls fail on the prior revision. Live Electron behavior was not exercised.
This commit is contained in:
morluto committed 2026-10-23 09:55:02 +08:00
1 parent ed069bb9d4
commit f4b2ba1313
13 files changed
+358 -171

No files matched your search

@@ -7,7 +7,6 @@ import type {
JavaScriptRuntimeReconciliationResult,
ReconcileJavaScriptRuntimeInput,
} from "../../domain/javascript/javascriptRuntimeReconciliationSchemas.js";
import { jsonValueSchema } from "../../domain/jsonValue.js";
import { JAVASCRIPT_RUNTIME_RECONCILIATION_PROVIDER } from "../InvestigationProviders.js";
/** Create derived Evidence for one exact set of static/runtime inputs. */
@@ -19,7 +18,7 @@ export const createJavaScriptRuntimeReconciliationEvidence = (
predicateType: "rea.javascript-runtime-reconciliation",
operation: "reconcile_javascript_runtime",
parameters: parameters(input),
result: jsonValueSchema.parse(result),
result,
rawResult: null,
confidence: "inferred",
authority: "analyst-inference",