You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Task deletion can leave ActorTemplates from later list pages #360
Task deletion lists ActorTemplates through Client.ListActorTemplates, but the client currently returns only the first response page. Agent Substrate may return a bounded page with a non-empty next_page_token, so a Task-owned template on a later page is not discovered or deleted.
Deletion reconciliation still succeeds in this case, allowing the Task record to be removed while the later-page template remains.
With the current Substrate implementation, this can occur when a Task-owned template sorts after the first 1000 ActorTemplates in the atespace.
What did you expect to happen?
Task deletion should examine all ActorTemplate pages and remove every template belonging to the deleted Task, including templates from earlier Task spec revisions.
How can it be reproduced?
Using the existing in-process mock Substrate server:
Return an unrelated template and/or a Task-owned template on the first ListActorTemplates page, together with a non-empty continuation token.
Return another template belonging to the Task on the second page.
Run ReconcileDelete for that Task.
Before the fix, AX requests only the first page, reconciliation returns successfully, and the later-page Task template remains undeleted.
Additional context
Agent Substrate explicitly supports page_token and next_page_token. I reproduced this deterministically through AX's existing reconciliation and gRPC client path.
I also have a tested fix and regression test ready in my fork:
The fix makes Client.ListActorTemplates follow continuation tokens, matching its existing "all ActorTemplates" abstraction. Errors from later pages are returned rather than treating a partial listing as complete.
Pull request creation is currently restricted for this repository. I'm happy to submit the patch if maintainers would like me to proceed.
Fix ready: implemented on my fork (branch fix/360-actortemplate-pagination, regression test included, make test green) and ready to PR — but this repo's collaborators_only PR creation policy rejects PRs from non-collaborators (see #358), so I cannot open it. If PR creation opens for external contributors, I will open the PR immediately. Happy to adjust scope per maintainer feedback.
Activity
arbazkhan971 commentedon Sep 22, 2026
Fix ready: implemented on my fork (branch
fix/360-actortemplate-pagination, regression test included,make testgreen) and ready to PR — but this repo'scollaborators_onlyPR creation policy rejects PRs from non-collaborators (see #358), so I cannot open it. If PR creation opens for external contributors, I will open the PR immediately. Happy to adjust scope per maintainer feedback.go mod tidy (google#360)
ericcurtin commentedon Sep 27, 2026
I ran into this same PR creation restriction. Fix and regression test here: ericcurtin#2
Happy to open against google/ax directly if a maintainer enables it, or if someone wants to cherry-pick the commit.