chore(tsconfig): turn off the Schema-over-JSON diagnostic in test files (#16375)
Co-authored-by: Julius Marminge <[email protected]> Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
32 files changed
+14
-192
No files matched your search
@@ -293,7 +293,6 @@ describe("mobile cloud link environment client", () => {
|
||||
const bodies: Array<unknown> = [];
|
||||
const fetchMock = vi.fn((url: string | URL, init?: RequestInit) => {
|
||||
if (init?.body) {
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
bodies.push(JSON.parse(requestBodyText(init.body)));
|
||||
}
|
||||
if (String(url).endsWith("/v1/client/environment-link-challenges")) {
|
||||
@@ -348,7 +347,6 @@ describe("mobile cloud link environment client", () => {
|
||||
const bodies: Array<Record<string, unknown>> = [];
|
||||
const fetchMock = vi.fn((url: string | URL, init?: RequestInit) => {
|
||||
if (init?.body) {
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
bodies.push(JSON.parse(requestBodyText(init.body)) as Record<string, unknown>);
|
||||
}
|
||||
if (String(url).endsWith("/v1/client/environment-link-challenges")) {
|
||||
|
||||
@@ -650,7 +650,6 @@ it.layer(NodeServices.layer)("cli config resolution", (it) => {
|
||||
yield* fs.makeDirectory(path.dirname(derivedPaths.settingsPath), { recursive: true });
|
||||
yield* fs.writeFileString(
|
||||
derivedPaths.settingsPath,
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
`${JSON.stringify({
|
||||
observability: {
|
||||
otlpTracesUrl: "http://localhost:4318/v1/traces",
|
||||
@@ -722,7 +721,6 @@ it.layer(NodeServices.layer)("cli config resolution", (it) => {
|
||||
yield* fs.makeDirectory(path.dirname(derivedPaths.settingsPath), { recursive: true });
|
||||
yield* fs.writeFileString(
|
||||
derivedPaths.settingsPath,
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
`${JSON.stringify({
|
||||
observability: {
|
||||
otlpTracesUrl: "http://localhost:4318/v1/traces",
|
||||
@@ -774,7 +772,6 @@ it.layer(NodeServices.layer)("cli config resolution", (it) => {
|
||||
yield* fs.makeDirectory(path.dirname(derivedPaths.settingsPath), { recursive: true });
|
||||
yield* fs.writeFileString(
|
||||
derivedPaths.settingsPath,
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
`${JSON.stringify({
|
||||
observability: {
|
||||
otlpTracesUrl: "http://localhost:4318/v1/traces",
|
||||
@@ -1073,7 +1070,6 @@ it.layer(NodeServices.layer)("cli config resolution", (it) => {
|
||||
yield* fs.makeDirectory(path.dirname(derivedPaths.settingsPath), { recursive: true });
|
||||
yield* fs.writeFileString(
|
||||
derivedPaths.settingsPath,
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
`${JSON.stringify({ observability: { otlpLogsUrl: "http://settings:4318/v1/logs" } })}\n`,
|
||||
);
|
||||
|
||||
@@ -1145,7 +1141,6 @@ it.layer(NodeServices.layer)("cli config resolution", (it) => {
|
||||
yield* fs.makeDirectory(path.dirname(derivedPaths.settingsPath), { recursive: true });
|
||||
yield* fs.writeFileString(
|
||||
derivedPaths.settingsPath,
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
`${JSON.stringify({ observability: { otlpLogsUrl: "http://settings:4318/v1/logs" } })}\n`,
|
||||
);
|
||||
|
||||
|
||||
@@ -173,7 +173,6 @@ describe("t3 pair", () => {
|
||||
const listed = yield* captureStdout(
|
||||
runCli(["auth", "pairing", "list", "--base-dir", baseDir, "--json"]),
|
||||
);
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off - CLI JSON output is decoded as a presentation DTO.
|
||||
const credentials = JSON.parse(listed) as ReadonlyArray<{ readonly label?: string }>;
|
||||
assert.equal(credentials.length, 1);
|
||||
assert.equal(credentials[0]?.label, "t3 pair");
|
||||
|
||||
@@ -359,7 +359,6 @@ it.layer(NodeServices.layer)("boot service install", (it) => {
|
||||
current: true,
|
||||
installedVersion: "1.2.3",
|
||||
});
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off - fixed launcher-owned test document.
|
||||
const pendingState = JSON.stringify({
|
||||
protocol: SERVICE_LAUNCHER_PROTOCOL,
|
||||
activeVersion: "1.2.3",
|
||||
@@ -546,7 +545,6 @@ it.layer(NodeServices.layer)("boot service install", (it) => {
|
||||
Effect.gen(function* () {
|
||||
const { service, fs, statePath } = yield* makeHarness();
|
||||
yield* service.install();
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off - fixed launcher-owned test document.
|
||||
const pendingState = JSON.stringify({
|
||||
protocol: SERVICE_LAUNCHER_PROTOCOL,
|
||||
activeVersion: "1.2.3",
|
||||
@@ -647,7 +645,6 @@ it.layer(NodeServices.layer)("boot service install", (it) => {
|
||||
Effect.gen(function* () {
|
||||
const { service, fs, statePath, commands } = yield* makeHarness();
|
||||
yield* service.install();
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off - fixed launcher-owned test document.
|
||||
const pendingState = JSON.stringify({
|
||||
protocol: SERVICE_LAUNCHER_PROTOCOL - 1,
|
||||
activeVersion: "1.2.3",
|
||||
@@ -808,7 +805,6 @@ it.layer(NodeServices.layer)("boot service install", (it) => {
|
||||
const { service, fs, statePath, commands } = yield* makeHarness("darwin");
|
||||
yield* service.install();
|
||||
const plistPath = (yield* service.status).unitPath;
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off - fixed launcher-owned test document.
|
||||
const pendingState = JSON.stringify({
|
||||
protocol: SERVICE_LAUNCHER_PROTOCOL - 1,
|
||||
activeVersion: "1.2.3",
|
||||
|
||||
@@ -84,7 +84,6 @@ const makeHarness = Effect.fn("test.make_self_update_harness")(function* (
|
||||
launcherProtocol: SERVICE_LAUNCHER_PROTOCOL,
|
||||
};
|
||||
return {
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off - fake child-process stdout.
|
||||
stdout: JSON.stringify(result),
|
||||
stderr: "",
|
||||
code: ChildProcessSpawner.ExitCode(0),
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// @effect-diagnostics preferSchemaOverJson:off - the external process fixture emits raw JSON over SSH stdout.
|
||||
import { expect, it } from "@effect/vitest";
|
||||
import * as NodeServices from "@effect/platform-node/NodeServices";
|
||||
import * as Net from "@t3tools/shared/Net";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// @effect-diagnostics nodeBuiltinImport:off globalFetchInEffect:off preferSchemaOverJson:off - verifies generated remote scripts using real shell and Node processes.
|
||||
// @effect-diagnostics nodeBuiltinImport:off globalFetchInEffect:off - verifies generated remote scripts using real shell and Node processes.
|
||||
import * as Effect from "effect/Effect";
|
||||
import { HostProcessPlatform } from "@t3tools/shared/hostProcess";
|
||||
import { describe, expect, it } from "@effect/vitest";
|
||||
|
||||
@@ -790,7 +790,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
const { manager } = yield* makeManager({
|
||||
ghScenario: {
|
||||
prListSequence: [
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
number: 13,
|
||||
@@ -835,7 +834,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
const { manager } = yield* makeManager({
|
||||
ghScenario: {
|
||||
prListSequence: [
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
number: 14,
|
||||
@@ -875,7 +873,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
const { manager } = yield* makeManager({
|
||||
ghScenario: {
|
||||
prListSequence: [
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
number: 0,
|
||||
@@ -928,7 +925,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
const { manager } = yield* makeManager({
|
||||
ghScenario: {
|
||||
prListSequence: [
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
number: 16,
|
||||
@@ -1042,7 +1038,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
};
|
||||
const { manager, ghCalls } = yield* makeManager({
|
||||
ghScenario: {
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
prListSequence: [JSON.stringify([existingPr]), JSON.stringify([existingPr])],
|
||||
},
|
||||
});
|
||||
@@ -1095,7 +1090,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
ghScenario: {
|
||||
prListSequence: [
|
||||
// Fake gh returns raw JSON stdout, matching the CLI boundary under test.
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
number: 217,
|
||||
@@ -1138,7 +1132,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
prListSequence: [
|
||||
"[]",
|
||||
// Fake gh returns raw JSON stdout, matching the CLI boundary under test.
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
number: 114,
|
||||
@@ -1244,7 +1237,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
ghScenario: {
|
||||
prListSequence: [
|
||||
// Fake gh returns raw JSON stdout, matching the CLI boundary under test.
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
number: 216,
|
||||
@@ -1296,7 +1288,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
ghScenario: {
|
||||
// Fake gh returns raw JSON stdout, matching the CLI boundary under test.
|
||||
prListSequence: [
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
number: 221,
|
||||
@@ -1347,7 +1338,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
ghScenario: {
|
||||
prListSequence: [
|
||||
// Fake gh returns raw JSON stdout, matching the CLI boundary under test.
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
number: 217,
|
||||
@@ -1410,7 +1400,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
ghScenario: {
|
||||
prListByHeadSelector: {
|
||||
// Fake gh returns raw JSON stdout, matching the CLI boundary under test.
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
"feature/deleted-fork-branch": JSON.stringify([
|
||||
{
|
||||
number: 218,
|
||||
@@ -1492,7 +1481,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
ghScenario: {
|
||||
prListSequence: [
|
||||
// Fake gh returns raw JSON stdout, matching the CLI boundary under test.
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
number: 219,
|
||||
@@ -1545,7 +1533,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
ghScenario: {
|
||||
prListSequence: [
|
||||
// Fake gh returns raw JSON stdout, matching the CLI boundary under test.
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
number: 220,
|
||||
@@ -1719,7 +1706,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
const { manager, ghCalls } = yield* makeManager({
|
||||
ghScenario: {
|
||||
prListSequence: [
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
number: 215,
|
||||
@@ -1768,7 +1754,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
const { manager, ghCalls } = yield* makeManager({
|
||||
ghScenario: {
|
||||
prListSequence: [
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
number: 214,
|
||||
@@ -1991,7 +1976,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
const { manager } = yield* makeManager({
|
||||
ghScenario: {
|
||||
prListSequence: [
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
number: 1661,
|
||||
@@ -2045,7 +2029,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
const { manager, ghCalls } = yield* makeManager({
|
||||
ghScenario: {
|
||||
prListSequence: [
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
number: 488,
|
||||
@@ -2111,7 +2094,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
const { manager, ghCalls } = yield* makeManager({
|
||||
ghScenario: {
|
||||
prListByHeadSelector: {
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
main: JSON.stringify([
|
||||
{
|
||||
number: 777,
|
||||
@@ -2187,7 +2169,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
const { manager, ghCalls } = yield* makeManager({
|
||||
ghScenario: {
|
||||
prListByHeadSelector: {
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
"effect-atom": JSON.stringify([
|
||||
{
|
||||
number: 1618,
|
||||
@@ -2199,7 +2180,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
updatedAt: "2026-03-01T10:00:00Z",
|
||||
},
|
||||
]),
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
"upstream/effect-atom": JSON.stringify([
|
||||
{
|
||||
number: 1518,
|
||||
@@ -2250,7 +2230,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
const { manager } = yield* makeManager({
|
||||
ghScenario: {
|
||||
prListSequence: [
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
number: 22,
|
||||
@@ -2289,7 +2268,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
const { manager } = yield* makeManager({
|
||||
ghScenario: {
|
||||
prListSequence: [
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
number: 23,
|
||||
@@ -2325,7 +2303,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
const { manager, ghCalls } = yield* makeManager({
|
||||
ghScenario: {
|
||||
prListSequence: [
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
number: 54,
|
||||
@@ -2365,7 +2342,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
ghScenario: {
|
||||
prListByHeadSelector: {
|
||||
// Fake gh returns raw JSON stdout, matching the CLI boundary under test.
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
"feature/pushed-plain": JSON.stringify([
|
||||
{
|
||||
number: 88,
|
||||
@@ -2420,7 +2396,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
ghScenario: {
|
||||
prListByHeadSelector: {
|
||||
// Fake gh returns raw JSON stdout, matching the CLI boundary under test.
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
"feature/fork-plain": JSON.stringify([
|
||||
{
|
||||
number: 89,
|
||||
@@ -2476,7 +2451,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
ghScenario: {
|
||||
prListByHeadSelector: {
|
||||
// Fake gh returns raw JSON stdout, matching the CLI boundary under test.
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
"feature/fork-settle": JSON.stringify([
|
||||
{
|
||||
number: 91,
|
||||
@@ -2524,7 +2498,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
ghScenario: {
|
||||
prListByHeadSelector: {
|
||||
// Fake gh returns raw JSON stdout, matching the CLI boundary under test.
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
"feature/sticky-plain": JSON.stringify([
|
||||
{
|
||||
number: 90,
|
||||
@@ -2564,7 +2537,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
const { manager } = yield* makeManager({
|
||||
ghScenario: {
|
||||
prListSequence: [
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
number: 45,
|
||||
@@ -2698,7 +2670,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
};
|
||||
const { manager } = yield* makeManager({
|
||||
ghScenario: {
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
prListSequence: [JSON.stringify([existingPr])],
|
||||
failWith: new GitHubCli.GitHubCliUnavailableError({
|
||||
command: "gh",
|
||||
@@ -2742,7 +2713,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
};
|
||||
const { manager } = yield* makeManager({
|
||||
ghScenario: {
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
prListSequence: [JSON.stringify([existingPr])],
|
||||
failWith: new GitHubCli.GitHubCliUnavailableError({
|
||||
command: "gh",
|
||||
@@ -2791,7 +2761,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
};
|
||||
const { manager } = yield* makeManager({
|
||||
ghScenario: {
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
prListSequence: [JSON.stringify([existingPr])],
|
||||
failWith: new GitHubCli.GitHubCliUnavailableError({
|
||||
command: "gh",
|
||||
@@ -2831,7 +2800,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
};
|
||||
const { manager } = yield* makeManager({
|
||||
ghScenario: {
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
prListSequence: [JSON.stringify([existingPr])],
|
||||
failWith: new GitHubCli.GitHubCliUnavailableError({
|
||||
command: "gh",
|
||||
@@ -2874,7 +2842,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
};
|
||||
const { manager } = yield* makeManager({
|
||||
ghScenario: {
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
prListSequence: [JSON.stringify([existingPr])],
|
||||
failWith: new GitHubCli.GitHubCliUnavailableError({
|
||||
command: "gh",
|
||||
@@ -3469,7 +3436,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
ghScenario: {
|
||||
prListSequence: [
|
||||
"[]",
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
number: 77,
|
||||
@@ -3605,7 +3571,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
ghScenario: {
|
||||
prListSequence: [
|
||||
"[]",
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
number: 303,
|
||||
@@ -3652,7 +3617,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
ghScenario: {
|
||||
prListSequence: [
|
||||
"[]",
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
number: 404,
|
||||
@@ -3704,7 +3668,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
defaultBranch: "",
|
||||
prListSequence: [
|
||||
"[]",
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
number: 505,
|
||||
@@ -3744,7 +3707,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
const { manager, ghCalls } = yield* makeManager({
|
||||
ghScenario: {
|
||||
prListSequence: [
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
number: 42,
|
||||
@@ -3798,7 +3760,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
const { manager, ghCalls } = yield* makeManager({
|
||||
ghScenario: {
|
||||
prListSequence: [
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
number: 142,
|
||||
@@ -3875,7 +3836,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
const { manager, ghCalls } = yield* makeManager({
|
||||
ghScenario: {
|
||||
prListByHeadSelector: {
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
"effect-atom": JSON.stringify([
|
||||
{
|
||||
number: 1618,
|
||||
@@ -3885,7 +3845,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
headRefName: "effect-atom",
|
||||
},
|
||||
]),
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
"upstream/effect-atom": JSON.stringify([
|
||||
{
|
||||
number: 1518,
|
||||
@@ -3935,9 +3894,7 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
const { manager, ghCalls } = yield* makeManager({
|
||||
ghScenario: {
|
||||
prListByHeadSelector: {
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
"t3code/pr-142/statemachine": JSON.stringify([]),
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
statemachine: JSON.stringify([
|
||||
{
|
||||
number: 41,
|
||||
@@ -4003,7 +3960,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
const { manager, ghCalls } = yield* makeManager({
|
||||
ghScenario: {
|
||||
prListByHeadSelector: {
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
statemachine: JSON.stringify([
|
||||
{
|
||||
number: 142,
|
||||
@@ -4021,7 +3977,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
},
|
||||
},
|
||||
]),
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
"t3code/pr-142/statemachine": JSON.stringify([]),
|
||||
},
|
||||
},
|
||||
@@ -4264,7 +4219,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
ghScenario: {
|
||||
prListSequence: [
|
||||
"[]",
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
number: 88,
|
||||
@@ -4385,7 +4339,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
const { manager, ghCalls } = yield* makeManager({
|
||||
ghScenario: {
|
||||
prListSequence: [
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
number: 1661,
|
||||
@@ -4403,7 +4356,6 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
},
|
||||
},
|
||||
]),
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
number: 188,
|
||||
@@ -4466,9 +4418,7 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
ghScenario: {
|
||||
prListSequenceByHeadSelector: {
|
||||
statemachine: [
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([]),
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
number: 188,
|
||||
@@ -6084,9 +6034,7 @@ it.layer(layerGitManagerTest)("GitManager", (it) => {
|
||||
const { manager } = yield* makeManager({
|
||||
ghScenario: {
|
||||
prListSequence: [
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([]),
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
number: 201,
|
||||
|
||||
@@ -219,7 +219,6 @@ it.layer(NodeServices.layer)("keybindings", (it) => {
|
||||
const { keybindingsConfigPath } = yield* ServerConfig.ServerConfig;
|
||||
yield* fs.writeFileString(
|
||||
keybindingsConfigPath,
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{ key: "mod+j", command: "terminal.toggle" },
|
||||
{ key: "mod+shift+d+o", command: "terminal.new" },
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// The bridge intentionally treats MCP JSON-RPC messages as opaque JSON.
|
||||
// @effect-diagnostics preferSchemaOverJson:off
|
||||
import { describe, expect, it } from "@effect/vitest";
|
||||
import * as Effect from "effect/Effect";
|
||||
import * as Fiber from "effect/Fiber";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// The harness asserts raw JSON-RPC wire strings, mirroring the bridge's
|
||||
// schema-free passthrough.
|
||||
// @effect-diagnostics nodeBuiltinImport:off globalTimers:off preferSchemaOverJson:off
|
||||
// @effect-diagnostics nodeBuiltinImport:off globalTimers:off
|
||||
import * as NodeStream from "node:stream";
|
||||
|
||||
import { describe, expect, it } from "@effect/vitest";
|
||||
|
||||
@@ -44,7 +44,6 @@ it.layer(ProjectStore.layer.pipe(Layer.provideMerge(SqlitePersistence.layerMemor
|
||||
FROM projection_projects
|
||||
WHERE project_id = ${projectId}
|
||||
`;
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
assert.strictEqual(rows[0]?.defaultModelSelection, JSON.stringify(modelSelection));
|
||||
assert.deepStrictEqual(
|
||||
Option.getOrNull(yield* projects.get(projectId))?.defaultModelSelection,
|
||||
|
||||
@@ -265,7 +265,6 @@ layer("016_CanonicalizeModelSelections", (it) => {
|
||||
FROM orchestration_events
|
||||
ORDER BY rowid ASC
|
||||
`;
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
assert.deepStrictEqual(JSON.parse(eventRows[0]!.payloadJson), {
|
||||
projectId: "project-1",
|
||||
title: "Project",
|
||||
@@ -281,7 +280,6 @@ layer("016_CanonicalizeModelSelections", (it) => {
|
||||
createdAt: "2026-01-01T00:00:00.000Z",
|
||||
updatedAt: "2026-01-01T00:00:00.000Z",
|
||||
});
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
assert.deepStrictEqual(JSON.parse(eventRows[1]!.payloadJson), {
|
||||
projectId: "project-2",
|
||||
title: "Fallback Project",
|
||||
@@ -297,7 +295,6 @@ layer("016_CanonicalizeModelSelections", (it) => {
|
||||
createdAt: "2026-01-01T00:00:00.000Z",
|
||||
updatedAt: "2026-01-01T00:00:00.000Z",
|
||||
});
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
assert.deepStrictEqual(JSON.parse(eventRows[2]!.payloadJson), {
|
||||
projectId: "project-3",
|
||||
title: "Null Model Project",
|
||||
@@ -307,7 +304,6 @@ layer("016_CanonicalizeModelSelections", (it) => {
|
||||
createdAt: "2026-01-01T00:00:00.000Z",
|
||||
updatedAt: "2026-01-01T00:00:00.000Z",
|
||||
});
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
assert.deepStrictEqual(JSON.parse(eventRows[3]!.payloadJson), {
|
||||
threadId: "thread-1",
|
||||
projectId: "project-1",
|
||||
@@ -327,7 +323,6 @@ layer("016_CanonicalizeModelSelections", (it) => {
|
||||
createdAt: "2026-01-01T00:00:00.000Z",
|
||||
updatedAt: "2026-01-01T00:00:00.000Z",
|
||||
});
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
assert.deepStrictEqual(JSON.parse(eventRows[4]!.payloadJson), {
|
||||
threadId: "thread-2",
|
||||
projectId: "project-1",
|
||||
@@ -346,7 +341,6 @@ layer("016_CanonicalizeModelSelections", (it) => {
|
||||
createdAt: "2026-01-01T00:00:00.000Z",
|
||||
updatedAt: "2026-01-01T00:00:00.000Z",
|
||||
});
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
assert.deepStrictEqual(JSON.parse(eventRows[5]!.payloadJson), {
|
||||
threadId: "thread-1",
|
||||
turnId: "turn-1",
|
||||
@@ -360,7 +354,6 @@ layer("016_CanonicalizeModelSelections", (it) => {
|
||||
},
|
||||
deliveryMode: "buffered",
|
||||
});
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
assert.deepStrictEqual(JSON.parse(eventRows[6]!.payloadJson), {
|
||||
threadId: "thread-3",
|
||||
projectId: "project-1",
|
||||
|
||||
@@ -293,7 +293,6 @@ it.layer(NodeServices.layer)("Claude capability probe SDK boundary", (it) => {
|
||||
},
|
||||
});
|
||||
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
const invocation = JSON.parse(yield* fs.readFileString(invocationPath)) as {
|
||||
readonly args: ReadonlyArray<string>;
|
||||
readonly cwd: string;
|
||||
@@ -310,7 +309,6 @@ it.layer(NodeServices.layer)("Claude capability probe SDK boundary", (it) => {
|
||||
|
||||
const settingsFlagIndex = invocation.args.indexOf("--settings");
|
||||
assert.notEqual(settingsFlagIndex, -1);
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
const flagSettings = JSON.parse(invocation.args[settingsFlagIndex + 1] ?? "{}") as {
|
||||
readonly disableAllHooks?: boolean;
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// @effect-diagnostics nodeBuiltinImport:off globalFetchInEffect:off preferSchemaOverJson:off - Local mock OAuth server validates the browser callback boundary.
|
||||
// @effect-diagnostics nodeBuiltinImport:off globalFetchInEffect:off - Local mock OAuth server validates the browser callback boundary.
|
||||
import * as NodeHttp from "node:http";
|
||||
import * as NodeCrypto from "node:crypto";
|
||||
import * as NodeServices from "@effect/platform-node/NodeServices";
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// @effect-diagnostics preferSchemaOverJson:off - Mock HTTP responses use JSON fixtures.
|
||||
import { assert, it } from "@effect/vitest";
|
||||
import * as Effect from "effect/Effect";
|
||||
import { HttpClient, HttpClientResponse } from "effect/http";
|
||||
|
||||
@@ -380,7 +380,6 @@ it.layer(NodeServices.layer)("checkGrokProviderStatus", (it) => {
|
||||
directory: dir,
|
||||
name: "grok",
|
||||
source: [
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
`process.stderr.write(${JSON.stringify(`${secretStderr}\n`)});`,
|
||||
"process.exit(2);",
|
||||
"",
|
||||
@@ -417,7 +416,6 @@ it.layer(NodeServices.layer)("checkGrokProviderStatus", (it) => {
|
||||
" process.exit(0);",
|
||||
"}",
|
||||
'if (process.argv[2] === "models") {',
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
` process.stdout.write(${JSON.stringify(input.modelsOutput)});`,
|
||||
" process.exit(0);",
|
||||
"}",
|
||||
|
||||
@@ -172,7 +172,6 @@ const makeTildeProviderFixtures = Effect.fn(
|
||||
);
|
||||
yield* fileSystem.writeFileString(
|
||||
codexScriptPath,
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off - fixed script document read by the external Codex mock peer.
|
||||
JSON.stringify({ rootThreadId: "probe-thread", notifications: [] }),
|
||||
);
|
||||
yield* fileSystem.chmod(codexPath, 0o755);
|
||||
@@ -346,7 +345,6 @@ describe("ProviderInstanceRegistry — multi-instance codex slice", () => {
|
||||
const fixtures = yield* makeTildeProviderFixtures();
|
||||
yield* fileSystem.writeFileString(
|
||||
fixtures.codexScriptPath,
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off - fixed script document read by the external Codex mock peer.
|
||||
JSON.stringify({
|
||||
rootThreadId: "probe-thread",
|
||||
notifications: [],
|
||||
|
||||
@@ -228,7 +228,6 @@ layer("AzureDevOpsPullRequestCli.layer", (it) => {
|
||||
...row,
|
||||
description: "x".repeat(10_000),
|
||||
}));
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
const response = JSON.stringify(rows);
|
||||
expect(Buffer.byteLength(response)).toBeGreaterThan(1_000_000);
|
||||
|
||||
@@ -341,7 +340,6 @@ layer("AzureDevOpsPullRequestCli.layer", (it) => {
|
||||
.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
output(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{ pullRequestId: "malformed" },
|
||||
pullRequestRows(1, 1)[0],
|
||||
@@ -434,7 +432,6 @@ layer("AzureDevOpsPullRequestCli.layer", (it) => {
|
||||
Effect.gen(function* () {
|
||||
// `--query user` unwraps the object, so the wrapper has to put it back.
|
||||
mockedExecute.mockReturnValueOnce(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
Effect.succeed(output(JSON.stringify({ name: "[email protected]", type: "user" }))),
|
||||
);
|
||||
const cli = yield* AzureDevOpsPullRequestCli.AzureDevOpsPullRequestCli;
|
||||
@@ -636,7 +633,6 @@ layer("AzureDevOpsPullRequestCli.layer", (it) => {
|
||||
.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
output(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({
|
||||
pullRequestId: 42,
|
||||
title: "Add the page",
|
||||
@@ -653,7 +649,6 @@ layer("AzureDevOpsPullRequestCli.layer", (it) => {
|
||||
.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
output(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({
|
||||
value: [
|
||||
{
|
||||
@@ -674,7 +669,6 @@ layer("AzureDevOpsPullRequestCli.layer", (it) => {
|
||||
.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
output(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({
|
||||
changeEntries: [
|
||||
{ changeType: "edit", item: { path: "/README.md", objectId: "8f80" } },
|
||||
@@ -713,7 +707,6 @@ layer("AzureDevOpsPullRequestCli.layer", (it) => {
|
||||
// pull request read every time they checked whether a file had been pushed to.
|
||||
const pullRequest = Effect.succeed(
|
||||
output(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({
|
||||
pullRequestId: 42,
|
||||
title: "Add the page",
|
||||
@@ -1219,7 +1212,6 @@ layer("AzureDevOpsPullRequestCli.layer", (it) => {
|
||||
mockedExecute.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
output(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({
|
||||
value: [
|
||||
{
|
||||
@@ -1374,7 +1366,6 @@ layer("AzureDevOpsPullRequestCli.layer", (it) => {
|
||||
Effect.succeed(
|
||||
output(
|
||||
// Well-formed, but with nothing to build a link from: not a decode failure.
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({
|
||||
pullRequestId: 42,
|
||||
title: "Add the page",
|
||||
|
||||
@@ -676,7 +676,6 @@ layer("BitbucketPullRequestApi.layer", (it) => {
|
||||
expect(call.method).toBe("PUT");
|
||||
expect(call.url).toBe("/repositories/acme/web/pullrequests/7");
|
||||
// Bitbucket's PUT is a partial update, so a field left out of the body is left as it was.
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
expect(JSON.parse(call.body ?? "")).toEqual({ title: "A new title" });
|
||||
}),
|
||||
);
|
||||
@@ -688,7 +687,6 @@ layer("BitbucketPullRequestApi.layer", (it) => {
|
||||
|
||||
yield* api.updateChangeRequest({ repository: "acme/web", number: 7, body: "New body." });
|
||||
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
expect(JSON.parse(callAt(0).body ?? "")).toEqual({ description: "New body." });
|
||||
}),
|
||||
);
|
||||
@@ -705,7 +703,6 @@ layer("BitbucketPullRequestApi.layer", (it) => {
|
||||
body: "New body.",
|
||||
});
|
||||
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
expect(JSON.parse(callAt(0).body ?? "")).toEqual({
|
||||
title: "A new title",
|
||||
description: "New body.",
|
||||
@@ -736,7 +733,6 @@ layer("BitbucketPullRequestApi.layer", (it) => {
|
||||
it.effect("fails the read when Bitbucket answers with something unreadable", () =>
|
||||
Effect.gen(function* () {
|
||||
mockedRequest.mockReturnValueOnce(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
Effect.succeed(response(JSON.stringify({ error: "nope" }))),
|
||||
);
|
||||
const api = yield* BitbucketPullRequestApi.BitbucketPullRequestApi;
|
||||
@@ -769,7 +765,6 @@ layer("BitbucketPullRequestApi.layer", (it) => {
|
||||
|
||||
it.effect("fails when the credentials belong to no named account", () =>
|
||||
Effect.gen(function* () {
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
mockedRequest.mockReturnValueOnce(Effect.succeed(response(JSON.stringify({}))));
|
||||
const api = yield* BitbucketPullRequestApi.BitbucketPullRequestApi;
|
||||
|
||||
@@ -784,7 +779,6 @@ layer("BitbucketPullRequestApi.layer", (it) => {
|
||||
mockedRequest.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
response(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({
|
||||
next: "https://api.bitbucket.org/2.0/comments?page=2",
|
||||
values: [
|
||||
@@ -805,7 +799,6 @@ layer("BitbucketPullRequestApi.layer", (it) => {
|
||||
response(
|
||||
// The reply arrives a page after the remark it answers, which is why the threads
|
||||
// are only assembled once every page is in hand.
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({
|
||||
values: [
|
||||
{
|
||||
@@ -840,7 +833,6 @@ layer("BitbucketPullRequestApi.layer", (it) => {
|
||||
mockedRequest.mockReturnValue(
|
||||
Effect.succeed(
|
||||
response(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({
|
||||
next: "https://api.bitbucket.org/2.0/comments?page=2",
|
||||
values: [
|
||||
@@ -868,7 +860,6 @@ layer("BitbucketPullRequestApi.layer", (it) => {
|
||||
mockedRequest.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
response(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({
|
||||
values: [
|
||||
{
|
||||
@@ -941,7 +932,6 @@ layer("BitbucketPullRequestApi.layer", (it) => {
|
||||
});
|
||||
|
||||
expect(callAt(0).url).toContain("/pullrequests/7/comments");
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
expect(JSON.parse(callAt(0).body ?? "")).toEqual({
|
||||
content: { raw: "why remove?" },
|
||||
inline: { path: "src/a.ts", from: 12 },
|
||||
@@ -988,7 +978,6 @@ layer("BitbucketPullRequestApi.layer", (it) => {
|
||||
body: "Fixed.",
|
||||
});
|
||||
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
expect(JSON.parse(callAt(0).body ?? "")).toEqual({
|
||||
content: { raw: "Fixed." },
|
||||
parent: { id: 10 },
|
||||
@@ -1001,7 +990,6 @@ layer("BitbucketPullRequestApi.layer", (it) => {
|
||||
mockedRequest.mockReturnValue(
|
||||
Effect.succeed(
|
||||
response(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({ values: [{ type: "repository_permission", permission: "read" }] }),
|
||||
),
|
||||
),
|
||||
@@ -1017,7 +1005,6 @@ layer("BitbucketPullRequestApi.layer", (it) => {
|
||||
|
||||
it.effect("escapes a repository name before it goes inside a filter literal", () =>
|
||||
Effect.gen(function* () {
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
mockedRequest.mockReturnValue(Effect.succeed(response(JSON.stringify({ values: [] }))));
|
||||
const api = yield* BitbucketPullRequestApi.BitbucketPullRequestApi;
|
||||
|
||||
@@ -1075,7 +1062,6 @@ layer("BitbucketPullRequestApi.layer", (it) => {
|
||||
.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
response(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({ values: [{ user: bilal }, { user: octocat }, { user: hubot }] }),
|
||||
),
|
||||
),
|
||||
@@ -1113,7 +1099,6 @@ layer("BitbucketPullRequestApi.layer", (it) => {
|
||||
const call = callAt(1);
|
||||
expect(call.method).toBe("PUT");
|
||||
expect(call.url).toBe("/repositories/acme/web/pullrequests/7");
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
expect(JSON.parse(call.body ?? "")).toEqual({
|
||||
reviewers: [{ uuid: "{octocat}" }, { uuid: "{hubot}" }],
|
||||
});
|
||||
@@ -1136,7 +1121,6 @@ layer("BitbucketPullRequestApi.layer", (it) => {
|
||||
requested: false,
|
||||
});
|
||||
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
expect(JSON.parse(callAt(1).body ?? "")).toEqual({ reviewers: [{ uuid: "{octocat}" }] });
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -789,7 +789,6 @@ layer("GitHubPullRequestCli.layer", (it) => {
|
||||
mockedExecute.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
output(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({
|
||||
data: { w0: { pullRequest: node(1) }, w1: { pullRequest: null } },
|
||||
}),
|
||||
|
||||
@@ -226,10 +226,8 @@ layer("GitLabPullRequestCli.layer", (it) => {
|
||||
|
||||
it.effect("advances the cursor through malformed raw rows", () =>
|
||||
Effect.gen(function* () {
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
const rows = JSON.parse(mergeRequests(2, 1)) as ReadonlyArray<unknown>;
|
||||
mockedExecute.mockReturnValueOnce(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
Effect.succeed(output(JSON.stringify([{ iid: "malformed" }, ...rows]))),
|
||||
);
|
||||
const cli = yield* GitLabPullRequestCli.GitLabPullRequestCli;
|
||||
@@ -314,7 +312,6 @@ layer("GitLabPullRequestCli.layer", (it) => {
|
||||
Effect.gen(function* () {
|
||||
// Full pages of unusable rows: nothing is collected, so the collected-count bound never
|
||||
// trips and only the page bound can end the walk.
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
const unusable = JSON.stringify(Array.from({ length: 100 }, () => ({ iid: "nope" })));
|
||||
mockedExecute.mockReturnValue(Effect.succeed(output(unusable)));
|
||||
const cli = yield* GitLabPullRequestCli.GitLabPullRequestCli;
|
||||
@@ -627,7 +624,6 @@ layer("GitLabPullRequestCli.layer", (it) => {
|
||||
it.effect("reports a commit with no parent as a structured error", () =>
|
||||
Effect.gen(function* () {
|
||||
mockedExecute.mockReturnValueOnce(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
Effect.succeed(output(JSON.stringify({ id: "a1b2c3d", parent_ids: [] }))),
|
||||
);
|
||||
const cli = yield* GitLabPullRequestCli.GitLabPullRequestCli;
|
||||
@@ -654,7 +650,6 @@ layer("GitLabPullRequestCli.layer", (it) => {
|
||||
it.effect("expands a new file from a root commit without requiring a parent", () =>
|
||||
Effect.gen(function* () {
|
||||
mockedExecute.mockReturnValueOnce(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
Effect.succeed(output(JSON.stringify({ id: "a1b2c3d", parent_ids: [] }))),
|
||||
);
|
||||
mockedExecute.mockReturnValueOnce(Effect.succeed(output("first contents\n")));
|
||||
@@ -680,7 +675,6 @@ layer("GitLabPullRequestCli.layer", (it) => {
|
||||
mockedExecute.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
output(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({
|
||||
diff_refs: {
|
||||
base_sha: "a1b2c3d",
|
||||
@@ -718,7 +712,6 @@ layer("GitLabPullRequestCli.layer", (it) => {
|
||||
mockedExecute.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
output(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({
|
||||
diff_refs: {
|
||||
base_sha: "a1b2c3d",
|
||||
@@ -758,7 +751,6 @@ layer("GitLabPullRequestCli.layer", (it) => {
|
||||
mockedExecute.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
output(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({
|
||||
diff_refs: {
|
||||
base_sha: "a1b2c3d",
|
||||
@@ -823,7 +815,6 @@ layer("GitLabPullRequestCli.layer", (it) => {
|
||||
it.effect("offers no squash when the project does not say it allows one", () =>
|
||||
Effect.gen(function* () {
|
||||
mockedExecute.mockReturnValueOnce(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
Effect.succeed(output(JSON.stringify({ merge_method: "merge" }))),
|
||||
);
|
||||
const cli = yield* GitLabPullRequestCli.GitLabPullRequestCli;
|
||||
@@ -840,7 +831,6 @@ layer("GitLabPullRequestCli.layer", (it) => {
|
||||
it.effect("reads the project's merge settings as its merge capabilities", () =>
|
||||
Effect.gen(function* () {
|
||||
mockedExecute.mockReturnValueOnce(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
Effect.succeed(output(JSON.stringify({ merge_method: "ff", squash_option: "never" }))),
|
||||
);
|
||||
const cli = yield* GitLabPullRequestCli.GitLabPullRequestCli;
|
||||
@@ -884,7 +874,6 @@ layer("GitLabPullRequestCli.layer", (it) => {
|
||||
|
||||
it.effect("fails when the authenticated account has no username", () =>
|
||||
Effect.gen(function* () {
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
mockedExecute.mockReturnValueOnce(Effect.succeed(output(JSON.stringify({ username: "" }))));
|
||||
const cli = yield* GitLabPullRequestCli.GitLabPullRequestCli;
|
||||
|
||||
@@ -935,7 +924,6 @@ layer("GitLabPullRequestCli.layer", (it) => {
|
||||
mockedExecute.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
output(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
id: "abc123",
|
||||
@@ -994,7 +982,6 @@ layer("GitLabPullRequestCli.layer", (it) => {
|
||||
mockedExecute.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
output(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({
|
||||
iid: 7,
|
||||
title: "t",
|
||||
@@ -1030,7 +1017,6 @@ layer("GitLabPullRequestCli.layer", (it) => {
|
||||
// The diff revisions first, because a positioned comment cannot be placed without them.
|
||||
expect(argsOfCall(0)[1]).toContain("merge_requests/7");
|
||||
expect(argsOfCall(1)[1]).toContain("/discussions");
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
expect(JSON.parse(callAt(1).stdin ?? "")).toEqual({
|
||||
body: "why remove?",
|
||||
position: {
|
||||
@@ -1086,7 +1072,6 @@ layer("GitLabPullRequestCli.layer", (it) => {
|
||||
expect(argsOfCall(0)).toContain("--method");
|
||||
expect(argsOfCall(0)).toContain("PUT");
|
||||
expect(argsOfCall(0)[1]).toContain("/discussions/abc123");
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
expect(JSON.parse(callAt(0).stdin ?? "")).toEqual({ resolved: true });
|
||||
}),
|
||||
);
|
||||
@@ -1117,13 +1102,11 @@ layer("GitLabPullRequestCli.layer", (it) => {
|
||||
it.effect("removes an award by listing them and deleting the reader's own id", () =>
|
||||
Effect.gen(function* () {
|
||||
mockedExecute.mockReturnValueOnce(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
Effect.succeed(output(JSON.stringify({ username: "bilal" }))),
|
||||
);
|
||||
mockedExecute.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
output(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{ id: 5, name: "thumbsup", user: { username: "bilal" } },
|
||||
{ id: 6, name: "thumbsup", user: { username: "julius" } },
|
||||
@@ -1155,7 +1138,6 @@ layer("GitLabPullRequestCli.layer", (it) => {
|
||||
it.effect("does nothing when the reader has no award of that name to take back", () =>
|
||||
Effect.gen(function* () {
|
||||
mockedExecute.mockReturnValueOnce(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
Effect.succeed(output(JSON.stringify({ username: "bilal" }))),
|
||||
);
|
||||
mockedExecute.mockReturnValueOnce(Effect.succeed(output("[]")));
|
||||
@@ -1179,7 +1161,6 @@ layer("GitLabPullRequestCli.layer", (it) => {
|
||||
mockedExecute.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
output(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({
|
||||
iid: 7,
|
||||
title: "t",
|
||||
@@ -1217,10 +1198,7 @@ layer("GitLabPullRequestCli.layer", (it) => {
|
||||
mockedExecute
|
||||
.mockReturnValueOnce(Effect.succeed(output(mergeRequestJson({ reviewers: [reviewer] }))))
|
||||
.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
output(JSON.stringify([author, reviewer, { id: 9, username: "hubot" }])),
|
||||
),
|
||||
Effect.succeed(output(JSON.stringify([author, reviewer, { id: 9, username: "hubot" }]))),
|
||||
);
|
||||
const cli = yield* GitLabPullRequestCli.GitLabPullRequestCli;
|
||||
|
||||
@@ -1258,7 +1236,6 @@ layer("GitLabPullRequestCli.layer", (it) => {
|
||||
// GitLab replaces the whole set, so the reviewer already on the merge request has to be
|
||||
// sent back with the new one or the request would take them off it.
|
||||
expect(argsOfCall(1)).toContain("PUT");
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
expect(JSON.parse(callAt(1).stdin ?? "")).toEqual({ reviewer_ids: [5, 9] });
|
||||
}),
|
||||
);
|
||||
@@ -1282,7 +1259,6 @@ layer("GitLabPullRequestCli.layer", (it) => {
|
||||
requested: false,
|
||||
});
|
||||
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
expect(JSON.parse(callAt(1).stdin ?? "")).toEqual({ reviewer_ids: [5] });
|
||||
}),
|
||||
);
|
||||
@@ -1303,7 +1279,6 @@ layer("GitLabPullRequestCli.layer", (it) => {
|
||||
});
|
||||
|
||||
// Sending it as a number would rewrite the reviewer set around something nobody chose.
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
expect(JSON.parse(callAt(1).stdin ?? "")).toEqual({ reviewer_ids: [5] });
|
||||
}),
|
||||
);
|
||||
@@ -1330,7 +1305,6 @@ layer("GitLabPullRequestCli.layer", (it) => {
|
||||
"--header",
|
||||
"Content-Type: application/json",
|
||||
]);
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
expect(JSON.parse(callAt(0).stdin ?? "")).toEqual({ title: "A better title" });
|
||||
}),
|
||||
);
|
||||
@@ -1348,7 +1322,6 @@ layer("GitLabPullRequestCli.layer", (it) => {
|
||||
});
|
||||
|
||||
// A title sent as an empty string would wipe the one the merge request already has.
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
expect(JSON.parse(callAt(0).stdin ?? "")).toEqual({ description: "What this changes." });
|
||||
}),
|
||||
);
|
||||
@@ -1367,7 +1340,6 @@ layer("GitLabPullRequestCli.layer", (it) => {
|
||||
});
|
||||
|
||||
assert.strictEqual(mockedExecute.mock.calls.length, 1);
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
expect(JSON.parse(callAt(0).stdin ?? "")).toEqual({
|
||||
title: "A better title",
|
||||
description: "What this changes.",
|
||||
@@ -1407,7 +1379,6 @@ layer("GitLabPullRequestCli.layer", (it) => {
|
||||
mockedExecute.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
output(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({
|
||||
iid: 7,
|
||||
title: "t",
|
||||
@@ -1424,7 +1395,6 @@ layer("GitLabPullRequestCli.layer", (it) => {
|
||||
mockedExecute.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
output(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({
|
||||
data: {
|
||||
project: { repository: { blobs: { nodes: [{ path: "src/a.ts", oid: "aaa" }] } } },
|
||||
@@ -1449,7 +1419,6 @@ layer("GitLabPullRequestCli.layer", (it) => {
|
||||
["src/gone.ts", ""],
|
||||
]);
|
||||
// The head the reader is looking at, not whatever the source branch has moved on to.
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
const body: unknown = JSON.parse(callAt(1).stdin ?? "{}");
|
||||
expect(body).toMatchObject({
|
||||
variables: { fullPath: "acme/web", ref: "head", paths: ["src/a.ts", "src/gone.ts"] },
|
||||
@@ -1462,7 +1431,6 @@ layer("GitLabPullRequestCli.layer", (it) => {
|
||||
mockedExecute.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
output(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({
|
||||
iid: 7,
|
||||
title: "t",
|
||||
@@ -1480,10 +1448,7 @@ layer("GitLabPullRequestCli.layer", (it) => {
|
||||
// these files, and reading it that way would report every file the reader has cleared as
|
||||
// changed on nothing worse than a permission.
|
||||
mockedExecute.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
output(JSON.stringify({ data: { project: null } })),
|
||||
),
|
||||
Effect.succeed(output(JSON.stringify({ data: { project: null } }))),
|
||||
);
|
||||
const cli = yield* GitLabPullRequestCli.GitLabPullRequestCli;
|
||||
|
||||
@@ -1520,7 +1485,6 @@ layer("GitLabPullRequestCli.layer", (it) => {
|
||||
mockedExecute.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
output(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({
|
||||
iid: 7,
|
||||
title: "t",
|
||||
|
||||
@@ -578,7 +578,6 @@ it.layer(NodeServices.layer)("server settings", (it) => {
|
||||
const change = Option.getOrUndefined(yield* Stream.runHead(changes));
|
||||
const raw = yield* fileSystem.readFileString(serverConfig.settingsPath);
|
||||
// Inspect raw persisted JSON before schema decoding can apply defaults.
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
const persisted = JSON.parse(raw) as Record<string, unknown>;
|
||||
|
||||
assert.strictEqual(next.sidebarAutoSettleAfterDays, null);
|
||||
@@ -759,7 +758,6 @@ it.layer(NodeServices.layer)("server settings", (it) => {
|
||||
|
||||
const raw = yield* fileSystem.readFileString(serverConfig.settingsPath);
|
||||
assert.deepEqual(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.parse(raw).sourceControlWriterModelSelection,
|
||||
sourceControlWriterModelSelection,
|
||||
);
|
||||
@@ -1046,7 +1044,6 @@ it.layer(NodeServices.layer)("server settings", (it) => {
|
||||
assert.isFalse(settings.providers.grok.enabled);
|
||||
|
||||
const raw = yield* fileSystem.readFileString(serverConfig.settingsPath);
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
assert.isFalse(JSON.parse(raw).providers.grok.enabled);
|
||||
}).pipe(Effect.provide(layerServerSettings())),
|
||||
);
|
||||
@@ -1067,7 +1064,6 @@ it.layer(NodeServices.layer)("server settings", (it) => {
|
||||
yield* serverSettings.updateSettings({ addProjectBaseDirectory: "~/Development" });
|
||||
|
||||
const raw = yield* fileSystem.readFileString(serverConfig.settingsPath);
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
const persisted = JSON.parse(raw);
|
||||
assert.isTrue(persisted.providers.cursor.enabled);
|
||||
assert.isTrue(persisted.providers.grok.enabled);
|
||||
@@ -1104,7 +1100,6 @@ it.layer(NodeServices.layer)("server settings", (it) => {
|
||||
assert.isFalse(resolveProviderInstanceEnabled(grok));
|
||||
|
||||
const raw = yield* fileSystem.readFileString(serverConfig.settingsPath);
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
const persisted = JSON.parse(raw);
|
||||
assert.isFalse(persisted.providers.cursor.enabled);
|
||||
assert.isFalse(persisted.providers.grok.enabled);
|
||||
@@ -1288,7 +1283,6 @@ it.layer(NodeServices.layer)("server settings", (it) => {
|
||||
assert.equal(next.providers.codex.binaryPath, "/opt/homebrew/bin/codex");
|
||||
|
||||
const raw = yield* fileSystem.readFileString(serverConfig.settingsPath);
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
assert.deepEqual(JSON.parse(raw), {
|
||||
addProjectBaseDirectory: "~/Development",
|
||||
observability: {
|
||||
@@ -1506,7 +1500,6 @@ it.layer(NodeServices.layer)("server settings", (it) => {
|
||||
|
||||
const raw = yield* fileSystem.readFileString(serverConfig.settingsPath);
|
||||
assert.notInclude(raw, "sk-or-secret");
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
assert.deepEqual(JSON.parse(raw).providerInstances.codex_personal.environment, [
|
||||
{
|
||||
name: "OPENROUTER_API_KEY",
|
||||
@@ -1992,10 +1985,7 @@ it.layer(NodeServices.layer)("server settings", (it) => {
|
||||
projectSettingsOverrides: { [legacyProject]: null },
|
||||
});
|
||||
const raw = yield* fileSystem.readFileString(serverConfig.settingsPath);
|
||||
const persisted = yield* decodeServerSettings(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.parse(raw),
|
||||
);
|
||||
const persisted = yield* decodeServerSettings(JSON.parse(raw));
|
||||
assert.isTrue(persisted.projectSettingsFolded);
|
||||
assert.isUndefined(persisted.projectSettingsOverrides[legacyProject]);
|
||||
}).pipe(Effect.provide(layerServerSettings())),
|
||||
|
||||
@@ -198,7 +198,6 @@ it.layer(NodeServices.layer)("service state persistence", (it) => {
|
||||
const databasePath = path.join(root, "userdata", "state.sqlite");
|
||||
yield* fs.makeDirectory(path.dirname(databasePath), { recursive: true });
|
||||
yield* fs.writeFileString(databasePath, "before trial");
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off - embeds a path in fake child source.
|
||||
const encodedDatabasePath = JSON.stringify(databasePath);
|
||||
const childSource = `
|
||||
const context = JSON.parse(process.env.T3_SERVICE_LAUNCHER_CONTEXT);
|
||||
@@ -252,7 +251,6 @@ if (context.update?.status === "pending") {
|
||||
const databasePath = path.join(root, "userdata", "state.sqlite");
|
||||
yield* fs.makeDirectory(path.dirname(databasePath), { recursive: true });
|
||||
yield* fs.writeFileString(databasePath, "before trial");
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off - embeds a path in fake child source.
|
||||
const encodedDatabasePath = JSON.stringify(databasePath);
|
||||
const childSource = `
|
||||
const context = JSON.parse(process.env.T3_SERVICE_LAUNCHER_CONTEXT);
|
||||
@@ -308,7 +306,6 @@ if (context.update?.status === "pending") {
|
||||
const original = "database before migration";
|
||||
yield* fs.makeDirectory(path.dirname(databasePath), { recursive: true });
|
||||
yield* fs.writeFileString(databasePath, original);
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off - embeds a path in fake child source.
|
||||
const encodedDatabasePath = JSON.stringify(databasePath);
|
||||
const childSource = `
|
||||
import { writeFileSync } from "node:fs";
|
||||
|
||||
@@ -39,7 +39,6 @@ describe("AzureDevOpsCli.layer", () => {
|
||||
mockRun.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
processOutput(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({
|
||||
pullRequestId: 42,
|
||||
title: "Add Azure provider",
|
||||
@@ -97,7 +96,6 @@ describe("AzureDevOpsCli.layer", () => {
|
||||
mockRun.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
processOutput(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({
|
||||
pullRequestId: 863,
|
||||
title: "Fix Azure link",
|
||||
@@ -134,7 +132,6 @@ describe("AzureDevOpsCli.layer", () => {
|
||||
mockRun.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
processOutput(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
pullRequestId: 7,
|
||||
@@ -195,7 +192,6 @@ describe("AzureDevOpsCli.layer", () => {
|
||||
mockRun.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
processOutput(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({
|
||||
name: "repo",
|
||||
webUrl: "https://dev.azure.com/acme/project/_git/repo",
|
||||
@@ -228,7 +224,6 @@ describe("AzureDevOpsCli.layer", () => {
|
||||
mockRun.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
processOutput(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({
|
||||
name: "repo",
|
||||
webUrl: "https://dev.azure.com/acme/project/_git/repo",
|
||||
|
||||
@@ -541,7 +541,6 @@ it.effect("creates repositories through the Bitbucket REST API", () => {
|
||||
assert.ok(request);
|
||||
const rawBody = (request.body as { readonly body?: Uint8Array }).body;
|
||||
assert.ok(rawBody);
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
assert.deepStrictEqual(JSON.parse(new TextDecoder().decode(rawBody)), {
|
||||
scm: "git",
|
||||
is_private: true,
|
||||
@@ -577,7 +576,6 @@ it.effect("creates pull requests using the official REST payload shape", () => {
|
||||
assert.ok(request);
|
||||
const rawBody = (request.body as { readonly body?: Uint8Array }).body;
|
||||
assert.ok(rawBody);
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
assert.deepStrictEqual(JSON.parse(new TextDecoder().decode(rawBody)), {
|
||||
title: "Provider PR",
|
||||
description: "PR body",
|
||||
|
||||
@@ -39,7 +39,6 @@ layer("GitLabCli.layer", (it) => {
|
||||
mockedRun.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
processOutput(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({
|
||||
iid: 42,
|
||||
title: "Add MR thread creation",
|
||||
@@ -94,7 +93,6 @@ layer("GitLabCli.layer", (it) => {
|
||||
mockedRun.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
processOutput(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify([
|
||||
{
|
||||
iid: 0,
|
||||
@@ -163,7 +161,6 @@ layer("GitLabCli.layer", (it) => {
|
||||
mockedRun.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
processOutput(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({
|
||||
path_with_namespace: "octocat/t3code",
|
||||
web_url: "https://gitlab.com/octocat/t3code",
|
||||
@@ -230,18 +227,10 @@ layer("GitLabCli.layer", (it) => {
|
||||
Effect.gen(function* () {
|
||||
mockedRun
|
||||
|
||||
.mockReturnValueOnce(Effect.succeed(processOutput(JSON.stringify({ id: 1234 }))))
|
||||
.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
processOutput(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({ id: 1234 }),
|
||||
),
|
||||
),
|
||||
)
|
||||
.mockReturnValueOnce(
|
||||
Effect.succeed(
|
||||
processOutput(
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({
|
||||
path_with_namespace: "octocat/t3code",
|
||||
web_url: "https://gitlab.com/octocat/t3code",
|
||||
|
||||
@@ -367,7 +367,6 @@ it.layer(layerClaudeTextGenerationTest)("ClaudeTextGeneration", (it) => {
|
||||
const claudeConfigDir = path.join(process.cwd(), ".claude-work-test");
|
||||
return yield* withFakeClaudeEnv(
|
||||
{
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
output: JSON.stringify({
|
||||
structured_output: {
|
||||
title: "Use Claude home",
|
||||
|
||||
@@ -42,7 +42,6 @@ describe("VcsProjectConfig", () => {
|
||||
yield* fileSystem.makeDirectory(nested, { recursive: true });
|
||||
yield* fileSystem.writeFileString(
|
||||
path.join(configDir, "vcs.json"),
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({ vcs: { kind: "jj" } }),
|
||||
);
|
||||
|
||||
@@ -72,7 +71,6 @@ describe("VcsProjectConfig", () => {
|
||||
yield* fileSystem.makeDirectory(configDir, { recursive: true });
|
||||
yield* fileSystem.writeFileString(
|
||||
path.join(configDir, "vcs.json"),
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
JSON.stringify({ vcs: { kind: "jj" } }),
|
||||
);
|
||||
|
||||
|
||||
@@ -240,7 +240,6 @@ describe("web cloud link environment client", () => {
|
||||
"http://127.0.0.1:3000/api/connect/preferences",
|
||||
);
|
||||
expect(fetchMock.mock.calls[0]?.[1]?.method).toBe("POST");
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
expect(JSON.parse(bodyText(fetchMock.mock.calls[0]?.[1]?.body))).toEqual({
|
||||
publishAgentActivity: true,
|
||||
});
|
||||
@@ -290,7 +289,6 @@ describe("web cloud link environment client", () => {
|
||||
expect(String(fetchMock.mock.calls[1]?.[0])).toBe(
|
||||
"http://127.0.0.1:3000/api/connect/link-proof",
|
||||
);
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
expect(JSON.parse(bodyText(fetchMock.mock.calls[1]?.[1]?.body))).toMatchObject({
|
||||
challenge: "challenge",
|
||||
endpoint: {
|
||||
@@ -341,11 +339,9 @@ describe("web cloud link environment client", () => {
|
||||
}),
|
||||
);
|
||||
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
expect(JSON.parse(bodyText(fetchMock.mock.calls[0]?.[1]?.body))).toMatchObject({
|
||||
managedTunnelsEnabled: false,
|
||||
});
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
expect(JSON.parse(bodyText(fetchMock.mock.calls[1]?.[1]?.body))).toMatchObject({
|
||||
endpoint: { providerKind: "manual" },
|
||||
});
|
||||
|
||||
@@ -71,7 +71,6 @@ describe("fetchEnvironmentPullRequestDiff", () => {
|
||||
: "";
|
||||
// The assertion deliberately inspects the serialized wire body rather than decoding a
|
||||
// domain value for use in application code.
|
||||
// @effect-diagnostics-next-line preferSchemaOverJson:off
|
||||
expect(JSON.parse(body)).toEqual({
|
||||
projectId: "project-1",
|
||||
repository: "owner/repository",
|
||||
|
||||
+7
-1
@@ -51,7 +51,13 @@
|
||||
"globalFetch": "error",
|
||||
"globalFetchInEffect": "error",
|
||||
"schemaNumber": "off"
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"include": ["**/*.test.ts", "**/*.test.tsx"],
|
||||
"options": { "diagnosticSeverity": { "preferSchemaOverJson": "off" } }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user