querysub 0.388.0 → 0.390.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "querysub",
3
- "version": "0.388.0",
3
+ "version": "0.390.0",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "note1": "note on node-forge fork, see https://github.com/digitalbazaar/forge/issues/744 for details",
@@ -203,6 +203,8 @@ Please provide a SHORT search string that would match this type of error. The st
203
203
 
204
204
  DO NOT include variables. If something is some dynamic path that includes numbers, etc., definitely do not include that in the match pattern. That is a very, very bad match pattern.
205
205
 
206
+ The string must be exactly included. You can't stitch together pieces, it will be checked for with .includes() in javascript.
207
+
206
208
  Respond with a JSON object with a "pattern" field containing the search string.`;
207
209
 
208
210
  const response = await callOpenRouterJSON<PatternResponse>(openRouterAPIKey, prompt);
@@ -320,41 +322,40 @@ export async function exposeErrorWatchService() {
320
322
  suppressed = true;
321
323
  }
322
324
  }
325
+ //console.log(`Watch loop received error, ${suppressed ? "suppressed" : "not suppressed"}, matched suppression id: ${matchedSuppressionId}: ${error.param0}`);
323
326
 
324
- console.log(`Watch loop received error, ${suppressed ? "suppressed" : "not suppressed"}, matched suppression id: ${matchedSuppressionId}: ${error.param0}`);
327
+ if (suppressed) continue;
325
328
 
326
- if (suppressed && matchedSuppressionId) {
327
- queueDiscordNotification(matchedSuppressionId, 1, false);
328
- } else if (!suppressed) {
329
- if (unmatchedErrors.length > unmatchedIndex) {
330
- unmatchedErrors[unmatchedIndex] = error;
331
- unmatchedIndex = (unmatchedIndex + 1) % MAX_UNMATCHED;
332
- } else {
333
- unmatchedErrors.push(error);
334
- }
329
+ if (unmatchedErrors.length > unmatchedIndex) {
330
+ unmatchedErrors[unmatchedIndex] = error;
331
+ unmatchedIndex = (unmatchedIndex + 1) % MAX_UNMATCHED;
332
+ } else {
333
+ unmatchedErrors.push(error);
334
+ }
335
335
 
336
- if (!matchedSuppressionId) {
337
- const pattern = await generatePatternForError(error);
338
- if (pattern) {
339
- const newEntry: SuppressionEntry = {
340
- id: nextId(),
341
- pattern,
342
- timeout: 0,
343
- createdTime: Date.now(),
344
- lastUpdatedTime: Date.now(),
345
- };
346
-
347
- suppressionCache.push(newEntry);
348
- void suppression.set(newEntry.id, newEntry);
349
- applySuppression(error, newEntry);
350
- queueDiscordNotification(newEntry.id, 1, true);
351
-
352
- void ErrorNotificationService.triggerSuppressionUpdate(newEntry.id);
353
- }
336
+ if (!matchedSuppressionId) {
337
+ const pattern = await generatePatternForError(error);
338
+ if (pattern) {
339
+ const newEntry: SuppressionEntry = {
340
+ id: nextId(),
341
+ pattern,
342
+ timeout: 0,
343
+ createdTime: Date.now(),
344
+ lastUpdatedTime: Date.now(),
345
+ };
346
+
347
+ suppressionCache.push(newEntry);
348
+ void suppression.set(newEntry.id, newEntry);
349
+ applySuppression(error, newEntry);
350
+ queueDiscordNotification(newEntry.id, 1, true);
351
+
352
+ void ErrorNotificationService.triggerSuppressionUpdate(newEntry.id);
354
353
  }
355
-
356
- void ErrorNotificationService.triggerUnmatchedError(error);
354
+ } else {
355
+ queueDiscordNotification(matchedSuppressionId, 1, false);
357
356
  }
357
+
358
+ void ErrorNotificationService.triggerUnmatchedError(error);
358
359
  } catch (error) {
359
360
  console.warn("Error in watch loop:", error);
360
361
  }
@@ -23,9 +23,7 @@ IMPORTANT! Now I am properly calling shutdown, so none of the streamed logs shou
23
23
  //todonext
24
24
 
25
25
 
26
- 2) One of the cyoa instances... does not exist? I think the tmux screen might be in a bad state?
27
- - Maybe... our collection has... duplicates, and/or, references something broken? Because... tmux ls looks fine to me...
28
- - In the deployed machines list, we should really show the screen name. Don't we know the screen name? Isn't that the only way we know it's deployed to that machine?
26
+
29
27
  3) "guessed node id" is never working? At least, on the machine's page it is ALWAYS empty, even though it should be almost always detected...
30
28
 
31
29
  4) Verify it works again, when we have multiple servers