Skip to content

Commit f905d4e

Browse files
committed
web/shell: docs and README to the final numbers (60 patches, 842 golden cases, 371 runtime mutations)
1 parent db945c3 commit f905d4e

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

‎docs/WEB.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ builds. The agent's prompt says so, and prefers its file tools for single-file w
224224
iterations, 8 MiB of output, 64 MiB live, one file read 4 MiB, a script of 1,000,000 bytes; the agent's command runs
225225
until `levelcode.ai.commandTimeout`, a terminal line until Ctrl+C or ten minutes. `/tmp` lives as long as the
226226
terminal's engine does (it is lost when that is replaced, and the next line says so). Time is UTC unless `TZ` is set.
227-
Sorting is by code point. 514 of 587 differential cases against GNU bash 5.1 are byte-identical; the other 73 are a
227+
Sorting is by code point. 775 of 842 differential cases against GNU bash 5.1 are byte-identical; the other 67 are a
228228
shrink-only table of documented differences (`web/shell/engine/NOTES.md`).
229229

230230
**Settings and trust.** Every `levelcode.*` setting of this edition except a list of display preferences is
@@ -393,8 +393,8 @@ secret store then falls back to memory for the session.
393393
| Check | Command | What it proves |
394394
| --- | --- | --- |
395395
| Unit gate | `./scripts/test-extensions.sh` | Includes `web/test/unit/*.test.js`: the shims against Node, `host.js` on both sides, `main.js`'s functions (address check, delivery, the shared secret store, `?signin=1`), the manifest, the copy rewrites, the chat skin (what it inserts and that every rule is scoped), the themes (required colours, contrast of the text pairs, the page's defaults naming themes that exist) and the layout commands. Runs in CI on every PR (`test.yml`). Also run on Linux / Node 18 in a container with the network refused. |
396-
| The shell | `./scripts/test-extensions.sh` (the unit suites `web/test/unit/shell-*.test.js`) | The engine: a differential against GNU bash 5.1 (587 cases, a shrink-only table of the ones that differ), fuzzing, every patch of the vendored code with its anchors, the build; the runtime: the commit and its refusals, kill and deadline against a **real engine in a worker thread**, limits; the terminal: key bytes, the line editor against real xterm.js 6.1 in its headless build, width, the output filter, history. With the Code-OSS checkout present the real-xterm halves run; `LEVELCODE_REQUIRE_XTERM=1` and `LEVELCODE_REQUIRE_WORKER=1` make a skip a failure, which is what CI sets. |
397-
| Mutations | `node web/test/helpers/mutation/mutate.mjs` | 249 edits to the runtime, the commit and the sanitiser, each of which a suite must catch (a tool, not a suite). |
396+
| The shell | `./scripts/test-extensions.sh` (the unit suites `web/test/unit/shell-*.test.js`) | The engine: a differential against GNU bash 5.1 (842 cases, a shrink-only table of the ones that differ), fuzzing, every patch of the vendored code with its anchors, the build; the runtime: the commit and its refusals, kill and deadline against a **real engine in a worker thread**, limits; the terminal: key bytes, the line editor against real xterm.js 6.1 in its headless build, width, the output filter, history. With the Code-OSS checkout present the real-xterm halves run; `LEVELCODE_REQUIRE_XTERM=1` and `LEVELCODE_REQUIRE_WORKER=1` make a skip a failure, which is what CI sets. |
397+
| Mutations | `node web/test/helpers/mutation/mutate.mjs` | 371 edits to the runtime, the commit and the sanitiser, each of which a suite must catch (a tool, not a suite). |
398398
| The shell, in a browser | `node web/test/e2e-shell.mjs --static … --extensions …` | Real headless Chrome and the real nested Worker: nothing of the shell is fetched until it is used; a terminal from the palette; typing, files, a working folder that persists, 127, Ctrl+C on `sleep 60`, a link to `path:line:col` that opens the file at that line, a pasted three-line buffer through a resize; hostile output that does not type into the prompt or rename the terminal; the agent offered `run_command` without background, a file written through the review (Keep/Undo), a `.vscode` write refused whole, a timeout that applies nothing, the mirror tab. |
399399
| End to end | `node web/test/e2e.mjs --dist dist-web --stub-port <port the build used>` | Real headless Chrome: boot from static files, the extension activates in the worker, sign in through the real callback page, agent tool calls (write / list / search / read / edit) against the scratch workspace, Quick Open, Keep and Undo, a reload that keeps the session and files. |
400400
| The look | `node web/test/e2e-look.mjs --dist dist-web --stub-port <port>` | The skinned chat (greeting, starters, composer in the reading column, the rail at 1440 px and the dialog at 900 px), light and dark following the system with this build's own colours (also in the chat's webview), no Welcome page, no second chat, source control / run / extensions not offered, the layout switch both ways, and the docked layout docked again after a reload. Release builds only. |

‎web/shell/README.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ own values the rest.
353353
then writes the patched file at build time (`node apply-patches.mjs --check` verifies the anchors without writing).
354354
The patched file is modified by LevelCode (Apache-2.0 §4(b): the build output carries a notice).
355355

356-
Patches (31, 91 anchor edits; `engine/NOTES.md` §2 has one row for each, with where it anchors and what pins it, and
356+
Patches (60, 199 anchor edits; `engine/NOTES.md` §2 has one row for each, with where it anchors and what pins it, and
357357
`node apply-patches.mjs --check` says the count):
358358

359359
| | |
@@ -367,6 +367,7 @@ Patches (31, 91 anchor edits; `engine/NOTES.md` §2 has one row for each, with w
367367
| LC-17, LC-18 | builtins resolved without `PATH`; builtins the engine does not implement are not listed |
368368
| LC-21 – LC-25 | exported variables reach what `xargs`/`timeout`/`find -exec` start; grep/sed BRE `\+ \? \< \>`; `sort -k` and `-u`; `sed s///w`; `LimitError` exported |
369369
| LC-26 – LC-31 | a redirection's content write is told from `tee`'s (the content write of an opened path never rejects `exec()`); `cd` through `..`; `sort -k` flags; `printf '\xHH'` makes a byte; `tee`/`touch` errors; `$cmd` is split into words |
370+
| LC-32 – LC-60 | what a model's one-liners hit once the common commands were compared with GNU one by one: `sed` (the whole script grammar and its messages, `H`, `.` over a newline, `*` at the start, `-E` addresses, replacement escapes, `\cREc` addresses and `I`/`M`, `s///Ng`, `q5`, `l`); `awk` in code points, `RS`, `split`, `%e`/`%g`; `grep` bracket backslashes; `find -size` and `-printf`; `sort -V`; a redirect target ending in `/`; `/dev/stderr` as part of a command's own output; declarations with array literals; a directory as a command is 126; `printf '\045'`; `%Y` of years before 1000 |
370371

371372
`legalComments` are kept in the bundle (re2js MIT, ieee754 BSD-3-Clause); `diff` 8.0.4 and `sprintf-js` 1.1.3 are
372373
vendored beside it. Never vendor `node-liblzma` (LGPL), the zstd native module, `typescript`, `sql.js`. `turndown`,

‎web/shell/engine/NOTES.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ memory. `VENDOR.json` pins its sha256 (5bfe9875…c76e as of this round) and siz
104104
| LC-59 | sed `l` (2 edits, `__lcList`; LC-51's lexer edit reads the number) | The listing is GNU's: a character that is not ASCII is its UTF-8 bytes in octal (`caf\303\251`; the engine printed the code point, and a byte that is not text came out as `\156377`, the octal of the surrogate it is kept in), and a line is wrapped at 70 with a `\` (`l 5` at 5, `l 0` and `l 1` as GNU takes them). `-l N` and `--line-length` are still refused (§4). | LC-59, tables `sedlist` |
105105
| LC-60 | date's formatter (4 edits, `__lcY4`) | A year before 1000 is written with four digits by `%F`, `%Y` and `%G` (`0100-01-02`), and the ISO year of a date before the year 100 is its own (`new Date(6, ...)` is 1906). | LC-60, tables `date` |
106106

107-
README §9 lists LC-1..LC-4; LC-5..LC-60 are additions (see the report's requests).
107+
The README's §9 groups them; this table has one row each.
108108
`node web/shell/engine/vendor/just-bash/3.6.0/apply-patches.mjs --check` verifies the hash of the file and that every
109109
anchor is there exactly once, and writes nothing (60 patches, 198 edits).
110110

0 commit comments

Comments
 (0)