mirror of
https://github.com/morluto/rea
synced 2026-10-26 14:25:49 -04:00
0e1f0bf2d0
* fix(cleanup): preserve owner recovery instructions Keep cleanup remediation through combined errors and direct or managed one-shot analysis while retaining primary diagnostics. Refs: #4227 * fix(hopper): recover late startup and retained cleanup Authenticate initial and cleanup handshakes through the same identity owner. Expose startup and cleanup activity, retain health after target retirement, and expire abandoned unauthenticated listeners without timing out authenticated work. Refs: #4227 * fix(providers): retain composite lifecycle facts across retries Preserve observed child health with incomplete peer coverage, retry only unresolved clients, and retain all child cleanup recovery actions. Refs: #4233 * fix(process): honor cancellation through capture cleanup Check the request signal after cleanup and before final publication, retaining completed observations under typed cancellation. Refs: #4005 * fix(native): preserve failed LLDB launch ownership and exit proof Publish failed-launch process identity and observed exit separately from object validity. Retire only the exact owned process and retain uncertainty when exit cannot be established. Refs: #4232 * fix(native): honor cancellation after trace finalization Check cancellation after runtime-root cleanup and retain collected trace observations as partial cancellation evidence. Refs: #4009 * fix(cli): preserve analysis results when provider cleanup fails Reuse the existing one-shot finalizer across thirteen command families to retain completed Evidence and primary diagnostics on close failure. Cover success, denied cleanup, and combined primary/cleanup failure through the public CLI. Refs: #3935 * docs(lifecycle): define completion invariants and regression scenarios Document distinct ownership/readiness/exit facts, late cancellation and atomic publication boundaries, partial child cleanup, and diagnostic retention. Link representative regressions and route contributor guidance through AGENTS.md. Refs: #4227 * fix(session): retain run identity through pending cleanup * fix(cli): preserve original cleanup resource diagnostics * fix(native): retain completed facts through finalization failure * fix(providers): report retained cleanup paths at their owners
62 lines
2.2 KiB
TypeScript
62 lines
2.2 KiB
TypeScript
import { z } from "incur";
|
|
import { createWebSourceLocationService } from "../composition/webSourceLocations.js";
|
|
import { CLI_COMMANDS } from "../cliCommandNames.js";
|
|
import { logCliCommand } from "../cliLogging.js";
|
|
import type { Logger } from "pino";
|
|
import type { CliInstance } from "./types.js";
|
|
import { cliIntegerArgument } from "./options.js";
|
|
import { withCommandCancellation } from "./commandCancellation.js";
|
|
import { finishAnalysisCommand } from "./finishAnalysisCommand.js";
|
|
|
|
/** Expose the same explicit selected map/point contract through the CLI. */
|
|
export const registerWebSourceLocationCommands = (
|
|
cli: CliInstance,
|
|
logger: Logger,
|
|
environment: Readonly<NodeJS.ProcessEnv>,
|
|
): void => {
|
|
const service = createWebSourceLocationService(environment);
|
|
cli.command(CLI_COMMANDS.traceWebSourceLocation, {
|
|
description:
|
|
"Trace one retained script position through an explicitly selected local source map",
|
|
args: z.object({
|
|
manifestPath: z
|
|
.string()
|
|
.describe("Absolute export_web_scripts manifest path"),
|
|
scriptIndex: cliIntegerArgument(0).describe(
|
|
"Zero-based manifest script index",
|
|
),
|
|
sourceMapPath: z.string().describe("Absolute local source-map path"),
|
|
sourceMapUrl: z
|
|
.string()
|
|
.describe("Absolute source-map URL context; no fetch"),
|
|
line: cliIntegerArgument(1).describe("One-based generated line"),
|
|
column: cliIntegerArgument(0).describe(
|
|
"Zero-based UTF-16 generated column",
|
|
),
|
|
}),
|
|
run: ({ args }) =>
|
|
withCommandCancellation((signal) =>
|
|
logCliCommand(logger, CLI_COMMANDS.traceWebSourceLocation, () =>
|
|
finishAnalysisCommand(
|
|
() =>
|
|
service.trace(
|
|
{
|
|
manifest_path: args.manifestPath,
|
|
script_index: args.scriptIndex,
|
|
source_map: {
|
|
path: args.sourceMapPath,
|
|
url: args.sourceMapUrl,
|
|
},
|
|
generated_position: { line: args.line, column: args.column },
|
|
},
|
|
{ signal },
|
|
),
|
|
service,
|
|
"web-source-location",
|
|
"trace_web_source_location",
|
|
),
|
|
),
|
|
),
|
|
});
|
|
};
|