Skip to content

Report confirmed edits directly from tool results - #2229

Open
BlueHotDog wants to merge 2 commits into
mainfrom
feat/ads-edit-eligibility
Open

BlueHotDog wants to merge 2 commits into
mainfrom
feat/ads-edit-eligibility

Conversation

@BlueHotDog

@BlueHotDog BlueHotDog commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Part 1 of #2229 → #2230 → #2231. File tools and selected WordPress/WooCommerce tools report a top-level changed: true when 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 and git diff --check passed. The WordPress runtime suite was blocked by its container mount.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T20:24:37.956741Z a3c8a1d New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

Comment on lines +132 to +134
|> InteractionSchema.completed_edits(excluded_completion_id, @editing_tools)
|> Repo.stream(max_rows: 10)
|> Enum.any?(fn {name, result} -> editing_success?(name, result) end)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@BlueHotDog BlueHotDog changed the title Recognize successful edits from existing history Report confirmed edits directly from tool results Nov 23, 2026

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.

1 participant