Repository navigation
shell: an offer's gesture waits for that offer's own number (supersedes #683) - #785
Merged
Merged
Conversation
The e2e pressed the last notification number the desktop had answered. The offer is counted when Kitokey asks for it, its number answered a moment later: once, the record gesture went to no number and the trial's refusal was never asked (seen by the verifier of #682). A gesture now waits for the desktop's answer to the offer's own call, matched by its serial. Agent-Session: wh-gesture Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ts-for-its-notification
Agent-Session: 04463b35-db3b-47ea-bef5-6892f2baedb7 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 tasks done
Agent-Session: 04463b35-db3b-47ea-bef5-6892f2baedb7 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
shell: an offer's gesture waits for that offer's own number
Supersedes #683 (inactive since 2026-11-06): its commit 4286813 unchanged,
mainmerged in (374b2ba), no conflict. #683 stays open.Module
modules/shell, exactly one:scripts/e2e.sh, the test harness alone. No product code changes.Deliverable
Out of cycle: a flaky e2e check, seen by #682's verifier (session wh-verify-d83e, round 2): in one run of six, the trial's record gesture reached nothing —
FAIL test 0 -ge 1(no window) andFAIL grep -q shell.recording_refused—, the log holding no refusal at all. A flaky check teaches to ignore a red e2e (tests.md).What it changes
sequenceDiagram participant K as Kitokey participant D as The desktop's notifications participant E as e2e.sh K->>D: Notify « pw-cat utilise votre micro » (serial N) Note over E: offered: the call is counted D-->>K: method return, reply_serial N: number 41 Note over E: gesture: waits for the return to serial N, then presses 41 E->>K: ActionInvoked(41, "record")Legend — the D-Bus messages of an offer;
notifiedandansweredare the twodbus-monitorthe e2e already runs.The cause.
offeredcounts the offer when Kitokey asks for it (notified);gesturepressed the last number inanswered, the desktop's answers, written a moment later. Pressed between the two, the gesture went to the previous offer's number — or, in the trial's scenario, whereansweredstarts empty, to no number at all.The fix.
gesturefinds the last offer's call innotified(its sender and serial), waits up to 5 s for the desktop's return to that very call (destination= the sender,reply_serial= the serial), and presses its number. Synchronised on the event, never on a duration (tests.md, flaky).Oracle
e2e-unread_as_nfs.out, D83 — shell: the licence read at each start is said in the log #682's remarks).dbus-monitor's lines: no return yet → waits, then presses nothing; a return to another client with the same serial → ignored; the right return → its number.bash scripts/e2e.sh,e2e: passed, the four gestures (record, later, never, the trial's record) ok.Kind of oracle: the e2e itself. A race is not reproduced on demand: the fix removes the window in which it happened.
Main merged in at d506770 (no conflict); the attest runs there.
Review budget
Test sheet
Verifier: session 92ded11e-58ef-492d-ba56-c820b9011de8
bash scripts/e2e.shruns at this head, then each gesture — record, later, never, the trial's record — reaches the offer it is meant for: a recording given, nothing more,offer = falsekept, the refusal logged and the window openede2e.txtread here: 1823ok, noFAIL, « e2e: passed »; S played whole (l.146,(S: 30 s)l.176), its four gestures among itsokpreviousprinted in place oflast): « e2e: FAILED », 1809ok, 14FAIL, all in S and S2 (S2's from S's left state), the first the record's:FAIL test -s …/sessions/given(l.149), thenis 3 4,is 2 1,offered 3— as at 374b2ba (13 then), read hereVerifier's remarks: read at 374b2ba; T1 waits for the attest, T2 for the coordinator's full run with the mutant (the gesture taking the previous offer's call). The gesture's two
awkrun here on sampledbus-monitorlines — two offers from :1.42 (serials 17, 23), a return to :1.99 withreply_serial=23(77), then the one to :1.42 (42) —: it pressed 42, the other client's 77 ignored; with no return to the call, it waited 5 s and emitteduint32with no number. (1) That empty number goes unsaid: a run that misses it fails only at a later check (given,offer = false), its cause not named; asaywhenidstays empty would name it. (2) « later » changes nothing by design: it is held by the log'sshell.offer_declined, which the scenario checks, not by the folder. (3) The branch is behindmain; the attest runs at 374b2ba, as its author chose.Summary
main.bash -n scripts/e2e.sh; gitleaks on the new commit: no leak. The notification's title the gesture matches (pw-cat utilise votre micro) is stillwords.rs's.🤖 Generated with Claude Code