Skip to content

Develop#16

Merged
raymondjstone merged 2 commits into
masterfrom
develop
Apr 9, 2026
Merged

Develop#16
raymondjstone merged 2 commits into
masterfrom
develop

Conversation

@raymondjstone
Copy link
Copy Markdown
Owner

JSA testing fix

Copilot AI review requested due to automatic review settings April 9, 2026 18:54
@raymondjstone raymondjstone merged commit 385c5c9 into master Apr 9, 2026
3 checks passed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 9, 2026

Qodana for JVM

It seems all right 👌

No new problems were found according to the checks applied

☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adjusts the JSA Activity Mode background job scheduling/behavior to better support JSA testing, and updates bundled portable artifacts tracked via Git LFS.

Changes:

  • Reduced the default JsaActivityMode job interval in LocalBackgroundService (12h → 2h).
  • Added weekday/working-hours gating to JsaActivityModeJob and shortened the per-iteration random delay.
  • Updated Git LFS pointers for portable JobTracker zip split parts (x86/x64).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Services/LocalBackgroundService.cs Changes default scheduling interval for the JSA Activity Mode background job.
Services/JsaActivityModeJob.cs Adds “active hours” skip logic and increases iteration frequency (shorter delays).
Portable/JobTracker-x86.zip.001 Updates Git LFS pointer to new portable artifact part.
Portable/JobTracker-x86.zip.002 Updates Git LFS pointer to new portable artifact part.
Portable/JobTracker-x64.zip.001 Updates Git LFS pointer to new portable artifact part.
Portable/JobTracker-x64.zip.002 Updates Git LFS pointer to new portable artifact part.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 31 to 33
_logger.LogInformation("[JsaActivityMode] Starting — will run for up to {Hours} hours", MaxRunDuration.TotalHours);

var deadline = DateTime.Now.Add(MaxRunDuration);
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

The “Only run on weekdays between 08:00 and 18:00” guard is only evaluated once at the start. If the job starts before 18:00 it can keep running (and making changes) well past 18:00 until MaxRunDuration expires. Consider enforcing the time window inside the main loop (or setting the deadline to the earlier of now.Add(MaxRunDuration) and today’s 18:00) so activity never occurs outside the stated hours.

Suggested change
_logger.LogInformation("[JsaActivityMode] Starting — will run for up to {Hours} hours", MaxRunDuration.TotalHours);
var deadline = DateTime.Now.Add(MaxRunDuration);
var maxDeadline = now.Add(MaxRunDuration);
var activeWindowEnd = new DateTime(now.Year, now.Month, now.Day, 18, 0, 0, now.Kind);
var deadline = maxDeadline < activeWindowEnd ? maxDeadline : activeWindowEnd;
_logger.LogInformation("[JsaActivityMode] Starting — will run for up to {Hours} hours", MaxRunDuration.TotalHours);

Copilot uses AI. Check for mistakes.
Comment on lines +25 to +29
{
_logger.LogInformation("[JsaActivityMode] Outside active hours ({DayOfWeek} {Time:HH:mm}) — skipping",
now.DayOfWeek, now);
return;
}
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

Returning early here will still be treated by LocalBackgroundService.RunSafe as a successful run: it logs “[Background] Completed…”, sets LastRun, and the UI will show the job as OK even though it was skipped. If you want “skipped due to schedule” to be visible/accurate, consider signaling a distinct “skipped” outcome (e.g., return a status/result that RunSafe can interpret, or move the schedule gating into the scheduler so LastRun isn’t updated on skips).

Copilot uses AI. Check for mistakes.
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.

2 participants