Repository navigation
Description
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:
- A native save sheet was open.
- The agent called
setValue(saveAsNameTextField, <intended path>). - The call returned
-10016 The user changed …. - 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:inputProloguereads the intervention guard and callscheckBeforePostingbefore the action's input. A pre-action -10016 stops that request before posting.ValueSetting.swift:setElementValuecallsfocus, thencheckInFlight, then the AXValue write.focusFieldIfNeededcan 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.focusingClickexplicitly keeps its action interval and arms the later observation settle even when the value operation is refused afterwards.Intervention.swift:checkBeforePostingandcheckInFlightcan emit the sameThe user changedsentence. The sentence alone cannot distinguish refused-before-input from partially effected-then-stopped.FocusHold.swift:holdElementFocusmay prepare route 3 throughActivation.swift:FakeActivation, whose activation pair may include a left activation-point click. That preparation has separateactivationClickmetadata; a null ordinary action interval is not sufficient evidence that no preparation mutation occurred.deliverPointerchecks intervention before posting a click's event group;postToProcessposts 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.swiftonly 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
SSFSKIM commentedon Oct 23, 2026
[board] in-review: Draft stacked repair: phase/effect diagnostics and post-stop foreground yielding; hosted gate pending. Save provenance remains unproven.
SSFSKIM commentedon Oct 23, 2026
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.
test: cover request teardown around intervention refusals (#212)
fix: include request teardown in interruption effects (#212)
SSFSKIM commentedon Oct 24, 2026
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.
macOS engine: a userIntervened answer tells a refusal from a stop par…
Secret wrapper and service: the engine's interruption account, in fix…
native matrix: #212's save-sheet cell, intervention-save-sheet, prepa…
27 remaining items
#212 save sheet: every destination exit keeps its Go To record, last …
Hosted sittings: #212's save-sheet step judges the real path's rows, …
#212's unsaved proof: no file behind TextEdit's window and the run's …
#212's save sheet: a key-guard stop at the unsaved proof's cancel sto…
#212 save-sheet step: a save found at an early exit fails, ahead of t…
#212's Go To field reads focused through the selection of a remembere…
Sitting C alternates which lane runs first by run, and every run reco…
#212's Go To field reads focused through a selection only when the se…
#212's probe is armed a fixed 150 ms before set_value; cua passes by …
Merge #601 (origin/fix/587-590-typereadback 0c39038: #587/#590's engi…
Ruling 1259 enters the Decision Log against #212: an interrupted secr…
Merge origin/main 96d71cf (#601, #607/#602's positive no-input record…
Ruling 1269: a drift test holds the secret wrapper's preparation-only…
A proof run's probe readings are labelled proof readings with their j…
Merge main 1326898 into feat/117-m5: #617 (cua 0.31.1) and #616/#619 …