Skip to content

Recheck feed-in loop stall fix in doOneFeedInTask#44

Draft
Copilot wants to merge 1 commit intonew_verify_updatefrom
copilot/sub-pr-43
Draft

Recheck feed-in loop stall fix in doOneFeedInTask#44
Copilot wants to merge 1 commit intonew_verify_updatefrom
copilot/sub-pr-43

Conversation

Copy link

Copilot AI commented Feb 26, 2026

The original feed-in loop silently skipped out-of-range dataIndex without advancing portRounds[i], making it possible for a task to stall indefinitely if stride/port/data-length were inconsistent.

What was verified

  • Upfront validationvalidateTaskLayout (called in FeedIn before enqueueing) rejects any inconsistent stride/portCount/dataLen combination immediately with a descriptive panic. No stalling task ever enters the queue.
  • Runtime defensive check — the original silent continue was replaced with an explicit panic carrying full diagnostics (idx, len, stride, port, round):
if dataIndex < 0 || dataIndex >= len(task.data) {
    panic(fmt.Sprintf(
        "feed task index out of range: idx=%d len=%d stride=%d port=%d round=%d",
        dataIndex, len(task.data), task.stride, i, task.portRounds[i],
    ))
}

Because validateTaskLayout mathematically guarantees portRounds[i]*stride + i < dataLen for all valid (i, round) pairs, the runtime check is unreachable in correct usage — it is a safety net against future regressions, not an active code path.

No further changes are required; the current implementation fully addresses the stall concern.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI changed the title [WIP] WIP to address feedback on process order modification Recheck feed-in loop stall fix in doOneFeedInTask Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants