fix(131): address P1 review findings (tool-call, Dockerfile, fly.toml, CI)#4
fix(131): address P1 review findings (tool-call, Dockerfile, fly.toml, CI)#4andreiships-bot merged 2 commits intodevfrom
Conversation
Fixes issues found during retroactive review of PRs #1, #2, #3. tool-call.ts: - Agent.defaultAgent() returns a name string, not Agent.Info — resolve with Agent.get() before passing to ToolRegistry.tools() - Fix agent: agent.id (undefined on string) → agent: agentName - Use agent's configured model instead of hardcoded opencode/default Dockerfile: - Quote $(find ...) and add existence check to prevent cryptic failures when binary is missing - Remove BUN_RUNTIME_TRANSPILER_CACHE_PATH env var — irrelevant for a compiled native binary that does not use Bun's transpiler fly.toml: - min_machines_running: 0 → 1 to avoid cold starts on interactive sessions scripts/ci/test-opencode-integration.sh: - Replace hardcoded /tmp/ paths with mktemp tmpdir + EXIT trap to avoid collisions in parallel CI runs .github/workflows/build-push.yml: - Gate :latest push on stable tags only (no pre-release suffix like -rc1) - Add provenance: false to prevent OCI attestation manifests from breaking fly deploy digest resolution - Explicitly set platforms: linux/amd64 to avoid silent arch mismatches
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Claude Single-Pass ReviewSummaryThis PR correctly and cleanly addresses all five P1 findings from the post-merge retroactive review. All five fixes are technically sound — the tool-call type correction, Dockerfile hardening, fly.toml cold-start fix, smoke test tmpdir isolation, and CI Findings[FINDING-1] nit: P2 | .github/workflows/build-push.yml:37 | When Code Quality
Recommendation[x] Approve | All P1 findings from the retroactive review are properly resolved. The single nit (blank line in tags block) is cosmetic and harmless. |
andreiships-bot
left a comment
There was a problem hiding this comment.
Claude Review
See inline comments for details.
All blacksmith-* runner labels replaced: - blacksmith-4vcpu-ubuntu-2404 → ubicloud-standard-2 - blacksmith-8vcpu-ubuntu-2404-arm → ubicloud-standard-8-arm - blacksmith-4vcpu-ubuntu-2404-arm → ubicloud-standard-2-arm - blacksmith-4vcpu-windows-2025 → windows-latest (no Ubicloud Windows runner)
Claude Single-Pass ReviewSummaryThis PR is a well-scoped retroactive fix addressing P1 findings from post-merge reviews of PRs #1-3, plus a CI runner migration from Blacksmith to Ubicloud. The substantive logic fixes in Findings[FINDING-1] nit: P2 | packages/opencode/src/server/routes/tool-call.ts:491 | [FINDING-2] nit: P2 | .github/workflows/build-push.yml:50 | When [FINDING-3] nit: P2 | .github/workflows/publish.yml:287 | Windows target now uses Code Quality
Recommendation[x] Approve with changes — the P2 nits above are optional hardening; the core fixes are correct and CI is green. Safe to merge. |
Claude Review - Out-of-Diff FindingsThe following findings are on lines outside the PR diff: packages/opencode/src/server/routes/tool-call.ts:491 .github/workflows/build-push.yml:50 .github/workflows/publish.yml:287 |
Gemini Deep ReviewSummaryThe PR successfully addresses several P1 review findings across CI workflows, Docker configuration, and the direct tool-call endpoint. Key improvements include the transition to Ubicloud runners, enhanced Docker binary detection, and fixing a type mismatch in the tool execution route. Findings[gemini-1] nit: P2 | .github/workflows/build-push.yml:32 | Bash-ism in CI script [gemini-2] issue: P1 | packages/opencode/src/server/routes/tool-call.ts:64 | Potential [gemini-3] nit: P2 | scripts/ci/test-opencode-integration.sh:78 | Fragile grep for SESSION_ID PR MetadataSuggested PR Title: Questions
Recommendation[ ] Approve | [X] Approve with changes | [ ] Request changes |
Summary
Retroactive fixes for P1 findings from post-merge review of PRs #1, #2, #3.
Agent.defaultAgent()returns a name string, notAgent.Info— now resolved withAgent.get()before passing toToolRegistry.tools();agent.idon a string isundefined, fixed to passagentName; use agent's configured model instead of hardcodedopencode/default$(find ...)+ add existence check; remove irrelevantBUN_RUNTIME_TRANSPILER_CACHE_PATH(compiled binary doesn't use Bun's transpiler)min_machines_running: 0 → 1to avoid cold starts on interactive sessions/tmp/paths withmktemptmpdir + EXIT trap for parallel-CI safety:lateston stable tags only; addprovenance: false; explicitplatforms: linux/amd64Test coverage
The
tool-call.tsbugs were type-level, not behavioral:Tool.Context.agent, soagent: undefinedcauses no runtime failureToolRegistry.tools()receiving a string instead ofAgent.Infoalso fails silently at runtimeExisting coverage that protects against regressions:
typecheck.yml— catches theAgent.Info/string type mismatch (would have blocked the original PRs if they had gone through PR flow)packages/opencode/test/server/tool-call.test.ts— 4 integration tests covering 404, 400, unknown tool, and successfulglobexecution (added in PR [131-1] feat: add POST /session/:id/tool/call direct tool execution endpoint #1)No new tests added — the existing test file is sufficient and
bun typecheckis the right guard for this category of type-correctness fix.Related
Closes findings from retroactive review:
Test plan
bun typecheckpasses (catches the Agent.Info fix)bun testpasses inpackages/opencode(existing 4 tests)v0.0.1-rc1→ verify:latestis NOT pushedv0.0.1→ verify:latestIS pushed