Skip to content

fix: avoid infinite recursion - #2629

Open
liamdebeasi wants to merge 3 commits into
mainfrom
ld/infinite-recursion-fix
Open

fix: avoid infinite recursion#2629
liamdebeasi wants to merge 3 commits into
mainfrom
ld/infinite-recursion-fix

Conversation

@liamdebeasi

Copy link
Copy Markdown
Contributor

Rows that are errored + stale_run causes getRunByThread to continually return true, so it recurses infinitely. This PR changes it so there's an escape hatch for this state to avoid the infinite recursion.

@liamdebeasi
liamdebeasi marked this pull request as ready for review August 4, 2026 19:50
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Here's a visual recap of what changed:

Visual recap

Open the full interactive recap

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

builder-io-integration[bot]

This comment was marked as outdated.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@liamdebeasi
liamdebeasi requested review from a team and NKoech123 and removed request for a team August 4, 2026 20:08
@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@builder-io-integration builder-io-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.

Builder reviewed your changes — looks good ✅

Review Details

Code Review Summary

This incremental review covers the latest PR #2629 state, including the @agent-native/core patch changeset alongside the run-store convergence guard and regression tests. The production change reads the current terminal fields before issuing the existing guarded UPDATE, so a row that already matches the event-derived terminal state returns false rather than falsely reporting a repair and recursively re-entering getRunByThread.

The approach remains sound. The stale-run path intentionally allows the first reconciliation to normalize the reaper-written terminal values; subsequent calls reach a fixed point and stop recursion. The regression suite covers repair of a running row, repeated reconciliation of a settled row, and bounded stale-run lookup. Two independent reviewers found no confirmed reportable issues, and the changeset is correctly scoped as a patch release for @agent-native/core.

✅ No new reportable issues found in this incremental review.
✅ SQL remains parameterized and dialect-neutral.
✅ Browser impact is absent.

Risk assessment: Standard.

🧪 Browser testing: Skipped — PR only modifies backend run-store logic, tests, and release metadata, no UI impact

@netlify

This comment has been minimized.

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.

2 participants