feat(shell): pathname globbing, noglob/set -f, and syscall pathconf

- Add shell-glob.js (fnmatch, brace expansion gate, GLOB_* / DOTGLOB / STRICT_POSIX)
- Tokenizer tracks u/s/d quote segments; expand argv, redirects, and `for … in`
- Builtin `set -f` / `set +f`; richer `case` patterns via bareOsFnmatch
- CI: verify-bundle-throws.mjs + bundle-throw-allowlist.json in pretest
- VFS: symlink cycle detection (ELOOP); stat follow depth 64
- ctx.bareOsPathconf + bareOsSyscall pathconf; syscalls.json schemaVersion 2 + errnoHints
- getconf: pathconf in BARE_OS_SYSCALL_OPS; _PC_*, _POSIX_THREAD_ATTR_STACKSIZE
- Docs: handbook ch.9, environment appendix, user manual ch.4, release-checklist, scripts README
- Tests: tokenize/glob cases in bare-os-booter test.js

Keep posix-conformance-matrix.json bareOsSyscallOps in sync with getconf (add pathconf).
This commit is contained in:
Raven Scott
2026-04-04 19:36:32 -04:00
parent 0d7b27bea8
commit 44355f6924
27 changed files with 1277 additions and 532 deletions
@@ -101,6 +101,12 @@ The list below is one **bullet per variable** in the form **name — component
- `BARE_OS_HOST_BUNDLE_EVALUATE``ctx.bareOsHostCapability` — When **`1`**, advertise host **`bundleEvaluate`** for optional cross-worker / **`bare-bundle-evaluate`** paths (host-only).
- `BARE_OS_SHELL_LOOP_MAX` — Shell — Max iterations for **`while`** / **`for`** (default **10000**).
- `BARE_OS_SHELL_CASE_MAX_BRANCHES` — Shell — Max **`case`** branches (default **32**).
- `BARE_OS_STRICT_POSIX` — Shell / utilities — When **`1`**, pathname globs that match nothing fail the command; tighter diagnostics elsewhere as documented.
- `BARE_OS_SHELL_NOGLOB` — Shell — When **`1`**, pathname expansion is disabled (**`set -f`** sets this; **`set +f`** clears).
- `BARE_OS_GLOB_MAX_MATCHES` — Shell — Max matches per glob word (default **4096**).
- `BARE_OS_GLOB_IGNORE` — Shell — Colon-separated fnmatch patterns excluded from glob results.
- `BARE_OS_DOTGLOB` — Shell — When **`1`**, globbing includes names starting with **`.`** (except **`.bareos_empty`**).
- `BARE_OS_SHELL_BRACE_EXPANSION` — Shell — When **`1`**, unquoted **`{a,b}`** brace expansion runs before globbing.
- `BARE_OS_GREP_FILTER_MAX`**`grep -r`** — Max **`--include` / `--exclude` / `--exclude-dir`** glob patterns (default **32**).
- `BARE_OS_SED_NULL_MAX_RECORDS`**`sed -z`** — Max NUL-separated records per run (default **100000**).
- `BARE_OS_HYPER_MULTISIG_VERIFY` — Seeder — When set, runs **`hyper-multisig verify`** via **[`bare-subprocess`](https://github.com/holepunchto/bare-subprocess)** under Pear/Bare (dependency of **`bare-os-seeder`**), or **`child_process`** on Node. Requires **`hyper-multisig`** on **`PATH`**.