Repository navigation
Secret wrapper: "nothing was entered" only on the macOS engine's positive no-input record (#602) - #607
Merged
Conversation
…ith a note; a failed read is read again (refs #587) #587 (ruling 1219): a focused element that is not a text field (Finder's type-select in a list or outline) threw typeUnconfirmed (notTextField) after its keys landed; the vendor answers ok. Both routes now answer success with a note that the text could not be read back and the app should be observed before relying on it or typing it again; the record keeps confirmed: false and the reason. noFocusedElement takes the same contract: the vendor's targetForKeyboardEvent answers the app's pid when focusedUIElement is nil, with no error, and posts without reading the element (F §5.7, the pinned helper's 0x1006f645c). A text field's read-back, the password reasons and selectionChanged are unchanged. #590 (ruling 1225): a role, value or range read at the snapshot (settle and wait included), and a role or subrole read in a poll, that answers nothing is read again up to 2 times, 15 ms apart, while its phase has time (the request's time left less one messaging timeout; the poll's budget). Only a failed read is retried; a mismatch never becomes ok. On an unreadable reason the record carries readFailure {phase, read, axError, retries, msSinceLastKey, role, subrole}, never a value; concealed and password records drop the counts and time. Sminos-Session: cursor235#b93055dd (cua on macbook)
…ilure rides as cua/typeReadback (refs #587) Sminos-Session: cursor235#b93055dd (cua on macbook)
…try, the record's readFailure, the unretried focus check (refs #590) Sminos-Session: cursor235#b93055dd (cua on macbook)
…failed reads are retried (refs #587) Sminos-Session: cursor235#b93055dd (cua on macbook)
…nished with no field; a retry never reads past its first try (refs #587) Ruling 1244 on the review of e54eab4..106d201, with ruling 1242's narrowing. - P1-1: a concealed request with no field stays typeUnconfirmed and its remedy never advises a screenshot or getAXState(), whatever the search found. - P1-2: the lookup has three outcomes: a field, .noField (the walk finished with none, and the marker route, when it ran, reached the web area), or nil, indeterminate, which throws as before. The walk answers ReadbackWalkOutcome; the app's own answer of no focus is never enough (background Safari answers so over a focused field). - P1-3: a value or range retry, in the snapshot and its settle, runs only after the role and subrole are read again and still classify the field. - P1-4: a poll's role read naming AXSecureTextField or another role ends the check whatever its subrole read answers. - P2-5: a field the lookup took for a password field is classified by one role read, never retried. - P2-6: no field under select_text's range is selectionChanged, nothing typed or pasted. - P2-7: the keyed route's retries and polls are bounded by the request's deadline. - P2-8: readFailure keeps the role and subrole last read successfully. Sminos-Session: cursor235#b93055dd (cua on macbook)
Sminos-Session: cursor235#b93055dd (cua on macbook)
…the invariants and the record (refs #590) Sminos-Session: cursor235#b93055dd (cua on macbook)
… (refs #587) The plugin manifests take main's descriptions and 0.30.0; the next commit bumps to 0.30.1. Sminos-Session: cursor235#b93055dd (cua on macbook)
…ailed reads are retried (refs #587) Sminos-Session: cursor235#b93055dd (cua on macbook)
…rows as before; a secret's answers never advise observing (refs #587) Ruling 1247 on the review of 106d201..d51ae68. - noFocusedElement throws typeUnconfirmed exactly as before #587 (a declared limit): .noField, the marker's .noField and ReadbackWalkOutcome are removed, the walk and marker route answer as before except as below. - c: a field the walk or marker found by a text-entry role (ReadbackFound.field's role) that the snapshot reads as another role answers fieldChanged, never notTextField. - b: a password field the marker classified but whose focus or place under the web area it cannot show closes as a password field's (fieldUnreadable, secure), whatever the walk finds. - d: a concealed request's typeUnconfirmed, every reason, ends with a remedy that names no observation (readbackConcealedRemedy, or readbackConcealedMayShowRemedy). - e: under select_text's range the nil lookup (and a closed password claim) answers selectionChanged before any key or ⌘V. - h: after a retry's re-classification, the retried read starts only while the bound allows. Sminos-Session: cursor235#b93055dd (cua on macbook)
…g the app (refs #587) Ruling 1247 (d). secretMayShow classifies 'passwordField' (as before) or 'unplaced' (notTextField, noFocusedElement, fieldChanged and every other reason posted without confirmation); every sky failure that may have entered part of the secret carries a warning of that kind, worded without a screenshot or getAXState; a userChanged intervention once entered asks the user to check where it went instead of re-querying. The test runs every branch after the first key. Sminos-Session: cursor235#b93055dd (cua on macbook)
…ment a declared limit, the secret rule (refs #590) Sminos-Session: cursor235#b93055dd (cua on macbook)
…t's range comes before it (refs #587) Ruling 1249 on the review of ef383ad..75481fd. - (1) The role the walk or the marker route found a field by is compared with the snapshot's before anything else is read: a password field's role or subrole answers becameSecure, any other difference fieldChanged; no value, range or length is read. A field the lookup took for a password field keeps its own check (noLongerSecure); the application's focus is not compared. - (2) Under a pending select_text range, any outcome that cannot hold it (a changed role, a non-text or secure non-field element, the nil lookup, a closed claim) answers selectionChanged before any key or ⌘V. Sminos-Session: cursor235#b93055dd (cua on macbook)
…till advise get_app_state after a secret's first key (refs #587) Sminos-Session: cursor235#b93055dd (cua on macbook)
…ion gate (refs #587) Ruling 1250 on the review of 75481fd..c96a7cc, replacing the case-by-case guards. - R1: a field's classification is ReadbackIdentity (role, subrole if read, open|secure). The lookup's is the baseline when it classified the field (the walk's role, the marker's role and subrole), else the snapshot's first read. Every later classification (the snapshot's first read, #359's wait, the settle, poll and checkpoint, every retry's re-classification, each length batch) goes through readbackClassify alone; any difference ends the read-back: becameSecure, noLongerSecure, else fieldChanged. Only components the baseline read are compared; the walk's first subrole is adopted. - R2: under a pending select_text range, readbackSnapshot lets only a verified-range .expect through; every other answer is selectionChanged there, before any key or ⌘V. - Deleted: wave 3's already-classified skip and foundRole comparison, the per-path selection checks of waves 2 and 3, fieldClosed's own role branches, readbackFieldClosed, readbackLength's own classification checks, and ReadbackFound.field's password and role (now identity). - The proof: a table of 16 classification points x their transitions x selection pending (196 keyed runs; 49 on the paste route), asserting outcome, keys and ⌘V; round 4's three cases by name. Sminos-Session: cursor235#b93055dd (cua on macbook)
…R1; AXGroup's unread subrole is open at the final batch (refs #587) Ruling 1254 on the review of c96a7cc..4b07ce0. - P1-1: stillFocused now answers ReadbackRefocus, the focus and the role the walk read of the field it found again; that role goes through readbackClassify (a role-only reading), so a field that turned AXSecureTextField or another role between the last value read and the check ends the read-back, and a checkpointed Return is not posted. Two table rows. - P2-2: the concealed final batch's failed-subrole exception applies only where the role leaves security open: not AXSecureTextField, not neverSecureRoles (#525). AXGroup with an unread subrole answers noLongerSecure again; AXGroup still secure by a read subrole, fieldChanged. Sminos-Session: cursor235#b93055dd (cua on macbook)
…oes down the length path (refs #587) Sminos-Session: cursor235#b93055dd (cua on macbook)
Sminos-Session: cursor235#b93055dd (cua on macbook)
Sminos-Session: cursor235#b93055dd (cua on macbook)
Sminos-Session: cursor235#b93055dd (cua on macbook)
…d (refs #602) The input meta gains `beforeInput: true`, sent only where the engine knows the request stopped before any key, ⌘V or Return, or value write went out: keyText before its first key (a stop there is userIntervened as one between keys is), the keyed read-back's selection gate, runPaste before its first post, pasteOperation before runPaste, setElementValue before the write, each of type_text, paste and set_value before its stretch begins, and the request's prologue. Ruling 1260: never inferred from a null startedAt. Sminos-Session: cursor235#b93055dd (cua on macbook)
…t record; plugin 0.30.3 (refs #602) secretUnentered replaces the startedAt === null inference for every error: the record, and no input or value effect in an interruption account when one is present. startedAt null alone, an unparsed meta and the vendor's or an older engine's reply answer "may have been entered", with no advice to observe the app (ruling 1247 (d), whose sweep gains the new cases). Sminos-Session: cursor235#b93055dd (cua on macbook)
…startedAt (refs #602) Sminos-Session: cursor235#b93055dd (cua on macbook)
…cord, a known phase and preparation-only effects (refs #602) Ruling 1268, the review of 0c39038..d87702f: still interacting (P1-1) and concealedInputUnavailable (P1-2) rest on the record like every other branch, an interruption account counts only with a recognized phase and effects from the engine's preparation-only list (P1-3), and the record is read only when CUA_SKY_SERVICE names cua's own engine service (P2-4). Everything else is "may have been entered", with no observe or retry advice. Sminos-Session: cursor235#b93055dd (cua on macbook)
…different targets (refs #602) Sminos-Session: cursor235#b93055dd (cua on macbook)
This was referenced Nov 28, 2026
Sminos-Session: cursor235#b93055dd (cua on macbook) # Conflicts: # native/engine/Sources/Engine/Version.swift # native/engine/Tests/EngineTests/TypeReadbackTests.swift # src/services/secret-input.mjs # src/services/sky.mjs # test/services-sky.test.mjs
Sminos-Session: cursor235#b93055dd (cua on macbook)
SSFSKIM
marked this pull request as ready for review
November 28, 2026 05:21
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
SSFSKIM
enabled auto-merge (squash)
November 28, 2026 05:22
SSFSKIM
added a commit
that referenced
this pull request
Nov 28, 2026
…600-paste-transport (refs #600) #601 and #607 were squash-merged: in every conflicted engine file main's content is this branch's base (0a65832), so each resolves to this branch's side. The plugin manifests take main's 0.30.4; the next commit bumps to 0.30.5. Sminos-Session: cursor235#b93055dd (cua on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Nov 28, 2026
…) into feat/117-m5; engineVersion 0.3.2 over both sides' engine changes (refs #506) Conflicts, each combined so both sides' behaviour survives: - native/engine/Sources/Engine/Version.swift: main's 0.2.3 (#602) and feat's 0.3.1 become 0.3.2, above both. Nothing pins either string. - native/engine/Sources/Engine/Input.swift: InputMeta keeps feat's concealedRefusal (ruling 1128) and gains main's beforeInput (#602), both on the wire; posting's comment says both that "nothing entered" is read only from beforeInput and that a post is noted as its effect (#212). keyText takes main's do/catch that marks beforeInput when anything throws before the first key, around feat's count of a unit at its key down (#186). So feat's in-flight guard stopping keyText before its first key (userChanged, phase inFlight, #212's account) now carries beforeInput: true beside the account; withMeta writes both, and Engine.execute's restatement keeps it. - native/engine/Tests/EngineTests/TypeReadbackTests.swift: main's side (its beforeInput assertion); the file now equals main's. Every test function main changed since the base is verbatim in the merge. - src/services/secret-input.mjs: main's secretUnentered, PREPARATION_EFFECTS and its intervention tables. userIntervened decides entered = !unentered only (ruling 1268); feat's #212 account (interruptionOutcome, now interruptionAccount) only describes the phase and the effects, after main's sentence ("...; nothing was entered; it was stopped part-way, and what may have taken effect: ...; nothing was undone"). feat's ENTERING_EFFECTS test of the effects is gone from it. - src/services/sky.mjs: both comments, main's cuaEngine parameter beside feat's errorName; unentered is main's (cuaEngine and secretUnentered); concealedInputUnavailable needs the record (main) and names feat's concealedRefusal cause (1128); the account is read only from cua's engine, as the record is. - test/services-sky.test.mjs: main's tests, assertions unchanged; the 1247 (d) sweep keeps feat's two account branches beside main's. Feat's #212 test now runs each account with and without the record (the record decides; an unknown effect and an unread phase may have entered; the vendor's account is not repeated), and its ruling 1128 test no longer expects a cause from a refusal with no meta (main's P1-2 makes that "may have been entered"). - .claude-plugin/plugin.json, marketplace.json: main's 0.30.4; the fields are otherwise equal. - tech-debt-tracker.md: both sides' entries; #607 resolves none of feat's. Also, not a conflict: feat's #212 test in test/services-engine-service.test.mjs gives its set_value stop the engine's record (both phases stop before the write) and expects the new order of the sentence. Sminos-Session: cursor235#b93055dd (cua on macbook)
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.
Closes #602.
What changes
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". Until now "nothing was entered" rested onerror.meta.startedAt === null(src/services/sky.mjs), for every error. A nullstartedAtis the absence of a record, not a record that nothing was posted, so the wrapper could tell the model a secret went nowhere when it may have gone in.Ruling 1260: "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".
The rule (ruling 1268): "nothing was entered" needs cua's engine as the selected backend, its
beforeInputrecord, a recognized interruption phase when an account is present, and only preparation-only effects; everything else may have been entered, and aninputorvalueeffect always means entered.The engine's record:
beforeInput: truecua's macOS engine (
native/engine/) gains one input-meta field,beforeInput. It is sent asbeforeInput: trueonly when set, and only where the engine knows the request stopped before any of its input went out: no key, no ⌘V or Return, no value write. A scroll, an activation or a focus step may have run. Older engines omit it.Why one field on the input meta:
interruptionaccount. The wrapper reads both: the record, and an account of a recognized phase whose effects are all preparation steps.Where it is set:
Input.swift): anything thrown before its first key event is posted: the in-flight guard (theuserIntervenedstop before the first key, which has the same name and sentence as a stop between keys), the source check, Engine: in background Safari, cmd+a then type_text can lose the first typed character, both calls answering success (the key equivalent's effect trails the next call) #354's checkpoint, or a first event that could not be created.TypeReadback.swift): Engine: a click's caret effect can land after the next action (click, then select, then type puts the text in the wrong place) #359's selection gate, which types nothing (selectionChanged).Paste.swift): anything thrown before its first ⌘V or Return goes out. A delivery guard that throws after the events still counts them.Paste.swift): anything beforerunPaste: the paste lock, the guard's rechecks, the activation, the snapshot, the keys' process, the deadline.ValueSetting.swift): anything before the AXValue write: not settable, the focus and its fallback click, the coercion, the in-flight check.Methods.swift): an input method refused before its method ran (the lock screen, the app, the menu span, Chromium readiness), and an input method's request whose deadline had passed at receipt. The deadline still answers first; only the meta is added.Absent after a post, whatever fails then. A write the field refused is absent too, since the write was made.
The wrapper, keyed on it
The record is read only when cua's engine is the selected backend:
CUA_SKY_SERVICEnames cua's own engine service (isCuaEngineService, by real path), so the vendor's service, which raises the sameSkyComputerUseError, never counts.secretUnentered(meta)(src/services/secret-input.mjs) then answers true only for a plain-object meta withbeforeInput === true, and, when the meta has aninterruptionaccount, only if:beforeActionorinFlight;InputEffects:scroll,activation,activationClick,focus,focusClick,activationRelease(feat/117-m5native/engine/Sources/Engine/Intervention.swiftL124–142, everything there exceptvalueandinput).concealedInputUnavailableinputFailed (concealedInputUnavailable): may have been entered, withMAY_SHOWuserIntervened, still interactinguserIntervened, changedstartedAtnull, re-query (getAXState)inputFailedUnenteredonstartedAtnullinputFailedUnenteredinputFailed, may have been entered, withMAY_SHOW"Without it" covers: the vendor's backend, the vendor's reply,
startedAtnull alone, no record, a record that is not the literaltrue, a meta or an account that is not a plain object, an unknown or missing phase, an unknown or non-string effect, effects not an array, and aninputorvalueeffect.Ruling 1247 (d) holds: whenever the secret may have been entered, no branch advises observing the app.
MAY_SHOW's password wording is still used only for a password field.Linux
No change. The wrapper's "nothing entered" test has always needed a
SkyComputerUseErrorwith a meta (mainsky.mjs:245). cua's Linux client rejects an engine failure as a plainErrorwith no meta (src/services/engine/linux/client.mjs~L118–121). So a failed secret on Linux has always said "may have been partly entered", and it still does. Giving the Linux engine the same record is #604.Versions
engineVersion 0.2.2 → 0.2.3; plugin 0.30.4 (#605 took 0.30.2 and #601 0.30.3).
Verification
KeyedSequenceStopTests.testAStopBeforeTheFirstKeyIsRecordedAndOneAfterAKeyIsNot: the guard, the source, a checkpoint and a first event not created, each before the first key, are recorded; a stop between keys (alsouserIntervened), a failure after the first unit's key down, the source check after the last key, and empty text are not.PasteOperationTests.testAStopBeforeTheFirstKeyIsRecordedAndOneAfterItIsNot: the check before ⌘V, a ⌘V not created, and the check before an opening Return are recorded; a read timeout after ⌘V and a stop on the second line are not.testAWriteThatFailsAfterTheClearStillRestoresis recorded too.PasteActivationTests: a failed activation guard (paste and type_text's paste route), the recheck under the registry's lock, and the stop just before ⌘V after the activation click are all recorded.ValueSettingTests.testOnlyAnErrorBeforeTheWriteIsRecordedAsBeforeTheInput: a refused coercion and an intervention after the focus click, and a field not settable, are recorded; a write the field refused and a success are not.TypeReadbackTests.testNoFieldUnderSelectTextsRangeTypesNothing:selectionChangedis recorded.LockScreenTests.testAnExpiredDeadlineRecordsThatAnInputMethodDispatchedNothing(review P2-5): an input method's request past its deadline is stilldeadlineExceeded, now with the record;get_app_state's carries no meta. It fails on the previous head.startedAtnull alone, the record not the literaltrue, a string or array meta, the record beside aninputeffect, avalueeffect, an unparsed account, or an account that is not an object) and three with it (alone, after a focus click, beside an account of preparation only).{phase: 'unknown', effects: []}reproduction, unknown and non-string effects, non-array effects, input and value effects; each allowlisted effect alone answers re-query), P2-4 the vendor backend with the record, andisCuaEngineService(the engine service by its path and by a link, nothing else).startedAt === nullinference fails three of these tests.cells/facade/dom-only-input-refusal, a CDPInput.dispatchMouseEventtimeout;api/browser-playwrightlocator/*, dialogs,waitforloadstate), the known load flake.This change touches neither the browser service nor the vendor host.
Reviews
SkyComputerUseError, which the vendor's service raises too. Now only when cua's engine is the selected backend.isCuaEngineServiceresolves the configured path's real target, whileloadVendorimports the unresolved path, so retargeting a symlink between the two would leave the trust flag on a vendor module. That takes write access to cua's install, which is arbitrary code already. Logged intech-debt-tracker.md(0a65832).Was stacked on #601, which has now landed (03c1ed9). Main is merged in (the squash conflicts were resolved to this branch's side, whose base files equal main's), and the diff against main is exactly 0c39038..0a65832 plus the manifests.
For the merge into feat/117-m5
userIntervened's account branch there (interruptionOutcome) decidesenteredfrom the phase and effects alone, and answers nothing entered forbeforeActionwith no effects without the record. Under ruling 1268 that is not enough:enteredmust be!unentered(secretUnentered under cua's engine) whatever the account says, and its phrases can only describe the account.readInterruptionneeds no new field: the record sits on the meta, besideinterruption, not inside it.PREPARATION_EFFECTSinsecret-input.mjsis feat'sInputEffectlist withoutvalueandinput; keep the two in step if feat adds an effect (an unknown one already answers "may have been entered").Sminos-Session: cursor235#b93055dd (cua on macbook)