jevrecipes

Recipe catalog / issue-recurrence

Check whether an issue returned

issue-recurrence is a Jev recipe from the jev-recipes TypeScript package. Label a reported issue as new, ongoing without resolution, or returned after reported recovery. Use it when you need to distinguish a new problem, one that never stopped, and an issue that came back after recovery.

Last updated .

Explore this recipe interactively · Source and implementation guide · Markdown version

How do I use issue-recurrence in TypeScript?

Install with npm install jev-recipes. Requires Node.js 22.9 or newer and ES modules. Set TYPESAFE_API_KEY in your server environment for live calls, which send input to TypeSafe and use API quota. See the installation guide.

import { issueRecurrence } from 'jev-recipes/issue-recurrence';

const result = await issueRecurrence({
  "issue": "CSV export fails with error E42.",
  "message": "The same E42 error is back when I export a CSV.",
  "history": "Monday, customer: CSV exports fail with E42. Tuesday, customer: CSV exports work again; E42 is gone."
});
console.log(result);

What input does issue-recurrence take?

FieldTypeNeeded
issuestringRequired
messagestringRequired
historystringOptional
minConfidencenumberOptional
Full input and result schemas
{
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "issue": {
        "type": "string",
        "description": "One specific problem whose reported recurrence should be assessed."
      },
      "message": {
        "type": "string",
        "description": "The latest customer report about the issue."
      },
      "history": {
        "type": "string",
        "description": "Earlier reports in chronological order, oldest first, with speaker identities and reported outcomes."
      },
      "minConfidence": {
        "type": "number",
        "minimum": 0,
        "maximum": 1
      }
    },
    "required": [
      "issue",
      "message"
    ]
  },
  "result": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "model": {
        "type": "string"
      },
      "usage": {
        "type": "object",
        "properties": {
          "input_tokens": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "output_tokens": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "input_tokens",
          "output_tokens"
        ],
        "additionalProperties": false
      },
      "status": {
        "type": "string",
        "enum": [
          "ready",
          "review"
        ]
      },
      "verdict": {
        "type": "string",
        "enum": [
          "new",
          "ongoing",
          "returned",
          "unclear"
        ]
      },
      "confidence": {
        "type": "number",
        "minimum": 0,
        "maximum": 1
      },
      "probabilities": {
        "type": "object",
        "propertyNames": {
          "type": "string",
          "enum": [
            "new",
            "ongoing",
            "returned",
            "unclear"
          ]
        },
        "additionalProperties": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "required": [
          "new",
          "ongoing",
          "returned",
          "unclear"
        ]
      }
    },
    "required": [
      "model",
      "usage",
      "status",
      "verdict",
      "confidence",
      "probabilities"
    ],
    "additionalProperties": false
  }
}

What does a issue-recurrence result look like?

This hand-authored response demonstrates the contract. It is not a model accuracy measurement. Run it without an API key: npx jev-recipes demo issue-recurrence.

{
  "model": "demo-fixture",
  "usage": {
    "input_tokens": 0,
    "output_tokens": 0
  },
  "status": "ready",
  "verdict": "returned",
  "confidence": 0.97,
  "probabilities": {
    "new": 0.01,
    "ongoing": 0.01,
    "returned": 0.97,
    "unclear": 0.01
  }
}

Input

Supply one issue and the latest customer message. Optional history contains earlier reports, oldest first, with speaker identities and reported outcomes. A timeline already present in the latest message can be sufficient; empty history never establishes a first occurrence.

All supplied text must be non-empty. minConfidence defaults to 0.8 and accepts values from 0 to 1. See shared options and behavior for client configuration, validation, and errors.

Result

Verdict Meaning
new The customer explicitly reports a first occurrence, without conflicting history.
ongoing The customer reports that the issue persists and never recovered.
returned The same issue is active again after explicit customer-reported recovery.
unclear The supplied reports cannot establish one state, concern a different issue, or do not report a current problem.

The result has status: 'ready' when confidence meets minConfidence and the verdict is not unclear. Otherwise it has status: 'review'. An unclear verdict always requires review, even at full confidence and a zero threshold. ready describes the report classification, not verified system health.

Decision boundaries

These cases document the intended policy, not measured model accuracy. Each concerns the same supplied CSV export error unless stated otherwise.

Supplied reports Intended verdict
Latest: "This is the first time CSV export has failed." No conflicting history. new
Latest: "CSV export is failing." No history. unclear
Latest: "It still fails. Export has never worked since I reported it." ongoing
Earlier customer: "Exports work again." Latest: "The same error is back." returned
Latest: "It worked yesterday after the failure, but the same error is back today." returned
Latest: "It failed again." No evidence of intervening recovery. unclear
Earlier support agent: "We deployed a fix." Latest customer: "It still fails and never stopped." ongoing
Earlier ticket status: closed. Latest: "The error is back." No customer-reported recovery. unclear
Earlier customer: "Works now." Latest: "I was mistaken; it never stopped failing." ongoing
Latest: "First time this happened." History reports earlier occurrences with no correction. unclear
Latest: "Export is working now." No current problem is reported. unclear
Export previously recovered; the latest report concerns a login error. unclear

Reuse

Use this when deciding how to describe a customer's current issue in a support workflow. Your application can treat an unresolved issue differently from one that returned after apparent recovery.

Use resolution-check when the question is whether the latest message reports resolution. Use ticket-match to compare two reports before assuming they concern the same issue.

Uses the shared choice helper and makes one logical Jev request. It does not fetch ticket history, call another recipe, reopen tickets, or execute troubleshooting steps.

Limits

How accurate is issue-recurrence?

Fixture only

No verified live accuracy measurement is available. Evaluate representative cases before using this decision in your workflow.

Use the evaluation guide to measure this decision on your own labeled cases.

What are the limits of issue-recurrence?