Skip to content

Commit f38cdff

Browse files
committed
Revert "Fix orchestrator queue normalization for object-format tasks"
This reverts commit 5fb6996.
1 parent 5fb6996 commit f38cdff

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

.github/scripts/orchestrator.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -279,13 +279,13 @@ module.exports = async ({ github, context, core }) => {
279279
} else if (state.current != null && typeof state.current !== 'object') {
280280
state.current_task = Number(state.current);
281281
}
282-
state.queue = Array.isArray(state.queue) ? state.queue.map(t => (typeof t === 'object' && t !== null) ? t : Number(t)) : [];
283-
state.completed = Array.isArray(state.completed) ? state.completed.map(t => (typeof t === 'object' && t !== null) ? t : Number(t))
284-
: (Array.isArray(state.done) ? state.done.map(t => (typeof t === 'object' && t !== null) ? t : Number(t)) : []);
285-
state.failed = Array.isArray(state.failed) ? state.failed.map(t => (typeof t === 'object' && t !== null) ? t : Number(t)) : [];
282+
state.queue = Array.isArray(state.queue) ? state.queue.map(Number) : [];
283+
state.completed = Array.isArray(state.completed) ? state.completed.map(Number)
284+
: (Array.isArray(state.done) ? state.done.map(Number) : []);
285+
state.failed = Array.isArray(state.failed) ? state.failed.map(Number) : [];
286286
state.retries = (typeof state.retries === 'number') ? state.retries : 0;
287287
state.history = Array.isArray(state.history) ? state.history : [];
288-
state.order = Array.isArray(state.order) ? state.order.map(t => (typeof t === 'object' && t !== null) ? t : Number(t)) : [];
288+
state.order = Array.isArray(state.order) ? state.order.map(Number) : [];
289289

290290
// Migration: if state.order is empty (older state), build from status-grouped
291291
// arrays. Order will be in status-grouped order, not original — but stable.

0 commit comments

Comments
 (0)