Skip to content

Avoid copying archived jobs for taskman reads - #230

Merged
iamwavecut merged 2 commits into
mainfrom
fix/taskman-borrowed-inspection
Oct 10, 2026
Merged

iamwavecut merged 2 commits into
mainfrom
fix/taskman-borrowed-inspection

Conversation

@iamwavecut

Copy link
Copy Markdown
Owner

Taskman diagnostics and edited-message lookup cloned every archived job payload before counting, paging, or finding one pending dialog. With a large archive, these reads allocated an extra copy of all prompts, checkpoints, messages, and events under the queue lock.

Read borrowed records under the existing lock. Build list metadata for the requested page, collect only IDs for admin deletion, and clone only the matching pending dialog for an edit. Remove the redundant runtime record wrapper. Public filters, totals, ordering, diagnostics, detail lookup, retention, and persisted records keep their existing meaning.

Validation:

  • Workspace/all-target tests and Clippy with warnings denied; formatting checked.
  • Pagination and search assertions cover totals before paging; edited lookup covers completed, processing, other-chat, and other-message records.
  • Local benchmark: 1,000 archived jobs with 62.5 MiB of text, 100 reads. Median scan: 1,614 µs with full copies versus 7 µs with borrowed reads. Peak RSS: 133.3 MiB versus 66.9 MiB. This measures the allocation change locally; production memory remains subject to post-deploy observation.

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Messages
📖 Danger checked 3 changed file(s).

Generated by 🚫 dangerJS against 90658de

@iamwavecut
iamwavecut merged commit 4081885 into main Oct 10, 2026
12 checks passed
@iamwavecut
iamwavecut deleted the fix/taskman-borrowed-inspection branch October 10, 2026 13:31
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.

1 participant