Bind asynchronous clipboard capture to its generation - #18
Open
MiMoHo wants to merge 1 commit into
Open
Conversation
MiMoHo
force-pushed
the
bind-clipboard-capture-generation
branch
from
September 9, 2026 15:22
b4c9d25 to
e2f5832
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The asynchronous clipboard path mixed generations, UI threads, and privacy states:
changeCount, but later re-read content and pasteboard types independently, allowing content from one generation to be classified with types from anotherpbCount, not the generation associated with that read jobdispatch_queue_createreceived anNSStringobject instead of the required C-string labelThe off-main image update is consistent with the AppKit worker-thread crash class reported in TermiT#262, although that historical crash log alone cannot identify one exact Flycut line.
Change
shouldSkipside-effect-freeshouldSkipselectorVerification
initial RED: four focused safety tests failed for the missing policy, mixed generations, worker UI update, diagnostic fallthrough, and queue-label type
a first hash-bound dual review correctly failed the candidate because in-flight reads could bypass a later pause and queued Remote Desktop toggles could invert the pause/status state
added the current pause state to the native commit policy, removed polling progress toggles, and moved diagnostics behind the same main-thread gate
final focused suite: 4/4 passed, including changed generation, blocked generation, paused-at-commit, side-effect-free diagnostics, and source-thread invariants
native arm64 link comparison: base and candidate each link the same 20 PBX sources with 0 errors; no new warning signature and two existing warnings removed
Clang analyzer comparison for
AppController.mandFlycutOperator.m: 15 identical existing diagnostics and 0 errorsfinal independent concurrency/state review of diff SHA-256
a58cd6bd19c2cb849a4a3f3d413dc57bc570f30fde996c459a6ad7ba309a40e5: PASS, no findingsfinal independent security/privacy/MRC review of the same diff: PASS, no findings
Interaction with PR #5
PR #5 changes the same privacy-filter method. When combining them, retain PR #5’s independent concealed/password-type filtering while keeping diagnostic recording in this PR’s generation- and pause-validated main-thread commit path.
Limitation
A full signed Xcode release build, Thread Sanitizer app run, and live delayed Remote Desktop transfer were unavailable in this Command Line Tools environment. The candidate links the complete app target and uses a native C policy test plus source-level queue/thread invariants.