Problem
Several comments are incorrect or stale:
1. PendingServerCleanupRoutine.ts:6 — Wrong schedule comment
// Schedule a job to run every 10 minutes
schedule.scheduleJob('*/15 * * * *', ...); // Actually every 15 minutes!
2. TerminatePendingServers.ts:66 — Stale Node.js polyfill comment
// Use a local AggregateError polyfill (for Node <15)
const error = new Error(`...`);
(error as any).errors = ...;
The project requires and runs on Node 24. AggregateError is natively available. The comment is misleading, and the code should use native AggregateError.
3. TerminatePendingServers.ts:67 — Log message says wrong threshold
eventMessage: `Server ${server.serverId} terminated after being stuck in pending for over 10 minutes.`
But the actual threshold check is:
if (pendingDuration >= 15 * 60 * 1000) { // 15 minutes
4. DefaultTaskDefinitionService.ts:89 — Stale TODO
// TODO: Remove logging to reduce cost
No owner, no ticket, no context. Either act on it or remove it.
Fix
- Fix comment in
PendingServerCleanupRoutine.ts from "every 10 minutes" to "every 15 minutes"
- Remove the Node <15 polyfill comment from
TerminatePendingServers.ts; use native AggregateError
- Fix the log message in
TerminatePendingServers.ts to say "15 minutes" instead of "10 minutes"
- Remove the stale
TODO comment from DefaultTaskDefinitionService.ts
Problem
Several comments are incorrect or stale:
1.
PendingServerCleanupRoutine.ts:6— Wrong schedule comment2.
TerminatePendingServers.ts:66— Stale Node.js polyfill commentThe project requires and runs on Node 24.
AggregateErroris natively available. The comment is misleading, and the code should use nativeAggregateError.3.
TerminatePendingServers.ts:67— Log message says wrong thresholdeventMessage: `Server ${server.serverId} terminated after being stuck in pending for over 10 minutes.`But the actual threshold check is:
4.
DefaultTaskDefinitionService.ts:89— Stale TODO// TODO: Remove logging to reduce costNo owner, no ticket, no context. Either act on it or remove it.
Fix
PendingServerCleanupRoutine.tsfrom "every 10 minutes" to "every 15 minutes"TerminatePendingServers.ts; use nativeAggregateErrorTerminatePendingServers.tsto say "15 minutes" instead of "10 minutes"TODOcomment fromDefaultTaskDefinitionService.ts