Repository navigation
Conversation
|
Independent GPT-6.1 Sol review (correctness). Workspace paths sanitized; findings and limitations preserved. Independent correctness and integration reviewScope: four uncommitted files in FindingsNo Critical or Important finding identified in the scoped patch.
Evidence inspectedThe verification receipt records pre-edit RED failures, four actual local provider-loop cases covering stop/ordinary-deny/allow/continue-policy, 17 final processor tests, earlier 119 read/retry/processor tests, final package typecheck, formatting and diff checks. These were inspected, not independently rerun during this read-only review. No live calls, product runtime operation or source writes were performed. Limits and residual risk
Conclusion: the narrow invalid-range recovery guard and denial-policy integration are coherent with the inspected evidence, subject to the history/stat limitations above. Normal PR review and hosted CI remain separate gates. |
|
Independent GPT-6.1 Sol review (integration). Workspace paths sanitized; findings and limitations preserved. OpenCode read-range patch: independent integration/simplicity reviewReviewed four uncommitted files in read-range-loop against base origin/v1 006d837, repository instructions, surrounding read authorization/tool lifecycle, generic doom-loop permission path, and supplied verification manifest. All four source SHA256 values match the local verification receipt. Read-only review; no test rerun, network/runtime calls or source writes. VerdictNo Critical or Important finding identified. The patch is scoped and understandable; no broader feature expansion recommended. Equivalence and behavior
Permission integration
Tests and evidence limitsThe supplied evidence records RED for rotating offsets and processor continuation, then green read/retry/processor and four policy integration cases plus typecheck/format/diff checks. Tests exercise actual read/processor modules and a local synthetic TestLLMServer; they distinguish denied loop termination from normal read denial, explicit loop allow and continue-on-deny behavior. The manifest correctly notes which119-test run preceded the narrow processor change and records a fresh17-test processor run and four final policy cases afterward. I inspected source/tests and manifest, not a new independent execution. No claim is made that the installed runtime was replaced, a live transcript replay was performed, historical stale tool rows were repaired, or model performance improved. Full historical/session execution outside the current model-visible history is not covered. Stat identity is a practical version heuristic, not proof of byte equality: same-size content changes with identical/coarse/restored timestamps and unchanged observed line count can remain in one group. Current metadata strategy and manifest acknowledge this limitation. I do not recommend adding full-file hashing or persistent ownership machinery to this bounded fix. Counting is limited to current Tool.Context history after the latest user boundary, including its compaction horizon. Explicit permission/config choices may intentionally permit continued attempts. These are documented behavior limits, not hidden completion claims. |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
Independent GPT-6.1 Sol correctness review. Publisher verification: the reviewed frozen patch was committed unchanged as Combined loop-guard correctness reviewVerdict: no remaining Critical or Important finding in the frozen final working patch reviewed below. This narrow rereview supersedes the earlier e425 history-delegation verdict. It is source/local-contract review, not CI or PR-readiness approval. Checkout: isolated Eight-file scope: session/processor.ts, session/tools.ts, tool/read.ts, and their prompt, processor-effect, tools, compaction and read tests under packages/opencode. Reviewer made no tracked source/test edits. Final approval and history semantics
Findings closed and credit
Historical e425 review: /tmp/opencode-combined-loop-correctness-review-e425-20261030.md. Original RED observations: /tmp/opencode-combined-loop-correctness-review-red-observations-20261030.md and the session tool transcript. The original outside-source probe log paths were overwritten by GREEN reruns and must not be cited as RED files; root/writer permanent regression artifacts retain separate baseline evidence. Independent final verificationPinned Bun1.4.4 with isolated HOME/OPENCODE_TEST_HOME/XDG config/data/state/cache; local synthetic fixtures and real local ReadTool execution only: bun1.4.4 test test/session/prompt.test.ts test/tool/read.test.ts --test-name-pattern 'invalid reads reach|asks only once|pending invalid-range|pending doom loop|changed file or new user' --timeout30000 Result:8pass,0fail,23assertions; Bun exit0. Exact GREEN output: /tmp/opencode-per-call-correctness-green-20261030.log. Exit receipt: /tmp/opencode-per-call-correctness-green-exit-20261030.txt. These cases cover same/mixed/varied assistant histories, one approval for identical invalid and valid reads, both generic and specialized pending permission cancellation, and changed-file/new-user reset. The frozen working diff digest was checked unchanged after the run. git diff --check: exit0. Writer additionally reports20focused cases passing with99assertions, package typecheck exit0, formatting and diff checks passing. Root/writer are running the full5-file suite on the final content. Those broader checks were not repeated by this reviewer. Limits and next gate
|
|
Independent GPT-6.1 Sol integration review. Publisher verification: the reviewed frozen patch was committed unchanged as Combined loop integration reviewPR: #60443 Initial reviewed head: Finding I1: provider-executed calls lost their existing loop guard (closed at e425ef0)
Provider-executed tools do not invoke those wrappers. Preserve an event-time check for provider-executed calls only. It cannot prevent the already executed server-side call, but must stop subsequent continuation when the loop policy denies it. Client-owned calls should retain the new pre-execution gate. Independent reproductionTemporary fixture: Log: From /tmp/opencode-infra-toolchain-20261030/bun-darwin-aarch64/bun test /tmp/opencode-provider-loop-review.test.ts --preload ./test/preload.ts --timeout 30000The existing processor fixture seam emits three identical I1 closureAt Reran the exact unchanged temporary reproduction above on that head: exit 0, 1 passed, 0 failed. It now returns Finding I2: range delegation skips the current provider-turn history (closed in final frozen patch)At If the preceding two invalid reads completed within the same provider turn, the generic gate sees those errors and delegates, while ReadTool cannot see either error. The third identical invalid read therefore receives neither doom-loop gate. This reintroduces an extra provider continuation under an explicit deny policy. Delegate only when the prior range failures are available to ReadTool's history; retaining the generic gate for prior failures in the current assistant message is one small option. Mixed current/prior-turn cases need the same care. Independent I2 reproductionFixture: Log: From /tmp/opencode-infra-toolchain-20261030/bun-darwin-aarch64/bun test /tmp/opencode-same-turn-read-review.test.ts --preload ./test/preload.ts --timeout 30000This uses the actual SessionTools and ReadTool executors, sequentially within one synthetic provider stream, against an isolated three-line file and test database. No historical rows are seeded or modified. Three identical out-of-range requests all persist under the same assistant message with ordinary range errors despite I2 closure and final narrow reviewThe final frozen patch removes the delegation heuristic. The generic gate returns a boolean only after that invocation matched the exact-call threshold and permission succeeded. The registry captures it in a newly constructed invocation context as For invalid ranges, ReadTool also fetches the current assistant's persisted parts and merges them with captured history after its newest user boundary, deduplicating by part ID with fresh parts winning. This makes current-turn and mixed-turn failures visible while retaining canonical-path, version, and line-count grouping. The database requirement is declared, the direct read harness now supplies Database.node, and the production ToolRegistry already supplies it. Ordinary successful reads do not issue the new current-parts query. Independently reran the exact unchanged I2 fixture against the frozen patch: exit 0, 1 passed, 0 failed, 2 assertions; exactly three calls, with the third denied. Green log: Also ran a second temporary fixture changing only offsets from identical 10 to 10/11/12 within the same provider turn: exit 0, 1 passed, 0 failed, 2 assertions; again exactly three calls and the third denied. Fixture: The exact-call denial occurs before the third ReadTool body; the varied-offset case reaches the version-aware range gate. Both are local synthetic provider-stream tests using the actual registry/read executors and isolated test data. I inspected the writer's same/mixed/varied regression cases and paired one-approval cases; I did not independently repeat the full suite or mixed-history case. Other reviewed contracts
StatusI1 and I2 are closed with recorded RED-to-GREEN evidence. No remaining Important/Critical finding in the final frozen source identified above. Root owns final combined checks, immutable commit/publication, and CI readiness. The generic equality policy remains exact JSON serialization with a bounded history window; provider-side execution of the current event cannot be undone by the retained event-time gate. These fixtures are not live-provider evidence or a measured performance claim. Broad suites were not repeated for this review. No checkout files were edited by the reviewer. |
Issue for this PR
Closes #60442
Closes #60448
Type of change
What does this PR do?
Apply the existing
doom_looppolicy across assistant messages, before local tools execute. Three identical calls now reach the permission gate using current agent/session rules. Allow, rejection feedback andcontinue_loop_on_denyretain their behavior; a new user message resets the history. The scan is bounded to 16 messages.A file/version-aware guard also catches invalid read offsets that vary or have successful rereads between them. It includes completed reads from the current assistant response. Approval is shared only within the current invocation, avoiding duplicate prompts. Cancellation removes pending permission requests and prevents late execution after approval.
Provider-executed calls retain their event-time policy check, including persisted provider metadata. This stops subsequent continuation; it cannot undo a call already executed by the provider. Generic tool streaming and structured-output contracts are unchanged.
How did you verify your code works?
git diff --checkpassed.All provider responses in these tests are synthetic. This does not establish historical incident causation or repair old session rows. Related #53032 targets the newer
devarchitecture and includes a separate watchdog; this change targetsv1. No active coordination files are affected.Screenshots / recordings
Nonvisual exemption: tool execution, permissions and terminal-state handling only; no GUI or styling changes.
Draft head
922f9170d9bcb47349abd59cf2819a4649d00ae5is 0 commits behind freshly fetchedorigin/v1; GitHub reportsMERGEABLE/BLOCKED. Required tests and typecheck areaction_required, awaiting maintainer approval. The publisher has read-only upstream permission. This is not a hosted-CI-pass or readiness claim.Checklist