let sendExecApprovalFollowupResult: typeofimport("./bash-tools.exec-host-shared.js").sendExecApprovalFollowupResult;
let maxExecApprovalFollowupFailureLogKeys: typeofimport("./bash-tools.exec-host-shared.js").MAX_EXEC_APPROVAL_FOLLOWUP_FAILURE_LOG_KEYS;
let enforceStrictInlineEvalApprovalBoundary: typeofimport("./bash-tools.exec-host-shared.js").enforceStrictInlineEvalApprovalBoundary;
let resolveExecHostApprovalContext: typeofimport("./bash-tools.exec-host-shared.js").resolveExecHostApprovalContext;
let resolveExecApprovalUnavailableState: typeofimport("./bash-tools.exec-host-shared.js").resolveExecApprovalUnavailableState;
let buildExecApprovalPendingToolResult: typeofimport("./bash-tools.exec-host-shared.js").buildExecApprovalPendingToolResult;
it("logs repeated followup dispatch failures once per approval id and error message", async () => {
sendExecApprovalFollowup.mockRejectedValue(new Error("Channel is required"));
it("keeps a local /approve prompt when the initiating Discord surface is disabled", () => { const result = buildDisabledSurfaceApprovalResult({
channel: "discord",
channelLabel: "Discord",
unavailableReason: null,
allowedDecisions: ["allow-once", "deny"],
});
expect(result.details.status).toBe("approval-pending"); const text = result.content.find((part) => part.type === "text")?.text ?? "";
expect(text).toContain("/approve approval-slug allow-once");
expect(text).not.toContain("native chat exec approvals are not configured on Discord");
});
it("returns an unavailable reply when Discord exec approvals are disabled", () => { const result = buildDisabledSurfaceApprovalResult({
channel: "discord",
channelLabel: "Discord",
unavailableReason: "initiating-platform-disabled",
});
expect(result.details).toMatchObject({
status: "approval-unavailable",
reason: "initiating-platform-disabled",
channel: "discord",
channelLabel: "Discord",
accountId: "default",
host: "gateway",
}); const text = result.content.find((part) => part.type === "text")?.text ?? "";
expect(text).toContain("native chat exec approvals are not configured on Discord");
expect(text).not.toContain("/approve");
expect(text).not.toContain("Pending command:");
});
it("keeps the Telegram unavailable reply when Discord DM approvals are not fully configured", () => { const result = buildDisabledSurfaceApprovalResult({
channel: "telegram",
channelLabel: "Telegram",
unavailableReason: "initiating-platform-disabled",
});
expect(result.details).toMatchObject({
status: "approval-unavailable",
reason: "initiating-platform-disabled",
channel: "telegram",
channelLabel: "Telegram",
accountId: "default",
sentApproverDms: false,
host: "gateway",
}); const text = result.content.find((part) => part.type === "text")?.text ?? "";
expect(text).toContain("native chat exec approvals are not configured on Telegram");
expect(text).not.toContain("/approve");
expect(text).not.toContain("Pending command:");
expect(text).not.toContain("Approver DMs were sent");
});
});
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet am 2026-05-26)
¤
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.