The workflow must keep reviewing every PR and every pushed commit automatically, including fork PRs, so the hardening focuses on pinning the code that actually runs in the secrets-bearing job. The wrapper action commit still delegates to a mutable Docker tag, so the workflow now calls the PR-Agent container by immutable digest directly.
Constraint: Maintainer preference is automatic PR-Agent coverage for each PR and synchronize event.
Constraint: Issue #222 requires removing mutable third-party execution refs from the secrets-bearing path.
Rejected: Pin only the action repository commit | the wrapper Dockerfile still resolves pragent/pr-agent:github_action at runtime.
Rejected: Require trusted comment triggers for fork PRs | too inconvenient because new commits would not be reviewed automatically.
Confidence: medium
Scope-risk: moderate
Directive: If fork PR automation remains required, keep the runtime container digest-pinned and do not checkout PR head code in this workflow.
Tested: Parsed .github/workflows/pr-agent.yml with PyYAML and asserted docker:// sha256 form; git diff --check; grep confirmed no action ref or github_action tag remains in the workflow.
Not-tested: Live GitHub Actions execution or Docker Hub digest pull from this host.
Related: https://github.com/appergb/openless/issues/222
Latest review flagged that language handlers captured prefs before awaiting setLocalePreference, then replayed stale snapshots via object spread.
This adds functional update support to updatePrefs in HotkeySettingsContext and switches both language pickers to merge chineseScriptPreference against current prefs at write time.
Constraint: Keep the fix minimal and avoid refactoring unrelated settings flows
Rejected: Read prefs from IPC again before each write | Adds extra roundtrip and still duplicates merge logic
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Async settings handlers should pass functional updaters whenever they await before persisting
Tested: npm run -s build (openless-all/app)
Not-tested: cargo test -q (no Rust changes in this patch)
Related: https://github.com/appergb/openless/pull/265
Co-authored-by: OmX <omx@oh-my-codex.dev>
Latest PR review flagged that translation-mode failures were bypassing chinese script normalization because of a translation_active guard.
This narrows the condition to normalize only ASR-direct outputs, including translation fallback failures, while still avoiding normalization on successful translation/LLM outputs.
Constraint: Keep successful translation and polished LLM outputs untouched
Rejected: Remove all guards and always normalize final text | Would risk mutating successful non-ASR outputs
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Script normalization should run for any fallback-to-raw path regardless of translation mode
Tested: cargo test -q (openless-all/app/src-tauri)
Not-tested: Manual runtime translation failure simulation in desktop UI
Related: https://github.com/appergb/openless/pull/265
Co-authored-by: OmX <omx@oh-my-codex.dev>
The review highlighted a race where script auto-sync could persist an older prefs snapshot while concurrent settings updates were queued.
This updates HotkeySettingsContext persistence to resolve the object at queue execution time from latestPrefsRef, then merge chineseScriptPreference into that latest shape for script sync writes.
Constraint: Keep fix minimal and limited to HotkeySettingsContext persistence flow
Rejected: Full settings-store refactor with transactional backend API | Out of scope for this review round
Confidence: medium
Scope-risk: narrow
Reversibility: clean
Directive: Any future auto-sync writes must merge against latest prefs before calling setSettings
Tested: npm run -s build (openless-all/app)
Not-tested: Full cargo test rerun (no Rust code changes in this patch)
Related: https://github.com/appergb/openless/pull/265
Co-authored-by: OmX <omx@oh-my-codex.dev>
This change binds locale selection to a persisted chineseScriptPreference so zh-CN and zh-TW drive output script consistently.
It injects script preference into LLM context for polish/translate/QA, removes ASR language-hint submission, and applies script conversion only in pure-ASR fallback paths. It also hardens preference persistence sequencing in HotkeySettingsContext to reduce write-order races.
Constraint: Must keep output script behavior coupled to locale choice without adding a new toggle
Constraint: ASR requests should not send language parameters
Rejected: Add an independent output-script option | Conflicts with required locale-driven behavior
Confidence: medium
Scope-risk: moderate
Reversibility: clean
Directive: Keep zh-CN=>simplified and zh-TW=>traditional mapping consistent in both Settings entry points and backend consumers
Tested: npm run -s build (openless-all/app)
Tested: cargo test -q (openless-all/app/src-tauri)
Not-tested: Live external provider E2E verification across multiple real ASR/LLM vendors
Related: #242
Co-authored-by: OmX <omx@oh-my-codex.dev>