utopia-ia/elffuss-code public
Changesets · Branches · Tags · Compare
| Changeset | fb79c56b62810dd059c3a1b287dafad7d116757b3c26e9177b732755a7c3cb52 |
|---|---|
| Author | KikoCis <kikocisneros@gmail.com> · 2026-10-12 09:45 +02:00 |
| Committer | KikoCis <kikocisneros@gmail.com> · 2026-10-12 09:45 +02:00 |
| Parents | 885e56ef5ed2 |
2 files changed
modified README.md +8 −7
| @@ -149,12 +149,13 @@ | ||
| 149 | 149 | address the dialog showed; and positive controls show the setup does catch leaks. |
| 150 | 150 | |
| 151 | 151 | - **Nothing of level 2 loads until you turn an extension's code on.** `tests/x2_bytes.mjs` |
| 152 | - compares Code with the level 1 tip request by request, uncompressed: with no extension | |
| 153 | - it asks for exactly the same files and 881 bytes more (short hooks in `main.js` and | |
| 154 | - `ide.js`: the palette list, the preview gate and the list of open tabs); with level 1 | |
| 155 | - extensions only, the same files and 4.4 KB more (the hooks in `js/ext/host.js` and | |
| 156 | - `store.js` that decide when to load `js/ext2/host2.js`); with the Extensions panel open | |
| 157 | - and a search done, the same files and 20,430 bytes more, within the suite's 20 KB budget | |
| 152 | + compares Code with its main before level 2 (which has level 1) request by request, | |
| 153 | + uncompressed: with no extension it asks for exactly the same files and 616 bytes more | |
| 154 | + (short hooks in `main.js` and `ide.js`: the palette list, the preview gate and the list | |
| 155 | + of open tabs); with level 1 extensions only, the same files and 4.2 KB more (the hooks in | |
| 156 | + `js/ext/host.js` and `store.js` that decide when to load `js/ext2/host2.js`); with the | |
| 157 | + Extensions panel open and a search done, the same files and 20,165 bytes more, within the | |
| 158 | + suite's 20 KB budget | |
| 158 | 159 | (what the panel now tells everyone: what will work, the Works in Code filter, how |
| 159 | 160 | extensions are isolated, the check before Install, which for a result that applies |
| 160 | 161 | without code loads nothing of level 2). In none of these is anything fetched from |
| @@ -251,7 +252,7 @@ | ||
| 251 | 252 | | `x2_headers` | the sandbox documents' exact headers, 404 for anything else, Code never serves `/x2/`, the vendor files' headers and SRI, a missing vendor file not cached (also against a deployment); the generated nginx snippets | |
| 252 | 253 | | `x2_deploy` | the deploy scripts against a folder that plays the server (fake `git`, `ssh` and `rsync`): only the manifest's files go up and nothing else may be there, a stray or corrupt file stops it, main must protect `vendor/x2/` first, the sandbox must be another site | |
| 253 | 254 | | `x2_smoke` | synthetic extensions end to end: commands, formatting, hovers, symbols, diagnostics, decorations, dialogs, the gates, the firewall, tampering, `?noext`/`?noext2`/kill switch | |
| 254 | -| `x2_bytes` | the default path and the level 1 states against the level 1 tip (above) | | |
| 255 | +| `x2_bytes` | the default path and the level 1 states against main before level 2 (above) | | |
| 255 | 256 | | `x2_canary` | the canary and the drill (above), with positive controls | |
| 256 | 257 | | `x2_manager` | sort-lines and Prettier installed, run, configured and uninstalled through the panel, Open VSX mocked from their pinned packages | |
| 257 | 258 | | `x2_commands` | sort-lines in Code's palette, F1, F9 and the context menu; Cmd+S; reserved chords and conflicts; Code's own shortcuts unchanged; hostile titles stay text | |
modified tests/x2_bytes.mjs +3 −2
| @@ -1,5 +1,6 @@ | ||
| 1 | 1 | // What people who never turn on an extension's code download, compared with |
| 2 | -// the level 1 tip (9e457ee), and what turning it on downloads. | |
| 2 | +// Code's main before level 2 (84cc38b, which has level 1), and what turning it | |
| 3 | +// on downloads. | |
| 3 | 4 | // |
| 4 | 5 | // node tests/x2_bytes.mjs |
| 5 | 6 | // |
| @@ -39,7 +40,7 @@ | ||
| 39 | 40 | |
| 40 | 41 | const HERE = path.dirname(fileURLToPath(import.meta.url)); |
| 41 | 42 | const REPO = path.resolve(HERE, '..'); |
| 42 | -const TIP = '9e457ee'; | |
| 43 | +const TIP = '84cc38b'; // main before level 2 (level 1 included) | |
| 43 | 44 | const BUDGET = { 1: 1024, 2: 5 * 1024, 3: 5 * 1024, 4: 20 * 1024 }; |
| 44 | 45 | let fails = 0; |
| 45 | 46 | const ok = (name, c, extra = '') => { console.log((c ? '✅' : '❌') + ' ' + name + (extra ? ' — ' + extra : '')); if (!c) fails++; }; |