Music-video autopilot handler tests never cover a soft-deleted project in priorRuns
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, node.js
- Domain
- testing
Research direction
Read server/services/scheduledHandlers/musicVideoAutopilot.test.js alongside server/services/scheduledHandlers/musicVideoAutopilot.js:31 to see how the projects fixture and run() assertions work. Add the specified soft-deleted project case and check that run() dispatches and countPending().count is 1. Done when removing || project.deleted makes the new test fail, with no production code change.
Written by the indexing model from the issue text.
Description
Slice audited: scheduled-work tests (test-quality audit, 2026-10-18).
Problem
server/services/scheduledHandlers/musicVideoAutopilot.js:31 skips soft-deleted projects in priorRuns (if (!run || project.deleted) continue;). No fixture in server/services/scheduledHandlers/musicVideoAutopilot.test.js sets deleted (zero occurrences of the word in the file).
Mutation probe (scratch worktree): changed the line to if (!run) continue;.
Tests 5 passed (5)
Impact
A project deleted while its scheduled autonomous run was in a live status permanently blocks the music-video-autopilot task ("waiting on a previous autonomous music video"), a configured scheduled job that silently never dispatches again, and a deleted completed run keeps its Brain idea marked used. The existing five cases cannot see this regression.
Fix (decided)
Add one case to musicVideoAutopilot.test.js: push { ...project('Gone', 'needs-human', 'zzz'), deleted: true } into the projects fixture and assert run() dispatches and countPending().count === 1. No production code change.
Scope: small
Acceptance criteria
- Removing
|| project.deletedfrompriorRunsfails the new case. - No production code change.
- Dominant language
- JavaScript
- Stars
- 38
- Forks
- 32
- Avg merge
- 31m
- Merged PRs (30d)
- 995
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
-
effort:medium model:medium plan planner:opus-5-5 security
Difficulty 3/5 1-2 days Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
effort:small model:medium
Difficulty 3/5 1-2 days Newbie friendliness 57/100
atomantic/PortOS#12526 · 1 comment ·
Maintainers usually reply within 1 day
-
bug effort:high model:heavy plan
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
bug effort:medium model:medium plan
Difficulty 3/5 1-2 days Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
area:federation bug data-integrity effort:medium model:heavy plan
Difficulty 4/5 1-2 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
All issues in atomantic/PortOS
Similar issues
-
task
Difficulty 1/5 Under an hour Newbie friendliness 83/100
TAMULib/fw-registry#550 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
-
NWCWalletService.subscribe: response is never published if the handler finishes after unsubscribe (regression in 8.1.0)Possibly taken @ajaysehwal claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
bigskysoftware/htmx#4151 ·
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100