Skip to content

Send the exercise's main solution file to the snippet generator - #13108

Merged
iHiD merged 2 commits into
mainfrom
fix-snippet-main-file
Nov 18, 2026
Merged

iHiD merged 2 commits into
mainfrom
fix-snippet-main-file

Conversation

@iHiD

@iHiD iHiD commented Nov 18, 2026

Copy link
Copy Markdown
Member

The snippet job sent the first file saved in a submission. When a submission has several files, such as a C++ header and its implementation, the solution card could show the wrong one.

Now the job reads the exercise's solution files from the track config (files.solution). It sends the first of those that the submission contains, in the order of that list. If none match, it sends the first file saved, as before.

Tracks list the implementation before the header (for example hamming.cpp then hamming.h in the C++ track, and hamming.c then hamming.h in the C track), so following the list order picks the implementation. No special header rule is needed.

Existing snippets are not regenerated by this change.

Tests: added a command test with a header and an implementation file, and ran the whole generate snippet test file.

🤖 Generated with Claude Code

iHiD and others added 2 commits November 18, 2026 14:47
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@iHiD
iHiD merged commit 5edfd13 into main Nov 18, 2026
31 checks passed
@iHiD
iHiD deleted the fix-snippet-main-file branch November 18, 2026 06:06
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