Repository navigation
Description
Problem
When a concealed request (a {{secret:KEY}} substituted by trusted code) fails, cua's secret wrapper tells the model either "nothing was entered" or "it may have been entered". The "nothing" answer currently rests on absent evidence: src/services/sky.mjs:244–245 treats error.meta.startedAt === null as proof that no key or paste was posted, for every error name:
const unentered = error?.name === 'SkyComputerUseError' && Boolean(error.meta) && error.meta.startedAt === null;Two branches rely on it:
inputFailedUnentered(src/services/secret-input.mjs:103), which saysNOTHING_ENTEREDfor an ordinary error;userIntervened's branch without an account (sky.mjs:251,unenteredpassed through).
startedAt is NSNull until the engine's first posting (native/engine/Sources/Engine/Input.swift ~L221). But a null value is the absence of a record, not a record that nothing was posted. An error raised on a path that never set the input meta, or raised before the meta was attached, or coming from an older engine, reads the same. This errs in the unsafe direction: the model is told a secret went nowhere when it may have gone in, and may then type it again or skip warning the person. Ruling 1260 set the rule: "nothing entered" comes only from the engine positively recording that no key or paste was posted. Missing, unparsed or older accounts stay "may have been entered".
A related over-cautious case was found in the review of #601's merge into feat (ruling 1258's review, P2; ruling 1262):
- An intervention caught by keyText's guard before its first key (
Input.swift~L487–488,checkIntervention()before the first post at ~L491) throwsuserChanged(app, phase: .inFlight). - That is the same phase as a stop between keys. The only phases are
beforeActionandinFlight(Intervention.swift~L117–118). The wire account is exactly{phase, effects}(Intervention.swift~L177), andreadInterruption(src/services/engine/interruption.mjs~L21–26) keeps only those two fields. - So the wrapper can't tell "stopped before any key" from "stopped part-way". Under 1260 it answers "may have been entered", and for a password field it adds "ask the person to check where it went and clear it if it shows" for a field cua never typed into.
- This is safe, but untrue.
Both need the same thing: a positive engine record of "nothing was posted".
Wanted
- Engine, the positive record. On every path that throws before its first key or ⌘V, the engine records that nothing was posted. Suggested (M5's design):
InterruptiongainsbeforeInput, sent as"beforeInput": trueonly when set. keyText tracks whether a key has posted. AcheckIntervention()throw while nothing has posted is rethrown withbeforeInput = true, and the paste route does the same before its first ⌘V. Ordinary (non-intervention) errors get an equivalent positive field on the input meta (for exampleposted: 0, orbeforeInput: true), set only where the engine knows it has posted nothing. A new phase value is an alternative, but it would touch everyphase === 'inFlight'check. Older engines omit the field. - Wrapper, keyed on it.
- "Nothing was entered" (with getAXState advice allowed) only when the engine's positive record says nothing was posted, and the account names no
inputorvalueeffect. sky.mjs:244–245'sstartedAt === nullinference is demoted: alone it means "may have been entered", for every error.inputFailedUnenteredand the account-lessuserIntervenedbranch move to the positive record.readInterruptionkeeps the new field.
- "Nothing was entered" (with getAXState advice allowed) only when the engine's positive record says nothing was posted, and the account names no
- Unchanged:
- ruling 1247(d): whenever entry is possible, no branch advises observing the app (no screenshot, no getAXState);
MAY_SHOWonly for a password field;- Verify unintended save-sheet completion across native intervention and report partial effects #212's interruption account (phase and effects).
Tests
- Swift: the flag is set on the keyed and paste throw paths before the first post, and absent after a post.
- Node:
- a pre-key stop with the record answers "nothing entered";
- an account without the record,
startedAt: nullalone, an unparsed meta, or an older engine's reply each answer "may have been entered", with no advice to observe; - an explicit
inputorvalueeffect answers "entered".
- The 1247(d) every-branch sweep in services-sky gains the new cases.
Scope and process
One PR from main, after #601 (#587/#590) lands. Reviewed by reviewer-high, since it is the secret path. Then merged into feat/117-m5 before the flip's full sitting, if that hasn't run yet.
Board
Bug, P2. Blocks #506. Parent #117. Relates to #587, #212 and #601.
Sminos-Session: cursor235#b93055dd (cua on macbook)
Activity
SSFSKIM commentedon Nov 28, 2026
[board] in-progress: cursor235 taking under ruling 1263; branched from #601 head, main merged in after #601 lands
engine 0.2.3: record beforeInput where nothing of the input was poste…
Secret wrapper: "nothing was entered" only on the engine's beforeInpu…
engine: InputMeta.posting's comment says the wrapper no longer reads …
engine: an input request past its deadline at receipt records beforeI…
Secret wrapper: "nothing entered" needs cua's engine selected, the re…
tech-debt: the engine-trust check and the backend import can resolve …
SSFSKIM commentedon Nov 28, 2026
[board] in-review: PR #607 (draft, stacked on #601); review converged round 2
macOS engine: R1 holds at type_text's paste transport effect reading …
Merge origin/main into fix/602-nopost-record (refs #602)
plugin 0.30.4: #601 took 0.30.3 (refs #602)
Secret wrapper: "nothing was entered" only on the macOS engine's posi…
SSFSKIM commentedon Nov 28, 2026
[board] done: Landed via PR #607 (cua 0.30.4, engine 0.2.3)
SSFSKIM commentedon Nov 28, 2026
[board] done: merged in #607
Merge origin/main 96d71cf (#601, #607/#602's positive no-input record…
Ruling 1269: a drift test holds the secret wrapper's preparation-only…
macOS engine: type_text's paste route gates every ⌘V and Return on th…