Repository navigation
shell: an offer's gesture waits for that offer's own number - #683
Closed
napkinstack-agent[bot] wants to merge 2 commits into
Closed
napkinstack-agent[bot] wants to merge 2 commits into
napkinstack-agent[bot] wants to merge 2 commits into
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
5 of 6 tasks
Contributor
Author
|
Closed as superseded by #785, which carries this change (an offer's gesture waits for that offer's own number) on current main. Thank you; the work continues there. |
Contributor
Author
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
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.shat 4286813,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.
Review budget
Test sheet
Verifier: session wh-verify-683
offer = falsekept, the refusal logged and the window openedbash scripts/e2e.shfrom the verifier's own worktree and build cache, at 4286813:e2e: passed, exit 0, 1253 ok and 0 FAIL; in S:offered 1,test -s sessions/given,offered 3,test ! -e sessions/given,offered 4,grep -q ^offer = false, the fourshell.offer_*logged, trial:offered 5,test ! -e sessions/given,test 1 -ge 1(window),shell.recording_refused— all ok; log audit: 0 warning or error not provoked. Mutant run once in the e2e (the gesture presses the previous offer's number, the old race made certain):e2e: FAILED, 13 FAIL, all in S, the trial's among themFAIL test 0 -ge 1andFAIL grep -q shell.recording_refused— killeddbus-monitorlines where the offer's answer is not yet written, or written for another client with the same serial, when a gesture is pressed, then it waits for the offer's own answer and presses its number, never an older onegesture()taken verbatim from e2e.sh,gdbus emitreplaced by an echo, run on hand-madedbus-monitorlines (format checked against a realdbus-monitoron a private bus): 17/17 — own return pressed; previous offer's answer only → nothing pressed after ~5 s; answer appended 1.5 s late → pressed; header and number written apart → pressed; same serial for another client → skipped; destination:1.5vs:1.50, dots taken literally; reply_serial 7 vs 70 and 17, 70 vs 7; two offers with answers out of order → the last offer's; a reminder after the offer, the desktop's relayed call, no offer at all → nothing pressed. Mutants on it: 6 killed, 0 survived (oldtail -1, no destination match, no$anchor, no wait, nooursfilter, first offer instead of last)scripts/e2e.shalone, and nothing of what the e2e checks is loosenedgit diff --name-only origin/main...4286813:modules/shell/scripts/e2e.shalone, one commit;checklines 134 before and after,failed=14 before and after; nocheck,isor failure line in the diff — onlygesture()'s bodyVerifier's remarks: a gesture that finds no number (no offer, or no answer within 5 s) still emits
ActionInvokedwith the string"uint32 "(seen on a private bus: gdbus exits 0, sends a mis-typed signal) — harmless, the next checks fail, but the gesture itself says nothing of why; the trial's failure in the verifier's mutant run is a cascade from the first gesture, so the old race's exact window (answer not yet written at the trial) is pinned by T2's isolated test, not reproduced in the e2e.Summary
DONE
scripts/e2e.sh: a gesture waits for the desktop's answer to its offer's own call.VERIFIED
bash scripts/e2e.shtwice at 4286813: the firstFAILEDon one line only,Gtk-CRITICAL gtk_widget_get_scale_factoron Kitokey's stderr (test ! -s errors) — not this change, which touches no product code; recorded in shell: a Gtk-CRITICAL on Kitokey's error stream fails the e2e, once #684 —, the seconde2e: passed, the log audit clean.ASSUMED
Notifywith oneuint32(the specification's).NOT VERIFIED
RISKS
🤖 Generated with Claude Code