Commit Graph
11 Commits
Author SHA1 Message Date
abkslmandClaude Opus 4.8 c74ccdb142 nash: accept bash's -c operand ordering; fix test socket paths
`bash -c` does not bind to the token that follows it: short-option parsing
continues and the command string is the first operand, so `bash -c -l <cmd>`
runs `<cmd>` as a login shell. brush's clap CLI instead binds `-c` to the next
token and rejects one shaped like an option, so every command the agent CLI
sent as `-c -l <cmd>` inside naros-agent failed with

    error: a value is required for '-c <COMMAND>' but none was supplied

Since narOS diverts /bin/sh, /bin/bash and /bin/dash to nash, that broke every
command in the container. nash's compat fallback did not cover it either: it
read "-l" as the command, which parses fine as bash, so no fallback fired.

Normalize the argv before clap sees it, hoisting short options that sit between
the `-c` group and its command ahead of that group (`-c -l cmd` -> `-l -c cmd`),
including value-taking ones (`-c -o xtrace cmd`, `-c -oxtrace cmd`). Only short
options are hoisted — bash itself rejects long options once short-option parsing
has begun — and anything not positively identified as an option ends the scan,
so a command string is never mistaken for a flag. Teach nash's dash_c_command()
the same rule so the parse-failure fallback checks the real command.

Also repair the observe test harness, which could not run under a normal macOS
TMPDIR: it named its socket directory with `{:?}` of an Instant (~45 chars),
overflowing sun_path, and never cleaned up, so a recycled pid inherited a stale
socket and failed the bind with AlreadyExists. Route every scratch directory
through a helper that keeps names short, falls back to /tmp when the socket path
would not fit, clears stale state, and drops the directory when the sink dies.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-19 20:06:28 -07:00
abkslm eb8d7e395e Merge branch 'dev' into nucleic/clever-quartz-marten-uqnx
# Conflicts:
#	os/tests/parity-allowlist.txt
2026-07-19 05:51:19 +00:00
abkslm a0c3e601be Merge nucleic/clever-quartz-marten-uqnx into dev 2026-07-18 21:19:16 -07:00
abkslm c4b4c999f8 Nucleic: Build Script Error Investigation 2026-07-18 21:19:15 -07:00
abkslm 109cab4cc7 Merge nucleic/keen-glass-marten-ddlf into dev 2026-07-18 20:31:23 -07:00
abkslm 45a56af642 Merge nucleic/olive-ember-seal-q7vk into dev 2026-07-18 15:33:08 -07:00
abkslm 1e603f0e85 Merge nucleic/sleek-thistle-egret-fyej into dev 2026-07-18 14:51:02 -07:00
abkslm b8ef14999d Merge nucleic/sleek-thistle-egret-fyej into dev 2026-07-18 14:31:25 -07:00
abkslm 26fd468ad0 Merge nucleic/sleek-thistle-egret-fyej into dev 2026-07-18 12:45:36 -07:00
abkslm 5648b96ddc Merge nucleic/sleek-thistle-egret-fyej into dev 2026-07-18 12:23:09 -07:00
abkslm b6be87b72d Merge nucleic/sleek-thistle-egret-fyej into dev 2026-07-18 05:19:31 -07:00