Fix AC code export for 5-digit question IDs and UpdateVersion workflow infinite recursion#888
Merged
PythonSmall-Q merged 160 commits intodevfrom Feb 6, 2026
Merged
Conversation
Co-authored-by: PythonSmall-Q <106425289+PythonSmall-Q@users.noreply.github.com>
Co-authored-by: PythonSmall-Q <106425289+PythonSmall-Q@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix bug in exporting AC codes for topics above 9999
Fix AC code export for 5-digit question IDs
Feb 6, 2026
PythonSmall-Q
approved these changes
Feb 6, 2026
Member
|
@boomzero REVIEW |
boomzero
approved these changes
Feb 6, 2026
Member
boomzero
left a comment
There was a problem hiding this comment.
Though pls fix CI inf recursion
Member
|
@copilot please fix the problem of the updateversion github action flow recuring nonstop |
Co-authored-by: PythonSmall-Q <106425289+PythonSmall-Q@users.noreply.github.com>
Contributor
Author
Copilot
AI
changed the title
Fix AC code export for 5-digit question IDs
Fix AC code export for 5-digit question IDs and UpdateVersion workflow infinite recursion
Feb 6, 2026
PythonSmall-Q
approved these changes
Feb 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AC code export fails for questions with IDs ≥10000 due to hardcoded 4-digit extraction at positions 7-11. Additionally, fixes the UpdateVersion GitHub Action workflow that was creating an infinite loop of commits.
Changes
1. AC Code Export Fix (XMOJ.user.js)
Replaced fixed-position substring extraction with dynamic parsing:
Before:
After:
Handles question IDs of any length. Adds validation to skip malformed entries.
2. UpdateVersion Workflow Fix (.github/workflows/UpdateVersion.yml)
Fixed infinite recursion caused by the workflow triggering itself:
Added condition:
This prevents the workflow from running when commits are made by
github-actions[bot], breaking the infinite loop that was creating hundreds of duplicate commits.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
Summary by cubic
Fixes the export bug that skipped AC code for problems with IDs above 9999. The exporter now handles variable-length IDs so five-digit problems are included in the ZIP.
Written for commit 83609ec. Summary will update on new commits.