Skip to content

fix(paper2code): compare tool arguments when detecting loops - #299

Open
remote-controlled-man wants to merge 1 commit into
HKUDS:mainfrom
remote-controlled-man:codex/prflow-2fa91ed7d291
Open

remote-controlled-man wants to merge 1 commit into
HKUDS:mainfrom
remote-controlled-man:codex/prflow-2fa91ed7d291

Conversation

@remote-controlled-man

Copy link
Copy Markdown

Description

Paper2Code counted only tool names, so reading five different modules or writing several planned files consecutively could abort as a loop. Compare the tool name and a stable snapshot of its JSON arguments instead. Changed paths or content can proceed; repeated calls with identical arguments still stop the workflow, regardless of object key order.

Closes #294.

Changes Made

  • Pass tool arguments from the shared implementation-workflow wrapper into loop detection.
  • Preserve status probes, tool-name diagnostics, timeout, stall and error safeguards.
  • Add regression tests for distinct reads, writes across turns, changed content, mutable argument snapshots and nested key ordering; retain genuine-repeat coverage.
  • Update the English and Chinese changelogs.

Validation

Validated at 728e90f4fa969b2f0ac3435bf95bc26abc892a30:

  • Base reproduction: the fifth read of a different file aborts the workflow; the new regression passes with the fix.
  • Complete Python suite, Ubuntu 24.04 aarch64 / Python 3.12.3 with scripts/ci/requirements.lock: 3238 passed, 43 skipped.
  • pre-commit run --all-files --show-diff-on-failure and python -m pip check: passed.
  • Desktop/Web on Node 24.21.0: lint, 440 unit tests, typecheck, protocol check and npm run build (including version and Tauri-config checks): passed.
  • npm run test:web, using Chromium and the real local service: 2 passed.
  • Full-history Gitleaks scan: 754 commits, no leaks found.
  • Python wheel/sdist build, Twine checks and clean-environment distribution verification: passed. Both artifacts contain the changed runtime files byte-for-byte; their file lists contain no local test tools or environment directories.

Not run locally: Rust fmt/clippy/tests, Windows lifecycle checks, or the Python 3.13/3.14 matrix. These still need their remote CI results. No live provider calls were used. The existing large-chunk build warnings remain.

Checklist

  • Changes tested locally; platform limits are listed above.
  • Independent read-only code and requirements review completed.
  • Relevant regression tests added.
  • Documentation updated.

Copilot AI balanced review requested due to automatic review settings November 6, 2026 05:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Loop detector counts calls to the same tool on different files as a loop and aborts the implementation run

2 participants