Skip to content

Fix launch coordination, privacy updates, and remaining battery localization - #97

Merged
gitar-bot[bot] merged 4 commits into
offyotto:mainfrom
OGSmokeStudios:fix/final-runtime-followups
Sep 19, 2026
Merged

gitar-bot[bot] merged 4 commits into
offyotto:mainfrom
OGSmokeStudios:fix/final-runtime-followups

Conversation

@OGSmokeStudios

Copy link
Copy Markdown
Contributor

Change

Address six remaining privacy, launch, process-tracking, weather, and localization follow-ups from #94:

  1. Deliver privacy changes to the alert manager on the main run loop before redacting and persisting history (item 12).
  2. Elect one app instance with a kernel file lock held for the process lifetime. Route retries to that lock's owner even while it is launching, require a matching dashboard acknowledgement, and take over if the owner exits. An unresponsive owner produces an explicit message rather than a second monitoring instance. Notification routing uses a string payload with nil userInfo for App Sandbox compatibility (item 22).
  3. Include the kernel process start time in disk-counter identity. Reused PIDs establish a fresh baseline, including when the new counters exceed the previous process's values. The existing zero baseline/reset policy is preserved (item 18 robustness follow-up).
  4. Cache the most recent successful weather place-name lookup for one hour within 500 metres and for the same locale. Concurrent matching requests share a lookup; failures remain retryable (remaining part of item 26).
  5. Correct the weather privacy copy: the app processes location and contacts Apple, while the developer does not receive that data (remaining part of item 26).
  6. Give all nine battery strings catalog entries for all 112 advertised locales. Prefer the battery catalog, reuse existing state translations, correct untranslated state values, and check compiled strings and %@ placeholders (remaining coverage in item 25).

The optional helper-server identity check and SMC read allowlist are not part of this change. Other findings and hardware-testing requests remain outside this PR.

Verification

  • macOS build, 137 tests, and the optimized helper lifetime check pass in fork CI.
  • Tests cover background privacy publication/redaction/persistence, lock exclusion from a separate process, symlink rejection and lock reacquisition, launching-owner routing and acknowledgement validation, sandbox-compatible payload round trips, PID reuse, cache expiry/location/locale/concurrency/failure behavior, and compiled localization coverage.
  • The validation branch has identical app, helper, test, and resource files; its only extra changes enable the fork CI trigger and print the test summary. git diff --check passes.

Review and compatibility notes

  • New or corrected translations are AI-assisted drafts marked needs_review in the string catalog. Automated checks establish coverage and placeholder integrity, not linguistic accuracy. Native-speaker review is still needed before treating these translations as approved.

  • Quit older builds before using the new single-instance coordination: builds without the file-lock protocol cannot participate in its election. The lock file lives in application support and is retained after exit; stale PID contents do not hold a lock.

  • Weather place-name caching is in memory only. No live WeatherKit/geocoder call, production App Store sandbox/signing test, manual visual check, or physical hardware test was performed. Native CI exercised the lock across processes and the notification payload contract.

  • Runtime details are documented in runtime behavior and validation.

  • Tests cover the changed behavior.

  • User-facing changes are documented.

  • Security-sensitive changes were reviewed for privilege, XPC, signing, and SMC impact. This PR does not change the privileged helper or its SMC access policy.

Comment thread Core-Monitor/WeatherLocationNameCache.swift
@gitar-bot

gitar-bot Bot commented Sep 19, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 1 closed / 1 findings

🟡 Medium risk

Addresses six privacy, launch coordination, process tracking, weather, and localization follow-ups with comprehensive test coverage and documentation. When a second place-name lookup arrives while an earlier one is in flight, the cache write for the first lookup is dropped due to the pending slot being overwritten—consider writing cache entries on success regardless of pending slot state, or keying pending lookups per (location, locale) to avoid redundant reverse geocoding calls.

Auto-approved: No blocking issues found.
Please see Auto-approve Docs for details on setting custom approval criteria.

✅ 1 closed
Closed: Performance: Interleaved lookup for a second place drops cache write

📄 Core-Monitor/WeatherLocationNameCache.swift:48-57
In WeatherLocationNameCache.name, the single pending slot is overwritten whenever a request for a different location/locale arrives while an earlier lookup is still in flight. The earlier lookup completes and returns its value to its caller, but the if pending?.id == id guard then fails (pending holds the newer id), so its successful result is never written to cached. The next request for that location must re-run the CLGeocoder reverse lookup, which Apple rate-limits aggressively. Consider writing the cache entry on success regardless of whether the pending slot still matches, or keying pending lookups per (location, locale).

Review coverage

Auto-approval Approved

Rules No rules evaluated

Functional validation Not enabled · Set up

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@gitar-bot
gitar-bot Bot enabled auto-merge (squash) September 19, 2026 10:15

@gitar-bot gitar-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Gitar has auto-approved this PR (configure)

@gitar-bot gitar-bot Bot added the gitar-approved Added by Gitar label Sep 19, 2026
@gitar-bot

gitar-bot Bot commented Sep 19, 2026

Copy link
Copy Markdown

Gitar is not allowed to push to this forked PR. Please enable "Allow edits from maintainers" to allow Gitar to push.

@gitar-bot
gitar-bot Bot merged commit 338317c into offyotto:main Sep 19, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gitar-approved Added by Gitar

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants