fix(active-memory): preserve setup time outside recall timeout#72620
Conversation
Greptile SummaryThis PR fixes a regression where Confidence Score: 4/5Safe to merge; the only finding is a minor observability inconsistency in the abort error message. No logic bugs or security issues found. The single comment is P2 (the abort message now reports the watchdog time rather than the user-configured timeout, which could confuse operators). P2-only findings cap confidence at 4/5. extensions/active-memory/index.ts — abort message wording (line 1792) Prompt To Fix All With AIThis is a comment left during a code review.
Path: extensions/active-memory/index.ts
Line: 1792
Comment:
**Abort message shows watchdog time, not configured timeout**
The error embedded in the abort signal now reports `watchdogTimeoutMs` (configured `timeoutMs` + 30 s grace), while the `start` log just above (line 1784) reports the user-facing `params.config.timeoutMs`. An operator seeing the abort message "active-memory timeout after 30010ms" for a plugin configured with `timeoutMs: 10` may be confused about which value to tune.
Consider keeping the configured timeout in the message and mentioning the watchdog separately:
```suggestion
controller.abort(new Error(`active-memory timeout after ${params.config.timeoutMs}ms (watchdog ${watchdogTimeoutMs}ms)`));
```
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "fix(active-memory): preserve setup time ..." | Re-trigger Greptile |
| const timeoutId = setTimeout(() => { | ||
| controller.abort(new Error(`active-memory timeout after ${params.config.timeoutMs}ms`)); | ||
| }, params.config.timeoutMs); | ||
| controller.abort(new Error(`active-memory timeout after ${watchdogTimeoutMs}ms`)); |
There was a problem hiding this comment.
Abort message shows watchdog time, not configured timeout
The error embedded in the abort signal now reports watchdogTimeoutMs (configured timeoutMs + 30 s grace), while the start log just above (line 1784) reports the user-facing params.config.timeoutMs. An operator seeing the abort message "active-memory timeout after 30010ms" for a plugin configured with timeoutMs: 10 may be confused about which value to tune.
Consider keeping the configured timeout in the message and mentioning the watchdog separately:
| controller.abort(new Error(`active-memory timeout after ${watchdogTimeoutMs}ms`)); | |
| controller.abort(new Error(`active-memory timeout after ${params.config.timeoutMs}ms (watchdog ${watchdogTimeoutMs}ms)`)); |
Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/active-memory/index.ts
Line: 1792
Comment:
**Abort message shows watchdog time, not configured timeout**
The error embedded in the abort signal now reports `watchdogTimeoutMs` (configured `timeoutMs` + 30 s grace), while the `start` log just above (line 1784) reports the user-facing `params.config.timeoutMs`. An operator seeing the abort message "active-memory timeout after 30010ms" for a plugin configured with `timeoutMs: 10` may be confused about which value to tune.
Consider keeping the configured timeout in the message and mentioning the watchdog separately:
```suggestion
controller.abort(new Error(`active-memory timeout after ${params.config.timeoutMs}ms (watchdog ${watchdogTimeoutMs}ms)`));
```
How can I resolve this? If you propose a fix, please make it concise.7d4dd0b to
6edebe3
Compare
|
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Keep this PR open. Current main still does not implement the PR's intended fix: Active Memory starts its outer abort watchdog at hook entry using the configured model Best possible solution: Keep this PR open for maintainer review. The best path is to revise or land the PR so Active Memory preserves the configured What I checked:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against f256eeba431b. |
6edebe3 to
4203f28
Compare
Summary
timeoutMsscoped to the embedded recall/model runtimeoutMsbut the recall itself still succeedsFixes #72606
Testing