A launch with no verb opens the window only from the app bundle, a double-click or --gui #655

Manually merged
binjovi-bot merged 1 commit from cli-no-verb-window-20261029 into trunk 2026-10-29 02:10:32 +00:00
Owner

A launch with no verb opens the window only from the app bundle, a double-click or --gui

A launch with no verb took "stdin is not a terminal" as a desktop launch and
opened the GUI window. A script, a pipe, cron or an agent that ran sourcerer
without a verb got a window on the desktop instead of the usage.

The decision is now cli.opensWindow, a pure function with its own test:
--gui and --cli decide first; then the window opens on macOS only when the
executable runs from the app bundle (sourcerer.app/Contents/MacOS/sourcerer,
zig build -Dgui macos-app), and on Windows only for a double-clicked
executable (the only process on its console). Every other launch with no verb,
with or without a terminal, prints sourcerer: no verb; run sourcerer --help
and exits 2. The macOS package installs only /usr/local/bin/sourcerer, which
Finder opens in Terminal: it prints the usage, as before.

Gates

{"checks":{"net_statements":0},"census":{"statuses":{"recovered":645,"partial":0,"unresolved":0},"regressions":0,"newly_recovered":0},"golden":"golden 173/5/0 == dump 173/5/0","emit":{"worse":[],"better":45,"newly_clean":39,"clean_delta":39,"base":215,"new":254},"twins":{"groups":449,"recovered":441,"regressions":[],"newly":26},"allgroups":{"regressions":[],"newly":["rpg-corpus-captures/files-chain/stripped/object.savf 2","rpg-corpus-captures/files-display-write/stripped/object.savf 2","rpg-corpus-captures/files-logical/stripped/object.savf 2","savf/SC-CONSTRUCT/POINTER/rpg-pointer-procedure-auto/stripped/archive.savf 1","savf/SC-ILE/DSPLY/error-observable/archive.savf 2","savf/SC-ILE/DSPLY/error-stripped/archive.savf 2","savf/SC-ILE/DSPLY/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/d4-edit/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/d4-out-const/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/d4-out-input/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/d4-srcstmt-dspf/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/d7-args/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/d7c-copy/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/decimal-fault-report/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/decimal-sign-report/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/fmtind-j1/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/fmtind-j2/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/fmtind-j3/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/format-base/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/format-rename/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/gotos-static/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/h-editc/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/h-editc5/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/h-editc6/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/h-fmix/stripped/object.savf 11","savf/SC-ILE/EXPERIMENTS/h-subind/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/packed-add-report/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/packed-compose-report/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/packed-compose-sign-report/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/program-literal/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/r5b-onexit-for/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/r5e-date-field/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/r5e-editc-held/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/r5i-figurative/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/r6a-float-inz/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/r6a-reset-ds/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6a-reset-fixed/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6a-reset-two/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/shared-io-full/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/shared-io-none/stripped/archive.savf 2","savf/SC-ILE/MONITOR/limits-observable/archive.savf 1","savf/SC-ILE/MONITOR/limits-stripped/archive.savf 1","savf/SC-ILE/MONITOR/stripped/archive.savf 2","savf/SC-ILE/TSTRIP-STRIPPED/archive.savf 2","savf/SC-ILE/TSTRIP/archive.savf 2"],"worse":[]},"full_check":{"exit":0,"seconds":1311}}
# A launch with no verb opens the window only from the app bundle, a double-click or --gui A launch with no verb took "stdin is not a terminal" as a desktop launch and opened the GUI window. A script, a pipe, cron or an agent that ran `sourcerer` without a verb got a window on the desktop instead of the usage. The decision is now `cli.opensWindow`, a pure function with its own test: `--gui` and `--cli` decide first; then the window opens on macOS only when the executable runs from the app bundle (`sourcerer.app/Contents/MacOS/sourcerer`, `zig build -Dgui macos-app`), and on Windows only for a double-clicked executable (the only process on its console). Every other launch with no verb, with or without a terminal, prints `sourcerer: no verb; run sourcerer --help` and exits 2. The macOS package installs only `/usr/local/bin/sourcerer`, which Finder opens in Terminal: it prints the usage, as before. ## Gates ``` {"checks":{"net_statements":0},"census":{"statuses":{"recovered":645,"partial":0,"unresolved":0},"regressions":0,"newly_recovered":0},"golden":"golden 173/5/0 == dump 173/5/0","emit":{"worse":[],"better":45,"newly_clean":39,"clean_delta":39,"base":215,"new":254},"twins":{"groups":449,"recovered":441,"regressions":[],"newly":26},"allgroups":{"regressions":[],"newly":["rpg-corpus-captures/files-chain/stripped/object.savf 2","rpg-corpus-captures/files-display-write/stripped/object.savf 2","rpg-corpus-captures/files-logical/stripped/object.savf 2","savf/SC-CONSTRUCT/POINTER/rpg-pointer-procedure-auto/stripped/archive.savf 1","savf/SC-ILE/DSPLY/error-observable/archive.savf 2","savf/SC-ILE/DSPLY/error-stripped/archive.savf 2","savf/SC-ILE/DSPLY/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/d4-edit/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/d4-out-const/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/d4-out-input/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/d4-srcstmt-dspf/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/d7-args/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/d7c-copy/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/decimal-fault-report/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/decimal-sign-report/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/fmtind-j1/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/fmtind-j2/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/fmtind-j3/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/format-base/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/format-rename/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/gotos-static/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/h-editc/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/h-editc5/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/h-editc6/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/h-fmix/stripped/object.savf 11","savf/SC-ILE/EXPERIMENTS/h-subind/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/packed-add-report/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/packed-compose-report/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/packed-compose-sign-report/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/program-literal/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/r5b-onexit-for/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/r5e-date-field/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/r5e-editc-held/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/r5i-figurative/stripped/archive.savf 1","savf/SC-ILE/EXPERIMENTS/r6a-float-inz/stripped/object.savf 1","savf/SC-ILE/EXPERIMENTS/r6a-reset-ds/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6a-reset-fixed/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/r6a-reset-two/stripped/object.savf 2","savf/SC-ILE/EXPERIMENTS/shared-io-full/stripped/archive.savf 2","savf/SC-ILE/EXPERIMENTS/shared-io-none/stripped/archive.savf 2","savf/SC-ILE/MONITOR/limits-observable/archive.savf 1","savf/SC-ILE/MONITOR/limits-stripped/archive.savf 1","savf/SC-ILE/MONITOR/stripped/archive.savf 2","savf/SC-ILE/TSTRIP-STRIPPED/archive.savf 2","savf/SC-ILE/TSTRIP/archive.savf 2"],"worse":[]},"full_check":{"exit":0,"seconds":1311}} ```
A launch with no verb opens the window only from the app bundle, a double-click or --gui
All checks were successful
binjovi/ci Binjovi completed the frozen plan
7bb2e16683
A verb-less launch took a stdin that is not a terminal as a desktop launch,
so a script, a pipe or an agent opened the GUI window. cli.opensWindow now
decides: --gui/--cli first, then the macOS app bundle path or a
double-clicked Windows executable; everything else prints the usage and
exits 2.
binjovi-bot manually merged commit 7bb2e16683 into trunk 2026-10-29 02:10:32 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sean/sourcerer!655
No description provided.