fix(server): allow large Azure DevOps PR lists (#8572)

Co-authored-by: Simone <[email protected]>
This commit is contained in:
SimoneandSimone authored and GitHub committed 2026-09-02 00:43:10 -07:00
1 parent 4116db9807
commit a56b0cd717
4 files changed
+72 -1

No files matched your search

@@ -332,6 +332,28 @@ describe("AzureDevOpsCli.layer", () => {
}).pipe(Effect.provide(layer)),
);
it.effect("forwards explicit output limits to the process boundary", () =>
Effect.gen(function* () {
mockRun.mockReturnValueOnce(Effect.succeed(processOutput("")));
const az = yield* AzureDevOpsCli.AzureDevOpsCli;
yield* az.execute({
cwd: "/repo",
args: ["repos", "pr", "list"],
maxOutputBytes: 16 * 1024 * 1024,
});
expect(mockRun).toHaveBeenCalledWith({
operation: "AzureDevOpsCli.execute",
command: "az",
args: ["repos", "pr", "list"],
cwd: "/repo",
timeoutMs: 30_000,
maxOutputBytes: 16 * 1024 * 1024,
});
}).pipe(Effect.provide(layer)),
);
it.effect("preserves VCS causes without copying upstream details into messages", () =>
Effect.gen(function* () {
const cause = new VcsProcessExitError({
@@ -218,6 +218,7 @@ export class AzureDevOpsCli extends Context.Service<
readonly cwd: string;
readonly args: ReadonlyArray<string>;
readonly timeoutMs?: number;
readonly maxOutputBytes?: number;
}) => Effect.Effect<VcsProcess.VcsProcessOutput, AzureDevOpsCliError>;
readonly listPullRequests: (input: {
@@ -362,6 +363,7 @@ export const make = Effect.gen(function* () {
args: input.args,
cwd: input.cwd,
timeoutMs: input.timeoutMs ?? DEFAULT_TIMEOUT_MS,
...(input.maxOutputBytes === undefined ? {} : { maxOutputBytes: input.maxOutputBytes }),
})
.pipe(
Effect.mapError((error) =>