@merittdev/horus 0.8.5 → 0.8.6
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.
- package/dist/index.cjs +26 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -65880,7 +65880,7 @@ init_cjs_shims();
|
|
|
65880
65880
|
|
|
65881
65881
|
// ../../packages/core/src/version.ts
|
|
65882
65882
|
init_cjs_shims();
|
|
65883
|
-
var HORUS_VERSION = true ? "0.8.
|
|
65883
|
+
var HORUS_VERSION = true ? "0.8.6" : "dev";
|
|
65884
65884
|
var PINNED_SOURCE_VERSION = "1.5.0";
|
|
65885
65885
|
|
|
65886
65886
|
// ../../packages/core/src/evidence.ts
|
|
@@ -92471,10 +92471,21 @@ function looksDiffable(since) {
|
|
|
92471
92471
|
function looksExplanatory(hint) {
|
|
92472
92472
|
const h3 = hint.trim();
|
|
92473
92473
|
if (h3.length === 0) return false;
|
|
92474
|
+
if (/^\s*(explain|describe|walk\s+me\s+through|tell\s+me\s+(?:about|how))\b/i.test(h3)) {
|
|
92475
|
+
return true;
|
|
92476
|
+
}
|
|
92477
|
+
if (/\b(recently\s+changed|what\s+changed|changed\s+recently|regress|regression)\b/i.test(h3)) {
|
|
92478
|
+
return false;
|
|
92479
|
+
}
|
|
92474
92480
|
if (/\b(how|what|why|when|where)\b.*\b(work|works|working|do|does|done|happen|happens|flow|flows|behave|called|invoked|triggered|used)\b/i.test(h3)) {
|
|
92475
92481
|
return true;
|
|
92476
92482
|
}
|
|
92477
|
-
if (
|
|
92483
|
+
if (/\b(fail|fails|failed|failing|failure|break|breaks|breaking|broke|broken|crash|crashes|crashing|down|slow|stuck|hang|hangs|hung|timeout|timing\s*out|wrong|exception|error|errors|leak|leaking|stopped|throwing|throws|reject|rejected|denied|not\s+work|doesn'?t\s+work|isn'?t\s+work|can'?t|cannot|caus(?:e|es|ing)|misbehav)/i.test(
|
|
92484
|
+
h3
|
|
92485
|
+
)) {
|
|
92486
|
+
return false;
|
|
92487
|
+
}
|
|
92488
|
+
if (/^\s*(how|what|why|when|where)\b/i.test(h3)) {
|
|
92478
92489
|
return true;
|
|
92479
92490
|
}
|
|
92480
92491
|
return false;
|
|
@@ -92980,9 +92991,19 @@ async function investigate(input, deps) {
|
|
|
92980
92991
|
const GAP_D_MAX_RESOLVE = 12;
|
|
92981
92992
|
const seedScope = /* @__PURE__ */ new Set([top.id, ...(ctx?.callees ?? []).map((c4) => c4.id)]);
|
|
92982
92993
|
const alreadyEmitted = new Set(seedEmittedJoins.map((j3) => j3.code));
|
|
92983
|
-
const
|
|
92994
|
+
const eligible = analysis.signatures.filter(
|
|
92984
92995
|
(s5) => s5.key !== "" && s5.key !== "(none)" && s5.count > 0 && !alreadyEmitted.has(s5.key)
|
|
92985
|
-
)
|
|
92996
|
+
);
|
|
92997
|
+
const meaningful = meaningfulHintTokens.filter((t2) => t2.length >= 4);
|
|
92998
|
+
const hintRelevant = (s5) => meaningful.some(
|
|
92999
|
+
(t2) => s5.key.toLowerCase().includes(t2) || (s5.sampleMessage ?? "").toLowerCase().includes(t2)
|
|
93000
|
+
);
|
|
93001
|
+
const candidates = [
|
|
93002
|
+
.../* @__PURE__ */ new Set([
|
|
93003
|
+
...[...eligible].sort((a2, b5) => b5.count - a2.count).slice(0, GAP_D_MAX_RESOLVE),
|
|
93004
|
+
...eligible.filter(hintRelevant).slice(0, GAP_D_MAX_RESOLVE)
|
|
93005
|
+
])
|
|
93006
|
+
].slice(0, GAP_D_MAX_RESOLVE * 2);
|
|
92986
93007
|
for (const sig of candidates) {
|
|
92987
93008
|
let raiser;
|
|
92988
93009
|
try {
|
|
@@ -93785,7 +93806,7 @@ async function investigate(input, deps) {
|
|
|
93785
93806
|
const seedDisclaimer = seedIsLowConfidence && top ? `\u26A0 No symbol closely matched "${hint}" \u2014 "${top.name}" is a low-confidence closest match (semantic). Refine with an exact symbol or error code to target precisely. ` : "";
|
|
93786
93807
|
let summary = headlineCause ? headlineLinked ? `${seedDisclaimer}${banner2}Investigation of "${hint}" ${scope}. Top suspected cause: ${headlineCause.title}.` : `${seedDisclaimer}${banner2}Investigation of "${hint}" ${scope}. No cause is structurally linked to the seed; the strongest co-occurring signal (a lead to verify, not a diagnosis) is: ${headlineCause.title}.` : `${seedDisclaimer}${banner2}Investigation of "${hint}" ${scope}. No dominant suspected cause emerged from the available ${degradedNoSource ? "runtime" : "structural"} evidence.`;
|
|
93787
93808
|
const hasIncidentSignal = directLogEvIds.length > 0 || latencyMetricEvIds.length > 0 || queueMetricEvIds.length > 0 || dataAnomalyEvIds.length > 0 || queueFailureSignals.length > 0 || findings2.some((f5) => f5.kind === "anomaly") || headlineCause !== void 0;
|
|
93788
|
-
const explanatoryHint = looksExplanatory(hint);
|
|
93809
|
+
const explanatoryHint = looksExplanatory(hint) && input.since === void 0;
|
|
93789
93810
|
let behavioral;
|
|
93790
93811
|
if (explanatoryHint) {
|
|
93791
93812
|
let flowPool = flows;
|