Repository navigation
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe Ollama native adapter tracks unresolved tool calls and defers assistant commentary while results are pending. It preserves tool-result order, settles an earlier batch when a new batch starts, and documents and tests these behaviors. ChangesOllama Native Tool Batches
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~12 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to No specific merge-blocking behavior is established. Complete the outstanding broader validation before treating the reported test results as a full-suite pass. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 4 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Deterministic PR hygiene checks passed. |
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. This pull request has been marked Ready for Review. Hygiene✅ Deterministic PR hygiene checks passed. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Superseded by #6519, merged into Current-head scoped CI passed: https://github.com/lidge-jun/opencodex/actions/runs/37131234397. Independent replay review exercised 2,316 synthetic permutations; this is not a live Ollama or physical tool execution claim. Final integrated cross-platform regression and production publication remain ahead. Thank you for the original fix. |
Carry source PR lidge-jun#6509 at de5bb1f with original authored commits and add adversarial regression coverage. Co-authored-by: potota90 <85318310+adtumk@users.noreply.github.com>
Summary
Codex can record assistant commentary between a tool-call batch and its genuine results. The native Ollama adapter previously settled the batch at that commentary, emitted unknown-status placeholders, then rejected the recorded results as
ollama-native orphan tool result.Keep the batch open across assistant text/thinking that introduces no new tool calls while results are outstanding. Serialize genuine results beside their originating calls, then release deferred messages in arrival order. For example,
calls A/B -> commentary -> result A/Bbecomescalls A/B -> result A/B -> commentaryon the native wire.A new tool-call batch still settles its predecessor. Missing results retain their explicit unknown-status marker; orphan IDs, duplicates, and mismatched tool names remain invalid. The input history is not mutated. This extends #4848's user/developer deferral to assistant commentary, including routed compaction replay. Architecture and user documentation describe the resulting behavior.
Verification
Scoped local validation is complete on Windows with Bun 1.4.0. No live provider continuation was exercised.
bun test tests/providers/ollama/ollama-native.test.ts: 32 pass / 0 fail, 144 assertions. The six added cases cover parallel and partially completed batches, text/thinking order and input immutability, completed batches, interrupted batches followed by new calls, and routed compaction. Existing strict validation still passes.devat3bae88cce7400e47a5e69f9fd28749ed25f919f6: 28 pass / 4 fail. The four failures detect commentary before genuine results.CI=true,bun run test --parallel=1 --timeout=60000 ./tests/providers/ollama/ ./tests/adapters/adapter-buffered-tool-conformance.test.ts ./tests/adapters/adapter-tool-conformance.test.ts ./tests/adapters/adapter-registry-authority.test.ts ./tests/adapters/identity-subagent.test.ts ./tests/adapters/anthropic/anthropic-tool-declaration-constraints.test.ts: 167 pass / 0 fail across 13 files, 831 assertions, on final headde5bb1f215c613670e03585e918a344c510ba97a.dev: 397 pass / 0 fail on each branch. Every one of the 63 earlier named failures matches a fresh passing case; the nine unnamed hook failures are absent from the complete fresh-file runs. Each file usedCI=trueandbun run test --parallel=1 --timeout=60000 ./tests/<file>, matching the repository CI's per-test budget. The slow Desktop file took 404 seconds on the PR branch and 403 seconds on stockdev.bun run typecheck,bun run privacy:scan,bun run structure:check, andbun scripts/file-size-ratchet.ts: passed after the documentation follow-ups. The last commit adds only a fixture docstring; its file-size check also passed, and the final-head 167-test run includes that fixture.docs-site/,bun install --frozen-lockfileandbun run build: passed; 561 pages built and 77,923 internal links checked. These documentation files have not changed since that build.git diff --cached --check: passed before each commit; the working tree is clean.Files re-run on both the PR branch and stock dev
Full-suite scope exception: The full 1,985-file
bun run testsuite was not run locally. The earlierbun run test:changedselected 530 files but exceeded its 900-second limit with Bun's default five-second per-test budget (exit 124; 8,402 passing records and 72 failing records, without a completed suite summary). Windows process/ACL operations in the affected Desktop cases take 8–25 seconds, and even an isolated Desktop file takes almost seven minutes. A full run is disproportionate on this host. Under the repository'sAGENTS.mdscoped-validation exception, coverage consists of the complete Ollama/shared conformance set plus the complete affected-file re-runs and stock-devcomparison above. The old incomplete run is not passing evidence; no failure persists in the fresh comparison. Remaining whole-repository and Linux/macOS coverage is left to required CI.CodeRabbit reviewed the final head and reported no actionable comments; there are no open review threads. Its docstring-coverage warning remains advisory. The branch contains the current
devtip. Cross-platform CI on the final head reportsaction_requiredand awaits maintainer approval; it has not passed and must succeed before merge. Review readiness uses the documented local scope exception and does not claim merge readiness.Checklist
Review readiness checklist
Required local validation passed; commands, results, and any full-suite exception are documented.
I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.