detached b3155ec

test(acceptance): resend unaccepted input_busy in the navigation repro

commit
b3155ec1820bbe46cd1702c5ebfd326ff80b8652
author
brice · · 2026-09-23 03:05 UTC
parent
1c179ae
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
1 file · +21 -0
M scripts/remote-picker-harness/navigation_repro.py +21 -0
@@ -8,9 +8,14 @@ host named remote reaching the remote container. No host session is touched.
88 import json
99 import subprocess
1010 import sys
11+import time
1112 import uuid
1213
1314
15+class InputBusy(AssertionError):
16+ pass
17+
18+
1419 class Driver:
1520 def __init__(self, container, session):
1621 self.process = subprocess.Popen(
@@ -43,6 +48,19 @@ class Driver:
4348 return context["generation"]
4449
4550 def call(self, operation, **fields):
51+ # input_busy is an unaccepted refusal while the input owner still
52+ # delivers an earlier terminal read; resending it is safe and bounded.
53+ # Accepted actions and every other error are never retried.
54+ deadline = time.monotonic() + 3
55+ while True:
56+ try:
57+ return self._call_once(operation, **fields)
58+ except InputBusy:
59+ if time.monotonic() >= deadline:
60+ raise
61+ time.sleep(0.05)
62+
63+ def _call_once(self, operation, **fields):
4664 self.request_id += 1
4765 request = dict(version=1, id=self.request_id, op=operation,
4866 attachment=self.attachment, **fields)
@@ -51,6 +69,9 @@ class Driver:
5169 self.process.stdin.write(json.dumps(request) + "\n")
5270 self.process.stdin.flush()
5371 response = json.loads(self.process.stdout.readline())
72+ error = response.get("error")
73+ if isinstance(error, dict) and error.get("code") == "input_busy" and not error.get("accepted"):
74+ raise InputBusy(response)
5475 assert "error" not in response, response
5576 result = response["result"]
5677 self.generation = result.get("context", {}).get("generation", self.generation)
@@ -8,9 +8,14 @@ host named remote reaching the remote container. No host session is touched.
8 import json8 import json
9 import subprocess9 import subprocess
10 import sys10 import sys
11+import time
11 import uuid12 import uuid
12 13
13 14
15+class InputBusy(AssertionError):
16+ pass
17+
18+
14 class Driver:19 class Driver:
15 def __init__(self, container, session):20 def __init__(self, container, session):
16 self.process = subprocess.Popen(21 self.process = subprocess.Popen(
@@ -43,6 +48,19 @@ class Driver:
43 return context["generation"]48 return context["generation"]
44 49
45 def call(self, operation, **fields):50 def call(self, operation, **fields):
51+ # input_busy is an unaccepted refusal while the input owner still
52+ # delivers an earlier terminal read; resending it is safe and bounded.
53+ # Accepted actions and every other error are never retried.
54+ deadline = time.monotonic() + 3
55+ while True:
56+ try:
57+ return self._call_once(operation, **fields)
58+ except InputBusy:
59+ if time.monotonic() >= deadline:
60+ raise
61+ time.sleep(0.05)
62+
63+ def _call_once(self, operation, **fields):
46 self.request_id += 164 self.request_id += 1
47 request = dict(version=1, id=self.request_id, op=operation,65 request = dict(version=1, id=self.request_id, op=operation,
48 attachment=self.attachment, **fields)66 attachment=self.attachment, **fields)
@@ -51,6 +69,9 @@ class Driver:
51 self.process.stdin.write(json.dumps(request) + "\n")69 self.process.stdin.write(json.dumps(request) + "\n")
52 self.process.stdin.flush()70 self.process.stdin.flush()
53 response = json.loads(self.process.stdout.readline())71 response = json.loads(self.process.stdout.readline())
72+ error = response.get("error")
73+ if isinstance(error, dict) and error.get("code") == "input_busy" and not error.get("accepted"):
74+ raise InputBusy(response)
54 assert "error" not in response, response75 assert "error" not in response, response
55 result = response["result"]76 result = response["result"]
56 self.generation = result.get("context", {}).get("generation", self.generation)77 self.generation = result.get("context", {}).get("generation", self.generation)

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 12

Tags 11

↑↓ moveenter openesc close