Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Java/Openclaw/extensions/qa-lab/src/   (KI Agentensystem Version 22©)  Datei vom 26.3.2026 mit Größe 2 kB image not shown  

Quelle  reply-failure.test.ts

  Sprache: JAVA
 

Spracherkennung für: .ts vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

import { describe, expect, it } from "vitest";
import { extractQaFailureReplyText, extractQaVisibleReplyLeakText } from "./reply-failure.js";

describe("extractQaFailureReplyText", () => {
  it("returns undefined for normal assistant replies", () => {
    expect(
      extractQaFailureReplyText("Yes, precious. The build is green and a little cursed."),
    ).toBe(undefined);
  });

  it("classifies the generic external fallback reply as a failure", () => {
    expect(
      extractQaFailureReplyText(
        "⚠️ Something went wrong while processing your request. Please try again, or use /new to start a fresh session.",
      ),
    ).toContain("Something went wrong while processing your request.");
  });

  it("classifies explicit provider auth guidance as a failure", () => {
    expect(
      extractQaFailureReplyText(
        '⚠️ No API key found for provider "openai". You are authenticated with OpenAI Codex OAuth. Use openai/gpt-5.5 with the Codex OAuth profile, or set OPENAI_API_KEY for direct OpenAI API access.',
      ),
    ).toContain('No API key found for provider "openai".');
  });

  it("classifies curated missing-key guidance as a failure", () => {
    expect(
      extractQaFailureReplyText(
        "⚠️ Missing API key for OpenAI on the gateway. Use `openai/gpt-5.5` with the Codex OAuth profile, or set `OPENAI_API_KEY`, then try again.",
      ),
    ).toContain("Missing API key for OpenAI on the gateway.");
  });

  it("classifies leaked codex harness coordination chatter as a failure", () => {
    expect(
      extractQaFailureReplyText("checking thread context; then post a tight progress reply here."),
    ).toContain("checking thread context");
  });
});

describe("extractQaVisibleReplyLeakText", () => {
  it("returns undefined for normal visible replies", () => {
    expect(extractQaVisibleReplyLeakText("QA_LEAK_OK")).toBe(undefined);
  });

  it("detects coordination-nudge leak text", () => {
    expect(
      extractQaVisibleReplyLeakText(
        "thread context thin; posting a coordination nudge, not inventing status.",
      ),
    ).toContain("thread context thin");
  });
});

¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet am  2026-04-27) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.