redweb 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +166 -9
- package/README.md +177 -523
- package/bin/redweb.js +11 -20
- package/client.d.ts +7 -2
- package/config/tsconfig.json +14 -14
- package/contract.d.ts +45 -0
- package/contract.js +5 -0
- package/docs/ACTION_INPUT_VERIFICATION.md +96 -0
- package/docs/ADMISSION_TIMEOUT_VERIFICATION.md +69 -0
- package/docs/AGENT_ACCESS.md +35 -0
- package/docs/AGENT_EVALUATION.md +58 -0
- package/docs/AGENT_READY_ACCEPTANCE.md +763 -0
- package/docs/APPLICATION_RECORDER_VERIFICATION.md +50 -0
- package/docs/BENCHMARK_VERIFICATION.md +307 -0
- package/docs/BROWSER_OWNER_VERIFICATION.md +191 -0
- package/docs/CLI.md +116 -0
- package/docs/CLIENT_DEVELOPMENT.md +152 -0
- package/docs/CLIENT_POLISH_VERIFICATION.md +282 -0
- package/docs/COVERAGE_COUNTER_VALIDATION.md +109 -0
- package/docs/COVERAGE_SCOPE_AUDIT.md +1183 -0
- package/docs/DEVELOPMENT.md +79 -0
- package/docs/DIAGNOSTIC_COMPATIBILITY.md +76 -0
- package/docs/DOCUMENTATION.md +37 -0
- package/docs/FEEDBACK_COMMAND_VERIFICATION.md +228 -0
- package/docs/GETTING_STARTED.md +58 -0
- package/docs/JSX_PERFORMANCE_VERIFICATION.md +59 -0
- package/docs/LIVE_HTML.md +169 -21
- package/docs/LIVE_HTML_LOAD_VERIFICATION.md +98 -0
- package/docs/MIGRATION.md +28 -0
- package/docs/MULTIPLAYER_OPERATIONS.md +26 -4
- package/docs/ORIGINAL_RECOVERY_VERIFICATION.md +100 -0
- package/docs/PACKAGED_EXAMPLE_VERIFICATION.md +126 -0
- package/docs/POLISH_RELEASE_CHECKPOINT.md +91 -0
- package/docs/PROCESS_CLEANUP_OBSERVATION.md +61 -0
- package/docs/PROCESS_REAPING_VERIFICATION.md +30 -0
- package/docs/PRODUCTION_READINESS.md +11 -2
- package/docs/RECOVERY_CLIENT_HEAP.md +201 -0
- package/docs/RECOVERY_CODE_ATTRIBUTION.md +174 -0
- package/docs/RECOVERY_CODE_CENSUS.md +158 -0
- package/docs/RECOVERY_COMPARISON.md +103 -0
- package/docs/RECOVERY_DEOPTIMIZATION.md +169 -0
- package/docs/RECOVERY_FOLLOWUP_SPIKE.md +147 -0
- package/docs/RECOVERY_INVESTIGATION.md +229 -0
- package/docs/RECOVERY_RUNTIME_CONTROLS.md +181 -0
- package/docs/RELEASE_TRUST.md +58 -0
- package/docs/ROOM_AUTHORIZATION.md +49 -0
- package/docs/RUNTIME_DIAGNOSTICS.md +78 -0
- package/docs/SERVER_RECOVERY_CANDIDATE.md +185 -0
- package/docs/SOAK_ROTATION_OBSERVATION.md +160 -0
- package/docs/SOAK_VERIFICATION.md +154 -0
- package/docs/SOCKET_CONTRACTS.md +39 -0
- package/docs/SPLIT_RECOVERY_COVERAGE.md +83 -0
- package/docs/SPLIT_RECOVERY_ERROR_HANDLING.md +67 -0
- package/docs/STARTER_COORDINATOR_VERIFICATION.md +112 -0
- package/docs/STARTER_LIFECYCLE_VERIFICATION.md +75 -0
- package/docs/STARTER_REPORT_RETENTION.md +73 -0
- package/docs/VERIFICATION_EVIDENCE.md +2 -0
- package/docs/generated.json +2154 -0
- package/docs/guides/chatroom.md +27 -0
- package/docs/guides/http-websocket.md +28 -0
- package/docs/guides/jsx-without-react.md +26 -0
- package/docs/guides/realtime-dashboard.md +29 -0
- package/docs/guides/typed-websockets.md +26 -0
- package/docs/reference.json +1207 -0
- package/docs/snippets/room-access.tsx +51 -0
- package/docs/topics.json +21 -0
- package/examples/live-html/chatroom.js +207 -268
- package/examples/live-html/chatroom.tsx +167 -0
- package/examples/live-html/jsx-page.js +1 -1
- package/examples/live-html/jsx-page.tsx +1 -1
- package/examples/live-html/tsconfig.json +8 -7
- package/index.d.ts +170 -45
- package/index.js +2 -0
- package/jsx-dev-runtime.js +2 -2
- package/jsx-runtime.d.ts +7 -2
- package/package.json +88 -7
- package/recipes/add/artifact.test.cjs +57 -0
- package/recipes/add/live.tsx +18 -0
- package/recipes/add/socket-route.ts +24 -0
- package/recipes/chat/README.md +22 -0
- package/recipes/chat/app.test.cjs +105 -0
- package/recipes/chat/app.tsx +9 -0
- package/recipes/dashboard/README.md +43 -0
- package/recipes/dashboard/admin.ts +21 -0
- package/recipes/dashboard/app.css +16 -0
- package/recipes/dashboard/app.test.cjs +450 -0
- package/recipes/dashboard/app.tsx +86 -0
- package/recipes/dashboard/auth.ts +80 -0
- package/recipes/dashboard/cards.tsx +102 -0
- package/recipes/dashboard/rate-window.test.cjs +17 -0
- package/recipes/dashboard/store.ts +120 -0
- package/recipes/http-ws/README.md +11 -0
- package/recipes/http-ws/app.test.cjs +92 -0
- package/recipes/http-ws/app.tsx +36 -0
- package/recipes/realtime/README.md +8 -0
- package/recipes/realtime/app.test.cjs +15 -0
- package/recipes/realtime/app.tsx +28 -0
- package/recipes/shared/README.md +40 -0
- package/recipes/shared/app.css +8 -0
- package/recipes/shared/copy-assets.cjs +8 -0
- package/recipes/shared/network.cjs +59 -0
- package/recipes/shared/run-app.test.cjs +158 -0
- package/recipes/shared/run-app.ts +50 -0
- package/recipes/site/README.md +4 -0
- package/recipes/site/app.test.cjs +19 -0
- package/recipes/site/app.tsx +25 -0
- package/recipes/socket/README.md +39 -0
- package/recipes/socket/app.test.cjs +85 -0
- package/recipes/socket/app.tsx +30 -0
- package/recipes/socket/contract.ts +12 -0
- package/recipes/socket/handlers.ts +40 -0
- package/src/OwnedServerLifecycle.js +66 -0
- package/src/access/AccessPolicy.js +37 -0
- package/src/access/AuthenticationFailure.js +13 -0
- package/src/access/RequestFailure.js +33 -0
- package/src/access/failure-codes.json +25 -0
- package/src/async/BoundedOperation.js +62 -0
- package/src/cli/ActionReferences.js +193 -0
- package/src/cli/AdditionLayout.js +140 -0
- package/src/cli/FilePlan.js +94 -0
- package/src/cli/ProjectAddition.js +60 -0
- package/src/cli/ProjectConfig.js +26 -0
- package/src/cli/ProjectDoctor.js +112 -0
- package/src/cli/ProjectInitializer.js +20 -30
- package/src/cli/SourceInspector.js +207 -0
- package/src/cli/StaticSource.js +192 -0
- package/src/cli/arguments.js +62 -0
- package/src/cli/formatCommand.js +10 -0
- package/src/cli/run.js +57 -0
- package/src/cli/templates.js +86 -87
- package/src/context/RequestSnapshot.js +41 -0
- package/src/dataProperty.js +11 -0
- package/src/development/DevelopmentPageManager.js +48 -0
- package/src/development/Inspection.js +104 -0
- package/src/development/ObservedRenderer.js +42 -0
- package/src/development/description.js +35 -0
- package/src/development/loopbackRequest.js +27 -0
- package/src/development/refreshBrowser.js +96 -0
- package/src/development/refreshStyles.js +9 -0
- package/src/development/settings.js +17 -0
- package/src/docs/Documentation.js +182 -0
- package/src/htmx/ActionDefinition.js +44 -0
- package/src/htmx/Jsx.js +24 -8
- package/src/htmx/LiveHtmlServer.js +41 -19
- package/src/htmx/LivePage.js +63 -13
- package/src/htmx/PageIdentity.js +32 -0
- package/src/htmx/PageLifetime.js +37 -0
- package/src/htmx/PageManager.js +203 -74
- package/src/htmx/ReactiveRenderer.js +241 -0
- package/src/htmx/StaticExporter.js +1 -1
- package/src/htmx/TemplateRenderer.js +13 -7
- package/src/htmx/browserRuntime.js +2 -93
- package/src/htmx/metadata.js +19 -7
- package/src/validation/ActionInputError.js +12 -0
- package/src/validation/SchemaValidator.js +38 -0
- package/src/ws/AdmissionPolicy.js +24 -23
- package/src/ws/BaseSocketServer.js +53 -38
- package/src/ws/ContractValidationError.js +12 -0
- package/src/ws/HeartbeatMonitor.js +19 -7
- package/src/ws/ProtocolPolicy.js +1 -1
- package/src/ws/RoomAccess.js +82 -0
- package/src/ws/RoomRegistry.js +56 -6
- package/src/ws/RouteRuntime.js +56 -10
- package/src/ws/SocketContract.js +112 -0
- package/src/ws/SocketRoute.js +18 -0
- package/src/ws/protocol-schema.json +6 -1
- package/examples/live-html/chatroom.ts +0 -217
package/docs/CLI.md
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Redweb command-line tools
|
|
2
|
+
|
|
3
|
+
Use the version installed in your project (`npx --no-install redweb`) when troubleshooting an existing app. The tool reports a warning if its version differs from the project's installed Redweb version.
|
|
4
|
+
|
|
5
|
+
## Add pages, components, and socket routes
|
|
6
|
+
|
|
7
|
+
This command is currently **unreleased**, like the other branch-specific capabilities in the README.
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npx --no-install redweb add page dashboard
|
|
11
|
+
npx --no-install redweb add component notifications
|
|
12
|
+
npx --no-install redweb add socket-route match
|
|
13
|
+
npx --no-install redweb add page account-settings --dry-run --json
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Each addition writes a named-export TypeScript module and a `.test.cjs` file. Pages and owned components demonstrate server state plus an exposed increment action. The socket route demonstrates a validated `ping` handler returning `pong`, without an inner action dispatcher; extend its contract and register additional handlers as needed. For complete join/move/resume behavior, use the existing socket starter instead.
|
|
17
|
+
|
|
18
|
+
Run these commands in an existing project with Redweb declared as an installed runtime dependency and TypeScript installed. Declare/install `ws` explicitly (normally as a development dependency) for the generated network tests. Socket additions also require application-installed Zod as a runtime dependency. The generator reports missing prerequisites; it never installs dependencies or changes your manifest.
|
|
19
|
+
|
|
20
|
+
The default source location is the effective TypeScript `rootDir`, with `pages/`, `components/`, or `socket-routes/` beneath it. The default test directory is `test/`. An optional project directory follows the kind/name. Use `--config build.json`, `--source-dir features`, or `--test-dir checks` to select paths relative to that project. Names must be lowercase kebab-case, start with a letter, and contain at most 64 characters.
|
|
21
|
+
|
|
22
|
+
The command supports a single emitting TypeScript project using CommonJS, Node16 or NodeNext module settings and standard or legacy decorators. HTML additions require Redweb's automatic JSX runtime. Effective inherited configuration controls inclusion and emission; `--source-dir` chooses placement, **not** the compiler's `rootDir`. Ambiguous placement requires that option or an explicit `rootDir`. Project-reference roots, bundler-only pipelines, bundled output, disabled JavaScript emission, output outside the project, mismatched source/output package module types, and compiled test locations are rejected with guidance. Select the appropriate child project/configuration yourself rather than allowing the command to rewrite a monorepo.
|
|
23
|
+
|
|
24
|
+
The planner parses source and performs an in-memory TypeScript emit, without importing the application or writing build output. It checks the prospective module, its actual emitted path (including imported source dependencies), and whether an inferred root would relocate existing output. It rejects a test directory that TypeScript would compile when `allowJs` is enabled. This is not a replacement for a whole-project build or its existing tests. The virtual-file matcher uses a feature-checked TypeScript runtime API; unsupported compiler shapes fail explicitly rather than guessing glob behavior.
|
|
25
|
+
|
|
26
|
+
`--dry-run` writes nothing; `--json` returns a versioned report with planned/created paths, source/output/test paths, a named import, `registration.status: "pending"`, and explicit build/test argument arrays. Human commands are quoted for PowerShell on Windows and a POSIX shell elsewhere. Run the reported build and then its test from the project root. The test imports **only the generated artifact**, starts an isolated loopback server on a temporary port, and exercises a real HTTP/WebSocket action or message exchange. It never imports the existing application entry point.
|
|
27
|
+
|
|
28
|
+
Registration is intentionally your next step. Add a page to the existing `start([...])` list; add a socket route to the server's route list. For components, create an owned field (`widget = new NotificationsComponent()`) and render `{this.widget}`. Adjust the report's project-root-relative named import to the file where you use it; Node-compatible imports use the emitted `.js` extension. No imports, registration lists, package scripts, manifests, or configuration files are rewritten. Add the new test to your project's normal test command yourself; a generated test is not claimed to be automatically registered.
|
|
29
|
+
|
|
30
|
+
The shared writer rejects any destination conflict before writing and creates files exclusively. It rejects path escapes, unsafe portable names, case aliases and symbolic-link ancestors. Concurrent failures report which files were completed and which path was attempted; writing is not transactional and does not lock the filesystem tree. Existing application files are never overwritten.
|
|
31
|
+
|
|
32
|
+
## Initialize a project
|
|
33
|
+
|
|
34
|
+
Follow a [complete recipe's version-specific setup](GETTING_STARTED.md#start-with-a-complete-recipe). Its commands initialize a new directory, install the matching release or packed artifact, run tests, and start development. The unreleased channel requires the same tarball for initialization and installation; ordinary `npx redweb` does not select this checkout.
|
|
35
|
+
|
|
36
|
+
The initializer creates missing files only. It does not install dependencies, run package scripts, or validate existing source code. A message saying initialization completed means the file operation completed, not that a preserved existing project is valid.
|
|
37
|
+
|
|
38
|
+
`--template realtime|chat|site|socket|dashboard|http-ws` selects a complete runnable recipe. The default is `realtime`, a shared server-owned counter. `chat` includes the canonical reusable chat component, validated actions and its stylesheet; `site` has two non-live pages with a shared layout; `socket` exposes `/match` with separate `join`, `move`, and `resume` handlers, a shared Zod contract, and bounded in-memory sessions. The [dashboard](../recipes/dashboard/README.md) combines private live cards, SQLite persistence, explicit account provisioning, expiring sessions and account-wide sign-out. It requires Node 22.13+. The [http-ws starter](../recipes/http-ws/README.md) combines an HTTP health endpoint and a raw socket route on one explicitly owned listener. Each starter includes network tests, build/production instructions, and a development watcher. `--existing` and `--template` cannot be combined. The chat, socket and dashboard starters add Zod; Redweb itself does not require Zod or SQLite at runtime.
|
|
39
|
+
|
|
40
|
+
Doctor also checks the application's declared `engines.node` minimum (for example `>=22.13.0`). An incompatible runtime produces `PROJECT_NODE_UNSUPPORTED`. More complex ranges produce `PROJECT_NODE_UNCHECKED`, not a guessed success; npm remains responsible for its full engine-range interpretation. CI runs the dashboard acceptance tests on Node 22; older core compatibility jobs explicitly skip that recipe's runtime execution.
|
|
41
|
+
|
|
42
|
+
Run `npm test` for type checking, asset copying, and real HTTP/WebSocket tests on an ephemeral loopback port. `npm run dev` uses development-only Nodemon to rebuild and restart on changes to `src/` or `tsconfig.json`, enabling loopback-only browser refresh through its `REDWEB_DEV_REFRESH=1` environment. Clean HTML pages refresh automatically; detected edits keep the old document with a confirmation notice. This is not browser hot-module replacement or autosave. A type error prevents startup until corrected; outages alone do not trigger reload. See [development refresh](DEVELOPMENT.md#browser-refresh) for draft, connection, hostname and production boundaries. `npm run build` produces runtime code and assets in `dist/`; production needs that directory and installed runtime dependencies, not TypeScript or `src/`.
|
|
43
|
+
|
|
44
|
+
Templates come from `recipes/`, with common configuration/test helpers maintained once. The package gate extracts a tarball, generates every template, runs each generated `npm test`, then removes access to `src/` and runs the network tests again to validate production asset resolution.
|
|
45
|
+
|
|
46
|
+
For an existing application:
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
npx --no-install redweb init --existing --dry-run --json
|
|
50
|
+
npx --no-install redweb init --existing
|
|
51
|
+
npx --no-install redweb doctor --json
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
`--existing` creates only a missing `tsconfig.json`; it does not generate a new app, CSS, or package manifest. Adjust the generated source/output directories for your application. An existing `tsconfig.json` is never overwritten, even if it is incompatible.
|
|
55
|
+
|
|
56
|
+
`--dry-run` does not create files or directories. `--json` reports a versioned result with `operation`, `root`, `created`, `skipped`, and `planned`. The shared file-plan writer preflights all destinations, including planned directory/file conflicts, case aliases and nonportable segments such as Windows device names, alternate streams and trailing dots/spaces. It rejects symbolic links/junctions in the destination's ancestor chain, including above the chosen project root. Exclusive creation prevents overwriting a file created concurrently.
|
|
57
|
+
|
|
58
|
+
This is not a transactional installer or a lock on the filesystem tree. An operating-system error during writing can leave completed files, a partial attempted file, or new directories; the error reports completed writes and the attempted destination. Inspect those paths before retrying. Rerunning preserves existing files rather than repairing their contents. Another process must not rename or replace destination directories while generation runs.
|
|
59
|
+
|
|
60
|
+
## Diagnose without changing the project
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
npx --no-install redweb doctor --json
|
|
64
|
+
npx --no-install redweb doctor --port 8181
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The current checks are explicit in the result's `checks` array:
|
|
68
|
+
|
|
69
|
+
- Node version against the package's current minimum.
|
|
70
|
+
- Redweb installation in the project or its ancestor workspace's `node_modules`.
|
|
71
|
+
- Difference between the invoked CLI and installed library versions.
|
|
72
|
+
- Installed TypeScript (5 or newer) and a root `tsconfig.json`.
|
|
73
|
+
- Effective inherited JSX runtime configuration, syntax/config errors, and legacy-decorator settings.
|
|
74
|
+
- Declared page CSS/templates and duplicate page/route/handler registrations in statically readable TypeScript source.
|
|
75
|
+
- Literal `rw-click`/`rw-submit` names against the owning page/component's public `@action()` methods.
|
|
76
|
+
- Optional temporary bind to `127.0.0.1` to check a TCP port, immediately released on success.
|
|
77
|
+
|
|
78
|
+
Each finding includes `code`, `severity`, `file`, `message`, and `suggestion`. Source findings also include one-based `line` and `column` when attached to a specific declaration. Error findings produce exit status 1; warnings do not. JSON diagnostic reports go to stdout. Invalid CLI arguments and filesystem failures go to stderr, with exit status 1. `--help` and `--version` require no project.
|
|
79
|
+
|
|
80
|
+
Doctor loads the installed TypeScript compiler to read configuration and parse source, but never imports or executes the application's modules. It does not perform a full type check, emit files, run application functions/plugins, or apply repairs. These checks do not prove full application correctness or validate every package's semver range. Port availability is a point-in-time loopback check, not a reservation or a test of an external proxy. Dependency discovery currently targets conventional npm-style `node_modules` installations.
|
|
81
|
+
|
|
82
|
+
## Source checks and their boundaries
|
|
83
|
+
|
|
84
|
+
The `source` JSON object reports inspected file count, registration-group count, `mode: "static-source"`, and the number of unresolved/limited warnings. It is `null` when configuration or compiler problems prevent source inspection. `checks` lists `source-assets`, `source-routes`, `source-handlers`, and `source-actions` only when the source reader ran.
|
|
85
|
+
|
|
86
|
+
Supported syntax includes named/namespace TypeScript imports from Redweb, imported local constants, literal strings, constant arrays/objects, known spreads, and simple handler/route constructors. The reader starts with the configuration's source files and follows relative source imports within the project. Declaration files and dependency implementation code are not inspected; an explicitly configured source outside the project can be read, but additional outside-project imports are not followed automatically.
|
|
87
|
+
|
|
88
|
+
Duplicate paths are checked **within one registration group**, not across independent servers. The reader recognizes `start`, `exportStatic`, `site.export`, `LiveHtmlServer`, `SocketServer`, and `SecureSocketServer`. Handler names are checked in a `SocketRoute` configuration, including classes based on `BaseHandler` and contract handler factories. It does not evaluate arbitrary factory calls, CommonJS destructuring imports, custom boot wrappers, dynamic route additions, or application control flow.
|
|
89
|
+
|
|
90
|
+
Page assets are checked for registered pages using their decorator's source directory, the owning site's shared-CSS directory, or a statically known explicit `templateRoot`. Shared stylesheet names are deduplicated with site-root precedence, like the runtime. `__dirname` is interpreted as the source directory for this source-only check. Missing assets, directory paths, path traversal, and links escaping the effective root are reported. This does **not** verify compiled/deployed asset copies: keep the starter's build/network tests and production checks.
|
|
91
|
+
|
|
92
|
+
| Code | Meaning |
|
|
93
|
+
| --- | --- |
|
|
94
|
+
| `TYPESCRIPT_UNSUPPORTED` | Upgrade the project's compiler to TypeScript 5 or newer. |
|
|
95
|
+
| `SOURCE_SYNTAX`, `SOURCE_UNREADABLE` | A configured source could not be parsed or read. |
|
|
96
|
+
| `DUPLICATE_ROUTE`, `DUPLICATE_HANDLER` | A readable registration repeats a path or message type. |
|
|
97
|
+
| `ASSET_UNAVAILABLE`, `ASSET_NOT_FILE`, `ASSET_OUTSIDE_ROOT` | A declared asset cannot be loaded from its effective source root. |
|
|
98
|
+
| `SOURCE_UNRESOLVED` | Dynamic, mutated, escaped, or unsupported source cannot be determined safely. |
|
|
99
|
+
| `SOURCE_LIMIT` | Source count/size or expression expansion exceeded the inspection budget. |
|
|
100
|
+
| `ACTION_NOT_EXPOSED` | A literal binding has no matching public decorated instance method on its statically known owner. |
|
|
101
|
+
| `ACTION_REFERENCE_INVALID` | The literal action name is empty, reserved, missing, or longer than 128 characters. |
|
|
102
|
+
| `ACTION_REFERENCE_UNRESOLVED` | Action names, render output, method exposure, or component ownership cannot be established by the supported source checks. |
|
|
103
|
+
|
|
104
|
+
### Repair an action binding
|
|
105
|
+
|
|
106
|
+
If a button says `<button rw-click="saev">Save</button>` but the class exposes `@action() save()`, doctor reports `ACTION_NOT_EXPOSED` at the binding. Correct the name, run doctor again, then run `npm test`. Doctor never calls the action or executes the renderer to discover it.
|
|
107
|
+
|
|
108
|
+
Action inspection recognizes decorator aliases, literal names (including imported string constants), inherited methods and overrides, method/function-field renderers, conditional literal returns, and returned JSX/`html` constants. Literal HTML templates use the runtime's lexical tag scanner, ignoring comments and raw-text bodies. External templates are inspected for registered pages at their source asset root and have a separate 1 MiB limit. Page and component owners are checked separately.
|
|
109
|
+
|
|
110
|
+
This is deliberately not a JavaScript evaluator or a full template type checker. JSX spreads (including constant objects), custom JSX wrappers, explicit component-scope attributes, HTML entities in action names, interpolated/dynamic HTML, unavailable inherited implementations, custom decorators, and potentially replaced instance methods produce warnings where encountered. Arbitrary function calls, dependency renderers and all runtime-produced nested markup cannot be proved by source inspection. A warning is a request for application/browser verification, not a hidden success. Keep real tests for reusable helpers, scoped components and dynamic output even when doctor exits successfully.
|
|
111
|
+
|
|
112
|
+
`const` is not treated as proof that an array/object is immutable. Mutated aggregates, aliases that escape into unknown calls, runtime option spreads, custom class decorators, and constructor initialization that can overwrite names/paths produce warnings rather than guessed facts. A normal starter exposes runtime option overrides, so its `templateRoot` may correctly produce an unresolved warning. Green exit status means **no errors among the selected checks**, not that warnings were resolved or the application was proved correct.
|
|
113
|
+
|
|
114
|
+
Source selection is limited to 256 files and 8 MiB; expression reading is limited to 50,000 operations and 4,096 entries per expanded array. Cycles and repeated spreads cannot expand without limit. The doctor is a read-only diagnostic, not a sandbox for untrusted installed compiler code or a substitute for tests.
|
|
115
|
+
|
|
116
|
+
The remaining release work is tracked in [the release acceptance checklist](AGENT_READY_ACCEPTANCE.md).
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# Developing Redweb with redweb-client
|
|
2
|
+
|
|
3
|
+
The Live HTML implementation is maintained in published `redweb-client/live-html`
|
|
4
|
+
starting with client 0.2.0. This Redweb development branch requires `^0.2.0`;
|
|
5
|
+
normal application installation retrieves it automatically. The linking workflow
|
|
6
|
+
below is optional for contributors editing both repositories.
|
|
7
|
+
Redweb serves that module and emits only its import and `mountLivePage()` call.
|
|
8
|
+
DOM reconciliation, reactive updates, delegated actions, form feedback and page
|
|
9
|
+
disposal belong to the client. The root `redweb-client` entry remains socket-only.
|
|
10
|
+
|
|
11
|
+
## Link the sibling repositories
|
|
12
|
+
|
|
13
|
+
With `redweb` and `redweb-client` checked out beside each other:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
cd ../redweb-client
|
|
17
|
+
npm ci
|
|
18
|
+
npm run build
|
|
19
|
+
npm link --ignore-scripts
|
|
20
|
+
cd ../redweb
|
|
21
|
+
npm ci
|
|
22
|
+
npm link redweb-client --no-save --ignore-scripts
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Rebuild with `npm run build` in `redweb-client` after editing its source. Redweb's
|
|
26
|
+
link reads the resulting `dist` files directly; no repeated packing or dependency
|
|
27
|
+
installation is needed. The link is local development configuration, not a saved
|
|
28
|
+
dependency or a change to either lockfile. Running `npm ci` in Redweb replaces it
|
|
29
|
+
with the locked registry dependency; repeat the link command afterward.
|
|
30
|
+
|
|
31
|
+
The README and recipe setup use the published client without a separate checkout.
|
|
32
|
+
To check that printed setup and the optional contributor linking workflow independently,
|
|
33
|
+
set `REDWEB_CLIENT_CHECKOUT` to the absolute path of the matching client checkout
|
|
34
|
+
and run `npm run verify:client:link` from Redweb. It copies the client's build
|
|
35
|
+
inputs, uses an isolated npm global prefix, executes the documented initialization,
|
|
36
|
+
installation and linking commands, then runs the realtime starter's real HTTP,
|
|
37
|
+
WebSocket and process tests. No client override is installed. Resolution is checked
|
|
38
|
+
from the installed Redweb package, and all four rebuilt client bundles must match
|
|
39
|
+
the checkout's existing build. Developer inputs and the existing link are checked
|
|
40
|
+
afterward. The interactive `npm run dev` is covered by the separate watcher gate,
|
|
41
|
+
not this check. The first case verifies default registry setup; the second verifies
|
|
42
|
+
optional local development without changing the developer's existing link.
|
|
43
|
+
|
|
44
|
+
Verify the resolved entry from Redweb:
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
node -p "require.resolve('redweb-client/live-html')"
|
|
48
|
+
npm run verify:live-html:browser
|
|
49
|
+
npm run verify:browser:coverage
|
|
50
|
+
npm run verify:client:source-coverage
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The first browser gate checks real server-side counter/chat, dashboard, form and
|
|
54
|
+
rendering behavior. The coverage gate instruments every bundled Live HTML module
|
|
55
|
+
separately from the transport. Both use real HTTP/WebSockets and native browser
|
|
56
|
+
APIs. `npm run measure:browser:client` measures the transport separately; its
|
|
57
|
+
remaining native-browser coverage gaps are not waived by the rendering results.
|
|
58
|
+
Client unit tests include isolated transports and an explicitly simulated stale
|
|
59
|
+
timer callback; its integration tests use real connections and timers.
|
|
60
|
+
|
|
61
|
+
The source-coverage command instruments original client modules once and shares
|
|
62
|
+
their maps between Node and Chromium. It checks every test file reported exactly
|
|
63
|
+
once, compares plain/instrumented results, verifies unchanged inputs and saves
|
|
64
|
+
separate contributions. Plain browser candidates must equal the linked build.
|
|
65
|
+
Raw worker files are written directly to `coverage/client-source/<run-id>/workers/`
|
|
66
|
+
before parsing, so command, JSON and collection failures cannot discard them during
|
|
67
|
+
temporary-workspace cleanup. Terminal recording reuses the shared summary helper;
|
|
68
|
+
recording errors remain failures and preserve any retained-workspace location.
|
|
69
|
+
`npm run verify:client:coordinator:coverage` checks the private coordinator with
|
|
70
|
+
explicit boundary units and real preflight subprocesses. The full source command
|
|
71
|
+
also runs real Vitest failure fixtures before the unchanged complete client gate.
|
|
72
|
+
Those fixtures require the linked client's installed development dependencies;
|
|
73
|
+
the registry-only CI coordinator job does not claim to run them or the full client.
|
|
74
|
+
Coverage of generated recorder/configuration strings is not coverage of their
|
|
75
|
+
generated programs; the native fixtures and full gate execute those separately.
|
|
76
|
+
|
|
77
|
+
The combined gate now passes its unchanged 100% threshold: 791 statements, 521
|
|
78
|
+
branches, 125 functions and 659 lines. The redundant empty-entry queue branch was
|
|
79
|
+
removed because the private queue is dense and its length is checked immediately
|
|
80
|
+
before removal, without an intervening callback. A shared disposed-client guard
|
|
81
|
+
also fixes new sends/requests being accepted into an unusable queue after disposal.
|
|
82
|
+
Unit and real-socket regressions cover that failure, queued ordering, cancellation
|
|
83
|
+
before opening and no replay after reconnect. Verified client commit: `859487b`;
|
|
84
|
+
source/browser run: `cc9aead6-cfbb-44af-aba6-94124ab03419`.
|
|
85
|
+
|
|
86
|
+
This is distinct from the standalone client's Node-only V8 report, which still
|
|
87
|
+
fails its unchanged thresholds because it does not exercise the browser modules.
|
|
88
|
+
Neither denominator is substituted for the other. The canonical client `npm run check` validates
|
|
89
|
+
the matching link before building, runs build/types, then delegates to the full
|
|
90
|
+
combined original-source Node/browser gate. It requires this matching sibling
|
|
91
|
+
Redweb checkout and Chromium, and passes for the verified development pair.
|
|
92
|
+
The client's default `npm test` delegates to the same `npm run check` path; the
|
|
93
|
+
original Node-only V8 diagnostic remains available as `npm run test:v8`, with
|
|
94
|
+
unchanged thresholds and its known missing-browser coverage failure. This is an
|
|
95
|
+
explicit choice of the combined original-source gate, not a V8 coverage fix.
|
|
96
|
+
The preflight works without built client bundles, so a fresh linked checkout can
|
|
97
|
+
reach its first build. Wrong/missing checkouts fail instead of checking another
|
|
98
|
+
installed client. No duplicate browser harness or production dependency was added.
|
|
99
|
+
|
|
100
|
+
## Release boundary
|
|
101
|
+
|
|
102
|
+
For an isolated packed-pair check before publishing, explicitly select a client
|
|
103
|
+
tarball. This does not replace the development link or modify repository lockfiles.
|
|
104
|
+
For example, from Redweb in PowerShell (use a fresh output directory):
|
|
105
|
+
|
|
106
|
+
```powershell
|
|
107
|
+
npm --prefix ../redweb-client run build
|
|
108
|
+
New-Item -ItemType Directory -Path coverage/client-candidate
|
|
109
|
+
npm pack ../redweb-client --pack-destination coverage/client-candidate
|
|
110
|
+
$env:REDWEB_CLIENT_CANDIDATE = (Resolve-Path coverage/client-candidate/redweb-client-0.2.0.tgz).Path
|
|
111
|
+
npm run verify:live-html:package
|
|
112
|
+
Remove-Item Env:REDWEB_CLIENT_CANDIDATE
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Use the actual filename printed by `npm pack` if the client version changes.
|
|
116
|
+
The verifier installs both tarballs in a temporary consumer with an explicit local
|
|
117
|
+
override, checks npm integrity and every browser/CommonJS bundle, and resolves
|
|
118
|
+
the client from the installed Redweb package. It compares fingerprints before and
|
|
119
|
+
after testing. The shared browser phase exercises the server-driven
|
|
120
|
+
counter, two-user chat, escaping, draft preservation, reconnect and disconnect
|
|
121
|
+
presence. The broader package gate verifies generated consumers and source-free
|
|
122
|
+
production execution using the isolated runtime dependencies. Certificate checks
|
|
123
|
+
stay enabled; a machine needing its system trust store can use Node's
|
|
124
|
+
`--use-system-ca` option.
|
|
125
|
+
|
|
126
|
+
Both registry and candidate paths copy the unchanged browser acceptance/coverage drivers
|
|
127
|
+
and their required fixtures beside the extracted package. It never overwrites
|
|
128
|
+
packed application code. Four individually linked development tools support the
|
|
129
|
+
checks; client, WebSocket, Express and Zod resolution must stay inside the isolated
|
|
130
|
+
consumer. The full browser driver and plain/instrumented frontend and refresh
|
|
131
|
+
checks run through bounded child processes. Their temporary profiles stay inside
|
|
132
|
+
the owning workspace, and reports survive under `coverage/packed-browser/<id>`.
|
|
133
|
+
Original package files, copied test bytes and client fingerprints are checked even
|
|
134
|
+
on failure. The runtime coverage report must identify the selected client bundle.
|
|
135
|
+
This is installed-runtime testing with external test tools, not a production-only
|
|
136
|
+
installation or full original-client-source coverage. The frozen browser driver
|
|
137
|
+
does not itself prove that every individual shutdown error is propagated.
|
|
138
|
+
|
|
139
|
+
Without `REDWEB_CLIENT_CANDIDATE`, the command keeps the ordinary registry path;
|
|
140
|
+
it does not use or infer the local npm link. The installed version, registry URL
|
|
141
|
+
and integrity must match Redweb's lockfile. Both paths compare the installed
|
|
142
|
+
bundles with the source-tested local build and run the same browser checks.
|
|
143
|
+
A candidate pass is not a registry release pass. `npm run verify:package:tools` includes the fingerprint/containment
|
|
144
|
+
unit regressions; its scoped coverage is not coverage of every browser driver.
|
|
145
|
+
|
|
146
|
+
Published `redweb-client@0.2.0` supplies both required entry points; version 0.1.0
|
|
147
|
+
does not. The 0.2.0 archive's runtime bundles match the previously source-tested
|
|
148
|
+
build, and the clean registry-installed package gate passes without an override.
|
|
149
|
+
The developer link can remain in place because registry checks own independent
|
|
150
|
+
temporary consumers. Latest-head CI, the documented release gates and Redweb's own
|
|
151
|
+
versioned release still remain required; this is not approval to merge or publish.
|
|
152
|
+
No publishing or deployment is part of this local workflow.
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
# Client lifecycle and installed-pair verification
|
|
2
|
+
|
|
3
|
+
This release-polish increment fixes a demonstrated lifecycle bug and closes the
|
|
4
|
+
remaining combined original-client-source branch gap. It does not resume the
|
|
5
|
+
[deferred runtime investigation](RECOVERY_FOLLOWUP_SPIKE.md) or waive any release gate.
|
|
6
|
+
|
|
7
|
+
## Published client integration: current checkpoint
|
|
8
|
+
|
|
9
|
+
The maintainer published `redweb-client@0.2.0`. Its actual registry archive now
|
|
10
|
+
contains both root and `./live-html` exports with ESM, CommonJS and declarations.
|
|
11
|
+
Redweb commit `f3c91e9` selects `^0.2.0` and locks the published archive. This
|
|
12
|
+
supersedes the historical client-publication blockers recorded below; Redweb's
|
|
13
|
+
new implementation itself is still unreleased.
|
|
14
|
+
|
|
15
|
+
- Registry archive: `https://registry.npmjs.org/redweb-client/-/redweb-client-0.2.0.tgz`.
|
|
16
|
+
- Archive SHA-256: `89cc32946cb787aa921b5f383c91201890208d9099da741f0d2571b927b9fa95`.
|
|
17
|
+
- Integrity: `sha512-0bC8j/wJ2WXGuYom5ewijM+sgzRdD5bccnQaQVWqNQBWOkeHH4oXBQTW+3YY2LpnBPT0Hlcxj/OHLCXzD/cZ9Q==`.
|
|
18
|
+
- All four published runtime bundles exactly match the locally tested client build.
|
|
19
|
+
|
|
20
|
+
The complete default package gate passed without a client override or local link
|
|
21
|
+
in its isolated consumer. Registry and candidate modes now share installed-client
|
|
22
|
+
containment/export/hash verification and the full existing browser harness. The
|
|
23
|
+
registry mode additionally checks the version, URL and integrity against Redweb's
|
|
24
|
+
lockfile. Developer links and the client's user-edited version manifest were preserved.
|
|
25
|
+
|
|
26
|
+
- Packed Redweb SHA-256: `e773a5270bf66719cb0c83f499301d5a6a19fda2b9a8e24b673519dc7ac8af8a`.
|
|
27
|
+
- Report: `coverage/packed-browser/3b890ae9-2b40-4bfd-8df1-f58c0fb9eb65/report.json`,
|
|
28
|
+
SHA-256 `cb8055893ed906b4d6739a54913bc25e45063040924d5136099c2265eba4ff19`.
|
|
29
|
+
- `candidateOnly` is false; 190 original package files, 23 harness files and four
|
|
30
|
+
explicitly external development tools passed identity checks.
|
|
31
|
+
- Actual counter/chat, reconnect/disconnect, full browser acceptance, all six
|
|
32
|
+
starters, executable recipes and source-free consumer execution passed.
|
|
33
|
+
- Runtime run `46c7aa29-bd08-4aac-aee1-13e1acc01843`: all-four 100% over
|
|
34
|
+
426 statements, 262 branches, 64 functions and 351 lines.
|
|
35
|
+
- Refresh run `6a1a3e5c-707f-428e-a454-f4fd15141cd9`: all-four 100% over
|
|
36
|
+
82 statements, 44 branches, 12 functions and 71 lines, including real bfcache restoration.
|
|
37
|
+
- Eleven filesystem unit tests cover both client verification helpers at all-four
|
|
38
|
+
100%; `coverage/registry-client-helper/coverage-final.json` SHA-256
|
|
39
|
+
`c40ccac1581f7fef467b9b0af6ae9792743baccc243505b4abc9a3be510ce363`.
|
|
40
|
+
|
|
41
|
+
After that archive was verified, the unreleased quickstart was simplified to
|
|
42
|
+
install the matching Redweb tarball and obtain its published client automatically.
|
|
43
|
+
The printed commands passed a separate clean-install integration test, with no
|
|
44
|
+
client checkout, override or symlink. The optional contributor workflow also passed
|
|
45
|
+
actual isolated `npm ci`, build and `npm link`, preserving developer inputs. Both
|
|
46
|
+
generated realtime applications passed their 14 HTTP/WebSocket/process tests;
|
|
47
|
+
the two workflow tests passed in 47.631 seconds. The interactive development
|
|
48
|
+
watcher is intentionally covered by its separate lifecycle gate, not these tests.
|
|
49
|
+
Four documentation unit tests passed with all-four 100% coverage of
|
|
50
|
+
`Documentation.js`; report `coverage/registry-setup-docs/coverage-final.json`
|
|
51
|
+
SHA-256 `6172507dae191592c5b9002f0d69848150e3be6317ad2a9d3d8b98a57c884345`.
|
|
52
|
+
Generation freshness and all three TypeScript configurations passed. These later
|
|
53
|
+
quickstart/prose changes are not claimed to be inside the earlier full-gate archive.
|
|
54
|
+
|
|
55
|
+
The final scoped package-tool regression passed 76 tests in nine suites (201.158
|
|
56
|
+
seconds), with all-four 100% coverage across its nine helpers, including the new
|
|
57
|
+
shared installed-client verifier. Report: `coverage/package-tools/coverage-final.json`,
|
|
58
|
+
SHA-256 `6dd5988e3f00ada240a7ba590c41dfa2159845e198ec00f043616688650cab5f`.
|
|
59
|
+
The senior critic approved the implementation and evidence after stale coverage
|
|
60
|
+
and blanket mock-free claims were corrected. Integration remains mock-free;
|
|
61
|
+
the dashboard cleanup fault injection is explicitly identified as a unit test.
|
|
62
|
+
|
|
63
|
+
The environment remains Windows, Node 22.21.0 and Chromium 152.0.7977.64.
|
|
64
|
+
Latest-head CI, website alignment, Redweb publication and the bounded Ubuntu
|
|
65
|
+
recovery decision remain open. No failed recovery threshold was waived.
|
|
66
|
+
|
|
67
|
+
## Runtime change
|
|
68
|
+
|
|
69
|
+
A disposed `RedwebClient` with outbound queue capacity previously accepted new
|
|
70
|
+
`sendRaw`, `send` and `request` work, despite never being able to connect again.
|
|
71
|
+
Unit and real-WebSocket regression tests failed before the fix. One guard in the
|
|
72
|
+
shared transmit path now rejects all three paths, including cleanup of a rejected
|
|
73
|
+
request's pending state. The tests pass after the fix.
|
|
74
|
+
|
|
75
|
+
The private outbound queue is dense and synchronously length-checked before
|
|
76
|
+
`shift()`. Removing an impossible undefined-entry branch simplifies that invariant;
|
|
77
|
+
it does not alter supported transport behavior. Real-network tests verify queued
|
|
78
|
+
FIFO delivery, aborted requests being removed before connection, and no replay
|
|
79
|
+
of sent messages after reconnect. No browser or transport API is replaced in
|
|
80
|
+
these integration tests.
|
|
81
|
+
|
|
82
|
+
The senior critic approved the implementation and regression coverage after an
|
|
83
|
+
unobserved pending-request rejection in a test's failure path was corrected.
|
|
84
|
+
Client implementation commit: `859487b` on `codex/client-lifecycle`.
|
|
85
|
+
|
|
86
|
+
## Combined original-source verification
|
|
87
|
+
|
|
88
|
+
Build and type checks pass. All 77 client tests in five files pass in both plain
|
|
89
|
+
and instrumented execution. Sixteen collector/reporting unit and real-process
|
|
90
|
+
tests pass with all-four 100% coverage over the two collection helpers.
|
|
91
|
+
|
|
92
|
+
The combined gate instruments the same original client TS/JS maps across Node
|
|
93
|
+
and native Chromium. It covers 791/791 statements, 521/521 branches, 125/125
|
|
94
|
+
functions and 659/659 lines. No threshold, source exclusion or coverage-ignore
|
|
95
|
+
directive was added. Static export linkage and erased declarations remain
|
|
96
|
+
structurally verified outside executable coverage, as before.
|
|
97
|
+
|
|
98
|
+
Browser tests run plain and instrumented feedback/runtime/ownership/morph cases
|
|
99
|
+
(18/13/7/46 assertions), plus client protocol/network cases (58/43 assertions).
|
|
100
|
+
Actual Redweb HTTP/WebSocket actions and native keyboard/pointer selection pass.
|
|
101
|
+
Both plain built bundles match the linked production build; input hashes are
|
|
102
|
+
checked before and after execution.
|
|
103
|
+
|
|
104
|
+
- Environment: Windows, Node 22.21.0, Chromium 152.0.7977.64, TypeScript 5.9.3,
|
|
105
|
+
Istanbul instrumenter 6.0.2, esbuild 0.28.2.
|
|
106
|
+
- Final run: `cc9aead6-cfbb-44af-aba6-94124ab03419`,
|
|
107
|
+
`2026-08-30T22:24:53.089Z`–`2026-08-30T22:25:05.008Z`.
|
|
108
|
+
- Summary: `coverage/client-source/cc9aead6-cfbb-44af-aba6-94124ab03419/summary.json`,
|
|
109
|
+
SHA-256 `395eb78997106e81d5d1370b0d977add9ae0f23c3ff687d07998df93f9db94c8`.
|
|
110
|
+
- Coverage: same directory's `coverage.json`,
|
|
111
|
+
SHA-256 `8673e236f675d741cb0f55d4f4bf630f2e2a50c2f2f76f856622558491ac8009`.
|
|
112
|
+
|
|
113
|
+
This is tracked original-source coverage, not exhaustive optional-chain or
|
|
114
|
+
compiler-generated V8 branch coverage. At the start of this increment, the client's
|
|
115
|
+
`npm run check` failed because it used only the Node-only V8 command, which does
|
|
116
|
+
not exercise browser modules. That underlying command is now `npm run test:v8` with
|
|
117
|
+
unchanged thresholds and an unresolved result; the comprehensive command update
|
|
118
|
+
below does not reclassify the earlier failure as a pass.
|
|
119
|
+
|
|
120
|
+
## Matching installed artifacts
|
|
121
|
+
|
|
122
|
+
The full candidate package verifier exited normally with a passed result. It
|
|
123
|
+
installed the fixed client tarball alongside the Redweb tarball in a temporary
|
|
124
|
+
consumer, without changing the developer link or repository lockfiles. It passed
|
|
125
|
+
counter/chat rendering, reconnect and disconnect presence, the unchanged full
|
|
126
|
+
browser acceptance, rendering/refresh coverage, all six starters, executable
|
|
127
|
+
documentation and source-free production execution, additions and consumer checks.
|
|
128
|
+
|
|
129
|
+
- Redweb at `3b247bc` before these evidence-prose updates: archive SHA-256
|
|
130
|
+
`6dfc9984245567248adbf8e1538f55d3725039cd3a0a6df6bf93726d5e589965`.
|
|
131
|
+
- Fixed client archive: `coverage/client-polish-20260830T2225/redweb-client-0.1.0.tgz`,
|
|
132
|
+
SHA-256 `464e70bcb326c8d108d81d13d979e00700ae1ad093d2825fc35acf2e6e661875`.
|
|
133
|
+
- Packed browser evidence: `coverage/packed-browser/64d840c3-fd42-41ad-8e38-87b4e4bb7d19/report.json`,
|
|
134
|
+
SHA-256 `4384b90fc7d8a509e33db3ce2694f7c1f3b53b3ed662b7c97761d2a765b4de64`.
|
|
135
|
+
- All 189 original package files and 23 copied harness files passed identity/ownership
|
|
136
|
+
checks. The four external development tools remain explicitly disclosed.
|
|
137
|
+
- Packed runtime run `b73299ce-521b-4a46-baa7-9da0ea6d87f3` and refresh run
|
|
138
|
+
`28d1d1ff-942e-4929-a92e-546a9f6c8d35` passed all-four 100% coverage for their
|
|
139
|
+
respective scopes. Runtime measured 426 statements, 262 branches, 64 functions
|
|
140
|
+
and 351 lines; refresh measured 82/44/12/71 respectively, including observed
|
|
141
|
+
back-forward-cache restoration.
|
|
142
|
+
|
|
143
|
+
The source, linked build and installed candidate agree on the Live HTML bundle
|
|
144
|
+
SHA-256 `26cae5402947d27d405cecaf2cafc0638cb0030663a7068bb487d99106aa64f5`.
|
|
145
|
+
The critic independently checked source reports, installed browser evidence and
|
|
146
|
+
all four bundle hashes. Production dependency audit reported zero vulnerabilities
|
|
147
|
+
using the system trust store without disabling certificate verification.
|
|
148
|
+
|
|
149
|
+
This is a local candidate pair, not the published registry pair. The local client
|
|
150
|
+
still identifies itself as 0.1.0 while that published version lacks the new export;
|
|
151
|
+
it needs an appropriate version and publication before Redweb's saved dependency
|
|
152
|
+
can select it. No npm publication, deployment, merge, CI/recovery-policy change or
|
|
153
|
+
claim that remaining release requirements are complete is made here.
|
|
154
|
+
|
|
155
|
+
## Full Redweb regression
|
|
156
|
+
|
|
157
|
+
With the fixed client linked, 853 tests in 82 suites passed in 424.323 seconds,
|
|
158
|
+
with a normal exit and all pretest/generated-documentation/type checks. The owned
|
|
159
|
+
HTTP/WebSocket shutdown cases passed; their historical timeout remains unexplained.
|
|
160
|
+
Instrumented-library coverage is 100% over 5,445 statements, 4,044 branches,
|
|
161
|
+
978 functions and 4,464 lines. No runtime or test inputs changed during this run.
|
|
162
|
+
|
|
163
|
+
Report: `coverage/client-polish-full-suite.json`; SHA-256
|
|
164
|
+
`bb3c58eadef1aece8c7e761713e6e3da44ad536981e181b4c1d9ddc04d70b004`.
|
|
165
|
+
|
|
166
|
+
## Canonical client check
|
|
167
|
+
|
|
168
|
+
Client `ee74017` and Redweb `45a34d5` make `npm run check` use the complete
|
|
169
|
+
original-source Node/browser gate rather than only running Node tests over browser
|
|
170
|
+
code. At that increment, the separate `npm test` V8 command and thresholds remained
|
|
171
|
+
unchanged; the later default-command increment below names it `npm run test:v8`.
|
|
172
|
+
Its failure is still recorded, not presented as fixed.
|
|
173
|
+
|
|
174
|
+
Before building, `check:link` compares the expected client's canonical path with
|
|
175
|
+
the package installed into Redweb. It resolves the package/junction independently
|
|
176
|
+
of `dist`, allowing an unbuilt linked checkout to pass preflight. Full verification
|
|
177
|
+
still requires normal built-export resolution to match that checkout. Missing or
|
|
178
|
+
wrong linkage fails without fallback. `test:source` rechecks the expected path and
|
|
179
|
+
delegates directly to the existing runner; no browser harness is duplicated.
|
|
180
|
+
|
|
181
|
+
Twenty-one focused unit and actual-process tests pass, including a linked fixture
|
|
182
|
+
whose normal export cannot yet resolve but whose preflight succeeds without
|
|
183
|
+
building or creating reports. The two collector/reporting helpers remain all-four
|
|
184
|
+
100% covered. The critic approved after catching and correcting that first-build
|
|
185
|
+
problem. Native `npm run check` then passed build/types, all 77 client tests in
|
|
186
|
+
both modes, native Chromium checks and the same 791/521/125/659 covered counters.
|
|
187
|
+
|
|
188
|
+
- Final canonical-check source run: `6ae0027f-b078-43ee-8069-be386a984007`,
|
|
189
|
+
`2026-08-30T22:42:44.784Z`–`2026-08-30T22:42:56.970Z`.
|
|
190
|
+
- Summary: `coverage/client-source/6ae0027f-b078-43ee-8069-be386a984007/summary.json`,
|
|
191
|
+
SHA-256 `694dadb8082a1430b08c4829e4560d3dc131d324d58bc41ddd9c6ceae27bd4df`.
|
|
192
|
+
- Coverage JSON SHA-256 remains
|
|
193
|
+
`8673e236f675d741cb0f55d4f4bf630f2e2a50c2f2f76f856622558491ac8009`.
|
|
194
|
+
- Helper coverage: `coverage/client-check-preflight/coverage-final.json`,
|
|
195
|
+
SHA-256 `7305ad80c8bb09e5dc1d6715889fcfb6fca2836620329da9bf75854bb056b4a2`.
|
|
196
|
+
|
|
197
|
+
The earlier full regression and packed archives precede these command/preflight
|
|
198
|
+
and README changes; their production source and all four client bundles remain
|
|
199
|
+
unchanged. These later changes are verified by the focused real-process checks
|
|
200
|
+
and the actual canonical command, not claimed as another full package run.
|
|
201
|
+
|
|
202
|
+
After the final evidence update, generated-documentation and all type/pretest
|
|
203
|
+
checks passed, along with 25 focused documentation/preflight/report tests and two
|
|
204
|
+
real generator/release-immutability cases. The critic independently rechecked the
|
|
205
|
+
final source report hashes and unchanged client bundles. Both development links
|
|
206
|
+
and dependency lockfiles remain unchanged.
|
|
207
|
+
|
|
208
|
+
## Default test command
|
|
209
|
+
|
|
210
|
+
The client now delegates `npm test` to that same complete `npm run check` path.
|
|
211
|
+
The original `vitest run --coverage` command is preserved as `npm run test:v8`;
|
|
212
|
+
its thresholds and known Node-only missing-browser failure are unchanged. This
|
|
213
|
+
chooses the documented combined original-source denominator for the default
|
|
214
|
+
command; it does not retroactively fix the V8 diagnostic. No runtime, tests or
|
|
215
|
+
coverage instrumentation changed. The client README now reflects the current
|
|
216
|
+
77-test inventory and passing original-source metrics instead of stale failures.
|
|
217
|
+
|
|
218
|
+
Actual `npm test` passed linkage preflight, build, types, 77 tests in each mode,
|
|
219
|
+
native Chromium acceptance and all 791/521/125/659 authored counters. The run
|
|
220
|
+
completed normally at `2026-08-30T22:56:53.072Z`, on Windows/Node 22.21.0 and
|
|
221
|
+
Chrome 152.0.7977.64. Evidence:
|
|
222
|
+
|
|
223
|
+
- `coverage/client-source/a7c2bcd8-bc07-4496-b8a1-571e40d68288/summary.json`,
|
|
224
|
+
SHA-256 `f5770e60d8c011da0874ba2094dbe07904a3f6fdaed7a772f6dbd053b60f3e8b`.
|
|
225
|
+
- Coverage JSON SHA-256 remains
|
|
226
|
+
`8673e236f675d741cb0f55d4f4bf630f2e2a50c2f2f76f856622558491ac8009`.
|
|
227
|
+
|
|
228
|
+
The senior critic approved the nonrecursive delegation and explicit denominator
|
|
229
|
+
boundary. Final README wording was corrected after this run; production source,
|
|
230
|
+
test/configuration inputs and built bundles did not change. Matching registry
|
|
231
|
+
publication, latest-head CI and remaining release gates are still outstanding.
|
|
232
|
+
|
|
233
|
+
The subsequent full linked Redweb regression passed 858 tests across 83 suites
|
|
234
|
+
in 421.094 seconds, with all 5,445 statements, 4,044 branches, 978 functions and
|
|
235
|
+
4,464 library lines covered. No runtime/test inputs changed during that run.
|
|
236
|
+
Report: `coverage/polish-final-core-suite.json`, SHA-256
|
|
237
|
+
`73e41db9f26285b13aa293e168be8b8a012d0824403d31b750ae8020772721aa`.
|
|
238
|
+
The README and guide's stale current coverage/command claims were corrected
|
|
239
|
+
afterward; the type/generated-documentation preflight was rerun for that prose
|
|
240
|
+
increment. Production dependency audit reported zero vulnerabilities with system
|
|
241
|
+
certificate trust enabled, without disabling TLS verification.
|
|
242
|
+
|
|
243
|
+
## Current package and performance checkpoint
|
|
244
|
+
|
|
245
|
+
Redweb `28f9c62` and client `a8b6a9f` passed the complete isolated candidate
|
|
246
|
+
package gate on Windows/Node 22.21.0/Chrome 152.0.7977.64. This includes the
|
|
247
|
+
server-driven counter, two-user chat, disconnect/reconnect presence, dashboard,
|
|
248
|
+
full browser acceptance, runtime/refresh coverage, generated applications,
|
|
249
|
+
executable documentation and source-free consumers. The process exited normally
|
|
250
|
+
and completed owned-workspace cleanup. Nothing was published or deployed.
|
|
251
|
+
|
|
252
|
+
- Redweb archive SHA-256:
|
|
253
|
+
`f2a8649dfcf83f6fba6351a4bfdf39bb50d85ffde59e09d2b2e62c9b4fd10511`.
|
|
254
|
+
- Client archive: `coverage/client-default-20260830-2259/redweb-client-0.1.0.tgz`,
|
|
255
|
+
SHA-256 `86ad220edad8a00010659c1c89028de937ea84dfe35b13ac747cac39bf10a440`.
|
|
256
|
+
- Packed browser report:
|
|
257
|
+
`coverage/packed-browser/9caf08f4-7cc6-4d7b-9ca5-e15b4a229edc/report.json`,
|
|
258
|
+
SHA-256 `9de780f16203fcde0d1cb3f22fab540978a0a7af64cf6a6b383bc18c842e0857`.
|
|
259
|
+
It verifies 190 original package files, 23 unchanged harness files and four
|
|
260
|
+
explicit external development tools. All four client bundles match the built
|
|
261
|
+
source-verification inputs. Runtime and refresh coverage each remain all-four
|
|
262
|
+
100%; the refresh check observed actual back/forward-cache restoration.
|
|
263
|
+
|
|
264
|
+
After the package process terminated, the following gates ran sequentially with
|
|
265
|
+
their default workloads and limits, without diagnostic or coverage overrides.
|
|
266
|
+
Every command exited successfully on its first run in this checkpoint:
|
|
267
|
+
|
|
268
|
+
| Gate | Observed result |
|
|
269
|
+
| --- | --- |
|
|
270
|
+
| `verify:load` | 32 clients, 3,200 messages, 5,789 messages/second, 6.97 ms p99; slow consumer contained |
|
|
271
|
+
| `verify:memory` | 500 connections, three trials; 1,880.704 bytes/connection incremental metadata against 2,048 maximum |
|
|
272
|
+
| `verify:live-html:load` | 200 expired renders, 110 live clients; 8,052,960-byte heap delta |
|
|
273
|
+
| `verify:jsx:performance` | 10,000 component rows in 49.7 ms; 1.3 MiB retained |
|
|
274
|
+
|
|
275
|
+
These are bounded Windows checkpoint results, not a recovery, extended-soak,
|
|
276
|
+
cross-runtime or registry-release certificate. The existing Ubuntu/Node 22.23.2
|
|
277
|
+
recovery failure remains unresolved, and the predeclared comparison has not run.
|
|
278
|
+
The local Docker Linux engine is unavailable and WSL lists no Ubuntu environment;
|
|
279
|
+
no alternative platform was substituted. Publication of a newly versioned client,
|
|
280
|
+
Redweb dependency/lockfile integration, final-head CI, website alignment and the
|
|
281
|
+
explicit recovery decision remain open. This evidence-only section was added
|
|
282
|
+
after packing and does not claim its own text was in the tested archive.
|