GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — mcpx: touch-on-read terminal task retention (#2546) by dezren39 · Pull Request #5754 · developing-today/code Conversation
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 22 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 61f7e52ff4
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if s.set != nil { | ||
| s.tasks.Configure(s.set.Duration("tasks.ttl"), s.set.Duration("tasks.maxAge")) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Refresh retention settings on MCP task access too
When tasks.maxAge is changed through /v1/settings and subsequent task traffic uses only MCP, the change never reaches the shared store. cli/root.go obtains srv.TaskStore() once and injects that pointer through cli/serve.go; mcpserver.Server.tasks() then returns the cached pointer without invoking this accessor. The settings handler updates the settings set but does not configure the store either. Consequently, newly completed tasks and public MCP reads continue using the old ceiling until a /v1 task request happens, despite the setting being advertised and acknowledged as hot. Apply retention updates through a settings callback or refresh them on the MCP access path as well.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if expiresMs <= 0 { | ||
| expiresAt = deadline(t.LastUpdatedAt, *t.LastTouched, time.Duration(ttlMs)*time.Millisecond, s.maxAge) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Preserve promised retention when migrating existing task rows
When upgrading a deployment with protoTasks.maxTTL=4h and configuring tasks.maxAge=4h, a legacy result completed two hours ago with a four-hour TTL is deleted during startup. Open initializes the store with the built-in one-hour maximum and migrates existing rows before daemon.taskStore() applies deployment settings, so this calculation expires the row and deletes its result before Configure can preserve it. The previous implementation retained that result until completion plus its stored TTL. Initialize retention settings before migration, or preserve legacy rows' existing TTL-derived deadlines.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| s.armExpiryLocked(t, time.Duration(t.TTL)*time.Millisecond) | ||
| now := t.LastUpdatedAt | ||
| t.LastTouched = &now | ||
| expires := deadline(t.LastUpdatedAt, now, time.Duration(t.TTL)*time.Millisecond, s.maxAge) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Preserve the backing-task retention floor under maxAge
With tasks.maxAge=100ms and the default one-second task poll interval, answering a question can turn a successful daemon-backed MCP task into a failure. StartWithDeadline deliberately floors backing-result retention at two poll intervals, but this clamp overrides that floor. driveAsked sleeps for a full poll interval while a question is open, and updateAsked does not wake it after sending an answer; if the upstream finishes during that sleep, the backing result is deleted before the next poll. That poll reaches the 404 branch in daemon/routes_proto.go's handleAskPoll, and driveAsked converts the retrieval error into a failed outer task. Preserve the collection window for internal backing tasks or prevent incompatible maximum-age/poll settings.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
mcpx TTL convention follow-up: tasks family touch-on-read (#1884 remainder)
There was an error while loading. Please reload this page.