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

Quelle  bootstrap-mode.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 { resolveBootstrapMode } from "./bootstrap-mode.js";

describe("resolveBootstrapMode", () => {
  it("returns none when bootstrap is not pending", () => {
    expect(
      resolveBootstrapMode({
        bootstrapPending: false,
        runKind: "default",
        isInteractiveUserFacing: true,
        isPrimaryRun: true,
        isCanonicalWorkspace: true,
        hasBootstrapFileAccess: true,
      }),
    ).toBe("none");
  });

  it("returns full for primary interactive canonical runs with file access", () => {
    expect(
      resolveBootstrapMode({
        bootstrapPending: true,
        runKind: "default",
        isInteractiveUserFacing: true,
        isPrimaryRun: true,
        isCanonicalWorkspace: true,
        hasBootstrapFileAccess: true,
      }),
    ).toBe("full");
  });

  it("returns limited for primary interactive copied-sandbox runs with file access", () => {
    expect(
      resolveBootstrapMode({
        bootstrapPending: true,
        runKind: "default",
        isInteractiveUserFacing: true,
        isPrimaryRun: true,
        isCanonicalWorkspace: false,
        hasBootstrapFileAccess: true,
      }),
    ).toBe("limited");
  });

  it("returns none for cron, heartbeat, and non-primary runs", () => {
    expect(
      resolveBootstrapMode({
        bootstrapPending: true,
        runKind: "cron",
        isInteractiveUserFacing: true,
        isPrimaryRun: true,
        isCanonicalWorkspace: true,
        hasBootstrapFileAccess: true,
      }),
    ).toBe("none");
    expect(
      resolveBootstrapMode({
        bootstrapPending: true,
        runKind: "heartbeat",
        isInteractiveUserFacing: true,
        isPrimaryRun: true,
        isCanonicalWorkspace: true,
        hasBootstrapFileAccess: true,
      }),
    ).toBe("none");
    expect(
      resolveBootstrapMode({
        bootstrapPending: true,
        runKind: "default",
        isInteractiveUserFacing: true,
        isPrimaryRun: false,
        isCanonicalWorkspace: true,
        hasBootstrapFileAccess: true,
      }),
    ).toBe("none");
  });

  it("returns none when the run cannot access bootstrap files normally", () => {
    expect(
      resolveBootstrapMode({
        bootstrapPending: true,
        runKind: "default",
        isInteractiveUserFacing: true,
        isPrimaryRun: true,
        isCanonicalWorkspace: true,
        hasBootstrapFileAccess: false,
      }),
    ).toBe("none");
  });
});

¤ Dauer der Verarbeitung: 0.9 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.