Add sync-safe Anki Sorter gating - #6
Conversation
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d98e40b462
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if trigger in ACKNOWLEDGED_TRIGGERS: | ||
| if acknowledged: | ||
| return SortSafetyDecision(True, "acknowledged manual/API sort request") | ||
| return SortSafetyDecision(False, "manual/API sort request requires acknowledgement") |
There was a problem hiding this comment.
Honor desktop_only_allow_auto for API automation
For sorts requested through the local API, this branch returns before checking config.sync_safety_mode, so a profile configured with syncSafetyMode: "desktop_only_allow_auto" still gets skippedForSyncSafety unless the caller also sends the new acknowledgement field. I checked the optional systemd/anki-sorter.service template and it still invokes scripts/request_sort.py without that flag, so the documented desktop-only automation/timer opt-in will no-op instead of sorting.
Useful? React with 👍 / 👎.



Summary
Verification
python -m unittest discover -s tests(111 tests),python -m compileall addon scripts tests,python scripts/package_addon.py, package inspection,git diff --checkNo release/signing included.