refactor!: simplify runtime tools and remove replay engines (#572)
* fix(hopper): report unavailable procedure body coverage * refactor!: simplify runtime tools and remove replay engines Keep direct inspection, capture, and comparison tools. Bind handlers to named contracts and let agents compose experiments with commands and local fixture servers. BREAKING CHANGE: Remove controlled replay, Node characterization, finite replay-machine, managed runtime planning, and redundant string-tracing tools. Retire process replay, shims, reactive scenarios, custom checkpoints, and active browser replay and origin-scope inputs.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { isAbsolute } from "node:path";
|
||||
import { defaultJavaScriptReplayConfiguration } from "./runtimeConfiguration.js";
|
||||
|
||||
import { ConfigurationError } from "../domain/errors.js";
|
||||
import { err, ok, type Result } from "../domain/result.js";
|
||||
@@ -31,39 +30,6 @@ const environmentSchema = z.object({
|
||||
.enum(["trace", "debug", "info", "warn", "error", "fatal", "silent"])
|
||||
.default("info"),
|
||||
REA_REFERENCE_SECRET_PATTERNS_JSON: z.string().default("[]"),
|
||||
REA_JAVASCRIPT_REPLAY_NODE_PATH: z
|
||||
.string()
|
||||
.min(1)
|
||||
.refine(isAbsolute, "REA_JAVASCRIPT_REPLAY_NODE_PATH must be absolute")
|
||||
.default(() => defaultJavaScriptReplayConfiguration().nodePath),
|
||||
REA_JAVASCRIPT_REPLAY_BWRAP_PATH: z
|
||||
.string()
|
||||
.min(1)
|
||||
.refine(isAbsolute, "REA_JAVASCRIPT_REPLAY_BWRAP_PATH must be absolute")
|
||||
.default(() => defaultJavaScriptReplayConfiguration().bubblewrapPath),
|
||||
REA_JAVASCRIPT_REPLAY_SYSTEMD_RUN_PATH: z
|
||||
.string()
|
||||
.min(1)
|
||||
.refine(
|
||||
isAbsolute,
|
||||
"REA_JAVASCRIPT_REPLAY_SYSTEMD_RUN_PATH must be absolute",
|
||||
)
|
||||
.default(() => defaultJavaScriptReplayConfiguration().systemdRunPath),
|
||||
REA_JAVASCRIPT_REPLAY_SYSTEMCTL_PATH: z
|
||||
.string()
|
||||
.min(1)
|
||||
.refine(isAbsolute, "REA_JAVASCRIPT_REPLAY_SYSTEMCTL_PATH must be absolute")
|
||||
.default(() => defaultJavaScriptReplayConfiguration().systemctlPath),
|
||||
REA_JAVASCRIPT_REPLAY_SHELL_PATH: z
|
||||
.string()
|
||||
.min(1)
|
||||
.refine(isAbsolute, "REA_JAVASCRIPT_REPLAY_SHELL_PATH must be absolute")
|
||||
.default(() => defaultJavaScriptReplayConfiguration().shellPath),
|
||||
REA_MANAGED_RUNTIME_EXECUTABLE_PATH: z
|
||||
.string()
|
||||
.min(1)
|
||||
.refine(isAbsolute, "REA_MANAGED_RUNTIME_EXECUTABLE_PATH must be absolute")
|
||||
.optional(),
|
||||
});
|
||||
|
||||
export type Environment = z.infer<typeof environmentSchema>;
|
||||
|
||||
@@ -34,15 +34,5 @@ export const parseConfig = (
|
||||
hopperLoaderArgs: loaderArgs.value,
|
||||
logLevel: env.REA_LOG_LEVEL,
|
||||
referenceSourcePolicy: { secretPatterns: secretPatterns.value },
|
||||
javascriptReplayConfiguration: {
|
||||
nodePath: env.REA_JAVASCRIPT_REPLAY_NODE_PATH,
|
||||
bubblewrapPath: env.REA_JAVASCRIPT_REPLAY_BWRAP_PATH,
|
||||
systemdRunPath: env.REA_JAVASCRIPT_REPLAY_SYSTEMD_RUN_PATH,
|
||||
systemctlPath: env.REA_JAVASCRIPT_REPLAY_SYSTEMCTL_PATH,
|
||||
shellPath: env.REA_JAVASCRIPT_REPLAY_SHELL_PATH,
|
||||
},
|
||||
managedRuntimeConfiguration: {
|
||||
executablePath: env.REA_MANAGED_RUNTIME_EXECUTABLE_PATH,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
import type { JavaScriptReplayConfiguration } from "../application/JavaScriptReplayPlanning.js";
|
||||
|
||||
/** Default runtime paths; callers can override these through parsed configuration. */
|
||||
export const defaultJavaScriptReplayConfiguration =
|
||||
(): JavaScriptReplayConfiguration => ({
|
||||
nodePath: process.execPath,
|
||||
bubblewrapPath: "/usr/bin/bwrap",
|
||||
systemdRunPath: "/usr/bin/systemd-run",
|
||||
systemctlPath: "/usr/bin/systemctl",
|
||||
shellPath: "/usr/bin/bash",
|
||||
});
|
||||
@@ -1,8 +1,6 @@
|
||||
import type { LogLevel } from "../logger.js";
|
||||
import type { ReferenceSourcePolicy } from "../domain/referenceSourcePolicy.js";
|
||||
import type { AnalysisProviderSelector } from "../contracts/providerSelection.js";
|
||||
import type { ManagedRuntimeConfiguration } from "../application/ManagedRuntimeCorrelationService.js";
|
||||
import type { JavaScriptReplayConfiguration } from "../application/JavaScriptReplayPlanning.js";
|
||||
|
||||
export interface AppConfig {
|
||||
readonly analysisProvider: AnalysisProviderSelector;
|
||||
@@ -15,6 +13,4 @@ export interface AppConfig {
|
||||
readonly hopperLoaderArgs: readonly string[];
|
||||
readonly logLevel: LogLevel;
|
||||
readonly referenceSourcePolicy: ReferenceSourcePolicy;
|
||||
readonly javascriptReplayConfiguration: JavaScriptReplayConfiguration;
|
||||
readonly managedRuntimeConfiguration: ManagedRuntimeConfiguration;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user