Skip to content

Commit 80da08b

Browse files
Remove git-init workaround from OpenCode CLI MCP tools harness (#142)
* chore: initialize issue #131 worktree * fix(mcp-tests): remove git-init workaround by bumping OpenCode to 1.18.1 OpenCode 1.16.2 silently emitted only step_start (exit 0, no inference, no MCP calls) when run headless in a non-Git directory, which forced a git install + `git init /app` workaround in the opencode-tools agent image. Empirical matrix in a pinned container showed no 1.16.2 config escape hatch (OPENCODE_CONFIG and snapshot:false both fail; upstream project-detection gap tracked as anomalyco/opencode#15192), while OpenCode 1.18.1 performs inference in a non-Git dir even with the git binary deleted. - Bump pinned OpenCode 1.16.2 -> 1.18.1 with updated sha256 - Drop git from apt install and remove `RUN git init /app` - Drop the workaround marker from agent-probe output and refresh the nightly workflow gotcha comment Verified: full `bun run test:opencode-tools` run against the new image passed (real opencode/big-pickle inference; three scenarios; two independently verified submissions). Closes #131 --------- Co-authored-by: 0o-de-lally <[email protected]>
1 parent 88c2cde commit 80da08b

3 files changed

Lines changed: 8 additions & 10 deletions

File tree

‎.github/workflows/committee-opencode-nightly.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
#
2222
# GOTCHAS
2323
# - The standalone OpenCode binary is pinned and checksum-verified in the test
24-
# image. Issue #131 tracks removal of the temporary `git init` workaround.
24+
# image. Keep the pin at >= 1.18.x: 1.16.2 required a `git init /app`
25+
# workaround for headless runs in a non-Git directory (removed by #131).
2526
#
2627
# CI taxonomy class: heavy (scheduled real external-model drift check). Heavy
2728
# suites are sweep-only: NO `pull_request` trigger — schedule + on-demand only.

‎mcp/tests/opencode-tools/Dockerfile‎

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,15 @@ FROM dependencies AS service
99
COPY mcp/ /app/
1010

1111
FROM dependencies AS agent
12-
ARG OPENCODE_VERSION=1.16.2
13-
ARG OPENCODE_LINUX_X64_SHA256=06a79c5bb7f8d01716b2440712cf67facd36db59188809aeb232374b206bd429
12+
# OpenCode >= 1.18.x performs headless inference and MCP tool calls in a
13+
# non-Git working directory; 1.16.2 silently emitted only `step_start` there,
14+
# which forced a `git init /app` workaround (removed by issue #131).
15+
ARG OPENCODE_VERSION=1.18.1
16+
ARG OPENCODE_LINUX_X64_SHA256=9ecce27cf529ade5f177fab478b4876b5c31d9ddc8216b994816acf192159511
1417
ARG RMPC_VERSION=v0.3.2
1518
ARG RMPC_LINUX_X64_SHA256=56342cba710ac4053b6ae9fd68f02cc15a5ff6ddb978e2581da54084d3a704e4
16-
# Temporary compatibility workaround tracked by
17-
# https://github.com/robotmoney/robotmoney-frontend/issues/131. OpenCode supports
18-
# non-Git projects, but this pinned CLI/model currently returns no headless text
19-
# or tool calls until the working directory is initialized as a repository.
2019
RUN apt-get update \
21-
&& apt-get install -y --no-install-recommends ca-certificates curl git jq \
20+
&& apt-get install -y --no-install-recommends ca-certificates curl jq \
2221
&& rm -rf /var/lib/apt/lists/* \
2322
&& curl -fsSLo /tmp/opencode.tar.gz \
2423
"https://github.com/anomalyco/opencode/releases/download/v${OPENCODE_VERSION}/opencode-linux-x64.tar.gz" \
@@ -32,4 +31,3 @@ RUN apt-get update \
3231
&& rm /tmp/opencode.tar.gz /tmp/rmpc.tar.gz
3332
COPY mcp/ /app/
3433
COPY mcp/tests/opencode-tools/opencode.json /app/opencode.json
35-
RUN git init /app

‎mcp/tests/opencode-tools/agent-probe.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ invariant(state.verifiedSubmissions === 2, "expected two independently verified
225225
console.log(JSON.stringify({
226226
ok: true,
227227
cli: "opencode run",
228-
workaround: "git init (issue #131)",
229228
scenarios: ["onboarding-pending", "first-participation", "steady-state"],
230229
verifiedSubmissions: state.verifiedSubmissions,
231230
}));

0 commit comments

Comments
 (0)