Skip to content

refactor: share automatic optimization trigger policy - #207

Open
MataM15 wants to merge 1 commit into
IgorMundstein:mainfrom
MataM15:refactor/shared-auto-optimization-policy
Open

refactor: share automatic optimization trigger policy#207
MataM15 wants to merge 1 commit into
IgorMundstein:mainfrom
MataM15:refactor/shared-auto-optimization-policy

Conversation

@MataM15

@MataM15 MataM15 commented Sep 6, 2026

Copy link
Copy Markdown

Summary

Share automatic-optimization trigger selection between the GUI and Windows service while preserving existing behavior. This independent contribution is based on upstream main; candidate commit: 516907a.

Related Issue

No exact issue identified.

Changes

  • Extract a pure AutoOptimizationPolicy helper used by both hosts.
  • Preserve schedule priority, the strict low-memory threshold comparison, and the five-minute cooldown boundary.
  • Keep host dispatch, timestamp updates, and concurrency behavior unchanged.
  • Add nine focused boundary tests.

Checklist

  • My code follows the project’s coding style and conventions.
  • I have tested the changes locally.
  • I have updated documentation if necessary. No new behavior or configuration is introduced.
  • This PR does not introduce any breaking changes.
  • I have added unit tests if applicable.

Additional Notes

Standalone hosted Windows validation: Release build with 0 warnings and 0 errors; all 9 selected NUnit tests passed. A compiled threshold mutant produced the expected 3 failures; the source bytes were restored and hash-checked, followed by a successful rebuild and 9 passing tests.

The mutation script and validation workflow remain fork-only and are not part of this PR. This is not a concurrency change or a claim of full-suite coverage. Scope: 5 files, 194 changed lines.

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