Repository navigation
Report confirmed edits directly from tool results - #2229
BlueHotDog wants to merge 2 commits into
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Devin Review found 1 potential issue.
1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
| |> InteractionSchema.completed_edits(excluded_completion_id, @editing_tools) | ||
| |> Repo.stream(max_rows: 10) | ||
| |> Enum.any?(fn {name, result} -> editing_success?(name, result) end) |
There was a problem hiding this comment.
🟡 Unbounded completed-edit history scan
Without a qualifying edit, earlier_edit? scans every historical candidate; max_rows: 10 limits each fetch, not total work. Neither the query nor its consumer supplies the explicit stream bound required by the Elixir guidelines.
Learn more
The database cursor fetches ten rows at a time, but Enum.any?/2 continues until it finds a qualifying result or exhausts the entire query. The completed-edits query contains no explicit row or history bound. This violates the repository's explicit bound requirement without implying any measured production slowdown.
Example: A user with 500 completed dry-run editing results causes 50 fetch batches before the check returns false, despite max_rows: 10.
Recommended fix: Define an explicit supported history/work bound and enforce it in the query or enumeration. Preserve eligibility semantics when that bound is reached: do not silently treat an incomplete search as proof that no earlier edit exists. If exhaustive historical searches are required, obtain and document an exception to the stream-bound rule.
Was this helpful? React with 👍 or 👎 to provide feedback.
Part 1 of #2229 → #2230 → #2231. File tools and selected WordPress/WooCommerce tools report a top-level
changed: truewhen they confirm a mutation. The protocol and task persistence preserve that marker. There is no tool-name catalog, historical scan, or advertising delivery in this stage. Tools without a marker do not count.Validation:
make build, 335 core tests, 33 protocol tests, PHP lint andgit diff --checkpassed. The WordPress runtime suite was blocked by its container mount.