Skip to content

Release 1.162.6 - #3851

Merged
odlbot merged 6 commits into
releasefrom
release-candidate
Aug 17, 2026
Merged

odlbot merged 6 commits into
releasefrom
release-candidate

Conversation

@odlbot

@odlbot odlbot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

James Kachel

annagav

cp-at-mit

@github-actions

Copy link
Copy Markdown

OpenAPI Changes

Show/hide changes
## Changes for v0.yaml:
No changes detected

## Changes for v1.yaml:
No changes detected

## Changes for v2.yaml:
No changes detected

Unexpected changes? Ensure your branch is up-to-date with main (consider rebasing).

Comment thread courses/api.py
user=user, program=node.required_program, is_revoked=False
).exists()

return _has_earned_program_cert(user, node.program)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The recursive call to _has_earned_program_cert incorrectly uses node.program instead of node.required_program, causing an infinite loop and a crash when checking programs with sub-program requirements.
Severity: HIGH

Suggested Fix

Change the recursive call from _has_earned_program_cert(user, node.program) to _has_earned_program_cert(user, node.required_program). This ensures the function correctly recurses into the required sub-program instead of calling itself with the same arguments.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: courses/api.py#L1282

Potential issue: In the function `_has_earned_program_cert`, a recursive call is made
using `node.program` which refers to the parent program already in the call stack. This
should instead use `node.required_program` to check the sub-program. This mistake leads
to an infinite recursion loop, ultimately causing a `RecursionError` crash. This bug is
triggered when the function is called for a program that has a sub-program requirement
and the parent program itself does not have a verified enrollment mode.

Did we get this right? 👍 / 👎 to inform future reviews.

@odlbot
odlbot merged commit 0e98b70 into release Aug 17, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants