Skip to content

feat(luma): add opt-in private desktop capture - #24

Merged
sandeepbist merged 3 commits into
mainfrom
codex/luma-private-capture
Oct 28, 2026
Merged

sandeepbist merged 3 commits into
mainfrom
codex/luma-private-capture

Conversation

@sandeepbist

Copy link
Copy Markdown
Owner

Why

Native capture exclusion can black out a shared monitor instead of showing the desktop behind Luma. This experimental opt-in plugin renders a separate capture scene without Luma or the island while local interaction continues.

What changed

  • Add a capture-only renderer plugin with exact compositor and ABI guards, unsupported-output refusal, and unload completion checks.
  • Add a build and enable helper with guarded startup restoration and recovery state.
  • Add a searchable privacy switch, isolated native verification, and offline loader and settings checks.

Scope

  • Supports only the pinned Hyprland build, GL rendering, sRGB, scale 1, and unrotated outputs.
  • Omits the entire island, private popups, fadeouts, drag previews, and shared cursor. The feature is opt-in.
  • Recipient-app testing and other capture methods remain outside this guarantee.

Tradeoffs

The plugin uses internal compositor hooks. A compositor update disables compatibility until the implementation is checked against that build.

Blast Radius

Only enabled, supported capture sessions use the plugin. Rendering or compatibility failures refuse capture instead of falling back to an unfiltered frame. Compositor hooks can still crash the desktop if their assumptions are wrong.

Verification

  • Loader and settings checks pass, including 75 persistence checks, Lua execution, keyboard operation, preview restrictions, and failed-enable recovery.
  • The plugin builds against matching installed headers. Six callback cases pass ASan and UBSan, and the expired-session protocol client compiles with warnings treated as errors.
  • A fresh nested compositor run passes full-monitor, region, continuous, popup, island, production-canvas, unsupported-scale, active-unload, and cold-start restoration checks. The parent session is unchanged.

@sandeepbist

Copy link
Copy Markdown
Owner Author

Automated independent verification for PR #24. This is a source verdict, not a GitHub approval.

Source verdict: FAIL. Reviewed all 16 changed paths and changed comments at head d984c3556deacae9d75f5ec42429aa7898b54953, against main at d9904944e943d33c14fbbfb2976867b03ca67d8c. Stable patch-id is 89afb30e128459182b2b6cf1063516e301e49167.

P2: failed unload loses recovery information. In scripts/luma-capture.py, disable() deletes the marker at line 174 before attempting unload. I reproduced a successful reload followed by an unload IPC failure using the exact helper with temporary files and mocked compositor replies. The plugin remains loaded, but a second disable() returns success without any IPC call because the marker is gone. restore() skips, and enabling the same build then fails with “A different Luma capture build is loaded. Stop capture, then disable before enabling again.” The settings service also cannot retry off because the saved state is already false. Keep a retryable record until unload succeeds or is confirmed absent, and cover failed unload followed by retry. Existing loader tests exercise reload failure with successful unload, so they miss this case.

Fresh verification passed the 75-check loader suite, production settings and preview checks, six ASan/UBSan callback cases, protocol-client build, a focused locked-state check with zero backend calls, and a fresh plugin compilation. The binary SHA-256 exactly matches the retained nested-run binary: 655cdb52dcb1f8a5a978b22f90d9d30b0c49f20450c176910a01939f9be3876b.

The structure correction is valid. The capture fixture is independently copied to shell.qml and launched by the live test. The corrected structure check passes for 145 QML files. Fresh injected unused-QML and missing-fixture-import controls both fail at their intended assertions. No graph or import checks were waived. All other production and fixture bytes are unchanged from d071f645f8cd2d5f9c7320d5adcf1c767d130729.

I inspected retained exact-hash native evidence rather than rerunning the full integration suite. Independent checks verified source/binary hashes, 35 complete expected-image comparisons, and 19 freshly decoded video frames with both background phases. Representative local and exported production frames show the canvas locally and its omission from capture. No parent-compositor mutation or recipient-app test occurred. This does not certify arbitrary compositor/plugin combinations, portals, Google Meet, or Discord. The feature remains experimental and scoped to Hyprland c26dbf9337998ba9afcfe84050e36969bb787598 and its stated output restrictions.

Changed-comment review found six justified keeps and 18 prose-line deletion recommendations across five files. The keeps are proven upstream fadeout and hook constraints, Lua byte-escape behavior, and three actual public CLI help docstrings. File specimens and interpreter directives were treated as functional data. These style notes are separate from the recovery defect; no source edits were made.

At the single entry snapshot, Quick checks and three CodeQL check entries had succeeded; Offline checks on Arch was still running. There were no reviews or review threads. GitHub reported REVIEW_REQUIRED and merge state BLOCKED. CI was not polled, and formal approval remains an external gate. Fix and reverify the recovery defect before treating the source as ready.

@sandeepbist

Copy link
Copy Markdown
Owner Author

Automated independent verification by Codex/gpt-6.1-sol. This is a normal verification comment, not a formal GitHub approval. I did not author this change.

Source verdict: PASS+NOTES. This covers all 16 paths at head 3bd592deb99b08554d92185d76db8ccf7b3d0656, against main at d9904944e943d33c14fbbfb2976867b03ca67d8c. Stable base-to-head patch-id is ed95d22fff1806f5bf18b0ffb0683cc4841ee04a. I read the prior complete independent review at d984c3556deacae9d75f5ec42429aa7898b54953, verified that ten paths carry forward byte-for-byte, and freshly reviewed all six recovery delta paths and affected callers. The prior failed-unload P2 is resolved. No new source blocker was established.

The real production helper now unloads before marker deletion and reloads configuration even without a marker. My isolated regression runs the actual old and final helper CLI with temporary files and mocked IPC. The old helper fails the intended Failed unload discarded the recovery marker assertion. The final helper passes eight failure/retry cases covering logical rejection, OSError, timeout, completed unload with a lost or ambiguous reply, and final reload rejection, OSError, or timeout. Assertions verify marker retention, preserved same-build identity, native-fallback ordering, acceptance of plugin not loaded, unchanged config bytes, and successful retry. These are mocked failure cases, not live compositor fault injection.

Fresh affected checks pass: the loader suite reports 100 checks with real Lua parsing/runtime; production Settings and preview checks pass; six callback cases pass under ASan/UBSan; structure resolves 145 QML files and literal imports; helper help and patch whitespace checks pass. Comment cleanup removes 12 narration lines and three unused docstrings. Public CLI help, directives, specimens, and evidenced external constraints remain. Keeping the generated Lua provenance and persisted registration suffix avoids an unrelated migration. The tested LumaCapture.finish process-exit callback remains valid; prior naming suggestions are not correctness defects.

I inspected the parent's fresh successful nested --production --loader --session-client run rather than rerunning compositor integration. Exact plugin/live/fixture hashes and both binary copies match, including binary SHA-256 655cdb52dcb1f8a5a978b22f90d9d30b0c49f20450c176910a01939f9be3876b. Helper identity matches the separate recovery record and current exact source; the native manifest does not itself include the helper. Fresh inspection verifies 35 complete retained images and 18 decoded video frames across both background phases, plus blur equality and baseline controls. Recorded loader disable, cold-start restoration, expired-session refusal, and production typing results are consistent. The measurements contain 55 records with 48 distinct names, including repaint retries, not 55 independent checkpoints.

CI readiness: FAILED at the single snapshot. Quick checks and three CodeQL entries passed. Offline checks on Arch failed. Its log reports tests/notes-popup.py failing with Keyboard pin ignored, before the registered capture checks. I did not diagnose or waive that failure, poll status, or request a rerun. Local focused success does not make CI ready.

Formal approval: REQUIRED. GitHub reports REVIEW_REQUIRED, no reviews or review threads, and merge state BLOCKED. This comment supplies no formal approval. No source edits, parent-compositor commands, pushes, merges, watches, or protection changes occurred. This review does not certify recipient applications, portals, arbitrary plugin combinations, or universal capture exclusion. Existing pinned-compositor and output restrictions remain.

@sandeepbist
sandeepbist force-pushed the codex/luma-private-capture branch from 3bd592d to f9a879e Compare October 28, 2026 21:39
@sandeepbist
sandeepbist merged commit 37c25fb into main Oct 28, 2026
5 checks passed
@sandeepbist
sandeepbist deleted the codex/luma-private-capture branch October 28, 2026 21:53
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