-
Notifications
You must be signed in to change notification settings - Fork 0
Add conditional feedback to terminal grading based on recent activity #121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
Co-authored-by: dbosk <[email protected]>
Copilot
AI
changed the title
[WIP] Add feedback for terminal grading cases
Add conditional feedback to terminal grading based on recent activity
Nov 8, 2025
dbosk
requested changes
Nov 9, 2025
- Move has_recent_changes check outside of multiple if statements (more efficient) - Remove unnecessary for loop when calling get_home_directory with single student - Add proper quoting to all variable substitutions to handle spaces and empty values Co-authored-by: dbosk <[email protected]>
dbosk
requested changes
Nov 9, 2025
Owner
dbosk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot please see my comment in the conversation about getting home directories.
- Fetch all home directories in one call to get_home_directory instead of per-student - Use while loop with IFS to properly parse tab-separated student/grading_time pairs - Look up each student's home directory from cached results - This significantly reduces SSH overhead and delays Co-authored-by: dbosk <[email protected]>
Contributor
Author
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.
Plan for Terminal Grading Feedback Enhancement
grade_history_file()function to provide detailed feedbackImplementation Complete
Successfully implemented all requirements from the issue and addressed all review feedback.
Review Feedback Addressed
get_home_directorycall instead of calling it once per student, significantly reducing SSH overheadPerformance Optimization - Home Directory Caching
The code now caches all home directories in a single
get_home_directorycall instead of calling it once per student. This provides significant performance improvement:Before: For N students, made N SSH calls (each with ~34 seconds of delays) = ~34N seconds total
After: For N students, make 1 SSH call (total ~34 seconds of delays)
For example, grading 50 students would take ~28 minutes in SSH overhead alone before, but now takes only ~34 seconds (~50x faster).
Technical implementation:
grepwhile IFS=$'\t' read -rto properly parse tab-separated student/grading_time pairsTesting Results
All test scenarios still pass after refactoring:
The optimized code is more efficient, safer, and maintains all functionality.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.