Skip to content

Verify unintended save-sheet completion across native intervention and report partial effects #212

Open

Description

@SSFSKIM

Problem & intent

P1 safety investigation from /Users/new/Developer/GitHub/MAWS/plugin/cua/dogfood-feedback/l6-artifacts.md, Added after the extra slot (21:42Z), item 14. Reported sequence, without adding unobserved keys:

  1. A native save sheet was open.
  2. The agent called setValue(saveAsNameTextField, <intended path>).
  3. The call returned -10016 The user changed ….
  4. The sheet subsequently closed and a file existed in Downloads with the default name, not the intended path. The reporter says they did not click Save and later moved the file out.

Verdict: plausible partial-action/intervention safety incident, not a confirmed engine-generated Save. The report does not include per-call action metadata, intervening input provenance, or a trace establishing who committed the sheet. A default-name save is consistent with the filename write never happening, but does not identify what triggered Save.

Pinned static evidence at d95261f:

  • ElementInput.swift:inputPrologue reads the intervention guard and calls checkBeforePosting before the action's input. A pre-action -10016 stops that request before posting.
  • ValueSetting.swift:setElementValue calls focus, then checkInFlight, then the AXValue write. focusFieldIfNeeded can first write AXFocused and send a synthesized focus click. A later in-flight -10016 can therefore follow real preparation effects; it does not roll them back. focusingClick explicitly keeps its action interval and arms the later observation settle even when the value operation is refused afterwards.
  • Intervention.swift:checkBeforePosting and checkInFlight can emit the same The user changed sentence. The sentence alone cannot distinguish refused-before-input from partially effected-then-stopped.
  • FocusHold.swift:holdElementFocus may prepare route 3 through Activation.swift:FakeActivation, whose activation pair may include a left activation-point click. That preparation has separate activationClick metadata; a null ordinary action interval is not sufficient evidence that no preparation mutation occurred.
  • deliverPointer checks intervention before posting a click's event group; postToProcess posts the group back-to-back. Once posted, events can be handled asynchronously; no atomic cancellation/rollback is possible when user input arrives concurrently. This is a timing boundary to test, not proof of delivery after a detected stop.
  • This setValue path sends no Return or Save key equivalent. Its settable-field write is AXValue. Do not invent a partial Return explanation for this call. A separate prior key call or the user's own action would require evidence.
  • Settle.swift only waits/observes on the next get_app_state; it does not commit a sheet or send keys. It can reveal a previously queued effect, not cause a Save itself.
  • The service retains input/activation metadata in tool _meta, not ordinary model text, and later calls can replace it. The report supplies none of it.

Constraints

Preserve the hard distinction between pre-action refusal and in-flight interruption. Never retry an uncertain save, automatically undo user actions, force a sheet open/closed, or promise to retract already dispatched events. No owner files or GUI in this triage. Live proof must use an authorized owned save fixture and temporary output directory; never the owner's Downloads. Do not weaken intervention guards.

Success criteria

  • Inject intervention before preparation, after AXFocused, after any activation/focus click, immediately before AXValue, and during queued app event handling. Record value-free phase ordering, event origin/target and sheet outcome.
  • Prove pre-action refusal posts no input; prove no further optional mutation starts after the engine detects in-flight intervention, while identifying unavoidable already-posted event completion separately.
  • Reproduce or rule out accidental default Save from activation/focus preparation, incorrect target/hit point, a queued earlier key, and genuine user input. Preserve the actual provenance and uncertainty.
  • Expose a model-visible distinction between refused-before-effects and interrupted-after-possible-effects, including preparation phases; preserve per-action metadata even when observation follows in the same cell. Never say nothing happened based solely on -10016 or a null ordinary interval.
  • Add focused regression tests for the proven mechanism; if the Save itself is not reproducible, retain the confirmed error/partial-effect classification repair and record the missing evidence explicitly.

Open questions

Was the -10016 pre-action or in-flight? Did a preparation click occur, and where? Was a prior key already queued? Did the user's own input commit Save? The Markdown report and static code cannot choose among these.

Decision log

2026-10-23: Prioritized after owner follow-up. All-state searches for save sheet, intervention partial, setElementValue and focusingClick found no dedicated ticket. Separate from #208's generic intervention provenance wording, #206's panel targeting, and #200's frontmost guard. Category bug; priority P1; state ready-for-implementer (bounded investigation and diagnostic repair); parent N/A; blocked-by N/A. No live reproduction performed.

Sminos-Session: cua_repl#1ea561bc (MAWS on macbook)

Activity

  1. added
    bug
    status:ready-for-implementer
    priority:P1
    status:in-progress
    status:in-review
    and removed
    status:ready-for-implementer
    status:in-progress
    on Oct 23, 2026
  2. SSFSKIM commented on Oct 23, 2026

    @SSFSKIM
    OwnerAuthor

    [board] in-review: Draft stacked repair: phase/effect diagnostics and post-stop foreground yielding; hosted gate pending. Save provenance remains unproven.

  3. SSFSKIM commented on Oct 23, 2026

    @SSFSKIM
    OwnerAuthor

    Draft repair ready for independent review: #218, stacked on feat/117-m4. Final head a77ad01 passed hosted engine-swift,test (https://github.com/SSFSKIM/cua/actions/runs/40040058748): 538 Swift tests passed; Node 4220 passed, 89 skipped, 0 failures. Tests cover pre-action refusal, focus/activation preparation before AXValue, already-dispatched event completion, and no optional route-4 restore after a detected stop. Native and JS-visible errors now distinguish the phases; concealed input and same-cell observation retain the diagnostic. No GUI/mini use or local native build. Save provenance remains unproven; Refs, not Closes, preserves the outstanding causal investigation.

  4. SSFSKIM commented on Oct 24, 2026

    @SSFSKIM
    OwnerAuthor

    Addressed reviewer-high P1 in aa247af (PR #218): classify the entire execute request after deferred cleanup, including menu/focus activation release attempts. Cleanup ordering is unchanged; a refusal accompanied by teardown is now interrupted-after-possible-effects with activation-teardown-attempted, not before-effects. Execute-level fixtures reproduced the issue (hosted RED 40041621738). Final hosted engine-swift,test GREEN: https://github.com/SSFSKIM/cua/actions/runs/40042332977 — 540 Swift tests passed; Node 4221 passed, 89 skipped, 0 failures. Pushed fix/212-interruption-effects; ready for controller verification.

  5. 27 remaining items

  6. added 15 commits that reference this issue on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority:P1status:in-review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions