Commit facd7c8
Copilot CLI
feat(lmtool): wire diagnostic context, retry attribution, and bump timeouts
Consumes the new telemetry contracts from the previous commit and threads them
through all 10 LMT invoke handlers. Also tunes the two session-wait thresholds
to cover the Started P95 latency observed in 30d telemetry.
Timeout tuning (driven by 30d Started latency: P50=12s / P90=67s / P95=100s):
SESSION_WAIT_TIMEOUT: 45000 -> 120000 (eventBased path, waitForSession=true)
SMART_POLLING_MAX_WAIT: 15000 -> 90000 (default polling path)
Previous values clipped ~10 percent of legitimate slow starts as timeouts and
biased the two strategies against each other. Aligning at 120s/90s also lets
us cleanly compare cross-strategy success rates.
Per-tool context fields (added to all 10 recordToolInvocation call sites):
os / javaMajorVersion: from getOs() / getJavaMajorVersion()
getJavaMajorVersion probes the redhat.java extension API (cached),
falls back to JAVA_VERSION env var, then 'unknown'.
classifyJavaMajorVersion handles legacy '1.8.0_xxx' -> '8' and modern '21.0.1' -> '21'.
retryCount / previousOutcome: from nextAttempt() / completeAttempt()
Per-window, per-tool counter. Used to test the LM auto-retry-pays-off pattern.
debug_java_application handler:
Wraps the entire invoke in a beginDebugSessionInvocation() guard so even
infinite hangs leave a sentinel + silentReturn trail. This is the closed-loop
half of the 32.8 percent silent-loss bucket detected by D2 in the deep-dive.
classNameDetection rewrite:
findFullyQualifiedClassName() now returns { className, failureReason, strategy }
instead of string|null. The failure branch emits the new classNameDetection.failed
event with structured strategy + failureReason so we can distinguish
sourceDirMissing / fileNotFound / parseError / noPackageDeclaration — the
previous boolean detected:false collapsed all four causes.
Timeout / Started events:
debugSessionStarted.eventBased + debugSessionTimeout.eventBased +
debugSessionTimeout.smartPolling now carry elapsedMs + thresholdMs so we can
histogram the Started/Timeout latency distribution and verify the threshold
bump moves the right mass.
Compiles clean (tsc --noEmit) and passes tslint.1 parent 94ab134 commit facd7c8
1 file changed
Lines changed: 234 additions & 20 deletions
0 commit comments