⚠️ Definition of Done: this issue must be completed in full, in a single PR. Do not split this
work across multiple PRs, and do not defer any Deliverable below to a follow-up issue. A PR that
satisfies only some of the Deliverables, stubs a required test, or leaves a checkbox
partially-done does NOT resolve this issue and will be closed.
Context
src/queue/processors.ts documents its own history of module-splitting (#4013, extracting pieces of what
was once a much larger file into dedicated modules like transient-locks.ts, signal-snapshot.ts,
duplicate-detection.ts, slop-detection.ts, pr-command-prologue.ts, retention.ts). Each "step N"
comment in this sequence describes whether the extracted module is imported back for an internal call,
re-exported for backward compatibility, or both. Steps 4-6 and step 9 each correctly pair a real local
import with the corresponding export.
Step 7's comment breaks that pattern:
// #4013 step 7: same shim shape for runRetentionPrune -- imported here for processJob's own internal call
// below, and re-exported so test/unit/retention.test.ts and test/unit/selfhost-pg-retention.test.ts's
// existing `import { ... } from "../../src/queue/processors"` keeps working unchanged.
import { runPrCommandPrologue, type PrCommandPrologueSpec } from "./pr-command-prologue";
export { runRetentionPrune } from "./retention";
The comment claims runRetentionPrune is "imported here for processJob's own internal call below" — but
there is no import { runRetentionPrune, ... } anywhere in this file (confirmed: grepping the file for
runRetentionPrune finds only the bare re-export on the last line above, nothing else), and no internal
call to it anywhere in processors.ts either. The real import and call site live in
src/queue/job-dispatch.ts (import at line 61, call at line 286) — processors.ts's own step 7 is an
export-only shim (mirroring how step 5/step 9 handle an export-only or import-back-only case elsewhere in
this same comment sequence), not the import-and-call shape the comment describes. The unrelated
runPrCommandPrologue import sitting on the line directly below the comment (belonging to a DIFFERENT step)
makes the mismatch easy to miss on a skim, since a reader's eye lands on an import statement right where
the comment promised one — just not the one the comment is actually describing.
Requirements
- The step-7 comment must accurately describe
runRetentionPrune's actual shape here: an export-only shim
(no local import, no internal call in this file), matching the phrasing convention this same comment
sequence already uses elsewhere in the file for an export-only or import-back-only step.
- This is a comment-only fix — no code behavior change, no change to what's exported, no change to
job-dispatch.ts's real import/call of runRetentionPrune.
Deliverables
Test Coverage Requirements
This is a comment-only change with no executable-code diff, so it does not add any new coverable lines/
branches under src/** and the Codecov patch gate has nothing new to measure here. Run the existing
test/unit/retention.test.ts and test/unit/selfhost-pg-retention.test.ts locally to confirm the
re-export itself is untouched and both suites still pass unmodified.
Expected Outcome
A future reader of processors.ts's #4013 step-by-step module-split history gets an accurate picture of
which pieces are actually imported-and-called locally versus purely re-exported for backward compatibility,
instead of being told runRetentionPrune is called internally when it is not.
Links & Resources
src/queue/processors.ts — the step-7 comment and re-export (around lines 452-456).
src/queue/job-dispatch.ts — the real runRetentionPrune import (line ~61) and call (line ~286), to cite
as the actual consumer in the corrected comment.
Context
src/queue/processors.tsdocuments its own history of module-splitting (#4013, extracting pieces of whatwas once a much larger file into dedicated modules like
transient-locks.ts,signal-snapshot.ts,duplicate-detection.ts,slop-detection.ts,pr-command-prologue.ts,retention.ts). Each "step N"comment in this sequence describes whether the extracted module is imported back for an internal call,
re-exported for backward compatibility, or both. Steps 4-6 and step 9 each correctly pair a real local
importwith the correspondingexport.Step 7's comment breaks that pattern:
The comment claims
runRetentionPruneis "imported here forprocessJob's own internal call below" — butthere is no
import { runRetentionPrune, ... }anywhere in this file (confirmed: grepping the file forrunRetentionPrunefinds only the bare re-export on the last line above, nothing else), and no internalcall to it anywhere in
processors.tseither. The real import and call site live insrc/queue/job-dispatch.ts(importat line 61, call at line 286) —processors.ts's own step 7 is anexport-only shim (mirroring how step 5/step 9 handle an export-only or import-back-only case elsewhere in
this same comment sequence), not the import-and-call shape the comment describes. The unrelated
runPrCommandPrologueimport sitting on the line directly below the comment (belonging to a DIFFERENT step)makes the mismatch easy to miss on a skim, since a reader's eye lands on an
importstatement right wherethe comment promised one — just not the one the comment is actually describing.
Requirements
runRetentionPrune's actual shape here: an export-only shim(no local import, no internal call in this file), matching the phrasing convention this same comment
sequence already uses elsewhere in the file for an export-only or import-back-only step.
job-dispatch.ts's real import/call ofrunRetentionPrune.Deliverables
export { runRetentionPrune } from "./retention";no longer claimsrunRetentionPruneis imported for an internal call insideprocessors.ts— it accurately statesthis is an export-only re-export shim (with the real caller identified as
job-dispatch.ts, mirroringhow the file's other correctly-worded step comments name their actual consumers).
Test Coverage Requirements
This is a comment-only change with no executable-code diff, so it does not add any new coverable lines/
branches under
src/**and the Codecov patch gate has nothing new to measure here. Run the existingtest/unit/retention.test.tsandtest/unit/selfhost-pg-retention.test.tslocally to confirm there-export itself is untouched and both suites still pass unmodified.
Expected Outcome
A future reader of
processors.ts's#4013step-by-step module-split history gets an accurate picture ofwhich pieces are actually imported-and-called locally versus purely re-exported for backward compatibility,
instead of being told
runRetentionPruneis called internally when it is not.Links & Resources
src/queue/processors.ts— the step-7 comment and re-export (around lines 452-456).src/queue/job-dispatch.ts— the realrunRetentionPruneimport (line ~61) and call (line ~286), to citeas the actual consumer in the corrected comment.