Capture the work before leaving the main actor
Omitto's view model owns the source text, review controls and displayed output on the main actor. A scan captures the input and policy, advances a generation number and marks processing active before starting a detached task.
The task builds the line map and calls RedactionCore. When it returns, the main actor checks that its generation is still current, the input still equals the captured text and the task is not cancelled. Only then are the result and review metadata assigned together.
An edit invalidates the review as well as the output
Changing the source does more than cancel pending work. The view model clears the old output, findings, report, line map and per-finding Keep choices. Those values were derived from the previous text, so they cannot remain the current review after an edit.
Copy stays disabled during processing. Together, invalidation and the publication checks prevent an old analysis from quietly replacing or standing in for the text now being reviewed. This is a source-to-result consistency rule, not a claim that the detector found every secret.
Cancellation and stopping computation are different
RedactionCore exposes a synchronous operation and does not poll Swift task cancellation inside the detector. An obsolete scan may continue computing until it returns; the app's checks then reject its result.
The recorded June change supports moving the work out of the main-actor method and adding generation checks. The current code also checks input equality. Neither source inspection nor the historical record supplies a measured responsiveness gain or a fresh concurrency result, so those remain checks to run.
Background redaction result ownership
Computation may finish late; only the current generation is allowed to publish.
Main actor
Background work
Review and export
Scroll or drag the background to move. Use the zoom buttons to resize.Arrow keys move between components. Enter selects.
Choose a component to explore
Select a numbered component on the map or use the component menu. Its details and connections will appear here.
No component selected.
All connections (8)
- 01 · Current input → 02 · Captured scan requeststart current scan · Direct call
- 02 · Captured scan request → 03 · Synchronous redactioncaptured inputs · Async task
- 03 · Synchronous redaction → 04 · Publication checkscomputed result · Response / return
- 01 · Current input → 04 · Publication checkscurrent generation · Direct call
- 04 · Publication checks → 05 · Obsolete resultstale or cancelled · Blocked / denied
- 04 · Publication checks → 06 · Current output and findingscurrent result · Direct call
- 06 · Current output and findings → 07 · Explicit copy actionreviewed output · Direct call
- 07 · Explicit copy action → 08 · System pasteboarduser copy · Direct call