Repository navigation
Conversation
Confidence Score: 5/5
[Medium impact] The PR appears safe to merge; no new actionable issues were found. SummaryMoves select rows into a private file and writes menu answers directly from the shell.
All four earlier, unnumbered findings are addressed: both callers send the marker, the remaining
|
|
Reviewed at 96e73a7 against Reproduced on a worker built from the Omarchy ISO, with its shell running this branch:
Suites on the worker: One limit to know about, not a blocker: on a 4-core worker, lists of up to 12,000 rows open within Second opinion: Codex Medium reviewed the diff separately and found no defects. It checked the request lifecycle without Related: #12669 and #13018 fix #12665, which is about symlinked starting points, and only cap list size along the way. #12669's 120,000-byte guard in This now waits on the maintainer. |
|
Added a fourth commit, 941fb86. My own test runs had left picks in The hang the Codex pass found, a waiting picker that another summon replaces never returning, is fixed in #15796, which builds on this branch. #15518 merges cleanly with this branch. Its new test then needs four lines changed, to stub the in-shell writes instead of
|
|
Re-reviewed the new commit, 941fb86, against Reproduced on a worker built from the Omarchy ISO, with its shell running each tree in turn. Two rows were piped into
Both in-tree callers, Suites on the worker at 941fb86: Second opinion: Codex Medium reviewed the commit over two rounds. It confirmed the caller audit and how FileView treats empty and missing files. It also pointed out the window your description already names, a caller exiting between the existence check and the write. It confirmed that Quickshell's FileView has no write mode that refuses to create a file, so that window can only be narrowed, not closed. On a second round it judged the window a limit to note rather than a blocker. It agreed with my reading, and its independence is not guaranteed. Related: #7826, #9031 and #9056 deal with a waiting picker that never returns, which #15796 addresses. None of them makes the change in this commit. This now waits on the maintainer. |
|
Added a fifth commit, 8c6efa7, which fixes the fourth. The fourth commit took a missing selection file for a caller that gave up, so a caller that leaves creating the file to the shell would never get a done file. No in-tree caller works that way, but #7826's test does, and it failed at 941fb86 with #7826's fix applied. The shell now notes at the summon whether the selection file exists, and skips the answer only when it did and has gone since. In a scratch shell at 8c6efa7, a caller that never created its selection file got its pick; at 941fb86 it never got a done file. The stopped-caller cases still leave nothing behind. #7826's test passes at 8c6efa7 with its two I've closed #15796, since #7826 made that change first.
|
|
Added a sixth commit, 9347b97, for Greptile's point on 8c6efa7. The existence check ran after the shell had read the rows, so a caller whose summon timed out before the shell reached its request passed for one that never creates its selection file. The scripts now mark their payloads with Commits four to six belong together, so squashing them on merge would read best.
|
|
Re-reviewed the two new commits, 8c6efa7 and 9347b97, against Reproduced on a worker built from the Omarchy ISO, with its shell running each tree in turn and answered with real keystrokes:
Suites on the worker at 9347b97: Second opinion: Codex Medium reviewed the two commits and found no defects. It checked the request lifecycle when a marked request is rejected, replaced or cancelled, and every in-tree caller of the menu transport. It noted that Related: #13390 makes the same change to This now waits on the maintainer. |
Document the process-argument disclosure fixed in 3.0.1 and point to the open Omarchy pull request omacom/omarchy#15774, which fixes the same code in Omarchy's built-in menu. Docs only; no version bump. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The 4,000-row repro still fails on |
|
Rechecked head On a disposable Omarchy ISO worker, the 4,000-row reproduction fails on that base with
Codex High checked this pass. The Opus 5.5 High review command terminated without completing the guarded review; a primary report arrived afterward, but no completed panel result was recorded. A subsequent availability probe answered. The local merge candidate has therefore not been pushed, and this pull request's branch is unchanged. This waits on the maintainer because the conflict resolution still needs a completed second review before it can be delivered. |
9347b97 to
d8dc135
Compare
|
Rebased onto
|
d8dc135 to
19972c5
Compare
|
Rechecked On a disposable Omarchy ISO worker running each tree, the 4,000-row list fails on the base with
Checked by Codex High, with second opinions from Opus 5.5 High and muse-wonder via pi, thinking high. Both found no actionable defects; their independence is not guaranteed. Their requested live checks of the long-list result, legacy callers and keybinding dispatch are included above. This waits on the maintainer to decide whether the caller-lifecycle hardening should stay with the long-list transport fix and how it should land alongside #7826. The before and after below show the same menu region; selecting row 4,000 was checked separately. |
The select and input menus wrote the pick with bash -c "printf ... > file", which put the chosen row, or the text typed into an input prompt, on a command line that every user on the machine can read in /proc/<pid>/cmdline. Write it, and the done file, with a blocking FileView instead. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
omarchy-menu-select put every row into the select payload, a single argument to perl and omarchy-shell. Linux refuses a single argument of 128 KiB or more, so a long list never opened the menu, and every user on the machine could read the rows in /proc/<pid>/cmdline. Write them to a mktemp file instead, name it as optionsFile in the payload, and read it in the menu with a fresh blocking FileView. Inline options keep working, and a file the shell cannot read cancels the request. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A caller that gives up before the menu finishes, because its summon timed out or it was stopped, removes its selection file on the way out. The shell then wrote the pick anyway, creating a new file at that path with the default 0644 mode, so the pick stayed in /tmp, readable by every user, until reboot. The bash -c printf it replaced did the same. Write neither file once the selection file is gone; a waiting caller's mktemp file is empty, and an empty file still loads. A request whose rows cannot be read is answered the same way. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The previous commit took a missing selection file for a caller that gave up, so a caller that leaves creating the file to the shell waited forever for a done file that never came. Nothing in the tree calls the menu that way, but the test in omacom#7826 does, and a plugin could. Note at the summon whether the selection file exists, and skip the answer only when it did and has gone since. A request whose rows cannot be read is answered as before. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The previous commit noted at the summon whether the selection file existed. A caller whose summon timed out before the shell got to the request has removed it by then, so the request passed for one from a caller that leaves creating the file to the shell, and the pick or typed text went into a new 0644 file again. omarchy-menu-select and omarchy-menu-input now say they created it, with selectionFileCreated in the payload. For such a request the shell opens nothing when the file is already gone and writes no answer once it has gone. Requests without it are answered as before. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
menu-test.sh already covers omarchy-menu-select and omarchy-menu-input and their payloads, so the transport checks belong there rather than in a file of their own. The checks that matched Menu.qml's source text go: the real FileView fixture and the stand-in shell runs check what they asserted by behaviour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
19972c5 to
08231d7
Compare
Scope the privacy claim to the file handoff. The documented on-change callback continues to receive tentative selections on its command line. Co-Authored-By: Codex High <noreply@openai.com> Co-Authored-By: Opus 5.5 High <noreply@anthropic.com>
|
I reproduced #15735 on a disposable Omarchy ISO worker. The 4,000-row menu fails on The CLI and focused menu suites passed, and the live menu returned Unicode input and cancelled with Escape. The full shell run recorded 5,682 passing checks, three skips and four failures. The same four assertions failed on the base, covering Antigravity launch arguments, audio panel mapping, the OEM logo and the keepLoaded IPC fixture. Codex High checked this pass with Opus 5.5 High and muse-wonder via pi, thinking high. Their review caught an overbroad privacy claim in the docs. Commit GitHub’s Tests and translation workflows await maintainer approval. The maintainer also has the scope of the caller-exit hardening and the overlap with #7826 to decide. The file checks run at request entry and before writing the result, so a caller can still time out while an exceptionally large list is opening. |






Fixes #15735
omarchy-menu-selectput every row into the select payload, a single argument toperlandomarchy-shell, so a list past 128 KiB never opened the menu. The Transcode picker over a real~/Picturesand~/Videosfails that way. The same arguments, and thebash -c "printf '%s\n' <selection> > <file>"the menu wrote its result with, are readable by every user on the machine in/proc/<pid>/cmdline: the rows, the pick, and whatever is typed intoomarchy-menu-input(more on #15735).Six commits:
finishRequestwrites the selection and the done file with a blockingFileViewinstead ofbash -c printf. It writes in place, so the selection file keeps the mode its caller gave it. The done file gets a newline becauseFileViewcreates no file for an empty write.resultProcandapplySerialgo: their only job was closing the menu once that process exited, and every caller closes it first.omarchy-menu-selectwrites its rows as a JSON array tooptionsin its private request directory and names that file asoptionsFilein the payload. The rows reachjqon a pipe, sinceprintfis a builtin. The menu reads the file with a fresh blockingFileView, the reader Handle large background collections without oversized IPC arguments #12819 uses for the image picker. Inlineoptionskeep working for other callers, and anoptionsFilethe shell can't read cancels the request instead of opening an empty menu. Rows piped in on stdin,omarchy-menu-file's included, now never appear on a command line; rows given as arguments stay onomarchy-menu-select's own.mktempfiles the callers used before this rebase, the shell then wrote the answer anyway, into a new 0644 file nobody removes, so the pick, or the text typed into an input prompt, stayed in/tmpfor every user to read until reboot. The shell now writes neither file once the selection file is gone, short of a caller exiting in the instant between that check and the write. Both callers create it before they summon, asdocs/menu.mdnow notes.omarchy-menu-selectandomarchy-menu-inputnow mark their payloads withselectionFileCreated: true. For a marked request the shell opens nothing when the file is already gone, and writes no answer once it has gone. Unmarked requests are answered as before. Commits three to five belong together, so squashing them on merge would read best.AGENTS.mdasks for the area's existing test file and no checks that restate the source. The transport checks now live intest/shell.d/menu-test.sh, which already covers both callers and their payloads, and the checks that matchedMenu.qml's source text are gone. The stand-in shell runs and the realFileViewfixture remain.Rebased onto
quattroat e279971. Both menu scripts keepquattro's jq builders and private request directories, with the rows inoptionsinside that directory. This PR's "Append a select menu's rows in one call" is dropped:quattronow appends a select list in one call itself, as #13390 also proposed. The upstream payload check inmenu-test.shreads the rows from the options file. The rebase also brought in the keybindings menu, whoseactivateIndexbranch still setapplySerial; the first commit removes that write too, since picking a keybinding otherwise threw before the menu closed.--on-changestill appends the selection JSON to its command's arguments. Moving it to stdin changes a documented interface, so I left it for a separate change if you want it.The hang omarchybot's Codex pass found, a waiting picker that another summon replaces never returning, is what #7826 fixes, and #9056 too. #7826 and this PR touch the same lines. Whichever lands second drops #7826's
resultProcwrite queue, which in-process writes don't need, and keeps its twofinishRequest(null)calls.Validation (Omarchy 4.0.4-1, Quickshell 0.3.1, branch on
quattroatbf9ee5c7, before the rebase)test/shell.d/menu-test.sh) runomarchy-menu-selectagainst a stand-in shell, withperl(jqsince the rebase) and the stand-in logging every argument they get:omarchy-menu-inputreturns what was typed, and both scripts mark their payloads withselectionFileCreated.readOptionsFile,finishRequest,writeRequestFileandrequestFileExists. It covers 20 fresh reads of 10,000 rows, a rewritten file, missing, malformed, non-list and empty files, picks and cancels into 0600 files, picks and cancels for a caller whose selection file is gone, which write nothing, and a pick for a caller that never created its selection file, which still arrives.quattro, the large list fails with the originalperl: Argument list too long.menu-open-budget-test.shdoes, and drove it withwtypewhile its menu held keyboard focus:omarchy-menu-select, and typing004000then Enter returned that row. Enter on a two-row select and text typed intoomarchy-menu-inputcame back too./proc/*/cmdlinethroughout and followed the shell's and the caller's children as they forked, looking for a marker that only the rows, the pick and the typed text carried. It found nothing.quattro, the same run caught the rows in bothperlcalls and the typed text inbash -c printf '%s\n' '<marker>-typed' > …, and the 4,000-row list never opened.quattroboth wrote the pick and the typed text into new 0644 files. A caller still waiting got its pick as before. So did a caller that never created its selection file, which at 941fb86 never got a done file.finishRequest(null)calls applied, without its write queue../test/cli,menu-test.shandmenu-open-budget-test.shpass../test/shellfails 19 of 452 files here, the same 19 files with the same failing assertions as untouchedquattro(19 of 451). They includeruntime-smoke-test.sh, which counts 4 IPC handlers on this machine's 2 screens, plusscreenrecording-test.shandmenu-plugin-test.sh.git diff --checkandbash -npass.After the rebase (at 19972c5, on
quattroat e279971):menu-test.sh(125 checks, the transport checks and the realFileViewfixture among them) andmenu-plugin-test.shpass;./test/clipassed at the first rebased head, d8dc135. Through the stand-in shell, the 4,000-row list still opens and no row reaches a logged command line, and the options file sits in a 0700 directory. omarchybot reproduced the original failure onquattroat a3bad0b, now asomarchy-shell: Argument list too long. The live-session runs above (wtype, the/procwatcher) were not repeated after the rebase.🤖 Generated with Claude Code