Weekly refresh-local-llm-catalog job logs two 'Task not found' faults per run
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 4/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 58/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, node.js
Research direction
Trace the cosJobScheduler spawn path and generateTaskFromJob() in server/services/autonomousJobs/skillTemplates.js, then inspect the claim and finalization writes in server/services/agentSpawnDispatch.js and server/services/agentFinalization.js. Start by adding the regression test from the decision section to check whether the job task exists in the internal store at claim time. The fix is done when scheduled runs stop logging Task not found, deletion of a persisted running task still warns, and run history and task status stay unchanged.
Written by the indexing model from the issue text.
Description
Problem
The weekly refresh-local-llm-catalog autonomous job logs two stderr faults on every run:
⚠️ in_progress claim for task job-refresh-local-llm-catalog-<ts> returned an error (taskType=internal): Task not found
⚠️ Failed to update completed task job-refresh-local-llm-catalog-<ts>: Task not found (taskType=internal)
Evidence (PM2 server error log, last 30 days): 14 Task not found task-update lines; 11 are this job, on three consecutive Mondays at the same hour (the job's weekly cadence). The rest are app-improve-* / self-improve-* tasks updated after the user deleted them mid-run, which is a legitimate "task vanished" case.
Both lines come from updateTask(task.id, …, 'internal') returning { error: 'Task not found' }:
server/services/agentSpawnDispatch.js— thein_progressclaim right after the agent initializes.server/services/agentFinalization.js— the terminal status write (Failed to update <label> task …).
The job's task is built by generateTaskFromJob() in server/services/autonomousJobs/skillTemplates.js (its id is <job.id>-<base36 timestamp>). Hypothesis to verify first: that synthetic task reaches spawnAgentForTask without ever being written to the internal task store (or is removed before the claim), so both status writes are no-ops reported as faults.
This surfaced while re-leveling stderr logging in #12850: a line that fires every week for a healthy scheduled job is not "investigate" material, but a task that really vanished mid-run still is.
Decision
- Add a regression test that drives the
cosJobSchedulerspawn path for a skill-template job and asserts whether the task exists in the internal store at claim time. - If job tasks are meant to be persisted before spawn, persist this one (fix the ordering). If they are intentionally ephemeral, skip the
updateTaskstatus writes for a non-persisted job task (look it up first) so neither line is emitted. - Keep the warn for a persisted task that disappears mid-run (user delete), which is the case worth surfacing.
Acceptance criteria
- A weekly
refresh-local-llm-catalogrun emits noTask not foundline. - Deleting a running persisted task still logs the
Failed to update … Task not foundwarn. - The job's run history and task status are unchanged by the fix.
Related to #12850. Dispatch rationale: model:medium and effort:medium — a routine multi-file lifecycle trace; neither axis is stretched.
- Dominant language
- JavaScript
- Stars
- 38
- Forks
- 32
- Avg merge
- 44m
- Merged PRs (30d)
- 990
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from atomantic/PortOS
-
area:media blocked cuda effort:high enhancement help wanted model:medium plan windows
Difficulty 4/5 3-5 days Newbie friendliness 35/100
atomantic/PortOS#13683 · 1 comment ·
Maintainers usually reply within 1 day
-
apple-silicon area:media blocked effort:high enhancement help wanted macos model:heavy plan
Difficulty 5/5 Over a week Newbie friendliness 20/100
atomantic/PortOS#13682 · 1 comment ·
Maintainers usually reply within 1 day
-
area:media blocked cuda effort:medium help wanted model:medium plan windows
Difficulty 3/5 1-2 days Newbie friendliness 35/100
atomantic/PortOS#13681 · 1 comment ·
Maintainers usually reply within 1 day
-
apple-silicon area:media blocked effort:medium help wanted macos model:medium plan
Difficulty 4/5 3-5 days Newbie friendliness 28/100
atomantic/PortOS#13680 · 1 comment ·
Maintainers usually reply within 1 day
-
area:media blocked effort:high model:medium plan planner:gpt-6-1-sol
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
All issues in atomantic/PortOS
Similar issues
-
Link Checker ReportOpenautomated issue report
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100
microsoft/playwright#43640 ·
Maintainers usually reply within 1 day
-
✏️ Editing - Tags
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
openfoodfacts/openfoodfacts-server#15127 ·
Maintainers usually reply within 1 day
-
enhancement good first issue hacktoberfest help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Andbal23/dynamic-music-pill#195 ·
Maintainers usually reply within 1 day