@descryy/runtime-orchestrator 0.2.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/LICENSE +6 -0
  2. package/dist/attach-to-running-jvm-process.d.ts +45 -98
  3. package/dist/attach-to-running-jvm-process.d.ts.map +1 -1
  4. package/dist/attach-to-running-jvm-process.js +206 -136
  5. package/dist/attach-to-running-jvm-process.js.map +1 -1
  6. package/dist/attach-to-running-node-process.d.ts +45 -103
  7. package/dist/attach-to-running-node-process.d.ts.map +1 -1
  8. package/dist/attach-to-running-node-process.js +90 -115
  9. package/dist/attach-to-running-node-process.js.map +1 -1
  10. package/dist/attach-to-running-process.d.ts +32 -70
  11. package/dist/attach-to-running-process.d.ts.map +1 -1
  12. package/dist/attach-to-running-process.js +26 -54
  13. package/dist/attach-to-running-process.js.map +1 -1
  14. package/dist/cdp-client.d.ts +8 -18
  15. package/dist/cdp-client.d.ts.map +1 -1
  16. package/dist/cdp-client.js +9 -22
  17. package/dist/cdp-client.js.map +1 -1
  18. package/dist/cgroup-partial-restriction.d.ts +42 -89
  19. package/dist/cgroup-partial-restriction.d.ts.map +1 -1
  20. package/dist/cgroup-partial-restriction.js +44 -91
  21. package/dist/cgroup-partial-restriction.js.map +1 -1
  22. package/dist/collector-version.d.ts +3 -8
  23. package/dist/collector-version.d.ts.map +1 -1
  24. package/dist/collector-version.js +3 -8
  25. package/dist/collector-version.js.map +1 -1
  26. package/dist/instrumented-execution.d.ts +30 -73
  27. package/dist/instrumented-execution.d.ts.map +1 -1
  28. package/dist/instrumented-execution.js +121 -251
  29. package/dist/instrumented-execution.js.map +1 -1
  30. package/dist/jvm-agent/build.d.ts +29 -53
  31. package/dist/jvm-agent/build.d.ts.map +1 -1
  32. package/dist/jvm-agent/build.js +34 -61
  33. package/dist/jvm-agent/build.js.map +1 -1
  34. package/dist/polling-output-source.d.ts +8 -19
  35. package/dist/polling-output-source.d.ts.map +1 -1
  36. package/dist/polling-output-source.js +14 -31
  37. package/dist/polling-output-source.js.map +1 -1
  38. package/dist/profile-backend-observation.d.ts +26 -53
  39. package/dist/profile-backend-observation.d.ts.map +1 -1
  40. package/dist/profile-backend-observation.js +26 -55
  41. package/dist/profile-backend-observation.js.map +1 -1
  42. package/dist/respawn-and-supervise.d.ts +39 -72
  43. package/dist/respawn-and-supervise.d.ts.map +1 -1
  44. package/dist/respawn-and-supervise.js +43 -84
  45. package/dist/respawn-and-supervise.js.map +1 -1
  46. package/package.json +14 -9
@@ -1,73 +1,40 @@
1
1
  /**
2
- * Retroactive attach to an already-running **JVM (Java/Kotlin/…)** process
3
- * the JVM item on `RT-attach-to-running-process-scope.md`'s own
4
- * "deliberately not built" list, and `RT-attach-to-running-jvm-process.md`
5
- * (decisions-inbox) is the short record of what got measured before any of
6
- * this was written and why the slice below is the honest first one, not a
7
- * full CDP-equivalent.
2
+ * Retroactive attach to an already-running **JVM (Java/Kotlin/…)** process. Not a
3
+ * full CDP-equivalent; see `RT-attach-to-running-jvm-process.md` (decisions-inbox)
4
+ * for what was measured before this was written.
8
5
  *
9
- * **The real mechanism, measured against a live JVM on this machine, not
10
- * assumed from docs.** The JVM ships no built-in signal-to-inspector path
11
- * the way Node's `SIGUSR1` does. What it does ship, since JDK 6, is the
12
- * HotSpot Dynamic Attach mechanism: a launcher process calls
13
- * `com.sun.tools.attach.VirtualMachine.attach(pid)`, which creates
14
- * `.attach_pid<pid>` and signals the target with `SIGQUIT`; the target's own
15
- * attach-listener thread (started lazily on first use, already running in
16
- * every stock HotSpot JVM — nothing needs to be enabled at the target's own
17
- * launch) opens a Unix-domain socket at `.java_pid<pid>` in its temp
18
- * directory and accepts commands over it. `jcmd`/`jstack`/`VisualVM` all use
19
- * exactly this. Measured directly here: attached to a plain `java
20
- * QuietServer` process with no `-agentlib`/`-Djdk.attach` flags of any kind
21
- * and no restart, confirming this is genuinely retroactive, the same
22
- * standing Node's `SIGUSR1` slice has.
6
+ * **Mechanism, measured against a live JVM, not assumed from docs.** The JVM has
7
+ * no `SIGUSR1`-equivalent, but ships (since JDK 6) HotSpot Dynamic Attach:
8
+ * `VirtualMachine.attach(pid)` creates `.attach_pid<pid>`, signals `SIGQUIT`, and
9
+ * the target's attach-listener thread (already running in every stock HotSpot
10
+ * JVM, nothing to enable at launch) opens a Unix socket at `.java_pid<pid>` and
11
+ * accepts commands the same thing `jcmd`/`jstack`/`VisualVM` use. Measured:
12
+ * attached to a plain `java QuietServer` with no special flags and no restart,
13
+ * confirming this is genuinely retroactive.
23
14
  *
24
- * **What this channel can actually give measured, and narrower than
25
- * CDP.** `VirtualMachine.loadAgent(jar, args)` loads a real Java agent
26
- * (`java.lang.instrument.Instrumentation`) into the target's own JVM,
27
- * running as that JVM's own code a strictly more powerful primitive than
28
- * CDP's remote-debugging protocol. This first slice used only the cheapest
29
- * real capability inside it: `Thread.setDefaultUncaughtExceptionHandler`
30
- * (`jvm-agent/Agent.java`), which needs no bytecode instrumentation at all,
31
- * and **did not see an exception a framework already caught** — a request
32
- * handler's own try/catch, a servlet container's default error page, any
33
- * `@ExceptionHandler` because by definition those exceptions never reach
34
- * "uncaught." `SelfFailingServer.java` (the existing execute-mode fixture)
35
- * catches and logs its own thrown exception for exactly this reason, so it
36
- * is not a fixture this module's own test can reuse; see
37
- * `test/fixtures/jvm-attach/BackgroundThreadThrows.java`, a real thread that
38
- * throws with nothing catching it, the one shape that first slice could see.
15
+ * **Narrower than CDP.** `VirtualMachine.loadAgent(jar, args)` loads a real Java
16
+ * agent (`Instrumentation`) more powerful than CDP's remote-debugging protocol
17
+ * in principle, but this slice only uses `Thread.setDefaultUncaughtExceptionHandler`
18
+ * (`jvm-agent/Agent.java`), so it never sees an exception a framework already
19
+ * caught (a try/catch, a servlet error page, `@ExceptionHandler`). RT-201 closed
20
+ * one specific instance of that gap: `Agent.java` also installs a ByteBuddy
21
+ * `ClassFileTransformer` tapping
22
+ * `DispatcherServlet#processHandlerException` Spring MVC's single stable
23
+ * exception choke point reported as `"framework-caught-exception"`, parsed
24
+ * below and emitted with `payload.handled === true`. This closes only that one
25
+ * choke point: a catch absorbed inside a `@Service` method, or any non-Spring
26
+ * framework, is still invisible.
39
27
  *
40
- * **RT-201 closed one specific, real instance of that gap**, using the same
41
- * `Instrumentation` this module already hands the agent: `Agent.java` now
42
- * also installs a ByteBuddy `ClassFileTransformer` (see that file's own
43
- * header comment for the full mechanism and what was measured) that taps
44
- * `org.springframework.web.servlet.DispatcherServlet#processHandlerException`
45
- * — Spring MVC's single stable choke point for every exception-handling
46
- * path — and reports what it catches as a `"framework-caught-exception"`
47
- * event, parsed below as `isFrameworkCaughtExceptionEvent` and emitted as
48
- * `EXCEPTION` evidence with `payload.handled === true`. **This closes only
49
- * that one choke point.** A catch that never reaches Spring's dispatcher —
50
- * absorbed inside a `@Service` method, logged nowhere — is still invisible,
51
- * and no non-Spring framework is instrumented at all. `Runtime.exceptionThrown`'s
52
- * CDP-side reach (any throw the debugger is configured to pause on,
53
- * regardless of framework) still has no equivalent here.
28
+ * **No console-output capture** `System.out`/`err` aren't intercepted; that's
29
+ * `attachToRunningProcess`'s job for a target already logging to a file.
30
+ * `capabilities()` reports `backendLogAccess` unavailable for that reason.
54
31
  *
55
- * **No console-output capture in this slice.** Unlike CDP's
56
- * `Runtime.consoleAPICalled`, `System.out`/`System.err` are not intercepted
57
- * a target already logging to a file is exactly `attachToRunningProcess`'s
58
- * (the file-based sibling) job, and duplicating that here would be two
59
- * mechanisms claiming the same evidence. `capabilities()` reports
60
- * `backendLogAccess` unavailable for that reason, unlike the Node slice.
61
- *
62
- * **Launcher is a real JDK tool process, not a library call.** There is no
63
- * Node/native binding for the Attach API in this repo and none is added —
64
- * `jvm-agent/build.ts` compiles `Attacher.java` once (cached by mtime, same
65
- * rule `kotlin-server/build.ts` already uses) and this module spawns it as a
66
- * short-lived `java` child process, the same "one helper invocation, not a
67
- * new protocol client" shape `discoverNodeInspectorUrl`'s `process.kill`
68
- * call has, just through a JDK tool instead of a POSIX signal.
32
+ * **Launcher is a real JDK tool process, not a library call** — no Node/native
33
+ * Attach-API binding exists or is added. `jvm-agent/build.ts` compiles
34
+ * `Attacher.java` once (mtime-cached) and this module spawns it as a short-lived
35
+ * `java` child process.
69
36
  */
70
- import { existsSync, mkdtempSync, readFileSync, writeFileSync } from "node:fs";
37
+ import { existsSync, mkdtempSync, readFileSync, writeFileSync, rmSync } from "node:fs";
71
38
  import { tmpdir } from "node:os";
72
39
  import { join } from "node:path";
73
40
  import { spawnSync } from "node:child_process";
@@ -75,16 +42,11 @@ import { isProcessAlive } from "./attach-to-running-process.js";
75
42
  import { buildJvmAgentJar, buildAttacherClass, findToolsJarIfPresent } from "./jvm-agent/build.js";
76
43
  import { COLLECTOR_VERSION } from "./collector-version.js";
77
44
  /**
78
- * Reconstruct a repo-relative source path from a JVM frame's fully-qualified
79
- * declaring class name and basename, or `null` when it cannot be done
80
- * exactly the attach path's copy of
81
- * `jvm-stack-trace-parser.ts`'s `reconstructPath`; see this file's own
82
- * `AttachToRunningJvmProcessOptions.sourceRoots` doc for why it is a copy
83
- * rather than a shared import.
84
- *
85
- * Null in four cases, each a real one rather than a fallback: no source
86
- * roots declared, no basename, no package (a default-package class, where
87
- * `declaringType` has no dot), or no candidate that exists on disk.
45
+ * Reconstructs a repo-relative source path from a JVM frame's fully-qualified
46
+ * declaring class name and basename, or `null` when it can't be done exactly
47
+ * (no source roots, no basename, default-package class, or no candidate exists
48
+ * on disk). See `sourceRoots` doc above for why this duplicates
49
+ * `jvm-stack-trace-parser.ts`'s `reconstructPath` rather than importing it.
88
50
  */
89
51
  function reconstructJvmSourcePath(declaringType, file, sourceRoots) {
90
52
  if (sourceRoots === undefined || file === null)
@@ -108,35 +70,31 @@ function isUncaughtExceptionEvent(value) {
108
70
  function isFrameworkCaughtExceptionEvent(value) {
109
71
  return typeof value === "object" && value !== null && value.type === "framework-caught-exception";
110
72
  }
73
+ /** A-F8: target's writer thread confirming detach completed (see `Agent.java`'s `detach()`); `stop()`'s poll loop waits for this. */
74
+ function isAgentDetachedEvent(value) {
75
+ return typeof value === "object" && value !== null && value.type === "agent-detached";
76
+ }
77
+ /** A-F8: target's writer thread disclosing its bounded queue overflowed and events were dropped — never silent (honest-degradation rule). `count` is cumulative since `agentmain` last ran, not a per-tick delta. */
78
+ function isEventsDroppedEvent(value) {
79
+ const v = value;
80
+ return typeof value === "object" && value !== null && v.type === "events-dropped" && typeof v.count === "number";
81
+ }
111
82
  /**
112
- * `StackTraceElement.getFileName()` is always a BARE name `"ProbeApplication.java"`,
113
- * never `"probe/ProbeApplication.java"` — because the JVM never recorded a
114
- * package-relative path in the first place, only a plain source-file
115
- * attribute. Found while proving RT-201's graph correlation directly (this
116
- * collector's own pre-existing uncaught-exception path had never been
117
- * pushed through `resolveSymbolNode`, so this was never exercised): a bare
118
- * filename resolves nothing against a graph, whose nodes carry
119
- * `src/main/java/probe/ProbeApplication.java`-shaped repo-relative paths.
83
+ * `StackTraceElement.getFileName()` is always a bare name (`"ProbeApplication.java"`,
84
+ * never `"probe/ProbeApplication.java"`) — the JVM never records a package-relative
85
+ * path, only a plain source-file attribute, so it resolves nothing against a graph
86
+ * whose nodes carry repo-relative paths.
120
87
  *
121
- * `className` (the fully-qualified class name, always present) is what
122
- * recovers the missing directory the same information `logback-log-envelope.ts`'s
123
- * parser already uses on the log-tailing side, applied here for the attach
124
- * side, which had never needed it before this collector's evidence was
125
- * first asked to resolve against a graph. `className.split("$")[0]` drops
126
- * a nested/anonymous-class suffix (`Outer$Inner`, `Outer$1`) to recover the
127
- * OUTER class's package — nested classes are declared in their outer
128
- * class's own file, never their own. The result is package-*relative*, not
129
- * repo-relative — this is the fallback `frameToStackFrame` uses when
130
- * `reconstructJvmSourcePath` above cannot produce a validated repo-relative
131
- * path (no `sourceRoots` declared, or no candidate exists on disk); a
132
- * caller with no `sourceRoots` still gets a directory instead of a bare
133
- * basename, and can supply the rest via `resolveSymbolNode`'s own `cwd`
134
- * option, exactly as documented there.
88
+ * `className` (fully-qualified, always present) recovers the missing directory.
89
+ * `className.split("$")[0]` drops a nested/anonymous-class suffix (`Outer$Inner`,
90
+ * `Outer$1`) to recover the OUTER class's package nested classes live in their
91
+ * outer class's file. Result is package-relative, not repo-relative the fallback
92
+ * `frameToStackFrame` uses when `reconstructJvmSourcePath` can't produce a
93
+ * validated repo-relative path.
135
94
  *
136
- * Deliberately does NOT rename or reshape `frame.fileName` itself — Kotlin
137
- * breaks the "file name matches class name" assumption outright (a class
138
- * `Foo` may be declared in `Bar.kt`), so only the *directory* is derived
139
- * from the class name; the file's own name is always the runtime's, verbatim.
95
+ * Deliberately does NOT rename/reshape `frame.fileName` itself — Kotlin breaks the
96
+ * "file name matches class name" assumption (a class `Foo` may live in `Bar.kt`),
97
+ * so only the directory is derived from the class name.
140
98
  */
141
99
  function packageRelativeFile(frame) {
142
100
  if (frame.fileName === null)
@@ -155,27 +113,46 @@ function frameToStackFrame(frame, sourceRoots) {
155
113
  line: frame.lineNumber > 0 ? frame.lineNumber : null,
156
114
  column: null,
157
115
  functionName: `${frame.className}.${frame.methodName}`,
158
- // Self-contained: `StackTraceElement` is the JVM's own reported state,
159
- // captured live off the running process never a side artifact this
160
- // collector resolved through, the same standing CDP's call frames get
161
- // in the Node slice.
116
+ // self-contained: the JVM's own reported state, captured live, never a
117
+ // side artifact resolved through -- same standing as CDP's frames
162
118
  reliability: "self-contained",
163
119
  resolvedVia: null,
164
120
  },
165
121
  raw: `${frame.className}.${frame.methodName}(${frame.fileName ?? "unknown"}:${String(frame.lineNumber)})`,
166
122
  };
167
123
  }
124
+ /**
125
+ * A-F10: a lighter check than the Node sibling's, deliberately — HotSpot's own
126
+ * Dynamic Attach already enforces same-uid at the OS level (`VirtualMachine.attach`
127
+ * fails for a different-user pid regardless). What's NOT already enforced is "this
128
+ * pid actually looks like a JVM" — attaching against a non-JVM same-user pid
129
+ * wastes a real attempt for a confusing downstream failure instead of a clear
130
+ * refusal here. `ps`, not `/proc`, for the same Linux/macOS portability reason.
131
+ */
132
+ function verifyLikelyJvmProcess(pid) {
133
+ const result = spawnSync("ps", ["-o", "comm=", "-p", String(pid)], { encoding: "utf8" });
134
+ const comm = (result.stdout ?? "").trim().split("\n")[0]?.trim().toLowerCase();
135
+ if (result.status !== 0 || comm === undefined || comm === "") {
136
+ return { ok: false, reason: `could not verify pid ${String(pid)}'s command via ps (exit ${String(result.status)}) — refusing to attempt a JVM attach against a process this module cannot confirm the identity of` };
137
+ }
138
+ // covers "java", "javaw", and "java (someapp)" truncation -- allowlists the
139
+ // launcher, never app names
140
+ if (!comm.includes("java")) {
141
+ return { ok: false, reason: `pid ${String(pid)}'s command is "${comm}", which does not look like a JVM — refusing to attempt a Dynamic Attach against a process that is unlikely to have one` };
142
+ }
143
+ return { ok: true };
144
+ }
168
145
  function notThisCollectorsJob(what) {
169
146
  return { availability: "unavailable", reason: `attachToRunningJvmProcess observes only genuinely uncaught JVM exceptions via a loaded agent's default handler, not ${what}.` };
170
147
  }
148
+ /** A-F8: the sentinel `agentmain` argument that means "detach, do not install" — must match `Agent.java`'s own `DETACH_COMMAND` exactly. */
149
+ const DETACH_COMMAND = "DETACH";
171
150
  const CAPABILITIES = {
172
151
  domObservation: notThisCollectorsJob("DOM inspection"),
173
152
  consoleObservation: notThisCollectorsJob("a browser page's console"),
174
153
  networkObservation: notThisCollectorsJob("network traffic"),
175
- // Deliberately unavailable, unlike the Node slice this module does not
176
- // intercept System.out/err; that is attachToRunningProcess's job for a
177
- // target already logging to a file, and duplicating it here would be two
178
- // mechanisms claiming the same evidence.
154
+ // unavailable unlike the Node slice: doesn't intercept System.out/err, that's
155
+ // attachToRunningProcess's job for a target logging to a file
179
156
  backendLogAccess: notThisCollectorsJob("console/log output — see attachToRunningProcess for a target logging to a file"),
180
157
  distributedTrace: notThisCollectorsJob("trace-id/request-id correlation — the loaded agent extracts none"),
181
158
  sourceMapping: { availability: "available", reason: null },
@@ -222,15 +199,52 @@ function runAttacher(pid, agentJarPath, outputFilePath, attacherDir, attachTimeo
222
199
  */
223
200
  export function attachToRunningJvmProcess(options) {
224
201
  let stopped = false;
202
+ // A-F8: set once start() actually attaches -- stop() uses this to know whether
203
+ // there's anything to detach, and null means stop() is a pure no-op
204
+ let attached = null;
205
+ // captured so stop() can disclose a detach failure through the same evidence
206
+ // stream start()'s poll loop uses
207
+ let capturedContext = null;
208
+ let detachConfirmed = false;
209
+ function emitCollectorError(reason) {
210
+ const context = capturedContext;
211
+ if (context === null)
212
+ return; // start() never ran far enough to have one
213
+ context.emit({
214
+ timestamp: new Date().toISOString(),
215
+ source: "backend-process",
216
+ service: options.service ?? null,
217
+ process: options.processId,
218
+ eventType: "COLLECTOR_ERROR",
219
+ payload: { raw: reason, collectorId: `attach-jvm-agent:${options.processId}`, error: reason },
220
+ traceId: null,
221
+ requestId: null,
222
+ correlationId: null,
223
+ graphNodeId: null,
224
+ sourceLocation: null,
225
+ stackTrace: null,
226
+ confidence: 1,
227
+ redactionStatus: "pending-redaction",
228
+ collectorVersion: COLLECTOR_VERSION,
229
+ });
230
+ }
225
231
  return {
226
232
  collectorId: `attach-jvm-agent:${options.processId}`,
227
233
  async start(context) {
234
+ capturedContext = context;
228
235
  if (!isProcessAlive(options.pid)) {
229
236
  return { available: false, reason: `attachToRunningJvmProcess: pid ${String(options.pid)} is not running — cannot attach to a target that does not exist.` };
230
237
  }
231
238
  if (process.platform === "win32") {
232
239
  return { available: false, reason: "attachToRunningJvmProcess: HotSpot Dynamic Attach as used here relies on a Unix domain socket; not available on win32." };
233
240
  }
241
+ // A-F10: checked before spawning the Attacher helper, not after —
242
+ // see verifyLikelyJvmProcess's own doc for why this is a lighter check
243
+ // than the Node sibling's (the OS already enforces same-uid here).
244
+ const identity = verifyLikelyJvmProcess(options.pid);
245
+ if (!identity.ok) {
246
+ return { available: false, reason: `attachToRunningJvmProcess: ${identity.reason}.` };
247
+ }
234
248
  let agentJarPath;
235
249
  let attacherDir;
236
250
  try {
@@ -243,10 +257,15 @@ export function attachToRunningJvmProcess(options) {
243
257
  const dir = mkdtempSync(join(tmpdir(), "descry-jvm-attach-"));
244
258
  const outFile = join(dir, "events.log");
245
259
  writeFileSync(outFile, "");
246
- const attached = runAttacher(options.pid, agentJarPath, outFile, attacherDir, options.attachTimeoutMs ?? 10_000);
247
- if (!attached.ok) {
248
- return { available: false, reason: attached.reason };
260
+ const attachTimeoutMs = options.attachTimeoutMs ?? 10_000;
261
+ const attachResult = runAttacher(options.pid, agentJarPath, outFile, attacherDir, attachTimeoutMs);
262
+ if (!attachResult.ok) {
263
+ return { available: false, reason: attachResult.reason };
249
264
  }
265
+ // A-F8: recorded so stop() can run the same Attacher helper a second
266
+ // time with DETACH_COMMAND, and know which output file to watch for
267
+ // confirmation.
268
+ attached = { agentJarPath, attacherDir, outFile, dir, attachTimeoutMs };
250
269
  const pollIntervalMs = options.pollIntervalMs ?? 50;
251
270
  let consumed = 0;
252
271
  const poll = async () => {
@@ -270,14 +289,10 @@ export function attachToRunningJvmProcess(options) {
270
289
  parsed = JSON.parse(line);
271
290
  }
272
291
  catch {
273
- // A partially-flushed line read mid-write will be
274
- // re-attempted whole once the writer finishes, since
275
- // `consumed` only advances past what was actually parsed
276
- // here... except it already advanced past this chunk. In
277
- // practice this cannot happen: Agent.java opens, writes one
278
- // full line, and closes the file per event (see its own
279
- // module doc), so a poll tick never observes a half-written
280
- // line. Dropped rather than guessed at if it ever does.
292
+ // in practice cannot happen: Agent.java opens, writes one full
293
+ // line, and closes the file per event, so a poll tick never
294
+ // observes a half-written line. Dropped rather than guessed at
295
+ // if it ever does.
281
296
  continue;
282
297
  }
283
298
  if (isUncaughtExceptionEvent(parsed) || isFrameworkCaughtExceptionEvent(parsed)) {
@@ -291,16 +306,10 @@ export function attachToRunningJvmProcess(options) {
291
306
  service: options.service ?? null,
292
307
  process: options.processId,
293
308
  eventType: "EXCEPTION",
294
- // `handled` distinguishes the two channels within the same
295
- // `RuntimeEventType` rather than adding a new event type to
296
- // that closed vocabulary (see `runtime-event.ts`'s own "the
297
- // graph vocabulary is frozen; this one is not" — still, a
298
- // new *member* is a deliberate, reviewed change, not one to
299
- // make for a single collector's internal distinction) —
300
- // `true` for RT-201's DispatcherServlet advice tap, `false`
301
- // for a genuinely uncaught exception nothing in the JVM
302
- // ever caught. Additive: existing consumers reading only
303
- // `.message`/`.stack` off this payload are unaffected.
309
+ // `handled` distinguishes the two channels within one event type
310
+ // rather than adding a new member to a closed vocabulary -- true
311
+ // for RT-201's DispatcherServlet tap, false for genuinely
312
+ // uncaught. Additive: existing .message/.stack consumers unaffected.
304
313
  payload: { message: `${parsed.exceptionClass}: ${parsed.message ?? ""}`.trim(), stack: null, handled: parsed.type === "framework-caught-exception" },
305
314
  traceId: null,
306
315
  requestId: null,
@@ -313,11 +322,23 @@ export function attachToRunningJvmProcess(options) {
313
322
  collectorVersion: COLLECTOR_VERSION,
314
323
  });
315
324
  }
325
+ else if (isAgentDetachedEvent(parsed)) {
326
+ // A-F8: unblocks stop()'s wait loop -- internal bookkeeping, not
327
+ // something observed about the target
328
+ detachConfirmed = true;
329
+ }
330
+ else if (isEventsDroppedEvent(parsed)) {
331
+ // A-F8: the target's bounded queue overflowed, real evidence was
332
+ // lost -- disclosed, not silent. De-duplicated on the Java side
333
+ // (marker written only when the count changes).
334
+ emitCollectorError(`attachToRunningJvmProcess: the target's own event queue has dropped ${String(parsed.count)} event(s) so far (queue capacity exceeded) — some EXCEPTION evidence from this process was never captured.`);
335
+ }
316
336
  // "agent-loaded", "framework-instrumentation-installed",
317
- // "framework-instrumentation-unavailable", and any future
318
- // marker type: acknowledged by being parsed, not turned into
319
- // evidence internal bookkeeping, not something observed
320
- // about the target.
337
+ // "framework-instrumentation-unavailable", "detach-started",
338
+ // "detach-uncaught-handler-restored" / "-restore-failed",
339
+ // "detach-transformer-reset" / "-incomplete" / "-failed", and
340
+ // any future purely-internal marker type: acknowledged by
341
+ // being parsed, not turned into evidence.
321
342
  }
322
343
  }
323
344
  await new Promise((resolve) => setTimeout(resolve, pollIntervalMs));
@@ -326,9 +347,58 @@ export function attachToRunningJvmProcess(options) {
326
347
  void poll();
327
348
  return { available: true };
328
349
  },
329
- stop() {
330
- stopped = true;
331
- return Promise.resolve();
350
+ /**
351
+ * A-F8: a real detach, not just halting this module's own poller. Runs the
352
+ * Attacher helper again with `DETACH_COMMAND`, which drives `Agent.java`'s own
353
+ * `detach()` — restoring the JVM's prior default uncaught-exception handler
354
+ * and calling ByteBuddy's `reset()` to remove the `DispatcherServlet`
355
+ * transformer — because leaving either installed for the rest of the target's
356
+ * life is exactly the kind of state a "detach" must not leave behind.
357
+ *
358
+ * `stopped` is deliberately NOT set until after detach is attempted and
359
+ * (bounded) awaited: `poll()` checks `stopped` first on every tick, so setting
360
+ * it early would stop this module from ever reading the target's own
361
+ * "agent-detached" confirmation line.
362
+ *
363
+ * Where a JVM limitation makes true removal impossible, this discloses it via
364
+ * `COLLECTOR_ERROR` rather than pretending `stop()` stopped it. Two disclosed
365
+ * failure shapes: the Attacher helper itself couldn't run (target unreachable,
366
+ * permission denied), or it ran but the writer thread never confirmed detach
367
+ * within the timeout (target under load, or the JVM's own handler/transformer
368
+ * restoration genuinely failed inside `detach()` — narrower diagnostic detail
369
+ * then only visible in the raw output file).
370
+ *
371
+ * A target that has already exited needs no detach — silently a no-op, not a
372
+ * disclosed failure.
373
+ */
374
+ async stop() {
375
+ const state = attached;
376
+ if (state === null) {
377
+ stopped = true;
378
+ return;
379
+ }
380
+ if (isProcessAlive(options.pid)) {
381
+ const detachAttempt = runAttacher(options.pid, state.agentJarPath, DETACH_COMMAND, state.attacherDir, state.attachTimeoutMs);
382
+ if (detachAttempt.ok) {
383
+ const deadline = Date.now() + Math.min(state.attachTimeoutMs, 5000);
384
+ while (!detachConfirmed && Date.now() < deadline) {
385
+ await new Promise((resolve) => setTimeout(resolve, 25));
386
+ }
387
+ if (!detachConfirmed) {
388
+ emitCollectorError(`attachToRunningJvmProcess: detach was requested but never confirmed by the target within the timeout — its default uncaught-exception handler and DispatcherServlet instrumentation (if installed) may remain in place until the target process itself exits.`);
389
+ }
390
+ }
391
+ else {
392
+ emitCollectorError(`attachToRunningJvmProcess: detach could not be attempted (${detachAttempt.reason}) — the target's default uncaught-exception handler and DispatcherServlet instrumentation (if installed) remain in place until the target process itself exits.`);
393
+ }
394
+ }
395
+ stopped = true; // safe now: any detach confirmation has already been drained by poll().
396
+ try {
397
+ rmSync(state.dir, { recursive: true, force: true });
398
+ }
399
+ catch {
400
+ // best-effort cleanup; not worth failing stop() over a leftover temp dir
401
+ }
332
402
  },
333
403
  capabilities() {
334
404
  return CAPABILITIES;
@@ -1 +1 @@
1
- {"version":3,"file":"attach-to-running-jvm-process.js","sourceRoot":"","sources":["../src/attach-to-running-jvm-process.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AAEH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/E,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAI/C,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AACnG,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAwD3D;;;;;;;;;;;GAWG;AACH,SAAS,wBAAwB,CAC/B,aAAqB,EACrB,IAAmB,EACnB,WAA4D;IAE5D,IAAI,WAAW,KAAK,SAAS,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC5D,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,IAA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xD,yDAAyD;oCACzD,uDAAuD;oCACvD,OAAO,EAAE,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC,cAAc,KAAK,MAAM,CAAC,OAAO,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,IAAI,KAAK,4BAA4B,EAAE;oCACpJ,OAAO,EAAE,IAAI;oCACb,SAAS,EAAE,IAAI;oCACf,aAAa,EAAE,IAAI;oCACnB,WAAW,EAAE,IAAI;oCACjB,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,QAAQ,IAAI,IAAI;oCAC3C,UAAU,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI;oCACjD,UAAU,EAAE,CAAC;oCACb,eAAe,EAAE,mBAAmB;oCACpC,gBAAgB,EAAE,iBAAiB;iCACpC,CAAC,CAAC;4BACL,CAAC;4BACD,yDAAyD;4BACzD,0DAA0D;4BAC1D,6DAA6D;4BAC7D,0DAA0D;4BAC1D,oBAAoB;wBACtB,CAAC;oBACH,CAAC;oBACD,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC;gBACtE,CAAC;YACH,CAAC,CAAC;YACF,KAAK,IAAI,EAAE,CAAC;YAEZ,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAC7B,CAAC;QAED,IAAI;YACF,OAAO,GAAG,IAAI,CAAC;YACf,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;QAC3B,CAAC;QAED,YAAY;YACV,OAAO,YAAY,CAAC;QACtB,CAAC;KACF,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"attach-to-running-jvm-process.js","sourceRoot":"","sources":["../src/attach-to-running-jvm-process.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;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