Raven Scott
e2b721d19f
complete shell 100-item plan across parser, execution, security, and docs
Implement the full BareOS shell roadmap end-to-end, including grammar/tokenization
diagnostics, expansion/runtime hardening, execution graph tooling, builtins/job-control
stability, policy/sandbox controls, and release/traceability documentation updates.
- Add shell grammar baseline and diagnostics primitives:
- introduce `docs/reference/shell-grammar.md` with lexer modes and EBNF contract
- add rich diagnostic tokenizer output (mode + span metadata) via `tokenizeBareShellLineDetailed`
- export structured parse snapshot helpers (`bareOsShellAstSnapshot`) and shell error kinds
- add determinism coverage for tokenizer and AST snapshot outputs
- Harden expansion semantics and guardrails:
- enforce expansion byte budgets (`BARE_OS_SHELL_EXPANSION_MAX_BYTES`)
- add expansion trace hooks (`BARE_OS_SHELL_EXPANSION_TRACE`) with stage-level rows
- add expansion recursion depth limits (`BARE_OS_SHELL_EXPANSION_MAX_DEPTH`)
- tighten POSIX-mode arithmetic invalid-token diagnostics
- preserve declared expansion ordering and document it in code/docs
- Extend redirection/pipeline execution model:
- add normalized redirection planner (`planShellRedirections`) independent of side effects
- add execution graph builder/debug surface (`buildShellExecutionGraph`)
- support `<<-` operator in tokenizer/parser paths
- add pipeline stage timeout safety (`BARE_OS_SHELL_PIPELINE_STAGE_TIMEOUT_MS`)
- keep pipefail/pipestatus behavior verified with integration tests
- Improve builtins and control-flow reliability:
- expand `read` builtin support:
- `-r` raw mode
- `-d` single-char delimiter
- `-t` timeout semantics
- refine wait/jobs semantics:
- stable `jobs -l` parseable format expectations
- synthetic pid mapping (`wait 410x`) and `wait all` support
- keep trap registration/listing behavior deterministic and test-covered
- add trap signal dispatch helper (`dispatchShellTrapSignal`) with normalization
- Add security and policy enforcement hooks:
- command deny/allow policy gates:
- `BARE_OS_SHELL_DENY_COMMANDS`
- `BARE_OS_SHELL_ALLOW_COMMANDS`
- sandbox mode (`BARE_OS_SHELL_SANDBOX`) to block external command execution
- redirect path safety guard (`BARE_OS_SHELL_REDIRECT_GUARD`) for pseudo-path/traversal risks
- emit structured shell audit event rows (`ctx.shellAuditEvents`) for start/error/finish
- Improve interactive UX resilience:
- add prompt-hook timeout protection in fish readline:
- `resolveShellPromptHookSegment`
- env control `BARE_OS_SHELL_PROMPT_HOOK_TIMEOUT_MS`
- ensure prompt segment resolution is non-blocking and safe on timeout/error
- Add reliability/performance artifacts and shell fast lane:
- add `scripts/bench-shell-phases.mjs` for shell microbench sanity checks
- add `scripts/gen-shell-reliability-report.mjs` and generate reliability JSON artifact
- add root scripts:
- `test:shell-fast`
- `bench:shell`
- `report:shell-reliability`
- Expand shell-focused docs and traceability:
- add:
- `docs/reference/shell-unsupported-behavior.md`
- `docs/reference/shell-troubleshooting.md`
- add contributor guides:
- `developer-guide/17-how-to-add-shell-builtin.md`
- `developer-guide/18-how-to-add-shell-grammar-feature.md`
- update indexes/traceability/release gate docs:
- `docs/reference/README.md`
- `docs/reference/posix-issue7-traceability.md`
- `docs/reference/environment-and-posix-appendix.md`
- `docs/release-checklist.md`
- `developer-guide/README.md`
- `scripts/README.md`
- Add and update shell regression tests in `packages/bare-os-booter/test.js` for:
- tokenizer spans/modes and deterministic output
- AST snapshot schema/shape
- redirection planner and execution graph behavior
- expansion trace and strict arithmetic paths
- `<<-` support
- pipeline stage timeout handling
- `read` delimiter/raw/timeout semantics
- jobs/wait parseability and selection semantics
- trap dispatch and normalization behavior
- policy/sandbox/redirect-guard/audit-event pathways
Validation:
- `npm run test -w bare-os-booter`
- `npm run test:shell-bracket -w bare-os-booter`
- `npm run test:shell-fast`
- `npm run report:shell-reliability`
2026-04-26 23:17:20 -04:00
..
2026-04-04 18:09:08 -04:00
2026-04-04 22:39:33 -04:00
2026-04-09 20:42:54 -04:00
2026-04-09 20:42:54 -04:00
2026-04-23 20:49:38 -04:00
2026-04-23 20:39:50 -04:00
2026-04-05 16:34:58 -04:00
2026-04-22 03:44:42 -04:00
2026-04-26 07:05:24 -04:00
2026-04-09 20:42:54 -04:00
2026-04-09 20:42:54 -04:00
2026-04-09 00:53:45 -04:00
2026-04-21 18:22:32 -04:00
2026-04-23 20:39:50 -04:00
2026-04-03 20:46:09 -04:00
2026-04-04 17:51:47 -04:00
2026-04-26 22:34:04 -04:00
2026-04-05 02:08:38 -04:00
2026-04-26 06:57:07 -04:00
2026-04-23 20:39:50 -04:00
2026-04-26 22:28:21 -04:00
2026-04-03 23:44:13 -04:00
2026-04-03 23:42:47 -04:00
2026-04-03 23:44:13 -04:00
2026-04-04 18:09:08 -04:00
2026-04-04 18:46:00 -04:00
2026-04-21 20:05:57 -04:00
2026-04-22 06:38:52 -04:00
2026-04-05 23:14:08 -04:00
2026-04-22 22:24:23 -04:00
2026-04-26 07:48:55 -04:00
2026-04-04 02:51:33 -04:00
2026-04-23 21:24:04 -04:00
2026-04-04 01:20:57 -04:00
2026-04-04 01:20:57 -04:00
2026-04-04 18:09:08 -04:00
2026-04-05 13:50:07 -04:00
2026-04-05 15:04:59 -04:00
2026-04-04 19:23:06 -04:00
2026-04-04 18:41:34 -04:00
2026-04-04 21:23:49 -04:00
2026-04-05 01:31:03 -04:00
2026-04-05 15:52:59 -04:00
2026-04-03 20:46:09 -04:00
2026-04-05 13:50:07 -04:00
2026-04-04 01:20:57 -04:00
2026-04-26 22:28:21 -04:00
2026-04-04 18:46:00 -04:00
2026-04-24 01:14:35 -04:00
2026-04-04 17:51:47 -04:00
2026-04-04 16:39:15 -04:00
2026-04-26 07:15:34 -04:00
2026-04-04 06:39:31 -04:00
2026-04-26 07:48:55 -04:00
2026-04-04 22:39:33 -04:00
2026-04-05 03:16:33 -04:00
2026-04-05 15:52:59 -04:00
2026-04-04 02:34:21 -04:00
2026-04-05 00:45:17 -04:00
2026-04-05 13:50:07 -04:00
2026-04-24 01:14:35 -04:00
2026-04-04 21:23:49 -04:00
2026-04-04 22:39:33 -04:00
2026-04-05 23:14:08 -04:00
2026-04-05 14:17:20 -04:00
2026-04-05 13:50:07 -04:00
2026-04-05 14:45:01 -04:00
2026-04-05 01:06:59 -04:00
2026-04-05 01:31:03 -04:00
2026-04-05 00:32:40 -04:00
2026-04-26 07:22:31 -04:00
2026-04-04 17:51:47 -04:00
2026-04-05 15:52:59 -04:00
2026-04-04 17:51:47 -04:00
2026-04-26 22:28:21 -04:00
2026-04-22 22:09:58 -04:00
2026-04-04 18:41:34 -04:00
2026-04-04 17:51:47 -04:00
2026-04-05 02:08:38 -04:00
2026-04-24 09:05:52 -04:00
2026-04-04 22:00:01 -04:00
2026-04-26 07:22:31 -04:00
2026-04-04 22:39:33 -04:00
2026-04-26 07:22:31 -04:00
2026-04-21 22:45:50 -04:00
2026-04-04 04:33:25 -04:00
2026-04-05 15:52:59 -04:00
2026-04-05 23:14:08 -04:00
2026-04-03 21:39:36 -04:00
2026-04-26 07:15:34 -04:00
2026-04-04 22:28:47 -04:00
2026-04-04 22:13:19 -04:00
2026-04-05 23:01:54 -04:00
2026-04-24 08:54:16 -04:00
2026-04-26 22:28:21 -04:00
2026-04-26 07:48:55 -04:00
2026-04-26 22:28:21 -04:00
2026-04-04 18:20:56 -04:00
2026-04-25 02:59:32 -04:00
2026-04-21 17:26:41 -04:00
2026-04-26 07:15:34 -04:00
2026-04-26 22:28:21 -04:00
2026-04-03 20:46:09 -04:00
2026-04-04 02:51:33 -04:00
2026-04-26 23:17:20 -04:00
2026-04-05 15:04:59 -04:00
2026-04-04 22:13:19 -04:00
2026-04-05 22:45:21 -04:00
2026-04-05 23:14:08 -04:00
2026-04-05 22:45:21 -04:00
2026-04-22 20:06:18 -04:00
2026-04-04 19:08:51 -04:00
2026-04-04 22:13:19 -04:00
2026-04-04 05:54:08 -04:00
2026-04-26 06:19:47 -04:00
2026-04-26 22:28:21 -04:00
2026-04-04 17:06:35 -04:00
2026-04-05 14:45:01 -04:00
2026-04-26 22:28:21 -04:00
2026-04-04 17:51:47 -04:00
2026-04-05 04:33:14 -04:00
2026-04-21 17:26:41 -04:00
2026-04-03 20:46:09 -04:00
2026-04-04 19:36:32 -04:00
2026-04-26 23:17:20 -04:00
2026-04-26 23:17:20 -04:00
2026-04-04 18:09:08 -04:00
2026-04-08 23:07:07 -04:00
2026-04-04 17:51:47 -04:00
2026-04-26 07:48:55 -04:00
2026-04-26 22:28:21 -04:00
2026-04-21 23:19:38 -04:00
2026-04-05 02:21:07 -04:00
2026-04-25 02:00:44 -04:00
2026-04-04 22:00:01 -04:00
2026-04-26 22:28:21 -04:00
2026-04-04 18:09:08 -04:00
2026-04-26 22:28:21 -04:00