authorgravatar for yordis.prieto@gmail.comYordis Prieto <yordis.prieto@gmail.com> 2026-10-04 00:52:13-04:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-10-03 21:52:13-07:00
logf870c419fc21f7ee23c122e60fb94adb8bf73a40
tree799e4eeab8c299c386d48f2182f187792debd1e0
parent1508552a16edebe29cab4820c54c16b75c142408
signature Signed by PGP key B5690EEEBB952194

test(server): the ACP registry's fake uv is a fixture file, not a generated string (#15484)

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>

2 files changed, 24 insertions(+), 26 deletions(-)

apps/server/src/provider/acp/AcpRegistrySupport.test.ts+2-26
...@@ -116,33 +116,9 @@ const makeFakeUvToolchain = Effect.fn("AcpRegistrySupport.test.makeFakeUvToolcha...@@ -116,33 +116,9 @@ const makeFakeUvToolchain = Effect.fn("AcpRegistrySupport.test.makeFakeUvToolcha
116 const logPath = path.join(rootDirectory, "uv.log");116 const logPath = path.join(rootDirectory, "uv.log");
117 yield* fileSystem.makeDirectory(toolchainBin, { recursive: true });117 yield* fileSystem.makeDirectory(toolchainBin, { recursive: true });
118 yield* fileSystem.writeFileString(logPath, "");118 yield* fileSystem.writeFileString(logPath, "");
119 yield* fileSystem.writeFileString(119 yield* fileSystem.copyFile(
120 yield* path.fromFileUrl(new URL("./testing/AcpRegistrySupport.uv.fixture.sh", import.meta.url)),
120 uvPath,121 uvPath,
121 [
122 "#!/bin/sh",
123 'printf \'%s\\n\' "$*" >> "$FAKE_UV_LOG"',
124 'tool_bin="${UV_TOOL_BIN_DIR:-$FAKE_UV_BIN}"',
125 'executable="$tool_bin/fast-agent"',
126 'printf "tool-dir=%s bin-dir=%s\\n" "$UV_TOOL_DIR" "$UV_TOOL_BIN_DIR" >> "$FAKE_UV_LOG"',
127 'if [ "$1" = "tool" ] && [ "$2" = "dir" ] && [ "$3" = "--bin" ]; then',
128 " printf '%s\\n' \"$tool_bin\"",
129 " exit 0",
130 "fi",
131 'if [ "$1" = "tool" ] && [ "$2" = "list" ]; then',
132 ' if [ -x "$executable" ]; then',
133 " printf 'fast-agent-acp v0.10.1\\n- fast-agent\\n'",
134 " fi",
135 " exit 0",
136 "fi",
137 'if [ "$1" = "tool" ] && [ "$2" = "install" ] && [ "$3" = "--force" ]; then',
138 ' mkdir -p "$tool_bin"',
139 " printf '#!/bin/sh\\n' > \"$executable\"",
140 ' chmod 755 "$executable"',
141 " exit 0",
142 "fi",
143 "exit 64",
144 "",
145 ].join("\n"),
146 );122 );
147 yield* fileSystem.chmod(uvPath, 0o755);123 yield* fileSystem.chmod(uvPath, 0o755);
148 return {124 return {
apps/server/src/provider/acp/testing/AcpRegistrySupport.uv.fixture.sh created+22
...@@ -0,0 +1,22 @@
1#!/bin/sh
2printf '%s\n' "$*" >> "$FAKE_UV_LOG"
3tool_bin="${UV_TOOL_BIN_DIR:-$FAKE_UV_BIN}"
4executable="$tool_bin/fast-agent"
5printf "tool-dir=%s bin-dir=%s\n" "$UV_TOOL_DIR" "$UV_TOOL_BIN_DIR" >> "$FAKE_UV_LOG"
6if [ "$1" = "tool" ] && [ "$2" = "dir" ] && [ "$3" = "--bin" ]; then
7 printf '%s\n' "$tool_bin"
8 exit 0
9fi
10if [ "$1" = "tool" ] && [ "$2" = "list" ]; then
11 if [ -x "$executable" ]; then
12 printf 'fast-agent-acp v0.10.1\n- fast-agent\n'
13 fi
14 exit 0
15fi
16if [ "$1" = "tool" ] && [ "$2" = "install" ] && [ "$3" = "--force" ]; then
17 mkdir -p "$tool_bin"
18 printf '#!/bin/sh\n' > "$executable"
19 chmod 755 "$executable"
20 exit 0
21fi
22exit 64