LuxelEspañol

Luxel v0.2 · Project

Changelog

All notable changes to the published packages (@luxel-framework/* and create-luxel). The format follows Keep a Changelog (https://keepachangelog.com/en/1.1.0/), and the packages follow semantic versioning (in 0.x, a minor version may break). The protocol (VSA), the runtime and the manifest have separate versions. Security fixes are also recorded in docs/security/CHANGELOG.md.

[Unreleased]

[0.2.0-alpha.1] - unreleased

An alpha, published under the npm dist-tag alpha; latest stays 0.1.0-beta.2. Install it with npm create luxel@alpha. No external security review, not "production ready", no WCAG or OWASP conformance claimed; the authoring API (ADR-061) is still a draft. Upgrade guide: Upgrading to 0.2.0-alpha.1. Release notes: docs/release/notes-0.2.0-alpha.1.md.

Added

  • Identity from a trusted gateway, identity.mode: "gateway-jwt" (ADR-065), stage S1-A: complete responses with the bundled memory or PostgreSQL session store. Confirm, and the check after it, run before any byte of the response; a failed, timed-out or ambiguous confirm is a 401 or 503 with no cookie, and the session is closed with bounded retries. A HEAD request never opens a session. Guide: docs/guide/behind-a-gateway.md.
  • Logout under gateway-jwt: the logout clears the cookie; closing the prior session is bounded, and an outage after an unacknowledged close counts as a failed close.
  • Support-matrix refusals at start (docs/guide/support-matrix.md): LUXEL-M001 (gateway identity with streamed pages, stage S1-B) and LUXEL-M002 (gateway identity with a delegated or third-party session store, stage S1-C). Exported as SUPPORT_MATRIX_CODES from @luxel-framework/check.
  • New environment variables for gateway-jwt: LUXEL_OPEN_DELIVERY_MS, LUXEL_OPEN_CLOCK_MARGIN_MS, LUXEL_OPEN_CONFIRM_MS.
  • E4 (clock margin): SessionStore.now(), an optional reference clock (the PostgreSQL store reads the database's clock; a delegated store offers its backend's when the delegate has now). luxel-host compares its clock with it at start, as an interval as wide as the call's round trip (monotonic; a host clock step during the call widens it): readiness holds only once the whole interval is within LUXEL_OPEN_CLOCK_MARGIN_MS (default 5 s). Wholly beyond it logs luxel.clock.skew (LUXEL-C001) and /healthz answers 503 clock-skew; a reference clock that fails, does not answer within 3 s or answers no time, or an interval that straddles the margin, logs luxel.clock.unmeasured (LUXEL-C002), /healthz answers 503 clock-unmeasured, and the measurement is retried until it decides. The clock-margin assumption is documented in docs/guide/production.md. No runtime module changes.
  • Sprint 12.6 E5 (item 19): identity.signOutPath (gateway-jwt only). A ‹Logout> form ends the Luxel session, then answers 303 to the gateway's own sign-out path (Envoy Gateway's logoutPath, oauth2-proxy's /oauth2/sign_out, Cloudflare Access's /cdn-cgi/access/logout) instead of its public view. One plain absolute path of this origin; the build and luxel-host refuse any other value (isGatewaySignOutPath, @luxel-framework/check; gatewaySignOut in createGateway). No runtime module change. E5 review round 2 fix: a sign-out form with identity headers (X-Actor, X-User-*) and no verified token is refused (401) instead of being redirected to the gateway's sign-out path; a clearing cookie the request earned stays on the refusal.
  • Sprint 12.6, E7 (items 5 and 22): measurements in docs/perf/, with their scripts and a first run. They cover the heap per request with and without A4's second copy of a load answer, and the p50/p95 latency that confirm adds to the first request of a session under gateway-jwt. No package changes.

Changed

  • Breaking for log consumers: allowlist logging (owner decisions (a) and (1) of 2026-12-05). Framework sinks write only a fixed event name from a closed set and framework-chosen field names, with numbers, booleans, framework enums, coded errors (LUXEL-xxxx or a fixed error class), the matched route template (or unmatched), the method, status, durations, sizes, counts and a random request id. Never raw paths or query strings, exception messages or stacks, app-supplied keys. No verbose mode. Error envelopes refuse protected values: envelopes are built from a checked record (code from the wire grammar, one of the four recoveries, bounded integers, copied string arguments), and a refusal holding a session id, its store key, the bearer JWT, the session cookie value or a credential-shaped run (any run of 43 or more base64url characters included) becomes a generic 500 (the framework's clearing cookie is kept). luxel dev, luxel-host and luxel-host --check print start failures by code and reference (startFailure, new export of @luxel-framework/gateway); luxel dev prints build diagnostics by code, severity and count; the LUXEL-M002 refusal names no store kind supplied by an adapter.
  • Version of the ten published packages (@luxel-framework/* and create-luxel): 0.2.0-alpha.1.
  • Breaking: LUXEL_TRUST_PROXY is now the list of trusted proxies, addresses or CIDRs separated by commas (10.0.4.17, 10.0.4.0/24,2001:db8::/48), and the default trusts nothing (Sprint 12.6, E1). Only a request from a listed peer has its X-Forwarded-For read: from the right, past the listed hops, to the first address that is not one. A forged X-Forwarded-For from any other peer no longer changes the address the rate limits (A8) key on. There is no trust-all value: 1, a CIDR wider than /8 (IPv4) or /16 (IPv6), entries that together cover more than a /6 (IPv4) or /14 (IPv6) or a malformed list refuses to start; replace LUXEL_TRUST_PROXY=1 with your proxy's address. clientAddress(req, trusted?) takes the list as its second argument instead of a boolean. Envoy setup: Behind a gateway. E1 review fix: every spelling of an IPv4-mapped IPv6 address (dotted ::ffff:1.2.3.4, hexadecimal ::ffff:102:304, expanded, any case) is normalized once to its IPv4 address, which both the trusted-hop match and the rate-limit buckets (A8, S1) use: two IPv4 clients written in hexadecimal no longer share one bucket, and one client no longer gets a second budget by changing spelling. clientAddress returns the normalized address.

Fixed

  • E6 (GAPS: the confirmed orphan session): under identity.mode: "gateway-jwt", a session the store confirmed whose request was refused before the check after the confirmation (its id was delivered to nobody) no longer stays until its ordinary expiry (8 hours when signed in). The memory and PostgreSQL session stores mark a session opened with a delivery deadline until it is read after its confirmation, and their expiry sweep deletes one still marked unusedMs (new store option, 30 minutes by default) after that deadline. luxel-host reads every session it delivers that way before the head that carries its cookie, so a delivered session is never swept. In the PostgreSQL store the read that clears the mark is one conditional UPDATE ... RETURNING, atomic with the sweep. It adds an unused_until column in place; rows written before it carry no mark and end at their ordinary expiry. E4 x E6 review fix: two hosts each within the clock margin of the database may differ by twice it, so the PostgreSQL store keeps the unused mark of a session opened under gateway-jwt 2 x LUXEL_OPEN_CLOCK_MARGIN_MS longer (new open option clockMarginMs, which luxel-host gives): a faster host's purgeExpired no longer deletes a session a slower host has confirmed and is still delivering (its sign-in was refused). An orphan lives that much longer. E4 x E6 review round 2 fix: the session's delivery deadline is one cutoff for the response gate and the sweep. The gate delivers a session only if the confirmation's answer and its final read are both back before that deadline (the opening host's clock); a later reply is the generic 503 and the session is ended, whether or not a faster host swept it meanwhile. Before, a confirmation answered late was still read and served when no sweep had run. E6 review round 2 fix (luxel dev): when the memory store's sweep cannot remove an orphan's session file, the unused mark is kept and the next sweep retries the removal (before, the file came back without its mark and the orphan stayed until its ordinary expiry). Also under luxel dev: a provisional session is no longer dropped by the store's look at its session files before it is confirmed (it has no file until then), so it can be confirmed.
  • Gateway identity (S1-A follow-up): a session close's logout retry no longer starts after the close's deadline when its backoff wait wakes late (event-loop delay); the close goes on to the abandon and fails closed. The PostgreSQL store's comment on revocationEpoch now says its read waits for a revocation in progress.

Known gaps

  • Allowlist logging, known gaps (owner decision 2026-12-05c; gaps 1 and 2 must close before 0.2.0-beta.1):
  • A start-up failure (HostStartError) still embeds the configuration diagnostic it came from (invalid configuration: …), which can quote a configured value. Operator-facing, once, at start.
  • A refusal message written by an app or adapter that quotes another request's custom session id is not detected when that id is short and not credential-shaped. Only custom session ids are affected; the bundled stores issue 43-character ids, which are always protected.
  • The luxel.start line keeps the view key ids (viewKeys), which a frozen harness assertion needs.
  • Cover review of the allowlist, open (not blockers; GAPS.md): a listen failure (port in use) and a timing collector that throws from dump() can still print a raw Node exception and stack to stderr; a request cookie whose value contains a word of a fixed refusal text turns that framework refusal (429, 413) into a generic 500 and drops its Retry-After / Connection: close; luxel-host --check prints module names and log records carry an ISO timestamp and a build-digest prefix; the canary sweep does not drive the luxel dev rebuild failure, the dev session-file warning or the sweeper.
  • Review round 3 of the easy items, open (not blockers; GAPS.md): with PostgreSQL, the response gate checks the delivery cutoff only after the final read returns, so a stalled final read can hold the response past the cutoff without the 503 and the bounded undo; a host whose clock runs ahead (within the margin) can sweep a provisional row before the opener confirms it (a refused sign-in, fails closed). Both must close before 0.2.0-beta.1. Also: under luxel dev a failed unlink after abandon() can lose the unused marker; the E7 measurements are exploratory (one or two runs per series; the 20-run criterion is unverified).
  • Redaction scope (a): text an app or adapter deliberately puts in its own refusal messages is outside the guarantee, except that a refusal quoting a protected value (a session id, its store key, the bearer JWT, the session cookie value) must not reach the client or a log.
  • Not in this release: E3; A4 (host-side enforcement of load and event policies; its pieces M1, M3 and M5 were not accepted, M5 has no review verdict). E2, E8 and E9 were reclassified out of this release.
  • A5, request bodies over the limit: not fixed. An early host refusal can leave an unread event body on a kept-alive connection.
  • D5 / D6 and the exposure-policy gaps (S12.3-D5-1 to D5-9): deferred. Do not rely on luxel check alone to prove that a build's public output holds no secret.
  • Confirmed orphan session (now swept by E6 when it was never read; see GAPS.md for the cases that still end at expiry) and refusal delay under a failing store (GAPS.md, ADR-065 §13 and §24). With PostgreSQL, the scheduled purgeExpired() must run on a host whose clock is within LUXEL_OPEN_CLOCK_MARGIN_MS, and every host needs the same margin (documented, not enforced).
  • Gateways named in the guide (Envoy, oauth2-proxy, Cloudflare Access) were tested only with a Node stand-in, a hand-written Envoy bootstrap and Keycloak.

[0.1.0-beta.2] - 2026-12-03

No package behaviour changes in this release: only the version. The published packages are the same code as 0.1.0-beta.1; the runtime module files are byte-identical (same names and hashes), and the runtime manifest differs only in its protocol field (the version). The fixes below are in the repository's tests, comparison lab, CI and texts, not in any package. Still a beta: no external security review; not "production ready"; no WCAG or OWASP conformance is claimed; the authoring API (ADR-061) is a draft. Install it with npm create luxel@beta.

Fixed

  • K7: the rate-limit end-to-end test of the lab's HTMX device panel (tests/e2e/htmx-device-panel.spec.mjs) no longer depends on request timing: it runs against a lab server of its own with a pinned refill rate and burst. Its assertions are unchanged. Test only.
  • K8: a layout shift of the lab's device-panel page (ADR-062). The shared lab stylesheet centred the card vertically, so a page painted before all its rows were parsed moved when they arrived; the card is now anchored to the top (place-items: start center). The test's threshold (cumulative layout shift at most 0.02) is unchanged. Lab only; it applies alike to the two implementations that load the file (03-luxel and 05-htmx).
  • The CI of the development repository failed at checkout: two agent worktrees had been committed as gitlinks. They were removed from the index.
  • Texts: README, roadmap, claims, guides and the security changelog describe 0.1.0-beta.2.

Changed

  • The version of the ten packages (@luxel-framework/* and create-luxel): 0.1.0-beta.2. Nothing else.

Not in this release

  • luxel deploy init and luxel doctor (D8) come in a later beta. Deploy by hand with docs/guide/production.md.
  • The diagnostics D5 + D6 (limits explained at the point of failure, the position of an error in a template), with the fixes of the nine known gaps in luxel check's exposure policy (S12.3-D5-1 to D5-9), come in a later beta. Until then the nine gaps are open, as in 0.1.0-beta.1: do not rely on luxel check alone to prove that a build's public output holds no secret (docs/security/CHANGELOG.md).

[0.1.0-beta.1] - 2026-12-03

The first public release, a beta. No external security review yet; not "production ready"; no WCAG or OWASP conformance is claimed. Install it with npm create luxel@beta. Luxel is a framework for CWP (Compiled Web Projection; defined in README.md). The authoring API (screen files) ships as a draft (ADR-061), and no session with a developer outside the project has run.

Added

  • @luxel-framework/compiler: TSX views written with @luxel-framework/ui compiled once into public HTML templates, slot maps and VSA manifests, deterministic and content-hashed, with diagnostics that give file:line:column, a code and a suggestion (packages/compiler/DIAGNOSTICS.md), including 26 common React habits.
  • @luxel-framework/runtime: a set of universal modules (core, forms, collection, poll, styles, dynamic, bridge, numeric, canvas). Each has the same hash in every app; a page loads only the modules its manifest declares. It resumes the server's page without hydrating, writes values and sends events. No third-party run-time dependency; core 8 113 B Brotli (8 106 B before ‹Logout>, below, added 61 B raw and 5 B Brotli; the scope rename then moved it by 2 B Brotli with no source change).
  • @luxel-framework/protocol: VSA 0.9 (docs/spec/vsa-0.9.md): closed-grammar validators, the compact wire, reads without an event id, and the capability extensions.
  • @luxel-framework/gateway and luxel-host: the single business event endpoint (POST /_luxel/event), view tokens (HMAC-SHA256), CSRF and exact Origin checks, Fetch Metadata, idempotency in the same transaction as the effect, state-version control, static public views, sign-in limits, a strict CSP with the runtime modules' hashes and Trusted Types, signed build provenance (ed25519, with an SBOM) and build revocation. Production mode refuses to start unsafe.
  • @luxel-framework/server: defineLoad and defineEvent, typed from the compiled contract; policies, scopes, versions and one transaction per event.
  • @luxel-framework/check and @luxel-framework/cli: luxel build, luxel dev (rebuild and reload on save), luxel check (JS budget, ASEF = 0, exposure, bounded collections, allowed events and components), luxel sign, luxel verify, luxel keygen, luxel revoke.
  • @luxel-framework/ui: the author components (View, Stack, Row, Text, Field, Action, Collection, Status, Select, Chart, Bar).
  • @luxel-framework/postgres: a shared session store and a shared rate limiter for several nodes.
  • create-luxel: npm create luxel@beta ‹dir> makes an app with a static sign-in, a form validated on the server, a paginated table, an E2E test and luxel check in the build.
  • Screen files (the authoring API, a draft: ADR-061 is not accepted, and names and shapes can still change): src/screens/‹view id>.screen.tsx holds everything one view needs, declared once with screen() from @luxel-framework/server/screen: its state, its messages, who may load it and send each event, the handlers and the view. The build generates the contract from it. The view names state, events and inputs with typed references (bind={state.summary}, event={events.add}), never with strings (LUXEL-E061, LUXEL-E062). At build time a screen's server imports are replaced by inert stand-ins (LUXEL-E060) and the screens are evaluated in a separate Node process with nothing allowed (a guard against a build that reads server code by mistake, not a sandbox). A project written with src/views/, server/contract.ts and server/events.ts keeps working and can live next to screens (docs/guide/screens.md).
  • ‹Link to="view"> in @luxel-framework/ui: a plain ‹a href> to another view of the app, its address a view id fixed at build time (LUXEL-E059 for a target that is not a route; ADR-058). Pages follow links without JavaScript, and crawlers can follow them. The documentation site navigates with links.
  • A view with no events and no bound state needs no handler (@luxel-framework/server).
  • ‹Logout to="view"> in @luxel-framework/ui: a sign-out button that works without JavaScript, compiled to a same-origin form (‹form method="post" action="/_luxel/logout">). POST /_luxel/logout answers that form with 303 to one destination per app, a public view fixed at build (LUXEL-E066), after checking Fetch Metadata and Origin; a script's request keeps the CSRF header and its 204. ctx.signOut() is unchanged.
  • Routes: a view declares a clean, static address with path (route: { path: '/pricing' } in a screen; views.‹id>.path or pages.‹id>.path in luxel.config.ts). The set of paths, plus the id addresses of the views without one, is the app's route table, fixed at build: luxel build writes it to the host configuration (routes), links are written with the table's addresses, and luxel-host answers a page at no other address (anything else is a 404; nothing is decoded or case-folded). Two views cannot declare one path (LUXEL-E065); a path outside the grammar, a reserved prefix or a parameter segment does not build (LUXEL-E064; route parameters are not available yet). An app that declares no path keeps its addresses and builds to the same bytes. home is optional when a view declares /.
  • luxel test and @luxel-framework/cli/test (preview, not frozen; ADR-061 §5): screen tests without a browser. A test opens a page of the built app on the real host, fills fields and presses actions by the names the served page shows, and reads its texts, status and rows; the page is driven by the runtime's own core. --mutate-bindings removes each bound zone of each compiled view in turn and reports the zones no test would miss. It refuses LUXEL_ENV=production. Guide: docs/guide/testing-screens.md.
  • luxel dev: with the memory session store, a session survives the host restart a server edit causes. Under luxel dev, and only there, each session is also kept in a file under node_modules/.cache/luxel/dev-sessions-‹project>/ (the user, the roles and the two times; never the session id or the CSRF token). luxel-host never reads or writes these files and does not start with LUXEL_DEV_SESSION_FILE set (docs/guide/tooling.md).
  • collection({ …, page: false, maxItems }) exempts a short, fixed list from policies.pageSize where it is declared (C14); luxel check lists every declared exemption with its bound.

Changed

  • The create-luxel template is written as screen files (src/screens/login.screen.tsx at /sign-in, src/screens/contacts.screen.tsx at /): no server/contract.ts, server/events.ts or src/views/, and the sign-out is ‹Logout>. It has screen tests (tests/app.test.mjs; npm test is luxel build && luxel test).
  • luxel dev: saving a screen file whose server bundle changed starts a new host process, so an edited handler is the code that runs next. The host used to be reloaded in place and kept the old handlers. The comparison is with the bundle the running host process loaded, so a handler edited while the build was broken, or before a host start that failed, also runs once the build is good (apps with server/events.ts included).
  • A composite page and a view can no longer share an id (LUXEL-E024): the page used to replace the view silently in the host configuration.
  • home must be an address of the app: a home that names no page now fails the build, luxel check and the start of luxel-host (LUXEL-E024).
  • luxel.config.ts, the server contract and each view file are evaluated synchronously under the build-time traps a view function already ran under. Reading process.env, the clock, Math.random or the network there no longer builds (LUXEL-E054, LUXEL-E026, LUXEL-E052), and neither does a top-level await. The configuration and the contract must be plain data (text, numbers, booleans, lists, plain objects): a function, a class instance, a Date or a Map in them no longer builds (LUXEL-E024). Write literals; read per-environment configuration on the server.
  • A collection's maxItems is enforced wherever its state leaves the server, for every collection and every adapter (the gateway checks what any adapter gives, a hand-written one too): a load (the filled page, GET /_luxel/view) and an event's answer (set/update, sync, its inserts). A list over its bound is refused whole (HTTP 500, CollectionBoundError, LUXEL-E029 in the log), never shortened. Before, only the filled page was refused. A handler that returned more items than its ‹Collection maxItems> now fails.
  • An insert into a list the answer does not give whole (ctx.insert alone) is settled on the server. For form rows the event carries (a row collection with inputs declared in the action's fields), the count is on the rows received, with no load. For any other list the view's load runs once more inside the event's transaction: the answer must match that state (its inserted keys in the list, its removed keys not) and the list its bound. ctx.sync or ctx.set avoids the second load. A handler that answered an insert without storing the row now fails. The runtime does not change: the browser applies what the server answers.
  • A ‹Collection> bound by a path string always writes maxItems (LUXEL-E029), also for an exempt list; only a screen's accessor carries the declared bound.

Security

  • A process.env read at the top of a view file, or anywhere in luxel.config.ts or the contract, was compiled into public outputs (a template, a page title, a message, a route and the links to it). It is now a build error (docs/security/CHANGELOG.md, S12.3-C5-1).
  • See docs/security/threat-model.md for what Luxel protects and what it does not, and docs/security/CHANGELOG.md for every issue found and fixed before this release.

[Unreleased]: https://github.com/IntiOps/luxel/compare/v0.1.0-beta.2...HEAD [0.1.0-beta.2]: https://github.com/IntiOps/luxel/compare/v0.1.0-beta.1...v0.1.0-beta.2 [0.1.0-beta.1]: https://github.com/IntiOps/luxel/releases/tag/v0.1.0-beta.1

Edit this page on GitHub

This page: 7.9 KB of JavaScript (Luxel's shared runtime), 0 KB from your app.

Measured when the site is built: the runtime files this page loads, compressed as they are sent.

Made by IntiOps. The Luxel 0.1.0 betas are on npm (0.1.0-beta.1, 0.1.0-beta.2), with an alpha of 0.2 (0.2.0-alpha.1): no external security review yet.