Skip to content

shell: an offer's gesture waits for that offer's own number (supersedes #683) - #785

Merged
napkinstack-agent[bot] merged 4 commits into
mainfrom
shell/e2e-gesture-own-notification
Nov 15, 2026
Merged

napkinstack-agent[bot] merged 4 commits into
mainfrom
shell/e2e-gesture-own-notification

Conversation

@kitokey-lina

@kitokey-lina kitokey-lina Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

shell: an offer's gesture waits for that offer's own number

Supersedes #683 (inactive since 2026-11-06): its commit 4286813 unchanged, main merged in (374b2ba), no conflict. #683 stays open.

Module

modules/shell, exactly one: scripts/e2e.sh, the test harness alone. No product code changes.

  • This pull request touches a single module

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) and FAIL 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")
Loading

Legend — the D-Bus messages of an offer; notified and answered are the two dbus-monitor the e2e already runs.

The cause. offered counts the offer when Kitokey asks for it (notified); gesture pressed the last number in answered, 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, where answered starts empty, to no number at all.

The fix. gesture finds the last offer's call in notified (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

  • Seen failing: the verifier's run (e2e-unread_as_nfs.out, D83 — shell: the licence read at each start is said in the log #682's remarks).
  • The matching tried on a sample of 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.
  • It passed at 4286813: bash scripts/e2e.sh, e2e: passed, the four gestures (record, later, never, the trial's record) ok.
  • At the head, d506770: the coordinator's attest (queued); its e2e is T1's evidence.

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

  • Within budget: 1 file, +16 −1 at d506770.

Test sheet

Verifier: session 92ded11e-58ef-492d-ba56-c820b9011de8

# Given · when · then Kind Result Evidence Commit Confirmed
T1 Given the e2e's offer scenario (S) and the trial's refusal, when bash scripts/e2e.sh runs 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 = false kept, the refusal logged and the window opened automated passed The coordinator's full shell e2e at d506770 (main merged by its author; the pull request's own lines unchanged since 374b2ba), its e2e.txt read here: 1823 ok, no FAIL, « e2e: passed »; S played whole (l.146, (S: 30 s) l.176), its four gestures among its ok d506770
T2 Given the gesture made to press the previous offer's number (the old race made certain), when the e2e runs, then S fails automated passed Run again at the head: the coordinator's full shell e2e, the tray included, at d506770 (« head at start d506770 · diff 1 1 modules/shell/scripts/e2e.sh »), the gesture taking the previous offer's call (previous printed in place of last): « e2e: FAILED », 1809 ok, 14 FAIL, all in S and S2 (S2's from S's left state), the first the record's: FAIL test -s …/sessions/given (l.149), then is 3 4, is 2 1, offered 3 — as at 374b2ba (13 then), read here d506770 —

Verifier'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 awk run here on sample dbus-monitor lines — two offers from :1.42 (serials 17, 23), a return to :1.99 with reply_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 emitted uint32 with 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; a say when id stays empty would name it. (2) « later » changes nothing by design: it is held by the log's shell.offer_declined, which the scenario checks, not by the folder. (3) The branch is behind main; the attest runs at 374b2ba, as its author chose.

Summary

🤖 Generated with Claude Code

napkinstack-agent Bot and others added 3 commits November 6, 2026 11:36
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>
Agent-Session: 04463b35-db3b-47ea-bef5-6892f2baedb7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kitokey-lina kitokey-lina Bot added the out-of-cycle Work outside the current cycle: an incident, a production defect; justified in the PR label Nov 13, 2026
@kitokey-lina
kitokey-lina Bot marked this pull request as ready for review November 15, 2026 06:37
Agent-Session: 04463b35-db3b-47ea-bef5-6892f2baedb7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@napkinstack-agent
napkinstack-agent Bot merged commit d94338f into main Nov 15, 2026
14 of 18 checks passed
@napkinstack-agent
napkinstack-agent Bot deleted the shell/e2e-gesture-own-notification branch November 15, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

out-of-cycle Work outside the current cycle: an incident, a production defect; justified in the PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants