Repository navigation
fix(active-memory): isolate recall auth health - #71539
Conversation
Greptile SummaryThis PR isolates Active Memory recall sub-agent auth-health failures from the shared provider profile by introducing an Confidence Score: 4/5Safe to merge — fix is minimal, well-tested, and fully backward compatible; only a documentation nit was found. Logic is correct and the refactor preserves existing behavior exactly. Tests cover all three policy branches and the integration scenario. The sole finding is a P2 style suggestion about restoring the explanatory comment that was dropped when the inline function was extracted into its own module. No files require special attention. Prompt To Fix All With AIThis is a comment left during a code review.
Path: src/agents/pi-embedded-runner/run/auth-profile-failure-policy.ts
Line: 10-11
Comment:
**Missing explanatory comment for timeout exclusion**
The original inline function included a comment explaining why timeouts are excluded from auth-profile health (`// Timeouts are transport/model-path failures, not auth health signals, so they should not persist auth-profile failure state.`). Now that this logic lives in a standalone, importable module, the rationale is even more valuable for future readers who may not have the original PR context.
```suggestion
// Policy "local": sub-agent failures (e.g. recall billing/auth) must not
// pollute the shared provider profile used by normal turns.
// Timeouts are transport/model-path failures, not auth health signals,
// so they should not persist auth-profile failure state regardless of policy.
if (params.policy === "local" || !params.failoverReason || params.failoverReason === "timeout") {
return null;
}
```
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "fix(active-memory): isolate recall auth ..." | Re-trigger Greptile |
04a5653 to
5644eb6
Compare
🔒 Aisle Security AnalysisWe found 1 potential security issue(s) in this PR:
1. 🟡 Local auth-profile failure policy disables cooldown marking, enabling repeated failing provider calls
DescriptionThe new
Impact:
Vulnerable behavior is introduced by the combination of the new policy and the resolver logic. RecommendationDo not blanket-suppress auth-profile failure recording for Options:
export function resolveAuthProfileFailureReason({ failoverReason, policy }: {
failoverReason: FailoverReason | null;
policy?: AuthProfileFailurePolicy;
}): AuthProfileFailureReason | null {
if (!failoverReason || failoverReason === "timeout") return null;
if (policy === "local") {
// still poison shared state for non-transient credential/account failures
if (failoverReason === "auth" || failoverReason === "billing") return failoverReason;
return null;
}
return failoverReason;
}
Also consider adding rate limiting for recall sub-agent runs or enforcing caching keyed by normalized queries to reduce easy cache busting. Analyzed PR: #71539 at commit Last updated on: 2026-04-25T11:16:35Z |
* fix(agents): scope helper auth failures * fix(active-memory): isolate recall auth health * fix: isolate active memory auth health (openclaw#71539) * fix: avoid auth policy import cycle (openclaw#71539)
* fix(agents): scope helper auth failures * fix(active-memory): isolate recall auth health * fix: isolate active memory auth health (openclaw#71539) * fix: avoid auth policy import cycle (openclaw#71539)
* fix(agents): scope helper auth failures * fix(active-memory): isolate recall auth health * fix: isolate active memory auth health (openclaw#71539) * fix: avoid auth policy import cycle (openclaw#71539)
* fix(agents): scope helper auth failures * fix(active-memory): isolate recall auth health * fix: isolate active memory auth health (openclaw#71539) * fix: avoid auth policy import cycle (openclaw#71539)
* fix(agents): scope helper auth failures * fix(active-memory): isolate recall auth health * fix: isolate active memory auth health (openclaw#71539) * fix: avoid auth policy import cycle (openclaw#71539)
* fix(agents): scope helper auth failures * fix(active-memory): isolate recall auth health * fix: isolate active memory auth health (openclaw#71539) * fix: avoid auth policy import cycle (openclaw#71539)
* fix(agents): scope helper auth failures * fix(active-memory): isolate recall auth health * fix: isolate active memory auth health (openclaw#71539) * fix: avoid auth policy import cycle (openclaw#71539)
* fix(agents): scope helper auth failures * fix(active-memory): isolate recall auth health * fix: isolate active memory auth health (openclaw#71539) * fix: avoid auth policy import cycle (openclaw#71539)
Fixes #71284.
Active Memory recall runs now use local auth-health failure policy, so silent helper billing/auth failures do not disable the shared provider profile used by normal turns.
Validation: