Skip to content

Preserve user context for parsed challenge assignments - #31

Merged
raphink merged 1 commit into
mainfrom
codex/user-challenge-assignment-context
Jun 30, 2026
Merged

Preserve user context for parsed challenge assignments#31
raphink merged 1 commit into
mainfrom
codex/user-challenge-assignment-context

Conversation

@raphink

@raphink raphink commented Jun 30, 2026

Copy link
Copy Markdown
Member

What changed

  • Added a user-scoped challenge assignment query helper.
  • Updated GetUserChallenge(..., WithParsedAssignmentVariables()) to fetch assignment text with userID + challengeID instead of falling back to the public challenge query.
  • Added tests covering parsed assignment variables and user-scoped assignment fetching.

Why

The parsed assignment path needs user context for runtime variable interpolation. Calling GetChallengeWithAssignment() from GetUserChallenge() dropped that context, so parseAssignmentVariables was effectively moot for user sessions.

Validation

  • go test ./...

@raphink
raphink marked this pull request as ready for review June 30, 2026 05:20
@raphink
raphink merged commit 862a636 into main Jun 30, 2026
1 of 2 checks passed
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.

1 participant