Skip to content

refactor(lock-screen): keep what was published in LockScreenPublicationLedger - #324

Open
fzlzjerry wants to merge 3 commits into
capy/lock-screen-scene-resolverfrom
capy/lock-screen-publication-ledger
Open

fzlzjerry wants to merge 3 commits into
capy/lock-screen-scene-resolverfrom
capy/lock-screen-publication-ledger

Conversation

@fzlzjerry

@fzlzjerry fzlzjerry commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

What and why

Part E of package 1.3 in the code-health refactoring. It's stacked on part D, #323 (branch capy/lock-screen-scene-resolver), and merges after it; part F is stacked on this one. LockScreenWallpaperService kept eight fields on what it last published, how far the extension had confirmed it and what the last completed update was for, and decided over them inline: whether an update finds nothing new, as a steady tick does; whether a staged configuration is the published one again; whether publishing turns on a mode the extension doesn't show yet; which published modes a request or a failed wallpaper turns off; and which departed displays keep the committed scenes while the displays are away. This PR moves the fields and those decisions into a ledger. That fixes CodeScene's Complex Method on relinquishModes (cyclomatic complexity 10) and the Complex Conditional left in update, and takes update from cyclomatic complexity 75 to 50. The service still writes every file, waits for every first frame and takes its durable steps in the same order. Nothing changes for someone using the app.

  • LockScreenPublicationLedger (struct, new file) holds the eight fields: published, publishedInputs, unconfirmed, forceRepublish, lastInputs, lastContentRevision, lastLockScreenRequested and lastScreenSaverRequested. The service keeps one in ledger and sets every field at the same points as before. Its rules replace the inline expressions:
    • disables(lockScreen:screenSaver:) says whether a request turns off a published mode. It serves the disable taken at entry, the one taken after the resolution, and the guard in relinquishModes.
    • steadyPublication(for:), samePublication(as:), activatesMode(_:), isAwaitingFirstFrame(of:), shownDisplays and remember(_:). steadyPublication(for:) and remember(_:) take the LockScreenPublishTarget that the transient retry already builds, so there's no new type for the last update.
    • Two pure statics take facts: heldDisplays(_:) (TopologyFacts) decides the topology hold, and configuration(_:) (ModeFacts) turns on each mode that is asked for, found no error and shows a scene, makes an independent mode's empty list explicit and drops the scenes of each mode it has off.
  • What stays in the service: the error fields, heldNotices and the statuses.
  • Docs. docs/architecture.md's LockScreen/ row says what the ledger holds and decides, and docs/testing/coverage.md describes both new suites and lists the publication suite among those that share the service fixture. scripts/code_health_baseline.json records the service at 6.3.

The hazards, one by one.

  • Publication order. publish reads and sets ledger.published where it read and set published. The order of the file, the request and the notification is unchanged, and the ordered recorder rows in LockScreenRecoveryTests pass unchanged.
  • Commit order, the saver-only demotion and relinquishModes. The guard in relinquishModes now asks ledger.disables before it binds published and publishedInputs. All three are pure reads, so it returns in exactly the cases it did, and apart from the ledger. prefix the body is the same. The saver-only demotion reads the flags of ledger.published. testAModeSwitchedOffIsGivenBackAlone covers this in 9 rows.
  • Deactivation. It resets ledger.forceRepublish and ledger.lastInputs at the same points. LockScreenWallpaperServiceTests passes and wasn't edited.
  • Journal. applySelection and the restores run at the same moments, and applySelection still records the inputs first.
  • Staging. Untouched, and LockScreenStagingTests passes. The mode flags are still set on the staged configuration. One intermediate step differs for an independent lock screen whose activation failed: the old code first set its list to [] and then, because the mode was off, removeDisabledSources() set it back to nil. ModeFacts.lockScreen means "asked for and hasn't failed to activate", so the new code skips the []. The published file is the same.
  • Defaults. Untouched; LockScreenModeSettingsTests passes.
  • Monitor and the four retry resets. Every write to forceRepublish is now a write to ledger.forceRepublish at the same point, and the facts the transient retry takes read the same values from the ledger. LockScreenTransientRetryTests and LockScreenRecoveryTests pass.
  • Renderer exit order. rendererExited reads ledger.published and sets ledger.forceRepublish in the same cases, and rendererWatch.retire(ledger.published) still runs before publish. LockScreenRendererWatchTests passes.
  • Generation checks and live reads. No generation check moved. disables reads the requests at entry, as before, and the mode facts read them right after the generation == revision, anyRequested guard, where the old block read them. steadyPublication(for:) uses the target built one statement earlier, with no suspension between, so it sees what the old inline reads saw. An update still remembers its target with the requests as they stand when it completes.
  • Isolation. The ledger is a value held by the @MainActor service, and only the service touches it. TopologyFacts is built and used in the same synchronous step.
  • Registration task. Untouched. activatesMode is the old condition.
  • Hot path. A steady tick still makes one scenes() call, publishes nothing and never asks whether the displays are away. The "nothing changed" row of testAnUpdateAfterTheActivationPublishesOnlyWhatChanged counts all three. The only extra work is shownDisplays: the old code built the same set whenever something was published, and now it's also built, empty, before the first publication. There are no new reads, encodes or file writes.
  • Strings. No localized string moved. The topology log line has the same text and logs the same array.

Tests. The first commit pins today's behaviour on the unchanged service. LockScreenPublicationTests runs whole updates, each row on a fixture of its own with a stand-in renderer that answers each publication unless the row holds it back, in 5 tests and 29 rows:

  • once the modes are on, a monitor tick that finds nothing new asks for the desktop's scenes once, publishes nothing and never asks whether the displays are away;
  • a change of the scenes, of a staged file with the content revision, or of the modes asked for publishes again; a change that stages the same files doesn't, nor does a file that changes after it while the content revision stays; a choice that changes no scene publishes once more; and the extension is prepared again only for a mode not yet shown;
  • an update that finds everything as the lock screen was last shown still waits for a first frame the lock screen is owed;
  • a display that leaves is kept while the displays are away and dropped while they're awake;
  • switching a mode off, or its own wallpaper failing to load, gives back that mode alone before any display needs its UUID, and a store race while a failed wallpaper's mode is given back isn't retried;
  • a mode with nothing of its own to show is published off.

Before the refactor, 39 mutations of the unchanged service ran, each applied alone. 30 failed this suite and 5 more failed other lock-screen suites. Three of the four that survived every suite were real gaps and got a test or a row in this commit: a steady skip that ignores a first frame still owed (testAnUpdateThatFindsNothingNewWaitsForAFirstFrameStillOwed), no disable taken from the source errors (the row "a store race while the screen saver's failed wallpaper is given back"), and an identical configuration not remembered (the row "the content revision moved, then the desktop's video changed without it"). The fourth makes the lock screen's flag ignore an empty list of scenes. It is equivalent through the service, by argument rather than by a test; applied to the ledger after the refactor, it fails LockScreenPublicationLedgerTests/testAModeIsPublishedWhenAskedForWithoutErrorAndShowingAScene.

The refactor commit adds LockScreenPublicationLedgerTests, 7 tests and 57 rows that pin each rule on its own.

Commits.

  • 51cd91b2e test(lock-screen): pin which updates publish, keep or give a mode back
  • 28a1a3114 refactor(lock-screen): keep what was published in LockScreenPublicationLedger
  • 76742ac8e chore(scripts): raise the lock-screen service's code health baseline to 6.3

Verification

E was first made on fc1daf4b4, part D's head before the rebase. It was rebased onto D's new head a246333 with git rebase --onto, without conflicts. git range-diff shows all three commits unchanged, and git patch-id --stable over E's own diff gives b5da13e0daaf before and after. git merge-tree --write-tree origin/main 76742ac8e exits 0 against main at 2004873.

On 76742ac, after the rebase:

  • Xcode project: xcodegen generate (2.45.4) exits 0 and leaves the tree clean.
  • python3 scripts/check_code_health.py --base origin/main: "OK code health: 9 of 9 file(s) reviewed, 0 below the ratchet, 0 improved, 1 without a score". It reviews D's files as well as E's, because its merge base with main is D's base, and the file without a score is D's LockScreenSceneResolution.swift. With nothing improved and nothing to record, the baseline commit holds exactly what --update-baseline writes.

Code health against part D (a246333), from cs review of each file at both revisions:

File D E
LockScreenWallpaperService.swift 5.45 6.30
LockScreenPublicationLedger.swift (new) – 10.0
LockScreenPublicationTests.swift (new) – 10.0
LockScreenPublicationLedgerTests.swift (new) – 10.0
  • cs delta a24633382 76742ac8e lists only the service, with only improved and fixed issues. update goes from cyclomatic complexity 75 to 50, from 279 lines to 249 and from 6 bumps to 5, and its Complex Conditional is fixed. relinquishModes is no longer a Complex Method. setSource's 2 bumps and refresh's conditional are unchanged. Nothing is new or degraded in any file.
  • The owner accepted in advance that the service's two file-level averages, Overall Code Complexity and Primitive Obsession, may degrade in parts C–F, provided the file's score rises against the part's base and no function-level finding in it is new or degraded. Here the mean cyclomatic complexity improves from 4.71 to 4.02 and Primitive Obsession stays at 66.67%, so E doesn't use that allowance.

Gate after the rebase. python3 scripts/test.py didn't run on 76742ac itself. It ran once, on F's head 0ff4a51, which carries E's three commits unchanged: "Passed: 5772 passed, 0 failed, 70 skipped of 5842 in 192s", exit 0 (Tests-20261201-121846-890678). Its two runtime warnings, both "This method should not be called on the main thread as it may lead to UI unresponsiveness.", are in two video tests outside the lock screen. That build linked a renderer library built before #311, so #311's renderer change wasn't in the run; E doesn't touch the renderer.

Before the rebase, on D's old head fc1daf4b4:

  • LockScreenPublicationTests passed 5 of 5 on the unchanged service, and the 16 lock-screen suites passed 251 of 251 at the test commit.
  • After the refactor, with LockScreenPublicationLedgerTests as the 17th suite: 258 of 258.
  • python3 scripts/test.py on 22f137806, E's head then: "Passed: 5755 passed, 0 failed, 70 skipped of 5825 in 170s", exit 0, with no runtime warnings and no temporary service roots left behind.

Not verified: no Release build, and the app wasn't run. That the one surviving mutation is equivalent through the service is an argument, not a test.

Left alone. These findings in the service are older than this part: update at cyclomatic complexity 50, 249 lines and 5 bumps, which part F takes on; and setSource's 2 bumps, the conditional in refresh and the file's Low Cohesion, which stay.

  • python3 scripts/test.py passes: on F's head after the rebase, which carries this PR unchanged, and on 22f137806 before it
  • Targeted checks for the area touched: the 17 lock-screen suites before the rebase, and within the full gate after it
  • Visible changes: none; not checked visually

Checklist

  • One coherent change, and the PR title is a Conventional Commit subject
  • No release: line in the title or any commit message
  • Tests for behavior a plausible bug would break
  • Generated files regenerated, not hand-edited: the Xcode project comes from XcodeGen, and scripts/code_health_baseline.json from python3 scripts/check_code_health.py --update-baseline, as checked above
  • The document that owns the behavior updated: docs/architecture.md and docs/testing/coverage.md
  • No build output, secrets, private wallpapers or personal paths in the diff
  • My commits are signed off (git commit -s): every commit carries a Signed-off-by trailer with this Mac's git identity, added by the agent that prepared them. The box is left for the owner to tick.

Open in Capy


Devin Review

LockScreenPublicationTests runs whole updates of the unchanged service
and pins what each one publishes and asks. Once the modes are on, a
monitor tick that finds nothing new asks for the desktop's scenes once,
publishes nothing and never asks whether the displays are away. A
change of the scenes, of a staged file with the content revision, or
of the modes asked for publishes again; a change that stages the same
files does not, nor does a file that changes after it while the
content revision stays; a choice that changes no scene publishes once
more; and the extension is prepared again only for a mode not yet
shown. An update that finds everything as the lock screen was last
shown with still waits for a first frame the lock screen is owed.

A display that leaves is kept while the displays are away and dropped
while they are awake. Switching a mode off, or its own wallpaper
failing to load, gives back that mode alone before any display needs
its UUID, and a store race while a failed wallpaper's mode is given
back is not retried. A mode with nothing of its own to show is
published off.

Each row runs on a fixture of its own, with a stand-in renderer that
answers each publication unless the row holds it back.

Signed-off-by: Morax <James20081204@gmail.com>
…onLedger

The service kept eight fields on what it last published, how far the
extension had confirmed it and what the last completed update was for,
and decided over them inline: whether an update finds nothing new, as
a steady tick does; whether a staged configuration is the published
one again; whether publishing turns on a mode the extension does not
show yet; which published modes a request or a failed wallpaper turns
off; and which departed displays keep the committed scenes while the
displays are away. LockScreenPublicationLedger now holds those fields
and makes those decisions. The service still writes every file, waits
for every first frame and takes its durable steps in the same order.

The two rules that need more than the ledger are pure statics with
table tests. heldDisplays takes the displays shown, the published
inputs, the resolution and the question whether the displays are away,
which it asks only when a display that showed a scene is no longer
named. configuration takes the staged configuration, whether each mode
is asked for (the lock screen only while it has not failed to
activate) and the resolution, and turns on each mode that found no
error and shows a scene.

An update still remembers its target with the requests as they stand
when it completes, and still reads the requests and sources again
after every wait.

Signed-off-by: Morax <James20081204@gmail.com>
…to 6.3

The publication ledger takes LockScreenWallpaperService.swift from 5.45
to 6.30.

Signed-off-by: Morax <James20081204@gmail.com>
@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Bug Fixes
    • Improved lock-screen and screen-saver publication behavior during display changes, sleep, and mode shutdown.
    • Improved handling of first-frame readiness, failed wallpaper loads, and updates with no scenes to display.
  • Tests
    • Expanded coverage for publication updates, display changes, and configuration behavior.
  • Documentation
    • Updated architecture and test coverage documentation.

The service now stores publication state in a ledger and delegates publication comparisons, mode decisions, departed-display retention, and first-frame tracking to it. New unit and fixture-backed tests cover ledger rules and service publication scenarios. Project and coverage records include the additions.

Changes: Lock-screen publication

Layer / File(s) Summary
Ledger state and decision rules
App/Services/LockScreen/LockScreenPublicationLedger.swift, Tests/Unit/LockScreen/LockScreenPublicationLedgerTests.swift, WallpaperMachine.xcodeproj/project.pbxproj, docs/architecture.md
The ledger tracks publication state and provides checks for steady or equivalent publications, mode changes, held displays, and staged configurations. Unit tests cover these rules.
Update and mode/display decisions
App/Services/LockScreen/LockScreenWallpaperService.swift, scripts/code_health_baseline.json
The service uses ledger state and helpers when handling updates, mode changes, playlist rotation, and departed displays.
Publication lifecycle and validation
App/Services/LockScreen/LockScreenWallpaperService.swift, Tests/Unit/LockScreen/LockScreenPublicationTests.swift, WallpaperMachine.xcodeproj/project.pbxproj, docs/testing/coverage.md
The service routes readiness, renderer, recovery, and manifest state through the ledger. Fixture-backed tests cover publication scenarios, and project and coverage records include the new tests.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Refactor

Possibly related PRs

Suggested labels: refactor, Opus

Suggested reviewers: bobbyhuang-dev, cagesthrottleus

Merge Risk: Minimal · up to 76742

This refactor moves lock-screen publication state into a dedicated ledger without intended behavior change, and new tests cover the extracted rules. No concrete merge-blocking risk was identified; the author's full test run was on the stacked follow-up head rather than this PR's own head.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title follows Conventional Commit form (refactor(lock-screen): ...) and names the main change, moving publication state into LockScreenPublicationLedger. The changeset adds that ledger, routes the…
Description check Passed The description follows the repository template. It has a 'What and why' section that explains the ledger extraction and links the stacked PR context. It has a 'Verification' section with commands run…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title follows Conventional Commit form (refactor(lock-screen): ...) and names the main change, moving publication state into LockScreenPublicationLedger. The changeset adds that ledger, routes the service through it, and adds tests and docs, so the title matches the primary change.

Full details: Description check

Explanation

The description follows the repository template. It has a 'What and why' section that explains the ledger extraction and links the stacked PR context. It has a 'Verification' section with commands run, results, and what was not verified. The checklist is present, and it is mostly ticked. One item is unticked: commit sign-off, which the author explicitly left for the owner. The description also omits an explicit 'Fixes #' issue link, but the template asks for one only when an issue exists, and the PR is part of a refactoring series. The description is thorough and covers the required sections.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit checks the frames at night,
The ledger keeps each scene in sight.
When displays depart or modes change,
It tracks the publication range.
Fresh tests hop through each branching trail.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 2f95bda5-86c1-4b0d-b780-6940008cc5cc
Commits

Reviewing files that changed from the base of the PR and between a246333 and 76742ac.

Files selected for processing: 8

  • App/Services/LockScreen/LockScreenPublicationLedger.swift
  • App/Services/LockScreen/LockScreenWallpaperService.swift
  • Tests/Unit/LockScreen/LockScreenPublicationLedgerTests.swift
  • Tests/Unit/LockScreen/LockScreenPublicationTests.swift
  • WallpaperMachine.xcodeproj/project.pbxproj
  • docs/architecture.md
  • docs/testing/coverage.md
  • scripts/code_health_baseline.json

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

Recent review details

Context from checks skipped due to timeout: 1

  • GitHub Check: CodeRabbit
Additional context used

Code guidelines: 3

CLAUDE.md — auto-discovered
docs/conventions.md — auto-discovered
AGENTS.md — auto-discovered
Path-based instructions: 7

Applicability reference: AGENTS.md: # Agent rules WallpaperMachine: macOS/arm64; AppKit shell, SwiftUI control panel, Rust/C++ renderer, sandboxed ExtensionKit lock screen.

CodeRabbit inference engine (CLAUDE.md)

Files:

  • App/Services/LockScreen/LockScreenPublicationLedger.swift
  • App/Services/LockScreen/LockScreenWallpaperService.swift
  • Tests/Unit/LockScreen/LockScreenPublicationLedgerTests.swift
  • Tests/Unit/LockScreen/LockScreenPublicationTests.swift
  • WallpaperMachine.xcodeproj/project.pbxproj
  • scripts/code_health_baseline.json
Applicability reference: AGENTS.md: # Agent rules Code / tests / docs: [conventions](docs/conventions.md), [testing](docs/testing/README.md).

CodeRabbit inference engine (docs/conventions.md)

Files:

  • App/Services/LockScreen/LockScreenPublicationLedger.swift
  • App/Services/LockScreen/LockScreenWallpaperService.swift
  • Tests/Unit/LockScreen/LockScreenPublicationLedgerTests.swift
  • Tests/Unit/LockScreen/LockScreenPublicationTests.swift
Source excerpt: `App/Services//`: domain logic/stores; `App/ViewModels/`: `BridgeStore` renderer facade and editor drafts; `App/Views/ControlPanel/`: the SwiftUI panel.

CodeRabbit inference engine (AGENTS.md)

Files:

  • App/Services/LockScreen/LockScreenPublicationLedger.swift
  • App/Services/LockScreen/LockScreenWallpaperService.swift
Source excerpt: `project.yml` owns targets/settings/versions: run `xcodegen generate`, never hand-edit `WallpaperMachine.xcodeproj`.

CodeRabbit inference engine (AGENTS.md)

Files:

  • WallpaperMachine.xcodeproj/project.pbxproj
Applicability reference: AGENTS.md: # Agent rules Code / tests / docs: [conventions](docs/conventions.md), [testing](docs/testing/README.md).

CodeRabbit inference engine (docs/conventions.md)

Files:

  • App/Services/LockScreen/LockScreenPublicationLedger.swift
  • App/Services/LockScreen/LockScreenWallpaperService.swift
  • Tests/Unit/LockScreen/LockScreenPublicationLedgerTests.swift
  • Tests/Unit/LockScreen/LockScreenPublicationTests.swift
  • docs/architecture.md
  • docs/testing/coverage.md
  • scripts/code_health_baseline.json
Source excerpt: `Extension/`: sandboxed extension; `Shared/`: only code compiled by both targets, extension-API-safe.

CodeRabbit inference engine (AGENTS.md)

Files:

  • Tests/Unit/LockScreen/LockScreenPublicationLedgerTests.swift
  • Tests/Unit/LockScreen/LockScreenPublicationTests.swift
Source excerpt: `scripts/`: Python CLI; reuse `scripts/lib/` (paths, glyphs, `xcode.py` quiet tool runner); tests in `scripts/tests/`.

CodeRabbit inference engine (AGENTS.md)

Files:

  • scripts/code_health_baseline.json
Learnings: 1

Common learnings

Learnt from: CR
Repo: MMFoundation/WallpaperMachine PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-10-31T03:28:31.700Z
Learning: Source excerpt:
# Agent rules

## Ownership and invariants

- `project.yml` owns targets/settings/versions: run `xcodegen generate`, never hand-edit
  `WallpaperMachine.xcodeproj`. Never edit versions by hand: CI bumps them when a
  pushed commit message carries a `release:` line, and that also cuts a release, so
  write one only when the user asks for a release ([release](docs/release.md)).
  Never extend a `CHANGELOG.md` section whose tag exists; unpublished fixes go into
  the next version ([recovery](docs/release.md#recovering-a-failed-release)).
  Regenerate `App/Bridge/Generated/` via `scripts/build.py` after bridge changes;
  never patch generated bindings.
ast-grep (0.51.3)

App/Services/LockScreen/LockScreenWallpaperService.swift

[error] 1064-1064: An archive entry's path/name (e.g. ZIPFoundation Entry.path) is joined to a destination directory with appendingPathComponent / appending(path:) without a containment check. A malicious archive entry such as ../../etc/passwd can escape the extraction directory and overwrite arbitrary files (Zip Slip / path traversal). Before writing, canonicalize the joined URL and verify it is still inside the destination root (e.g. compare standardizedFileURL.path against the destination's path with a trailing separator, and reject entries that resolve outside it).
Context: exchange.appendingPathComponent(LockScreenConfiguration.fileName)
Note: [CWE-22] Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

(zip-slip-entry-path-append-swift)

[error] 1066-1066: An archive entry's path/name (e.g. ZIPFoundation Entry.path) is joined to a destination directory with appendingPathComponent / appending(path:) without a containment check. A malicious archive entry such as ../../etc/passwd can escape the extraction directory and overwrite arbitrary files (Zip Slip / path traversal). Before writing, canonicalize the joined URL and verify it is still inside the destination root (e.g. compare standardizedFileURL.path against the destination's path with a trailing separator, and reject entries that resolve outside it).
Context: exchange.appendingPathComponent(LockScreenExtensionRequest.fileName)
Note: [CWE-22] Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

(zip-slip-entry-path-append-swift)

Tests/Unit/LockScreen/LockScreenPublicationTests.swift

[error] 114-114: An archive entry's path/name (e.g. ZIPFoundation Entry.path) is joined to a destination directory with appendingPathComponent / appending(path:) without a containment check. A malicious archive entry such as ../../etc/passwd can escape the extraction directory and overwrite arbitrary files (Zip Slip / path traversal). Before writing, canonicalize the joined URL and verify it is still inside the destination root (e.g. compare standardizedFileURL.path against the destination's path with a trailing separator, and reject entries that resolve outside it).
Context: fixture.exchange.appendingPathComponent(LockScreenReadiness.fileName(displayID: scene.displayID))
Note: [CWE-22] Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

(zip-slip-entry-path-append-swift)

LanguageTool

docs/testing/coverage.md

[style] ~1049-~1049: This sentence contains multiple usages of the word “again”. Consider removing or replacing it.
Context: ... once more; the extension is prepared again only for a mode not yet shown; an updat...

(REPETITION_OF_AGAIN)

SwiftLint (0.65.1)

App/Services/LockScreen/LockScreenPublicationLedger.swift

[Warning] 14-14: Prefer empty collection over optional collection

(discouraged_optional_collection)

[Warning] 32-32: Prefer empty collection over optional collection

(discouraged_optional_collection)

[Warning] 40-40: Prefer empty collection over optional collection

(discouraged_optional_collection)

Tests/Unit/LockScreen/LockScreenPublicationLedgerTests.swift

[Warning] 131-131: Prefer empty collection over optional collection

(discouraged_optional_collection)

[Warning] 196-196: Prefer empty collection over optional collection

(discouraged_optional_collection)

[Warning] 197-197: Prefer empty collection over optional collection

(discouraged_optional_collection)

[Warning] 11-11: Classes should have an explicit deinit method

(required_deinit)

Tests/Unit/LockScreen/LockScreenPublicationTests.swift

[Warning] 47-47: Prefer empty collection over optional collection

(discouraged_optional_collection)

[Warning] 48-48: Prefer empty collection over optional collection

(discouraged_optional_collection)

[Warning] 18-18: Classes should have an explicit deinit method

(required_deinit)

[Warning] 55-55: Classes should have an explicit deinit method

(required_deinit)

@ghfind-review ghfind-review Bot added the review: high ghfind author score; see https://ghfind.com label Dec 1, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-01T07:24:08.405705Z 76742ac PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codescene-access codescene-access 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.

Code Health Improved (1 files improve in Code Health)

Gates Passed
6 Quality Gates Passed

See analysis details in CodeScene

View Improvements
File Code Health Impact Categories Improved
LockScreenWallpaperService.swift 5.46 → 6.30 Complex Method, Complex Conditional, Large Method, Bumpy Road Ahead, Overall Code Complexity

Quality Gate Profile: Pay Down Tech Debt
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

@github-actions github-actions Bot added area: automation Project area: automation area: lock-screen Lock screen, screen saver, and related system wallpaper ownership status: in-review PR is awaiting review, CI, or GitHub's mergeability calculation labels Dec 1, 2026
@claude

claude Bot commented Dec 1, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@devin-ai-integration devin-ai-integration 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.

Devin Review found 1 potential issue.

Devin Review

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Capy found no issues.

View 5 other findings in Capy.

Open in Capy

@github-actions github-actions Bot added status: blocked PR has outstanding review, CI, or merge prerequisites; see its triage section status: in-review PR is awaiting review, CI, or GitHub's mergeability calculation and removed status: in-review PR is awaiting review, CI, or GitHub's mergeability calculation status: blocked PR has outstanding review, CI, or merge prerequisites; see its triage section labels Dec 1, 2026
@capy-ai

capy-ai Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai review

1 similar comment
@fzlzjerry

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: automation Project area: automation area: lock-screen Lock screen, screen saver, and related system wallpaper ownership Opus refactor review: high ghfind author score; see https://ghfind.com status: in-review PR is awaiting review, CI, or GitHub's mergeability calculation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant