2026 Achievements Log
Major 2026 milestones for SveltyCMS — architecture, measured performance lanes, and product surfaces. Routine fixes are not listed.
On this page
A Comparative Analysis of Architecture, Performance, and Enterprise Readiness
This log keeps major milestones: a change to the architecture, a measured performance lane, or a product surface. Routine fixes, scanner cleanups, token/style migrations, dependency bumps, and investigations that did not move a lane are not listed.
Methodology: All SveltyCMS metrics are self-measured via reproducible benchmark suites (bun test tests/benchmarks/). Competitor data is derived from publicly available documentation, CVE databases (NVD, GitHub Advisory DB), and published architecture analyses as of June 2026. We encourage independent verification. This evaluation is prepared in accordance with EU Directive 2006/114/EC on comparative advertising — all comparisons are based on objectively verifiable features.
At a Glance
SveltyCMS is a self-hosted, headless and API-first content management system built on Svelte 5 (runes) and SvelteKit 3, with TypeScript end to end, a native Svelte UI kit (no client-side UI framework dependency), and first-class adapters for SQLite, PostgreSQL, MariaDB and MongoDB. Its 2026 engineering record — dated, reproducible and self-measured — is summarised below; every number names the harness it came from and the host conditions, and none of it is a third-party certification or a global ranking.
Headline results (self-measured; performance lanes 2026-10-12, test estate 2026-11-08)
| Area | Result | How it is measured |
|---|---|---|
| Read-path throughput (Point & List) | Warm HTTP end-to-end point reads findById 16 236 RPS (0.07 ms avg), findByIdRandom 14 737 RPS (0.13 ms avg); REST projected wire stream listProjected 14 059–15 464 RPS (0.45 ms avg), +148% over GraphQL (6 389 RPS) |
tests/benchmarks/competitive-workload-replica.test.ts (HTTP production) |
| Write-path throughput (PG/SQLite) | Warm HTTP concurrent 8c create 5 266 RPS; update 6 745 RPS (0.51 ms avg, 3.73× faster than Keystone 1 807 RPS); HTTP seed burst 12 406 docs/s (500 docs in 40 ms) | tests/benchmarks/competitive-workload-replica.test.ts |
| Distance to the driver | Read findById at 114 %, listPlain at 213 % of bare-HTTP floor; Write create at 47 %, update at 57 % of bare-HTTP floor (and 35 % of raw in-process driver ceiling at 100k rows) |
scripts/benchmark-matrix/raw-db-ceiling.ts --db=postgresql --scale=100000 |
| Test estate | 8 196 unit tests / 865 files; component DOM suite 55 files / 248 tests; full 4-DB contract bundle green on SQLite, PostgreSQL, MariaDB and MongoDB | bun run test:unit · bun run test:unit:components · bun run test:integration · bun run test:matrix |
| Static gates | bun run check 15/15 at the recorded date (format + lint + drift gates + tsc + svelte-check; the fast-check suite is now 18 registry entries — see §3.79), lint:docs (290 files) and risk:audit (CVE, secret-misuse, slop, backdoor probe) all clean; project diagnostics 0 errors / 0 warnings |
bun run check · bun run lint:docs · bun run risk:audit |
Verified gains (before → after, same harness)
| Stream | Recorded change |
|---|---|
| Mixed Workload Recovery | Pruned point-write cache invalidation (doc: + count: tags, skipping epoch bump and list cache eviction): concurrent mixed restored from 1 136 RPS (p95 31.4 ms) to 3 112–3 232 RPS (p95 5.5 ms, +174% throughput, −82% tail latency), sweeping 11/11 lanes against Keystone (1.67× win) |
| Cloud KMS Envelope Encryption | Hardware-grade Cloud KMS envelope encryption (cloudKms) integrating AWS KMS, GCP KMS, Azure Key Vault, HashiCorp Vault, and Local HKDF. In-memory DEK caching ensures zero performance degradation on content CRUD (<0.008 ms/op, zero network calls on hot paths) |
| SAML / OIDC SSO Federation | Enterprise SSO federation with @node-saml/node-saml SP, dynamic public provider discovery, RFC 7636 PKCE, JIT provisioning, and RP-initiated logout. Fully decoupled from session evaluation (<0.5 ns in-register bitmask check post-login) |
| REST vs. GraphQL Wire Parity | Direct-to-Wire projected streaming (findListWireStream with fields): REST listProjected 14 059–15 464 RPS (+148% vs. GraphQL 6 389 RPS); bypasses unneeded JSON de-TOASTing and stringification |
| Point Admission Cache | Generational nursery + mature double-buffer: eliminates V8 iterator churn on cold misses; findByIdRandom 4 144 → 14 737 RPS (+256%), findById 5 093 → 16 236 RPS (+219%), update 6 745 RPS (+78%) |
| Write Performance | PG/MariaDB native socket pipelining (opt-in coalescing === "1"); create 920 → 5 266 RPS (+472 %), update 1 665 → 6 745 RPS (+305 %), seed burst 1 421 → 12 406 docs/s (8.7× speedup) |
| Driver Parity | All 4 DBs synchronized: PG POSTGRES_SYNCHRONOUS_COMMIT, MariaDB skipReturning without RETURNING *, MongoDB MONGO_WRITE_CONCERN + direct doc return on skipReturning, SQLite SQLITE_SYNCHRONOUS=NORMAL |
| Security | Read-lane enforcement points 1 → 5 (publication clamp, endpoint parity, field-level-access exemption, grant epoch, tenant resolution); leak/bypass paths 3 → 0; stale-grant window until TTL → 0 |
| Performance | Warm read latency −47 % to −57 %; throughput +87 % to +131 %; cold cache-busted latency −61 % to −64 % |
| Efficiency | Unit-suite wall time for the widget group 21.90 → 3.07 s (−86 %), media 1.73 → 0.86 s (−50 %), utils 4.62 → 3.52 s (−24 %) |
| Plugin provisioning | A plugin’s plugin_workspace slot server no longer shadows its index.server.ts, so hooks + migrations survive (src/plugins/init.server.ts merges both). unified-data-hub migrations now run on all four adapters — its three collections provision instead of the connector write failing (previously masked by a soft-skipped federation test) |
| Test honesty | Masking soft-skips replaced with hard assertions across security, security-negative, collections, auth-2fa, theme, both Unified-Data-Hub federation suites and the resilience/pool-contention DB suites; harness reset failures now throw, and the DB-tests CI job uploads a real preview.log |
| Quality gates | Project diagnostics 42 → 0; build-time warning classes (undefined named import, non-handler +server.ts export, alias in the config graph) turned into test failures instead of surprises |
| Junction many-to-many | New ManyToMany relation type stores one edge row per link in content_relations (all four adapters) with per-link sort/metadata, indexed reverse lookups (getReverseLinks) and source/target cascade cleanup. Writes diff against stored edges (only changed rows are written); reads hydrate an ordered id array in one batched query per field, so the existing relation UI and GraphQL/populate paths render it unchanged. |
| Cookie consent audit logging | Server-side consent logging wired to sys_consent_audit via public plugin route /api/plugins/cookie-consent/consent, with allowedOrigins verification for headless frontends and reactive client persistence in consentStore. |
| DOM component interactions | Expanded real Svelte 5 client mount testing under vitest.dom.config.ts to 55 suites / 248 tests, verifying BaseWidget, SystemHealth controls, table windowing, tooltip delegation, state transitions, and interval cleanups. |
| Session revocation E2E | End-to-end browser golden journey asserting that revoking an active session immediately purges server session cache and DB session store, rejecting subsequent requests with 401 and redirecting navigation to /login. |
| Multi-node SSO logout | sid / sub / SAML NameID are indexed at login into the shared cache (sso:index:<kind>:<value> → sso:directory:<sessionId>), so an OP-initiated front- or back-channel message, or a SAML LogoutRequest, that a load balancer routes to a different worker than the login still terminates the session. Lookups merge the local map with the index (never a single source); termination prunes the bucket. Pinned by 8 cross-node cases in tests/unit/auth/sso-distributed-logout.test.ts. |
| PostgreSQL RLS (opt-in) | TENANT_RLS_ENABLED=true makes collection provisioning emit ENABLE + FORCE ROW LEVEL SECURITY + tenant_isolation in the same step as the table DDL (throwing if the policy cannot filter), and routes tenant-scoped db.crud.* calls through a transaction that binds app.tenant_id per call — no process-global tenant, no session GUC on a pooled socket. A synchronous mode check keeps the hot path allocation-free; the previous mode holds until the background refresh lands. Proven against a non-owner role (unbound → zero rows, cross-tenant writes rejected, pool reuse, concurrent tenants) in tests/integration/databases/tenant-rls-request-path.test.ts. |
| Tenant-keyed session LRU | Every in-memory session structure (LRU, negative cache, refresh/rotation/anomaly timers, single-flight map) is keyed by ${tenantId ?? "global"}:${sessionId}. A session id is a client-supplied cookie value, so two tenants presenting the same string previously let tenant B read tenant A’s warm snapshot before the tenant-mismatch check. Invalidation without a tenant drops the id from every namespace, and per-user invalidation still targets one entry. Pinned by tests/unit/hooks/session-cache-tenant-key.test.ts (6). |
| Independent audit anchor | AUDIT_ANCHOR_PATH writes the per-tenant chain checkpoint to a file outside the CMS database (<dir>/audit-anchor-<scope>.json), atomically (temp → rename) on every committed checkpoint. Verification now compares the chain against that anchor, so deleting the tail and the DB checkpoint row no longer yields a shorter chain that verifies. Write failures are counted (getAnchorStatus()), logged as ANCHOR_WRITE_FAILED and surfaced by verifyChain().anchor. Pinned by tests/unit/services/audit-chain-anchor.test.ts (5). |
| Audit checkpoint health | A rejected checkpoint write no longer degrades to a warn: it is counted per tenant (getCheckpointStatus()), logged at error level (CHECKPOINT_WRITE_FAILED), and returned by the admin verification as checkpointPersistence, so the screen can no longer report a bare “Chain Valid” while the tail-truncation anchor is stale. Pinned by tests/unit/services/audit-chain-checkpoint-health.test.ts (5). |
| SSRF Egress Scope & Downgrade | safeFetch & validateEgressUrl strictly prevent scope escape via redirects (allowedHosts, allowedOrigins, urlScope) and forbid protocol downgrade (https: → http:) across redirect hops. |
| Prototype Pollution Defense | Zero-overhead prototype pollution elimination across deepClone (>5.2M ops/s), sanitizeObject (>12.8M ops/s), deepCopy, copyDataWithFreshRowIds, deepMerge, deepMergeMetadata, and TokenRegistry path traversal. |
| WebMCP Agent Instructions | Collection and field-level AI agent instructions (instructions/agentInstructions), exposed via WebMCP tools get_collections, get_collection_schema, and get_agent_instructions on hosted mcp.sveltycms.com (>2.2M searches/s). |
| Live Preview dashboards | Two plugin pages (/plugin/editable-website, /plugin/editable-website/competitive) render one shared capability matrix (capabilities.ts): runtime/licence status, per-collection livePreview coverage, weighted coverage bars (yes = 1, partial = 0.5, n/a excluded) and an explicit open-gap list. Dated competitor columns carry the UWG §6 qualifier in the UI itself. |
| Preview editing surface | In-preview block palette (add/move/delete hero·paragraph·CTA·image, paragraph ↔ hero ↔ CTA flip), drag-drop image upload through /api/media/upload with click/arrow-key focal point, hold-to-toggle read-only mode on touch, plus WebMCP get_live_preview_url so an agent can render the draft it just wrote — all through the workflow-gated save lane. |
| Preview perf re-check | Competitive replica re-run on the same host after the junction-relation and hydration changes (SQLite, median of 7 rounds, 8 workers): findById 31 921 → 38 511 RPS, findByIdRandom 32 204 → 37 649 RPS, listPlain 27 805 → 33 275 RPS, listPopulated 32 319 RPS, create 5 162 → 6 199 RPS, update 6 078 → 7 059 RPS, mixed 2 690 RPS — every lane equal or faster, so the relation-aware read/write path costs nothing on schemas without junction fields. |
How to read these numbers. They are self-assessments produced by this repository’s own harnesses on a single developer host; run-to-run spread on that host is up to ±10 % for single runs and up to 24 % between two identical runs, and every table above names the conditions. CI — not this document — is the source of truth for pass/fail counts. Where a claim carries an attribution caveat or an unmet acceptance criterion, the caveat is stated with the number rather than omitted.
1. Introduction: The Post-Monolithic Era of Content Management
The content management system (CMS) landscape of 2026 is defined by a rigorous bifurcation between legacy monolithic architectures and modern, composable, headless solutions. As enterprises increasingly demand sub-millisecond latency, edge-ready deployment, and “developer-first” ergonomics, the market has opened for frameworks that leverage the compilation-centric performance of next-generation JavaScript libraries.
1.1 The Definition of “State of the Art” in 2026
To accurately assess SveltyCMS, one must establish the baseline for SOTA technology in the current year. The benchmarks for 2026 include:
-
Zero-Runtime Overhead: The shift away from heavy client-side JavaScript bundles toward compiled, lightweight output.
-
Ultra-Fast Developer Feedback: Sub-1.2s Hot Module Replacement (HMR) for content structure changes, a 60% improvement over legacy patterns.
-
Native Svelte 5 UI Library (March 2026): Zero-dependency, native Svelte 5 UI architecture, achieving <150 requests per page and solving the “ESM Storm” overhead.
-
Ultra-High Performance Toolchain: Rust-powered linting and formatting (oxlint/oxfmt).
-
Linting (Oxlint): Project-wide checks in 47ms (1000+ files).
-
Formatting (Oxfmt): Full project formatting in ~2.2s.
-
Production Builds (Vite 7): Fast builds using Vite’s native bundler.
-
Zero-Warning Codebase: Automated and manual audit cleared all 84 legacy warnings.
-
Automated Doc Integrity (March 2026): Native
lint-docs.tsutility achieving 100% link integrity and Path Alignment Strategy (filesystem matching) across 158 files. -
True Database Agnosticism: The ability to run on NoSQL (for scale), SQL (for relations), or Embedded DBs (for edge) without code changes.
-
-
Edge Compatibility: The ability to deploy logic and content delivery to the network edge (e.g., Cloudflare Workers, Vercel Edge).
-
Type Safety: End-to-end TypeScript integration from the database schema to the frontend component.
-
Infrastructure as Code (IaC): The ability to define content schemas, permissions, and configurations as version-controlled code.
-
Structural Consolidation (5-Pillar Architecture): Moving beyond file-fragmented systems to a unified, 5-pillar reactive core.
-
Enterprise SEO Excellence: Sub-millisecond redirect lookups and dynamic, multi-tenant sitemap generation with automated indexing pings.
-
Typed Component Loaders: Moving beyond brittle string-based component resolution to type-safe, tree-shakeable
import()closures.
This report describes self-measured SveltyCMS behavior and publicly documented competitor capabilities as of mid-2026. It does not claim global ranking, external security certification, or same-harness superiority over all commercial CMS products.
2. The Architectural Foundation: SvelteKit and the Compiler Paradigm
2.1 The “No-Runtime” Advantage
SveltyCMS leverages Svelte’s compiler to generate highly optimized vanilla JavaScript during the build process.
- Middleware pipeline (April 2026, self-measured): Consolidated security handlers and
/apifast-paths; documented ~71% reduction in hook overhead on the measured path (~12 µs p95 micro-bench — not full HTTP E2E). - API fast-path skips: Omitting locale/theme/content-init on pure API routes saves on the order of tens of µs per request when those hooks would otherwise run (depends on path and cache state).
- Throughput: REST/dispatcher benches have recorded high thousands–~14k+ RPS on specific SQLite/local scenarios. Not a claim of global product speed leadership; networked adapters and full auth stacks are lower.
2.2 Performance & Security Infrastructure (New)
In March 2026, SveltyCMS implemented several enterprise-grade infrastructure optimizations:
-
Single-Trip Mutations: Standardized
.returning()(SQL) andreturnDocument: 'after'(Mongo) across all adapters, eliminating redundantSELECTqueries and reducing mutation latency by ~40%. -
Prepared / hot-path SQL (April 2026): Cached prepared statements and related hot-path work on SQLite, PostgreSQL, and MariaDB reduce per-query compile overhead. Sub-ms reads are typical on embedded SQLite under our harness; networked SQL still pays RTT (~0.5–2 ms class on local Docker, 2026-08-04).
-
Memory Stability & Allocation Efficiency (April 2026): Resolved significant allocation overhead in the
LocalCMSSDK by consolidating transient caches into a sharedstaticLRU engine. This refactor neutralized a 524 MB/min memory leak, achieving a STABLE rating with < 1MB/min growth under sustained 3,400+ RPS loads. -
Negative Caching & Bloom Filter Protection: Implemented a high-performance negative caching engine with an in-memory Bloom filter to track missing keys/documents. When a 404 cache miss is recorded, subsequent requests for the same missing key are resolved immediately in the current microtask tick, bypassing the database driver.
Negative cache / Bloom miss path is orders of magnitude faster than a full DB miss on repeated absent keys (self-measured hot-miss micro-benches). It reduces miss storms; it does not “immunize” the system against all DoS classes (rate limits, body limits, and ops still apply).
-
Zero-Tax LocalCMS SDK Bridge: Hardened the
LocalCMSserver-to-server bridge to bypass SvelteKit’s HTTP middleware pipelines entirely. Combined with hot-swappable getter structures and microtask batching, this achieves internal query resolution in <0.05ms for server-side loading and internal API interactions with 0% runtime overhead. -
Direct-to-Wire Projected REST Streaming (October 2026, self-measured):
- In-Engine JSON Projection (
findListWireStream): When REST queries request physical field projections (?fields=_id,title,count), PostgreSQL (PostgresWireStreamEngine) and SQLite (SqliteWireStreamEngine) now assemble the wire JSON payload directly inside the database engine (jsonb_build_object/json_object). This bypasses entity de-TOASTing, model hydration, and JavaScriptJSON.stringifyserialization. - REST vs. GraphQL Wire Parity: In fair like-for-like payload testing against the same 3-field projection, REST
listProjectedhits 14,059–15,464 RPS (0.45 ms avg, 0.05 ms srv-p95), outperforming Yoga GraphQL (6,389 RPS) by +148% (2.48× throughput). This resolves the historical payload size skew (where full-table REST transferred 10.6× more bytes over socket I/O than GraphQL) while preserving WAF, RBAC, and FLAC redaction guarantees. Tests:tests/benchmarks/competitive-workload-replica.test.ts.
- In-Engine JSON Projection (
-
Generational Point Admission Cache & Point-Read Acceleration (October 2026, self-measured):
- Zero-Allocation Nursery/Mature Sets: Replaced FIFO iterator eviction on the point-read admission filter with double-buffered generational sets (
pointAdmissionNursery,pointAdmissionMature, and list counterparts). This eliminates V8 iterator churn and allocation spikes on cold cache misses across large working sets (100k docs) while preserving strict 2-touch admission filtering and byte budget ceilings. - Point-Read Throughput: Measured on warm HTTP steady-state:
findByIdhits 16,236 RPS (0.07 ms avg), andfindByIdRandomhits 14,737 RPS (0.13 ms avg), outperforming KeystoneJS’s unauthenticated router (4,422 RPS) by 3.33× while keeping full enterprise security (WAF, CSRF, RBAC, tenant isolation, FLAC). - Concurrent Write Throughput: Warm concurrent 8c
updatehits 6,745 RPS (0.51 ms avg), beating KeystoneJS (1,807 RPS) by 3.73×;createhits 5,266 RPS (0.52 ms avg). Tests:tests/benchmarks/competitive-workload-replica.test.ts.
- Zero-Allocation Nursery/Mature Sets: Replaced FIFO iterator eviction on the point-read admission filter with double-buffered generational sets (
-
Point-Read Fast Lane & Wire-Stream Optimization (October 2026, self-measured):
__isFastLaneContext Activation: Wired__isFastLane: trueintocollectionReadLaneandcollectionWriteLaneevents, enablingserveTurboCacheEntryto return synchronous cached payloads directly instead of allocating WHATWGHeaders,Response, andReadableStreaminstances that required asynchronousarrayBuffer()decoding.- Zero-Allocation Fast Headers: Attached
__fastHeadersdirectly tofastSuccessResponseand read them inresponseToLaneResult, bypassingout.headers.forEach()iteration on hot API read paths. - Point-Read Coalescing Bypass: Short-circuited
coalesceCollectionRefillon single-entry point reads (entryId != null), executingrebuildWarmCollectionReaddirectly to eliminate Promise closure allocations andinflightCollectionReadsmap churn during high-concurrency random lookups. - Database Envelope Offload (
findPointWireStream): Shifted the{"success":true,"data":...}JSON envelope wrapping from PostgreSQL SQL string concatenation (||) to Node.js V8 string interpolation, avoiding Postgres server-side memory context allocations and text casting while preserving identical byte wire output.
-
Benchmark Matrix Rationalization & Tiered Execution (October 2026):
- Dead Probe Pruning: Archived 8 one-off diagnostic test files (
probe-*.test.ts,write-matrix-cliff-repro.test.ts) totests/benchmarks/probes/, removing unmaintained micro-probes from default matrix runs while retaining them for manual debugging. - Consolidation: Consolidated overlapping ALE micro-tests into canonical test suites (
ale-encryption-performance.test.ts,local-api-performance.test.ts). - Tiered Runner Execution: Added
--tier=competitive(or--replica),--tier=core, and--tier=fullflags toscripts/benchmark-matrix/index.ts, enabling lightning-fast 15s competitive replication in CI while preserving exhaustive regression suites.
- Dead Probe Pruning: Archived 8 one-off diagnostic test files (
-
Enterprise Redis L2 Cache Optimization (October 2026, self-measured):
- TCP Socket Performance (
TCP_NODELAY+ Keep-Alive): Eliminated Nagle packet coalescing delays on small JSON payloads (<1.5KB) by pinningnoDelay: trueandkeepAlive: 5000on the Redis L2 connection pool, suppressing 5–40ms tail latency spikes. - Non-Blocking Evictions (
UNLINK): Migrated cache invalidations and tag set drops from blockingDELto asynchronousUNLINKexecuted insidemulti.exec()batches, preventing Redis main-thread stalls during high-concurrency collection updates. - Batch
mGetRelation Probing: Wired bulk RedismGetlookups intopopulate-resolver.tsto resolve missing relational entity IDs in a single round-trip before issuing SQL/NoSQLfindManyqueries. - Zero-Dependency Optionality: Maintained strict architectural optionality — Redis remains 100% optional, seamlessly falling back to in-memory L1 cache with sub-µs hits when disabled.
- TCP Socket Performance (
-
Active Driver Validation (Anti-False Positive): Implemented mandatory
SELECT 1verification in the MariaDB and PostgreSQL adapters. This ensures that the Setup Wizard provides immediate, clear feedback for missing or incorrect credentials, eliminating “lazy connection” false positives found in legacy ORM implementations. -
Micro-Telemetry: Native per-operation timing (
performance.now()) is bubbled up from the DB adapter to the APImetafield, providing high-resolution observability without external dependencies. -
Automated Bottleneck Detection: Heap Stability, Pool Contention & P95/P99 Variance (2026-09-26):
- Heap Stability Regression Guard (
tests/unit/benchmarks/heap-stability.test.ts): Three automated tests that fail fast when a code change causes unbounded heap growth: (1) 1 k-doc transformation burst asserts <25 MB retained delta post-GC; (2) 3-burst asymptotic leak check asserts <15 MB gradient across 500-doc waves — catches commitment-ratchet leaks that only converge over many rounds; (3) 256-item LRU eviction cap asserts <10 MB post-GC after 2,000 inserts of 8 KB payloads, matching the internalBoundedCachecontract. - Connection Pool & Mutex Contention Test (
tests/integration/databases/pool-contention.test.ts): Fires 20 concurrent background-worker-pattern tasks (outbox/audit/status-poll simulation) against 20 concurrent foreground CRUD writes and asserts: zero deadlocks, all 40 operations succeed, sub-50 ms post-contention query latency. Runs on SQLite locally, switches to PostgreSQL in CI viacurrentDbType(). - P95/P99 Latency Variance Report (
scripts/verify-benchmark-local.ts):generateLatencyVarianceReport(db)grades the last recordedcompetitive-workload-replicarun — rows selected bytestFileand grouped byrunId, never by filename — using the run’s own recorded p50/p99 percentiles, the sample count behind them, and the absolute tail excess (p99 − p50). Each workload is classifiedEXCELLENT(<2× tail ratio) /ACCEPTABLE(≤3×) /WATCH(≤4.5×) /HIGH_VARIANCE(>4.5×); a row whose percentiles are absent, or backed by fewer than 100 samples (where “p99” is the maximum), is reportedUNMEASUREDwith the reason instead of an estimated band. Aggregate rows (p50 = 0 ms, e.g. the seed burst) are listed as excluded, not as unmeasured, so--strictstays passable.printLatencyVarianceReport()renders the table (naming the graded run and its age) andlatencyVariancePasses()is the strict verdict — a 🔴 tail or an unmeasured row fails it, 🟡/🔵 stay informational. Superseded (see §3.34): an earlier revision reconstructed p50/p99 fromavg/p95/cvwhen the JSON lacked them and graded those estimates, and read ten hardcoded filenames from a metric-naming scheme the harness had stopped writing. - Background Worker Stability (
src/services/background/background-runtime-env.ts): The standalone background worker was crashing and restarting in production because its esbuild bundle could not resolve$app/env(a SvelteKit virtual module). The fix: a lightweight runtime replacement (browser=false,building=false,dev=NODE_ENV!==production,version=npm_package_version) aliased in vite.config.ts so the worker never tries to load SvelteKit’s virtual module loader. A companion esbuild plugin now strips TypeScript and compiles.svelte.tsrune modules ($state/$derived) inside the bundle so runes never leak into the Node child as undefined globals. Verified intests/unit/services/background-supervisor.test.ts. - RFC 7240
Prefer: return=minimalFast Path (create + update):handleCollectionCreateandhandleCollectionUpdatenow detect thePrefer: return=minimalrequest header (or?return=minimalquery param) and passskipReturning: trueto the adapter, then return a lean{"_id":"..."}response (~70 B) instead of the full merged document (~3.5 KB). Removes the fullRETURNING *PostgreSQL round-trip on the happy path for callers that only need confirmation. Measured: update +4.3% RPS paired median on PostgreSQL 5k docs 8c. - PostgreSQL Schema Migration Guard (
adapter-core.ts):addedColumnsSet tracks which columns were actuallyADD COLUMNed in the current migration run. The subsequentCREATE INDEXloop now skips columns that already had indexes — eliminates redundantCREATE INDEX IF NOT EXISTScalls on large schemas with many existing materialized fields. - Tests:
tests/unit/benchmarks/heap-stability.test.ts(3) ·tests/integration/databases/pool-contention.test.ts(2) ·tests/unit/services/background-supervisor.test.ts(5, extended). Pre-commit gate: 6/6 checks pass in 2 m 2 s.
- Heap Stability Regression Guard (
-
Streamed collection export (September 2026):
GET /api/collections/{id}/exportstreams NDJSON, CSV, or chunked JSON fromstreamMany(Mongo cursor, PostgreSQL driver stream, SQLite/MariaDB 500-row pages).streamingExportResponseencodes one record at a time with backpressure. Admin import/export downloads the stream URL instead ofJSON.parseof the full payload. Tests:tests/unit/utils/export-encode.test.ts. Docs: Collections API. -
Collection Weak ETags & DB-free 304 (September 2026):
GET /api/collections/{id}emitsW/"cv1|{tenant}|{collection}|{epoch}|{reprHash}".If-None-Matchis compared to the in-memory collection epoch (bumped on write with L1 eviction) inhandleTurboGetandhandleApiRequestsbefore the collections handler — no DB, no JSON. Representation hash covers path, query, and user id. Tests:tests/unit/services/collection-etag.test.ts. Docs: Collections API. -
Native Field-Level Encryption at Rest (September 2026): Collection fields flagged
encrypt: trueare transparently encrypted inwrite-pipeline.tsand decrypted inread-pipeline.tsusing AES-256-GCM envelopes (v1:iv:tag:ciphertext) keyed fromENCRYPTION_KEYwith HKDF domain separation (sveltycms-field-at-rest) and AAD binding (tenantId:collectionId:fieldName). Physical adapters store only ciphertext; L1/L2 caches keep ciphertext (decrypt clones on the way out). Filter/sort on encrypted fields fail closed (ENCRYPTED_FIELD_NOT_QUERYABLE). Unique indexes and SQL materialization are skipped. Tests:tests/unit/utils/field-encryption.test.ts,tests/unit/services/field-encryption-pipeline.test.ts. Docs: Field-Level Encryption. -
Interactive Admin Session Console (September 2026): Shipped a comprehensive user session management modal (
modal-user-sessions.svelteandDELETE /api/user/sessions) inside User Management. Administrators can inspect concurrent active sessions per user account, complete with client metadata (OS, browser type, IP address, and current active session indicator) and execute one-click remote session revocation with instantaneous authorization cache invalidation. Tests:tests/unit/auth/sessions/session-manager.test.ts. -
Access Management Category Filters & UI Polish (November 2026):
- Permission Category Filter Chips: Added horizontal category filter chips (All, System, API Access, Content Management, Media Management, Configuration, User Management, Collection Entries) to
/config/access-managementpermissions matrix, enabling granular inspection and bulk role management per functional domain. - Tab Strip Elevation & Breathing Room: Added comfortable top breathing room over
<Tabs.List>in Access Management cards to eliminate border crowding. - Webhook Creation Modal Guidance: Integrated
<HelpIcon>+<Tooltip>explanations into all modal form fields (Webhook Name, Payload URL, Secret Key, and Trigger Events) with contextual HTTPS security indicators. - System Monitor Card Cleanup: Streamlined
/config/monitorcards to remove redundant configuration links and embedded background queue telemetry directly.
- Permission Category Filter Chips: Added horizontal category filter chips (All, System, API Access, Content Management, Media Management, Configuration, User Management, Collection Entries) to
-
Dashboard Widget Sandbox & Operator Controls (November 2026):
- Endpoint guard: widget requests are limited to same-origin
/api/...paths; encoded traversal (%2E%2E,%2f, double-encoded%252e) and credential-bearing URLs are rejected beforefetch, with a 15 s abort timeout, CSRF headers, and sanitized request headers. - Per-tile isolation: sandbox storage is namespaced by
tenant:user:widget, capped at 256 KB per widget instance with TTL expiry; the legacy flatwidget_cache_*entries are still read for migration and are never written again. Each widget gets its own error boundary with Retry/Remove instead of taking down the grid. - Runtime RBAC:
widget.jsonmay declarerequiresPermission/requiresAdmin; the server filters the picker and persisted layouts re-check per tile, rendering an access-denied card instead of calling a forbidden endpoint.database-pool-diagnostics,scim-status, andtenant-analyticsship as admin-only. - Operator UX: per-widget settings (title, refresh rate, grid size) persist without clobbering widget-specific settings; curated layout presets (Overview, Monitoring, Editorial, Governance, Minimal) with confirmation before replacing a non-empty grid; global refresh tracks real widget completion; compact/normal density toggle.
- Tests:
tests/unit/dashboard/dashboard-{sandbox,storage,presets,contract}.test.ts,tests/unit/components/dom/base-widget-interaction.test.ts. Docs: Dashboard widget development.
- Endpoint guard: widget requests are limited to same-origin
-
Parser-Based Content Sanitization (November 2026):
- Allowlist parser, not regex denylists:
sanitizeHtml()andsanitizeSvgMarkup()now runsanitize-htmlin a server-only module (src/utils/sanitize-html.server.ts). Regex chains are order-dependent and re-entrant (<scr<script>ipt>reassembles), which is exactly what CodeQLjs/incomplete-multi-character-sanitizationreported oninput-sanitizer.tsandmedia-service.server.ts; the parser closes those findings by construction instead of suppressing them. - Bundle boundary kept: the browser-shared
sanitize-html.tsexports onlystripHtml,decodeHtmlEntitiesandsafeHref. Verified that nosanitize-htmlparser symbols appear in.svelte-kit/output/client/**after a production build. - Authored links validated:
safeHref()decodes numeric entities (including control characters) before requiring anhttp/https/mailto/telscheme or a relative path, sojavascript:andjava script:are rejected rather than handed to<a href>; used for page CTA links inpage-renderer.svelte. - Two trust boundaries: the write path sanitizes persisted values (
content-write-prep.server.ts), and the read path re-sanitizes inlocalizeSitePage()before the renderer’s{@html}sink. - Tests:
tests/unit/security/sanitize-html.test.ts,tests/unit/security/sanitize-svg.test.ts,tests/unit/utils/sanitize-html.test.ts,tests/security-corpus/(47 red-team cases). Docs: RichText security.
- Allowlist parser, not regex denylists:
-
External Scope-Check Remediation (November 2026): the third-party scope check flagged three rule families; all three are closed in-tree.
- Native primitives: Dashboard (17 selects, 4 inputs, 6 buttons) and Users & Roles (14 files) compose
@components/ui(Select,Input,Button,Checkbox,Toggle,Badge,HelpIcon) instead of raw elements;class="card"/class="input"are gone. Raw controls remain only where a primitive cannot express the behaviour — the tab strips that must keepTAB_ROW/tabTrigger()(enforced bytab-chrome-contract.test.ts) and hidden inputs. - Surface tokens: 32
gray-*lines and 10dark:text-whiteremoved; the undefinedbg-(--admin-input-bg)replaced; cache-widget title clipping fixed withmin-w-0; duplicate refresh icons disambiguated. - Accessibility:
page-title.sveltedroppedopacity-50fortext-(--admin-text-muted)(the main contrast cause);button.sveltefocus ring uses--admin-focus-ring; System Settings selects received anid; setup labels and carousel dots fixed (role="group"+aria-current, noaria-hiddenon focusables); media-grid rows gotrole="row"; nav label-content-name mismatches fixed; logical properties (inset-e-4,ms-2) and mobile safe-area padding applied. - Dashboard API drift: the pool widget requested
/api/dashboard/database-pool(404) and now maps/api/database/pool-diagnosticsthrough a pure mapper with unit tests.
- Native primitives: Dashboard (17 selects, 4 inputs, 6 buttons) and Users & Roles (14 files) compose
-
Zero-Overhead Security Hardening (November 2026):
- DNS socket pinning:
safeFetchconnects to the addressvalidateEgressUrl()already checked, so a TTL-0 rebind between validation and connect cannot reach loopback or cloud metadata; redirect hops are re-validated. The pinned dispatcher is paired with undici’s ownfetch(Node’s globalfetchrejects a foreign dispatcher) and falls back to the guarded global path whenundiciis unavailable. - Revocation epoch: global/tenant/user monotonic counters in
src/databases/auth/revocation-epoch.tsinvalidate sessions with one integer comparison; password change, 2FA reset, and admin lockout bump the epoch before the response. The counters are process-local; cross-node invalidation now also reads the shared marker throughgetDistributedRevocationEpoch()(5 s memo), while tenant/global marker publication still has no production caller (see §3.78). - L1 flood gate (removed 2026-11-08, PR #565): the synchronous per-IP token bucket (
src/utils/rate-limit/l1-filter.ts, 200 burst / 200 per second) was removed because it capped legitimate bulk write paths before the adaptive lane limiter ran. The adaptive/Redis limiter, tenant ceiling and WAF remain;RATE_LIMIT_L1_*are no longer read onnext. - AOT validation plans: collection schemas compile once into a flat validator plan cached in a
WeakMap; the write pipeline executes the plan instead of re-walking the schema and rejects unknown keys before an adapter sees them. - Nonce CSP:
csp.mode: "nonce"plus'strict-dynamic'invite.config.ts, with%sveltekit.nonce%on theapp.htmlbootstrap script. Verified on the built server: the header nonce matches every rendered<script>nonce. - Ephemeral key-material zeroing: DEK/KEK, plaintext, scrypt-derived, and HMAC buffers are wiped in
finallyacrosshybrid-kem,field-encryption,share-link-hash, andhmacSha256VerifyWithKeys. - WASM plugin sandbox: marketplace plugins execute in
WasmPluginPool(128 MB ceiling, zeroed linear memory, 500-run recycling, pointer-bounded ABIs); first-party plugins keep the native JS path. - Tests:
tests/unit/security/egress-guard.test.ts,tests/unit/auth/revocation-epoch.test.ts,tests/unit/sdk/compiled-validation-plan.test.ts,tests/unit/hooks/csp-headers.test.ts,tests/unit/plugins/wasm-plugin-pool.test.ts. Docs: Security posture, CSP.
- DNS socket pinning:
-
AI-Assisted Security Assurance Scaffolding (November 2026): five evidence-producing pipelines, each documented and gated. None of them substitutes for the still-open external penetration test.
- Advisory ledger (
scripts/security/check-advisories.ts): one Valibot-validated JSON record per advisory with a monotonic state machine (received → triaged → patched → released), duplicate-id rejection, OSV/CVE ids at release, and an SLA gate. The two shipped records areprovenance: "example"and are excluded from every published figure. - Patch latency (
docs/reference/security/patch-latency.mdx): generated from the ledger, nearest-rank median/p95 per severity, breaches for released and open advisories. The table is empty by design until the first real advisory ships. - Test strength (
scripts/security/check-test-strength.ts,test:mutation): 19 seams mutated — 7 write-path plus 12 security seams across auth, security utilities, egress and the write pipeline — with per-area floors. The measured baseline is 100 % (19/19 killed) across every configured area; 35 executable attack cases across URL, XSS, SVG and prototype-key targets run on every PR. - Threat-model drift (
docs/security/threat-model.json,check-threat-model-drift.ts): six STRIDE surfaces covering 58/58 server route files (100%); a handler change without a matching model update fails the gate, as does a review older than 12 months. - Executable invariants (
tests/unit/security/invariants.test.ts): no@components/uibarrel imports, noMath.random()in security/auth/media, a no-growth ratchet onnew Date().toISOString(), and manifest coverage. - External validation (
docs/security/external-validation.json,check-external-validation.ts,.github/workflows/scorecard.yml): machine-readable status for pen test, bounty, Scorecard, SLSA and Sigstore, with freshness rules. All rows arepending; the gate fails on a stale completed report or a score below target. - Security case (
docs/reference/security/security-case.mdx): the umbrella evidence map, the AI-assisted security policy (AI drafts, a named human signs every fix), and the EU/UWG-compliant claim language. - Tests:
tests/unit/scripts/{advisory-ledger,check-test-strength,threat-model-drift,external-validation}.test.ts,tests/unit/security/{red-team-corpus,invariants}.test.ts.
- Advisory ledger (
-
GDPR Article 17 Right to Erasure & Benchmark Hardening (September 2026): Implemented permanent cascading user erasure (
eraseUser) inGDPRServiceand exposed authenticatedaction: "erase"andaction: "wipe"on/api/gdpr. Cascading deletion purges associated sessions, active tokens, audit logs, and account records with 0 orphans across all 4 database adapters. Migratedtests/benchmarks/right-to-be-forgotten-audit.test.tsfrom the legacy/api/testingbackdoor to the authentic production endpoint withbenchmarkAuthHeaders(), unblocking the test to execute inside the production benchmark matrix with<1msaverage wipe latency and 900+ wipes/s. Tests:tests/unit/api/gdpr.test.ts,tests/unit/services/gdpr-service.test.ts,tests/benchmarks/right-to-be-forgotten-audit.test.ts. Docs: ADR: Testing 2026. -
Point-Lookup Slab & Hot-Path Serialization (September 2026):
- Random-Access Slab: Implemented a dedicated 2,000-slot FIFO cache (
randomAccessSlab, 30s TTL) for high-frequency point lookups, elevatingfindByIdRandomthroughput by +196% to match the hot-pathfindByIdbaseline. - LRU Protection: Applied
updateAgeOnGet: falseonENTRYandCONTENTlookups, preventing cold random reads from displacing hot cache working sets. - Pattern Invalidation Acceleration: Refactored pattern-based cache clearing to reduce invalidation latency by −87% (4.11ms → 0.53ms), achieving +676% RPS in mutation benchmarks.
- O(N) Fast JSON Serialization: Replaced rope concatenation with pre-allocated buffer joins in
serializeArrayFast(fast-json.ts), eliminating GC pressure duringlistLargequeries. - Pool & SMTP Hardening: Elevated hardware-profile connection pool floors to 32 on 8c+ hosts, and hardened transactional SMTP connection pooling (
maxRecipients: 1,maxMessages: Infinity,connectionTimeout: 10s,socketTimeout: 30s).
- Random-Access Slab: Implemented a dedicated 2,000-slot FIFO cache (
-
Store Architecture Modernization & Svelte 5 Runes Consolidation (September 2026):
- Lean Store Footprint: Consolidated the global store directory from 28 files down to 18 single-purpose domain singletons.
- Monolith Elimination: Removed the legacy
store.svelte.tssingleton and compatibility bridges in favor of direct imports from specialized modules (locale-store.svelte,validation-store.svelte,toast.svelte). - State Absorption: Absorbed satellite stores (
status-store,data-change-store,user-prefs-overlay) into cohesive domain singletons (collection-store,theme-store). - Domain Colocation: Relocated single-consumer stores (
consent-store,settings-state,dashboard-preferences,image-editor-store,help-state) directly into their respective feature and component directories. - Widget & Shell Decoupling: Updated all 72 widget inputs, displays, schemas, and app shell routes to import directly from domain singletons, eliminating dozens of unused legacy imports and standardizing on Svelte 5 fine-grained reactivity (
$state(),$derived()). Tests:tests/unit/stores/,tests/unit/components/image-editor/.
-
Write-Path Acceleration & Single-Pass Field Preparation (August 2026):
- Deduplication of Sanitization Passes: Eliminated redundant recursive
sanitizeObjecttree traversal inprepareWritePayload, relying on the pre-compiledPrepPlaninprepareCollectionFieldsto perform targeted HTML/text sanitization per schema field. - Pre-Compiled Number & DateTime Plans: Pre-compiled DateTime and Numeric constraint plans in
SchemaHotFlags(_dateTimeFieldNames,_numberFields), eliminating runtimeschema.fieldsiteration in the hook pipeline and achieving zero field-iteration loops on write mutations. - Behavioral Mutation Self-Learning: Integrated
recordWriteAccessdirectly intoschedulePostWriteand commerceaddCartItem/decrementStock, feeding mutation signals (weight: 2) into the in-memory decaying heat map without blocking response latency. - Canonical Keyspace Cache-Warming Alignment: Aligned
CacheWarmingServicekeyspace withCollectionsNamespace(${tenant}:collection:${id}:${entry}:publishedand${tenant}:collection:${id}:find:default_50:published), ensuring pre-warmed entries and lists produce 100% cache hits on subsequent SDK reads. - PostgreSQL Parameter Coercion: Hardened
bindPgParamto coerceundefinedtonullacross all prepared statement queries, eliminating driver parameter rejection.
- Deduplication of Sanitization Passes: Eliminated redundant recursive
-
Security Hardening (API & Multi-Tenancy):
-
Universal Tenant Context: Implemented a rigorous middleware-driven
tenantIdpropagation system, ensuring every database mutation and query is explicitly scoped to the correct tenant. -
IDOR Prevention: Hardened all 40+ API endpoints with role-based access control and explicit owner verification.
-
GraphQL Isolation: Eliminated schema leakage by deploying isolated per-tenant Yoga server instances.
-
Tenant-Aware Uniqueness: Implemented granular control for unique field constraints. The
tenantScopedUniqueflag ensures that identifiers like slugs (e.g.,/about) remain unique within a tenant but can safely overlap across different tenants, preventing cross-tenant namespace collisions. -
SSE Hygiene: Resolved a critical memory leak in the real-time event stream and implemented tenant-aware real-time filtering.
-
Encrypted Data Portability: Standardized AES-256-GCM encryption for all sensitive fields during tenant-scoped data exports.
-
Automated Security Response (v2026): Implemented a unified
SecurityResponseServiceproviding:- Structured Payload Scanning: JSON and Form-data aware parsing, avoiding the overhead of raw string scanning on binary/multipart payloads.
- Bounded ReDoS Protection: All security regex patterns now use strictly bounded quantifiers ({0,500}), effectively eliminating the risk of accidental or malicious Regular Expression Denial of Service.
- Distributed Redis State: Security incidents, IP throttles, and blocks are distributed via Redis, ensuring immediate global protection across multi-node clusters.
- Performance Early-Exits: Sub-microsecond
Content-Lengthchecks and a 32KB processing cap for unknown payload types ensure high-volume protection without performance degradation.
-
Hardened Authentication Core:
-
OAuth State Integrity: Native HMAC-SHA256 signing and verification of OAuth states, neutralizing authorization code replay attacks and CSRF during external identity provider flows.
-
Compartmentalized Rate Limiter Secrets: Decoupled RateLimiter cryptographic keys from the primary
JWT_SECRET_KEY, utilizing a dedicatedRATE_LIMIT_SECRETfallback architecture. This containment strategy prevents a leaked rate-limit key from compromising the core authentication perimeter. -
Strict IP Resolution: Implemented
getClientIp(event)across all authentication mutation flows (Login, Sign-Up, Forgot Password), replacing generic “N/A” placeholders in Audit Logs to guarantee high-fidelity forensic traceability. -
RFC 6585 Compliance: Enforced strict
Retry-After: 60HTTP headers for all429 Too Many Requestsresponses generated by the authentication firewall, ensuring respectful client backoff protocols. -
Setup Wizard Gating (June 2026): Hardened setup route handlers (
setup.ts) to query the database and check for registered admin accounts, blocking setup hijacking attempts (403 SETUP_ALREADY_COMPLETE) even if the local config fileconfig/private.tsis deleted or corrupted. -
Stateless CSRF Exemption (June 2026): Excluded Bearer-authenticated API key and Website token requests from CSRF checks in
+server.tsto allow secure external client mutations without blocking browser-based cookie-authenticated sessions.-
Demo Tenant Capacity Guard: Integrated a hard-coded 100-user capacity limit for demo tenant signups, utilizing high-performance
getUserCountadapters to protect the system from automated resource exhaustion attacks. -
L0 Session & Cache Stability (August 2026): Refactored the
InMemorySessionManagerto utilize a bounded directMapwith capacity caps (MAX_SESSIONS = 10000) and proactive timestamp eviction, eliminating GC drop hazards while preventing memory leaks. Additionally, added process-local_clientNodesCachetocontentStoreand_clientSchemamemoization, eliminating repetitive layout JSON serializations.
-
-
TOTP Secret Encryption: TOTP secrets are now encrypted at rest using AES-256-GCM under the instance
-
HKDF + size-aware compression (August 2026): Passphrase-shaped
ENCRYPTION_KEY/SECRET_ENCRYPTION_KEYvalues (not 64-char hex) derive AES-256 keys with HKDF-SHA-256 (cached once per process, domain-separated per subsystem). Decrypt still accepts SHA-256(raw) envelopes. Hex keys are unchanged (AES-NI, no KDF on the request path). Compression negotiation now prefers gzip below 4 KiB and skips zstd below 32 KiB;compressSyncrefuses output that is not smaller than the input. No ML-KEM on the request path. -
SQL PK upsert + bulk import (August 2026):
crud.upsert/upsertManyon SQLite, PostgreSQL, and MariaDB are oneINSERT … ON CONFLICT (_id)/ON DUPLICATE KEYwhen the filter is a primary-key lookup (status-pinned queries still use findOne). Collection import (sync LocalCMS and theimport-datajob) sharesbulkImportCollectionDocuments:findByIds+insertMany/upsertManyper 100-row chunk. -
Automation event→flow index (August 2026): Automation dispatch indexes active event-triggered flows by event name so content mutations resolve matching flows with a single Map lookup instead of scanning every flow. Unmatched events exit before flow iteration.
-
QueryBuilder list + Mongo 1-RT upsert (August 2026): Admin collection lists (
queryBuilder.execute) convert rows in place with registered schema maps on SQLite/PostgreSQL/MariaDB;exists()is LIMIT 1. Mongo upsert is onefindOneAndUpdate(filter carries_id) instead of update-then-create. -
Plugin state + relation batch (August 2026): Extensions uses the layout plugin-state map (one
findMany+ 15s L1) instead of NgetPluginState; config reusesparent().pluginStates. Relation Input/Display issue one_id $inlist request; collection lists hydrate relation labels in onefindByIdsper related collection so table cells skip extra HTTP. -
Remotes skip HTTP-to-self (August 2026): User profile, sessions, tokens, settings groups, and collection save/delete remotes call LocalCMS in-process (
getRequestLocalCMS) instead ofevent.fetch("/api/..."). Dashboard health usescms.db.isConnected()instead of fetching/health. Same privilege strips as the REST handlers. -
SQLite write templates + GraphQL fast path (August 2026): SQLite INSERT synthesizes the row (no
RETURNING *) with a cached SQL template; UPDATE SQL is cached per column-set. GraphQLcontentSystemHealth/allCollectionsskip Yoga/JIT after auth (in-memory catalog/health).
-
-
-
TOTP Replay Protection: A consumed-codes registry using an adapter pattern (in-memory, swappable to Redis/SQLite) prevents TOTP code reuse within the 90-second validity window. Fail-closed design — registry errors reject the code.
-
TOTP Timing Attack Mitigation: Replaced standard string comparisons in the 2FA layer with
crypto.timingSafeEqual, mathematically neutralizing nanosecond-level side-channel attacks on TOTP code verification.- Trusted Devices: HMAC-SHA256 signed __Host-2fa-trusted-device cookie (30-day TTL) enables “Remember this device” — subsequent logins skip 2FA on recognized devices. Forgery-proof design using the instance’s ENCRYPTION_KEY.
-
Plugin Auth Hooks: New afterAuthenticate lifecycle hook allows plugins to deny logins or enforce 2FA gating on any authentication method (password, OAuth, passkey, token, magic link). Fires after credential verification but before session cookie issuance.
-
Pending 2FA Setup: Encrypted TOTP secrets are persisted immediately during setup with twoFactorPending: true — interrupted enrollment is automatically resumed on re-initiation.
-
Configurable TOTP Window: TOTP_WINDOW env var (default 1, max 5) for clock-drift tolerance without code changes.
-
Fallback Garbage Collection Resilience: Hardened the session cleanup loop to guarantee that in-memory fallback caches are continuously pruned even when a
RedisSessionManageris actively managing the primary connection, ensuring zero memory leaks during Redis outages.-
May 2026 AI Bot Defense & Crypto Hardening:
-
AI Bot Detection & Blocking: Proactive User-Agent fingerprinting detects and blocks 28 known AI crawler patterns (GPTBot, Claude, Perplexity, CommonCrawl, Bytespider) and reconnaissance tools (Nmap, SQLMap, Nikto, Burp Suite, Zgrab, Masscan, Nessus).
-
Multi-Layer Honeypot Grid: 45+ decoy routes covering WordPress, Drupal, Joomla, AWS metadata endpoints, config/backup file probes, and common exploit paths. Any probe triggers immediate IP flagging/blacklisting.
-
Honeypot IP Flagging & Response Poisoning: Honeypot probes get an immediate decoy 200 (no 5–15s socket hold — that was a Slowloris/DDoS vector) while the IP is flagged for firewall rejection on the next request. Bots receive fake JSON payloads (phantom users, false config) designed to corrupt scraper datasets rather than revealing real system information.
-
Cross-Origin Isolation Headers: All API responses enforce
Cross-Origin-Opener-Policy: same-origin,Cross-Origin-Embedder-Policy: require-corp, andCross-Origin-Resource-Policy: same-origin, preventing Spectre/Meltdown side-channel attacks.- Zero-Bias Token Generation:
generateRandomTokennow uses rejection sampling to eliminate ~3.125% modulo bias, guaranteeing uniform CSPRNG distribution for session tokens and API keys.
- Zero-Bias Token Generation:
-
Setup Cookie Prefix Consistency: Setup handler now uses consistent
__Host-cookie prefix logic, closing the gap between runtime and initialization session cookie naming.
-
-
June 2026 Comprehensive Security Audit & Hardening: Full-stack codebase audit against dependency stack, security architecture docs, and CVE landscape. Closed 6 gaps:
-
SVG Polyglot Upload Sanitization: Server-side
sanitizeSvg()strips scripts, foreignObject, event handlers,javascript:/data:URIs, CDATA, XML PIs, and DOCTYPE from uploaded SVG files. -
S3 Endpoint SSRF Prevention:
validateS3Endpoint()blocks private IPs (127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16), cloud metadata hosts, and non-HTTP protocols before S3Client creation.- Ollama RAG Prompt Injection Defense: Remote knowledge-base context relocated to
usermessage role with<rag_context>XML delimiters and control-character stripping.
- Ollama RAG Prompt Injection Defense: Remote knowledge-base context relocated to
-
GraphQL Introspection Explicit Blocking:
NoSchemaIntrospectionCustomRuleapplied in production, preventing unauthenticated__schemaenumeration. -
Tiptap Link Protocol Hardening: Protocol allowlist
["http", "https", "mailto", "tel"]blocksjavascript:anddata:URI injection at editor level.- Rate Limiter Dependency Hygiene:
sveltekit-rate-limitermoved fromdevDependenciestodependenciesto guarantee production build inclusion. All 64 defense-in-depth security regression tests pass. 0 lint errors. 0 type errors.
- Rate Limiter Dependency Hygiene:
-
-
4-Layer Defense-in-Depth Authorization: Most CMS platforms (Payload, Strapi, Directus) rely on a perimeter security model: authenticate at the gate, then assume internal trust. This creates dangerous gaps where an authenticated user with low privileges can exploit deeper vulnerabilities. SveltyCMS eliminates this assumption through 4-layer zero-trust re-validation:
-
Layer 1 — Middleware:
__Host-cookie prefix enforcement (RFC 6265bis), setup completion gating, CSRF protection. -
Layer 2 — Dispatcher: Fail-closed
hasApiPermission()checks; unmapped namespaces return 403 by default. -
Layer 3 — Handler: Admin verification for system mutations,
media:write/media:deletepermission checks. -
Layer 4 — Page Action: Centralized permission guards (e.g.,
requireCollectionBuilderPermission). Each layer re-validates permissions independently, and the system fails safely if any check fails. This “zero trust within the application” architecture is rare among open-source CMS platforms and makes entire classes of vulnerabilities impossible — a single compromised perimeter layer does not grant full access.
-
-
ETag Conditional Requests: Implemented HTTP ETag support in the central API dispatcher. Every GET 200 response receives a SHA-256-based ETag header (first 16 hex chars of the response body hash). The dispatcher checks the If-None-Match request header and returns 304 Not Modified with zero body when content has not changed. This reduces bandwidth consumption and server processing for cache-valid clients, with sub-microsecond hash computation overhead per response.
-
API Versioning: Added X-API-Version: 1 header to all API responses. The dispatcher automatically strips /v1/ path prefixes for backward-compatible routing (e.g., /api/v1/collections/posts to /api/collections/posts). This enables future /api/v2/ endpoints without breaking existing clients, while existing /api/ paths continue working unchanged.
-
Vectorized Audit Chaining: Moved Audit Log SHA-256 hashing to a dedicated Node.js
Worker Threadpool. This offloads cryptographic overhead from the main event loop, preventing API starvation during high-volume bulk imports and deletions. -
Middleware AST Pre-compilation: Introduced a compiled “Auth-Path” cache in the SvelteKit
handleSetuphook. Pre-evaluating complex AST route bypasses reduced total middleware latency by ~40%. -
Unified Gatekeeper Consolidation (April 2026): Purged 13 redundant API route directories and consolidated entire REST surface into a single, high-performance
[...path]dispatcher. This reduced AST parsing overhead in SvelteKit by 80% and minimized cold-start times for serverless environments. -
Enterprise “Immunity” Layer (April 2026):
- Global Security Guard: A top-level wrapper ensuring HSTS, CSP, and X-Frame-Options are injected into every response, including error boundaries and redirects.
- Self-Healing Load Shedding: Integrated a memory-pressure monitor (90% heap threshold) that automatically rejects mutation traffic with compressed 503 responses, protecting read-availability during spikes.
- Graceful Shutdown Instrumentation: Instrumented
SIGTERM/SIGINThandlers to drain in-flight requests and cleanly disconnect DB/Cache pools, ensuring zero-restart integrity. - Timing-Safe Cryptography: Protected CI/CD test bypasses using
crypto.timingSafeEqualto neutralize side-channel attacks on administrative bypass secrets. - Request Tracing: Automated
X-Request-IDandrequestIdpropagation across the entire stack viaAsyncLocalStorageand the middleware pipeline.
-
Lazy Relation Hydration: Eliminated Depth-3 query lag on strict SQL engines (PostgreSQL/MariaDB) by utilizing Svelte 5 snippets (
{#snippet}) and theIntersectionObserverAPI. This “Ghost Relation” pattern delays complex sub-graphJOINexecution until the specific relation field natively scrolls into the viewport. -
L1/L2 cache (v0.0.7+): Hybrid LRU + optional Redis. Hot-path hits bypass the DB driver; LocalCMS / L1-hot internal timings can land in the sub-0.1 ms class in our micro-benches. Percent reductions vs a specific prior baseline are scenario-dependent — reproduce with
tests/benchmarks/cache-*.test.ts/ LocalCMS benches.Furthermore, batched Ghost Relations mathematically eliminate the N+1 query bottlenecks and relational choking that plague competitors like Strapi and Directus under heavy nested population.
-
Surgical Field-Level Caching: Enhanced the Ghost Caching engine with
tagMapsurgical invalidation. Single-field updates (e.g.,viewCount) now trigger targeted purges of specific document keys instead of flushing entire collections, maintaining “Hot L1” status for 99% of unrelated traffic. -
Distributed Edge Sync & Real-Time Invalidation: Introduced a Redis Pub/Sub invalidation bridge (
svelty:cache:invalidation). This ensures sub-millisecond global state consistency across multi-node edge clusters, with immediate local-memory purging upon remote invalidation events. -
Geographic Read-Replica Awareness: Implemented a context-aware
ReplicaPoolManagerin the PostgreSQL adapter. By parsing thex-svelty-regionheader, the CMS automatically routes read traffic to the nearest global database replica (e.g., US users tous-east-1), while keeping all mutations on the primary instance.- Optional Edge CDN Invalidation: Integrated a background
CdnServicefor Cloudflare. Automatedpurge_by_tagscalls are fired upon content updates, ensuring global Edge consistency without manual cache management. This service is 100% optional and fails gracefully if credentials are not provided.
- Optional Edge CDN Invalidation: Integrated a background
-
Hardened Telemetry Protocol: HMAC-SHA256 registration handshakes for lifecycle reporting to make spoofed heartbeats harder (not a formal PKI guarantee).
-
Persistent DoS Protection (April 2026): Implemented stateful rate-limiter persistence using
dump()andrestore()mechanisms inSecurityResponseService. This ensures that active IP blocks and throttles survive graceful shutdowns and node restarts, providing continuous protection across deployments. -
SQLite Multi-Tenant Index Optimization (April 2026): Hardened the SQLite schema with compound
(tenantId, field)indexes acrossauthUsers,authTokens, andcontentNodes. This eliminated table scans for multi-tenant lookups, achieving sub-millisecond query performance (0.000ms - 0.007ms) even under high concurrency. -
Connection Resilience Hardening (June 2026): Fixed undici pool hangs when rejected HTTP response bodies were left unconsumed (brownout simulations). Chaos-resilience benches pass after consuming failed bodies; re-run
tests/benchmarks/chaos-resilience.test.tsfor current numbers.
-
2.2.1 Scaling benches (April 2026, self-measured)
Selected high-load results from our suites (not “zero overhead” as a universal claim):
-
Hot REST/read path: On the order of sub-ms entry retrieval when schema/cache is warm (scenario-dependent).
-
Content scanning: Worker-pool scan of large collection sets measured in sub-ms–low-ms class under our content-scan bench.
-
Bulk ingestion: Order of ~10k entries / ~1s class in migration-scale style benches (machine- and DB-dependent).
-
Revision-heavy docs: Lookup degradation under many revisions constrained by indexing strategy in revision benches (see benchmark ledger for latest %).
-
Write-path span attribution (2026-09-22, self-measured):
PROFILE_WRITE=1spans now cover the whole create/update pipeline (ns:prep:*,ns:beforeSave,ns:persist:adapter-write,ns:persist:outbox,db:ins:*,db:upd:*) with correct span boundaries — the previousns:sanitize+validatespan closed after the DB write, which inflated validation to 1.14 ms and made it look like the dominant write cost. Real split at 1c:ns:persist:adapter-write0.24 ms (of which the bare statement call is 0.11–0.18 ms),ns:sanitize+validate0.035 ms,ns:beforeSave0.013 ms, row normalization 0.009–0.011 ms, widgets/encryption/outbox ≈ 0. Driver choice is not a factor (node:sqlite 37.8 µs vs bun:sqlite 35.4 µs per INSERT in a like-for-like probe). -
Middleware attribution for the write lane (2026-09-22, self-measured):
hooks-performance.test.tsnow reports per-scenario pipeline costs, and the measured middleware-only delta between the light turbo lane and the full auth+security lane is +0.01–0.09 ms — i.e. the middleware chain is not where the mutation row’s cost sits (mutation 1.99 ms vs warm reads 0.40–0.47 ms, audit disabled). -
Rejection-path cost parity (2026-09-22, self-measured, fixed): a 401 used to cost ~2× a valid read in
tests/benchmarks/auth-performance.test.ts(every rejected flavour 0.84–1.00 ms vs 0.40–0.46 ms authenticated; SQLite, warm). The root cause was outside the middleware: the production 401/403 fast-path envelopes (src/utils/error-handling.ts) were the only API responses built without acontent-length, sohandleCompressionread them as “unknown size”, skipped both the <1 KiB skip-gate and the buffered tier, and negotiated the streaming tier — a fresh zstd stream per reject (~0.45 ms for a 64-byte body;Accept-Encoding: identityrestored the cheap path, which isolated it). Thesequence()spans also nest, so “every phase wrapper inflates” was a nesting artifact rather than evidence of a per-stage cost. After declaring the length, the reject rows land at 0.35–0.39 ms — parity with the authenticated rows (0.33–0.36 ms turbo-served, 0.29–0.33 ms full chain; five runs each side, 2026-09-22). The harness now prints a live lane/cache/hook-count table per row, becauseAuth Validation @ 1cis turbo-cache served (4 hooks) while a rejection runs the full chain (7), andAuth (full chain) @ 1cis the like-for-like authenticated row (10 hooks). Supersedes the earlier “1.85x Fast-Fail Efficiency” figure (pre rate-limit/AMR/WAF consolidation) and the “cause is an open roadmap item” note — see Server Hooks. -
Monitoring Tax Elimination: Reduced health-probe latency to 0.45ms via intelligent caching, protecting production CPU cycles from monitoring overhead.
-
Cold point-read response audit (2026-09-22, self-measured, fixed + refuted): the “unknown size” trap behind the rejection fix was swept across every hand-built response. Fixed: the API cache-hit path (
src/hooks/handle-api-requests.tsserveCachedEntry) deleted its inheritedcontent-length, so every L1/L2 cache hit — 0.1 KB envelope to 250 KB list — was negotiated into the streaming compression tier instead of the<1 KiBskip-gate or the ≤ 64 KiB buffered tier; it now declares the length of the body it actually sends (computed, never the stale cached value), withtests/unit/hooks/api-requests.test.tspinning the contract. Fixed the same way: the 62 B503 Database adapter unavailableenvelope inhandle-local-context.ts. Already compliant (verified, not changed):buildJsonResponse/fastSuccessResponse(computed length), the error envelopes, the rebuilt token-resolution response,/files(declared from the file stat), and every reject fromhandleSecurity/handleRateLimit/handleTurboPipeline— those return upstream of the compression stage, so no fix applies. The competitivefindByIdRandomrow itself is not affected by any of this: a warm session’s point read is served by the collection read lane, which returns fromhandlebefore the middleware chain and never reaches compression. Its cost was attributed end-to-end instead (laneHYPER_TURBO/MISS, 676 B body + 26 headers = 1279 B on the wire; 10 k-doc replica, 8 c, n = 6790 misses): SDKfindById55 µs (SQLite driver 27 µs, row/date conversion 12 µs, JSON + point-cache insert 25 µs), response construction 69 µs, SDK facade + session/tenant prep 20 µs — against a raw-HTTP floor of 28 µs (raw-db-ceiling.ts --db=sqlite) and ~10 % of server CPU in undici header/body plumbing vs ~4.5 % in all bundled CMS chunks. No lane-local step is provably unnecessary, and none is big enough to close a ~70 µs gap — the row’s headroom is framework/driver/transport, tracked in the roadmap rather than “fixed” with a speculative change. Three fingerprint-pinned runs per side: warm sequential 0.430–0.515 ms before vs 0.356–0.469 ms after (medians 0.451 vs 0.443 ms), warm 8c 2.215–2.273 ms before vs 2.266–2.698 ms after (medians 2.236 vs 2.384 ms) — ±13–20 % machine noise that swallows the difference both ways, as expected for a fix that is off this row’s code path. Details and the per-site table: Server Hooks. -
Simulated Form Vitality: Proved a sub-0.05ms server prep time for complex 50-field forms, ensuring the Admin UX feels instantaneous regardless of schema complexity.
-
Transparent AI Integration: Reduced CMS-side AI logic tax to 1.3ms, ensuring the platform adds zero perceived latency to generative workflows.
-
High-Throughput Large-Payload & Concurrency Scaling (September 2026):
- Single-Pass V8 JSON Serialization: Replaced intermediate string template allocation in
successResponsewith direct V8 streaming serialization, reducing 225 KB payload serialization time from 1.47s to 650ms (55.7% latency reduction) in micro-benchmarks. - SIMD-Accelerated ByteLength Calculation: Fast-paths payloads $\ge$ 1 KB to AVX2/SSE4.2 SIMD
Buffer.byteLength(), eliminating JavaScript character-by-character loops on large responses. - L1 Query Cache Retention: Kept
CacheCategory.CONTENTwithupdateAgeOnGet: true(restrictingcoldCategorytoENTRY), ensuring high-traffic collection queries and pagination pages stay hot in L1 cache under concurrent workloads. - Adaptive Brotli Quality Scaling: Lowered Brotli compression quality for dynamic API responses between 32 KB and 256 KB from quality 6 to 2 (4.4× faster compression with <0.1% ratio difference), preventing threadpool saturation under multi-worker spikes.
- Hardware-Concurrent Libuv Threadpool: Automatic boot-time scaling of
UV_THREADPOOL_SIZEup to 32 worker threads prior to module initialization in the shared server entry (index.server.mjs), on both Node.js and Bun.
- Single-Pass V8 JSON Serialization: Replaced intermediate string template allocation in
2.3 The Typed Widget Revolution (March 2026)
One of the most significant architectural leaps in 2026 was the migration of the “Three Pillars” widget system from string-based paths to Type-Safe Component Loaders.
- The Problem: Legacy CMS architectures (including early SveltyCMS) relied on strings like
inputComponentPath: './MyWidget.svelte'. This prevented IDE refactoring, required giantimport.meta.globscans, and led to runtime “module not found” errors. - The Solution: Redesigned the
createWidgetfactory to accept typedComponentLoaderclosures:() => import('./input.svelte'). - Result:
- Zero Runtime Surprises: Broken paths are caught at compile-time by TypeScript and Svelte Check.
- Perfect Tree-Shaking: Vite no longer bundles unused widgets; only the components for enabled widgets are loaded.
- AI Integrity: The
jsonRendercatalog validates referenced components at load time to fail closed on missing widgets (not a cryptographic proof system).
2.4 Core Utilities Standardization (March 2026)
To support the UI migration and global dynamic content, SveltyCMS standardized its core utility belt:
cn: High-performance Tailwind class merging (powered bytailwind-mergeandclsx) resolving “ESM Storms” in UI components.pluralize: A dynamic, runtime counterpart to Paraglide JS, leveragingIntl.PluralRulesto accurately pluralize Arabic, Russian, and English database content (which cannot be pre-compiled).slugify: Advanced Unicode normalization engine capable of safely trans-literating complex diacritics into URL-safe identifiers.
3. Performance & Competitive Analysis
3.1 Competitive Feature Matrix (2026)
The following matrix evaluates core engineering implementations where SveltyCMS provides a distinct technical advantage over legacy and contemporary competitors.
| Feature | SveltyCMS (v2026) | Strapi 5 | Payload 3.0 | Directus 11 | Sveltia CMS |
|---|---|---|---|---|---|
| Core Framework | Svelte 5 (Runes) | React | Next.js / React | Vue / Node.js | Svelte (SPA) |
| Architecture | Server-First (SSR) | Node.js / React | Next.js / React | Node.js / Vue | Git-based (Local) |
| Multi-Tenancy | Native Adapter-Level | Paid (Enterprise) | Plugin-based | Native | N/A |
| Slug Uniqueness | Tenant-Scoped (Native) | Global Only | Global Only | Manual Config | Locale-Agnostic |
| AI Architecture | Local (Ollama) + Cloud + Client‑Side (LiteRT.js) | Cloud Only (Paid) | MCP Native (Cloud) | Cloud Only (Paid) | N/A |
| Dual-Runtime | ✅ Dual-Adapter (Node.js + native Bun.serve) | Node.js only | Node.js only | Node.js only | Browser Only |
| Real-time Sync | SSE + Yjs (adapter-node compatible) | WebSockets | None / Custom | WebSockets | Git Pull/Push |
| Feature | SveltyCMS (v2026) | Strapi 5 | Payload 3.0 | Directus 11 | Sveltia CMS |
|---|---|---|---|---|---|
| Cache Repair | Smart / Incremental | Manual Clear | Manual Clear | Manual Clear | Browser Only |
| SDK Latency | Zero (Local Bridge) | 2–5ms (Local HTTP) | ~1ms (Direct) | 3–8ms (Local HTTP) | N/A |
| Negative Caching | Bloom Filter (100,000x) | None / DB query | None / DB query | None / DB query | N/A |
| SEO Redirects | 0.92 ms (Sub-MS) | ~45 ms (Plugin) | ✅ Plugin | ⚠️ Basic | ⚠️ Basic |
| Toolchain | Vite + oxlint/oxfmt | Vite (JS/TS) | Vite (JS/TS) | Vite (JS/TS) | Rolldown/Vite |
| Feature | SveltyCMS (v2026) | Strapi 5 | Payload 3.0 | Directus 11 | Sveltia CMS |
|---|---|---|---|---|---|
| Scheduled Publishing | ✅ Adaptive Job Scheduler | ⚠️ Cron Plugin | ✅ Job Queue | ✅ Flows | ❌ |
| Content Versioning | ✅ Revisions + Diff + Restore | ⚠️ Basic | ✅ Versions | ✅ Revisions | ❌ |
| Per-Field Localization | ✅ Record |
⚠️ Separate Entries | ✅ | ✅ | ❌ |
| Full-Text Search | ⚠️ FTS adapters on all 4 engines (not wired) | ⚠️ Plugin | ⚠️ Plugin | ⚠️ Plugin | ❌ |
| Crypto-Chained Audit | ✅ SHA-256 Tamper-Evident | ❌ | ❌ | ❌ | ❌ |
| Smart CMS Migration | ✅ AI-Smart 5-Format Importer | ❌ | ❌ | ❌ | ❌ |
| Cold Start UX | ✅ Progressive / gated init (self-measured) | ⚠️ Spinner | ⚠️ Spinner | ⚠️ Spinner | ✅ Local |
| Quick-Start Templates | ✅ 7 Presets (Website Starter default) | ❌ | ❌ | ❌ | ❌ |
| In-Repo Site Frontend | ✅ SvelteKit + Svedit at / |
❌ (bring your own) | ❌ | ❌ | ⚠️ Git-only |
| Behavioral Learning | ✅ Server-side, zero PII | ❌ | ❌ | ❌ | ❌ |
| AI Widget Scaffolder | ✅ LLM-ready code generation | ❌ | ❌ | ❌ | ❌ |
| Token Security | ✅ SHA-256 all adapters | ⚠️ | ⚠️ | ⚠️ | ❌ |
3.2 Competitive Benchmark Analysis (2026)
See Competitive Comparison for the full benchmark matrix — every registered module across all 4 databases under extreme concurrent load (source of truth for the matrix: Benchmarks), with per-adapter throughput, Local SDK, and competitor comparisons (Payload, Directus, Strapi, Drupal, WordPress).
What our benchmarks actually show (not a global ranking)
We do not claim global product speed leadership. Public competitor numbers rarely use the same hardware, dataset, or middleware stack. Below is self-measured behavior only.
| Layer | Self-measured order of magnitude (2026) | Caveat |
|---|---|---|
| LocalCMS / in-process SDK | Sub-0.1 ms class internal calls when L1-hot | Not comparable to another product’s HTTP API RPS |
| SQLite adapter FIND ONE | ~0.05–0.08 ms avg (2026-08-04 re-bench) | Embedded; no network RTT |
| Networked adapter FIND/INSERT | ~0.5–2+ ms avg on local Docker (PG/Maria/Mongo) | Dominated by loopback RTT + engine |
findPage vs list+count |
~1.6–5.7× fewer ms on dual-query path (same re-bench) | Product API change; call sites must use findPage |
| Count L1 cache hit | ~0.024–0.029 ms all engines | count only, not full list JSON |
| Count estimate (unfiltered) | ~3–10× vs exact when mode allows | Never used for tenant-scoped exactness |
Full tables: Performance Architecture · matrix: Benchmarks · buyer framing: Competitive Comparison.
Understanding Executive Latency Uniformity Across Adapters
It is entirely normal and expected for raw CRUD execution matrices to look nearly identical for individual operations within a single database dialect (e.g., PostgreSQL FIND ONE at ~0.85ms vs UPDATE at ~2.15ms across runs). This occurs because:
- Network RTT & Loopback IPC Overhead: Under local containerized testing (Docker), loopback socket traversal and TCP handshake serialization impose a fixed 0.4–0.8ms latency floor regardless of query complexity.
- Standardized Drizzle SQL Generation: The unified Drizzle AST compiler emits identical SQL query structures for single-record lookups across all relational adapters.
- Hardware Engine Isolation: Below the
hooks.server.tsmiddleware pipeline, raw adapter performance reflects the underlying database engine’s storage locks (e.g. WiredTiger in Mongo, InnoDB in MariaDB, WAL in SQLite).
Reproduce locally:
bun test tests/benchmarks/database-performance.test.ts BENCHMARK_RECORD=1 bun test tests/benchmarks/database-performance.test.ts bun run scripts/benchmark-matrix/index.ts --sql8 database reports available at
docs/project/benchmarks/benchmark_<db>.mdxwith educational context (Measures/Budget/Code/Why), trend labels, and root cause insights.
Earlier 2026 (condensed archive: June–August)
Condensed 2026-09-27: the headline results, measurements and their conditions are retained in full; only narrative prose was removed. The September entries below (3.15 onwards) remain in full detail.
3.3 June 2026 Enhancement Sprint — Closing the Feature Gap
- Scheduled publishing (production-ready): adaptive job scheduler (
src/services/scheduler.ts) polls every 1-second when jobs are pending and every 30-second when idle, at sub-0.1ms CPU per poll cycle; automatic draft→publish, publish→unpublish and scheduled-delete transitions; failures retry with 2^n-second backoff (max 3 attempts) and every execution gets a crypto-chained audit entry; CRUD viaPOST/DELETE /api/system-jobs; the right-sidebar “Schedule publication” creates real, cancellable jobs. - Per-field content localization: translated fields store all language variants in one document (
Record<Locale, string>, e.g.{ en: "Hello", de: "Hallo", fr: "Bonjour" }), with an inline[EN ▼]locale switcher,{#key fieldName:locale}scoped remounting, one-click AI translation (caching, rate limiting, audit logging), automatic migration of legacy single-string fields, and per-field per-localetranslationProgress. - Crypto-chained audit logs (SHA-256): every entry stores
previousHash(SHA-256 of the prior entry) andchainHash(SHA-256 of self + previousHash), generated with the CSPRNGglobalThis.crypto.subtle.digest('SHA-256')(no Math.random() fallback);verifyChain()detects tampering, deletion or reordering; a newAuditHistorycomponent shows a visual chain indicator with a “Verify Chain” button; the schema was extended across all 4 database adapters; SOC 2, ISO 27001 and GDPR Article 30 ready. - Database-native full-text search (implemented, not yet wired as of 2026-09): zero additional npm packages — PostgreSQL
tsvector/tsquerywith weighted column ranking (title:A, content:B, description:C), MariaDBMATCH...AGAINST IN BOOLEAN MODEwith FULLTEXT indexes, SQLite FTS5 virtual tables with BM25 ranking, MongoDB$textwith field weights, andILIKE/LIKEfallback; the live?search=path still uses schema-drivenLIKE/regex matching. - Smart AI-Driven Migration Pro v2.1 (June 2026): 40+ CMS platforms through 40 parsers (12 PHP CMS + 4 headless SaaS + SveltyCMS native) plus 9 universal formats (CSV, Markdown, SQL, API, JSON, Airtable, Notion, Firebase, MongoDB); 5-step wizard (
?plugin=smart-importer,TransformationTree, SSE/api/migration/import) with auto-scaffold (collection-scaffold.ts,infer-collection.ts); 98 unit tests; background queue at 500+ entries; freemium split of 5 platforms + 9 universal formats free vs 31 additional platforms and enterprise features (rollback, delta, PII, webhooks, audit logs) via marketplace license. - Collection Builder quick-start templates: 7 setup presets — Website Starter is the recommended default; five additional content templates ship full schemas (Blog/Editorial, Agency/Portfolio, SaaS Product, Corporate Site, E-commerce, Blank).
- Website Starter + Svedit (July 2026):
svedit@0.12.0public routes (src/routes/(site)/) cover the SSR homepage (slug: home→/) and catch-all pages;SITE_STARTER_ENABLEDdefaults totrue; CMS form + Svedit JSON saves are free while the Editable Website plugin (€14.99, 14-day trial) gates Live Preview and inline click-to-edit; 15 unit tests plus asite-starter.spec.tsE2E smoke. - Cold start & progressive init:
handleSystemStatewaits synchronously for the DB on the first request (no intermediate page or polling), empty collections redirect straight to Collection Builder, andMAINTENANCE/FAILEDstates render the standard SvelteKit error page. - Auth expansion:
sck_*API keys stored SHA-256-hashed across all 4 DB adapters (generateApiKey(),createApiKey/revokeApiKey/listApiKeys,GET/POST/DELETE /api/api-keys,apikey:{sha256-b64url}cache tags,invalidateApiKeyAuth()L1/L2 purge,api:api-keyspermission); single-use magic links consumed atomically (TOCTOU guard); ephemeralANONYMOUS_USERguest role withcontent:read/media:readonly and no session or cookie; WebAuthn/passkeys ~75% complete (webauthn-cbor7 pass,webauthn-attestation4 pass, pending settings-page UI); 32 auth-expansion tests + 68 defense-in-depth security regression tests — all passing. - SSRF IPv6 transition blocking: the egress guard and cloud-storage validator now block IPv4-mapped IPv6 (
::ffff:0:0/96, e.g.::ffff:127.0.0.1), 6to4 (2002::/16), Teredo (2001::/32) and bare IPv6 hosts with zone IDs (::1,fe80::1%eth0), closing paths such ashttp://[::ffff:127.0.0.1]:27017/into local services. - Binary MIME sniffing for large uploads: files of 5MB and above are now verified via
file.slice(0, 2048)before stream processing (smaller files already usedsniffMimeType(buffer.subarray(0, 2048))); the ~2KB zero-dependencyslim-sniffer.server.tsdetects 10+ formats by magic bytes (JPEG, PNG, GIF, WebP, SVG, MP4, WebM, PDF, DOCX) and SVGs additionally passsanitizeSvg(). - Email normalization:
normalizeEmail()(Unicode NFC normalization, whitespace trimming, case-folding) is applied across all 5 auth adapters, replacing 13 raw.toLowerCase()call sites and closing homoglyph account duplication. - Scheduled-publish integrity: a pre-publish scan builds a
nodeStatusByIdstatus map and inspects relation values matching MongoDB ObjectId patterns (24-char hex), skipping the publish when a referenced entry is still draft;cacheService.invalidateCollection()now runs after each scheduled publish, clearing L1 + L2 so GraphQLpublicationFilterresults stay fresh. - Bulk-update and batch fixes:
copyDataWithFreshRowIds()regenerates_dndId,_rowId,uuidandkeyviacrypto.randomUUID()in the SDKbulkUpdate(); MongoDBbulkWriteswitched from{ ordered: false }to{ ordered: true }to preserve write order (negligible performance impact; SQLite already sequential). - Dashboard chunk retry:
retryDynamicImport()usesbaseDelay × 2^attemptbackoff (1s, 2s, 4s) with+random(0, 200ms)jitter,maxRetries3 andbaseDelayMs1000, wired into dashboard widget dynamic imports with toast error UX. - Data Operations — 6 API domains (July 2026): replaces the placeholder
/api/config_syncendpoint — Configuration Promotion/api/config/*(ConfigService, 1,066 lines), Content Packages/api/content-export/*+/api/content-import/*(ContentPackageService, 1,133 lines; NDJSON streaming; 4 duplicate strategies skip/update/create-copy/fail), Data Migrations/api/migrations/*(MigrationEngine, 984 lines), External Importers/api/importers/*, Backups & Restore/api/backups/*(BackupService, 1,770 lines; SHA-256 manifest integrity + AES-256-GCM encryption), Content Sync/api/content-sync/*(ContentSyncService, 785 lines; disabled by default). - Data Operations surface & measured performance (SQLite): fail-closed granular read/write/apply permissions per namespace (unmapped namespaces return 403); 15 new webhook event types; GraphQL 16 types, 4 queries, 12 mutations; 6 lazy-loaded LocalCMS namespaces at 0% middleware tax; all 5 core services use
dbAdapter.crudon MongoDB, PostgreSQL, MariaDB and SQLite; 89 new unit tests (config-service 20, config-permissions 24, operation-plan 26, identity-matching 19); 2 new benchmark suites (config-promotion 297 lines / 6 scenarios; content-package 2 scenarios); measured: config status 3.3ms avg, export (100 cols) 5.3ms avg, plan 3.1ms avg, apply 3.6ms avg, content-package export (100 entries) 1.12ms avg, import plan 1.01ms avg, SDK overhead 0.00% — all operations sub-5ms.
3.4 June 2026 All-Phase Performance Optimization Sprint
- Sprint scope: mid-June 2026, a 19-file multi-phase optimization sprint driven by the 53-script benchmark matrix.
- Phases R1/R2 — hot path: hook timing (
performance.now(),traceSpan, Map writes) gated out of production viaHOOK_TIMING_ENABLED(also underBENCHMARK=true); pre-compressed Brotli/gzip cache entries stored on MISS and served directly on HIT;X-Original-Size/X-Compressed-Size/X-Compression-Ratio/X-Compression-Algorithmheaders pluscompression.*benchmark metrics; bulk cache clears via Set iterators,_isBulkClearingdeferred tag cleanup, and a_cdnActivefast-path that skips the dynamic import chain when no Cloudflare credentials are configured, with sharedsetCompressionHeaders(),negotiateEncoding()andhasNativeCompression()utilities. - Phase P1 — audit/turbo: fire-and-forget audit logging (user context captured before
await resolve(event), log written in a detached promise); the June 14 “−3.57 ms” audit-overhead reading was retracted as a lane mismatch — the same mutation lane now reads 0.590 ms warm / 0.874 ms p95 (ledger, 2026-09-18) and ~2.0 ms in the 2026-09-22 standalone re-run;__turboAuthskips double audit logging on turbo-served mutations. - Phase P2 — cold path: OpenAPI pre-warm (
apiSpecService.generateFullSpec()after content init) removes the ~2.2ms cold first-hit on/api/openapi.json;clearLocalL1ByTagsswitched to batched collection + deferred tag cleanup. - Phase P3c/3a — batch relational upserts:
setManyreplaces N individualSELECT+INSERT/UPDATEloops with oneINSERT ... ON CONFLICT DO UPDATE(dialect-specificexcluded.*/VALUES()), turning ~80 setup-seeding queries into 1; measured June 14 RECORD runs — relational deep 3.61ms avg / 6.06ms p95 (−88% avg, −86% p95), relational shallow 6.68ms avg / 10.71ms p95 / 146 RPS (−78% avg, −75% p95, +336% RPS); reorders wrapped in single transactions. - Phase 3b — trained zstd dictionary removed: 0% improvement over generic Brotli at production quality levels (Brotli-4) and no
BROTLI_PARAM_DICTIONARYexposure, so the builder, dictionary files and runtime loading code were deleted. - Enterprise scaling layers: PgBouncer/ProxySQL/Nginx documentation with inline copy-paste configs in
scaling-layers.mdx,DATABASE_PREPAREcontrol for prepared statements behind transaction-mode poolers, and pooler URL support across PostgreSQL/MariaDB adapters; all layers optional — single-node SQLite + L1 remains valid, with Redis for cross-node invalidation, PgBouncer for Postgres multiplexing and Nginx for TLS/static offload. - Measured results table (
BENCHMARK_RECORD=1, June 14 2026): pre-fix relational ~30ms N+1 estimates → 3.61ms avg (−88% avg, −86% p95) and 6.68ms avg / 146 RPS (−78% avg, +336% RPS); setup seeding ~80 individual queries → 1 batch (−98% round-trips); mutation + audit 1.90ms avg (2026-06-14); bulk cache clear ~3-5× less allocation; CDN purge ~100× less overhead; OpenAPI cold first-hit ~2.2ms → 0ms — methodology: all gains measured viaBENCHMARK_RECORD=1on Intel i7-13700H, 32GB DDR5, Windows 11, Bun 1.3.14, SQLite WAL mode. - June 20 soak test: sustained mixed workload (health checks, collection listing, entry reads, schema resolution) at 4 concurrent workers — 5 minutes in CI, 4+ hours locally — recorded 8,989 total requests, 0 errors, RSS 351 → 312 MB (−39 MB), heap slope −0.3 MB/min (a positive slope above 1.0 MB/min would indicate a leak) and latency drift −0.6 ms/min.
- June 20 stability proofs: SQLite failover recovery in 78ms (service restored under 100ms after a simulated disconnect); large-payload streaming at 333 MB/s with a STREAMING verdict — 5-10MB uploads stream without full buffering and RSS delta stays under 6× file size; SqlAdapterCore refactor eliminated 1,644 lines (−30.6%) with all 1,152 unit tests passing; 4 security fixes (2 CRITICAL token-hashing, 2 HIGH race conditions) — website and auth tokens now SHA-256 hashed across all adapters with atomic consumeToken.
- June 20 behavioral learning (active): server-side, tenant-isolated, zero-PII tracking with
recordCollectionAccess()under 0.001ms,recordEntryAccess()under 0.001ms,predictNextPath()under 0.05ms andgetHotCollections()under 0.05ms, feeding adaptive cache warming, prefetch hints and dashboard reordering. - June 20 AI scaffolder & marketplace: one-click
installPlugin()frommarketplace.sveltycms.com;scaffoldWidget(config)→ 3 production-ready files; marketplace REST + License v1POST /api/v1/license/verify; generated widgets use Svelte 5 runes + Tailwind v4 + WCAG 2.2 AA. - August 2026 — Marketplace Phase 2: in-app Extensions → Marketplace tab (
GET /api/marketplace) with offline-first merge (local themes and dashboard widget packages appear when marketplace.sveltycms.com is unreachable); widgets ship as kebab-case package folders (widgets/<folder>/<component>.svelte+ requiredwidget.json+.mdx, compile-timeimport.meta.globdiscovery,installDashboardWidget()); licensing — free (System Health, CPU, Media Storage), freemium 14-day key-less trial (Audit Log €24.99, Unified Metrics €14.99, Logs €6.99, Smart Importer), paid (SCIM Status €12.99, Editable Website €14.99) — enforced client-side via/api/system/license-status?type=dashboard&id=<id>and server-side viacheckExtensionLicense("dashboard", widgetId)→ 403 LICENSE_REQUIRED.
3.4.1 LiteRT.js AI Client — Client-Side Browser Inference (July 2026)
- Client-side browser inference (July 2026): LiteRT.js (Google’s Web AI runtime, announced July 9, 2026) runs entirely in the browser with zero server cost and zero data egress, in a dedicated Web Worker bundled by Vite and loaded via
new URL("./ai.worker.ts", import.meta.url)— there is no separate serving route, so admin headers (COOP: same-origin,COEP: require-corp,frame-src 'none') stay untouched and the worker has no DOM or cookie access. - Runtime & fallback: LiteRT.js WASM (~15 MB) with WebGPU primary and XNNPACK CPU fallback; transparent server-side Ollama (llava / nomic-embed-text) when WebGPU is unavailable; lazy WASM download on first inference, not at page boot; first use case is alt-text generation for WCAG/ATAG compliance via
ai.generateAltText(image). - Measured performance: MobileNetV3 (4.5 MB) alt-text via WebGPU completes in ~150-200ms on a 2024 MacBook Pro M4; EmbeddingGemma (18 MB) generates 384-dimensional vectors in ~300-400ms; both fall back to CPU (XNNPACK) at ~2× the latency; sub-200ms is a target for small tasks, not a guarantee.
3.5 June 23 Content & Media Architecture Consolidation
- Content system: 16 files → 9 files (~200 lines removed) with 8 scattered modules consolidated into
engine.server.ts(scanner + reconciliation + cache + watcher + CRUD) andloader.server.ts(path security + native/pooled schema loading + worker pool); one sharedscanCompiledCollections(), a unifiedrefreshContent({ mode: "full" | "schemas" | "incremental" })replacing 3 scattered refresh paths and a singleensureContentInitialized()coordinator; ~75 lines of dead code plus ~90 duplicatedcontentSystemBaselines removed; 20 new reconciliation unit tests; benchmark-verified: content scan 0.008ms avg (150 files), stress scan 0.044ms warm (1,000 files). - Media system: 17 files → 14 files (~65 duplicate lines removed); 3 duplicate modules merged into
media-utils.ts(MIME table expanded from 30 to 65 types with reversegetExtensionFromMimeType()lookup);sharing.tswired throughcreateLink()/validateLink(); 2KB zero-dependencyslim-sniffer.server.tsMIME fallback; 4 DAM endpoints (bulk download, analytics, version list, version compare); real chunk-basedparseMultipartStreamfor multi-GB uploads; inline metadata editing in the media drawer. - Media tests & benchmarks: 40 new unit tests (sharing 13, media-utils 15, slim-sniffer 12); upload 10MB at 32.3ms (310 MB/s); SDK processing 2.7ms (319 images/s).
- Focal Point & Aspect Preview (July 2026):
CmsMediaMetadata.focalPointpercentage{ x, y }persisted per image via metadata-onlyPATCH /api/media/:id; CSS-only preview grid across 7 preset ratios (16:9, 3:2, 4:3, 1:1, 2:3, 9:16, 21:9); crosshair drag with 1px arrow-key steps and 10px Shift+Arrow steps; opt-infocal-pointplugin (disabled by default) injects intomedia_gallery,image_editor_tooland media-upload zones; comparable to Drupal’s Focal Point module and Payload CMS’s aspect-preview plugin, which ship as optional extensions there.
3.6 July 16 Media System Overhaul — Security, Types & Streaming
- Security hardening (7 critical vulnerabilities; 3 CRITICAL + 12 HIGH fixes): path traversal in
LocalStorageAdapter.getMetadata()andbulk-download.ts(resolve()+startsWith()/safeResolve()gates), SVG injection via watermark/annotation attributes (SAFE_COLOR/SAFE_NUMBER+guardAttr()), signed-URL timing oracle (constant-time rejection on invalid hex), tenantId pipe injection (replace(/\|/g, "_")), MIME confusion from bare SVG bytes, binary corruption in streaming uploads (byte-level state machine), upload memory exhaustion (incremental parser + backpressure), secrets moved fromprocess.envtogetPublicSettingSync(), CloudinarysafeFetch()+validateEgressUrl()+ timeout, dead EXIF parsing replaced by binary tag extraction, Windows temp-file leak fixed with cross-platformfinally { unlinkSync() }cleanup. - Type safety & architecture:
MediaItemdiscriminated union of 5 variants (MediaImage | MediaVideo | MediaAudio | MediaDocument | MediaRemoteVideo) with 7 type guards (isMediaImage(),isStoredMedia(),isMediaOfType(),assertNever());NewMedia<T>blocks server-assigned fields (_id,hash,url,createdBy) at compile time andMediaPatchrestricts PATCH to user-editable fields; typedSharpPipeline;dispose()?onStorageAdapter;as constvalue maps;normalizeWatermarkPosition()alias normalization. - Streaming upload parser: byte-level state machine (never buffers the full body), binary-safe
Uint8Arraychunks, per-file backpressure; configurablemaxFileSize(1 GiB),maxTotalSize(5 GiB),allowedMimePatternand per-chunk read timeout (300s); per the 2026-09-18 update the route now passes explicit caps both set toAPI_MAX_BODY_SIZE_BYTES(15 MB) and oversized uploads abort with413 PAYLOAD_TOO_LARGEinstead of buffering toward those defaults. - Media reference reverse-index:
MediaReferenceIndexreplaces the O(n × entries)getMediaReferences()scan with an O(1) in-memory lookup (rebuild()lazy on first query,eventBus-driven invalidation on content mutations); estimated 50x speedup on repeated queries, pending benchmark verification. - MIME sniffer enhancements: TIFF (little- and big-endian), AVIF/HEIC via
ftypbox brand parsing, ZIP sub-type detection splitting DOCX/XLSX from plain ZIP archives, and a hardened WebP 12-byte bound check. - Measured impact: type guards 0 → 7 +
assertNever();as anycasts ~20 → ~1 (BaseEntity→ entry); path traversal vectors 3 → 0; upload data integrity corrupted → binary-safe; reference scan O(n × entries) → O(1) after lazy rebuild; upload memory full-file-in-RAM → proportional to network speed; temp-file cleanup Windows-leaked → cross-platform.
3.7 July 25 Security Hardening & OIDC Logout
- RBAC permission cache hardening:
invalidatePermissionCache()was defined but never called, so stale DENY results survived up to 5 minutes (PERMISSION_CACHE_TTL); it now runs on everyAuth.updateUser()mutation and globally fromAuthNamespace.updateRoles(), with the turbo auth cache cleared viainvalidateTurboAuthForUser(). - OIDC logout (all 3 mechanisms): RP-Initiated (
GET|POST /api/auth/oidc-logout;id_token_hint, allowlistedpost_logout_redirect_uri,state;end_session_endpointauto-discovered via.well-known/openid-configurationwith a 1-hour cache), Front-Channel (GET /api/auth/frontchannel-logout; returns 200 withCache-Control: no-cacheand clears SSO sessions), Back-Channel (POST /api/auth/backchannel-logout; validateslogout_tokenclaimsiss/events/sub/sid, rejects with 400); multi-provider registryregisterSsoProvider()+loadSsoProvidersFromSettings(). - Path traversal defense & media bulk delete:
engine.server.tsscanner adds apath.resolve()prefix check alongside the string guards, andconfig-state.tsvalidates the resolved path before dynamic import; media bulk delete uses 4 parallel requests (N/4 round trips, ~4× faster) with live progress (Deleting 3/12...) and publish-state gating. - Toast hardening, scanners & open item: toasts use restricted
ALLOWED_TAGS/ALLOWED_ATTR(mitigating CVE-2026-65902);validateRequiredFields()remains unit-tested but uncalled, tracked in the roadmap;security-audit.ts --fullruns OWASP + secret misuse + slop scans, and slop-scanner adds invalid Button variant detection (destructive→errorautofix),@applymisuse andgoto()anti-pattern checks.
3.8 August 2026 — Session, RBAC & Extension Security Sprint
- Shipped (self-verified,
nextas of 2026-08-04):SESSION_DEVICE_POLICY(single-per-devicedefault /single-per-user/allow-multiple) enforced at thecreateSessionchokepoint; absoluteSESSION_TTL_HOURS+ zero-query slidingSESSION_IDLE_HOURS; block/unblock/delete purging every session layer with permission, roles-list and turbo-auth caches invalidated on every mutation path; credential-free session snapshots; step-up re-auth for cross-session revoke (stateless HMAC, 5-min, session-bound); log-only IP/UA anomaly flagged once per session per hour;SESSION_MAX_PER_USERLRU eviction; expired rows purged every 5 minutes by a scheduled job. - Measured cost (self-measured, 2026-08-04, Intel i7-13700H, SQLite): the full security + auth pipeline (HTTP E2E, all hooks) averaged 0.881 ms over 7 recorded runs vs a 0.856 ms July baseline — +0.025 ms (~3%) for the whole session/RBAC stack, with static-asset and turbo baselines at parity; earlier +25% readings were traced to host CPU power-saving mode and re-measured at parity. Summary view: fail-closed authorization at the API dispatcher (unmapped namespaces return 403) plus the cache hierarchy adds ~0.03 ms to the full HTTP pipeline, amortized across cache layers, single-flight coalescing and zero-query design.
3.9 August 2026 — Middleware, Data-Layer & Core Hardening Sprint
- Middleware hardening (2026-08-04 → 2026-08-10): the 5–15s socket-holding honeypot tarpit became an instant decoy
200+blockIp()flagging; SSR cross-request state pollution fixed via request-scopedevent.locals; bounded rate-limit buckets (evict-oldest, “fixed window with adaptive pressure”); GET request coalescing; in-process mutation prewarm; GraphQL + settings-service pre-warm with parallelPromise.allhook loading; crash-safe 404-log flush + open-redirect guard; module-level settings cache and de-duplicated dbAdapter init; test isolation fail-closed (503 + 10s timeout); Local SDK boot fast-path; 18-hook READY pipeline with no per-request wrapper hops; WebSocket shutdown sends1001 Going Awayon SIGTERM/SIGINT; field-level read filtering via cachedFIELD_PERMISSIONS(write-guard still on the roadmap). - Data-layer parity:
crud.findPage(limit+1hasMore, optional total, keysetcursor),CountMode(exact|estimate|auto), L1 count cache (30s) plus unit/integration contracts — equal on SQLite, PostgreSQL, MariaDB and MongoDB, and adopted by the collection list path, status facets, users list, mediagetByFolder, website tokens, Smart Table saved views and thedb.<collection>.findPage(...)schema proxy. - Non-blocking write core:
create/updatepersist in sub-5ms (~4.20ms) and return200immediately; async audit/revision queues (SHA-256 Merkle-tree chaining, revision snapshots, L2 pattern purges) behindAUDIT_CHAIN_SYNC=falsedefault, withtrueproviding synchronous SHA-256 chaining inside write transactions for ISO 27001 / SOC2-style compliance (System Settings toggle); targeted writes on all 4 engines; single session⋈user JOIN cold path with 0 warm DB round-trips; zero boot settling delay;BENCHMARKis outbound-only. - Measured impact (self-measured, 2026-08-10, Intel i7-13700H, SQLite, standalone harness): Full Security + Auth Pipeline (all hooks, HTTP E2E) averaged 0.583 ms (p95 0.768 ms, ~1,442 RPS) — ~32% latency reduction vs the 0.856 ms July 31 baseline, with ~40% higher throughput; Turbo Pipeline (light) 0.285 ms / ~3,201 RPS; REST with API caching 0.540 ms; Static Asset 0.549 ms; Mutation + Audit Logging 1.031 ms; single-run variance ~±10%.
- Superseded (2026-08-23 → 2026-09-18): the 0.583 ms datapoint is not the current value — the August re-baseline moved the same scenario to 0.457 ms, and the SQLite ledger
HOOKS_TRACErow now records 0.358 ms warm / 0.532 ms p95 / 2,481 RPS (self-measured, single host).
3.14 August 2026 — Hardware-adaptive tuning + honest 4-DB benchmark matrix
- Hardware-adaptive profile (
@utils/hardware-profile): one detection at boot (initHardwareProfile()inhooks.server.ts) published as a frozen shared object; globalHARDWARE_CPU_BUDGETdefault 0.75 (1 = dedicated app server); media/sharp up to 50% of the physical budget, DB fan-out 2 queries per budget core, compile 75% / jobs 50% / module workers 50% (capped); per-knob overridesSHARP_CONCURRENCY,DB_POOL_SIZE,MONGO_MIN_POOL_SIZE,MODULE_WORKER_POOL_SIZE,COMPILE_CONCURRENCY,JOB_CONCURRENCY,UV_THREADPOOL_SIZE; wired into all 4 DB adapters (pool defaults previously hardcoded 20/100/100), theloader.server.tsworker pool, compile + sync-content-state, job queue, compression (weak boxes cap gzip 4 / brotli 4), resilience prewarm, setup wizard and dashboard. - Media pipeline (validated on matrix): preset (width, format) dedup collapses 20 variant jobs into 12 unique files; responsive-variant generation for buffer uploads is deferred (fire-and-forget); self-measured 2026-08-23 — SDK media 210.0 → 116.3 ms (−45%), HTTP upload 208.4 → 105.2 ms (−50%).
- CacheService pattern invalidation:
tenant:global:<flat-key>now lives under thetenant:globalbucket so pattern purges hit one bucket instead of every key; self-measured 26 → 4.5 ms. - Benchmark matrix (2026-08-23): 200/200 green on the hardware-profile build (SQLite 50/0 · MariaDB 50/0 · Postgres 50/0 · Mongo 50/0; run 2 was 199/200, the lone
dev-dependency-loadfailure being auto-generated benchmark MDX drift, now oxfmt-formatted on write); seeder provisionsbench_index_pressure+bench_migration_large(fixing the 100k-row index audit failure); restart overhead cut ~20% (onlygraphql-stress→ relational-performance andlarge-payload-streaming→ migration-scale need a restart; the other 5 destructive tests skip the ~12–16s boot, saving ~4 min of the ~22 min run). - Pre-profile vs profile (run 2 → run 3, same machine): no systematic regression — the feared GQL-100c pool regression did not materialize (flat-to-better on all 4 DBs), media SDK −3%, with Postgres gains widget pipeline −44%, Yjs −37%, mixed workload −25%, SEO −17–27% and Mongo gains collection search −29%, uploads −17–20%; remaining flags are sub-5 ms run-to-run noise.
- Reproduce:
bun run scripts/benchmark-matrix/index.ts --continue-on-error(4 DBs, ~23 min);bun run test:unit(416 files / 3667 tests); GPU note — sharp/libvips exposes no GPU backend, so media parallelism stays CPU-tier capped and further gains come from job dedup/deferral.
3.15 September 2026 — Intelligence consumption + request-pipeline lean
Two follow-on sprints on top of the 3.14 profile build: the behavioral-learning engine stopped being dormant (renders predictions and heat), and the request pipeline lost its duplicate cache namespaces, duplicate compression, and per-SSR graph cloning.
Intelligence consumption — predictNextPath was computed per request and rendered as a single <link rel=prefetch>; now it renders: (1) the sidebar nav link matching the server-predicted next path is tagged data-preload="smart" (src/components/left-sidebar.svelte); (2) the dashboard consumes the hotCollections already returned by its server load (getHotCollections(tenant, 20)) as compact quick-link chips above the widget grid; (3) heat-aware SWR in collection-service.ts: behaviorally-hot collections (top-20, hot set memoized 10 s per tenant so the per-request cost is one Set.has()) keep the 60 s fresh TTL but serve stale up to 15 min while revalidating; cold collections keep the default 5-min stale window. Roadmap follow-up kept honest: Smart Table “warm next page” viewport preload is still pending — pagination next/prev controls are button-driven today, so the data-preload viewport hook needs the controls converted to real links first.
Request-pipeline lean (hooks + dispatcher): (1) one canonical L2 key — handle-api-requests.ts and the API dispatcher now share a single buildUserCacheKey ({path}?search:u:{user}) for the L2 body store; the duplicate api:{tenant}:{user}:{path} namespace (written/read only inside that one hook) was retired and invalidation clears the shared path prefix across users/searches; (2) single compression per body — the dispatcher marks its tagged L1 writes with a compressed: {} sentinel so response-cache’s internal br/gzip precompute never runs for a write the request hook replaces within the same request; the hook’s one fire-and-forget compressor (br+gzip+zstd, size-gated, genuinely async above the sync threshold) then re-sets the L1 entry with real variants and writes the single canonical L2 entry; (3) nav graph serialized once per (tenant, contentVersion) — the admin sidebar payload was rebuilt + recursively deep-cloned (stripNonSerializable) on every SSR; it is now cached at layout:contentStructure:{tid}:{version} and the root layout’s progressive tree at navigation:tree:progressive:{tid}:{version}, invalidated by the existing content-version signal; (4) one session-cookie resolution per request — authn/authz/turbo/dispatcher consumers now share one per-request slot resolved from the protocol-derived secure-context flag instead of re-parsing the cookie 4–5×. Deliberately NOT merged: the authz 1 h user-count cache (tenant-scope semantics differ — bypassTenantCheck vs tenant-null counts) and the layout’s 15 s fresh user read (avatar/role badge freshness is intentional).
Verified 2026-09-02 (SQLite): bun run check 0/0 · test:unit 453 files / 3,894 tests · test:security 262 · risk:audit 5/5 · test:integration 632 pass / 0 fail (19 adapter skips) · core benchmarks all green (incl. cache-performance, hooks-performance, rest-api-performance).
3.16 September 2026 — Limiter, tenant scope, Mongo REST, Yjs ACL
Follow-on to the dual-path collapse (one limiter, one CPU sampler, branded systemScope). Self-measured core suite on all four engines (console-only, no BENCHMARK_RECORD): SQLite FIND ONE ~0.005 ms / REST ~0.73 ms; Mongo FIND ONE ~0.54 ms / REST ~2.1 ms (HTTP/JSON still dominates the REST delta). Postgres/MariaDB INSERT ~1.7 ms on this host is the Docker Desktop TCP hop — unix sockets apply on Linux/macOS, not Windows.
- Dead Lua copy removed from
handle-rate-limit.ts. Mutation traffic usesrateLimit()(RedisRateLimitStore+MemoryRateLimitStore). Atomic Redis Lua remains in@utils/rate-limit/redis-client.tsonly. Tests:tests/unit/hooks/rate-limit.test.ts,tests/unit/rate-limit/engine-fallback.test.ts. bypassTenantCheckboolean is not a query option. Adapters forward brandedsystemScopefromwithSystemScope(reason).hasTenantBypassaccepts only that brand orbypassSafeQuery. Tests:tests/unit/security/system-tenant-scope.test.ts,tests/unit/security/tenant-isolation-matrix.test.ts.- Mongo REST point-read uses native
collection.findOne, SDKfindByIdpassesskipMeta, and BSON ObjectId_idis stringified before JSON. Same-host:src/databases/db-local-socket.ts(Postgres/Maria unix socket auto-detect; Mongo loopbackdirectConnection, no wire compressors). Tests:tests/unit/databases/db-local-socket.test.ts. - Yjs entry ACL —
GET/POST/api/collaboration/yjsrequiredocId=entry:{collectionId}:{entryId}andcollection:read/collection:write(collection-scoped, then global). ACL helpers sit inyjs-access.tsrather than+server.ts(SvelteKit route analysis rejects non-handler endpoint exports; the production build failed on that). Tests:tests/unit/api/yjs-acl.test.ts. - Client-safe tenant split —
isMultiTenantEnabled()/withTenant()moved tosrc/utils/tenant-isolation.server.ts, becauseMULTI_TENANTis a private key and@utils/tenantis imported by browser code (Yjs provider, SDK config page).isValidTenantId()lives insrc/utils/tenant.server.ts, which keepsvite.config.ts’s alias-free config graph intact (compilation/compile.tsimports it directly).globalThis.requireis gone end-to-end. - Session AMR / MFA persistence —
auth_sessionsgainedamr(JSON/JSONB) andmfaVerifiedAt(tsCol(3)→DATETIME(3)on MariaDB,TIMESTAMP WITH TIME ZONEon PostgreSQL, INTEGER ms on SQLite) across the schema spec, all three Drizzle schemas and the boot-time legacy-tailALTERs, so existing installs upgrade on next boot. Mongo’sSessionSchemanow declares both — strict mode used to strip them, so no engine persisted AMR before this. Session-id rotation carries the MFA proof and device metadata instead of dropping them, and Mongo rotation degrades to sequential writes when the deployment has no transactions (standalone/CI) instead of throwing out ofstartSession(). Tests:tests/integration/databases/auth-session-amr-contract.test.ts(all four engines). Cost guard:tests/benchmarks/auth-session-amr.test.ts—INSERTΔ(amr vs plain) −14.6 % SQLite / −9.5 % PostgreSQL, i.e. below the noise floor;validateSession(the per-request path) never reads the session columns. - Adaptive smart rate-limiting & load shedding — EWMA system pressure load shedding (
system-pressure.ts, polling process CPU delta and container loadavg), burst velocity penalization (request-velocity.ts), route-aware token pricing (endpoint-cost.ts), and dynamic user tier and tenant plan quotas (role-tiers.ts,tenant-plan.ts) unified underhandle-rate-limit.ts. Tests:tests/unit/rate-limit/. - Vitest configuration & test suite hygiene — explicitly configured
isolate: trueinvitest.config.tssilencing misleading module-evaluation diagnostic hints while strictly preventing cross-file mock and singleton state contamination. Appliedsilent: "passed-only"locally to eliminate console clutter. Full suite: 504 files / 4,303 tests pass in ~47s.
3.17 September 2026 — Authorization guardrails, APQ binding, 4-DB pagination fixes
A security + performance wave that closed two authorization bypasses, hardened the persisted-query cache and the request-size surface, and found two long-standing product bugs on the database layer. Verified locally: bun run test:unit 515 files / 4499 tests · SQLite integration 660 tests / 71 files (641 pass / 19 adapter skips) · the 7-file cross-engine contract bundle 58/58 on SQLite, PostgreSQL, MariaDB and MongoDB · tsc --noEmit 0 errors · risk:audit 5/5 · bun run lint:docs 0 errors.
3.18 September 2026 — Smart Table platform & multi-core test acceleration
Platform deliverables and high-performance test suite optimization wave:
- Smart Table column resize & layout namespaces —
setLayoutKey(key: string)onSmartTableApi<T>with persistence namespace separation; integratedColumnResizeHandleinto media gallery, users, and website-tokens tables. Pinned columns styled with solidbg-white dark:bg-surface-900backgrounds to prevent content bleed-through during horizontal scroll. Tests:tests/unit/components/create-smart-table.test.ts. - Bulk field-edit UI modal — created
bulk-field-edit-modal.sveltewith Svelte 5 runes, strictFieldInstanceschema typing (zeroany), full WCAG 2.2 AA accessibility, and automated widget input mapping (text, number, boolean, date). Integrated withAlt+Eshortcut inentry-list-multi-button.svelte,entry-list.svelte, and batch API handler inentry-actions.ts. Tests:tests/unit/utils/entry-actions.test.ts,tests/unit/utils/api.test.ts. - Vitest dynamic multi-core worker scaling — scaled worker pool dynamically based on host CPU core count (
cpuCount >= 16 ? Math.min(16, cpuCount - 4) : cpuCount - 1) withprocess.env.VITEST_MAX_WORKERSoverride invitest.config.ts, utilizing up to 16 concurrent workers on 24-thread hosts while leaving 4 cores for OS and IDE responsiveness. - Individual test bottleneck elimination — severed dynamic
import("@src/hooks.server")in user/auth mutations by movinginvalidateTurboAuthForUserinto lightweighthandle-turbo-get.ts(auth-lockout.test.tsdropped from 2,270 ms to 81 ms,user-attribute-update.test.tsfrom 1,439 ms to 75 ms); replaced dynamicresetModules()with static imports intesting-api-gate.test.ts(466 ms → 75 ms); addedretryDelayMultiplier: 0inseed-burst.ts(eliminating 200 ms wall-clock sleep; 312 ms → 86 ms); moved unmocked dynamic DB import tobeforeAllindatabase-resilience.test.ts; addedcmd.flushDb()on test initialization incache-service-l2-contract.test.tsfor clean Docker Redis isolation. - Suite acceleration metrics — unit suite accelerated from 48.27 s → 18.79 s (~61% speedup, 2.57× faster) across 515 files / 4509 tests with 100% pass rate and isolation preserved (
isolate: true).bun run checkclean,risk:audit5/5,lint:tenant -- --fullclean.
Authorization (dispatcher + handler) — POST /api/user (bare namespace root) was exempted from the endpoint gate because the dispatcher treated “no action segment” as public, so any authenticated user could create accounts carrying privileged fields; GET /api/user (directory listing) was exposed the same way. Roots now fall through to user:write/user:read, handleCreateUser strips privileged fields for non-admins via sanitizeClientUserAttributePatch, and "roles" joined PRIVILEGE_ESCALATION_FIELDS. Behaviour change: GET /api/user now requires user:read.
Token namespace — /api/token/* was a public-route deny-list, which also kept the dispatcher’s api:token mapping out of the picture for PUT/DELETE. It is now a positive allowlist: only GET /api/token/validate-token/{value} is public; list/create/resolve/batch and PUT/DELETE require an admin session or the mapped api:token permission, and updates are field-allowlisted (expires, blocked, consumed; admins additionally email, role; never user_id, type, token, _id, tenantId). Behaviour changes: non-admin sessions can no longer create/list/update/delete tokens; unauthenticated GET /api/token/{value} now 401s; the public validation contract is GET /api/token/validate-token/{value}.
GraphQL APQ — extensions.persistedQuery keys must now be exactly 64 hex characters and sha256(query) is compared constant-time before a query may be registered, closing cache poisoning/flooding of the persisted-query store (PERSISTED_QUERY_HASH_INVALID / PERSISTED_QUERY_HASH_MISMATCH). Registered queries keep the L1 RAM / L2 Redis store with a 7-day TTL.
Request-size & page-size ceilings — chunked bodies (Transfer-Encoding: chunked, no Content-Length) are counted through a zero-copy stream in the dispatcher and bounded at the same 15 MB API_MAX_BODY_SIZE_BYTES ceiling as declared lengths (413 PAYLOAD_TOO_LARGE); the streaming media route receives that counted stream undrained so incremental multipart parsing still works, and parseMultipartStream is called with explicit caps and aborts incrementally instead of buffering toward its 1 GiB / 5 GiB defaults. Pagination limit is clamped centrally at MAX_PAGE_SIZE = 200 in the REST parsers, the SDK find funnel and the GraphQL fast path + resolver.
Guardrail suite — tests/unit/api/authz-bypass-guard.test.ts (27 tests) enumerates every /api/<namespace> root and every public-route exemption against a reasoned contract, so a new authorization bypass fails a unit test rather than shipping.
Performance — zstd is no longer synchronous on the event loop (async native API; size-gated sync fallback at SYNC_MAX_SIZE 64 KiB); count-cache entries carry both logical and physical collection spellings and the write path clears both (list totals were stale for the 30 s TTL); content.nodes.bulkUpdate collapses N per-row DELETEs into one IN (...) and reorderStructure batches per-item SELECT * into one projected IN (...) read (2N → N+1 on SQL); the security gate no longer computes and discards duplicate surface/UA scans (≈4 string scans + 2 allocations per API read → 2 + 1); the tenant proxy memoizes per-property wrappers; auth row conversion uses the registered-schema fast path on PostgreSQL/MariaDB too; media gallery composite indexes (tenantId, folderId, updatedAt) + (tenantId, updatedAt) were added to all three SQL dialects and the system schema spec, with idempotent boot tails for existing installs; commerce order downloads do one batched product lookup instead of one per line, and internal analytics/redirects callers no longer depend on the capped public page size.
Two pre-existing product bugs found and fixed by this work (not known before) — plus a MariaDB repair gap:
- Numeric sort directions were mis-mapped to DESC in every SQL sort emitter —
{status: 1}emittedstatus DESCwhile the keyset cursor said ASC, so keyset pagination repeated rows and terminated early on SQLite/MariaDB/PostgreSQL. A singlenormalizeSortDirection()incore/page-utils.tsnow feedspage-utils,drizzle-sql-helpers,sql-adapter-coreand the query builder. - MongoDB
reorderStructurenever worked — it calledmongoose.startSession()on the global default connection while the adapter owns amongoose.createConnection, so every drag-reorder returnedsuccess: false. It now uses a single orderedbulkWrite, matching the adapter’s declaredsupportsTransactions: false. - MariaDB repair gap —
ADD COLUMN IF NOT EXISTScould never fix an existingmfaVerifiedAt datetime(fsp 0) column, so millisecond MFA timestamps silently truncated; a guarded boot tail now runsMODIFY COLUMN … DATETIME(3)once per install.
Tests: tests/unit/api/authz-bypass-guard.test.ts (27), tests/unit/api/dispatcher-body-limit.test.ts, tests/unit/media/streaming-upload.test.ts, tests/unit/databases/media-gallery-indexes.test.ts, tests/unit/databases/content-node-batching.test.ts, tests/unit/databases/mongo-reorder-structure.test.ts, tests/unit/core/auth-row-converter-parity.test.ts; contract suites extended in find-page-count, cache, content-nodes, auth-session-amr (tests/integration/databases/) and tests/integration/api/token.test.ts.
3.19 September 2026 — Version tooling: derived bumps, real SemVer, one update check
Version source — bun run version:bump [auto|patch|minor|major|<x.y.z>] (scripts/version.ts) derives the next version from the highest v* tag reachable from HEAD (note: git describe returns the nearest tag here, which disagrees, so the script prints the discrepancy). auto implements SemVer from Conventional Commits: feat → minor (§7), breaking markers → minor while major is 0 (§4, matching release-please’s 0.x rule) / major afterwards (§8), everything else → patch (§6), with breaking > feat > rest when a range mixes types. An explicit <x.y.z> target sets the manifest exactly, for releases that must skip or pin a version. Guards: refuses a dirty manifest, refuses to re-release an already-tagged version (the failure the workflow previously swallowed as “Tag already exists”), refuses a downgrade, and never commits or tags. The policy is a pure exported decideBump() with 33 unit tests, mutation-checked.
Mode parity / ledger — the correction from the first pass: an apparent cache-hit-ratio regression (+83 %) was a baseline mode mismatch (a TEST_MODE=true standalone baseline compared against production-parity matrix runs; the same build re-measured in the baseline’s own mode is 0.538 ms). Trend rows now carry a server-mode stamp, matrix recording refuses non-production servers, and contaminated ledger rows were purged.
App side — two parallel version services were collapsed into services/core/version-service.ts (readLocalVersion, checkForUpdates, compareVersions implementing SemVer §11 prerelease precedence: 0.0.10-dev.3 orders after 0.0.9 and before 0.0.10), the observability duplicate deleted, and the fake unit test (it re-implemented its subject and asserted its own copy) replaced with 21 tests against the real implementation. The badge was simplified from ~10 parallel state variables to one state object with derived presentation — which fixed a real defect: the loading guard made the initial call return immediately, so the update indicator had never fetched at all. ai-service.ts no longer hardcodes a version in its outbound User-Agent/payload.
Coverage added — the previously unmeasured claims are now measured: media-gallery composite indexes (planner-proven index_used=1; 0.396–0.410 ms on 4 000 rows SQLite, 1.248 ms PostgreSQL), zstd-async (477 KiB GET 6.0–6.2 ms avg, 300–315 RPS, co-tenant p95 0.37 → 1.06–1.48 ms — no event-loop stall). The body-limiter and scan-dedup changes remain deliberately unmeasured (sub-µs work on a ≥1 ms path, ~3 orders below the noise floor).
Release back-merge keeps next current (2026-11-06)
next never receives the release bump on its own: the chore(release) commit is created on main after the next → main merge. Auto Release now back-merges main into next after a published release, so the development branch carries the released package.json and the tag is reachable for local version:bump derivation. Without it, a next checkout keeps reporting the previous release and the admin badge recommends an update the branch already contains. The step is best-effort — a blocked bot push logs a warning and the merge is done manually — and never affects tagging, the GitHub Release, or npm.
3.20 September 2026 — Unified Translation Cockpit & Multilingual Studio Inspector
A comprehensive multilingual management and inspection suite bridging admin UI chrome localization with per-field content readiness:
- Dual-Lens Language Management: Simultaneously tracks and toggles UI system language (Paraglide compile-time catalogs) alongside content editing languages (
systemLanguagevscontentLanguage) withintranslation-cockpit.svelte. - Document-Level Translation Completeness: Computes real-time translation completion percentage per document across all configured system languages via
computeDocumentTranslationSummary()(src/utils/translation-analytics.ts). - Field-by-Field Deficiency Navigation: Visual deficiency matrix identifies untranslated fields per language. Clicking any deficiency jumps directly to the field, switches the content locale, scrolls the field into view, and triggers an attention-highlight pulse.
- 1-Click AI Translation: Integrated 1-click batch translation of individual missing languages or entire documents via
/api/ai/translate, preserving field structures and formatting without manual copy-pasting. - Design Token & Accessibility Compliance: Status-shade tokens (
success,tertiary,warning,error), WCAG 2.2 AA compliant modal with focus trap and restoration. Tests:tests/unit/utils/translation-analytics.test.ts.
3.21 September 2026 — Dependency & Runtime Lean-Out
Execution of the full Lean-Out initiative to shrink bundle size, drop unused dependencies, and minimize runtime surface without feature loss:
- Complete Lodash Elimination: Fully purged
lodashandlodash.memoizeacross the codebase; replaced with native ECMAScript methods, typed object helpers, andfast-deep-equal. - Modularized On-Demand AWS SDK: Removed monolithic AWS SDK clients in favor of isolated
@aws-sdk/client-s3, loaded dynamically on-demand insrc/utils/media/storage-adapters.tsso storage drivers incur zero boot-time or bundle penalty when unused. - Dynamic MapLibre Loading: Geocoding and map rendering in
src/widgets/custom/address/input.sveltemoved to lazy dynamic import (await import('maplibre-gl')), keeping the primary widget bundle lean. - Zero-Shiki Runtime Surface: Removed unused
shikifrom dependencies and generated SBOM, eliminating redundant node dependencies. - Tiptap Lazy Evaluation: Rich text editor core and extensions are dynamically loaded (
import('./tiptap')) on component mount insrc/widgets/core/rich-text/input.svelte, keeping edit views lightweight on initial render. - Store Architecture Consolidation: Consolidated global stores from 28 files down to 18 domain singletons, standardizing on Svelte 5 fine-grained reactivity (
$state(),$derived()) across all 72 widget inputs, displays, and app shell routes.
3.22 September 2026 — Smart Table Advanced UX & Adaptive Grid Platform
A comprehensive overhaul of the core Smart Table data orchestration engine (src/components/ui/smart-table/ and src/components/collection-display/), delivering enterprise-tier UX, multi-column sorting, compound query operators, and accessibility compliance:
- Multi-Column Sort: Compose secondary and tertiary sorts via
Shift + Clickor headlesssetSort(field, { multi: true }). Renders visual ordinal rank badges (1,2,3) alongside directional indicators, cascades multi-criteria sorting in client-side comparators, and serializes compound queries to server URL parameters (sort=field1:asc,field2:desc). - Advanced Filter Operators UI: Integrated
AdvancedFilterModalcompound filter builder supporting multi-clauseAND/ORexpressions across collection schema fields with contextual operators (equals,contains,starts_with,gt,gte,lt,lte,is_empty,is_not_empty). Active clause counts surface in the filter bar. - Export Filtered Selection (
Alt + X): Browser-streamed CSV download bounded specifically to currently selected rows or the active filtered result set, accessible from both keyboard shortcuts (Alt + X) andEntryListMultiButton. - Keyboard Grid Navigation (WCAG 2.2 AA / ATAG 2.0): Fully keyboard-navigable grid using roving
tabindex. Arrow key cell traversal,Home/Endjump navigation,PageUp/PageDownleaping,Spacefor row selection, andEnterfor direct entry editing. - Responsive Card Mode: Dynamic view mode switcher (
Table ViewvsCard View), persisted per-collection viaSmartTableLayoutPrefs, with responsive fallback on mobile viewports (<768px). - Unit Testing: 7 new test cases in
tests/unit/components/smart-table-advanced-ux.test.tscovering multi-sort composition, cyclic direction toggle, rank indexing, client-side tie-breaking, and view mode persistence.
3.23 September 2026 — Surgical turbo invalidation (soak / mixed-write)
A single-entry PATCH used to wipe every turbo findById for that collection (invalidateLocal string-includes + res:<collection> tags on point-reads). L2 already cleared doc:<coll>:<id> surgically; L1 did not. Point-reads now tag only doc:, skip the shared L1, and invalidateLocal({ entryIds }) drops lists/GraphQL plus the written ids. In-repo replica (SQLite, 10k docs, 8c, 2026-09-20): mixed 1,447 RPS, 60s soak 1,362 avg RPS. Tests: tests/unit/core/request-classifier-and-response-cache.test.ts, tests/unit/sdk/collections-post-write.test.ts. Docs: Competitive Comparison, Performance Architecture.
3.24 September 2026 — Bounded caches, exact L1 accounting, batch seed lane
Three separate findings from a soak/seeding/CPU pass, each with its own measurement (4f3216920 + this change, SQLite, production-parity standalone benchmarks, shared 24-core host):
- The media storage existence cache is bounded now (was an unbounded
Map).src/utils/media/media-storage.server.tscached every storageexists()probe — positive and negative — in aMapwith a 10 s TTL and no cap and no eviction order, so its size grew with the number of distinct media paths a process ever probed. It is now anLRUCachewithSVELTY_FILE_EXISTS_CACHE_MAX(5,000 entries, LRU-ordered) andSVELTY_FILE_EXISTS_CACHE_TTL_MS(10,000 ms) — TTL andrefresh: truesemantics are unchanged. Test:tests/unit/media/file-exists-cache.test.ts(400 distinct paths flood, a 50-entry cap holds, negatives and positives both cached, TTL expiry, refresh bypass). The soak rows cannot show this one: the soak’s mix (health/list/item/schema/create) never probes a storage path. - The response-cache L1 byte budgets did not bind — the counters drifted on every path.
src/services/cache/response-cache.tsmaintainsl1Bytes/pointL1Bytesper tier; the L2-refill paths (get()/getAsync()) inserted without accounting andinvalidate/invalidateAll/doc-scoped drops/TTL expiry deleted without decrementing. Measured on the pre-fix code with the budgets pinned to 1 MB: 40 refilled entries 960,000 bytes resident while the counter read0, and after 10 sets + 1 key invalidate + 1 doc-drop + 1 expiry the list counter read 176,000 against 144,000 real bytes (point tier 160,000 vs 128,000) — i.e. the 64 MB/16 MB budgets (SVELTY_L1_MAX_MB,SVELTY_L1_POINT_MAX_MB) were only ever consulted against a number unrelated to the store, and the 2,000-entry cap was the only real bound (≈200 MB of 100 KB list bodies). Every mutation now runs through oneputEntry/removeEntryprimitive, enforcement runs after the insert (strictsize ≤ capandbytes ≤ budget, an oversized single entry is dropped rather than pinned), the budgets re-read their env value on change, andresponseCache.getL1ByteStats()exposes the counters plus an exact recount for diagnostics. Tests:tests/unit/core/response-cache-l1-budget.test.ts— 5 tests, all 5 failing on the pre-fix implementation and passing after (insert-above-budget shrinks both tiers, refill accounting, delete-path accounting, counter == recount through a mixed torture sequence). Docs: Cache System. - Seeding a 100k dataset got 5.3× faster through the documented bulk endpoint.
seedHttpCollectionBurstposted one HTTP create per row; it now claims chunks off a shared cursor and postsPOST /api/collections/:id/bulk(500 items, the registeredmigration-scalebatch size), retries transient statuses per chunk, and falls back to per-item creates for a range whose chunk fails or returns a mismatched row count — the dataset-integrity gate (created === requested) is untouched. Same build, same fresh DB, 100k docs, 8 workers: 74.77 s / 1,337 docs/s → 14.20 s / 7,042 docs/s; at 20k docs 18.86 s / 1,060 → 3.44 s / 5,815. Rows are equivalent (95,000 distinct slugs over 95,000 seeded rows,status/slug/tenantId/createdBy/createdAtall present) and the file’s measured rows still exercise the per-item lane (create/update/mixedunchanged;chunkSize: 1reproduces the old path for A/B). The seed phase is now a registered trend row —Seed Burst (<N> docs, HTTP)pluscompetitive.seed.docs_per_s/competitive.seed.wall_ms— instead of being invisible between two phases. Tests:tests/unit/bench/seed-burst.test.ts(batch lane + order, chunk retry, fallback, per-item lane, integrity gate). - The per-item write floor, measured. With
PROFILE_WRITE=1on the HEAD build, a create’s server-side cost splitsns:persist2.06 ms (of whichns:persist:adapter-write1.77 ms,db:ins:stmt0.97 ms) againstns:beforeSave0.07 ms,ns:encrypt0.03 ms andns:prep:*0.01 ms;hooks-performance.test.tsputs the mutation lane’s middleware cost at 1.633 ms warm (audit disabled) over a 0.35–0.65 ms read lane. That is the shape of thecreaterow: a single-statement INSERT under the SQLite write mutex plus a single-threaded JS pipeline — no per-item step I could find is removable without changing write semantics (per-hook attribution stays unavailable, see roadmap). - The soak’s RSS growth is stepwise, not monotonic — and it is not the two SQLite knobs. Bounded 3-minute variants (
LONG_SOAK_HOURS=0.05, fresh DB per run, first/last bucket reported): +54.4 MB on the pre-change build, +52.8 MB withSQLITE_MMAP_SIZE=0 SQLITE_CACHE_SIZE=8000(both native ceilings minimised — refuting the mmap/page-cache hypothesis that was the cheapest explanation), +53 MB on the new build. A 6-minute variant shows the shape: RSS steps +54 MB and +105 MB at ~2 and ~4 minutes and is otherwise flat (+0.6–3.6 MB per 30 s bucket between steps), whileheapUsedoscillates 73–168 MB without a trend — i.e. V8 committing heap pages, not an object graph that grows with request count. A 3–6 minute window cannot separate commitment from a slow leak; that needs the long row in roadmap-2026.
3.25 September 2026 — Long-horizon soak: the memory verdict, measured against controls
The bounded soak could not separate V8 heap-commitment steps from a slow leak (see 3.24). The long row now exists, with the two controls the verdict needed — and the answer is that nothing leaks; what grows is commitment, and it converges.
Run matrix (one Windows 11 host, Intel Core Ultra 9 275HX, 24 threads, 63.4 GB RAM; node index.cjs adapter-node server, Node v24.15.0, SQLite node:sqlite, --max-semi-space-size=128 --max-old-space-size=1024; 4 workers, ~97 req/s, 0 errors in every run; slopes are the harness’s own steady-window/tail fits in MB/min with t = slope/se):
| Profile / build | Window | Writes | RSS start → end | RSS tail (t) | heapUsed tail (t) |
heapTotal tail (t) |
Latency drift | Verdict |
|---|---|---|---|---|---|---|---|---|
mixed 1 h (HEAD) |
54.5 min steady | 34,878 | 218.5 → 430.3 MB | +1.35 (6.5) | −0.10 (−0.2) | +0.15 (9.6) | −0.000 ms/min | STABLE (No Leak) |
read-only 45 min (HEAD) |
39.5 min steady | 0 | 221.9 → 347.2 MB | −2.47 (−12.1) | −0.24 (−0.3) | −0.01 (−1.7) | −0.001 ms/min | STABLE (Plateau) |
idle 45 min (HEAD) |
39.5 min steady | 0 | 221.9 → 77.6 MB | −5.40 (−14.6) | +0.05 (8.2) | +0.08 (11.1) | 0.000 ms/min | STABLE (No Leak) |
mixed 45 min, page cache 8 MB |
39.5 min steady | 26,070 | 221.4 → 370.5 MB | −2.13 (−13.9) | +0.02 (0.0) | +0.27 (19.7) | +0.002 ms/min | STABLE (No Leak) |
mixed 45 min, page cache 256 MB |
40 min steady (2026-09-22) | 26,040 | 218.4 → 476.3 MB | +0.28 (2.0) | +0.06 (0.1) | +0.30 (20.8) | — | STABLE (Plateau) |
- The growth is V8 commitment, not retention. Every loaded profile shows the same shape:
heapUsedoscillates 72–176 MB with a tail slope of ±0.24 MB/min (|t| ≤ 0.3),externalis flat, andheapTotalsteps up to an operating point that three independent runs land on at 342.8 / 344.0 / 347.9 MB — that is the documented--max-semi-space-size=128young generation (2 × 128 MB) plus old space, ~3.5× the post-GC live set.idlereleases the whole commitment (RSS 221.9 → 77.6 MB), which is what a ceiling that is never needed looks like. - The earlier “off-heap” reading was a working-set effect, not native growth. An independent 15 s Windows sampler over 32.5 min of the mixed run: working set −0.60 MB/min (t = −5.8) (late window −1.34, t = −9.6) while privateBytes grew +0.49 MB/min (t = 13.2) and the handle count stayed flat (+0.004/min, t = 1.1, 266 handles). Commit charge rising while residency falls is V8 asking for pages, not a native allocator holding them — and the flat handle count rules out the file-descriptor/timer leak class outright.
3.26 September 2026 — Field-level i18n toggle & GraphQL CSRF parity
Two rows closed from the competitive feature-gap list, both self-described with regression tests:
-
Field-level i18n UI toggle. The runtime was already complete (
FieldInstance.translated, per-language value maps,contentLanguageplumbing, translation cockpit, per-field locale badges) — the missing piece was configuration UI. The Collection Builder field dialog now has a Translated checkbox beside Required (modal-widget-form.svelte), and the GUI → code generator emitstranslated: trueso the flag round-trips for code-defined collections (collection-code-generator.ts; regression guard intests/unit/collectionbuilder/code-generator.test.ts). Docs: Language & i18n Architecture. -
GraphQL CSRF gate. The REST dispatcher was CSRF-gated;
POST /api/graphqlwas not. The route now enforces the same gate on every authenticated POST — same-origin fast path or double-submit token (constant-time, rotated) — because Yoga batching (limit 10) can hide mutations inside a POST;GETstays exempt (safe method), API-key/token callers are exempt (no cookie to ride),TEST_MODEskips exactly as on REST. Coverage:tests/unit/api/graphql-security.test.ts(cross-origin rejection 403, same-origin fast path, token path, API-key exemption). Docs: GraphQL API. -
Deep-offset cliff closed (W2): REST keyset cursor. The adapter-level composite keyset was contract-tested; the missing piece was the REST surface.
GET /api/collections/{id}?cursor=…now parses the opaque cursor, the SDKfindkeyset mode applies the_idtiebreaker to the ORDER BY, fetcheslimit+1and emitsmeta.hasMore/meta.nextCursor; cursor pages bypass the query cache by design sometais never dropped. Contract:tests/integration/api/collections-keyset-cursor.test.ts(asc + desc walks over duplicate sort values visit every row exactly once). Docs: Collections API, Scale limits. -
Client-bundle Node leak fixed (email preview page).
+page.svelteon/email-previewsdynamically imported the@better-svelte-email/previewpackage ROOT, draggingfs/urland Svelte’s serverrender-context.js(node:async_hooks) into the client bundle — the build emitted externalization warnings and the previewer could never run in a browser anyway. The page now imports the package’s client-safe./EmailPreview.sveltesubpath export and passes the component’s realpageprop shape; the build is clean (zeroexternalized for browserwarnings). -
The SQLite page cache is properly refuted now (the 3–6 min test could not do it). Same-size dataset (439,466-row
collection_BenchmarkStable, 643 MB copy), same load, onlySQLITE_CACHE_SIZEchanged: 8 MB (26,070 writes) vs 256 MB (26,040 writes) givesheapTotaltail +0.27 (t = 19.7) vs +0.30 (t = 20.8) and a declining RSS tail in both. Neither the mmap ceiling nor the page-cache budget is a memory lever at this load, so the hardware-profile defaults stay as documented. -
Latency stayed flat at constant throughput in all three loaded rows (drift |≤ 0.002| ms/min, p95 2.5–4.3 ms, reqs/s 96–98 with 0 errors) — no cache-growth or lock-contention degradation to attribute.
Two instrument gaps closed (the reason the earlier pass could not answer this):
GET /api/system/health?verbose=trueomittedarrayBuffersfrom itsmemoryobject, so every soak series recorded a structural0.00for it and the buffer-growth half of the off-heap branch was blind. It is now reported (src/hooks.server.ts), which also satisfies the long-row requirement in roadmap-2026.- The soak now trends the native/other residual (
rss − heapTotal − external) as its own series, summary row (Native/Other Tail Growth (t)) and metrics (soak.resid_slope_mb_min,soak.resid_tail_slope_mb_min) — the number this investigation had to derive by hand to find the owner of an off-heap slope. Contract: benchmark-matrix. A latent ordering bug was fixed in the same pass:writeSeries()readwriteReqsbefore itsletwas initialised, and the surrounding catch swallowed the temporal-dead-zone error — the first series flush was silently dropped.
Methodology: self-measured with the registered harness (
LONG_SOAK_PROFILEaxis +LONG_SOAK_HOURS=1), production-parity server mode, one host, SQLite only. The 45-min controls and the page-cache A/B overlapped the 1 h run on the same host (the idle/read-only servers carry ~0 load); the 1 h rows are the ones to compare against a clean single-run host. Commands, series JSON and the raw per-bucket curves are intests/benchmarks/results/<adapter>/soak-series-*.json.
3.27 October 2026 — L1 cache moved to the native dependency-free FastLRU
The hybrid cache’s L1 in-memory tier (cacheService.l1) moved off the external lru-cache package onto the repo-native FastLRU (src/utils/native-utils.ts), so the L1 is now fully dependency-free; lru-cache was removed from package.json (direct dependencies 88 → 87, SBOM components 683 → 682). FastLRU was extended to cover the full L1 surface: byte-budget eviction (maxSize + maxEntrySize + sizeCalculation), per-entry TTL, dispose, and the read hints updateAgeOnGet / updateRecencyOnGet.
Self-measured microbenchmark (throwaway script, 2026-10-06, Bun 1.4.2, N = 100,000 ops after ≥1,000 warm-up iterations; sizeCalculation with a 128 MB maxSize and 16 MB maxEntrySize, 20k keys, 120-byte string values):
get()with recency promotion: 31.3 M ops/s (lru-cache) vs 13.6 M ops/s (FastLRU) — a ~36 ns/op absolute difference, negligible against a ~200 µs request.get()peek (updateAgeOnGet: false, updateRecencyOnGet: false): 28.7 M vs 19.4 M ops/s.set(): 3.67 M vs 4.51 M ops/s (FastLRU~1.23× faster).- 2,000-entry count-only cache
get(): 12.4 M vs 6.87 M ops/s.
This supersedes the earlier “5.46 M vs 780 k (7×)” figure, which compared a Map LRU rather than the L1’s sizeCalculation path. The ENTRY read path now genuinely “peeks” — it skips recency promotion and TTL refresh (updateRecencyOnGet: false), the intent a comment previously stated but lru-cache, which always promoted on get, did not realize; CONTENT reads still promote and refresh. Docs: Cache System, Production Deployment.
4. Final Sprint Achievements (March 2026)
Having secured the “Engine War” with dated, self-measured performance and security ledgers rather than absolute performance claims, SveltyCMS has now closed the Editorial Depth gap.
4.1 Visual In-Context Editing
-
Features: Drag-to-reorder blocks in preview, field-level pulsing highlights, and auto-scroll-to-field interactions via the Enterprise Handshake Bridge. July 2026: Website Starter integrates Svedit inline editing on the public site; license gate on
POST /api/preview/authorizeenforces paid bridge while CMS form saves remain free. -
Freemium model: Public site rendering and CMS form editing (including Svedit JSON in
pages.content) require no plugin license. Live Preview tab, iframe bidirectional sync, and inline Svedit click-to-edit require Editable Website (€14.99 marketplace, 14-day trial auto-started on Website Starter setup). -
Performance Optimization (March 2026): Implemented Deferred Rendering for the preview iframe. The handshake and iframe mount are lazy-loaded only when the user first switches to the Live Preview tab, reducing initial page load CPU/Network by 60% while maintaining instant switching for subsequent use.
-
Fail-Closed API Security (April 2026): Implemented a central dispatcher gatekeeper requiring mandatory endpoint registration. Any unmapped or unauthorized request is denied by default, eliminating “Shadow API” data leaks.
-
Widget Performance Auditing (April 2026): Integrated an automated overhead pass into the Enterprise Matrix to measure the server-side “cost” of every core widget, ensuring “Zero-Overhead” standards are maintained as the ecosystem grows.
-
Result: An editorial experience we assess as competitive with legacy SaaS platforms (self-assessment; no third-party UX benchmark).
4.2 AI-as-a-Field-Type & Hosted Knowledge
- Features: Native
AIEnrichmentfield type, smart context-aware translation, and the Hosted MCP Context Server (mcp.sveltycms.com) for real-time agentic memory. - Differentiator: Local inference via Ollama ensures data privacy while maintaining high-speed content enrichment.
4.3 Visual Workflow Engine (FSM)
- Features: Node-based Finite State Machine editor for complex, non-linear content lifecycles. Includes transition guards, automated side effects, and HMAC-signed approval links for external stakeholders.
- Result: Provides enterprise-grade governance comparable to high-end SaaS DXP platforms.
4.4 Advanced Media Engine: Transcoding & Batch Hub
- Features: Multi-resolution HLS/MP4 adaptive bitrate pipeline and bulk Sharp.js filter processing (Vivid, B&W, HDR) for 100+ assets simultaneously.
- Result: Eliminates the need for external Digital Asset Management (DAM) or video processing services.
4.5 Visual Logic Builder
- Features: Recursive JSON-based conditional engine supporting nested AND/OR groups for complex
showIfandrequiredIfdependencies.
4.6 Real-Time Collaboration & Concurrency
- Features: Conflict-free Replicated Data Type (CRDT) concurrent editing powered by Yjs, transported over adapter-node-compatible channels — SSE (
/api/events+/api/collaboration/yjs) for the default path, plus a nativews-based sync server on/ws(yjs-sync-server, wired in the productionindex.cjsentry). No uWebSockets / svelte-realtime dependency. - Server state:
yjs-service(src/services/collaboration/yjs-service.ts) holds per-docIdYjs documents, keyed by tenant, applied from EventBus updates;GET /api/collaboration/yjsreturns full state for client bootstrap. September 2026:docIdmust beentry:{collectionId}:{entryId}; handlers check collection-scopedcollection:read/collection:write(then global), admin fast-path. - Client integration:
collaboration-service.svelte.ts+SseProvider(SSE transport), wired into the field editor (fields.svelte) when a collection enablescollaboration.enabled. Awareness protocol carries cursor/presence per editor. - Latency: self-measured event-push latency is in the low-ms class on a local deployment; no sub-ms claim is made (network RTT dominates outside localhost).
- Result: Production-oriented concurrent editing for collections that opt in; it is not a claim of Google Docs parity or of GraphQL-over-WebSocket subscriptions (not shipped).
4.7 CLI Maintenance Suite & Global Accessibility
- Features:
- CLI Cache Control: Native
bun run cache:clearutility supporting system-wide, all-tenant, or specific tenant invalidation. - Performance Trends: Automated trend analysis (🟢/🔴) in the Enterprise Benchmark Matrix, tracking regression across REST, GraphQL, and Widget layers.
- Intelligent RTL support: Automatic Right-to-Left detection and alignment in the RichText editor for Middle Eastern locales (AR, HE, FA).
- CLI Cache Control: Native
- Result: Reduces operational overhead for DevOps and ensures a first-class editorial experience for a global workforce.
4.8 Q2 2026 Competitive Response Sprint
In direct response to rapid iterations from Sveltia CMS and Directus 11, SveltyCMS has prioritized the following “Parity & Leapfrog” items for April 2026:
- Sveltia Parity Suite: Implemented locale-agnostic slug preservation, improved regex normalization for international characters, and CI-linked “Publishing…” status indicators in the editor shell.
- Smart Diff UI: A dedicated comparison modal within the Enterprise Monitor that filters for “only modified fields,” allowing editors to review changes in 100+ field collections in seconds.
- Hardened Auth Security: Field-level access control (FLAC) applied to internal authentication fields (email, provider, role), matching recent security hardening in Payload 3.81.
- One-Click Sveltia Importer: A native migration utility that parses Sveltia
config.ymlfiles and Git-based content to instantly scaffold SveltyCMS collections and import markdown data. - Managed Cloud Tier: Collaborative infrastructure offering managed Postgres/Redis via Fly.io, targeting SaaS users who require SveltyCMS performance without operational overhead.
May 2026 Additions — Security & API Hardening:
- 4-Layer Defense-in-Depth Authorization: Zero-trust re-validation at Middleware, Dispatcher, Handler, and Page Action layers. Cookie prefix hardening (RFC 6265bis), setup completion gating, admin verification, media permission checks, centralized permission guards.
- Timing-Safe Cryptography:
crypto.timingSafeEqualon all security-sensitive comparisons (test secrets, TOTP codes). - ETag Conditional Requests: SHA-256 ETag headers with
304 Not Modifiedsupport for bandwidth-efficient client caching. - API Versioning:
X-API-Version: 1header and/api/v1/path prefix routing for future-proof API evolution. - 56 New Security Tests: Defense-in-depth unit tests (51) + session fixation prevention tests (5). Total test suite: 861 tests, 105 files, 0 regressions.
5. Phase 3: The Enterprise Leap (Q2-Q3 2026) ✅ COMPLETE
To cement its position as the undisputed category leader against platforms like Payload CMS, SveltyCMS is deploying three critical architectural features that transform it from a high-performance engine into a fully-fledged enterprise application platform.
5.1 Database-Backed Background Jobs Queue
- The Gap: Edge and serverless functions (like Vercel) time out during heavy operations (e.g., Sharp/WebP generation, AI enrichment), leading to brittle media workflows.
- The Solution: A native
svelty_jobstable managed by the database-agnosticJobQueueService. - Advanced Features (March 2026):
- Concurrency Guard: Implemented
IMPORT_CONCURRENT_MAXto prevent server exhaustion during simultaneous multi-tenant bulk operations. - Real-Time Progress Tracking: Jobs now support granular
progressupdates (e.g., “450/1000 items processed”), allowing for a more transparent editorial experience. - TTL-Based Temporary Store: Large job payloads are offloaded to a temporary file-backed store with automatic TTL cleanup, preventing DB index bloat.
- Concurrency Guard: Implemented
- Impact: Heavy workloads are offloaded to a persistent polling worker (or CRON fallback), eliminating front-end blocking and save-failures entirely. This is the cornerstone of enterprise stability.
✅ Completed June 2026: Adaptive job scheduler with exponential retries, API management, and audit integration.
5.2 The Zero-Latency “Local SDK”
- The Gap: Fetching content via HTTP within the same SvelteKit runtime adds unnecessary serialization overhead.
- The Solution: Injected a formal, typed
cmsinstance intoevent.localsvia middleware. - Impact: Developers can query the database directly in
+page.server.ts(await locals.cms.find('posts')) with zero HTTP latency, achieving true full-stack SvelteKit synergy.
5.3 Virtual “Join” Fields
- The Gap: Traditional relational graphs cause either N+1 query performance deaths or massive over-fetching. Traditional databases also struggle with “inverse” relationships (e.g., finding all comments for a post) without redundant field storage.
- The Solution: Payload-style virtual join fields utilizing dynamic Drizzle queries. We introduced the Smart Join field type, which dynamically queries inverse relationships during the
populatephase. - Impact: Keeps the sub-millisecond auth and fast SSR intact even on deeply nested, complex content trees. Developers can now model
Post -> CommentsorProduct -> Reviewsrelationships with zero database bloat and maximum query efficiency.
5.4 Durable Webhook Engine & DLQ
- The Gap: Standard webhooks often fail silently or flood endpoints during high-traffic bursts. Retrying 4xx “Poison Pills” wastes server resources and clogs worker queues.
- The Solution: A job-queue-driven delivery system with HTTP status awareness. Retries are reserved for 5xx/429/Network errors, while 4xx failures are instantly routed to a Dead-Letter Queue (DLQ) for admin review.
- Impact: Improves delivery reliability (retry on 5xx/429/network; 4xx → DLQ). Not a mathematical 100% delivery guarantee under prolonged outages.
5.5 Native Soft Deletes (Trash System)
- The Gap: Accidental deletions in enterprise CMS environments often lead to permanent data loss or manual database restoration. Standard soft-deletes often face “Unique Index Collisions” when trying to re-use slugs of deleted items.
- The Solution: A native trash system with “Mangle-on-Delete” logic. Unique fields are automatically suffixed with a deletion timestamp, and the
safeQuerymiddleware ensures trashed items are globally isolated from production APIs by default. - Impact: Provides a safety net for content editors without the performance or indexing overhead of traditional archival strategies.
5.6 Per-Field Content Localization ✅
- The Gap: Document-level i18n requires switching entire documents per language, making side-by-side editing impossible.
- The Solution: Per-field
Record<Locale, string>storage with inline locale switchers and AI-powered translation. - Impact: Editors can see all language variants of a field simultaneously, translate with one click, and track per-field translation progress.
6. Conclusion (truthful summary)
Is SveltyCMS “state of the art”? That is a product judgment, not a single score. Against our own design goals and self-measured suites:
| Dimension | Evidence (self-described / self-measured) | Limits |
|---|---|---|
| Architecture | Svelte 5 + shared SqlAdapterCore + 4 production DB adapters |
Still a full Node/Bun process; not magically edge-only for all features |
| Performance | SQLite sub-ms CRUD; networked ~0.5–2 ms RTT; findPage / count cache product layer |
Not a global speed ranking; not same-harness vs Payload/Strapi/Directus |
| Security | Fail-closed API, hashed tokens, RBAC, audit chain; scanners in CI | 99.93/100 (~99.9%) internal checklist, re-checked 2026-09-29. Not a pentest. |
| Intelligence | Behavioral learning, AI scaffolder, MCP, marketplace docs | Learning warms caches; does not rewrite engines under load |
| Stability | Soak / leak benches exist in-repo | One 5-min soak is evidence of a path, not eternity |
Verdict (neutral): SveltyCMS is a self-hosted headless CMS with strong documented security packaging in core, multi-DB adapters, and an automated benchmark culture. Use Competitive Comparison for buyer trade-offs (React ecosystem, marketplace size, MSSQL). Prefer reproduce (bun test tests/benchmarks/…) over absolute ranking language.
7. Milestone log (engineering, not trophies)
Selected 2025–2026 engineering milestones. Metrics are self-measured unless noted.
7.1 Core engine & DX
-
Toolchain: oxlint/oxfmt for fast lint/format (project-scale times vary by machine).
-
SQL hot path: prepared-statement / shared core work across SQLite, PostgreSQL, MariaDB.
-
Client shell lean-down (August 2026): eliminated the last two
import * as mwildcard Paraglide imports (command-palette.svelte,modal.svelte.ts) that forced the full 968-message catalog into the eager(app)shell. Replaced with named imports + static key map; eager admin shell dropped 705 KB → 502 KB raw (−29%, gzip 188 KB) measured on the production build manifest.scripts/check-bundle-size.tsnow detects the real admin-shell node (nodes/N.js) instead of onlylayout*.jsfiles, so TipTap/email-preview leaks into the shell fail CI. -
Memory: SDK allocation work targeting low growth under load (see soak benches).
-
Write-path index hygiene (September 2026): every content table was provisioned with two index twins that are strict prefixes of their keyset-pagination variants —
(tenantId, status, updatedAt)beside(tenantId, status, updatedAt, _id)and(tenantId, updatedAt)beside(tenantId, updatedAt, _id)— so neither served a plan the tiebreaker index cannot serve, while every UPDATE maintained both. PostgreSQL, 2000 single-row updates per statement, interleaved: 31.6 µs → 13.1 µs per row (−58 %) for the whole SET/index path, of which the two twins alone are 8.4 µs (−27 %) and thedataGIN 10.1 µs. The twins are now dropped explicitly (DROP INDEX IF EXISTS) in the PostgreSQL, MariaDB and SQLitecreateModel()— no legacy index is left behind — and fresh SQLite table definitions no longer declare them. The GIN stays: it earns its keep (dynamic-field containment filters 7.9–10.9 ms → 0.1–1.7 ms at 100 k rows) and remains opt-out per collection viajsonIndex: false. Stated honestly: at 8 concurrent workers the HTTP lane is I/O-commit-bound, so this statement-level reduction lands inside the ±5–10 % per-lane run-to-run scatter of a shared host (5-round medians; read lanes — which the change cannot touch — drifted 0.91–1.05× between the two variants); the statement-level figures are the reliable signal, and the payoff is WAL, disk and VACUUM rather than RPS. -
Reusable CPU profiling for soak runs (September 2026):
SVELTY_CPU_PROFILE=<dir>starts V8 sampling at boot and writes rotating.cpuprofilesnapshots every 30 s (configurable, floor 1 s) with atomic.tmp+ rename writes, so attribution survives a harness that SIGTERMs its child and SIGKILLs it — the exact case wherenode --cpu-prof, which writes only on a clean exit, produces no file. Off by default (one env read at boot, no imports);tests/unit/utils/cpu-profiler.test.tspins the disabled path, snapshot loadability and the two-file rotation bound. -
Middleware: hooks pipeline optimized; full-auth HTTP is ms-class, not free. August 2026 hardening sprint measured 0.583 ms avg / 0.768 ms p95 / ~1,442 RPS for the full security + auth pipeline (SQLite, self-measured 2026-08-10) vs the 0.856 ms July 31 baseline.
-
Widgets:
ComponentLoader/ tree-shakeable loaders. -
DB parity: MongoDB, MariaDB, PostgreSQL, SQLite as production adapters.
-
Enterprise Security & Automated Response: Unified
SecurityResponseServicewith Redis-backed state and a linear ReDoS-safe threat scanner (shared WAF + AuthGuard). -
CI Pipeline Restoration: Playwright E2E suite stabilized across all supported databases.
-
Active Database Driver Validation: Eliminated “lazy connection” false positives in setup via mandatory
SELECT 1pings. -
GraphQL JIT Execution Engine: Multi-fold increase in RPS via
@envelop/graphql-jit. -
API Benchmarking Suite: Native, reproducible suites (
tests/benchmarks/rest-api-performance.test.ts,tests/benchmarks/graphql-api-performance.test.ts) that measure both surfaces under the same harness, so comparisons are like-for-like and date-stamped rather than asserted. -
Advanced Security Isolation: Implementation of COOP/COEP headers and refined multi-tenant cookie security for cross-origin isolation.
-
High-Performance GraphQL: Resolver memoization and JIT execution reducing API latency and redundant database hits.
-
GraphQL.js 17 + Yoga (August 2026): Upgraded to
graphql@17.0.2with nativegraphql-yoga@5.22.0support and zero-allocation AST visitors. -
Tenant Management Admin Dashboard (July 2026): Full-featured tenant administration UI at
/config/tenantswith create/suspend/activate operations, real-time quota visualization (users, storage, collections), and plan-level resource enforcement. Gated behind system-adminisAdmin && !tenantIdguard and multi-tenant flag. Backed by the database-agnosticISystemAdapter.tenantsinterface with a MongoDB implementation viaMongoCrudMethodsand shared SQL implementation (RelationalSystemModule) across PostgreSQL, MariaDB, and SQLite. Integrated into the system settings configuration for instant access. -
CLI Maintenance Suite: Native
cache:clearutilities for system-wide and tenant-specific operations. -
5-Pillar Content Architecture: Consolidation of 19 fragmented files into 5 high-performance pillars, reducing content system module overhead by 74%.
-
99.9% Self-Healing Cache (April 2026): Implemented granular “Smart Repair” and Content Scanning (mtime-hashing + Worker Pool), reducing structural reconciliation time by 99.9% (210ms → 0.05ms).
-
Real-Time SSE Synchronization (March 2026): Replaced 10s client polling with Push-based Server-Sent Events, achieving sub-100ms synchronization across all admin instances.
-
Global Accessibility: Intelligent RTL (Right-to-Left) support in the RichText editor for Arabic, Hebrew, and Farsi.
-
Vectorized Request Modification: Refactored the core data transformation pipeline to support chunked batch processing, reducing function call overhead by 70% and ensuring the event loop remains responsive during 10,000+ item imports.
-
Atomic Content Versioning: Implemented
ContentVersionManagerutilizing native database atomic increments ($inc/RETURNING), eliminating race conditions in high-concurrency multi-tenant environments. -
System-Level SDK Context: Enabled
system: trueexecution in the Local SDK, allowing background services and migrations to bypass row-level permissions while maintaining high-performance direct access. -
Multi-Tenant Slug Uniqueness: Dedicated Slug widget with
tenantScopedUniqueanddisableUniquecontrols for granular identifier management.
7.2 Visual Intelligence & Enterprise Collaboration
-
Website Starter + Svedit (July 2026): Default Setup Wizard preset — in-repo SvelteKit site at
/, Svedit block renderer, seeded homepage, headless toggle. Free site + form saves; paid Live Preview bridge. -
SEO head rendering for the site starter (October 2026): the SEO widget’s stored per-locale data now lands in the public document head —
<title>(SEO meta title first), meta description/keywords, canonical, robots, Open Graph, Twitter Card, JSON-LD and hreflang alternates — assembled by the pure builder insrc/services/content/seo/seo-head.tswith the widget’s save-time entity escaping decoded exactly once and JSON-LD re-serialized break-out-proof (<→\u003c).ogImage/twitterImagemedia IDs resolve to absolute public URLs server-side; draft/preview renders always emitnoindex./sitemap.xml(paginated, so the SDK’s page clamp no longer truncates it) respects per-entrynoindexand duplicate-canonical controls and mapspagesto the real site routes with hreflang alternates;/robots.txtdisallows the admin/auth/system routes. Pure helpers are unit-tested (tests/unit/services/seo-head.test.ts,sitemap-builder.test.ts). -
SEO beyond the widget (October 2026): auto-generated site JSON-LD (WebSite on the homepage, BreadcrumbList from the URL hierarchy) rendered alongside the widget’s schemaMarkup; a dynamic
/llms.txtfor AI crawlers built from the published collections (sanitized, capped, cached per tenant); a Core Web Vitals readout in the widget’s Advanced tab that measures the canonical URL on demand through the PageSpeed Insights API (CrUX field data + Lighthouse lab data, threshold-color-coded, no key required — display-only by design); IndexNow on publish (premium: fire-and-forget submission to the Bing/Yandex/Seznam/Naver ecosystem, CSPRNG key auto-generated and served at/indexnow.txt, license-gated like the sitemap, skipped underskipSideEffects); and AI-crawler robots directives via theAI_CRAWLER_POLICYpublic setting (per-crawler groups; search crawlers unaffected). The legacy “automated pings to Google and Bing” doc claim was corrected: Google deprecated its sitemap ping endpoint in June 2023. -
In-Context Live Preview: Visual DnD, pulses, and editable highlights within the live site frame (Editable Website plugin).
-
AI-as-a-Field-Type: Native
AIEnrichmentwidget and LLM-driven Smart Translation. -
Agent-Ready WebMCP Protocol (April 2026): Native
content.tsWebMCP integration offering “Draft-by-Default” execution buffers and schema-aware, token-optimized context payload generation to power external Autonomous Agents. -
Multi-Cloud Storage Engine: Universal strategy adapters for S3, R2, and Cloudinary.
-
Hosted MCP Server: Model Context Protocol server live at
mcp.sveltycms.com. -
Active Visual Workflow Engine (FSM): Production-ready Node-based editor with strict RBAC transition guards, secure crypto IDs, and true
tenantIdisolation across all workflow logic. -
Enterprise Smart Diff View: Hardened
diff-utilsimplementation performing recursive zero-latency change analysis, protected against circular DOSt vulnerabilities and optimized with Svelte 5$derivedmetrics. -
Multi-Tenant Hardening (July 2026): Production-hardened isolation across all layers:
- PostgreSQL Row-Level Security: Opt-in
enforceTenantPolicy()withCREATE POLICY tenant_isolationandset_config('app.tenant_id', …, true)on a transaction-scoped handle or a dedicated tenant pool. It is not wired into the request path — request isolation is the application-level"tenantId"predicate — and the method now fails closed when the policy cannot filter. See multi-tenancy. - Signed Media URLs: HMAC-SHA256 time-limited file access with
crypto.timingSafeEqualvalidation. Opt-in viaMEDIA_SIGNED_URL_ENABLED. - Per-Tenant Rate Limiting: Two-tier token bucket system (per-IP + per-tenant) with independent budgets, preventing noisy tenants from starving neighbors.
- Tenant Analytics Dashboard: Per-tenant usage widget showing storage, users, collections, entries, and 24h activity — scoped by
locals.tenantId. - Tenant-Scoped API Keys: Token management UI with tenant scope selector (Current Tenant / Global). Backend already supports
tenantIdin auth cache lookups. - Per-Tenant Database Connection Pooling: Optional dedicated postgres.js pools per tenant with configurable
TENANT_DB_POOL_SIZE. Visible asapplication_name = tenant_{id}inpg_stat_activity. - E2E Isolation Tests: 5 Playwright tests verifying cross-tenant collection, file, content, global resource, and schema boundaries at the HTTP level.
- 19/19 architectural features covered across CRUD guard, RLS, signed URLs, rate limits, GraphQL, file serving, media, plugins, SSE, batch ops, migration, and E2E testing.
- PostgreSQL Row-Level Security: Opt-in
-
Durable Jobs & Webhooks: Redis-backed job queue (
svelty_jobs) and DLQ-aware webhook engine. -
Asynchronous Background Imports: Off-thread processing for large datasets with concurrency control.
-
Real-Time Collaboration: CRDT-based concurrent editing (Yjs) over standard HTTP.
-
Formal Server-Side SDK: Native
locals.cmsfor zero-latency SvelteKit integration. -
Essential Utilities: Standardized high-performance
cn,pluralize, andslugifyutilities for robust UX foundation. -
Adaptive Job Scheduler: Lightweight background job runner with adaptive polling and audit integration for scheduled publishing.
-
Crypto-Chained Audit Logs: SHA-256 tamper-evident audit trail with chain verification and per-content viewer.
-
Per-Field Localization: Record
field storage with inline locale switchers and one-click AI translation. -
Flexible system languages (September 2026): Admin UI ships EN/DE. Setup and System Settings use the same ISO 639-1 picker as content languages (RTL via
getTextDirection()in@utils/string). Completing setup writesproject.inlang/settings.jsonand runsbun translate+bun run paraglide. Guide: System Languages. -
EU + Arabic language pack seed (September 2026): Catalogs for FR, ES, IT, NL, PL, and AR clone English with a reviewed chrome overlay (
scripts/seed-language-packs.ts);project.inlang/settings.jsonlists all eight locales. Remaining keys stay English until human review. Arabic setshtml dir="rtl"viagetTextDirection. -
AI-Assisted Builder Phase 1 (September 2026):
POST /api/ai-builder/approve-collectionvalidates a design proposal, writes a TypeScript collection schema via the compiler AST (generateCollectionSourceFromProposal), compiles withsyncContentState, and audit-logs the approval. Draft-gated (status: "draft"); refuses overwrite unlessoverwrite: true. Admin-only, tenant-scoped. -
Smart Table advanced UX (September 2026): Multi-column sort (
sort=title:asc,createdAt:desc+QueryBuilder.orderBy), advanced AND/OR filter modal (filterLogic+orWhere), and ATAG keyboard grid navigation (arrow keys, Home/End, Space, Enter) on collection entry lists. -
Marketplace remote install (September 2026):
POST /api/marketplace/installdownloads remote packages throughvalidateEgressUrl/safeFetch, verifies SHA-256 checksums, allowlists install paths, and activates licenses viaPOST /api/marketplace/license. In-app Install / license / package-detail UI on Extensions → Marketplace. -
Zero-Dependency Full-Text Search (adapters): Database-native FTS adapters implemented across PostgreSQL, MariaDB, SQLite, and MongoDB with no additional npm packages; not yet wired into the live search path (see roadmap).
-
AI-Smart CMS Migration: 5-format importer with heuristic field mapping, ACF/CMB2 detection, and drag-and-drop UI.
-
Quick-Start Collection Templates: 7 setup presets — Website Starter (default) plus Blog, Agency, SaaS, Corporate, E-commerce, and Blank.
-
Progressive Initialization UX: Synchronous middleware init — zero-latency cold start without intermediate pages or polling, saving system resources.
-
Setup Wizard: dedicated Project Blueprint step (October 2026): Blueprint and market controls moved out of the System step into a new step (wizard order: Database → Admin → Project → System → Email → Complete), implemented in
src/routes/setup/project-config.sveltewith the step graph re-indexed insrc/stores/setup-store.svelte.tsand+page.svelte. The market fields (country, currency, shop language, tax rates) now render only when theecommerceblueprint is selected, so country data is never requested for non-commerce setups; tax/shipping rows were already seeded only for theecommercepreset (seedEcommerceDefaults,setup.server.ts). New step labels ship translated across all 8 locales (setup_step_project/setup_step_project_desc);tests/e2e/routes/setup/setup-wizard.spec.tsupdated to the new step order. -
Behavioral Learning Engine (June 2026): Server-side access pattern tracking with exponential decay scoring, driving adaptive cache warming, smart prefetch, and automatic dashboard reordering.
-
AI Widget Scaffolder (June 2026): On-demand code generation for custom 3-pillar widgets from a config object.
-
Hosted Marketplace (June 2026): Plugin/widget ecosystem at marketplace.sveltycms.com with REST API, Stripe checkout, and License v1 verification.
-
Marketplace Phase 2 — In-App Catalog & Dashboard Widget Packages (August 2026): Extensions → Marketplace tab with
GET /api/marketplaceoffline-first merge; dashboard widgets refactored into marketplace-portable package folders (widgets/<folder>/+ requiredwidget.json+.mdx);installDashboardWidget(); local catalog listings with license/price badges. Server-side license gates for premium dashboard endpoints (dashboard-license.ts→403 LICENSE_REQUIRED, 14-day key-less trial) alongside client-side upgrade prompts — one Free / Freemium / Paid model shared with widgets, plugins, and the site starter. 22/22 core dashboard packages validated byscripts/check-dashboard-widget-packages.mjs(manual:bun run lint:widgets), including freemium Commerce Orders and Commerce Inventory (14-day trial). -
Access management lean-up + fail-closed RBAC writes (August 2026):
/config/access-managementstays admin-only;POST /api/user/update-rolesis denied touser:writeeditors at the dispatcher and handler; website-token mutations require admin; unusedaccess.remote.tsquery("unchecked")token RPCs removed; tabs (permissions/roles/admin/tokens) load on demand; role/permission SSR payloads are field-allowlisted; token user picker drops password/2FA fields. Coverage:tests/unit/api/user.test.ts,tests/unit/api/dispatcher-security-matrix.test.ts,tests/unit/routes/access-management-page-server.test.ts,tests/unit/config/website-tokens-api.test.ts. -
Sharp handling: safer, leaner, faster (2026-09-25): one shared
getSharp()loader (src/utils/media/sharp-loader.server.ts, memoized + retryable,raise-fail-fast withSHARP_LOAD_FAILED, typedSharpFactory) replaces five local loaders and two inlineimport("sharp")sites (image-processor,media-processing,media-service,media-storage, smart-importer,hooks.server.tsboot tuning); the sharedMAX_INPUT_PIXELS(100 MP) bomb guard now covers every pipeline — includingmanipulateMediaand the smart-importer, which previously had no guard; JPEG variants dropmozjpeg: true— measured 9.2× faster at +26 % bytes (tests/benchmarks/sharp-vs-bun-image.test.ts,JPEG 1920 (sharp, mozjpeg OFF)row; editor q92 output keeps mozjpeg deliberately). Validated: 267 media/plugin unit tests, SQLite integration 689/689, and the media audit + upload-stress benchmarks on a fresh harness build. Same-day follow-ups (2026-09-25): widget multi-uploads now save through an order-preserving bounded pool (cap 4,process-upload.ts, coveragetests/unit/widgets/core/media-upload-process.test.ts);SVELTY_JPEG_MOZJPEG=1is a deployment opt-in that restores mozjpeg for byte-critical hosts. Measured and deliberately not shipped: decode-once ladders (JPEG −8 % vs shrink-on-load re-decode, PNG ≈ 0) and WebP effort 0/1 (≤ noise, +1.9–5.7 % bytes) — rows insharp-vs-bun-image.test.ts. Deferred-variant coalescer (2026-09-25):variant-job-scheduler.server.tsgives the deferred preset pipeline single-flight per (tenant, hash) plus a FIFO queue capped bySVELTY_VARIANT_JOBS(default 2) — concurrent identical uploads share one pipeline run and batch imports queue in waves instead of saturating libvips/memory; coveragetests/unit/media/variant-job-scheduler.test.ts(5 tests), full unit 557/557. -
Plugin Admin Pages (
pagepart, August 2026): plugins contribute full admin pages under/plugin/<path>(catch-all route + isomorphic registry + serverload+ RBAC 403 gate) with declarative sidebar nav, plus the<AdminZone>renderer that activates the previously dormantadminToolandAdminAreaExtensionregistries (sidebar/header/footer/toolbar/dashboard/config/content zones). -
JPEG is the default derivative format (2026-09-27): the encoder, not the resize, dominates the upload ladder, and the effective default was split — the setup seed wrote
{ format: "webp" }whilesaveResized()fell back tooriginal. Both now resolve to JPEG through one shared normaliser (DERIVATIVE_FORMATS/normalizeDerivativeFormat()insrc/utils/media/media-models.ts,jpgas the historical alias, unknown value ⇒jpeg), so the SIZES ladder writes one file per step instead of a WebP primary plus a WebP sidecar.webp/avifstay one setting away (MEDIA_OUTPUT_FORMAT_QUALITY.format), andoriginalkeeps the old source-format + WebP-sidecar pairing as an explicit opt-in. A source with an alpha channel keeps WebP rather than being flattened onto the JPEG encoder’s background. Original uploads stay byte-for-byte, the 32 px LQIP keeps its own WebP rule, and blueprint-levelmediaConfig.convertTo(smart-importer) still wins over the global default. Coverage:tests/unit/media/processing/media-storage.test.ts,tests/unit/media/derivative-ladder.test.ts; measured cost table (self-measured 2026-09-27: JPEG 1920 40–57 ms, 4-step ladder 40–57 ms, AVIF 640 102–143 ms) in media-system.mdx. -
Zero-Allocation Driver & GraphQL Fast-Path Acceleration (August 2026): Static ESM binding for hot API domain handlers (
collections,content,auth,system,tokens,media,dashboard) eliminating dynamic-import resolution on 95%+ of traffic; bounded FIFO route resource state machine (1024 entries); zero-allocation SQLite/relational query parameter coercion (direct array reuse when values need no conversion); pre-compiled fast-JSON envelope serializers; and expanded single-collection GraphQL fast-path supporting filters and sorts directly viaLocalCMS(bypassing Yoga GraphQL AST generation). Verified with reproducible benchmarks: direct adapter reads at 0.013ms (48.4k RPS), LocalCMS SDK calls at 0.017ms (54.9k RPS), cached counts at 0.003ms (145.8k RPS), and GraphQL collection throughput of 759 RPS. -
Cache 2026 Next-Gen Architecture & Multi-Node Cluster Suite (Late August 2026):
- GraphQL Automatic Persisted Queries (APQ): Implemented standard Apollo APQ protocol (
extensions.persistedQuery.sha256Hashand GET?extensions=/?hash=) with fail-open handshake (PERSISTED_QUERY_NOT_FOUND) and L1 RAM / L2 Redis query registration (7-day TTL), eliminating AST compilation overhead on cached queries. - AI-Driven Speculative Pre-Warming: Integrated
routeResourceStateMachinewith theBehavioral Learning Engine(predictNextPathMarkov transitions). The highest-scoring transition triggers non-blocking, single-flight pre-warming of target endpoints before the user clicks. - Zero-CPU Pre-Compressed Binary Byte-Serving:
responseCacheasynchronously computes Brotli and Gzip binary chunks (Uint8Array) for responses $>1\text{ KB}$. TURBO-HIT and GraphQL hit paths serve binary chunks directly with zero on-the-fly CPU compression during traffic spikes. - $O(1)$ Circular Ring-Buffers: Converted cache metrics buffers to fixed $O(1)$ circular ring buffers, eliminating continuous 1,024-element GC array re-allocations on every request.
- Empirical Validation: Benchmarks verified Local SDK at 0.004 ms (195.2k RPS), HTTP E2E at 0.440 ms (2,262 RPS), GraphQL peak stress capacity at 4,785 RPS (100 concurrent connections), and Direct findOne at 0.006 ms (167.3k RPS).
- GraphQL Automatic Persisted Queries (APQ): Implemented standard Apollo APQ protocol (
-
Middleware Pipeline Streamlining & Tag-Based Invalidation (August 2026): Pruned mutation-only hooks (
handleRateLimit,handleAuditLogging) fromAPI_READ(GET) andtoken-resolutionfromAPI_WRITE; mergedhandleLocalSdk+handleContentInitializationinto atomichandleLocalContext; unified AEO headers directly intoapplyAllSecurityHeaderseliminating standalone middleware; tag-based cache invalidation across all 4 database adapters (res:graphql,res:col:*) resolving GQL-after-write caching; and$state.rawfrontend table runes. Verified viatests/benchmarks/hooks-performance.test.ts: REST with API Caching latency reduced to 1.27ms (604 RPS, +11.2% throughput), mutation latency reduced to 2.10ms (-14.3%), and p95 auth pipeline down to 4.34ms. -
LiteRT.js AI Client (July 2026): Client-side browser ML inference via LiteRT.js in an isolated Web Worker — WebGPU primary, XNNPACK fallback, transparent Ollama fallback. First use case: alt-text generation (
ai.generateAltText()) for direct WCAG/ATAG compliance. CSP-safe — admin page security headers never modified. SvelteKit remote function API (import { ai } from \"@services/ai-client\"). Worker bundled by Vite and loaded vianew URL(...); no separate serving route. 13 files, 3K+ lines, 100% TypeScript, 4 unit tests. -
Unified Data Hub v2.4.0 (REST write-back): All 5 connector types (Postgres, MariaDB, SQLite, MongoDB, REST) support read+write. REST writes are opt-in (
writesEnabled), SSRF-safe, with Idempotency-Key dedup and circuit breaker. GraphQL mutations (createVirtualEntry,updateVirtualEntry,deleteVirtualEntry) for headless clients. Full API parity across LocalCMS, HTTP, GraphQL, and WebMCP agents. 96 unit tests. -
Unified Data Hub v2.2 (stable): Marketplace plugin — Postgres + REST federation, same-source joins, native stitch enrich, Collection Builder enrichment picker, GraphQL/WebMCP parity, per-source cursor pagination, decomposition telemetry, headless contracts, cross-source alpha (opt-in). See unified-data-hub.mdx.
-
E2E Architecture Simplification: Collapsed 20 Playwright projects → 4 (wizard, firstuser, auth-setup, chromium). Reduced CI jobs from 19 to 6, server startups from 19 to 1. Total E2E time ~70–110 min → ~12–15 min.
-
Intelligence Consumption, Predictive Navigation & Smart Table Saved Views (September 2026):
- Behavioral Navigation & Collection Tree Smart-Tag: Confidence-gated adaptive prediction (
predictNextPathAdaptive) eliminates cold-start guesses;<Collections />andTreeViewrender polymorphic<a>links withdata-preload="smart"for the server-predicted collection destination alongside pinned and plugin links. - “Warm Next Page” on Smart Tables: Converted table pagination controls (
pagination.svelte) to predictive links; the Next Page button usesdata-preload="viewport"to trigger automatic route pre-warming (/api/system/prewarm-route) and data preloading viaIntersectionObserverbefore click. - Heat-Aware SWR & Dashboard Quick Chips: Top-20 hot collections keep a 60s fresh window but serve stale up to 15 min with background revalidation; the admin dashboard surfaces quick-access chips from
hotCollections. - Smart Table Saved Views 100% Platform Completion: Extended
SmartTableSavedViewsMenuto Media Gallery (mediagallery/+page.svelte) and User Management (user-management.svelte), achieving 100% coverage across all 4 list surfaces (Collections, Website Tokens, Users, and Media Gallery). - SSR & Pipeline Lean Execution:
- Zero Redundant User Reads: Synchronized
userCountbetween authz hook and SSR layout cache; seededlayout:user:${_id}upon auth resolution, eliminating secondary DB user queries on layout render. - Content Structure SSR Fast-Path: Eliminated unused
getNavigationStructureexecution fromcontentPromiseand added synchronous L1 retrieval for cached sidebar structure. - GraphQL AST Re-Parse Elimination: Stashed pre-parsed GraphQL AST from
handle-security.tscomplexity checks ontoevent.locals.__graphqlAstand wired into GraphQL Yoga’sonParse, avoiding duplicate AST parsing on/api/graphqlPOST requests. Peak throughput reached 4,563 RPS.
- Zero Redundant User Reads: Synchronized
- Behavioral Navigation & Collection Tree Smart-Tag: Confidence-gated adaptive prediction (
-
Admin Session Console & Smart Table List Platform Expansion (September 2026):
- Admin Session Console UI: Shipped dedicated
ModalUserSessionsdialog in User Management (user-management.svelte) allowing administrators to inspect active sessions per user (device type, browser, OS, client IP, last active timestamp) and revoke individual sessions or all other sessions with CSRF protection. - Status & Role Facet Chips: Added interactive facet chips above the users table (
All,Admins,Users,Active,Blocked) with sub-millisecond filtering and dynamic state management. - List Query Observability: Instrumented
recordListQueryacross/api/userand/api/tokenand connectedSmartTableMetricsBadgeto user management and token tables for real-time p50/p95 latency and hit-rate telemetry. - Filter Engine Reuse: Added allowlisted field filtering (
role,blocked,email,username,createdAt) acrossauth.tsandAuthNamespace.listUsers.
- Admin Session Console UI: Shipped dedicated
-
Adapter-agnostic speculative Turbo fill & 100k write-burst integrity (September 2026):
-
Functional loop (measured): hover/predict/viewport/smart →
GET /api/system/prewarm-route→ LocalCMSfindById/find(all 4 adapters) →{success,data}stringified once →responseCache.buffer(Uint8Array) → next collection GET returnsX-Cache: TURBO-HIT(zero DB, no per-requestJSON.stringify). Proven bytests/benchmarks/speculative-turbo-hit.test.ts. -
What this is not: no frozen radix trie / O(1) segment-offset dispatch (
classifyRouteSpecis a 15-entry exact Map +startsWith+ 1024 LRU). Prediction ispredictNextPathAdaptive(≥5 samples and 30% accuracy, not an 82% example). Extinction is 0.8 on non-chosen alternatives at navigation time, not a 10s timer. Transition cap is 10,000 per tenant (prediction-stats cap is 5,000). Turbo GET still goes through SvelteKitResponse+ security headers — JSON/GC cost is gone; there is no raw TCP-socket bypass. -
Write-lane TTL slide:
getTurboAuthContextslides expiry on every hit; the collection write lane falls through to full auth instead of 401 when turbo is cold. NodeheadersTimeoutonindex.cjs/index.bun.tsis 10 minutes (was 60s 408 with no CMS log). That pair aborted 14/100k Postgres seed rows at ~60s. -
Seed integrity: HTTP seed bursts retry 401/408/429/503/socket drops and fail if
created !== requested. VerifiedBENCH_DOCS=100000competitive replica on PostgreSQL: 100,000/100,000 seeded, 87s wall (self-measured 2026-09-02). -
Scale-spectrum ledger (executed):
exportResultper step +printTruthTable;BENCHMARK_RECORD=1wrotehistory.sqlite(test_id=scale-spectrum) and MDX ledgers. Self-measured 2026-09-02, 1-row vs largest-step retention:Engine Steps findByIdRandom listFilterSort GraphQL Create SQLite (entry) 1→10k 2271→1581 RPS (0.70×) 2444→4602 (1.89×) 2047→3873 (1.89×) 1474→2540 (1.73×) PostgreSQL 1→100k 2379→1372 (0.57×) 2185→4410 (2.03×) 1923→3294 (1.71×) 1084→1482 (1.40×) MariaDB 1→100k 2303→1366 (0.60×) 2124→4329 (2.04×) 2098→4021 (1.91×) 1132→1002 (0.90×) MongoDB 1→100k 2420→1905 (0.78×) 2193→3971 (1.81×) 2179→3085 (1.41×) 1370→2521 (1.84×) LIMIT/PK paths stay flat-to-faster with N. Random PK retains 57–78% at 100k (B-tree depth + cache misses), not an O(N) collapse. MariaDB create at 100k is the only write dip (0.90×).
-
SQLite
mixedtrend (not a new cliff): ledger 🔴 +34% seq / +45% con vs the 7-run mean (~0.43 / 1.89 ms). This session’s pre-change baseline was already 0.47 / 2.80 ms; post-change re-runs sit at 0.58 / 2.74–3.47 ms. Mixed is write-growing (1/10 creates) and runs last after 300 creates + 300 updates, so it is noisier than isolated lanes. Not treated as a product regression. -
Bootstrap skip:
routeSpec.skipMiddlewaresis honored (preferences/media) instead of being classified and ignored.
-
-
Point-lookup slab & hot-path serialization (September 2026):
- Random-access slab cache: Implemented dedicated 2,000-slot FIFO cache (
randomAccessSlab, 30s TTL) for point lookups, automatically invalidated on node/collection mutations. Boosted warmfindByIdRandomfrom 1,488 RPS to 4,404 RPS (+196% cold-to-warm boost), bringing random point-reads to parity with sequentialfindById(4,643 RPS). - LRU lock contention elimination: Disabled
updateAgeOnGetonENTRYandCONTENTcategories incache-service.ts, removing unnecessary LRU reorder lock overhead on read-heavy hot paths. - Pattern invalidation acceleration: Invalidation latency reduced by −87% (4.11ms → 0.53ms, +676% RPS, 243 → 1,884 RPS).
- Single-pass O(N) array serialization: Refactored
serializeArrayFastinsrc/utils/fast-json.tsinto a single-pass join ([${out.join(",")}]), avoiding multi-slice concatenation and GC overhead on large array payloads (listLargereaching 3,538 RPS in SQLite replica). - High-concurrency pool floor: Increased base connection pool floor from 20 to 32 on 8c+ hardware profiles (
src/databases/postgresql/adapter-core.ts), preventing connection pool starvation under 32 concurrent clients. - Transactional mail pool hardening: Enforced
maxRecipients: 1,maxMessages: Infinity,connectionTimeout: 10_000, andsocketTimeout: 30_000on pooled Nodemailer transports (src/utils/email.server.ts), guaranteeing forward-compatibility with Nodemailer 10.0.0.
- Random-access slab cache: Implemented dedicated 2,000-slot FIFO cache (
-
Lean Architecture, Route Centralization & Storage Deduplication (September 2026):
- Catch-All Gatekeeper Centralization: Eliminated rogue standalone API routes (
/api/seo/link-suggestions,/api/chat,/api/remoteVideo), consolidating their logic into the central dispatcher (src/routes/api/[...path]/+server.ts) andhandlers/utility.ts. All endpoints now strictly enforce centralENDPOINT_PERMISSIONS, fail-closed defaults, and RBAC matrix validation. - Storage & Connection Pool Deduplication: Re-architected
src/utils/temp-store.tsto delegate directly tocacheService(CacheCategory.SESSION), eliminating duplicate Redis client instances, redundant pool allocations, and manual Map fallbacks. - Dead Code & Micro-File Pruning: Eliminated ~1,200 LOC of dead code across 12 obsolete files (
file-uploading.ts,security.worker.ts,fs-mock.ts,path-mock.ts,response-headers.ts,field-selection.ts,memory-optimizer.svelte.ts,schema-diff.ts,server-utils.ts,system-integrity.ts,migration-manager.ts,lazy-rune.ts), eliminating micro-file fragmentation and legacy bridges. - Shared Logic & Security Hardening: Consolidated email normalization with Unicode NFC normalization against homoglyph attacks; unified database connection string parsing in Setup with
@utils/connection-parser; wired clientSave-Dataand connection quality detection into@utils/predictive-preload. - AGENTS.md Contract Compliance: Enforced
raise()error handling contract across preview endpoints and eliminatedcatch (err: any)in favor of typedcatch (err: unknown)with safe stringification.
- Catch-All Gatekeeper Centralization: Eliminated rogue standalone API routes (
-
Enterprise Review Workflows, Visual Block Builder & In-App API Playground (September 2026):
- Multi-Stage Review Workflows: Shipped complete content lifecycle FSM (
WorkflowService) with RBAC-gated stage transitions (workflow:transition), audit history logging, collection binding, and visual state editor at/config/workflows. Editors transition entries with optional review comments directly inside the content view via<WorkflowActions>. - Visual Polymorphic Block Builder Widget: Shipped custom
BlockBuilderwidget (src/widgets/custom/block-builder/) enabling component-driven page design with 8 production presets (Hero, Text & Prose, Media Showcase, Call to Action, Features Grid, Quote/Testimonial, FAQ, Rich Text), Valibot schema validation, keyboard-accessible reordering, duplicate/delete operations, and framework-agnostic JSON output for modern headless frontends. - In-App Developer & API Playground: Shipped unified developer console at
/config/apiinside<AdminPageShell>, providing live REST execution against the OpenAPI 3.1 specification, interactive GraphQL query testing against/api/graphql, and multi-language client code generation (cURL, TypeScript fetch, Python requests, zero-latency SvelteKitLocalCMS).
- Multi-Stage Review Workflows: Shipped complete content lifecycle FSM (
-
Enterprise OIDC / SSO with RFC 7636 PKCE & JIT Role Mapping (September 2026):
- RFC 7636 PKCE (S256): Cryptographic Proof Key for Code Exchange support with high-entropy code verifier generation and SHA-256 code challenge computation on every authorization code login flow (
buildOidcAuthorizationUrlandexchangeOidcCode). - Just-In-Time (JIT) Auto-Provisioning & Claim Role Mapping: Automated new user registration on successful OIDC callback, mapping IdP claims/groups (e.g.
groups,roles) to local CMS roles (resolveJitRole), with optional role synchronization on each login. - Dynamic Branded IdP Login Buttons: Front-end login screen (
/login) now dynamically discovers and renders branded IdP login buttons (Google Workspace, Microsoft Entra ID, Okta, Auth0, Keycloak) with official icons, accessible ARIA labels, and predictive hover preloading. - SSO & OIDC Management Console: Dedicated tab in Access Management (
/config/access-management) with provider presets, issuer OIDC discovery validation, redirect URI allowlisting, and granular JIT claim rule management backed by/api/auth/sso-providers.
- RFC 7636 PKCE (S256): Cryptographic Proof Key for Code Exchange support with high-entropy code verifier generation and SHA-256 code challenge computation on every authorization code login flow (
-
Enterprise Collection Builder, Split-View & Database Schema Ingestion (September 2026):
- Smart Type Inference & Natural-Language Quick-Add: Built a zero-dependency client-side heuristic engine (
src/routes/(app)/config/collectionbuilder/smart-inference.ts) enabling instant natural-language field creation (e.g.email,price,cover_image,tags,is_published,author_id,rating,birth_date). Automatically resolves widget types, icons, database field names, and pre-configured validation constraints onEnter ↵, eliminating tedious modal clicks. - Dual-Pane Live “Visual Canvas ↔ TypeScript Code” Split-View: Implemented real-time bi-directional code ↔ GUI awareness in
collection-widget.sveltewith a 3-way view toggle (Canvas|Split View|TypeScript). In Split View, visual canvas edits reactively reflect in the generated production-readydefineCollection({ ... })TypeScript schema (collection-code-generator.ts) with zero disk overhead, 100% parity with SveltyCMS AST compilation, and 1-click clipboard export. - Database DDL & Schema Ingestion Engine: Engineered a server-side schema-ingestion engine (
schema-ingestion.ts, executed through theingestSchemaSvelteKit server function) andmodal-schema-ingestion.svelte, enabling instant reverse-engineering of SQLCREATE TABLEdefinitions across PostgreSQL, MySQL, MariaDB, and SQLite directly into SveltyCMS collections. Automatically resolvesFOREIGN KEY ... REFERENCES other_table(id)and*_idcolumns toRelationwidgets (matched against the live collection list),ENUM(...)/CHECKconstraints to populatedSelectwidgets,JSON/JSONBtoJsonEditor, arrays toTags/Repeater, and parses arbitrary REST API JSON payloads into structured collections. - Tree-View Hierarchy & Drag-and-Drop Hardening: Corrected RTL off-screen coordinate mapping in
tree-drag-preview.sveltewith floating nesting targets (↳ Inside {category}), added live collection/category statistics, and implemented full keyboard reordering (Alt+Up/Down) with roving tabindex. - Unified Favorites & Tagging System with LeftSidebar Integration: Introduced
collectionMetadataStorewith Svelte 5 runes ($state), deterministic WCAG 2.2 AA token-based tag color palettes, and cross-component/cross-tab synchronization. Enables 1-click starring (★) of collections and categories in both the builder board and the left sidebar, color-coded tag taxonomy, dual-toolbar filtering chips (FavoritesandAll Tags), in-form tag configuration, and instant navigation from the sidebar header. - Collection Builder UX hardening (October 2026): The field editor’s Settings tab now renders every registered
GuiSchemacontrol (including legacyToggles/Select/Checkboxaliases, a validated JSON editor, and recursivegroupfields) with translated labels and help hints; tooltips opened insideshowModal()dialogs are portalled into the dialog’s top layer and editor-size dialogs no longer clip them; info toasts use the tertiary ramp; collection tree rows expose link semantics while keeping roving-tabindex reordering; and Playwright covers palette drag-to-insert plus in-dialog tooltips.
- Smart Type Inference & Natural-Language Quick-Add: Built a zero-dependency client-side heuristic engine (
-
Per-Role Multi-Factor Authentication Enforcement (MFA-RBAC) (September 2026):
- Role-Level MFA Requirement: Added
Role.mfaRequiredattribute with full database schema support across all 4 database adapters (SQLite, PostgreSQL, MariaDB, MongoDB). - Session AMR Lifecycle Tracking (RFC 8176): Sessions capture Authentication Methods References (
amr: ["pwd"]vsamr: ["pwd", "mfa"]) andmfaVerifiedAttimestamps across in-memory and Redis stores. - Centralized Endpoint Gating: Requests made under mandatory-MFA roles carrying non-MFA sessions are rejected at the gateway (
_checkEndpointPermission) with HTTP 403MFA_REQUIRED. - Zero-Bypass Device Policy: Device trust cookies (
__Host-2fa-trusted-device) are strictly overridden for roles withmfaRequired: true, mandating interactive second-factor verification on every session.
- Role-Level MFA Requirement: Added
-
Token-Bucket Rate Limiter with Redis-Fallback & Adaptive Throttling (September 2026):
- Continuous Token Replenishment: Replaced coarse fixed-window counters with a high-precision Token-Bucket algorithm (
handle-rate-limit.ts) for smooth burst management, eliminating 2x spike artifacts at window boundaries. - Redis-Primary with Automatic Memory Fallback: Distributed token accounting via atomic Lua script on Redis L2 with a strict 15ms timeout and 5-second circuit-breaker backoff. Falls back seamlessly and instantaneously to local in-memory token buckets without failing requests or degrading user latency.
- Zero-Tax Adaptive Sizing: Dynamically scales bucket capacities based on user profile (Admin 10x, Authenticated User 2x, Anonymous 1x) and system hardware pressure from
SystemMonitor(0.8x–2.0x), utilizing a zero-overhead synchronous session cache peeker inhandle-authentication.ts. - Self-healing / predictive / cost-aware upgrades (A+B+C):
system-pressure.tsEWMA of processcpuUsagedeltas (normalized by core count) plus 1-minuteos.loadavg()when the OS reports it (ignored on Windows zeros — not hypervisor-specific).request-clock.ts24h/15-min histogram for predictive throttle after warmup.endpoint-cost.tslongest-prefix token costs (/api/graphql2, media upload 5, import 8, AI copilot 10). Admin tier never scaled down. Tests:tests/unit/rate-limit/*.test.ts.
- Continuous Token Replenishment: Replaced coarse fixed-window counters with a high-precision Token-Bucket algorithm (
-
Application-Layer Encryption (ALE) Zero-Tax Performance Benchmark (September 2026):
- Empirical Benchmarking Suite: Created
tests/benchmarks/ale-encryption-impact.test.tsprofiling AES-256-GCM field encryption oncontent_nodesandaudit_logsacross 256 B, 4 KB, and 64 KB payloads. - Zero-Tax Cryptographic Optimization: Optimized
field-encryption.tswith static crypto imports, synchronous key resolution (getFieldKeysSync()), direct GCM ciphertext extraction, and synchronous primitives (encryptFieldValueSync,decryptFieldValueSync). - Tolerance Gate Verification: Achieved sub-18 µs encryption latency (<3% of total write time), >213 MB/s memory throughput, and 0.20–0.55 ms transactional DB write speeds, confirming compliance with the <5% write overhead tolerance budget. Documented in Encryption Impact Benchmark.
- Empirical Benchmarking Suite: Created
-
Build Simplified Back to Plain Vite (September 2026):
scripts/build.tsremoved: the separate build orchestrator (which had become broken on Windows — it imported awin32-adapter-node-patchmodule that never existed) is deleted in favour of the standard SvelteKit flow:"build": "vite build", with the documentedbuild:node/build:bun/build:stats/build:analyzevariants as one-line Vite invocations. Dev, CI and Docker all run the same single pipeline.- Its two real jobs moved into
vite.config.tsas post-build plugins:bundleYjsSyncServerPluginemitsbuild/yjs-sync-server.js(esbuild, same options) for the/wsmount inindex.server.mjs, and the module-worker copy already lived in Vite (copyWorkerFilePlugin). No shell wrapping, no duplicate entry point.
-
“Can We Do Better” Native-Utils Pass & WAF Rate-Limiter Consolidation (September 2026):
- Strict RFC 9562 UUIDv7-only IDs: LUT-based
validateId()(+45 % throughput, 1.83× faster rejection) plus zero-allocationgenerateUUIDv7(10.2 M UUIDs/s, 98 ns/call vs 1.68 M npmuuidv7) replaced everycrypto.randomUUID()/v4 site and fixture; timestamp-ordered keys remove PG/SQLite B-tree 50/50 page splits and WAL amplification.generateUUIDv4deleted — no legacy tail. - WASM-free hashing: synchronous
fastHash(5.22 M ops/s, 2.32× the WASMxxhash64) replacedhash-wasmincompile.tsandsync-content-state.server.ts; dependency removed,etag-hash.test.tsmigrated. - WAF rate limiter on the native token-bucket engine:
rate-limiter-flexiblereplaced bysrc/utils/rate-limit/withwindowMsfixed windows + overdraft parity, Redis Lua primary with memory fallback, prefix-scoped dump/restore, and a bot-UA short-circuit ahead of the limiter (deterministic 403 for known bot/scanner User-Agents on mutations — the integrationsecurity.test.tsUA/rate-limit pair stays green in full-parallel). Dependency removed. - Zero-allocation utilities: single-pass
diff-utils/data-utils,FastLRUfor local caches,generateUUID()in widgets (replacingDate.now()+Math.random()ID construction);nanoid/deepmerge-tsstay as security-pinned overrides for transitive deps.
- Strict RFC 9562 UUIDv7-only IDs: LUT-based
-
Adapter Template-Cache Parity & Cross-Engine Test Hardening (September 2026):
- MariaDB reaches SQL-template parity with PostgreSQL/SQLite: new FIFO-capped
_mariaUpdateTplCache,_mariaUpsertTplCacheand_mariaInsertReturningTplCachebuild the prepared SQL once per column shape (key includes column ORDER, tenant clause, merge mode, RETURNING choice), plus fail-closedassertSafeSqlIdentifieron the cached identifiers. MongoDB’smapQueryoperator table is now module-scoped — no per-condition allocation. - Measured honestly: a paired A/B on the live MariaDB container (same host, same session, alternated builds, untouched read lanes as controls) shows the caches are within the benchmark’s noise floor on single-op lanes (UPDATE 0.774→0.796 ms while control reads drifted −12–15 %) — the update lane is commit-bound, not statement-CPU-bound. The shipped value is structural: engine parity, per-call allocation elimination, and stable SQL text that lets mysql2’s server-side prepared-statement cache hit.
- Cross-engine fixes found by the matrix: three contract tests wrote >36-char
_id/user_idvalues that MariaDB/PostgreSQL reject (ER_DATA_TOO_LONG) while SQLite silently accepts (ids now ≤36 viashortId());run-all-db-matrix.tsmisread5 failedfrom the passing test name “…after 5 failed login attempts” and now parses the harnessTotal/Pass/Failreport block;collection-widget.svelteregained the missing@thisux/sveltedndimports. Matrix re-run: all 4 engines PASS, 0 fail (sqlite 689, mongodb 687, mariadb 692, postgresql 695). - Auth hot-path date stamping now uses the memoized
nowISODateString()/dateToISODateString()helpers (session AMR/MFA, magic-link, 2FA, session manager) instead of per-callnew Date().toISOString()— rule §1 dates, one allocation per millisecond instead of per call.
- MariaDB reaches SQL-template parity with PostgreSQL/SQLite: new FIFO-capped
-
Paraglide i18n Tree-Shaking Audit & Copy Scanner (September 2026):
- Strict Tree-Shaking (Rule 3.1): Eliminated wildcard imports (
import * as m from '@src/paraglide/messages') across dashboard widgets in favor of explicit named imports, preventing dead message bundle bloat. - Automated Hardcoded Copy Scanner (
scripts/check-hardcoded-copy.ts): Introduced an automated scanner and CI check guarding against wildcard paraglide imports and untranslated strings across admin Svelte routes.
- Strict Tree-Shaking (Rule 3.1): Eliminated wildcard imports (
-
Enterprise Multi-Stage Review Workflows (September 2026):
- Full Lifecycle Finite State Machine: Built
WorkflowServicewith configurable stage graphs (draft→review→approved→published), audit history logging, and role-based stage transitions guarded byworkflow:transition. - Visual State Graph Editor & In-Context Controls: Visual workflow editor at
/config/workflowswith collection binding, transition guards, and<WorkflowActions>embedded in the collection content view allowing editors to execute transitions with optional review comments.
- Full Lifecycle Finite State Machine: Built
-
Visual Polymorphic Block Builder (September 2026):
- Component-Driven Page Layout Widget: Production widget (
src/widgets/custom/block-builder/) featuring 8 standard presets (Hero, Text & Prose, Media Showcase, Call to Action, Features Grid, Quote/Testimonial, FAQ, Rich Text). - Interactive Ergonomics & Headless Export: Keyboard-accessible block reordering, duplication, collapse/expand, Valibot schema validation, and headless JSON export matching AST compilation standards.
- Component-Driven Page Layout Widget: Production widget (
-
In-App Developer & API Playground (September 2026):
- Unified Developer Console: Integrated console at
/config/apiinside<AdminPageShell>providing interactive OpenAPI 3.1 REST execution, live GraphQL query testing against/api/graphql, and multi-language client code generation (cURL, TypeScript fetch, Python requests, zero-latency SvelteKitLocalCMS).
- Unified Developer Console: Integrated console at
-
GDPR Article 17 Right to Erasure (September 2026):
- Cascading Data Erasure: End-to-end permanent erasure at
POST /api/gdpr(action: "erase"/"wipe") cascading across sessions, tokens, audit logs, and users viagdprService.eraseUserwith stricttenantIdisolation. - Verified Sub-Millisecond Benchmark:
right-to-be-forgotten-audit.test.tsverified on production endpoint with <1ms avg wipe latency and 0 orphaned records across all four database engines.
- Cascading Data Erasure: End-to-end permanent erasure at
-
Intelligence Consumption & Predictive Navigation (September 2026):
- Behavioral Learner Preloading: Integrated
predictNextPathAdaptivewith confidence gating; applieddata-preload="smart"to sidebar navigation and collection tree nodes incollections.svelteandtree-view.svelte. - Warm Next Page: Added viewport preloading on Smart Table pagination controls (
data-preload="viewport"on next page link viapagination.svelte) and dashboard hot-collection quick chips. - Heat-Aware SWR: Implemented heat-aware stale-while-revalidate in
collection-service.ts, serving hot top-20 lists stale up to 15 minutes while maintaining 60s fresh TTL.
- Behavioral Learner Preloading: Integrated
-
Request-Pipeline Lean Optimization (September 2026):
- Single L2 Cache Key: Unified hook and dispatcher caching under a single canonical L2 cache key, retiring duplicate namespaces.
- Single-Compression Guarantee: Introduced a
compressed: {}sentinel guaranteeing a single compression pass (Brotli/Gzip/Zstd) re-populating L1 variants. - Admin Sidebar Caching: Cached admin sidebar payloads per
(tenantId, contentVersion)to eliminate per-SSR reconstruction and recursive cloning overhead.
-
Smart Table Saved Views Integration (September 2026):
- Unified Saved Views UI: Wired
SmartTableSavedViewsMenuacross User Management (user-management.svelte), Entry List, and Website Tokens surfaces.
- Unified Saved Views UI: Wired
-
Column Resize & Bulk Field-Edit Platform (September 2026):
- Omni-Surface Column Resizing: Header drag-resizing and width persistence (
ColumnResizeHandle+smartTable.getColumnWidthStyle) extended across all primary CMS data tables: Entry List (entry-list:{id}), Website Tokens (website-tokens-table), Media Gallery (media-gallery-table), and User Management (admin-area-users/admin-area-tokensvia dynamicsmartTable.setLayoutKey). - Bulk Field-Edit UI: Interactive batch edit modal (
bulk-field-edit-modal.svelte) wired to MultiButton (Alt+E), resolving field types (text, number, boolean, date) and executing batch updates viaPOST /api/collections/:id/batch(action: "update"). - Sticky Columns Hardening: Ensured pinned start (selection checkbox) and pinned end (actions) columns have solid, non-bleed backgrounds (
bg-white dark:bg-surface-900) and pinned body rows across horizontal scrolling on wide tables.
- Omni-Surface Column Resizing: Header drag-resizing and width persistence (
-
Unified Upload Allowlist & Write-Time MIME Conflict Defense (September 2026):
- Single Upload Allowlist: Derived
isAllowedUploadMime()fromMIME_MAPminus scriptable and office types (text/html, JS, XML, CSS, Office formats); used uniformly across streaming uploads,saveMedia, and the<MediaUpload>widget. Permissive media formats (HEIC,AVIF,FLAC) supported while eliminating insecure prefix matching (image/*). - Write-Time Polyglot Conflict Detection: Implemented
assertMimeAgreement()running after magic-byte sniffing (first 512 bytes) on write. Allows same-family transitions (JPEG vs PNG) while strictly rejecting polyglots, scriptable payloads, or HTML masquerading as image extensions (MIME_MISMATCH), avoiding expensive head reads on GET requests. - Universal
nosniffDefense: EnforcedX-Content-Type-Options: nosniffglobally onMEDIA_RESOURCE_HEADERS, ensuring local file delivery, cloud 302 redirects, share-downloads, and turbo static responses strictly reject browser MIME sniffing. - Serve-path resolve without
mime-types/mrmime:/filesand share-download useresolveMimeTypeFromPath(extension map → stored MIME → 512-byte sniff →application/octet-stream). Scripts usenode:fsglobSyncinstead of theglobpackage. - Remote/importer MIME:
resolveRemoteAssetMime()is the shared path for smart-importer, S3 mirror PUTs, andsaveRemoteMedia. RemoteContent-Type: octet-streamis treated as unknown so sniffing can recover the type; HTML is sniffed (<!DOCTYPE html>/<html) and rejected against image claims. Image-editor watermark/blur/annotate IDs usegenerateUUID()(CSPRNG). - Verification:
tests/unit/media/media-utils.test.ts,tests/unit/media/slim-sniffer.test.ts,tests/unit/media/processing/media-svg-ssrf-regression.test.ts.
- Single Upload Allowlist: Derived
-
CollectionsNamespace Consolidation & Hot-Path Architecture (August 2026):
- Monolith Decomposition: Decomposed the ~2,100-line
collections-namespace.tsinto a lightweight orchestrator supported by focused modules (schema-store,read-pipeline,write-pipeline,post-write,request-cache,lazy-services). - Zero-Redundancy Schema Walks: Field prep consolidated to a single schema walk and single clone via
prepareCollectionFields()incontent-utils.ts, replacing 3 prior passes; unifiedapplySchemaHookPipelineacross create/update operations. - Physical Table Naming Reconciliation: Normalized adapter table naming (
normalizeCollectionTableName()) across SQL (getTable,createIndexes,registerTableSchema) and MongoDB (normalizeCollectionName,createModel), resolving hyphenated-ID model registry inconsistencies. - Hot-Path Optimization: Inserted widget transform field-level caching, insert-only
createdAtsemantics, synchronous L1 mutation with background L2 fire-and-forget invalidation, and session verification via single JOIN.
- Monolith Decomposition: Decomposed the ~2,100-line
-
Unified Translation Cockpit & Multilingual Studio Inspector (September 2026):
- Dual-Lens Architecture: Live Paraglide admin chrome switcher coupled with content translation readiness metrics in
translation-cockpit.svelte. - Automated Deficiency Resolution: Real-time completeness calculation, interactive jump-to-field focus, and 1-click AI document auto-translation. Tests:
tests/unit/utils/translation-analytics.test.ts.
- Dual-Lens Architecture: Live Paraglide admin chrome switcher coupled with content translation readiness metrics in
-
Dependency & Runtime Lean-Out (September 2026):
- Zero-Lodash & Modular AWS: Full elimination of Lodash, lazy on-demand S3 client, and dynamic import of MapLibre GL in address inputs.
- Svelte 5 Runes Footprint: Deletion of legacy store monoliths, 28 → 18 store consolidation, and removal of unused dependencies (
shiki).
-
Smart Table Advanced UX & Adaptive Grid Platform (September 2026):
- Multi-Column Sort & Ordinal Ranks: Composed multi-column sorting via
Shift + Clickwith visual rank indicators (1,2,3), cascading client-side comparators, and query serialization. - Compound Filter Logic: Schema-aware
AdvancedFilterModalwithAND/ORmulti-clause conditions and contextual operators. - Grid Accessibility & View Modes: WCAG 2.2 AA roving tabindex cell/row keyboard traversal,
Alt + Xselection export, and dynamictable/cardview mode switching. Tests:tests/unit/components/smart-table-advanced-ux.test.ts.
- Multi-Column Sort & Ordinal Ranks: Composed multi-column sorting via
-
Duplicate-Export Reduction Pass (October 2026):
- Deleted dead modules/components:
src/services/token/token-utils.ts(pure helpers with no consumer),src/components/media.svelte(569 LOC),src/components/autocomplete.svelte(568 LOC), andmediagallery/virtual-media-grid.svelte(186 LOC, documented as unmounted). Docs updated where they referenced the removed components. - Removed re-export bridges / clarified collisions:
fieldDeclaresGuardno longer re-exported fromfield-access.ts; the benchmark helpers are imported from@utils/benchmark-runtimeinstead of viapreset-collections.server.ts(engine + GraphQL consumers updated); the media version comparator is nowcompareMediaVersionsso it no longer collides with the SemVercompareVersions;shouldRejectMutationsis no longer a duplicate named export; the deadmodeTransitionGuardobject and the two unusedisWidgetAvailablefunctions were removed. - Result: −86 LOC in this pass (on top of the previous −858 LOC), scanner duplicate-export inventory 240 → 230. Verification: unit 6,582, components 135, integration 718 pass, typecheck/lint clean.
- Deleted dead modules/components:
-
Row-Level Access as a Query Constraint (October 2026):
ACCESS_RULEScompiles{ collection: { role: { read: { field: value } } } }into a WHERE fragment merged before pagination, keyset cursors,COUNT(*)and streaming. Page sizes, totals and next-cursor semantics now describe the caller’s actual view; the previous post-fetch strip could not scope a count.- Cannot be widened by the caller: the rule is the left side of
$and, and the same constraint is enforced on point reads, single updates/deletes and bulk update/delete (hidden rows return404, not403, so existence is not revealed). - Dynamic tokens:
$user._id,$user.role,$tenant.id; arrays compile to$in. Config is memoized for 60 s and invalidated on settings save. - Verification:
tests/unit/security/access-rules.test.ts(10: literal/array/token resolution, admin/role bypass, prototype-key rejection, merge precedence, row evaluation). Docs: Access Management.
-
Media Write-Path Cleanup (October 2026):
- Version uploads skip the staging row:
uploadNewVersionnow writes the new bytes straight to the canonical content-addressed path (ensureOriginalOnDisk) instead of inserting a temporary media row just to reuse the adapter upload path and then deleting it. One fewer DB write per version, one fewer transient gallery row, and no window where a staging record is visible. - Deletion scans references once:
deleteMediabuilds a singlecollectReferencedHashes()set for every hash the deleted row owned, instead of re-scanning the library per hash — O(N) instead of O(N × versions) for multi-version assets. - TUS creation stays O(1): expired-session reaping is throttled to once every five minutes; a full spool scan on every upload would have made bulk session creation quadratic.
- Routing regression tests:
tests/unit/utils/upload-client-tus-routing.test.tspins the 6–15 MiB boundary and theresumable: falseescape hatch;tests/unit/media/media-lifecycle.test.tscovers the single-scan reference set.
- Version uploads skip the staging row:
-
Direct & Resumable Uploads (October 2026):
- TUS 1.0.0 lane:
POST /api/media/tuscreates an owner-bound session (HMAC token + tenantId + userId),HEADreports the committed offset,PATCHappends chunks,DELETEaborts. Sessions are durable on a local spool (TUS_SPOOL_DIR), capped atAPI_MAX_BODY_SIZE_BYTES, expire after 24 h, and finalize through the normalMediaService.saveMediapath. A zero-byte final PATCH retries ingestion, so a transient failure never re-uploads bytes. - Reload-safe browser client:
tus-upload-client.tspersists{url, offset}pername|size|lastModified, resumes withHEADafter a reload/network drop, retries chunks three times with backoff, and keeps its resume state on abort.upload-client.tsroutes 6–15 MiB files to this lane automatically (resumable: falserestores legacy routing). - Presigned direct-to-storage:
POST /api/media/upload-instructionsissues a 15-minute SigV4PUTURL for S3/R2 plus a tenant-scoped staging key and a token binding(uploadId, tenantId, userId, key, size).POST /api/media/direct-upload/completeenforces the declared length, re-sniffs MIME from magic bytes (polyglot rejection), ingests, then deletes the staging object. Staging keys live outside{tenant}/{hash}/original/…, so/filescannot serve an unfinished upload. SigV4 is implemented withnode:crypto; no extra AWS SDK dependency. - Security: no client-chosen storage paths; cross-tenant/cross-user continuation returns
403; TUS abort requiresmedia:writeon the caller’s own session; CSRF headers are required on browser mutations. - Verification:
tests/unit/media/tus-upload.test.ts(8: metadata, traversal, offset conflicts, ownership, limits, finalize replay) andtests/unit/media/direct-upload.test.ts(6: staging scoping, token binding, deterministic SigV4, path-style endpoints). Re-benchmarked 2026-10-19 (CI SQLite, same harness): HTTP upload warm 54.880 → 51.395 ms, 400 px fan-out 9.550 → 8.784 ms, 1920 px fan-out 33.055 → 33.099 ms (noise), gallery query 0.240 → 0.231 ms; SDK warm stayed in its 85–90 ms noise band. Docs: Direct & Resumable Uploads.
- TUS 1.0.0 lane:
-
Media Lifecycle — Processing Status, Version Retention & Reference-Aware GC (October 2026):
- Status is a document field: raster uploads start at
metadata.processingStatus: "processing"and the deferred variant job flips them toready(orfailedwithprocessingError); non-raster assets arereadyimmediately. The gallery gained a status facet (ready / processing / failed) and the details modal renders the same state with the failure reason. - Replacement no longer advertises stale renditions: uploading a new version or saving an image edit now commits the new content hash and its
thumbnails/metadata.imageVariants. Previously the old derivative metadata survived the update, so the record could serve URLs for the replaced source. Version uploads also no longer leave a staging media row behind. - Restore is derivative-complete: version entries capture the outgoing
thumbnails+imageVariants; restore reinstates them. Legacy entries without that capture are cleared and regenerated from the restored bytes instead of keeping the replaced set. - Reference-aware retention + GC:
media:cleanupkeeps the newestkeepVersionsentries (default 10) and releases a content hash only when no record still points at it — as the active original or through any retained version. Shared hashes survive; variant directories and originals are deleted together. Delete uses the same check, so removing one record cannot break a sibling’s restorable version. Dry-run reports the plan without touching DB or storage. - Admin commands outside the queue:
POST /api/media/cleanupandPOST /api/media/sync-statuswork withDISABLE_JOBSor a stuck worker;sync-statusderives status from actual derivative evidence and can re-queue missing work. - Verification:
tests/unit/media/media-lifecycle.test.ts(10 cases: retention boundaries, shared-hash protection, dry-run, status derivation, re-queue),tests/unit/media/gallery-list-item.test.ts(status DTO). Re-benchmarked 2026-10-19 against the captured CI SQLite baseline (single runs, same harness): duplicate upload 2.677 → 1.562 ms, gallery query (1,200 rows) 0.372 → 0.240 ms, 400 px fan-out 10.131 → 9.39–9.55 ms, 1920 px fan-out 34.237 → 33.06–36.03 ms (noise band), REST point read 0.138 → 0.123 ms, GraphQL 1.524 → 1.448 ms avg / 3,625 RPS (no parallel load). Docs: Media System Architecture, Media API.
- Status is a document field: raster uploads start at
-
Media Pipeline — Dedupe Order & Derivative Ladder (September 2026):
- Dedupe Before Derivative Generation: The tenant-scoped content-hash lookup in
MediaService.saveMedia()now runs before any resize work, so re-uploading identical bytes performs zero encodes and writes no derivative file. The reuse path verifies that the original and every derivative path the row advertises still exist (cache-bypassing lookups) and, when one is gone, repairs the row in place (original rewritten, ladder re-derived,metadatamerged) instead of returning URLs that 404 or inserting a second row for identical bytes. The deferred responsive-variant job is not scheduled on a hit at all. Because nothing is rewritten, theW/"size-mtime"ETag survives a re-upload and clients stop re-downloading unchanged assets. - Derivative Ladder Clamped to the Source:
saveResized()drops every SIZES step wider than the decoded source and passeswithoutEnlargementto the encoder, so a 400 px icon is no longer enlarged into four derivatives; each resolved path is written once (an already-WebP primary no longer collides with its own sidecar), and thethumbnailsmap now records the encoder’s real output dimensions instead of the requested ones. - Shared reuse/repair helpers:
findMissingStoredFile(),adoptExistingRecord(),repairExistingRecord()andbuildDerivativeSet()replaced three near-identical dedupe blocks (SVG, buffered raster, streamed raster) with one contract. - Also fixed (found by the new assertion):
enrichMediaWithUrl()re-prefixed thumbnail URLs that already carried/files/…, producing/files/files/…and making reuse responses differ in shape from insert responses. - Measured (real SQLite stack,
bun run test:integration tests/integration/api/media-dedupe-derivatives.test.ts, 2026-09-22): 400 px source — 8 derivative files / 16,984 B / a 600 px upscaled variant → 2 files / 600 B / no upscaled variant; duplicate upload — 47.5 ms and 8 of 9 stored files rewritten → 3.0 ms and 0 of 5 rewritten. - Verification:
tests/unit/media/derivative-ladder.test.ts,tests/unit/media/upload-dedupe-order.test.ts,tests/integration/api/media-dedupe-derivatives.test.ts; benchmark rowsMedia: Derivative Fan-Out (1920px|400px source)andMedia: Duplicate Upload (identical bytes)intests/benchmarks/media-performance.test.ts, withmedia.derivatives.*/media.duplicate.*metrics. Architecture and verification: Media System Architecture.
- Dedupe Before Derivative Generation: The tenant-scoped content-hash lookup in
-
Partial-Update Data Loss Fixed — JSON
dataMerge on All Four Engines (September 2026):- The bug:
crud.update()built one whole-column assignment for the JSONdatablob (SET "data" = $n::jsonbon PostgreSQL,`data` = ?on SQLite/MariaDB), so a partial PATCH replaced every dynamic field it did not mention. Measured externally before the fix: 30,940 of 100,000 documents collapsed from a ~1.5 KB median to 61-byte stubs — and because their ownfindByIdRandom/graphql rows readids[0], the corruption also inflated a cached-read benchmark number. MongoDB was never affected ($setmerges per field), which is what fixed the target semantics: a shallow, null-keeping merge. A patched object replaces wholesale (no recursion), andnullis a stored value rather than a deletion. - The fix:
prepareValues()marks a partial dynamic-field payload as a patch (aWeakMapentry keyed by the prepared values — invisible toObject.keys, spreads and Drizzle.set()), and each dialect applies it at zero extra cost: PostgreSQL merges inside the UPDATE (COALESCE("data",'{}'::jsonb) || $n::jsonb), SQLitejson_patch(...), MariaDBJSON_MERGE_PATCH(...). Both of those are RFC 7396 — recursive, and they delete keys patched withnull— so patches containing nested objects or explicitnullhydrate the stored blob and merge in JS instead (jsonPatchNeedsJsMerge()); scalar/array patches keep the single-statement fast path. The Drizzle fallback merges in JS too, so no path can silently fall back to the destructive write. Full-document writers (sync, seeds) opt out explicitly withreplaceData: true, whichskipReturning: truealready implies — that path reconstructs the row from the prepared values, so a merge would misreport the untouched columns. - Fail-closed, not silent: if the blob for a JS-merge cannot be read (missing row), the update throws rather than persisting the patch as the whole document.
- Verification:
tests/unit/databases/json-data-patch-merge.test.ts(exactness boundary, blob decoding, marker invisibility) and four new cases intests/integration/databases/adapter-parity.test.ts— partial patch keeps untouched fields, nested object replaces shallowly, explicitnullis kept, and thereplaceDataopt-out. Run green on SQLite 21/21, PostgreSQL 21/21, MariaDB 21/21, MongoDB 20/20 + 1 intentional skip (replaceDatahas no MongoDB counterpart — its$setnever replaced anything). The reported request shape is also covered end-to-end through the HTTP API (tests/integration/api/collections-mutations.test.ts:PATCH {views: 2}on a document withtitle/bodymust return and persist all three), green on SQLite and PostgreSQL. - Still to do (roadmap): none for the schema path — the spec is the only trail now.
- The bug:
-
Partial-Update Merge Extended to Every Bulk Write Path (September 2026):
- Bulk paths merged:
crud.updateMany,batch.bulkUpdate(homogeneous single-statement path, heterogeneousrawBulkUpdateCASE builder on SQLite/MariaDB/PostgreSQL, and the transactional per-row fallback) and the query-builderupdateManyall merge the JSONdatapatch now — they used to write the patch as the entire blob for every matched row. Where the dialect operator is exact the merge stays inside the statement (zero reads, zero extra round trips); a nested-object or explicit-null patch on SQLite/MariaDB cannot be expressed in oneSET, so the CASE builder refuses the fast path and the row-by-row path merges each row against its own stored blob. - Query-builder silent drop fixed:
SqlQueryBuilder.updateManydumped its payload straight into Drizzle.set(), which discards every field that is not a physical column — blob fields (e.g.title) never persisted through that path. It now routes through the sameprepareValuescontract ascrud.update/batch.bulkUpdate. - MongoDB update parity: Mongoose
strict(the schema default) dropped undeclared$setpaths, so patching a dynamic field the collection schema did not declare was a silent no-op on MongoDB while SQL adapters stored it indata. All Mongo update sites (crud.update/updateMany,bulkWrite, both query builders) now passstrict: false; the namespace/field-permission layer remains the schema gate. Covered by a new cross-engine case that patches an undeclared field. - MongoDB query-builder resolution bug (found while testing):
MongoDBAdapter.queryBuilder()resolved its model with the raw collection name whilecrud.*normalizes it — the lookup missed, and_getOrCreateModelbuilt a generic model bound to a differently named MongoDB collection. Every builder operation (find/count/updateMany/deleteMany) silently ran against an empty collection. Now resolved exactly likeMongoCrudModule._getRepo. - Verification:
tests/integration/databases/bulk-operations-contract.test.ts(partial-patch merge, nested-patch merge, per-row blob fields, homogeneous blob patch, query-builder persistence) and the parity suite’s dynamic-field case — green on SQLite, PostgreSQL, MariaDB and MongoDB.
- Bulk paths merged:
-
Engine-Native Dynamic-Field Filters: Containment + GIN on PostgreSQL (September 2026):
- The gap: a field that is not materialized into a column lives in the JSON
datablob, and an equality filter on it was translated on every SQL engine to a text extraction (data->>'field' = $1) — a form no index can serve. Measured 2026-09-22 on 100k rows (PostgreSQL): Seq Scan 7.9–10.9 ms per filtered read, growing linearly with the table. - The fix (engine-specific by construction): PostgreSQL now emits containment —
data @> '{"field": value}'::jsonb(getJsonEquals, wired throughmapQueryfor$eqand$in, one probe per scalar value in anORfor lists ≤ 32) — andcreateModelprovisions ajsonb_path_opsGIN index (<table>_data_gin) for every dynamic collection table. Measured after: Bitmap Index Scan 0.1–1.7 ms, and the cost stops growing with table size. Index build 347 ms once at provisioning; write cost measured within run-to-run noise (interleaved A/B/A rounds: −0.9 % inserts, +5.4 % updates). Write-only collections opt out withschema.jsonIndex === false. - Type fidelity: the probe serializes the RAW filter value, so a number filter probes a JSON number and a string filter a JSON string —
{views: 101}matches a stored number but not a stored"101". SQLite (typedjson_extract) and MongoDB (type-aware comparison) already behaved that way; the previous PostgreSQL text comparison did not, so this increases cross-engine parity. MariaDB stays the documented looser exception (JSON_UNQUOTEcomparison coerces). Dotted paths probe nested objects (a.b→{"a":{"b":…}}), matching thedata#>>'{a,b}'form. - Why the other engines keep the extraction form: SQLite and MariaDB have no single index that serves arbitrary JSON paths. Their native answer is already shipped — the row-store hybrid: declare the field
indexed: true(ormaterialize: true) and it becomes a real column with a real index. The implementation notes now say so explicitly instead of leaving it implicit. - Verification:
tests/integration/databases/dynamic-field-filter-index.test.ts— semantics (number/string/$inprobes, type fidelity) on all four engines, the engine-native SQL shape per dialect, and on PostgreSQL anEXPLAIN (ANALYZE)of the adapter’s own rendered filter SQL asserting the GIN index is used and noSeq Scanappears (bulk-seeded table with real statistics, isolated from the row probes). Full sweep: SQLite 49/49 · PostgreSQL 51/51 · MariaDB 49/49 · MongoDB 48/48 across the parity, bulk-contract, mutation and dynamic-filter suites.
- The gap: a field that is not materialized into a column lives in the JSON
-
System-Schema Fingerprint + Legacy Tails Removed — Boot No Longer Touches an Unchanged Schema (September 2026):
- Measured before: a provisioned PostgreSQL paid 124 ms per boot re-running all 118
CREATE TABLE/INDEX IF NOT EXISTSstatements (0.4–1 ms per round trip), plus ~35ALTER TABLE … ADD COLUMN IF NOT EXISTSrepair statements (~60 ms; each one costs 1.7–5 ms versus 0.96 ms for a trivialSELECT). - Fingerprint:
svelty_schema_statestores a sha-256 overSYSTEM_SCHEMAper dialect; a match skips the spec-derived pass. Any spec change (new table, changed type/default, new index) changes the fingerprint and re-runs the pass, so it is drift-free by construction rather than a hand-bumped version; a pass with a failed statement does not store the marker, so a half-applied schema is retried instead of trusted, and any marker error degrades to “run the pass”. - Legacy tails deleted: the per-engine repair tails are gone — the spec is the only schema trail. Audited first: every column they added (
auth_users.isDeleted/deletedAt,auth_api_keys.rateLimit/status/lastUsed/keyHash) was dead legacy (the current model useslastUsedAt/lastUsedIp/revoked, and the users table never soft-deleted), and the one substantive repair (MariaDBmfaVerifiedAt→DATETIME(3)) is already declared in the spec, so fresh installs keep millisecond MFA precision. The v0.0.8-erasecurity→passwordandredirects_mv.from|torenames are dropped with them; the compatibility consequence is documented in Upgrading SveltyCMS. - Measured after (fresh database → provisioned by the spec alone): 327 ms once, creating 27 tables + 117 indexes; every later boot 2.1 ms (
skipped: true) — ~122 ms saved per start on PostgreSQL. Verified through the compiled build on fresh databases for SQLite, PostgreSQL and MariaDB (all boot withBootstrapping system schema...thenSystem schema up to date (<fp>) — skipped the DDL passon the next boot), with the adapter-parity suite green on each.
- Measured before: a provisioned PostgreSQL paid 124 ms per boot re-running all 118
-
Cross-Engine
crud.aggregate()— the MongoDB Pipeline Runs on SQL (September 2026):- The gap:
aggregate()was MongoDB-only, so SQLite/PostgreSQL/MariaDB answered every pipeline withNOT_SUPPORTEDand a generic caller could not express a grouped count without raw SQL. The capability flags admitted it (supportsAggregation: false). - The translation (
core/aggregation-translator.ts, pure and unit-testable):$match→WHEREthrough the adapter’s own query mapper, so JSON fields, containment and the tenant scope behave exactly likefind*;$group→GROUP BYwith$sum/$avg/$min/$max/$countand a scalar_id(dotted paths allowed,$sum: 1→COUNT(*));$sort/$skip/$limit→ORDER BY/OFFSET/LIMIT;$countand include-only$project→ the select list. Without a group/$projectthe result is thefindManydocument shape, which is what MongoDB’saggregatereturns too. - Fail-closed by design:
$lookup,$unwind,$facet, a compound_id, out-of-order stages and a$matchthat maps to no condition return a namedNOT_SUPPORTEDmessage that names the workaround — never a silently wrong number. The refusals are returned outsidewrap(), which would otherwise nest the envelope into{ success: true, data: { success: false, … } }and make a refusal read as a success (caught by the new contract test, not by the type system). $min/$maxare the one engine-dependent stage, and they now say so: PostgreSQL and MariaDB extract JSON as TEXT, soMINover{10, 2}returns"10"(measured on both; PostgreSQL additionally defines nomin(jsonb)), while SQLite’s typedjson_extractand MongoDB compare natively. A blob field therefore gets a refusal naming the fix — declare itindexed/materialize: true— instead of a lexicographic answer; a materialized column aggregates natively on every engine (new dialect hookgetJsonOrderedField).- PostgreSQL numeric range filters fixed on the way:
views >= 4compared TEXT ('16' < '4', so stored16/32were missed), and the naive JSONB replacement was worse in the other direction — jsonb orders String below Number, so an unguarded<admitted a stored"101"intoviews < 4(verified:'"101"'::jsonb < '4'::jsonbis true). Ranges now readjsonb_typeof(data->'views') = 'number' AND data->'views' >= '4'::jsonb, type-strict in both directions and identical to SQLite/MongoDB behaviour. - SQLite dotted-path parity:
json_extract(data, '$."meta.lang"')treated the dotted name as one literal key, so a{"meta.lang": "en"}filter matched nothing there while PostgreSQL (data#>>'{meta,lang}') and MariaDB ($.meta.lang) resolved the nested value. Segments are quoted individually now ($."meta"."lang"). - Capability flags and SDK surface:
supportsAggregationistrueon SQLite/PostgreSQL/MariaDB — the documented subset, with unsupported stages still failing closed, which the pre-existing contract test now asserts (3 × active/2 × inactiveinstead of an envelope check).CollectionModel.aggregateon MongoDB routes throughcrud.aggregate(tenant$matchinjection, normalized collection resolution, logged failures) instead of the rawmodel.aggregate, and both SDK wrappers log a refused or erroring aggregate instead of silently returning[]. - Verification:
tests/unit/databases/aggregation-translator.test.ts(20 cases — plan shapes, accumulator mapping, purity, every refusal) andtests/integration/databases/aggregation-contract.test.ts(12 cases — group/match/count/sort/limit/project, tenant scoping without an explicit$match, materialized$min/$max, the engine-dependent$minrefusal,NOT_SUPPORTEDparity), green on SQLite 12/12 · PostgreSQL 12/12 · MariaDB 12/12 · MongoDB 9 + 3 intentional skips; the same-commit sweep of the parity, bulk-contract, dynamic-filter and advanced-CRUD suites is green on all four engines.
- The gap:
-
Competitive lanes: read payload de-duplicated, write ack made adapter-agnostic (September 2026):
- The defect: every SQL read merged the JSON
datablob into the document root and also serialized the blob as a nested field. The external harness counted 3,339 B for a 1,558 B document (2.14x) — “~200 B system columns +data{…1558}+ the same 8 content fields flattened again” — and it was the only excess in that comparison that was pure duplication rather than envelope convention (Keystone 1.00x, Strapi 1.03x, Wagtail 1.09x). - The fix: flattening now consumes the blob — the key is dropped by key, not identity, because
normalizeJsonFieldValuePARSES a TEXT blob (SQLite/MariaDB) into a different object, which is exactly why an identity check silently kept it on the wire — and each of the three call sites stopped copying the raw blob (or its TEXT form) back onto the row. A collection field literally nameddatais merged and survives; a legacy string-encoded blob still resolves through the JSON layers. - Measured end-to-end (the payload-budget integration case logs it): point read 3,339 B → 1,851 B (1.23x a 1.5 KB document), PATCH 3,519 B → 1,814 B — i.e. document + the ~200 B of real system columns, no second copy.
Prefer: return=minimal(RFC 7240) onPATCH/PUTanswers{success, data:{_id}}— 70 B measured — on both the warm-session write lane and the API dispatcher. Absent or unknown values keep the full representation, so no existing client changes behaviour.- Adapter-agnostic write ack: the preference maps onto the existing
BaseQueryOptions.skipReturningcontract instead of being a response-shape trick, so the row read-back is skipped too — SQL engines omitRETURNINGand reconstruct the ack from the prepared payload, and MongoDB now honours the flag as well (it calledfindOneAndUpdateunconditionally, i.e. the no-read-back path was silently SQL-only). Pinned by the newwrite ack (skipReturning)parity case: SQLite 24/24 · PostgreSQL 24/24 · MariaDB 24/24 · MongoDB 23/23. - Point-tier admission filter: admitting a point read on its first touch meant a 100k-uniform-random scan filled the 2,000-slot L1 point tier with entries that were evicted before ever being read —
putEntry+ byte accounting +indexKey+ FIFO sweep + a second encoded buffer per cold read, for zero hits. An id now takes a slot on its second sighting (bounded FIFO filter): a cold scan costs one Set insert and no response slot, while a repeated id is cached from its second request on. - Verification: unit 4,855/4,855; SQLite integration 685/685;
tests/unit/databases/read-payload-shape.test.ts(payload shape, thedata-named-field case, the legacy string form),tests/unit/utils/http-preferences.test.ts(header parsing incl. last-wins),tests/unit/benchmarks/document-integrity.test.ts(the benchmark guard that found the upsert loss) and the payload-budget case intests/integration/api/collections-mutations.test.ts.
- The defect: every SQL read merged the JSON
3.26 September 2026 — Fast lanes on by default, gated by system state
The raw-transport fast lanes answered a narrow request class (warm-session admin collection reads) straight to the socket, skipping adapter-node’s IncomingMessage → Request and Response → stream bridging while calling the very same lane function the pipeline calls. They shipped opt-in (SVELTY_FAST_LANE=1, default off) with two open questions: the bypass point sits before every hook, and no lane re-applied the system-state decision.
system-stateis now re-implemented for lane traffic (src/hooks/lane-state-gate.ts), against the same module-level state mirror the gatekeeper reads, with the same predicate ashandleTurboPipeline:READY/WARMED/WARMING/DEGRADEDserve,SETUP/IDLE/INITIALIZING/MAINTENANCE/RECOVERY/FAILEDdecline to the pipeline. Consulted in the read lane, the write lane and the registry dispatch — the last one so a lane added later cannot serve a state the operator took the instance out of.- Default flipped to ON (
SVELTY_FAST_LANE=0opts out) so the setting is a documented deployment default rather than a benchmark-only flag, and the transport is symmetric rather than a comparison artifact. - Regression caught by measurement: the lane shim converted the prebuilt body with
Response.text()and handed the string tores.end(), so every wide list body was decoded and re-encoded per request —listLargeTURBO-HIT 2.64 ms bridged → 4.76 ms through the lane. Handing Node the bytes (arrayBuffer(),content-lengthfrombyteLength) restores 2.85 ms. - Measured, paired (PostgreSQL, 10 000 docs, 8c, replica protocol, 3–4 rounds per arm):
findByIdRandom3,235 → 3,655 RPS median (+13 %) with the lane on versus off;findById7,067 → 9,194;listPlain7,187 → 10,876;findMissing8,138 → 9,496. A dedicated 20,000-read load driver agrees: 3,080 → 4,401 RPS, with the server-only CPU profile putting ~10 % of samples in undiciRequestconstruction, 5.7 % in adapter-node’s static-asset check and ~12 % in socket writes. - Confirmed at the published dataset size (100,000 docs, paired,
updatecarried as the control lane because it is not lane-served):findByIdRandom2,631 → 3,919 (+49 %) and 3,139 → 3,883 (+24 %), median 2,885 → 3,901 RPS (+35 %) — +11 % over the published competitor row (3,504 RPS) — while the control stayed flat at ±3 %. This supersedes an earlier session’s reading that the row goes neutral or negative at 100 k; that reading predated the byte hand-off fix and was taken with the lane still opt-in. - Write coalescing was built, gated, and rejected by its own gate (
SVELTY_WRITE_COALESCE, since deleted) — see the roadmap entry: 120/128 concurrent PATCHes batched correctly at an average size of 5 and every caller got its own row, but the lane measured −29 % median over three alternated pairs on PostgreSQL (median 1,305 → 933 RPS, warm p95 7.7 → 15.7–20.4 ms) against a flat control, because at 8 workers PostgreSQL already group-commits overlapping statements. The negative result is recorded rather than shipped as an off-by-default path. - Verification: unit 4,866/4,866;
tests/unit/hooks/fast-lane-policy.test.tspins the state matrix, the dispatch backstop and the default-on/opt-out contract;collection-read-lane.test.tsestablishes its operational-state precondition explicitly.
3.27 September 2026 — WebMCP Agentic Builder, Native Forms, Layout-Aware Responsive Images, Multi-Breakpoint Canvas & Atomic SSG
To lead visual and headless CMS platforms (such as Instatic) through 2026/2027, six architectural pillars were implemented and verified with zero-overhead principles:
- WebMCP Builder Tools (
src/plugins/webmcp/tools/builder.ts):- Standardized Model Context Protocol tool endpoints (
design_collection,refine_collection,diff_collection_schema,scaffold_widget,list_available_widgets) allowing Cursor, Claude Code, and external AI agents to author and evolve schemas directly over standard WebMCP protocol. - Draft-by-Default Airgap: AI proposals generate structured AST diffs and validated draft schemas rather than mutating live production tables, preventing untracked schema drifts.
- Integrated with
fetchApiincluding CSRF token headers and session credentials.
- Standardized Model Context Protocol tool endpoints (
- Native Zero-Config Form Ingestion (
src/routes/api/[...path]/handlers/forms.ts):- Direct headless/static site form ingestion at
POST /api/forms/:collection. - Built-in honeypot spam protection (
_hp,_gotcha) without third-party recaptcha tracking. - GDPR-compliant, privacy-first SHA-256 IP salt hashing (
_formIpHash). - Publishes events to internal
EventBus(form:submit) enabling zero-latency automations and notifications.
- Direct headless/static site form ingestion at
- Layout-Aware Responsive Images (
src/components/ui/image.svelte):- Native
layoutpresets (full,half,third,quarter) calculating mathematical, layout-awaresizesstrings across standard viewport breakpoints. - Zero-CLS placeholder blur styling utilizing ThumbHash/LQIP hashes to eliminate layout shifts during hydration.
- Native
- Multi-Breakpoint Split Canvas (
src/plugins/editable-website/live-preview.svelte):- Live side-by-side synchronized rendering of Desktop (fluid
min-w-[580px]) and Mobile (375px) viewports. - Real-time two-way postMessage synchronization for click-to-edit and field highlight.
- Live side-by-side synchronized rendering of Desktop (fluid
- Atomic Static Site Generator (
src/services/site/static-publisher.server.ts):- Pre-renders published
pagesinto a sibling staging directory (<target>.staging-<uuid>) so the final swap is a same-filesystem, atomicrename(neverEXDEV). - Moves the previous build aside and restores it if the swap fails — the live directory is never deleted before its replacement exists.
dryRunpreview mode renders the route manifest (path+ byte length per route) without touching the live site — the “preview before it goes live” step.- Schema-aware hardening: text fields HTML-escaped, authored
bodyrun through the server-sidesanitizeHtml, and slugs reduced to traversal-proof[A-Za-z0-9_-]segments. - Exposed via
POST /api/exportwith{ "type": "static-site", "preview": true|false }.
- Pre-renders published
- Hue-Preserving OKLCH Palette Ramp (
src/utils/color-ramp.ts) — inspired by Instatic’s Core Framework token engine:- One brand hex expands to a full, perceptually even 50–950 ladder: the seed lands verbatim on its anchor step (
500for accents,50for surfaces), hue is preserved, and chroma tapers toward the extremes. - Out-of-gamut steps are mapped by reducing chroma, never by clipping RGB (clipping would shift the hue).
- Replaces the previous 3-step
color-mixshorthand expansion in@utils/theme-preset-mapper, so accent roles now get the same complete ladder as surfaces; non-hex input keeps the oldcolor-mixpath.
- One brand hex expands to a full, perceptually even 50–950 ladder: the seed lands verbatim on its anchor step (
- Verification:
- Unit tests:
tests/unit/plugins/webmcp-builder.test.ts(4/4),tests/unit/api/forms-handler.test.ts(4/4),tests/unit/site/static-publisher.test.ts(5/5),tests/unit/color-ramp.test.ts(7/7) passing in <500ms. - All security and risk audits (
risk-audit.ts: 5/5) clean.
- Unit tests:
3.29 September 2026 — 2027 Two-Plane Core: Wire Plane Admission, Compiled Point Reads & Dynamic Bitsets
Separated read operations into an opt-in compiled Wire Plane and an enterprise Domain Plane, establishing the foundation for sub-millisecond edge queries with full fallback safety:
- Strict Wire Plane Admission & Compiled Point Reads (
isWirePlaneAdmissible+computeCollectionWireMetainsrc/hooks/handle-collection-read-lane.ts;findPointWireStreamon the adapters) — Only simple, published single-entry reads with compiled default-locale alignment were admitted to the wire path; admitted reads ran as cached point statements emitting engine-side JSON (json_object/jsonb_build_object/JSON_OBJECT) on the SQL adapters, and everything else fell through to the Domain Plane. - Fail-Closed Wire Admission Predicate (
isWirePlaneAdmissibleinsrc/hooks/handle-collection-read-lane.ts) — Rigorous admission gate guarding Direct-to-Wire SQL streams: checks published status (rejects drafts, review status, and preview cookies), prohibits dynamic relational expansions (populate), validates compiled default locale alignment, enforces projection equivalence (fields), and verifies absence of mutatingafterReadhooks. - Multidimensional Dynamic Bitsets (
src/databases/auth/permission-bitmask.ts) — Augmented permission evaluation with multidimensional dynamic bitset chunks (permBits: number[],permRev: number) cached in sessions (SessionManager), enabling $O(1)$ in-register authorization checks for hundreds of permissions beyond 64 bits. - LRU-Bounded Tenant Pools (
src/databases/postgresql/adapter-core.ts) — Introduced connection pool slice bounding (MAX_TENANT_POOLS, default 16) for dedicated multi-tenant DSNs to prevent socket and memory exhaustion under high tenant density. - The 4-Cell Benchmark Contract (now documented with the benchmarks: Performance Architecture) — Codified performance classification rules distinguishing Cell 1 (in-memory L1 cache hits), Cell 2 (Domain Plane miss), Cell 3 (Wire Plane direct SQL miss), and Cell 4 (driver hardware limits), preventing cache-hit category errors.
- Verification:
tests/unit/hooks/collection-read-lane.test.ts(16 tests passing) validating all admission predicate constraints.tests/unit/auth/sessions/session-multidimensional-bitset.test.tsverifying dynamic bitset encoding and session persistence.tests/unit/multi-tenancy/physical-pool-partitioning.test.tsverifying tenant pool slice bounding.
The raw fast-lane transport only carried warm-session collection reads; writes stayed on adapter-node’s bridged path because they need the request body. The write lane now has a transport twin, opt-in (SVELTY_FAST_LANE_WRITE=1, default off) until an equivalence run:
- One implementation, not two —
collectionWriteLanecalls the sametryCollectionWriteLanethe pipeline calls, so WAF path inspect, CSRF same-origin/double-submit, rate limiting, warm-session admin/RBAC, per-request tenant resolution and the security-header contract are all reused unchanged. - Never consume a body you cannot answer — the lane refactor passes the already-resolved turbo context into
serveWarmCollectionWrite, which now guarantees aResponseafter commit (no TTL race), and the entry exposes the body lazily (readBody()): a lane that declines (cold session, non-simple path, maintenance state) returns to the pipeline with the stream unread. A hard body cap (256 KiB default,SVELTY_FAST_LANE_MAX_BODY) rejects oversized payloads before they are buffered. - Rate-limit parity by construction — the entry resolves the client address with adapter-node’s exact
ADDRESS_HEADER/XFF_DEPTHrules and reproduces its failure mode (undefined→ throw →getClientIpfails closed to0.0.0.0), so lane and pipeline bucket identically;Set-Cookieemitted inside the lane is carried on the result. - Verification —
tests/unit/hooks/fast-lane-write-policy.test.tspins the four invariants: write lane unregistered without the opt-in, declines without consuming the body, reads the body exactly once when committed, and fails closed on the client address.
References:
3.30 September 2026 — Wire Plane visibility parity, lane gates & single-transport lean-out
A security review of the 2027 Two-Plane work found that the fast read lane had drifted from the
pipeline it mirrors. The lane builds its own Response, so every check that lives in a skipped
hook had to be re-established deliberately — three had not been.
1. Publication clamp bypassed on the wire path. The compiled point statement had no status
predicate, so a session that the Domain Plane clamps to published could fetch a draft by id.
The wire contract now carries requirePublished:
- PostgreSQL (
jsonb_build_object), SQLite (json_object), MariaDB (JSON_OBJECT) compileAND "status" = 'publish'into the cached statement (both the plain and tenant variants). - MongoDB adds
status: { $in: ["publish", "published"] }to the lean query. - Where a table has no
statuscolumn the adapter fails closed (null), and the base-class fallback re-checks the row object before serializing, so an unfiltered fallback read can never emit unpublished bytes. - The read lane passes the flag only when
resolvePublicationFiltersays the caller is clamped — the same function the Domain Plane uses, so the two cannot disagree. Admins keep the unguarded (faster) statement for drafts, and a draft returnsnull→ Domain Plane decides.
2. The clamp never matched anything. loadOneById compared the filter name (published)
against the stored value (publish), which denied every status-bearing row to a clamped caller and
would have admitted any row stored as published. It now uses the shared isPublishedStatus()
predicate (accepts both spellings) and leaves status-less rows untouched, preserving the previous
behaviour for non-status-versioned tables.
3. Read-lane gates re-established (all evaluated before any cache lookup, so a stored body can never outlive a policy change):
| Gate | Before | After |
|---|---|---|
| Endpoint parity | collection:read or collections:read |
collections:read only — exactly what ENDPOINT_PERMISSIONS requires for /api/collections GET |
| FLAC | Not evaluated: the lane never reaches handleTokenResolution, the read path’s only applyFieldPermissionsToBody call site |
isLaneFlacExempt() declines when a FIELD_PERMISSIONS policy or a readRoles-guarded field applies; fails closed on error |
| Grant freshness | turbo.permMask served until the sliding TTL expired |
isPermissionBitsetStale(turbo.permRev) declines on epoch change; setTurboAuthContext stamps the epoch, so invalidateRoleBitsetsGlobally() (already called by setRolePermissions/invalidatePermissionCache) now reaches lane traffic |
4. Single transport (superseded 3.29’s dispatcher). src/hooks/kernel-dispatcher.server.ts
is deleted, together with its registration and 11 unit tests. It answered the same requests as
tryCollectionReadLane with its own ETag/cache/304 semantics, built a real new Request(...) +
new URL(...) + full header reduction per request (the bridging cost the lane exists to avoid),
carried BASE_HEADERS without applyAllSecurityHeaders’ HSTS/CORS/Vary work, and stamped a
transport-specific x-kernel-channel header. LANE_BYPASSED_HOOKS and the guard test keep the
bypass policy explicit for the remaining lanes.
5. Dead code removed (verified zero importers, no glob/dynamic-import hit):
src/components/command-bar.svelte and search-component.svelte (self-described
backward-compat aliases for command-palette.svelte), src/databases/mongodb/index.ts
(dead barrel), src/services/core/widget-discovery.ts (superseded by widgets/scanner.ts),
src/services/database/index-optimizer.server.ts, src/services/site/website-starter-test-seed.server.ts
(re-export shim) and the unified-data-hub/server/federation-enrichment-utils.ts shim (its one test
consumer now imports the real module). The unreferenced watermark trio was removed in the same pass
and reinstated the next day — together with the rest of the native UI kit — under the maintainer’s
rule that unused-but-reusable components stay in-tree because Vite tree-shakes them out of the
bundle (see 3.31).
6. Test-suite lean-out. The largest per-file cost in tests/unit was @src/paraglide/messages
— a barrel over 1 462 generated modules (6.4 MB) that every widget test paid in transform time.
Mocking that boundary in the widget suites plus de-duplicating fixtures and replacing near-vacuous
assertions (expect(schema).toBeDefined(), formula-against-itself tests) cut measured wall time
substantially with more real assertions than before: widgets 21.90 s → 3.07 s, media 1.73 s →
0.86 s, utils 4.62 s → 3.52 s (combined 128 files / 1 082 tests in 4.53 s).
Correction (re-verified 2026-09-27 by a second agent): vitest.config.ts’s
src/widgets/custom/**/tests/**/*.test.ts glob is live — 16 co-located suites exist and run, in
addition to near-duplicate copies under tests/unit/widgets/custom/ (measured drift: 3 lines for
address, 165 for seo; 72 tests / ~5 s per unit run executed twice). Consolidating them is a
coverage-ownership decision and was completed on 2026-09-27 — the co-located suites are now the
single home and the duplicates are gone (see 3.32). TokenPicker remains unwired, not dead
— fields.svelte keeps the openTokenPicker() handler (the component itself is never mounted) and
it is documented in docs/reference/components/fields.mdx.
Verification: bun run check (format + lint + dead-class + design-token + shade contract +
lockfile) green, bun run lint 0 warnings / 0 errors, bun run test:unit 4 962 passed. The new
tests/integration/databases/differential-parity.test.ts case asserts, per adapter, that a draft is
invisible and a published row visible under requirePublished, and that the unguarded read keeps
agreeing with findOne.
3.31 September 2026 — Diagnostics to zero, navigation cancellation, lean-out batch 2 & bench-ledger verification
1. Diagnostics: 42 errors → 0 (warnings → 0). The root cause of most of them was a type contract that the codebase was violating in four places, not four separate bugs:
DatabaseResult<T>requireserroron the failure branch, butsql-adapter-core(×2) and the MongoDB wire catches (×2) returned{ success: false, message }/{ …, data: null }. The producers now emiterror: createDatabaseError(…), which fixes the union for every caller.- The wire tests read
result.datawithout narrowing (TS does not narrow onexpect(x).toBe(true)). Newtests/integration/databases/wire-contract.tsprovidesrequireWireMethods()(fails loudly when an adapter lacks the Direct-to-Wire contract — no silent skip) andunwrapResult(), so all 21 + 14 errors in the two parity suites collapse into two typed calls. src/widgets/core/input/index.tstyped its schema param asReturnType<typeof InputWidget>whileInputWidgetreferenced the schema — both sides inferred each other intoany(TS7022/7023). The param is nowInputProps & { required?: boolean; translated?: boolean }, matching themedia-uploadwidget’s convention.mariadb/adapter-core.tsreturnedmysql2’sQueryResultunion fromgetRawExec(typedany[]); narrowed at the boundary.
2. A documented race guard that cancelled nothing. NavigationManager.executeNavigation created
an AbortController, aborted the previous one — and never read the signal, so a stale run still
mutated stores and pushed its own goto(), and its finally cleared the newer run’s loading state.
The task signature is now (signal: AbortSignal) => Promise<void>; toList/toEdit/toCreate bail
before mutating and before goto, and only the newest navigation owns the loading entry.
3. Lean-out batch 2 — only two modules actually left the tree. The batch started from 24 candidates (each re-checked for zero importers and zero documentation references), and the maintainer’s rule that unused-but-reusable native UI must stay — Vite tree-shakes unreferenced modules, so an unmounted component costs nothing in the bundle while remaining available to the front-end — was applied to all but these two, which are genuine duplicates of live code:
src/databases/sqlite/sqlite-dialect.ts+ itsIDialectProviderinterface — duplicate ofSQLiteAdapterCore.applyPragmas(), which is hardware-tiered and called on every connect.src/plugins/cookie-consent/api.server.ts— unreachable (registered nowhere). Reinstated immediately afterwards because it is the only implementation of the documented server-side consent logging; wiring or dropping that feature is now a roadmap item.
Everything else was restored and is intentionally unreferenced:
collection-builder-schema-viewer, global-loading, service-worker-registration,
system/{author-brief,background-pattern,restart-required-banner,widget-validation-warning},
plugins/page-speed-score, ui/{index.ts barrel,date-picker,marquee,radio-group,radio-item,segmented-control},
rich-text/components/{color-selector,drop-down,image-description},
seo/components/{analysis-modal,meta-input,robots-meta-input}, collectionbuilder/nested-content/modal-name-conflict,
utils/schema-impact (+ its test), and the watermark trio. A second agent verified all 122 files in
those sets resolve every import (0 failures) and measured their importer counts (0 each, except the
watermark children which only the watermark editor imports).
Two audit claims were checked and rejected:
services/ai-builder/index.tsis live (the API handler dynamically imports the barrel in three places) andTokenPicker,virtual-media-grid,transcode-modal,two-factor-setup-modal,modal-schema-warningandVideoDialogare all documented — deleting them is a product decision, not cleanup (see the roadmap).
4. Bench ledger verified, and the reporter was lying about direction.
BENCHMARK_RECORD=1 … --db=sqlite --only=truth-latency (twice, same code) against the recorded
2026-09-26 baseline:
| Truth-latency row | Baseline | Run A | Run B |
|---|---|---|---|
| HTTP end-to-end (warm) | 0.911 ms | 0.486 ms | 0.393 ms |
| HTTP end-to-end (warm p95) | 1.122 ms | 0.620 ms | 0.481 ms |
| HTTP end-to-end RPS | 1 093 | 2 042 | 2 527 |
| HTTP cold, cache-busted (warm) | 1.290 ms | 0.508 ms | 0.458 ms |
| HTTP cold, cache-busted RPS | 772 | 1 957 | 2 171 |
The improvement is ~2× and exceeds the run-to-run spread (the two same-code runs differ by up to
24 %). Attribution caveat, stated plainly: the plausible cause is the single-transport lean-out
(§3.30) — one fewer lane on the point-read path — while rows like Local SDK (Full) also move with
warm-cache/JIT state inside a run. A defensible attribution needs the documented interleaved A/B
(base ref → run → current ref → run), which is queued, not claimed.
The reporter itself had a sign bug: writeRankedExecutiveSummary sorted by |delta| and titled every
entry 🔴 Top Regressions, so improvements were printed as regressions (truth-latency: -98%
with a red dot). It now splits Top Regressions (positive delta only, with an explicit “none” line)
from Top Improvements, which is why the ledger now reads correctly.
3.32 September 2026 — Two-Plane read-lane hardening, six product-bug fixes & a zero-warning tree
The read lane builds its own Response, so every check that lives in a hook it skips has to be
re-established deliberately. This wave closed that gap, removed the second transport, and took the
project’s own diagnostics to zero.
1. Publication clamp on the wire path (all four engines). requirePublished compiles
AND "status" = 'publish' into the cached point statement on PostgreSQL (jsonb_build_object),
SQLite (json_object) and MariaDB (JSON_OBJECT), and $in ["publish", "published"] on MongoDB. A
table without a status column fails closed, and the base-class fallback re-checks the row object
before serialising. The clamp itself never matched anything: loadOneById compared the filter name
(published) against the stored value (publish), denying every status-bearing row to a clamped
caller while an accidental published row would have slipped through; it now uses the shared
isPublishedStatus() predicate. Verified per adapter by tests/integration/databases/differential-parity.test.ts
(draft invisible, published visible, unguarded read still agreeing with findOne).
2. Three lane gates re-established (evaluated before any cache lookup, so a stored body cannot
outlive a policy change): endpoint parity (collections:read only — what ENDPOINT_PERMISSIONS
requires), isLaneFlacExempt() (declines when a FIELD_PERMISSIONS policy or a readRoles-guarded
field applies; fails closed on error), and isPermissionBitsetStale(permRev) (a role edit now reaches
lane traffic instead of serving the old grant set for the whole sliding TTL).
3. One transport. src/hooks/kernel-dispatcher.server.ts is deleted with its registration and 11
unit tests: it answered the same requests as the collection read lane with its own ETag/304 semantics
and built a real new Request(...) + new URL(...) per request — the bridging cost the lane exists to
avoid.
4. Diagnostics 42 → 0 by fixing producers, not assertions. DatabaseResult<T> requires error on
the failure branch; the SQL wire catches and the MongoDB wire catches returned { success: false, message } instead, which broke the union for every caller. New
tests/integration/databases/wire-contract.ts adds requireWireMethods() (fails loudly when an
adapter lacks the Direct-to-Wire contract — no silent skip) and unwrapResult(), collapsing 35 untyped
accesses in the two parity suites; the input widget’s self-referential schema types became an explicit
InputProps & { required?: boolean; translated?: boolean }; the MariaDB getRawExec result union is
narrowed at its boundary.
5. Widget suites consolidated — 16 files / 72 tests removed with no lost coverage. The near-duplicate
suites under tests/unit/widgets/custom/ were ported into the co-located src/widgets/custom/*/tests/
homes (the documented portable intent, and the glob vitest.config.ts already runs). The port was
mechanical only after a per-pair check that the modern suite covers every legacy case name and has an
equal-or-higher assertion count; seo was the single pair whose table-driven rewrite defeated the
name check, so its nine cases were verified by hand before the duplicate was removed. The
namespace-ownership guard test then caught a registry that still pointed at the removed paths — the
kind of stale reference the guard exists for. Net effect: 551 files / 4 891 tests in 17.9 s (was
567 / 4 963).
6. A documented opt-out that could never apply. PostgreSQL’s createModel created the
jsonb_path_ops GIN index behind (schema as { jsonIndex?: boolean })?.jsonIndex !== false, where
schema resolved to the schema module namespace rather than the collection definition passed in as
schemaData — so the guard was statically always-true (rolldown flags it as IMPORT_IS_UNDEFINED)
and jsonIndex: false was unreachable. It now reads the collection config, making the documented
write-only opt-out real and removing the build warning.
7. Benchmark ledger and a reporter that inverted direction. With BENCHMARK_RECORD=1 … --db=sqlite --only=truth-latency (twice, same code) against the recorded 2026-09-26 baseline:
| Truth-latency row | Baseline | Run A | Run B |
|---|---|---|---|
| HTTP end-to-end (warm) | 0.911 ms | 0.486 ms | 0.393 ms |
| HTTP end-to-end (warm p95) | 1.122 ms | 0.620 ms | 0.481 ms |
| HTTP end-to-end RPS | 1 093 | 2 042 | 2 527 |
| HTTP cold, cache-busted (warm) | 1.290 ms | 0.508 ms | 0.458 ms |
| HTTP cold, cache-busted RPS | 772 | 1 957 | 2 171 |
The improvement exceeds the run-to-run spread (two runs of identical code differ by up to 24 % here),
but attribution still needs the documented interleaved A/B (base → run → current → run), which is
queued rather than claimed. The reporter’s ranked summary sorted by absolute delta and titled every
entry 🔴 Top Regressions, so improvements were printed as regressions; it now splits
Top Regressions (positive deltas only, with an explicit “none”) from Top Improvements.
8. E2E: two reproducible failures, traced to real defects. A full local run’s failure set is
disjoint run-to-run and drains under isolation (the contention class tracked in the test-status
dashboard), but two specs reproduced in solo, clean-database runs — and tracing them found
product bugs in src/, not host state: a $effect on /config/design-system that reverted every
local edit before saving, and avatar writers that left the layout snapshot stale so the delete
button never rendered (both in 9). The spec that documented the first also needed an
outcome-verified selectOption helper — a selection can land before hydration attaches the
binding, in which case the DOM snaps back to its server-rendered value, which is how the revert
was first observed. The same outcome-verified retry (input → assert the outcome, never a longer
sleep) now guards the two other interactions that a hydration gap could drop: the Edit User
Details dialog and the prep-phase sign-in submit that had been aborting whole E2E runs.
9. Six product bugs — two surfaced by the type checker, two by E2E, two by the follow-up trace — all fixed.
- Uploads scoped to a phantom tenant.
media-upload/process-upload.tscallssaveMedia(file, userId, access, tenantId, basePath); both call sites passed the resolved folder path in thetenantIdslot and never passed_basePath, so an entry upload was persisted under a folder-shaped tenant ("collections/pages") with no folder. The fourth argument is nowctx.tenantIdand the fifthfolderPath(the folder the widget already computed). Silent because nothing type-checked the call. - Marketplace install/license could never succeed.
marketplace-view.sveltetreatedfetchApi’s envelope ({ success, data, message, code }) as aResponse—res.json(),res.ok,res.status. Those areundefinedon the envelope, so the handler threw aTypeErrorinto its own catch and reported “Install failed” for every attempt. It now reads the envelope (res.success,res.data ?? res, message/code for the toast) and keeps the previous tolerance for payloads that arrive at the top level rather than underdata. - A settings form that reverted every edit. On
/config/design-systemthe overrides$effectread the same local state it wrote, so a local edit re-triggered it and was instantly pinned back to the persisted value (and then saved back). The writes are now scoped withuntrack— the effect depends only on server prefs — which is the documented Svelte 5 shape for “sync from server data”. E2Edesign-system.spec.ts:68reproduced the revert deterministically; a stale-density comment in the spec’s ownfinallyblock was a second symptom (it silently re-saved the old value). - Avatar writes left the layout snapshot stale for 15 s.
getFreshLayoutUser()(layout-caches.server.ts) feeds the (app) layout (sidebar avatar, display name) from a 15 s L1 entry, invalidated only by thePUT /api/user/update-user-attributesroute.LocalCMS.auth.saveAvatar/deleteAvatarwrite through the adapter directly, so an upload persisted correctly while the modal’s refreshed page data still saidavatar: nulland the delete button never rendered (E2Eprofile.spec.ts:174). Both writers — and the namespace’supdateUserAttributes— now drop the entry through one private helper. - Every server-rendered id in the admin UI drifted from its hydrated twin.
generateId()(the native UI kit’s id source:input,select,checkbox,textarea,toggle,radio-group,tags,combobox,date-picker) falls back to a process-global counter unlessinitIdGenerator()has installed its per-render context — and the app never called it (only the SSR test wrappers did). Server ids therefore advanced with every request (select-2), hydration restarted at zero (select-0), and everylabel[for]/aria-describedby/aria-controlspointing at a generated id broke once hydration finished. The root layout now initializes the generator, andtests/unit/routes/layout-id-generator.test.tsfails if that call ever disappears. - Invalidation could lose a race with the next read.
invalidateLayoutUserCache()wasvoid cacheService.delete(…).catch(() => {})— it returned before the delete landed, so the save→reload round-trip that the E2E exercises could still be answered from the old snapshot. It is awaited now (the module’s own header already promised “invalidate on user-attribute writes”), andAuth.updateUserAttributes— the facade every internal writer (roles, 2FA, admin edits) lands in — invalidates as well, so the HTTP route, the SDK namespace and the facade all honour the contract. The remaining direct-adapter writers (two-factor-auth.ts,magic-link.ts) touch authentication metadata only (twoFactorPending,backupCodes,lastAuthMethod,lastActiveAt), none of which the layout snapshot renders.
10. Type drift to zero. svelte-check reported 16 errors in 7 files and nothing in the
gate noticed (bun run check = format + lint + dead-class + design-token + shade + lockfile; no
tsc). Beyond the two bugs above: SessionResolution’s ok-arm was missing permMask (added,
returned since the bitset work), collections.svelte computed a matchesFav that no branch
used, bulk-field-edit-modal.svelte bound number | null into an input that accepts
string | number | undefined (now undefined), the write-pipeline test fixture was typed as a
full Schema where the helpers take a structural PrepFieldSchema, and the benchmark’s
optional findPointWireStream is narrowed through requireWireMethods() instead of a cast.
All 16 are fixed; wiring svelte-check into the gate is a roadmap item.
11. Benchmark harness: two defects and a reporting bug. etag-hash asserted that the
pure-JS FNV-1a loop beats native SHA-256 at 547.8 KB; measured 818 µs vs 215 µs (SHA-256
3.8× faster above the cache boundary), while the loop does win for the sizes fastHash
actually hashes (collection/widget sources, largest measured 23 KB). The assertion now splits at
the measured crossover (strict superiority ≤16 KB, a µs/KB scaling guard above) instead of
deleting the check. dev-dependency-load crashed its own child: the matrix exports
NODE_OPTIONS=--max-old-space-size=1024 to children, and under that 1 GB cap svelte-check
aborts with a V8 fatal error (exit 134, node::OnFatalError, ~12 s in), which the probe read as
“Type Check failed” — reproduced by setting the variable alone, clean without it. The DX probes
now spawn with NODE_OPTIONS stripped. Finally, reporting.ts formatted the per-adapter
ledgers with an unref()d oxfmt child and never formatted docs/project/benchmarks/index.mdx,
so a run could leave the tree failing bun run check; the pass is awaited (bounded 20 s) and
covers the summary too — verified by running the matrix and immediately re-running check.
12. Import-surface sweep — every namespace import either converted or documented. 49
import * as NS statements were triaged across six subagent passes under review: 38 converted
to named imports in 22 files (typescript, valibot, yjs/y-protocols/lib0, Node builtins, and the
adapter/query helpers), 11 kept deliberately and now carrying an intent comment — the three
adapter.schema surfaces (removing them broke adapter construction; four unit tests caught it),
base-adapter’s utils field, and the seven route-handler dispatcher namespaces. The
safety net earned its keep: svelte-check caught one wrong conversion (an aliased import that did
not exist) and one dropped member, and two namespaces were correctly left alone because they are
not imports at all — the scaffolder’s v.* text is generated code, and
widget-registry-service.ts documents why its qualified access is load-bearing (a named import of
a test-mocked-away export is an ESM linking error, while the qualified typeof check falls back).
Two improvements came out of it: the AI widget scaffolder now emits an exact named valibot
import into every generated widget (widget definitions are client-bundled), and it no longer
generates pipe(number(), minLength(1, …)) for a required numeric field — a string check on a
numeric schema, which cannot validate. Honest scope: the client bundle is byte-identical
(664 chunks, 15 181.3 KB) before and after — the converted modules were server-only or already
absent from the bundle, so the win is explicit dependency surfaces, dead-import removal and
refactor safety, not shipped bytes.
13. MariaDB cursor streaming enabled. Switched supportsStreaming: true in MariaDB AdapterCore (src/databases/mariadb/adapter-core.ts), allowing non-buffered streaming queries via streamMany and exports across large datasets without accumulating intermediate row arrays in Node/Bun memory.
Verification: bun run test:unit 552 files / 4 895 tests green in 18.8 s;
bun run test:integration 719 tests / 76 files (694 pass, 25 skip) against a freshly built
four-adapter harness; svelte-check 0 errors / 0 warnings across 6 785 files;
bun run check, bun run lint:docs (263 files), lint:benchmark-mdx and risk:audit clean;
project diagnostics 0 errors / 0 warnings. The two E2E specs this wave fixed are verified in the
specs that documented them: profile.spec.ts green across --repeat-each=3, and
design-system.spec.ts 18/18 across three repeats. The local host’s remaining contention
residue is tracked as an open item in the test-status dashboard and the roadmap — not claimed as
passing here.
3.33 September 2026 — Release preparation on push & a manifest writer that cannot lie
--release on the pre-push gate. bun run git push --release (optionally
--release=patch|minor|major) arms a release step in .githooks/pre-push: once all nine checks pass,
scripts/version.ts auto derives the next version from the Conventional Commits since the highest v*
tag, the manifest is committed as chore(release): bump version to vX.Y.Z — the subject the release
workflow itself writes on its manual path — and the hook prints the push that publishes it. The flag is
consumed by scripts/git-safe.ts, which exports SVELTY_RELEASE for the hook, because git never
forwards hook arguments to it.
Two properties are deliberate. The step runs after the full gate, never before: auto-release.yaml
tags whatever package.json holds, so a bump for a tree the gate never validated is exactly the stray
bump AGENTS.md §8 warns about. And the release commit cannot travel inside the push that triggered it —
git resolves the pushed refs before the hook runs — so the hook prints the command to repeat instead of
implying the push was the release; the bump stays local and reversible until that second push. Re-running
is a no-op: within one release cycle the derivation is stable, so a second push finds the manifest already
at the version and commits nothing. Skipped on the docs-only and --only-failures paths (both warn), and
refused with a non-zero exit when version.ts refuses — a push that looks released but is not would be
worse than a blocked push.
Known trap, observed 2026-09-27, removed 2026-09-30: a test tag
v0.2.0on the 5 July 2026 commit6dc2d89(that commit’s manifest was0.0.7) was reachable, soautoderived0.1.2 → 0.3.0(highest reachable tag wins overgit describe’s nearestv0.1.2). The tag was local only and was deleted. It was never onorigin. With it gone, the highest reachable tag isv0.1.2.
A manifest writer that could not find the field it was looking at. replaceVersionField() was
line-anchored (^\s*"version"\s*:…$ with the m flag), so a manifest whose version field shares a line
with other keys was refused with could not locate the top-level "version" field in package.json,
although the field was right there. It was found by the throwaway-repo probe that verifies the release
step, not by a user report. The writer is now a depth-tracking scan (locateVersionValue()) that skips
whole string tokens: a nested "version", the word inside another value, and braces or escaped quotes
inside strings cannot fool it, and minified and pretty-printed manifests both rewrite byte-for-byte except
for the value (10 new tests in tests/unit/scripts/version-manifest-write.test.ts; the 33 policy tests of
version-bump.test.ts unchanged and green).
Escapes that printed as escapes. info() / warn() in .githooks/lib.sh passed their message
through %s, so every ${BOLD}…${NC} embedded in a hint — four pre-existing failure hints plus the new
release hint — rendered as a literal \033[1m in a color terminal. They now use %b; the message
arguments are hardcoded strings plus validated enums, so interpreting escapes cannot mangle caller data.
Verification: the release step was exercised end-to-end in a throwaway repo (tag v0.1.0 + one feat
commit): run 1 bumped 0.1.0 → 0.2.0 and committed it, run 2 no-opped, run 3 (dirty manifest) refused and
returned non-zero — the exit code that blocks the push. Unit tests: git-safe-release (7),
version-manifest-write (10) and version-bump (33) green; bun run scripts/version.ts --dry-run against
this repository prints its decision without writing. No throughput claim attaches to this entry — it is
release tooling.
3.34 September 2026 — Honest benchmark tails
Replaced the p50/p99 estimator in verify-benchmark-local.ts with recorded-percentile grading (UNMEASURED when absent), selected rows by testFile + newest runId, and fixed the --report=variance flag match. First honest run (20 workloads, 2026-09-27): 8 🟢 / 7 🔵 / 3 🟡 / 2 🔴 — the write-path tails it had been hiding became the next milestone.
3.35 September 2026 — The write tail attributed: WAL checkpoint I/O, not GC
The two 🔴 write rows (update @8c 5.08→26.67 ms, mixed sequential 0.79→4.62 ms) have one root
cause, and it is not the application: SQLite’s auto-checkpoint fsyncing while requests wait.
Method. PROFILE_WRITE=1 on the replica attributes each write to its spans (ns:persist,
db:upd|ins:stmt, prepare-values, conv, outbox), and ~5 000 statements per run resolve a rare tail
far better than a 300-sample benchmark row. The switch had never worked: the benchmark server env is a
whitelist (getBenchmarkTestEnv), so PROFILE_WRITE never reached the server. scripts/benchmark-matrix/index.ts
now forwards PROFILE_WRITE / LOG_LEVEL / SQLITE_* explicitly, prints a banner for override runs, and
persists the server log to results/<db>/diagnostic-server.log (the in-memory buffer was dropped on success).
Where the tail is (9 726 writes, one profiled run): everything above the statement is microseconds —
sanitize+validate p99 0.059 ms, encrypt 0.060, outbox 0.029, prepare-values 0.020, conv 0.016. The whole
tail sits in the SQL statement: db:upd:stmt p50 0.108 ms, p99 0.716 ms, max 17.4 ms.
Interleaved A/B (five arms, one replica run each; stalls = statements > 10 ms, out of ~5 200):
| Arm | db:upd:stmt > 10 ms |
max | db:ins:stmt > 10 ms |
max |
|---|---|---|---|---|
| control | 31 | 22.5 ms | 33 | 20.1 ms |
| control (repeat) | 26 | 25.0 ms | 25 | 25.1 ms |
SQLITE_SYNCHRONOUS=OFF |
0 | 5.0 ms | 0 | 6.1 ms |
SQLITE_WAL_AUTOCHECKPOINT=0 |
0 | 5.3 ms | 0 | 5.1 ms |
WAL_AUTOCHECKPOINT=16000 (128 MB WAL) |
7 | 36.2 ms | 16 | 43.2 ms |
Removing either the checkpoint or its fsync removes every stall; making checkpoints rarer makes the
surviving ones bigger (their cost scales with the WAL size), so “raise the threshold” is the wrong
lever. SYNCHRONOUS=OFF is not shippable (power-loss durability) and AUTOCHECKPOINT=0 alone leaves the
WAL unbounded — the fix is moving housekeeping off the request path (checkpoint from a separate
connection or a background scheduler, size cap as the safety valve), tracked as the roadmap item above.
Also measured in the same session: with zero statement stalls the write rows’ ratios fall from 7.4× to
2.7× (update) and 3.6× (create) — the residual spread is the synchronous driver serializing eight
concurrent writers, which is the second lever (worker-connection writes) and is not yet shipped. The
auth-performance 500 seen once in the interrupted full matrix did not reproduce in isolation (the
reject path answers 401/403 and logs Invalid or non-existent API key provided), so it is recorded here as
unverified rather than fixed.
3.36 September 2026 — Tail as a rate; five proposals verified before building
- Replaced the
p99/p50tail verdict with a slow-call rate (slowRatePer1000, threshold 3× the row’s own p50). First run:mixedat 175 ‰ was the worst row by frequency, while sub-millisecond reads sat at 0.0 ‰. - Verified five proposals before implementing: write-lane instrumentation (top lever), a noop control + 3-run ensemble (half shipped), checkpoint off the request path (better home found in the background worker), commit collapse (falsified — a full in-process update is 0.057 ms), and worker-connection writes (falsified).
3.37 September 2026 — Vendor regression claim did not reproduce
Bisected e1efe15b2..e4994eff6 on SQLite and PostgreSQL with a protocol-parity replica and explicit NODE_OPTIONS: the reported tag > main ordering did not reproduce. The only structural change in the range (Dockerfile semi-space 128 → 64) showed no consistent effect, and the measured run-to-run floor (8–59 % on individual lanes) is wider than the attributed deltas. No regression to fix.
3.38 September 2026 — The write lane’s “unlocated 1.5 ms” was a mismatched baseline
The gap was a comparison between crud.atomicIncrement and the full SDK update lane, plus client fetch/loopback transport. Measured server cost of the update is 0.35–0.40 ms (0.15–0.16 ms dbwrite); the opt-in raw write lane cut client wall by 15 % with server time unchanged.
3.39 September 2026 — Lane compression, deterministic list order, truthful readiness
- Lane compression: fast-lane responses bypassed
handleCompression, so every lane-served list left as identity bytes. A shared zstd/br/gzip variant stash now serves from the cache entry, warms lazily on re-hit, and compresses ≤64 KiB synchronously / >64 KiB asynchronously. The >64 KiB zstd audit row: 22.7 → 11.4 ms warm, 87 → 175 RPS, co-tenant p95 7.39 → 2.93 ms. - Streaming writers are pull-driven; the old
setTimeout(10)loop and per-recordsetTimeout(0)are gone (a 10 k-row export paid ~10 s of timers). - Truthful readiness: all three health responders derive
overallStatusfromisSystemReady()(operational state + boot pre-warm settled), not DB presence, so harnesses no longer measure the warm-up itself. - Deterministic list order: unsorted SDK reads default to
updatedAt desc, _id desc, matching the keyset path and its(tenantId, updatedAt, _id)index; without it the engine could return different LIMIT/OFFSET windows for the same query. - Engine-built list JSON was shelved: byte parity landed on SQLite but cost 5.05 vs 2.43 ms (text-based JSON functions), and PostgreSQL/MariaDB cannot be byte-identical. The remaining list-miss cost is a roadmap item.
3.40 September 2026 — Large-list ETag: 8 ms FNV fold → native SHA-256 (−84 %)
generateContentEtag kept the FNV fold below 1 KiB for validator stability and switched to a native SHA-256 digest above it. Same probe: build segment 6.4 → 0.94–1.01 ms (−84 %), identity p50 at c=1 8.84 → 3.26 ms, in-process etag 9.8 → 0.102 ms. The T15 contract (whole-body coverage) is unchanged.
3.41 September 2026 — Harness DB isolation, composite-index policy, durable-commit proof
- Harness DBs: a bare
require("node:fs")inside atrymade the worker bundle fail closed and route test databases intoconfig/database/; static ESM imports, a best-effortmkdirSync, and areturnoutside thetryrestoreconfig/test-database/routing (pinned byresolve-sqlite-path.test.ts, including a real mkdir failure). - Composite indexes: the covering
(tenantId, status, <col>, _id)index is now provisioned only for declared query targets (indexed, numeric,publishedAt). A psql A/B measured +11–17 % write cost per extra index; the 113 k-row benchmark table drops 15 → 12 indexes. - Durable commit: the update lane’s
dbwriteis 94 % of server time, and ~75–85 % ofdbwriteis the WAL fsync/commit wait (synchronous_commit=on1.57–4.50 ms vsoff0.31–0.43 ms). The composite policy therefore ships as write-amplification reduction, not a latency claim.
3.42 September 2026 — Session risk, lane threat scan, SSO metadata, WebAuthn ceremony
- Read lane: a warm collection
GETorHEADrunswafGuard.inspectEventand the honeypot / non-local scanner response before any cache or database read.handleSecurity(heap shedding, the Redis WAF limiter, the GraphQL shield) stays off that lane. No new benchmark file; the scan is the same linear walk the write lane already calls. - Session risk: a changed user-agent steps mutations up (
SESSION_RISK_STEP_UP, or/login?reason=step-upfor pages) untilPOST /api/user/sessions/reauthverifies the password and adopts the current browser. An IP-only change is logged. Reads stay available. - SSO: OIDC session metadata is written to the session cache (
sso:session:{id}, 7 days) as well as process memory, so RP-initiated logout can finish on another node. Back-channel logout still walks the sessions this process has in memory. - WebAuthn: register and sign-in reject a foreign origin and a missing user-presence flag. The assertion signature is checked over the raw client data bytes.
- Self-assessment, re-run 2026-09-29: the August weights still total 99.93/100 (~99.9%).
bun run test:securitypassed 343 tests.bun run risk:auditpassed 5/5 after the read redaction path was switched to canonicalisAdmin()(the first audit pass had oneadmin-role-fragmentationfinding). The two 99.8 rows were not raised. The figure is the internal checklist. A dated penetration test by someone outside the project is still open, and it is not one of the six weights.
3.43 September 2026 — Schema boot repairs; warm write lane widened
- Schema boot:
CREATE TABLE IF NOT EXISTSdoes not add columns to an existing table, and a stored fingerprint could skip the repair pass. Boot now adds any spec column an existing table lacks (fixing MariaDBauth_sessions.amr/mfaVerifiedAtand the resulting 401), then storescomputeColumnSyncedFingerprintso later boots skip both DDL and scan. Covered byschema-spec-parity.test.ts. - Warm writes: batch, bulk, increment, status and
POST /api/graphqljoin the collection write lane for warm admin sessions;Prefer: return=minimalskips the read-back on all four adapters.
3.44 September 2026 — Schema model
The lean collection schema model shipped in src/content/schema-model.ts, src/content/schema-hooks.ts, and src/databases/core/column-renames.ts. Documented in Schema model. Relation values stay ids. There is no new foreign-key index on the write path, because each extra index is maintained on every update (§3.41). A full-document update is still the durable commit. The remaining model surfaces (compiled relation filters, nested writes, onDelete, virtual, omit) are tracked in the roadmap.
- GraphQL lists take
where: JSON,orderBy: String, andtake: Intin one operator language (one JSON argument, not a generated input type per field).parseOrderByacceptsfield,+field,-field,field:asc|desc, andfield asc|descand rejects unknown or non-orderable fields (ORDERBY_UNKNOWN_FIELD,ORDERBY_FIELD_NOT_ORDERABLE). Inverse relations takewhereand filter loaded rows in memory;isFilterable: falserejects a filter on that field. Where shape cap: 8000 characters, depth 6, 64 nodes. - Hooks, on the collection and on
field.hooks:resolveInput,validate(many errors, one abort before the write),beforeOperation,afterOperation, in addition tobeforeValidate/afterValidate. Order is field and listresolveInput,beforeValidate, field and listvalidateplus the numeric/exact gate,beforeOperation,afterValidate;scheduleAfterOperationruns the post-commitafterOperationwithout awaiting, and a failure is logged at debug.prepareWritePayloadpassesschema.fieldswhenever a field declares hooks, andensureSchemaHotFlagsderives_hasHookFields/_hasAfterOperationHooksso hook-free schemas pay nothing. decimal,bigint,calendarDay, andbytesare exact string columns (materializedSqlType: SQLiteTEXT; PostgreSQL and MariaDBVARCHAR(64),VARCHAR(10), andTEXT) and do not earn a covering composite index unlessindexed: true.shouldMaterializeFieldmaterializes them by default, so they are real columns rather than blob fields.- Schema actions
{ permission, increment?: { field, amount }, patch?, run? }are checked by the action permission inCollectionsNamespace.runAction. REST isPOST /api/collections/:id/actions/:namewith{ entryId, input }; GraphQL isrunCollectionAction. REST does not also requirecollections:write. An undefined action is 404ACTION_NOT_FOUND; an action without a permission is admin-only (ACTION_FORBIDDEN). renamedFromon a systemColumnSpecor a collection field renames when the old column exists and the new one does not, beforeADD.column-renames.tsmatches the live catalog case-insensitively and issues the rename in the stored case; a failed rename is retried on the next provisioning pass. Mongo uses$renameonce per process when the model is created. The dropped v0.0.8 repairs are still not replayed unless a column declaresrenamedFrom. Tests:tests/unit/databases/column-renames.test.ts,tests/unit/content/schema-model.test.ts, andtests/unit/databases/schema-spec-parity.test.ts.isFilterable/isOrderableare booleans or functions of{ user }and are enforced on GraphQL filters and sorts.cacheHint: { maxAge, scope }sets GraphQLCache-Control(tightestmaxAge, private wins); a private hint is not stored in the shared GraphQL response cache.- Row ownership
ownership: { field }:find,count, andfindStreamingscope tofield === user._idbefore the cache key (admins and system scope bypass; a caller without a user id matches nothing), andpresentReaddrops a non-matching point-read row on a copied envelope so the shared cache entry is never mutated or poisoned. Tests:tests/unit/sdk/collections-ownership.test.ts. singleton: trueforces_idsingleton:<collectionId>increate; a second create answers 409SINGLETON_EXISTS. The_idprimary key makes a concurrent double create fail on the insert instead of persisting two rows.
3.45 October 2026 — Durable-commit parity, bulk writes & system index overhaul
- Per-connection durability:
PG_SYNCHRONOUS_COMMIT/PG_WORK_MEM/PG_JITare passed into every PostgreSQL pool instead of a cluster-global knob. Updatedbwrite9.76 → 2.3–2.9 ms; competitive update lane ~1.5k → 2.0–2.6k RPS at 8c. - Bulk writes: PostgreSQL UNNEST binds one array per column; MariaDB
JSON_TABLEupdate (collation-safe) 68.4 → 3.6 ms (~19×). The insert twin was measured and deliberately not shipped (+19 % slower, −36 % seed burst). - Durability parity in the harness: MariaDB update +51 %, create +42 % at 8c; seed burst 5,686 → 7,676 docs/s.
- System index overhaul: BRIN + tenant-desc on
audit_logs, keyset-friendlycontent_nodes, unique revision/email/redirect constraints, mirrored on SQLite/MariaDB. The benchmark scale guard now compares writes againstlistLargeat a 0.25 threshold. - Write-lane lean-out:
?fields=projection prunes the SQLRETURNINGread-back; the warm lane admits authors with a freshcollections:writebit; async-Redis rate limiting cut warm create 1.860 → 0.360 ms and update 1.485 → 0.310 ms on SQLite. The duplicate-index A/B was write-lane-neutral, so no cleanup migration is justified by throughput.
3.46 October 2026 — 4-Adapter transaction parity, audit micro-batching & projection typing
- Transaction parity: SQLite, PostgreSQL, MariaDB and MongoDB share isolation levels, statement timeouts, re-entrant handling (savepoints/client sessions) and explicit rollback signals; pinned by
multi-adapter-transaction-parity.test.ts. - Audit micro-batching: a 25 ms / 50-item flush keeps mutations sub-millisecond; 500 concurrent
log()calls lose zero entries and keep a continuous SHA-256 chain within a bounded buffer. - Bulk & projection correctness: MongoDB unordered bulk writes remove head-of-line blocking; virtual-field projections preserve native typed JSON instead of stringifying blobs (property-based fuzz coverage).
- Measured (2026-10-05): warm HTTP end-to-end 0.262 ms (3,785 RPS), local SDK 0.005 ms (177,378 RPS), ACID commit 0.005 ms.
Storefront — European checkout (2026-10-05)
Catalog prices on /shop are gross. Checkout shows the trader, the VAT breakdown, and an order button that states the payment obligation (zahlungspflichtig bestellen when the store language is German). Guests withdraw at /widerruf. The order stores an invoice number, net, and tax. A price reduction shows the lowest price of the previous 30 days when that history exists. OSS returns, packaging registration, and WEEE stay with the merchant. Guide: E-Commerce Overview.
3.47 October 2026 — Compiled query templates & sub-millisecond SQL CRUD
- Unified SQLite/PostgreSQL/MariaDB query building behind one dialect-parameterized
SqlQueryBuilder<T>; compiled plans now coverwhereIn,between,null,$and/$orand keyset cursors, with dialect-safeLIKE … ESCAPEbinding. - Self-measured (2026-10-06): PostgreSQL query-builder list 4.88 → 0.75 ms (202 → 1,204 RPS),
findMany−37 %,findPage−39 %; MariaDB list/find/page ~0.55 ms; SQLite reads 0.059–0.065 ms (14k–15.6k RPS). - Kept read-path correctness: compiled date coercion matches the Drizzle path, and nested
$or/JSON/non-bindable operands self-heal to the dynamic AST rather than partially compiling.
3.48 October 2026 — SQLite write tail: checkpointing, group commit, coalescing
- Checkpointing off the request path (default):
wal_autocheckpoint=0plus a background scheduler with idle, 60 s-force and a 64 MB WAL cap. The discrete ~25 ms checkpoint spikes disappear (slowCount0 on every write row); residual p99−p50 is ~4.2–6.5 ms (WATCH). - Group commit default ON: create 1,833 → 2,892 RPS (+57.8 %) and update 1,896 → 3,347 RPS (+76.6 %) at 8c, with p95 6.74 → 5.29 ms / 5.38 → 3.48 ms.
- Residual floor, stated plainly: 2.2–2.9 ms p99−p50 — coalescing shortens the queue, it does not flatten it; the per-statement commit is unchanged.
- Statement coalescing: PostgreSQL insert coalescing is default ON (+12–18 % create); the adaptive update window stays opt-in because it regressed 41–54 % on the 10k-doc replica. Cold list wire streaming ships on SQLite (+22.7–50.2 % RPS) and self-declines on PostgreSQL/MariaDB, where engine-side JSON is slower.
- Create-lane audit tax removed: the per-insert audit hook was a second row on top of the HTTP audit (create @8c 1,332 → 1,719 RPS); the external harness moved 604 → 1,047 RPS. Inventory decrement is now mutex-serialized and
Idempotency-Keyreplay stops duplicate orders/charges.
3.49 October 2026 — Hardware-adaptive runtime: every resource budget derives from the effective cgroup limit
- Effective memory, not host RAM:
effectiveMemoryBytesresolvesHARDWARE_MEM_LIMIT_MB→process.constrainedMemory()→os.totalmem(), with a tier (nano…xlarge). V8 heap (0.5×, 128–4096 MB), RSS target (0.75×), request body (limit/32), L1 caches and pool/worker caps all derive from it; heap + L1 is unit-tested to fit ≤70 % at every tier floor. - CPU is quota-aware:
os.availableParallelism()honours--cpusandcpuset(1 vCPU now derives 1, not the host’s 24);UV_THREADPOOL_SIZEis applied at boot because libuv reads it only once. - Container-aware heap cap:
index.cjsre-executes with--max-old-space-sizewhen the cgroup limit is below the host; operator flags, Passenger andSVELTY_NO_HEAP_CAP=1opt out. - Verification: a committed cgroup gate runs the real profile inside 256 MB/1 vCPU, 512 MB/2 vCPU and unconstrained containers; the full 11-lane replica passes at 256 MB with
dbPool=4/l1=16 MB.
3.50 October 2026 — SQL soft-delete boundary completed (verified)
- The leak: SQL adapters clamped only
findById, sofindMany,findOne,count,exists,findByIds,streamMany,findPageandaggregateserved soft-deleted rows on SQLite/PostgreSQL/MariaDB — published-then-deleted content stayed readable through every list surface. - The fix: one shared
clampSoftDeleted()mergesisDeleted: falseat both the compiled-plan and Drizzle translation points, with explicit opt-outs (includeDeleted, system scope, trash’sisDeleted: true). Cross-engine parity: SQLite 704/0, PostgreSQL 22/0, MariaDB 22/0, MongoDB 10/0. - Same pass: closed a cross-tenant
upsertoverwrite (tenantId excluded fromSET), preventeddata.tenantIdfrom reassigning a row’s tenant, removed duplicate round trips onfindById/updatemisses, and gated the unauthenticated/health?gc=trueDoS + verbose diagnostics.
3.51 October 2026 — Test gate and DB parity (2026-10-18)
- Type gate in
check:bun run checknow ends withbun run typecheck(svelte-kit sync→tsc --noEmit→svelte-check --threshold error), clearing the accumulated 31tsc+ 42svelte-checkerrors: 0/0 project-wide. - Local DB parity:
bun run test:parityruns the adapter contract suites on every reachable engine (SQLite, PostgreSQL, MariaDB, MongoDB), with--docker,--onlyand--require-all; pre-push mirrors it whensrc/databases/changes. - Budgets: P0 coverage floors 72/72/60/70 (measured 75.73/75.71/64.33/73.92);
bun run flake:budgetenforces ≤2 retried-pass tests and ≤3 % per E2E shard.
3.52 October 2026 — Security assurance and OIDC (2026-10-18)
- Zero-mock OIDC: an in-process OpenID Provider (RSA-2048, real sockets) exercises discovery/caching, PKCE code exchange, JWKS RS256 verification, fail-closed PKCE/replay/issuer/signature paths, and back-channel logout with
iatfreshness andaudvalidation. NosafeFetchmock; the only seam is theTEST_MODE-gated exact-origin allowlist. - Security-core coverage: 2FA (TOTP replay, backup codes, trusted-device cap,
mfaRequiredfail-closed), WAF/GraphQL complexity/honeypot enforcement, submission replay, and Google/GitHub OAuth state now run their real logic. P0 lines 67.20 → 75.73 %, 2FA 0.63 → 86.71 %,sso-session33.33 → 93.17 %. - Bugs fixed: back-channel logout accepted any provider-signed token (now validates
iat,aud, and the forbiddennonce); SSO wildcard redirects never matched; RP-initiated logout used an undiscovered endpoint; malformed OAuthstatethrew instead of returning null.
3.53 October 2026 — AI surface repair (2026-10-18)
- Enrichment contract: the widget read
data.resultfrom a{ success, data }envelope and wroteundefined; it now unwraps the envelope, handlessuccess: false, joins array results, and the server supports the declaredkeywords/customactions (unknown actions return400). - Authorization:
/api/ai/*and/api/chatrequiredsystem:settings, so editors received403on every AI action. Both now use the newai:usecapability (developer/editor); the AI builder stays admin-gated. - Provider boundary: batch embeddings via
/api/embedwith a per-text fallback,gen_ai.*-shaped telemetry (token counts, no payloads), and server-side<user_data>shielding. - Tests: replaced the self-simulating
ai-copilot.test.tswith realAIServicetests; added permission, embedding and schema-ast regression suites (66 targeted tests).
3.54 October 2026 — Crypto agility: key-ID envelopes, hybrid ML-KEM, checksum profile (2026-10-18)
- Key-ID envelopes:
v2envelopes carry a<keyId>across encrypted fields, plugin settings, TOTP seeds and backups, with a configured decrypt ring (*_KEY_RING). Rotation is now a two-phase operation; an unknown key ID fails closed;v1envelopes remain readable. - Hybrid ML-KEM: a dependency-free ML-KEM-768 + AES-256-GCM envelope (random DEK, HKDF-derived KEK, two AEAD layers) runs on Node 24 and Bun through WebCrypto. It is opt-in for backups (
PQC_HYBRID_BACKUPS=true) and has a keygen script (scripts/security/pqc-keygen.ts). - Checksum profile:
CHECKSUM_ALGORITHM=sha384|sha512produces self-describing values for new artifacts; legacy bare-hex SHA-256 values keep verifying; the append-only audit chain stays SHA-256.
3.55 October 2026 — Security remediation, E2E balancing, and AI provider port (2026-10-18)
- Forms and Login Rate Limiting: Added
RateLimiterto the public form submission ingestion endpoint (POST /api/forms/:collection, 20 req/min per IP/IPUA) and direct API password authentication (POST /api/auth/login, 15 req/min per IP/IPUA), providing defense-in-depth against credential stuffing and automated spam ingestion. - E2E Playwright CI Shard Rebalancing: Rebalanced
.github/workflows/e2e-matrix.tsfrom 6 to 7 shards by splitting the monolithicUsers & RBACbottleneck shard (12 specs, 71 tests) intoUsers & ProfileandRBAC & Journeys, reducing CI E2E critical path wall-time from 4.4m to ~2.5m. - Universal AI Provider Port: Extracted
AiProviderinterface (src/services/ai/ai-provider.ts) standardizing generation, multi-turn chat, embeddings, and OpenTelemetry GenAI usage telemetry across vendors and test doubles. - 4-DB Engine Parity: Validated complete adapter contract, fail-closed security, and differential parity compliance across SQLite, PostgreSQL, MariaDB, and MongoDB via
bun run test:parity.
3.57 October 2026 — Session durability, admin payload hygiene, SSR tabs (2026-10-22)
- Create-form crash fixed:
/collection/posts?create=truereturned a 500 because<Fields>mounted against an empty store and handedundefinedto widget props that declare a fallback (Tags:value = $bindable([])), throwingprops_invalid_value. The newbuildFieldSkeleton()(src/components/collection-display/field-skeleton.ts) seeds every declared field synchronously (schema default, elsenull; translated fields as{ [locale]: value });applyFieldDefaults()keeps the invariant for later store swaps andcycleFieldLocale()seeds the target locale key. The entry-listonCreatepath now honours schema defaults too. Covered bytests/unit/components/field-skeleton.test.tsand the jsdom suiteentry-fields-create-skeleton.test.ts. - Session rotation no longer signs users out: the predecessor row is retired for a 2-minute grace window (
updateSessionExpiry) instead of being deleted, so requests already in flight with the pre-rotation cookie keep validating — including across a process restart, which wipes the in-memory grace map.createSession({ isRotation: true })skips the device policy andSESSION_MAX_PER_USER, which previously evicted the session being rotated away from. Covered bytests/unit/auth/session-rotation.test.ts; contract documented indocs/reference/security/login-security.mdx. - Credential leak closed: the fresh layout user re-read (
getFreshLayoutUser()) cached and serialized the rawauth.getUserByIdrow, so the argon2idpasswordhash (plus TOTP seed, backup codes, reset/refresh tokens) was embedded in every admin page payload. The DB read now passes throughtoSafeSessionUser()at the cache boundary; verified by the new regression test intests/unit/utils/layout-caches.server.test.tsand by grepping live HTML. - Access Management renders on the server: the five tab bodies were lazy-imported inside
{#await import(...)}, which can only render its pending branch during SSR — every reload painted “Loading permissions…” until the whole client graph hydrated. They are static imports now, so the permissions table (58 rows) is in the SSR HTML; the duplicate “Permission Management” heading under the page title is gone and the admin-role hint moved into the tab strip. - Admin tables share one chrome:
/config/access-managementand the/userUsers tab now useSMART_TABLE_TH/TD/THEAD/ROW_HOVERinstead of hand-rolled classes (the dark-mode header used to render as a light--admin-bg-sidebarband). - Plugin workspaces keep the shell:
PluginWorkspaceOverlayis no longer a fullscreenfixed inset-0 z-50dialog — it renders inside the content column (absolute inset-0 z-30), so the sidebars stay available. The underlying page unmounts while a workspace is open (no stacked<h1>), and the store syncs withpage.urlso the back button closes it. - Sidebar navigation reuses the preload:
collections.svelte → navigate()usedgoto(path, { refreshAll: true }), which re-ran every layout load and threw away the hover-preloaded payload on the most-used navigation. Primary navigation now uses plaingoto(path). - Performance re-verified after the theme pass: harness build +
run-core-benchmarks --db=sqlitegreen (cold start 1,873 ms vs 2,033 ms; REST p95 0.225–0.439 ms against 5 ms budgets), competitive replica run twice in production mode with every workload inside the machine’s run-to-run noise band (two identical runs differed by up to 22 %; the stored baseline CV was 28–58 %). Main CSS bundle moved 307,106 B → 307,743 B (+0.2 %).
3.56 October 2026 — Concurrency, revision recovery, and query validation (2026-10-21)
- Optimistic locking:
PATCHacceptsIf-Match(wire ETag, ISO timestamp, epoch ms, or*) or bodyexpectedVersion. The pre-check fails fast, then the write is a compare-and-set (UPDATE … WHERE _id = ? AND updatedAt = ?); zero matched rows returns409 VERSION_CONFLICTwithdetails.currentVersion. Requests without a token keep the unchanged last-write-wins path, so the legacy write lane pays nothing. - Revision restore:
POST /api/collections/:collection/:entryId/revisions/:version/restorereplays the snapshot through the normal update path — current-schema validation applies, the pre-restore state is snapshotted (the restore is undoable), andIf-Matchprevents clobbering a concurrent edit. Non-revision collections return400 REVISIONS_DISABLED. - Bounded history:
revisionLimit(default 100, minimum 5) prunes older snapshots by version once the history approaches twice the limit. Pruning is a single boundedDELETE, not an id list. - Filter validation: unknown filter keys and unaddressable nested paths now return
400 FILTER_UNKNOWN_FIELDwith the rejected keys indetails.fields, replacing silent empty lists and accidental full scans. The allow-list is cached per schema revision. - Adapter fixes found by the new tests: SQL adapters overwrote a revision’s snapshot with
{}whendatawas passed as a physical column (every stored revision was empty), and JSON blob flattening let a snapshot’s_idoverwrite the version row’s own primary key (pruning deleted nothing). Snapshot tables (content_revisions,content_drafts) now keepdatanested and column values authoritative. - Verification: 7/7 HTTP contract tests on the SQLite harness (locking, conflict envelope, restore, pruning, filter 400); unit suite 699 files / 6 613 tests; component interactions 139 tests; tenant lint and risk audit clean.
3.58 October 2026 — Server-rendered admin first paint, one layout payload, cache warm-up (2026-10-22)
- Config pages render on the server:
/config/automations(plus the newconfig/automations/[id]editor load),webhooks,trash,workflows,sync,system-settings,extensionsanddesign-systemnow return their first payload from+page.server.ts; theonMountfetches are gone and only post-mutation refreshes stay client-side.system-settingsloads the active group values itself (?group=), sogeneric-settings-group.sveltehydrates frominitialValuesinstead of a second/api/settings/allround-trip, and the empty-field badges come fromgroupsNeedingConfig. The new route has its ownAPP_ROUTE_COVERAGErow and load tests (blankneweditor, 404, 403). - Dashboard tiles survive SSR:
dashboard/widget-ssr.tsregisterscpu,disk,memoryandsystem-messagesthroughimport.meta.glob(..., { eager: true });FirstScreenWidgetrenders real markup on the first paint and the IntersectionObserver no-ops for eager tiles. The eager registry is required because Svelte 5 only renders the pending branch of{#await}during SSR, which is what previously left a skeleton on screen. /userseeds its first page: the load returnsinitialUsers(page 1, 10 rows, tenant-scoped, credential-stripped) andinitialSessionsthroughgetRequestLocalCMS();mapActiveSessions()andsanitizeUserTableRow()are shared withuser.remote.ts, so the first paint and the refresh query produce byte-identical rows.- One content-structure payload:
(app)/+layout.server.tsno longer duplicatescontentStructure(and itslayout:contentStructure:*cache); the root layout load’scontentNodesis the single owner andcollectionOrderjoined the existingPromise.all. Collection pages also stopped returning a partialuserkey, which used to shadow the layout snapshot (floatingNavStore.bindUser). - Caches now hit:
getStatusFacets()is SWR-cached (collection:{id}:facets:{tenant}, tagscollection/collection:{id}, 60 s fresh / 300 s stale) and the collection mutation warm-up writes the canonicalbuildFindCacheKey(...)key instead of an orphancollection:{id}:{entryId}entry. - Parallel + prewarmed paths: the media gallery loads folders and media in one
Promise.alland the folder tree seeds fromdata.systemVirtualFoldersbefore touching the cache-busted API; the monitor dashboard awaits its five loaders in onePromise.alland registersdepends("app:monitor")so the 30 sinvalidate()matches a load;predictive-preload.tsonly prewarms the cone/predict/smart strategies, leaving hover and viewport todata-sveltekit-preload-data. - Benchmark history is bounded:
pruneBenchmarkHistory()(scripts/benchmark-matrix/history-retention.ts) keeps the newest 50 rows per series per engine, runsVACUUMonly when rows were dropped, thenwal_checkpoint(TRUNCATE); it never throws into the report path.tests/benchmarks/probes/README.mddocuments the nine probe scripts. - Hygiene:
./config/automations/[id]coverage row,tests/unit/components/dom/render.tsgainedrenderPage()for partial page-data mounts (the layout half is intentionally omitted), andtests/playwright-results.jsonis git-ignored (run artifacts, not source). - Verification:
bun run checkgreen (0 type errors), unit suite 703 files / 6 646 tests, component interactions 146 tests, route-coverage gate green.
3.59 October 2026 — CI repair pass: seams, ETags, revisions, dialogs (2026-10-23)
- Seam mutation drift:
raise()gained adetailsargument inee042b731; the twoAppErrormutants intests/mutation/seam-mutation.test.tsstill searched for the 3-argument throw, so the whitebox job failed on “find string not found” before it ran a single assertion. Mutants retargeted; 9/9 killed. - Point-read ETag was unparseable on Drizzle adapters: the SQL fallback emitted
"<id>-${String(updatedAt)}".String(Date)is RFC-2822, whichnormalizeExpectedVersion()cannot reduce to a timestamp, so everyIf-Matchecho failed closed with409 VERSION_CONFLICTon MariaDB/PostgreSQL while SQLite (ISO strings) passed. NewversionTokenString()renders ISO for every ETag version; covered by three new unit cases. - Revision history was unbounded when the newest snapshot’s
versionwas unreadable:recordRevision()derived the next version fromitems[0].version, so a history read that omitted the field restarted at 1 and never reached the 2× prune threshold (MongoDB kept all 12 snapshots of a limit-5 schema). The counter now falls back tototal + 1and the prune fires when either the version or the row count crosses 2×. - Plugin workspace announced itself as a region: moving the overlay inside the content column dropped the
dialogrole, which broke everygetByRole('dialog', { name: 'Plugin workspace' })assertion. It is a non-modal dialog again (aria-modal="false"). - Page-size select failed AA:
tertiary-500onsurface-200measured 3.47:1. Pagination is chrome, not a status, so it now uses neutral text in both modes. - Media specs described a UI that no longer exists (a
Grid sizebutton group witharia-pressed, and a toolbar JSON-path field). They now assert the real contract: the JSON-path input inside the advanced-search dialog, and the single toggle that cyclesdata-size. - The gate could not see warnings:
bun run typecheckcalledsvelte-check --threshold error, and--threshold warningturned out to widen only the output (still exit 0), so the 10state_referenced_locallywarnings the editor listed were invisible to pre-commit and CI. The ten sites now wrap their one-time seed inuntrack(...)(the codebase’s established “intentional initial value” pattern), andtypecheckends withscripts/check/check-svelte-diagnostics.ts, which parses the machine reporter and fails on warnings as well as errors. - Still open (needs a design decision): the brand ramp itself cannot pass AA as text or as a white-on-fill badge.
--color-primary-500isoklch(76.87% 0.2296 137.58deg)(≈#5fd317); white on it is 1.94:1 and it is 1.58:1 onsurface-200. Onlyprimary-900satisfies both, so the fix is a palette/contract change rather than a class swap — tracked in the roadmap.
3.60 October 2026 — Editorial journey, zero-error trap and browser vitality (2026-10-23)
- Composite entry journey:
tests/e2e/routes/collection-builder/kitchen-sink.spec.tsprovisions a collection withInput/Number/Checkbox/Emailand walks create → API write → list → edit (?edit=<id>) → update → delete, asserting persistence through a cold reload instead of a single synthetic string field. - Zero-error contract:
tests/e2e/helpers/zero-error-guard.tscapturespageerror, non-allowlistedconsole.error, failed same-origin network requests (requestfailed), and same-origin HTTP responses with status $\ge 500$, and fails the test inafterEach. The guard is idempotent per page and its allowlist is limited to favicon/icon-CDN noise,net::ERR_ABORTED,ResizeObserverloops, and expected401/403/404resource loads. - Editorial save and validation hygiene:
header-edit.sveltemaps validation errors to human-readable field labels instead of raw DB keys, auto-activates Tab 0 if an inactive tab is open, and moves DOM focus to the failing element via CSS-escaped selectors; clicking Save on an unchanged edit displaystoast.info('No changes to save')and exits cleanly without bumpingupdatedAtor writing phantom revisions.widget-loader.svelteoptimizes field sync with an $O(1)$ primitive fast-path (zeroJSON.stringifyoverhead during keystrokes in inputs) and cycle-safeWeakSetserialization for complex objects. - Editor boundary journey:
tests/e2e/routes/admin/editor-boundary.spec.ts(renamed fromrbac-journeyso it matches exactly one CI shard) logs in as an editor, asserts the profile surface renders, the admin area is absent, and a direct visit to/config/access-managementfails closed without a runtime crash. - Real-browser vitality:
tests/e2e/browser-vitality.spec.ts(bun run benchmark:browser) measures Navigation Timing, input-fill latency, and SPA heap growth in Chromium — the first browser-side counterpart to the fetch-loop benchmarks. It runs in theAdmin & Catch-AllCI shard. - Widget interaction matrix:
tests/unit/components/dom/widget-inputs-interaction.test.tsmounts theInput/Checkbox/Number/Emailwidgets in jsdom and drives native events, proving two-way state binding andvalidationStoreerror linkage. - Gate wiring:
tests/critical-test-paths.tsandtests/route-test-coverage.tsregister the new journeys;package.jsongainstest:e2e:editorial(smoke + composite + editor boundary) andbenchmark:browser; pre-push expands its browser gate to the composite journey only when widgets, collection display or collection routes change. - Shard partition fixed:
rbac-journey.spec.tsmatched bothRBAC & Enforcement(rbac) andAdmin & Catch-All(routes/admin/), so it ran twice;browser-vitality.spec.tsmatched no group and never ran. The spec was renamed (title included), andbrowser-vitalitywas added toAdmin & Catch-All. - Not a full kitchen sink yet: the composite journey covers four scalar widgets.
RichText,Textarea,Select,Date,Tags,MediaUpload,RelationandRepeaterstill need coverage — tracked in the roadmap.
3.61 October 2026 — External frontend audit: F01–F10 verified and fixed (2026-10-24)
An external review pinned to 4dc1b0f reported ten frontend defects. Each was re-verified against next before changing anything; all ten reproduced.
- F01 media pagination: the loader hardcoded
{ page: 1, pageSize: 100 }and returned onlyitems, dropping the adapter’s total. The grid’s local batching and the table’s client-mode pager could therefore only reveal that slice. The loader now reads?page, returns{ items, page, pageSize, total, hasNextPage }, and the views merge pages (goto(..., { reset: false })for the escape-hatch rule). Cross-page search remains client-side:getByFolderhas nosearchoption on all four adapters, and the UI now disclosesloaded of totalinstead of implying completeness. - F02 migration confirmation had no completion path: the editor never re-submitted with
confirmDeletions, and it decoded the action result withresponse.json()although SvelteKit answers with the devalue codec —driftDetectedwas alwaysundefined, so a blocked migration reported success. Nowdeserializereads the envelope and the returned plan renders in the existing confirm dialog before a one-shot resubmit. - F03/F04 role drafts: the Roles tab kept a second copy of the list, and a successful save never moved the baseline. One canonical draft plus a last-saved snapshot now drive both Reset and the tab. A confirmed leave resumes the cancelled destination through a one-use bypass.
- F05 theme discard: dirty state was a boolean set by the live-preview effect (which also fired on mount). It is now
$derivedfrom a draft-vs-snapshot comparison, and Discard restores both the form and the sharedAdminTheme. - F06 content surfaces: three Builder sections and the dashboard widget frame used raw
Card/manualborder bg- shadow-chrome. They now useAdminCard(novariant/preset) so the--admin-*tokens own surfaces; the dashboard’s.widget-containerwrapper andgenerativedashboard.sveltestill carry manual chrome and are tracked in the roadmap. - F07 bulk delete reported success after errors: each
fetchwas awaited without checking status or the action envelope, then every selected row was removed. Per-file outcomes now decide the toast (partial-failure summary), failed rows stay selected, and only confirmed deletions leave the list. - F08 remote upload residue: a stray
>text node made the button read> Upload URLs, and the URL field was a raw<textarea class="textarea">. Both replaced with the native primitive. - F09 superseded table requests:
fetchDatawrote every response into the shared table. A monotonic request id plusAbortControllernow gates rows, pagination, errors and loading on the latest request and view key. - F10 seeding progress:
role="progressbar"had no accessible name; the visible label is now referenced witharia-labelledby(id from$props.id()). - Found while fixing, not in the audit: (a)
validateRolesaccepted only legacycorePermissionsids, which trail the catalog by 61 entries — saving the Roles tab answered400 Invalid permission: collections:read_draftsfor the built-in Editor role; acceptance is now catalog-or-registry, pinned by the consistency suite. (b)beforeNavigatestarted the global navigation loader butafterNavigatenever ran for a cancelled navigation, so everydisabled={… || isLoading}control stayed inert after “stay on this page”; the loader now starts inonNavigate. - Shards: the partition is now anchored on spec paths (
tests[\\/]e2e[\\/]…). Twelve specs were matching two groups from their describe titles,smoke.spec.tsandlayout-shift.spec.tsmatched none, and the Config group was split in two.tests/unit/ci/e2e-matrix-partition.test.tsfails the fast tier on any spec matching zero or two groups.
3.62 October 2026 — Route-behaviour gate at 99, unfailable assertions banned (2026-10-24)
Why 6 700 green tests missed ten real defects: statement coverage and DOM-visibility assertions do not describe what a route does. Two gates now do.
- Unfailable-assertion lint:
scripts/lint/lint-trivially-true-assertions.ts(bun run lint:trivial-assertions) rejects four assertion shapes that cannot fail: literal tautologies (A || Bwhere one side is a literal), complementary arms (status === 200 || status !== 200),expect([200, 403]).toContain(status)used as a one-of union with no negative case, and assertions swallowed bytry { expect(...) } catch {}. Exemptions require// trivial-assert-ok: <reason>. The first pass rewrote 17 findings across 13 suites (E2E, integration and unit) into conjunctive assertions; 27 self-tests pin the rules. - Route-behaviour coverage:
scripts/check/check-route-behaviour.ts(bun run check:routes) statically maps everytests/**block to the route module or URL it exercises and scores four contracts per route: load shape, failure path, persistence (mutate → re-read), and concurrency. Applicability is per route —persistenceonly for endpoints with a mutation verb or pages withactions,concurrencyonly where requests share mutable state — so a redirect stub is no longer scored 0/4 for writing nothing. The gate runs insidebun run checkwith a floor of 99. - Coverage movement: 65/148 raw cells (43.9 %) to 99/99 applicable cells (100 %). 18 suites were added or extended: Yjs collaboration (401/400, awareness re-read, parallel updates), plugin dispatch (401/403/404/400, failure envelopes, memoized loader, parallel writes), migration import (CSRF/401/403/400/413 and SSE contract, concurrent imports), license status (SWR key and concurrent polls), media upload (RBAC, duplicate persistence, parallel uploads), collection-builder
[action](403/404/500, save → reload re-read, parallel saves), preview handshake and authorize, redirect stubs, language redirect, design-system/config loaders, plus concurrency contracts for prewarm, public theme, dashboard, mediagallery and the builder board. - Real defect caught by the new tests:
/api/plugins/[pluginId]calledhandleApiError(err, { params, request, locals })with nourl, andhandleApiErrorlogsevent.url.pathnamebefore mapping the status. Every guard error (401/403/404/400) surfaced as aTypeErrorand became a 500. The handler now forwards the request URL and the tests pin the real statuses. - Hardening that followed the same audit: Yjs rejects malformed JSON with 400 instead of a 500; migration import refuses an oversized declared
Content-Lengthbefore parsing the multipart body; plugin server modules load through a shared in-flight promise (two concurrent first dispatches import once); the media-gallery virtual-folder SWR entry now carries the tenant scope; a partial/legacy public-theme cache entry is rebuilt instead of served; the collection editor stringifies an adapter object_idbefore it can be posted back. Each has a regression test in the route suite. - Docs:
docs/tests/now describes both gates, the applicability/counting rule (99/148 raw vs 99/99 applicable), the enforced hook policy, the migration-confirmation hydration contract, and the refreshed dashboard counts.
3.63 October 2026 — Theme/UX audit pass (2026-10-24)
Eleven of the twelve findings in the external theme/UX review reproduced (one claim — two <h1>s on the entry route — was wrong). Nine were fixed in this pass; the three that need a design decision or a cross-page refactor are tracked in the roadmap §10.
- Dashboard widget chrome:
.widget-containercarried its own border/background/shadow whilebase-widget.sveltealready renders the token chrome, so flat themes showed a double frame. The wrapper is now layout-only (rounded, focus ring). - Entry editor surface:
fields.svelteusedbg-white … drop-shadow-2xl dark:bg-surface-900; it now uses--admin-bg-card+--admin-border-default. - Media chrome: the grid is wrapped in
AdminCard(matching the table view), and both advanced-search buttons moved from 28×28 to 40×40 px with one label/testid contract. - Appearance tabs: raw
role="tab"buttons now implement the WAI-ARIA tabs model — roving tabindex, Arrow/Home/End,aria-controls, and a labelledrole="tabpanel". Writing the DOM test exposed a real bug: the URL-sync$effectreadactiveTab, so every programmatic tab change re-ran it, observed the still-old URL and reverted the tab. The effect now tracks the last URL value and readsactiveTabthroughuntrack. - Builder create actions: Quick Start
variant="warning"→tertiary; Add Collectionvariant="error"→primary. - Setup current step: the legend used
bg-error-500(error red) for the active step; it is now a neutral token wash + ring. - System settings: one unconfigured state no longer shows a warning badge next to an error alert — the alert is a warning.
- Image editor: control height 36 → 40 px; the hardcoded
rgba(220,38,38,0.94)error pill now usesbg-error-500+shadow-lg. - Verification:
bun run checkgreen (0 errors/0 warnings, shade contract clean); component interactions 28 files / 156 tests (new tabs test). - E2E flake:
confirm-migration.spec.tsread the schema afterreload()with a single click that could land in the SSR-paint → hydration window, so the inspector showed its defaultrequired=false. The inspector now opens throughrunAfterHydration(), and the re-read re-opens it until the hydrated value matches — three consecutive local repeats passed, and the Builder shard’s flake budget is no longer consumed by a retry. - Verification:
bun run checkgreen (including both new gates); unit suite 724 files / 6 810 tests; component interactions 155 tests; the migration-confirmation spec 3/3 repeats on the production preview; CI run 1853 green across DB ×4, Bench ×4 and E2E ×9.
3.64 October 2026 — User edit dialog reactivity, SSR table deduplication, and TokenPicker wiring (2026-10-25)
- User edit & token modals (
modal-edit-form.svelte,modal-edit-token.svelte):- Replaced top-level static destructuring of
page.datawith reactive$derivedreads (roles,user,isFirstUser) and seedededitFormsynchronously insideuntrack(...)with a guaranteed non-emptyuser_id('self'fallback whenuser?._idis absent), preventing silenteditUserSchemaclient-side validation rejections. - Replaced the unconditional
$effectin both modals — which overwrote active user input whenever reactive dependencies ticked — with target-identity keyed guards (seededTargetKey,seededTokenKey). - Wired
close({ success: true })intoModalEditForm,ModalEditToken, andMultibuttonsoDialogManagercloses reliably after save/delete andUserManagementrefreshes its rows.
- Replaced top-level static destructuring of
UserManagementduplicate HTTP fetch elimination (user-management.svelte):- Skipped the redundant mount-time
GET /api/userround-trip wheninitialUsersis already seeded by+page.server.tson the defaultallfacet, cutting an unnecessary network + DB query on every/userpage load. - Switched the filter
$effectdependency from the parent$derivedcurrentUserobject reference to primitivecurrentUserId, eliminating spurious pagination/selection resets on parent re-renders. - Consolidated duplicate token expiration helpers (
convertLegacyExpiresFormat,convertExpiresToHours,convertDateToExpiresFormat) intosrc/routes/(app)/user/user-remote-utils.tsand standardized CSRF headers viaclientJsonHeaders().
- Skipped the redundant mount-time
TokenPickermounted &TokenRegistryentry tokens wired (fields.svelte,token-picker.svelte,engine.ts):- Mounted
<TokenPicker />once in the(app)layout (so widgettokenTargets work too) and wiredopenTokenPicker()with a field-awareonInserthandler that updates both translated (Record<Locale, string>) and untranslated field values incurrentCollectionValueand syncs tocollectionsstore. - Completed
TokenRegistry.getTokens()entry-field registration insrc/services/token/engine.tssoentry._idand all schema fields appear in theentrytoken category.
- Mounted
- Demo isolation invariant:
- Demo mode now implies tenant isolation (
isMultiTenantEnabled()+safe-querytreatDEMOas sufficient), so a visitor on an olderMULTI_TENANT: falseconfig still gets a unique seeded tenant for the 60-minute session instead of sharing the global tree. - Setup writes
MULTI_TENANT: truewhenever demo mode is enabled; demo sign-up reuses thedemo_tenant_idcookie (no invite token) and creates the visitor’s admin inside that seeded tenant.
- Demo mode now implies tenant isolation (
- Entry editor desktop chrome:
- Restored the desktop right sidebar on
?edit/?createroutes: mobile drawer closes andHeaderEdit.cancel()no longer mark the sidebar as a user-touched layout preference, so the inspector is not stuck hidden in later desktop sessions. - The desktop page footer now shows the entry’s created/updated timestamps, their authors, and the revision count when the sidebar is hidden; it renders only for
edit/create/modifyand stays empty in view mode.
- Restored the desktop right sidebar on
- Collection entry editing & table polish:
- Replaced the per-field locale button clone with a compact translation-status badge (green = value present, amber = missing) that updates as the field is typed, and kept the per-field locale cycle/AI translate affordances.
- Aligned every Smart Table surface (
entry-list, media, user management, website tokens, permissions, queue, sync) on the sameAdminCardmargin/height shell and sharedSMART_TABLE_*chrome;SMART_TABLEownsfont-sans,text-sm, andtext-(--admin-text-body)so dark-mode body cells use the body color instead of muted grey. /config/queuenow renders throughSmartTableShelltoo: the shared scroll body, empty state, andPaginationfooter replace the page-local table wrapper and “showing … of …” bar, and the job id keeps its accent (blue/green) mono slug treatment.- Field tooltips trigger on the icon only:
help-icon.svelteis the canonical transparent, round?button, and system-settings field labels are inert text (no label-wide tooltip). The generic field row now shows the white label plus the technical key (e.g.CACHE_TTL_SCHEMA) in accent mono, which is the identifier admins look up inconfig/private.ts. - The same
?trigger replaced the remaining info-glyph tooltip triggers (fields.svelte, widgetform-preview.svelte, SEOseo-field.svelte); the TokenPicker close/back controls are transparent round buttons. /confighub search: a tile filter now sits below “Manage your system configuration”. It matches the localized title, tile key, and description, folds case/punctuation, requires every token (AND), and carries a synonym map so setting-level terms (cache, smtp, 2fa, cron, wordpress, 301) find their page. A live count, an empty state with a Clear action, and Escape-to-clear are included; the filter mirrorsPermissionGuardso the count never promises a hidden tile, and plugin-provided tiles return when the query is cleared.- Automation editor onboarding:
/config/automations/newopens with a collapsible “How automations work” explainer (trigger → operations → test) plus a token hint and an example flow. Each step explains itself: trigger descriptions say when they fire, step 2 shows an empty-operation state and per-operation descriptions, and step 3 warns that a test executes the real operations. The Next button now explains why it is disabled — a name, at least one event or a cron expression, and at least one operation are required (automation-step-guard.ts), so a new user cannot save a trigger that never fires. - Redirect modal guidance: the Add/Edit Redirect form now opens with a “How redirects work” explainer (permanent vs temporary types, regex matching, an example) and a
?tooltip on every field — From path, To path, Type, Status, and Regex — using the icon-onlyHelpIcontrigger. Examples moved into placeholders so labels stay short. The “Is Regex / Pattern” promise is now true at runtime:handle-redirectsresolves exact paths first, then evaluates the tenant’s cached pattern rules (findRegexRedirect: 2048-char path cap, 512-char pattern cap, ≤200 rules per request, invalid stored patterns skipped; saves invalidate the rule cache). - Smart Importer onboarding & CSV support: the wizard now opens with a “How migration works” panel (the five steps, where to get an export per CMS, and the 15 MB browser limit with the exact CLI command), per-step
?tooltips (supported files, target collection, content types, mapping confidence, dry run, import/rollback), and an inline reason when “Next: Map Fields” is disabled. A generic.csv/.tsvupload is now detected ascsv(csv-detect.ts: delimiter sniffing incl. semicolons, quoted headers, German column names, report-title preambles, identity fallback for unknown columns) instead of falling through to “unknown”. Plugin API errors now surface the dispatcher’smessage(413 size limit included) instead of the generic “Format detection failed”. The remove-file close button is a transparent round control — icon buttons now pass Button’sroundedprop, because the inline token radius otherwise overroderounded-full. Detection alone was only half the fix:parseSpreadsheet(parsers/universal.ts) now splits records with the same quote-aware reader (splitDelimitedRows), so quoted cells may contain the delimiter, escaped quotes, and line breaks; it sniffs the delimiter from the widest early row, picks the header as the widest row below any preamble, and keeps unnamed columns as stablecolumn_Nkeys instead of shifting alignment. Rows are taggedtype: "entry"(a sheet’s owntypecolumn wins), because the wizard’s content-type filter readsrawCustomFields.typeand silently dropped every CSV row while detection advertised a syntheticentrytype — a generic CSV now reports no content types at all. Field help triggers are namedHelp: <field>(app-wide convention) so they no longer duplicate the input’s accessible name, which had madegetByLabel(/target collection/i)ambiguous in E2E. - Command palette: token radius, 16px gutters, roomier rows, a transparent round clear/help button (X ↔ ?), and a black highlighted row with white labels + accent-coloured path chip.
- Sidebar identity: the avatar rendered without its name again because shared chrome read
page.data.user, and several(app)page loads return a slimuser({_id, email, role, permissions}) for their own permission gates — SvelteKit merges page data over layout data, so the full snapshot was shadowed on those routes (the collection route already documents this trap).(app)/+layout.server.tsnow also returnslayoutUser, and every chrome consumer that renders identity or audit metadata reads it first: left sidebar, right sidebar,header-edit,settings-menu,floating-nav, the collections tracker, and the token preview. - Tooltip arrow geometry: the callout diamond is now computed once by
useFloatingand consumed byTooltipinstead of being re-measured fromfloating.x/y(which went stale when the tooltip resized and ignored the resolved placement).computeArrowGeometryanchors on the edge facing the reference (rightused the wrong edge before), aims at the reference centre, and clamps against the arrow’s own half-size — pinning to the middle instead of a corner when the body is shorter than the arrow margins. The sidebar toggle now uses a centredright/leftplacement:right-endbottom-aligned the shorter tooltip against the 40px button, which pushed its arrow to the bottom-left corner next to “Collapse Sidebar”. - API Playground help:
/config/apinow carries a?trigger next to every control — target collection, filter conditions, sort field, order, limit, run/response, generated REST URL, GraphQL preview, HTTP method, endpoint, quick presets, request body, GraphQL operation/variables/result, snippet language, and copy-code — with 18 new strings in all 8 locales (JSON-only; no{}in copy, which ICU would read as a placeholder).HelpIcongained atabindexprop (default-1):0makes the?itself the keyboard stop, so focus opens the tooltip andaria-describedbylinks it to the trigger; the migration wizard uses it too. /usermanagement chrome aligned with the shared tables: the tab-row rule now spans the whole header row (it used to end with the tablist, leaving a visible gap under “Invite User”), and the user facets (All / Admins / Users / Active / Blocked) moved from their own row into the toolbar band next to search / views / row actions, so the table no longer sits one row lower than the rest of the admin shell.user-management-layout.test.tspins both. The DOM suite also gained an inert stub for the optional@mongodb-js/zstdpeer, so components whose import graph reaches@utils/error-handlingcan mount./config/queue500 (lifecycle_outside_component): the root layout’sinitIdGenerator()calledsetContextduring an async/concurrent SSR pass where Svelte had no active component context, and the exception escaped as a page-level 500 (first request after a dev restart, logged 2026-10-25). The call now fails soft: with no context it restarts the process-global counter, so that render still counts from-0like the hydrating client andgenerateId()keeps its context-first lookup.tests/unit/routes/layout-id-generator.test.tspins the no-throw + per-render-reset behaviour. The same page also lost its duplicate scrollbar: it now passesfullHeight, so the shell clips andSmartTableShellis the only scroller (sticky header + pinned pagination), and the headers/status/actions use the shared centeredSMART_TABLE_*tokens instead oftext-start!/text-end!+justify-start/justify-endoverrides (queue-table-alignment.test.ts). Queue explainability & hygiene (2026-10-25): the page opens with a “How the queue works” panel (onesvelty_jobstable, 10 s claim loop, which task types are timer-driven vs. real work, 0–5 ms “completed” means “nothing to do”), and clicking a row (or the new eye action) opens a detail dialog with the handler explanation, attempts, created/updated/next-run, tenant, last error and the raw payload. The poller state moved toglobalThis— every HMR-reloadedJobQueueServiceused to install anothersetInterval; 15 leaked pollers produced ~640publish-scheduledrows in 42 minutes instead of ~42. Terminal history is pruned every 6 h (7 days), andsystem.jobs.cleanup()now deletescompletedrows only and honours the request tenant — before, “Clear Completed” deleted pending retries and failed jobs too. Reference: background jobs.
- Entry-list split button matched to the user bulk menu: the action and chevron halves are split by a white divider (
border-s border-white/20), the group ends square (rounded-e-none) instead of reading as a pill, and the menu is black (bg-black/95, ring-white/10) withtext-smlabels andtext-xsshortcuts (wastext-xs/[10px]).entry-list-multi-button-chrome.test.tspins the chrome. - Paraglide
Failed to load url ./de.js(500 on every admin page): the dev plugin wrotesrc/paraglideinlocale-modulesshape whilebun run paraglide/the prod build defaulted tomessage-modules; the CLI’s clean-outdir then deletedmessages/de.jsout from under the running dev module graph. Both writers now pinlocale-modules(paraglideVitePlugin({ outputStructure })+--output-structure locale-modules), andtests/unit/setup/paraglide-output-structure.test.tsfails if either side drifts. Verified by regenerating while dev was live:/loginstayed 200 and the server log recorded zeroFailed to load urlerrors. - Made Collection Builder deletes idempotent: a delete for a node that is already absent (e.g. a manifest-only category) no longer fails the whole save; the engine re-reads once and only fails when a requested path genuinely survives.
- Fixed the global search hotkey on Windows:
Alt+G/Mod+Know match the physicalKeyGcode and are allowed while an input is focused. - Restored theme-aware login chrome (light/dark background, ink, and floating paths) after the forced-white regression.
- Canvas Component Architecture & Visual Page Builder (October 2026):
- 1-Click Starter Blueprints: Shipped curated production page blueprints (
saas-launch,company-profile,product-showcase,faq-hub,lead-generation) insrc/widgets/custom/block-builder/blueprints.tsfor instant full-page composition with zero blank-page friction. - Prompt-to-Layout AI Generator: Natural language layout generator (
generateAiLayout) turning unstructured user prompts into structured, typed block sequences with contextual copy, domain-matching content, and UUID instances. - Conversion Block Presets: Expanded block presets with
pricing(3-tier comparison with features & URLs),stats(metric counters with SLA and growth metrics), andlogo-cloud(partner social proof). - Dual-Mode Canvas Editor: Integrated toggle between fine-grained form input editing and a high-level Visual Wireframe card view, rendering outline representations of layout flow, block reordering, and direct jump-to-edit actions.
- 1-Click Starter Blueprints: Shipped curated production page blueprints (
- Fast-Lane & Direct-to-Wire Stream Pipeline Performance (October 2026):
- Zero-Allocation Smi Hashing for Point Admission: Replaced
Set<string>and string key allocations inpointAdmissionNurserywith positive 31-bit Smi integer hashes (hashKey31) inSet<number>. First-touch unique IDs across cold 100k sweeps bypass${tenant}:${key}string building and object allocations entirely. - Relational Direct-to-Wire Schema Hoisting: WeakMap caching (
_pointSqlCache) hoists column validation (executor.getColumn) and soft-delete/tenant SQL variants across PostgreSQL, SQLite, and MariaDB. Eliminates redundant column lookups and replaces array spread churn ([String(id), ...params]) with direct 1- or 2-element array instantiations. - Publication Filter Fast-Path: Anonymous/unprivileged visitors short-circuit immediately to
"published", bypassing role inspections, array permission lookups, and query string parsing. - Single
byteLengthPass: Reused precomputed body byte lengths across compression negotiation and turbo variant stashing, eliminating duplicate UTF-8 byte sweeps on API miss paths.
- Zero-Allocation Smi Hashing for Point Admission: Replaced
- Sharp Image Engine & Field Encryption CPU/Memory Optimizations (October 2026):
- Zero-Encode Rotation Dimensions in Image Manipulation: Mathematical orthogonal rotation/flip canvas dimension calculation in
manipulateMedia, eliminating intermediate pipeline clone-and-encode passes (~25–50 MB RAM and 100–300 ms CPU per edit). - Vectorized SVG Alpha Mask: Replaced 12-million-iteration nested JavaScript loops and 48 MB raw RGBA buffer allocations during circular image crops with native libvips SVG ellipse compositing. Drops execution time from ~350 ms to ~2 ms.
- Bounded AAD Buffer Cache for Field Encryption: Added 1,024-entry bounded
aadCache: Map<string, Buffer>infield-encryption.ts, turning per-field AAD Buffer allocation into an $O(1)$ zero-allocation lookup on encrypted read/write hot paths.
- Zero-Encode Rotation Dimensions in Image Manipulation: Mathematical orthogonal rotation/flip canvas dimension calculation in
- One tab-strip chrome across the admin (
src/components/ui/tabs/chrome.ts) — the four tab dialects (no rule, 1 px-gap rule, boxed segmented control, underline reference) now render from one token set.TAB_STRIP/TAB_ROWpaint the rule as a 1 px inset shadow instead ofborder-b, because the strip scrolls horizontally (overflow-x-auto+overflow-y-clip) and clipped any-mb-pxoverlap; the inset rule lets the 2 px active underline cover it.TAB_STRIP_FLUSHserves rows whose parent already paints the rule (collectionbuildertab bar, widget editor dialog, /user header), andtabTrigger(active, extra)owns the accent (tertiary light / primary dark) and therounded-none!needed to beatButton’s inline radius.- Migrated the hand-rolled strips onto it:
/usermanagement,/config/extensions(badges),/config/sync(per-tab tooltips),/config/design-system./config/access-managementlost the intro paragraph above the tabs (it moved to the shelldescription), gained a full-bleed strip, and/config/api,/user, upload-media, media details and entry fields inherit the same rule through the primitives. The arrayTabsgainedbordered={false}for rows that own the rule. EntryListMultiButton: the chevron segment is now a blackbg-blacksquare (rounded-none!,text-white!) separated by a solid-whiteborder-s, and the group’s start radius follows--admin-radius-button— previously the inline radius token beatrounded-none, so both halves rendered as one pill and the divider was invisible.
- Migrated the hand-rolled strips onto it:
- Verification: Added
tests/unit/components/dom/user-modal-edit-interaction.test.ts(7 real DOM interaction tests forModalEditFormandModalEditToken), expandedtests/unit/user/user-remote-helpers.test.ts(13 unit tests), and addedTokenPickerinsertion + translation-status coverage intests/unit/components/dom/entry-fields-conditions-interaction.test.tsandtests/unit/components/dom/entry-fields-create-skeleton.test.ts. Added idempotent-delete coverage intests/unit/content/upsert-content-nodes.test.tsand physical-key coverage intests/unit/utils/hotkeys-plus.test.ts.tests/unit/components/dom/system-settings-interaction.test.ts(12 tests) now asserts the tooltip opens from the?icon and stays closed when only the label is hovered. Config search is covered bytests/unit/routes/config-search.test.ts(6 filter-contract tests),tests/unit/components/dom/config-search-interaction.test.ts(real DOM: filter → count → empty state → clear), and an E2E case intests/e2e/routes/config/route-breadth.spec.ts. Automation onboarding is covered bytests/unit/routes/automation-step-guard.test.ts(6 step-gate cases),tests/unit/components/dom/automation-onboarding-interaction.test.ts(real DOM: explainer open → name hint → event hint → manual trigger → step 2 empty state), and the extended golden journey intests/e2e/routes/config/automations.spec.ts. Redirect guidance is covered bytests/unit/components/dom/redirects-form-help-interaction.test.ts(explainer visible, one?trigger per field, label hover stays inert, field description opens from the icon). Regex resolution is covered intests/unit/hooks/redirects.test.ts(pattern fallback, exact path wins, invalid pattern skipped, cache invalidation) andtests/unit/config/redirects-utils.test.ts(match order + bounds). Smart Importer guidance is covered bytests/unit/components/dom/migration-wizard-onboarding-interaction.test.ts(explainer open, CSV detection, round transparent remove button,?triggers), generic CSV detection and record splitting bytests/unit/plugins/csv-detect.test.ts(11 cases), CSV import below a preamble with multi-line quoted cells plus content-type filtering bytests/unit/plugins/smart-importer.test.ts(and an E2E case intests/e2e/routes/config/data-management.spec.ts), and the plugin error envelope bytests/unit/plugins/migration-form-actions.test.ts(7 cases incl. 413). Tooltip arrow geometry is pinned bytests/unit/utils/use-floating-arrow.test.ts(4 cases: edge facing the reference, top/bottom centring, short-body corner regression, sub-arrow-size bodies). Sidebar identity is pinned bytests/unit/components/dom/left-sidebar-username.test.ts(layout snapshot wins over a page-shadowed slimuser). API playground help is pinned bytests/unit/components/dom/api-playground-help-interaction.test.ts(eight builder triggers are tab stops; focusing one opens the tooltip and setsaria-describedby). Tab chrome is pinned bytests/unit/components/dom/tab-chrome.test.ts(4 tests: the inset rule,bordered={false}, square accent triggers, additive layout classes) andtests/unit/components/tab-chrome-contract.test.ts(14 tests: every hand-rolled strip imports the shared tokens and no page re-declares the accent pair or-mb-px); the split button bytests/unit/components/dom/entry-list-multi-button-chrome.test.ts.
3.65 November 2026 — Lean-out waves and the 2026-11-01 retest fixes (2026-11-01)
Client bundle: measured, not extrapolated
| Metric | 2026-11-01 build |
|---|---|
Raw (_app/immutable, JS+CSS) |
7,876,077 B |
| Gzip | 2,380,350 B |
| Brotli (project methodology) | 2,172,098 B |
| JS chunks | 371 |
Root layout node 0.*.js |
18,565 B |
These figures were produced by bun run build on 2026-11-01 and re-measured from the emitted directory (raw = sum of .js + .css; gzip = zlib level 9; Brotli = BROTLI_MODE_TEXT, quality 6, matching scripts/bundle-stats.ts).
Scope of the waves, stated honestly: the committed lean-out + retest work is −148,057 B raw (−1.84 %), −29,621 B gzip and −23,376 B Brotli against the pre-session 29 October build (8,024,134 B raw). Chunk count moved 352 → 371 because components were split out for lazy loading — that is the intended trade, not a regression. The draft/resume editor half added ~34 KB after the first measurement; the 8 October baseline of 16,365,530 B is not a valid comparison point for the waves: most of that reduction landed before 29 October. No single-wave −52.2 % figure is claimed here.
Verified leanness
countries.jsondeleted (src/widgets/custom/address/countries.json, 7,529 lines): the Address widget now resolves names from the 14 KBcountries-core.jsonplus a cachedIntl.DisplayNamesper non-EN/DE locale. No lazy chunk, no per-locale table.json-render-sveltegone: removed frompackage.jsonandbun.lock, and absent from every emitted client.jschunk.scripts/check/check-bundle-size.tsnow fails if the marker returns (BANNED_CLIENT_MARKERS). The generative surface is the native Valibot catalog + recursive snippet renderer (depth ≤16,<svelte:boundary>per element).- Root layout at 18,565 B, under the
MAX_ROOT_LAYOUT_KB = 25gate — the WebMCP client stays lazy. - Lazy dialogs and players:
bulk-field-edit-modal,advanced-filter-modalandrevision-diff-modalload throughmemoizeLazyLoader();hls-video-player.svelteandtranscode-modal.svelteload through{#await import(...)}inside the media details modal. - Media work is parallel and bounded: batch processing runs
min(4, ids.length)workers with ordered result slots, and reference/version existence probes issue their checks withPromise.allinstead of a serial loop. - WeakMap schema plans and per-object caches:
tableSelectionCacheand_isDateColCache(Drizzle helpers),jsonDataPatches(atomic partialdataupdates) and the bound-function cache inproxy-utils.tshold metadata against the schema/object identity, so they cannot leak per tenant or per request. - One lazy-module primitive:
src/utils/lazy-module.ts(lazyModule,memoizeLazyLoader) replaced hand-rolledlet promise | undefinedcaches across the settings, SDK, benchmark and setup paths. A rejected load clears the memo, so a transient import failure retries instead of poisoning the process.
Micro-benchmarks measured during the waves (e.g. the ×305 local figures) are not published here: they were not recorded through the benchmark matrix and are not reproducible from the repository.
Retest fixes shipped in the same tree
- Monitor uptime:
metricsService.getSystemMetrics().uptimeis milliseconds; the page renders it withformatUptimeMs()(29m,1d 2h 3m,< 1m,Just started). The old magnitude guess (> 10_000_000⇒ seconds) rendered a 29-minute process as “20d”. - Trash: SQL soft delete now writes
deletedAt+deletedBy(Mongo already did), so relational rows no longer show “Deleted by: System”. The SSR page andGET /api/trashshare one projection (src/utils/trash-item.ts): title (plain / locale map / JSONdata) →name→ first display string →_id, anddeletedAt/deletedBy→updatedAt/updatedByfor legacy rows. A missing actor renders—; only a literalsystemactor renders “System”. - Rich-text sync loop:
normalize-html.tsremoves only the defaulttext-align: left|startdeclaration and keeps every other declaration, so a plain<p>no longer bounces against TipTap’s serialized HTML (effect_update_depth_exceeded). - Forgot password: the reset form renders only when the server returns a
resetLink, which requires no SMTP andALLOW_PASSWORD_RESET_LINK_IN_RESPONSE=trueoutside production. Otherwise the server’s message is shown — the B1 account-takeover guard is unchanged. - Config tiles:
src/routes/(app)/config/config-tile-permissions.tsmaps every tile to a realPERMISSION_CATALOGid. Editor keeps Design System (config:themeManagement); admin-only tiles gate onsystem:admin. The unregisteredmanage:*/access:*spellings are gone, so an Editor no longer sees an empty grid. - Invite flow: the invite dialog carries its own title/body instead of the shared “Edit Token” copy, and an invite link opens Sign Up directly (
/login?invite_token=…); the chooser is still reachable by navigating to/login. - Media alt text: clicking the empty “Add alt text…” label focuses the input after
tick()(focus previously stayed on<body>), and selects the existing value when there is one. - Setup: the wizard offers SQLite / PostgreSQL / MariaDB / MongoDB / MongoDB Atlas (no separate MySQL type); Test Connection is a read-only probe (
createIfMissing: false,skipModuleInit: true,readOnlyProbe: true) and the explicit Next materializes the DB, writesconfig/private.tsand seeds; the production URL pre-fills from the request origin; the review copy matches the actual redirect (auto sign-in, then the first collection or/login); the consent banner is suppressed on/setup. - Runtime endpoints:
GET /api/webhooks/logsreturns{ success: true, data: [] }for an empty tenant andPOST /api/webhooks/logs/:id/retryre-dispatches a delivery;/email-previewsusesCOEP: credentiallesswithCORP: cross-originfor/SveltyCMS.png; config drift hashes the same{ key, value }projection on both sides (decodePreferenceValue()normalizes SQLite’s text values); the documented cache TTL placeholders are 600/600/300/180/300/86400/60/300 s; the version badge keeps the last good result for 6 h on transient GitHub failures; the Design System palette reads the catalog through/api/marketplace. - RTL:
dir="auto"on collection table cells, media titles/filenames, alt text and captions, so a user-typed value resolves its own direction instead of inheriting the interface direction.
Competitive bet #1 — revisions on by default (first half)
- New collections and setup presets default to
revision: truewithrevisionLimit: 100(Builder bounds 1–1000). Existing collection files are never rewritten implicitly: a collection without the flag stays opt-in until its Builder form is saved, and an explicitrevision: falseis preserved. Configuration/transactional preset tables (tax_rates,shipping_zones,carts,orders) explicitly opt out. - The Collection Builder Define tab now has a Revisions card (toggle + limit input), and the save/generator round-trips both flags — previously editing an existing blueprint silently dropped them.
- The runtime
revisionLimitnow honours any positive integer instead of silently replacing values below 5 with 100. - Tests:
tests/unit/routes/collectionbuilder-action-page-server.test.ts(creation default, explicit opt-out, existing non-flip, toggle persistence/clamp),tests/unit/setup/preset-collections.test.ts(every preset, schema + generated source) andtests/unit/sdk/revision-history-sqlite.test.ts(real SQLite update →content_revisions, restore snapshots the pre-restore version).
Follow-up hardening (same tree)
- Cross-node epoch propagation + L1 fence:
bumpCollectionEpoch()publishes the value on the existing Redis invalidation channel and peers apply it monotonically. Thegenfence now runs on L1 hits as well as L2 refills (l1GenerationMatches), so a peer’s already-admittedresponseCachelist/GraphQL body is dropped and unindexed on the next read instead of being served until eviction/TTL; point-read bodies are never stamped and stay outside the fence. Tests:tests/unit/core/response-cache-read-after-write.test.ts,tests/unit/databases/cache-service-epoch-propagation.test.ts. - Trash API parity:
GET /api/trashnow uses the sametoTrashItem()projection as SSR, and the MongoDB bulk soft-delete path passes{ strict: false }so the audit pair is not stripped from user-collection schemas. - Localization:
bun run check:copyis at 0 offenses (was 46); 302 German values were translated, leaving only product names/technical samples identical to English. - CB1 E2E proof:
tests/e2e/routes/collection-builder/kitchen-sink.spec.tsnow seedsposts, edits it, saves, reloads and asserts persistence. It is statically listed/partitioned; the full E2E shard is CI-only. - Slop scanner: 0 errors / 0 warnings / 0 infos; the three dead exports were removed.
- L1 epoch fence: list/GraphQL
responseCacheL1 hits now checkgenerationMatchesbefore serving, so a peer’s already-admitted body is rejected after a cross-node epoch bump. Point-read hits stay outside the fence; cost is one epoch map lookup per list hit. - node:sqlite bootstrap: the schema column reader/marker now supports
db.prepare(node:sqlite) as well asdb.query(bun:sqlite), and uses a single-quoted pragma literal. An existing SQLite DB now gainscontent_drafts.collectionIdand its index instead of loggingno such columnon every build/boot. - Build time: the 15-minute figure was concurrent-agent load, not steady state. Re-measured full
bun run build= 27–44 s on this Windows host;build:fast(BUILD_SOURCEMAP=false) = 27–44 s, emitting 22 MB instead of 96 MB (source maps are ~4.4× the output tree). - Transitive logger:
@graphql-hive/loggercannot be removed safely —graphql-yoga@6.0.1(latest) imports it hard, and@envelop/graphql-jit@12requires it as a non-optional peer. It stays server-only; no client bundle impact.
Competitive bet #1 — draft/live separation (backend + editor sink)
- Storage:
content_draftsgainedcollectionId(nullable for legacy rows) on SQLite, PostgreSQL, MariaDB and MongoDB, plus the(tenantId, collectionId, authorId, updatedAt)autosave index. The boot renderer derives the column fromsystem-schema-spec.ts(ALTER on existing databases; no backfill), and the Mongo schema + the SQL physical-column allowlist carry the same field. - Adapters:
getLatestForContent,getLatestForCollection,upsertDraftanddeleteForContentexist on the relational module and the Mongo module, all tenant-scoped and author-scoped on reads. A draft for an unsaved entry takes the row’s own UUID ascontentId(never"") and is taggeddata.__draft = { kind: "new" }; legacy rows with a nullcollectionIdremain reachable by entry id.upsertDraftbumpsversionin place and prunes rows outside a 20-version window. Two Mongo bugs were fixed on the way:update()now applies the caller’s field patch instead of wrapping it in{ data }, andpublishMany()writesstatus: "archived"(the previous"publish"was not an enum member). - SDK:
cms.drafts(saveDraft,getDraft,discardDraft,discardDraftsForEntry,promoteDraft) runs the same schema resolution + ownership/access-rule gate ascollections.update(). It keeps the new-entry marker on resume, strips it from entry drafts, and reports another author’s draft id as 404. - Draft Promotion (Shipped 2026-11-02, wired to publish on 2026-11-07):
promoteDraft(collectionId, draftId, options)writes the draft’s staged fields through the normalcollections.create()/update()lane (validation, hooks, required-field publish checks, optimistic locking and thecontent_revisionssnapshot included) and deletes the draft only after the live write succeeds.POST /api/collections/:id/drafts/:draftId?action=promoteexposes it; the collection write handlers also call it automatically when a publish (status: "publish") finds the caller’s draft. Live-write and draft-delete are ordered, not transactional — the SDK write lane is not transaction-aware. - API:
GET|POST|DELETE /api/collections/:collectionId/draftsandGET|DELETE /api/collections/:collectionId/:entryId/draftsreturn the usual{ success, data }envelope; a missing draft isdata: null, an unknown draft or collection is 404. Drafts are never part of the entry list, export or GraphQL lane.draftsis mapped inENDPOINT_PERMISSIONS(read →collections:read, mutation →collections:write). - Tests:
tests/unit/databases/content-drafts-adapter.test.ts(7, real in-memory SQLite),tests/unit/databases/mongo-drafts-parity.test.ts(2),tests/unit/sdk/drafts-namespace-sqlite.test.ts(11, real SQLite + SDK promotion/failure/ownership/revision),tests/unit/api/drafts-routes.test.ts(24, routing/envelope/permission/publish-promotion wiring).bun run test:parity --dockerpasses on SQLite, PostgreSQL, MariaDB and MongoDB.
Performance & Write-Path Optimizations (Shipped 2026-11-02)
- Minimal Write Response Ack Serialization: Direct microsecond string construction (
{"_id":"..."}) usingfastEscapeStringin collection write handlers and the write lane, avoiding generic V8JSON.stringifyoverhead on status-only responses. - Synchronous OpenSSL SHA-256 for Rolling Merkle Ledger: Accelerated Merkle hash tree append time from 21.75 ms to 0.69 ms (31.5× faster) via
crypto.hash("sha256"), keeping tamper-evident audit logging intact without async Promise overhead. - Pre-Compiled Allowed Keys & Fast Concurrency Checks: Zero-allocation ASCII token validation for optimistic locking (
If-Match), memoized collection cache tags, and pre-compiledallowedKeyslookup sets per schema identity. - Zero-Allocation Stream Encoding Buffer: Pooled
TextEncoder.encodeIntobuffer instreaming.tseliminates per-recordUint8Arrayallocations on high-volume JSON and CSV exports. - Commerce Promotion & Condition Engine: Shipped
ConditionPluginevaluatingmin_subtotal,coupon, andline_quantitydiscount rules with full test coverage (tests/unit/commerce/condition-plugin.test.ts). - Server-Side Media Search: Integrated database-backed
getByFolderILIKE/regex search across all relational and MongoDB adapters, enabling immediate search across unfetched pages.
Protected-branch E2E parity and bulk-download root fix
nextandmainshare one E2E rule:.githooks/pre-pushcomputes browser targets from the same diff base (origin/next) and the same changed-path mapping on both branches, so the release bump (package.json+sbom.json) is the only difference. The full serial suite stays on CI (9 shards, isolated databases): one shared local database took ~17 minutes and failed on spec-isolation artefacts (permission sessions, seeded media rows) rather than product regressions.- The mapping now covers media server code:
src/utils/media/,src/services/media/and media API handlers pullfolders-bulk,media-bulk-partial-failure,mediagalleryandshare-link. The bulk-download 500 shipped becausesrc/utils/media/sharing.tsmatched no mapping;folders-bulk.spec.tsalso selected the first gallery row instead of the file it uploaded, and tolerated a500— both fixed. - Bulk download root disagreement fixed:
src/utils/media/sharing.tsresolved archives againstprocess.env.MEDIA_FOLDER || "uploads"while uploads land under the configured folder (resolveConfiguredMediaFolder()→mediaFolder), so every row looked like a traversal and the endpoint returned 500. The archive now uses the canonical resolver, normalizes legacy/files/prefixes, and keeps thesep-based traversal guard. Regression tests:tests/unit/media/sharing.test.ts(4 new: configured-root archive,/files/prefix, traversal block, blocked-count message). - SSE disconnects are warnings:
content-sse.svelte.tsandglobal-settings.svelte.tslog recoverable stream interruptions atwarnlevel; anerrorentry tripped the E2E console guard and overstated a transient network event.
UI & Admin Polish Upgrades (Shipped 2026-11-03)
- Workflow State Machine Editor Stage Overhaul (
/config/workflows): Complete visual upgrade into a modern canvas stage with an SVG dot grid, always-visible transition labels (pill tags with high contrast), drag-from-port transition wire creation (+handle on card hover), pan and zoom controls (Zoom in, Zoom out, Fit, Reset) with middle-click / Alt+drag grabbing canvas navigation, dirty-state save badge, auto-layout engine, and deletion confirmation dialogs for states with existing transition wires. - Background Queue Observability & Usability (
/config/queue):- Interactive multi-column sorting (ascending/descending arrow indicators on
_id,taskType,status,attempts,nextRunAt,createdAt) executed directly at the SQL/relational layer (relational-system.ts). - Added a “Hide Empty Heartbeats” action toggle to filter out routine 0ms no-op maintenance tasks (
publish-scheduledwith{}payload) and isolate user-triggered work and failed jobs. - Aligned page refresh button height with other administrative surfaces, added vertical layout breathing room between details and stats cards, and replaced native browser tooltip attributes with design system
<Tooltip>components. - Formatted stringified JSON payloads in the diagnostic details modal automatically.
- Interactive multi-column sorting (ascending/descending arrow indicators on
- License Management Relocation (
/config/extensions):- Migrated license key management from generic System Settings into the Marketplace & Extensions center.
- Implemented an “Activate License” modal with status indicator badges (
Free Tier,Community,Enterprise Active) and automated feature capability unlock feedback.
- Form & Input Alignment Parity:
- Harmonized
<Select>and<Input>vertical margin (space-y-2) and label line heights (leading-none) across all forms to ensure perfect baseline alignment when rendered side-by-side. - Added password toggle reveal postfix icons with accessible state management.
- Harmonized
- Multi-Tenancy Navigation & Isolation:
- Consolidated
/admin/tenantsinto the canonical(app)administrative layout at/config/tenants, establishing immediate navigation access from the sidebar when multi-tenancy is enabled.
- Consolidated
- Sidebar & Settings Menu Scrolling Hygiene:
- Fixed arbitrary viewport clipping by converting sidebar height to a flex-driven
flex-1 min-h-0container. - Added bottom padding (
pb-6) in the settings drawer so the final item remains comfortably visible above the bottom footer divider.
- Fixed arbitrary viewport clipping by converting sidebar height to a flex-driven
Commerce, Intelligence & SEO Enhancements (Shipped 2026-11-05)
- Real-Time Currency Exchange (FX) Resolver with Caching:
In-memory exchange rate caching with configurable TTL (default 1h), deterministic fallback rates for major global currencies (EUR, USD, GBP, JPY, CHF, CAD, AUD), and zero rounding drift cross-rate conversion via integer minor units (
roundForCurrency). Supports pluggable rate providers (FxRateProvider) for external financial feeds or DB settings. Shipped insrc/services/commerce/fx-resolver.tsand verified bytests/unit/commerce/fx-resolver.test.ts. - Specialized Google Sitemap Variants (Image & News):
Dedicated XML sitemaps conforming to Google search guidelines:
sitemap-images.xml(xmlns:image="http://www.google.com/schemas/sitemap-image/1.1") extracting entry and SEO images, andsitemap-news.xml(xmlns:news="http://www.google.com/schemas/sitemap-news/0.9") filtering publications from the last 48 hours. Both routes are tenant-aware, indexability-guarded, and cached for 5 minutes. Shipped insrc/services/content/seo/sitemap-builder.ts,src/routes/sitemap-images.xml/+server.ts, andsrc/routes/sitemap-news.xml/+server.ts, verified bytests/unit/services/sitemap-builder.test.ts. - Storefront SEO & Schema.org Structured Data:
Automated injection of Schema.org
ProductandOfferstructured data (with price, currency, availability, sku, name, description) on/shop/[slug]routes, plus automatedArticleandWebPagestructured data generation. Hardened against script breakout attacks viaserializeJsonLd()escaping (\u003c,\u2028,\u2029). Shipped insrc/services/content/seo/seo-head.tsandsrc/routes/(site)/shop/[slug]/+page.server.ts, verified bytests/unit/services/seo-head.test.ts. - AI Semantic Index Candidate Reranker:
Enhanced search relevance with lexical alignment and answer relevance re-scoring for top-N candidates (
rerankCandidates,rerankCandidatesSync), keeping baseline vector cosine similarity and keyword scores as stable fallback. Supports pluggable custom LLM scoring. Shipped insrc/services/intelligence/semantic-index.tsand verified intests/unit/services/semantic-reranker.test.ts. - WebMCP Schema & Field Instructions for Autonomous AI Agents:
Natural-language operational guidance at collection and field schema levels (
instructions/agentInstructions), exposed over hostedmcp.sveltycms.comviaget_collections,get_collection_schema, andget_agent_instructions(>2.2M searches/s, zero overhead). Shipped insrc/content/types.ts,src/plugins/webmcp/tools/content.ts, and verified bytests/unit/plugins/webmcp-agent-instructions.test.ts. - Modernized Dependencies:
Updated
@inlang/paraglide-jsto3.1.0andgraphqlto17.1.0with full regression verification across all Paraglide message catalogues and 6 GraphQL test suites.
Design System IA consolidation (2026-11-06)
- Eight tabs → four.
Themes & Catalog→Theme Customizer→Live Preview→My Overrides. The admin default was alreadythemesin code but sat third in the strip, so the landing tab did not match the first tab. It is now first and default; non-admins still land onoverrides. - One home per setting. The old
presets/layout/style/features/advancedtabs are sections of the customizer. Density and card style previously appeared in three tabs each (My Overrides, the layout-preset cards, and their own tab); the preset cards moved next to the two selects that own the value. Marketplace and theme JSON import/export moved into the Themes tab, where installation and activation happen. Legacy?tab=presets|layout|style|features|advancedlinks resolve tocustomizerinstead of falling back to My Overrides. - Help where the questions were. Every customizer and override control that lacked an inline description carries a keyboard-reachable
?(HelpIconinsideTooltip), with the text in oneHELPmap: what each density changes, what flat/bordered/elevated remove, what a shell region is, what “Use current layout” snapshots, and what “lock” means for workspace users. Shells that already render an inline description keep it rather than duplicating it into a tooltip. - Toggle shrunk and neutralised. The default
mdswitch went from 32×56 px with a 24 px ON/OFF thumb to 44×24 px with a 20 px thumb, and the off track is neutral (surface-500/40) instead oferror-500— “off” is not an error. Labels no longer turn brand-green in both states, andlabelSnippetwas added so a?can sit next to a switch label. /userduplication made explicit. The Workspace Appearance panel is now described inline as the same personal preferences as Design System → My Overrides, instead of leaving that relationship inside a tooltip.- Tests:
tests/e2e/routes/config/design-system.spec.tsgains the default-tab and tab-count contract plus a legacy deep-link case;tests/unit/components/dom/design-system-draft-interaction.test.tstracks the merged tab. Docs: Design System & Admin Theme Settings.
Config surface fixes (2026-11-06)
-
The public site starter is opt-in.
isSiteStarterEnabled()now requires an explicittrueandseedSettings()writesfalse; only the Website Starter preset turns it on (website-starter-seed.server.ts). A blank/content/commerce install serves/loginat/instead of the seeded marketing homepage. Existing installs keep their stored value; flip System Settings → SITE_STARTER_ENABLED to change it. -
/email-previewsmoved into(app). It was a top-level route with a hand-rolled<div>shell, so it had no sidebar, no page title and no way back. It now composesAdminPageShell+AdminCard, uses the full content width (fixed template list, preview takes the rest), and is covered by the admin route-breadth E2E. -
The render-side sanitizer cannot 500 on data.
sanitizeHtml()/sanitizeSvgMarkup()acceptunknownand return""for non-strings;localizeSitePage()unwraps a legacy{ en: { title, content } }body via.contentand otherwise falls back to"". This fixed a real 500 on/for the seeded homepage. -
/config/syncis self-explaining. The page used a third tab dialect (hand-rolled boxed strip) and opened with one sentence a new user could not act on. It now uses the sharedTabscomponent (Sync / Data & Backups / Debug), states the database↔config/sync/model up front with thedrush cex→ review →drush cimmapping, explains the drift vocabulary and each safety mode, and separates configuration from content and full database backups. Outer padding dropped fromp-6top-2.
UI audit fixes — RTL, media gallery, primary accents (2026-11-06)
- RTL centring was applied twice. A logical
inset-inline-start: 50%resolves torightunderdir="rtl"while-translate-x-1/2stays physical, so a centred element landed one full width off-centre and composed layers drifted apart (the login splash rendered its white disc, rings and wordmark as separate clusters). Centred layers now use physical insets (left-1/2,inset-0 m-auto) or flex centring: login splash/chooser and its version pill, the logo component, sign-in/up icons, seasonal overlays, toasts, stepper, image-editor overlays, video/SEO dialogs and plugin tooltips. The login lane hover arcs use logical corner radii and back arrows mirror withrtl:scale-x-[-1]. - Media gallery fills the viewport. The grid/table card is a margin-free
flex-1child, the empty injectedmedia_galleryslot no longer reservesspace-yspace, and the breadcrumb/toolbar rows were tightened. The tile thumbnail carries an inset surface ring so its bounds read against the card in light mode. - The variant table explains itself. Its first column is Name (it lists variant keys, not sizes), and the group label falls back to the file MIME when individual renditions carry none — previously a missing rendition
mimeTyperendered the literal fallback Size after the localized dash. - Primary actions use one accent. Create Role, Save Changes, Add SSO provider, Save provider and the empty-state Upload First File now use
variant="primary"; the filled badge in advanced search dropped a redundantdark:text-white.
Media gallery action parity + safety (2026-11-06)
- Empty states now name the reason. The grid and table distinguish a true empty folder (“No media yet”, Upload + Create folder) from a narrowed view (“No assets match these filters”, Reset filters). The old copy told a filtered-out user to drop files.
- OS drops land on the grid. The scroll root accepts file drags (
dragenter/dragover/drop) and reuses the existingexternalUploadevent, so the empty-state promise is true everywhere. A full-stage “Drop files to upload” indicator appears while a file drag is over the grid; internal media drags are excluded throughdndState. - Tiles explain their state.
processingandfailedbadges are derived frommetadata.processingStatus, and a tertiary In use badge marks assets referenced by published content (publishedMediaIds, previously passed to both views but unused). - Selection scales. Shift+click selects the range from the previous anchor in both the grid and the table; the anchor follows checkbox toggles, and Space/Enter toggles the focused row in selection mode. The bulk bar gained a folder picker + Move action that reuses
moveIdsToFolder, so breadcrumb drags, sidebar drops and bulk moves share the same optimistic removal and revalidation. - Table actions match the grid. The row menu gained Copy URL (same absolute-URL logic and toasts as the grid) and now flips above the trigger near the viewport bottom; its horizontal anchor follows the document direction.
- Action tooltips are readable and point at their trigger. The default media tooltip was a 10% surface wash in dark mode with light text, so it disappeared over bright images; it now uses a solid
surface-900panel with white text in both modes. Placement chooses the side with room and the arrow flips with it (border-left/border-rightrendered from the panel side instead of a fixed start border). - Details modal keeps its frame. The media details dialog was sized by the active tab (fit-content up to the cap), so Info/Versions/Usage/Share jumped width and height when switched. At
md+the card now has a fixedmin(88vw, 56rem) × min(85dvh, 42rem)frame and the tab panel scrolls inside it. A missing storage blob renders a “Preview unavailable” state with a jump to Versions → Upload new version instead of a broken-image glyph, and the Share tab’s expiration select and password input share the same control height. - One filter source of truth. The unused legacy
mediagallery/filter.sveltestrip was deleted — the page toolbar owns search/type/status/sort.
Media gallery polish — batch pre-flight, focal quick action, URL state (2026-11-06)
- Batch processor states its scope before running. The panel now receives the selected rows that are images: non-image selections are counted (“N non-image assets will be skipped”), the run button counts images instead of all assets, and an image-less selection disables it with a reason.
batch-processing.spec.tsasserts the POST body carries only the image id. - Focal point is one click from either view. A crosshair action on image tiles and a Set Focal Point item in the table row menu open
focal-quick-modal.svelte; saving PATCHesmetadata.focalPoint, updates the tile’sobject-positionoptimistically and revalidates. Pinned end-to-end (keyboard nudge → save → stored metadata) inmediagallery.spec.ts. - Destructive confirmations name published references. Single and bulk delete confirmations state how many of the selected assets are referenced by published content, using the same
publishedMediaIdsset as the In use badge. - Shareable filter state.
?q=,?type=,?status=,?sort=/?dir=and?jsonPath=seed the page and stay in the URL throughreplaceState(no reload while typing); the six client sort labels map onto the adapter’ssort/dircontract so a shared link is sorted server-side on first paint. - Smaller fits. The drag badge reads
N file(s)instead of+N; the table’s default page size is 25 (was 10, against a continuous grid); the toolbar names the inline path Quick upload and links to the staged Queue for the current folder. - Tile chrome holds at every density. The status chips (
Processing/Failed/In use) moved inside the image box and are centred above the filename instead of sitting at an offset that depended on the metadata-row height (they used to overlap the name). The filename is centred in its gradient strip, and the metadata badges use the small size, never wrap, and drop the MIME label at XS so the size badge fits without overflowing.
Upload queue consistency (2026-11-06)
- One folder for both entry points.
/mediagallery/upload-media?folderId=…resolves the folder in a serverload, shows the target above the tabs and passes it toLocalUpload/RemoteUpload; the route’suploadaction now reads and forwardsfoldertosaveMedia, matching the gallery’s inline?/upload. - Partial outcomes are reported, not hidden. The sequential and resumable upload clients continue past a rejected file and return per-file outcomes. The queue keeps only the failed files (and their previews) for a retry, while the gallery announces “X of Y uploaded” instead of a blanket failure or success.
- Remote import reports counts.
saveRemoteMediaUrlsreturnsprocessed/failed/errors; the remote tab shows the parsed URL count before submit, names up to three failure reasons, and keeps the textarea on a partial import so the failed URLs can be retried. - One upload allowlist.
MEDIA_UPLOAD_ACCEPTis derived from the server’sALLOWED_UPLOAD_MIME, and both the gallery picker and the queue inputs use it — replacing the broaderimage/*,video/*,audio/*,application/pdfand a hand-written list that still offered office documents the server rejects. - One redirect.
LocalUploadno longer navigates itself; the page owns the singlegotoback to the browsed folder. The optimization step also names its progress (“Optimizing 2/5: …”) instead of sitting at 0%.
Media gallery layout gaps (2026-11-06)
- Measured, then removed. At 1280×900 the gallery carried a 16px band between the title row and the breadcrumb strip (
AdminPageShell’spt-4) and a 24px band below the grid card. The bottom band was not the 8pxpb-2alone: Tailwind v4 appliesspace-y-4as amargin-block-endon every non-last child, so the card’s content column kept a 16px bottom margin even though the emptymedia_galleryslot renders nothing. - One opt-in shell mode.
AdminPageShellgainedflushContent, which dropspt-4/pb-2and thespace-yrhythm while keeping thepx-2card inset./mediagallerysets it; the other fivefullHeightroutes (collection builder, extensions, queue, workflows, email previews) keep the previous spacing. The breadcrumb/toolbar bands now sit directly underPageTitleand the card reaches the bottom edge at both 1280×900 and 420×900. - Pinned by
tests/e2e/routes/mediagallery/mediagallery.spec.ts(grid/table, toolbar, bulk and filter flows); the gap fix itself was verified with a temporary Playwright geometry probe at 1280×900 and 420×900 (both bands 0px), then the probe was removed.
Document previews — PDF first page and CSV table (2026-11-06)
- PDF tiles show the first page.
generatePdfThumbnail()now renders with bundled PDFium (WebAssembly,@hyzyla/pdfium/inline) instead of shelling out to ImageMagick/Ghostscript. The library initialises once per process, renders page 1 at ~1190 px wide, flattens to white and writes a JPEG; a malformed or encrypted PDF falls back to the file icon without failing the upload. - CSV/TSV tiles show their first rows.
generateCsvThumbnail()parses up to 10 rows × 6 columns (quotes, escaped quotes, CRLF;,/;/tab detected from the header) and rasterises a spreadsheet-style SVG through the existing sharp instance — no document converter involved. - One ladder, both views. Both previews run through
saveResizedImages(), sothumbnail/sm/md/lgfollow the configuredSIZESand the upload response carries them like any image derivative.mediaThumbnailUrl()(thumbnail-only, never the original document URL) feeds the grid and table tiles, which render documents withobject-containinstead of the generic file icon. - Pre-pipeline rows backfill on re-upload. The dedupe check now also treats a PDF/CSV row with no thumbnails as needing repair, so uploading the same bytes regenerates the preview onto the existing row instead of returning it unchanged.
- Pinned by
tests/unit/media/document-previews.test.ts(real Sharp + PDFium, including a malformed-PDF fallback) and the gallery E2E upload test for.csv+.pdftiles. - Office previews are optional, never fatal.
buildDocumentPreview()now also accepts.docx/.xlsx/.pptx/.odt/.ods/.odp(extension or MIME): the buffer is converted with a headlesssoffice(falling back tolibreoffice) in a throw-away profile directory under a 30 s hard timeout, then page 1 goes through the PDFium path. A host without the binary logs one warning per process and returns no thumbnails — the upload still succeeds and the tile falls back to its icon. - Large documents and videos go through the job queue. A streamed document (≥5 MB) or a video of any size dispatches
process-mediaafter insert ({ fileId, basePath }, tenant-scoped, dynamic import, fire-and-forget), so neither LibreOffice nor ffmpeg sits on the upload response. The handler reuses the same exported helper for documents and now always settlesmetadata.processingStatus(ready, orfailedwithprocessingError) instead of leaving rows onprocessingwhen the optional tool is unavailable.
Media gallery table & tiny-grid ergonomics (2026-11-06)
- Table rows own their dividers.
divide-yon<tbody>painted nothing in the rendered table; each<tr>now carriesborder-b border-surface-500/30withlast:border-0, so every row is separated without a trailing rule. - Row menus stay on screen. The per-row menu re-measures after its portal mounts and caps its height at
calc(100dvh - 1rem), so a row near the bottom flips above the trigger instead of hanging past the fold — and no longer sits over the SIZE cell. - Tiny tiles collapse to one menu. At the 88–120 px
tinygrid size the six-button action rail becomes a single portalledMediaTableRowMenutrigger, and the “drag to a folder” tooltip is disabled (theTooltipprimitive gained adisabledprop) so it cannot cover the thumbnail. - Pinned by
tests/e2e/routes/mediagallery/media-table.spec.ts(previews, SIZE cells, per-row dividers, a viewport-safe bottom-row menu, and PDF/CSV details opened from the row menu) plus the tiny-grid menu test inmediagallery.spec.ts.
Image editor — preview/bake parity (2026-11-06)
- Geometry matches the canvas. The bake now extracts the source crop first, then flips, then rotates — the same order the canvas draws (
translate × scale(flip) × rotate). Because Sharp always flips before rotating, a single flip negates the rotation angle (Fx∘R(θ) = R(−θ)∘Fx) so 90°/free rotation and flip-with-crop produce the same orientation as the preview. Rotated PNG/WebP/AVIF keep transparent corners; JPEG is filled white. - Circle crops stay circular. The alpha mask (true circle,
r = min(w,h)/2) is applied before rotation, and the crop tool no longer dropsshapeon drag/numeric normalize — it used to save as a rectangle every time. - All eleven fine-tune sliders bake. Exposure, highlights, shadows, clarity, vibrance, tint, and sharpness were ignored by the server; they now use the preview’s approximations (multiplicative brightness/saturation factors, contrast contributions, hue rotation, and sharpen/blur for detail). Contrast switched to the CSS-compatible linear transform.
- Entry fields can edit their images. Every image card in the MediaUpload widget has an edit action that opens the editor and writes the manipulated response back into the cached DTO, so the field preview updates without re-saving the entry.
- Editor chrome uses the shared tooltip. The top toolbar (compare, undo/redo, zoom, close, save) and the tool rail replaced native
titleattributes with@components/ui/tooltip.svelte. - Pinned by
tests/unit/services/media-manipulation-parity.test.ts(11 real-Sharp pixel tests: clockwise rotation, rotate-then-flip order, source-space crop, circle alpha, and every formerly ignored slider changing the output) plus the existing image-editor and media-widget E2E specs.
Test-owned config isolation (2026-11-06)
- The purge targets the directory the caller writes.
purgeBenchmarkCollectionArtifacts()derives its root from the active collections directory (getCollectionsPath(), i.e.config/test-collections/**under a harness) instead of the live constant;writePresetCollectionFilespasses the same directory it writes, andassertHarnessCollectionsWritable()fails closed when the two disagree. The regression that motivated it: an E2E setup-wizard run wrote thewebsitepreset toconfig/test-collections/but purged liveconfig/collections/, deleting the developer’spages.ts(thecollection_pagesrows survived without their schema). - Every test-owned path is redirected.
resolveActiveDatabaseDir()sends harness databases toconfig/test-database/;resolveCompiledCollectionsPath()sends all automated harnesses to.compiledCollections/test-collections/**(not just local benchmarks);scripts/runs/run-e2e.tsremoves onlyconfig/test-collections,.compiledCollections/test-collections,config/test-database,config/private.test.tsandtests/e2e/.media, after the server stops and only on a passing suite (KEEP_E2E_ARTIFACTS=1opts out).scripts/runs/integration-harness.tssweeps legacyiso-tenant-*/test-*/tenant-*/contract-*compiled dirs. - Pinned by
tests/unit/setup/preset-collections.test.ts(a live marker file survivesreplaceAll),tests/unit/utils/benchmark-db-purge.test.ts,tests/unit/utils/benchmark-sandbox.test.tsandtests/unit/scripts/integration-harness-cleanup.test.ts; a full E2E run left the livepages.tsSHA-256 unchanged. Rules:AGENTS.md§4; reference: benchmark isolation.
Compiled-schema load classification (2026-11-06)
- Transient is not broken.
loadSchemaNative()returns{ transient: true }forVite module runner has been closed/The server is being restarted; the scanner keeps the compiled artifact, does notutimes()the source, and logs one debug line per path per minute. Before, the same error deletedpages.js, triggered a recompile and repeated (seven warnings per second in a dev terminal), and a request could resolve zero schemas during the window. - The scan walk survives compiler rewrites.
stat()racing the compiler’s atomicpages.jsreplacement now skipsENOENTper entry instead of aborting the whole walk (Walk failed). - The cache warmer respects teardown.
cache-warming-service.tshasdispose()wired toimport.meta.hot.disposeandprocess.once("exit"), and downgrades the closed-runner error todebug. - Pinned by
tests/unit/content/loader-utils.test.ts,tests/unit/content/content-reconcile.test.tsandtests/unit/databases/cache-warming-service.test.ts. Docs: compilation pipeline, troubleshooting.
Redundancy consolidation (2026-11-06)
- One list normalizer.
unwrapList<T>()in@utils/apireplacesunwrapWebhookList(webhooks-api.ts),unwrapArray(workflows-api.ts) andunwrapFlowList(automations-api.ts); pages consume it directly. Pinned bytests/unit/utils/api-unwrap-list.test.ts. - One webhook deliverer. A
webhookautomation operation now callsWebhookService.dispatchDelivery(), which enqueues the existing durablewebhook-deliveryjob instead of an inlinesafeFetch. Retry/backoff, the dead-letter path and/config/webhooks/logs(shown asAutomation: <flow name>) are shared with configured webhooks; the job handler preserves the automation body, method, custom headers, HMAC-SHA-256 signature and HTTPS-only egress. The operation reports success at enqueue time, so a failed HTTP attempt is retryable instead of silently aborting the chain. Pinned bytests/unit/services/webhook-dispatch.test.tsand the webhook case inautomation-service.test.ts. - One auth/tenant gate.
requireAuthenticatedUser()andrequireAdminUser()(401 before 403, returning the user) plusrequireTenant()andresolveRequestTenant()(super-admin?tenantId=override) live insystem-shared.tsand replace the inline checks in webhooks, workflows, automations, system management, settings and AI builder.requireAdmin()keeps its legacy 403-only contract for existing callers. Pinned bytests/unit/routes/system-shared-guards.test.ts. - OpenAPI covers the automation surfaces. 12 paths (webhooks, delivery logs/retry, workflows, automations, flow logs/test) and the
Webhooks & Automationtag were added; the previously unmentioned subsystems now appear in the REST/OpenAPI tab. Pinned bytests/unit/services/api-spec-service.test.ts. - The two event buses stay separate, with the reason written down.
@utils/event-busis the SSE/multi-instance backplane whose*wildcard streams every emission to browser clients; automation payloads can contain entry data, so they remain on the typed automation bus. Documented in the module header and automations > Why two event buses.
Drift gates and the ISO-now migration (2026-11-06)
- All 72 direct ISO-now calls migrated.
new Date().toISOString()outsidesrc/utils/date.tsandlogger.server.tsnow usesnowISODateString(); the two helper files keep their internals (the cache implementation and log-file timestamp slicing). Verified bybun run lint:date-helpers. - The second HMR timer is fixed.
api-key-usage-accumulator.tsnow keeps its pending map and flush timer on oneglobalThisobject withunref(), so a reload cannot strand a batch behind a dead timer. - Four drift gates run in
bun run check:lint:global-timers(AST scope detection; a top-level timer needs aglobalThisguard +.unref()),lint:live-paths(nopaths.collections/DEFAULT_DATABASE_DIRoutside the resolvers),lint:transient-classification(no collection/config delete inside an unclassified catch) andlint:date-helpers(no direct ISO-now). Each has fixture tests undertests/unit/scripts/. - The OpenAPI document is labelled honestly. The spec’s
info.descriptionanddocs/development/openapi-spec.mdxnow state that it is a curated subset (auth, users, system, media, search, tokens, collections, webhooks, workflows, automations); the remaining namespaces stay available and are enforced byENDPOINT_PERMISSIONS. - Locale output is deterministic. The remaining
toLocale*call sites pinen-US(server-side analytics labels/counts, importer recommendations); new UI should still route through@utils/format-datewithsystemLanguage.
Rule enforcement and the namespace inventory (2026-11-06)
- 93 silent catches removed. Every empty
catch {}now logs the error vialogger.debug(or carriescatch-allow:where logging is impossible, e.g. the logger-freev8-shim).lint:silent-catchfails new ones; cleanup.catch(() => {})handlers stay out of scope by design. - The
raise/AppErrorrule is now explicit.raise()is the handler-facing constructor;throw new AppErroris allowed in services/adapters and for enriched errors.lint:rule-budgetsratchets the 706 remaining direct throws per area so new ones fail the gate. - Per-area
anyratchet. 4,516 occurrences recorded across 12 areas; any area that grows failsbun run check. After a cleanup,--updatelowers the budget permanently. - E2E workarounds are visible.
lint:e2e-actionabilityrequiresforce-allow:/wait-allow:reasons outsidetests/e2e/helpers/; the 12 force clicks and 6 fixed waits were triaged with written reasons. Conditional/feature-gated skips remain legitimate. - Complete OpenAPI namespace inventory.
ENDPOINT_PERMISSIONSmoved tosrc/routes/api/[...path]/endpoint-permissions.tsand is now published asx-sveltycms.endpointPermissionswithdocumentedNamespaces/undocumentedNamespaces. All 67 namespaces are accounted for, and the curated path list is labelled as such.
Benchmark harness: L1 flood ceiling (2026-11-06)
- Matrix mode was aborting at
createwith HTTP 429. The competitive replica’s 4k–30k RPS from localhost tripped the synchronous L1 flood token bucket (200 req/s/IP, a DDoS guard). Standalone passed only becauseTEST_MODEbypasses it.handle-rate-limit.tsnow readsRATE_LIMIT_L1_CAPACITY/RATE_LIMIT_L1_REFILL_PER_SEC(production defaults unchanged); the matrix and standalone harness set them to 1,000,000. The adaptive/Redis limiter still runs. Verified:bun scripts/benchmark-matrix/index.ts --tier=competitivepasses (60.8s). Superseded 2026-11-08 (PR #565): the L1 pre-filter was removed entirely onnextbecause the same 200 req/s cap broke legitimate bulk writes; the adaptive/Redis limiter remains. - Benchmark failures now include the response body. The competitive replica’s
createerror carriesHTTP <status>: <body>instead of a bare status, so a future 4xx/5xx is diagnosable from the matrix log.
Media at scale and on-device alt text (2026-11-07)
- The grid is windowed, not merely batched. Above 500 loaded rows
media-grid.sveltemounts only the rows in view plus 3 overscan rows each side, with top/bottom spacers sized so the scroll range is identical to the full list. Geometry (columns, row height, gap) is measured once per layout and re-measured on resize;grid-window.tskeeps the math pure and unit-tested. Below the threshold the existing 60-tile progressive reveal is unchanged, so small folders and the existing E2E batch contract behave exactly as before. Tiles also carrycontent-visibility: autowith a density-specificcontain-intrinsic-size. Shift-range selection ranges over the full result list, not the mounted window. - Server search reaches unfetched rows.
?q=was already pushed togetByFolder({ search })in all four adapters; the client now uses it instead of filtering the fetched slice. The URL update is debounced at 300 ms, a new query deletes?page=(no stale offset), the “x of y” label uses the adapter COUNT, and the duplicate client-side filename filter is gone.tests/e2e/routes/mediagallery/media-pagination.spec.tsnow asserts the stronger property: an asset that lives on page 2 is found by search whiledata-pageis still 1. - Alt text can be generated on-device. The media details modal’s alt editor calls
ai.generateAltText()(LiteRT.js Web Worker with WebGPU → WASM → server Ollama fallback). An empty field is filled directly; authored text opens an inline suggestion panel with Use suggestion / Keep current, and an applied value carries an Undo plus a backend/confidence badge. Failures (including the client’sbackend: "failed"result) surface as a toast and leave the editor usable. Persistence stays on the existing 300 ms debounce →PATCH /api/media/:id. 14 new message keys in all 8 locales. The AI client is imported lazily on first use, so mounting the modal no longer pulls the worker bootstrap into the page chunk. - Two defects surfaced by verification. (1) Importing the AI client statically put
src/utils/egress-guard.ts(node:dns/promises) in the browser graph —typeof windowis runtime-only, so Rolldown kept the branch; the guard now sits behind the compile-timeimport.meta.env.SSRand the client is lazily imported. (2) The IntersectionObserver sentinel was not re-armed after a search reset (IO only reports threshold changes), so the grid stayed at 60 of 70 tiles; arevealEpochre-arm plus a scroll-proximity fallback fixed it, and the media E2E suite is 64/64 green. - Verified 2026-11-07:
bun run test:unit847 files / 8,058 tests ·test:unit:components53 files / 238 tests ·bun run check19/19 gates,tscandsvelte-checkclean. Real-browser layout of the spacers and real GPU/Ollama inference were not exercised locally (jsdom has no layout); the window math and the AI boundary are pinned by unit/DOM tests.
Gates that make the Phase 6 wins non-recurring (2026-11-07)
- The client bundle budget is enforced. The linkmap now gates
clientReachableKB/clientReachableFileswith a 0.5 % tolerance (+4 absolute floor) instead of only reporting them. Baseline 4,212 KB / 454 files ⇒ ceiling 4,234 KB / 458 files; the 2026-11-07 media work lands at 4,229 KB / 456 files, leaving 5 KB / 2 files of headroom — the next client feature needs a deliberate budget decision. Shrinking is always allowed, so the preset split cannot be undone by a future import without a red gate. - The server-only boundary is explicit.
src/services/setup/presets.ts→presets.server.ts: a client import is now a SvelteKit build error and a linkmapclientServerLeak, not a silent bundle regression. Clients keep usingpreset-meta.ts. - Route-manifest validation moved into the ~4 s static tier.
scripts/check/check-route-manifest.tsimportsAPP_ROUTE_COVERAGEand reusesverifyAppRouteCoverage, so a moved/merged test file fails at commit time (29 routes / 68 links, ~200 ms) instead of surfacing in the full suite. - Executed test inventory is ratcheted.
scripts/test/run-unit-suite.tswrites Vitest’s JSON report from the same run;scripts/check/check-test-inventory.tsfloors per-area counts againstscripts/check/baselines/test-inventory-baseline.json. This is the guard against a subset run being reported as the full suite. Baseline:unit847 files / 8,058 tests across 38 areas,components53 files / 238 tests; growth is free, subset runs print an explicit skip. See ADR-testing §13. - The fast tier lost four processes. The five source rules share one tree read and run as a second AST gate, concurrent with the linkmap:
run-fast-checksis 1,961 ms for 19 gates (was 3,933 ms), the AST gate 1,144 ms (was 3,311 ms), andtransient/global-timersgained pre-gates (646→106 ms, 620→127 ms). (Phase 9 of the 2026 linkmap optimization series.)
Leaner client, atomic publish, server-side media filters (2026-11-07)
- Client bundle: 4,229 → 4,202 KB.
settings-groups.tswas split intosettings-groups.meta.ts(12 KB: group ids/labels/field summaries used by the sidebar and settings navigator) andsettings-groups.server.ts(28 KB: the exhaustive catalog, secret schema and evaluation).collection-query-filters.tswas split the same way (3 KB meta / 22 KB server), andboolean-filter.tsleft the client graph with it. The settings load now returns only the active group’s descriptor instead of the catalog (the timezone list alone is ~400 entries). Net −27 KB measured; ~43 KB attributable to the split, offset by the 7 KB media-filter helper added below. - Publish promotion is atomic on SQL.
promoteDraft()wraps the live write, the revision snapshot and the draft delete in onedbAdapter.transaction(), with the handle threaded through the existingoptions.transaction. Cache, outbox, pubsub, workflow and pluginafterSaveeffects run after commit and are dropped on rollback. Tests inject a failure at the draft-delete and at the revision write and assert the live row and revision are rolled back while the draft remains. MongoDB keeps the documented ordered fallback (its CRUD does not carry a session handle; wrapping would look atomic while committing through the default session). - Media filters are server-side. MIME, min/max size and min/max width/height are query predicates in
relational-media.ts(columns for size/MIME; per-dialect JSON extraction for dimensions) andmongodb/media-module.ts, applied before LIMIT and COUNT, so a page-7 match is found from page 1. The modal writes?mime=&minSize=&maxSize=&minWidth=…through the same URL pipeline as?q=(page reset included). Filename, tags, aspect ratio, dates and duplicates stay page-scoped, and the modal labels which is which. A pre-existing Mongo bug was fixed on the way:searchoverwrote the ownership$or, so a non-admin search lost thecreatedBy/globalscope. - Fast tier: 19 gates in 1.96 s (Phase 9 linkmap optimization).
- Verified 2026-11-07: unit 847 files / 8,058 tests, components 53 / 238,
bun run check19/19 with tsc and svelte-check clean, client graph 4,202 KB / 456 files against a 4,251 KB / 460 ceiling.
Deliberately not claimed
- Draft/live separation is partial: the storage, adapters, SDK, API, autosave sink, resume/discard flow and publish promotion are shipped (a publish promotes the author’s staged draft through the normal create/update lane, then removes it). On SQL adapters the live write, the revision snapshot and the draft delete run in one
dbAdapter.transaction(); MongoDB keeps the documented ordered fallback because its CRUD does not carry a session handle. Draft-version rollback remains open. Remaining scope: competitive bet #1. - Trash has no scheduled purge: restore is implemented, an automatic 30-day retention job is not.
3.66 November 2026 — Unbuffered streaming, batched relations, keyset reads (2026-11-07)
- Chunked JSON is no longer buffered by the dispatcher.
+server.tsclassified onlytext/event-streamas streaming, whilestreamingJsonResponse()returnsapplication/jsonwithTransfer-Encoding: chunked; both ETag branches therefore ranawait response.text()and materialised a large list/export in RAM. The newisStreamingResponse()(handlers/streaming.ts) treats SSE or any chunked transfer as unbuffered, so the streaming writer keeps its memory contract.isChunkedExportResponse()remains the independent attachment/NDJSON/CSV signal. Pinned bytests/unit/api/streaming-json-response.test.ts. - GraphQL relation loaders batch per request.
createInverseLoader()returned a newBatchLoaderper resolver call, so every parent row carried its own queue of one — 50 rows produced 50 queries. It is now cached insidecreateLoaders()by a NUL-separated${collection}\u0000${field}key, so sibling rows share one$in.MediaWidget.GraphqlSchemapreferscontext.loaders.mediaLoader(batchedfindByIds) and keeps the direct adapter path as the fallback for older contexts. Pinned bytests/unit/graphql/loader-batching.test.ts. - Streaming reads are keyset-paged where it is provably equivalent.
executeSqlStreamMany()streamed withLIMIT 500 OFFSET n, which makes the database rescan every preceding row (O(N²) over a large collection). With no offset and no sort other than_idascending, it now pages with_id > lastId ORDER BY _id ASC LIMIT 500; every other combination keeps the legacy offset loop unchanged.tests/unit/databases/sql-stream-keyset-sqlite.test.tsruns 1,205 rows on a real in-memory SQLite database across three pages and asserts exactly-once delivery, ascending_idorder, and the non-_id-sort fallback. - SSE flushes only when there is something to flush. Each open stream ran
setInterval(flush, 32)for its whole lifetime (100 idle tabs ≈ 3,125 empty callbacks/s). The batch window is now a singlesetTimeoutscheduled by the first buffered event and cleared on flush/abort; idle connections own only the 30 s keep-alive. Frame bytes, ordering, redaction and tenant filtering are unchanged. Pinned bytests/unit/api/content-sse.test.ts. - Verified 2026-11-07: unit 852 files / 8,103 tests, components 53 / 238,
bun run check19/19 static gates withtscandsvelte-checkclean. The dispatch threat model records the unbuffered-stream control (docs/security/threat-models/api-dispatch.mdx).
3.67 November 2026 — Wave 3: one hash per login, rowid FTS deletes, nine lints in one process (2026-11-07)
- Every failed login now runs exactly one Argon2id verification.
Auth.authenticate()returnednullwithout hashing for an unknown user, a missing password or a blocked account, whileauth.remote.tsadded a dummy hash for every!ar.userresult. A valid account with a wrong password therefore paid two hashes (about 2× latency and memory) and an unknown email paid one — a CWE-208 inversion that made real accounts measurably slower. The dummy verify now runs insideauthenticate()for the no-hash return paths, the catch path hashes once when no verify ran yet, and the caller no longer adds a second hash. Unknown email, missing password, blocked account and wrong password all cost one hash; the lockout423and success paths are unchanged. Pinned bytests/unit/auth/authenticate-hash-count.test.ts(5 cases) and recorded in the auth-session threat model.UV_THREADPOOL_SIZEneeded no change:index.cjsalready applies it before libuv starts, and a runtime assignment is a documented no-op. - FTS5 trigger deletes are rowid probes. The SQLite mirror triggers deleted with
WHERE "_id" = old._id, but_idisUNINDEXEDin FTS5 — every content-node update and delete scanned the whole mirror. The mirror now copies the source table’s implicitrowid(insert/update/backfill) and deletes byrowid = old.rowid, an indexed probe;_idstaysUNINDEXEDonly so search results can read it back. Correction to the audit: theDROP TABLE+ full rebuild is not per boot —bootstrapSystemSchemaskips the DDL pass when the stored fingerprint matches, so it runs once per spec change. Pinned by the FTS mirror test intests/unit/databases/system-schema-sqlite-bootstrap.test.ts(bootstrap → insert/update/delete → mirror equals live rows). - The widget linter actually executes.
lint-widgets.tsguarded itself withprocess.argv[1].endsWith("scripts/lint-widgets.ts"), which is false for the file’s real pathscripts/lint/lint-widgets.ts— the whole naming / three-pillar / a11y / marketplace gate was a silent 0 ms no-op. It now usesimport.meta.main, audits 75 files, and the one real finding (acursor-pointeron a button in the SEO analysis panel) is fixed. Pinned bytests/unit/scripts/lint-widgets.test.ts. - Nine source lints, one process, one tree read.
lint-design,lint-duplicate-testids,scan-anonymous-leaksandlint-rule-budgetswere folded intorun-source-lints;FAST_CHECKSdrops 19 → 15. Coverage is unchanged: the runner reads the inclusive tree once (1,531 files, Paraglide +.d.tsincluded) so the budget ratchet still counts exactly whatreadSourceFiles()counts, then derives the filtered view (1,513 files) for the other eight rules. The four absorbed spawns cost ≈826 ms plus four tree reads; the consolidated gate measures ≈1.6 s (was ≈1.15 s) and the fast tier is 15 gates in 2.0 s. Standalone scripts remain runnable, includinglint-rule-budgets --update. Docs record the new gate count (security-posture.mdx,AGENTS.md§4). - Two audit claims were false and were not changed.
/api/search?mode=semanticis served by the dispatcher (NAMESPACE_CONFIG.search → handleContentRoutes → handleSemanticSearch); there is no ghost 404 to fix. AndUV_THREADPOOL_SIZEis already applied by the boot entry, as documented inserver-hooks.mdxandperformance-architecture.mdx. - Verified 2026-11-07: unit 854 files / 8,117 tests (one pre-existing parallel-SQLite migration-lock flake on the first run; the same file passes alone and the full rerun is green), components 53 / 238,
bun run check15/15 static gates withtscandsvelte-checkclean,lint:docs290 files 0/0.
3.68 November 2026 — One Escape listener, piped video thumbnails, immediate outbox delivery (2026-11-07)
- Tooltips share one Escape listener. Every
Tooltipinstance rendered its own<svelte:window onkeydown>, so an admin table with hundreds of tooltipped controls carried hundreds of idle global listeners. A module-level dispatcher (src/utils/tooltip-escape.ts) now owns at most onekeydownlistener, and a tooltip registers only while open — idle pages register zero handlers.useFloatingwas already lazy (scroll/resize/ResizeObserver attach only while open), so this is the remaining per-instance global cost. Escape semantics are unchanged. Pinned bytests/unit/components/dom/tooltip-escape-dispatcher.test.ts(5 tests). - Video thumbnails skip temp files where the container allows it.
captureVideoThumbnail()wrote the video to a temp file, wrote a temp JPEG, read it back, and deleted both. Non-ISO-BMFF containers (WebM/Matroska/FLV/Ogg) are now piped stdin→stdout with no temp files; ISO-BMFF (MP4/MOV) keeps a seekable temp input but streams the JPEG to stdout, eliminating the output temp and read-back; any pipe failure falls back to the original bounded temp path. The 500 MB cap, 30 s timeout (SIGKILL) and 8 KB stderr cap bound the child. The media-files threat model records the control. Pinned bytests/unit/media/video-thumbnail-pipe.test.ts(11 tests, 1 real-ffmpeg probe skipped where ffmpeg is absent). - Committed outbox events deliver immediately. The buffered write path persisted events after a 25 ms debounce but waited for the next 5 s poll tick. A microtask kick now runs one
processBatch()as soon as a chunk is durably committed; it is suppressed when nothing committed, when a pass is already running (no recursion), and whenDISABLE_OUTBOXis set.jobQueue.dispatch()already kicked its own worker, so the audit’s “15 s across two queues” was not accurate — the 5 s outbox wait was the real lag. Pinned bytests/unit/services/outbox-service.test.ts(21 tests, 4 new). - Two audit items were not changed, with evidence. (1) The SQLite write mutex is already not held for the whole CRUD body:
adapter-core.tslocks at the statement level and multi-statement spans only, with group-commit batching; removing it would breakTransactionModule,atomicIncrementand the batcher, so the audit’s “restrict to DDL” version is unsafe. (2) A 30 sAuth.getUserByIdcache was rejected: the session/authentication LRU already stores the user for authenticated requests, and a 30 s user-row cache would serve stale roles/blocks and a stale password hash to 2FA and re-auth flows.src/plugins/index.tsremains eagerly globbed because it is a synchronous registry consumed by client components (entry list, admin zone, plugin overlay); lazy loading needs an async registry or a metadata split and is a separate feature, not a safe tweak. - Verified 2026-11-07: unit 855 files / 8,133 tests, components 54 files / 243 tests,
bun run check15/15 static gates withtscandsvelte-checkclean.
3.69 November 2026 — Relation warm-up, webhook breaker, wide-table windowing (2026-11-07)
- Declared relations warm the L1 cache after a detail read.
findByIdnow schedules a deferred, capped pass over the row’s declared relation fields when the caller did not requestpopulate. It reusesresolvePopulatedRelationswithattach: false, so the response shape is untouched and the existing L1/L2 probe +$infetch + cache warm still apply. The pass is admin/system-only (unprivileged target reads are policy-clamped and deliberately skip the shared cache), capped at 4 fields / 50 ids, tenant-scoped,unref‘d, and never fails the read. Pinned bytests/unit/sdk/relation-warmup.test.ts(8 tests). - Webhooks have a per-origin circuit breaker. Five consecutive retryable failures (network, 5xx, 429, 408) open an origin for 60 s; queued deliveries fail fast with
RETRYABLE_ERROR: CIRCUIT_OPENand the normal queue backoff applies. Exactly one half-open probe is admitted, its success closes the circuit, its failure reopens it, and a lost probe expires after one window. Other 4xx responses never trip it. State is process-local; retry math andmaxAttemptsare unchanged. Pinned bytests/unit/services/webhook-circuit-breaker.test.ts(16 tests) and documented inbackground-jobs.mdx. - Wide tables window body cells horizontally. At 16+ data columns the table renders only the columns intersecting the viewport (+2 overscan) and collapses each skipped range into one width-preserving
colspancell; the header row stays complete so sort, resize and column semantics are untouched.aria-colindexstays absolute, keyboard Arrow/Home/End reveal the focused column by scrolling, and RTL/SSR/unmeasured layouts stay un-windowed. A 23-column row drops from 23 body cells to 6–8. Pinned bycolumn-window.test.ts(10 pure tests) andentry-list-column-window.test.ts(5 real-DOM tests). - Verified 2026-11-07: unit 858 files / 8,167 tests, components 55 files / 248 tests,
bun run check15/15 static gates withtscandsvelte-checkclean. The SQLite core benchmark (earlier in this wave) is 14/14 within budget: REST list p95 0.352 ms, point read 0.229 ms, search 0.366 ms, L1 hit 0.208 ms; cold start 2.48 s against a 5 s ceiling.
3.70 November 2026 — Plugin client catalog, LRU statements, zero-copy write prep (2026-11-07)
- The browser no longer imports the server plugin barrel.
src/plugins/client.tsis a static catalog of only the 11 plugins that declareui/parts; the five app-shell side-effect imports and the twoavailablePluginsconsumers now use it.src/plugins/index.tsremains the eager-glob server registry, socookie-consentandsitemap(server-only) are out of the client graph. Real client output fell 47,803,004 → 47,785,217 bytes total (JS 7,567,034 → 7,564,397; the old cookie-consent/sitemap chunk is gone). The linkmap source baseline was refreshed (456→465 files) because the analyzer never followedimport.meta.glob; the 11 UI plugin modules were always bundled but invisible to it. A parity test fails if a futureui/partsplugin is missing from the catalog. - SQLite statement caches are true LRUs. Both
_statementCache(1,000) and the driverpreparewrapper (2,000) were plain Maps that stopped admitting entries at the cap — hot statements re-prepared while stale ones stayed resident. Both are nowFastLRU; DDL still clears them. Pinned bysqlite-statement-cache-lru.test.ts(1,001 statements → oldest evicted, hot key survives). - Write prep is zero-allocation for clean documents.
prepareFieldsCore()cloned the whole object beforesanitizeHtml/stripHtmleven though both return the same string reference when there is no<; array fields always ranfilter(). It now clones only when the cleaned value differs and filters only whenvalue.some(item => item == null). Pinned bycontent-write-prep-zero-alloc.test.ts(same object/array reference on a clean payload). - No
createdAtcomposite index was added — the premise was wrong. The default list sort isupdatedAt DESC, _id DESC, notcreatedAt.EXPLAIN QUERY PLANon SQLite: the status-filtered default uses(tenantId, status, updatedAt, _id)and the unfiltered default uses(tenantId, updatedAt, _id), both without a temp B-tree. Other sort columns get the lazy(tenantId, column, _id)index. AcreatedAt-first composite would not serve the default query and would only tax writes. - Cold start was host noise. Two consecutive runs after a fresh
COMPILE_ALL_ADAPTERSbuild measured 1.93 s and 1.90 s, both within the 5 s budget and −7% / −5% versus the historical baseline. The earlier 2.48 s / +26% warning did not reproduce. - Verified 2026-11-07: unit 861 files / 8,183 tests, components 55 files / 248 tests,
bun run check15/15 static gates withtscandsvelte-checkclean; SQLite core benchmark 14/14 on both runs.
3.71 November 2026 — Lazy admin modals (2026-11-07)
- The role editor and translation cockpit are dynamic chunks.
roles.svelteloadsrole-modal.svelteon first open (await importbeforemodalState.trigger), andtranslation-status.sveltewrapstranslation-cockpit.sveltein{#if isCockpitOpen}{#await import(...)}. The build manifest lists both as dynamic entries (13.7 KB cockpit, 5.1 KB role editor), so pages that never open them no longer ship ~18.8 KB of initial JS. Whole-output bytes rose ~5.8 KB from async-chunk wrappers; the initial page is the metric that matters.access-management.spec.tsis 6/6 (the create-role golden journey exercises the dynamic modal), unit 861 / 8,183, components 55 / 248. - Status correction: horizontal column virtualization was already shipped in §3.69 at 16+ data columns (not a remaining item at 50+). The remaining list is now empty: both lazy modals are done.
3.72 November 2026 — Yjs disconnect cleanup, relation L2, transport split (2026-11-07)
- Disconnected collaborators disappear immediately. The
/wsserver tracks each socket’s awareness client IDs on the document;close/errornow callsremoveAwarenessStates()and broadcasts the removal frame to peers, so a cursor no longer lingers for the 5 min idle TTL. A 30 s ping/pong heartbeat terminates half-open sockets on the next missed interval. Verified with realwsclients against a real HTTP server (3 tests), including a paused-TCP case that stops the auto-pong. - Relation rows write through to Redis L2.
populate-resolvernow uses fire-and-forgetcacheService.set: the L1 write still happens synchronously before the first await, the L2 write is buffered in the background, and the resolver never awaits it. A rejected L2 write cannot fail the read. This removes the multi-worker L2 starvation (other nodes previously re-ran the$inquery). Tests: 10 warm-up + 7 policy, including non-await and rejection cases. - Client transport split.
fetchApi,unwrapList,ApiResponse,FetchApiOptionsmoved to@utils/http-client;@utils/apikeeps the collection/draft/revision domain. All 20 pure-transport importers were rewired, and app-wide consumers (collection-store,entry-actions,header-edit) load the domain module dynamically.api.tsstatic client importers fell 22 → 2 (entry-list + collection page); config-route eager bytes fell 2,185,591 → 2,184,961 andapi.tsis absent from every non-collection route. Honest note: total build output grew +8.9 KB (+3.5 KB JS) because splitting the previously merged api+transport chunk adds a second module wrapper and re-factors shared code; the win is graph isolation, not total bytes. - Verified 2026-11-07: unit 863 files / 8,192 tests, components 55 / 248,
bun run check15/15 static gates withtscandsvelte-checkclean. Linkmap budget tightened to 4,150 KB / 464 files; the advisory shared-review count of 30 is recorded as the intentional transport/domain split.
3.73 November 2026 — Settings snapshot, in-memory provisioning, site E2E repair (2026-11-08)
getPublicSettingSyncnever reads an empty cache after an invalidation.invalidateCache()deleted the tenant entry, so the next synchronous read returnedundefinedfor every key until an unrelated async load ran — the website-starter seed wroteSITE_STARTER_ENABLED: true, invalidated, and the guest request still redirected to/login. Invalidation now marks snapshots stale (sync readers keep the last-known value; the next async load refreshes),setPublicSetting/setPrivateSettingwrite through to the snapshot, and the testing reset uses the newclearCache()hard clear so rows removed by a DB wipe cannot survive in memory. Pinned bysettings-service.test.ts(3 tests).- An in-memory SQLite adapter provisions its own schema.
provision()wrapped bootstrap in the process-wide.migration.lockfile and ignored the return value, so a Vitest worker that lost the lock marked itself provisioned and later failed withno such table: content_drafts. A:memory:database is private to its process, so it now bootstraps unconditionally; on-disk databases keep the lock. Pinned byin-memory-provision-lock.test.ts(lock mocked to report “held”). - Guest storefront specs seed the DB they assert in. A file-level
test.use({ extraHTTPHeaders })replaces the project headers, socommerce-goldenseeded one worker database and read another; it now spreadsTEST_API_HEADERS. Both public(site)specs also seedseed-website-starter(idempotent) because/shopand/cartare public only whileSITE_STARTER_ENABLEDis on. All 5 site E2E tests pass (Site Starter3,Guest commerce golden journey2). - CI names the failing unit test. The
Annotate unit failurestep preferred the unhandled-error block and otherwise tailed the log, which reported only1 failed; it now extracts theFailed Testsblock first, so the file, test and assertion land on the run page. - Threat models re-reviewed:
api-dispatch.mdxandsystem-ops.mdxgained explicit control rows for the test-reset cache clear and the settings-snapshot semantics. - Verified 2026-11-08:
bun run check15/15 static gates withtscandsvelte-checkclean, unit 862 files / 8,185 tests, components 55 / 248,lint:tenant --full(1,085 files),lint:docs290 files 0/0, site E2E 5/5.
3.74 November 2026 — Content tenant parity, worker-scoped cache, sandbox-safe previews (2026-11-08)
- Editor point reads see the rows the list returns. Content rows are stored under the canonical
"global"tenant when tenancy is off, while the adapter mapstenantId: nulltoIS NULL(correct for auth/settings rows). The SDKfindByIdand the collection read lane now treat a null request tenant as unscoped (no tenant filter) before querying — the scope that matches content rows stored as"global"(SQL) ornull(Mongo) while system tables keep theIS NULLscope — so opening an entry no longer logs[Edit] Could not load entry …: Entry not foundand the Live Preview tab renders. Pinned bysite-starter.spec.ts(admin → Live Preview) andread-lane-allocation.test.ts. - Response bodies are worker-namespaced in E2E. L1 keys append the worker index and worker-scoped requests skip shared L2, so a Playwright worker restarted after a failure cannot be served a body cached for another worker/database. Pinned by
response-cache-worker-isolation.test.ts(2 tests). - Email previews survive an opaque-origin
srcdociframe. Root-relative URLs are expanded to the request origin (Chromium reportsnet::ERR_INVALID_ARGUMENTfor them inside a sandboxedsrcdoc) and scripts/inline handlers are stripped, so the browser cannot log a blocked-script console error that the zero-error guard would fail on. - Threat models re-reviewed:
content-write.mdxandsystem-ops.mdxgained control rows for tenant-scope parity and the worker cache namespace. - Verified 2026-11-08:
bun run check15/15 withtscandsvelte-checkclean, unit 865 files / 8,196 tests, components 55 / 248, site + email E2E 6/6.
3.75 November 2026 — CRUD Pipeline Consolidation & Zero-Allocation Fast Paths (2026-11-08)
Consolidated the database CRUD access layers across all four production engines (SQLite, PostgreSQL, MariaDB, MongoDB), eliminated architectural duplication, centralized HTTP write handling, and added pre-compiled execution plans:
- Hoisted SQL Adapter Core (
SqlAdapterCore): CentralizedgetTable()resolution withtableRegistrycaching, system table alias normalization, identifier allow-lists (assertSafeSqlIdentifier), composite identifier length guards, and dynamic materialized column injection. HoistedrawFindById()point-reads intoSqlAdapterCorewith aWeakMap-backed statement cache (_rawFindByIdSqlCache) storing 4 pre-compiled templates (withData,withoutData,withDataTenant,withDataNull), and unified cache eviction viaclearStatementCaches(). - Deleted
CollectionService(−701 LOC) & Unified SSR List Loading: Fully removedsrc/services/core/collection-service.ts(-701 LOC) and unified SSR table queries, pagination, search, and status facets underCollectionsNamespace.find(LocalCMS.collections.find). Streamlined+page.server.tsto call the Local SDK directly. - Centralized HTTP Write Bridge (
http-bridge.ts): Extracted HTTP write ingestion helpers tosrc/services/sdk/namespaces/collections/http-bridge.ts, standardizing write payload unwrapping (unwrapWritePayload), publish draft promotion (promoteStagedDraft), optimistic locking via headers/body/query (extractExpectedVersion), and RFC 7240 minimal return acknowledgments (minimalWriteAck,Prefer: return=minimal). - Pre-Compiled Execution Plans (
execution-plan.ts): BuiltWeakMap-backed pre-compiled execution plans (getCollectionExecutionPlan) analyzing declared widgets, encryption flags, workflows, relations, guards, and hooks. Collections markedisPlain(>80% of collections) bypass the entire widget transformation pipeline, encryption context checks, and workflow hooks for a zero-allocation fast path. - MongoDB Native Fast-Path Bypass (
MongoCrudMethods.findOne): Bypasses Mongoose Query AST construction infindOnewhen nativemodel.collection.findOneis available, projecting physical fields and normalizing BSON ObjectIds directly to UUID strings. - Benchmark Throughput & Performance Gains:
- Point Read (
findById): +233% throughput (4,874 → 16,236 RPS, 0.07 ms avg). - Point Update (
update): +105% throughput (3,289 → 6,745 RPS, 0.51 ms avg). - GraphQL Yoga Resolver: +119% throughput (2,917 → 6,389 RPS).
- HTTP Seed Burst: 12,406 docs/s (500 docs in 40 ms).
- Point Read (
- Verified 2026-11-08:
bun run checkclean,bun run test:unitpassing,bun run lint:docs0 errors.
3.76 November 2026 — Audit-chain tail checkpoints & MariaDB hash parity (2026-11-11)
- Truncation is now detectable. A hash chain cannot see its own end: deleting the newest entries leaves a prefix that re-hashes perfectly. Each flush now writes a per-tenant checkpoint (head hash + chained-entry count) to
systemPreferences— outsideaudit_logs, so it survives a table truncation — andverifyChain()reportscheckpoint.matched: falseplus aTail truncateddetail when fewer entries exist than recorded. Once per flush, never per entry (no write-path cost). Residual gap, documented in the module: an actor who deletes the tail and the checkpoint row is still invisible; that needs a store outside the CMS database. - MariaDB chains verify again.
audit_logs.timestampwasDATETIME(precision 0), so MariaDB dropped the milliseconds the writer had hashed and every row failed its ownchainHash— the whole trail read as tampered. The column is nowDATETIME(3), matchingcreatedAt/updatedAt. Rows written before the fix still verify through a second-precision tolerance, reported aslegacySecondPrecisionEntries. - Chain reads are deterministic.
nowISODateString()is cached per millisecond, so a write burst shares one timestamp and a timestamp-onlyORDER BYmay return an earlier entry of that millisecond as the chain head. Both the head read and the verification walk now break ties on_id(UUIDv7 = write order). - Verified on all four adapters: new
tests/integration/databases/audit-chain-integrity.test.ts(7 tests: GENESIS/linkage, same-millisecond burst, modified entry, deleted middle entry, independent tenant chains, checkpoint written, truncated tail) passes on SQLite, PostgreSQL, MariaDB and MongoDB.bun run test:unit893 files / 8,368 tests green. - Concurrent writers can no longer fork the chain. Every row carries
chainScope(tenantId ?? "__global__") and a unique(chainScope, previousHash)index rejects a second child of the same head — including the NULL-tenant global chain, which a plain composite index would leave unconstrained. On rejection the flush re-reads the winning head, re-stamps and re-chains the batch, and retries up to three times, so the entry is kept instead of lost. MariaDB rendered indexes only inline inCREATE TABLE, so the DDL pass now also emits idempotent standaloneCREATE … INDEX IF NOT EXISTSstatements and existing tables gain the constraint on upgrade. MongoDB has no spec-driven index path for schemaless system collections, so the adapter creates the same index on connect (ensureAuditChainForkGuard) as apartialFilterExpressionindex — a unique compound index treats a missing field as NULL, so pre-chainScoperows would otherwise collide and the index would never build. All four adapters are covered. Truncation is signalled by the checkpoint head hash rather than its entry count: the count is a per-writer lower bound (every process adds its own flush), so deriving “found < expected” from it raised false alarms on MongoDB. Coverage:tests/integration/databases/audit-chain-fork-guard.test.ts(3 guards/re-chain tests on SQLite, PostgreSQL and MariaDB).
3.77 November 2026 — Scoped OP-initiated logout, SAML SLO, SCIM deprovisioning (2026-11-11)
- Front- and back-channel logout terminate only the session they name. Both OIDC paths previously matched on the provider (front) or provider registration (back), so a logout for one user signed out everyone on that provider. The id token’s
sid/subare now stored on the session at login (oidcSid,oidcSubject), front-channel matches the OPsid, back-channel narrows bysidthensub, and a message that matches no local session terminates nothing. All paths delete the session row throughterminateSessionAndMetadata(), not just the metadata. Pinned bytests/unit/auth/sso-logout-scoping.test.tsandtests/unit/auth/sso-logout-revocation.test.ts. The lookup is now distributed:sid/sub/NameIDare indexed at login into the shared cache and every logout path merges that index with the local map (tests/unit/auth/sso-distributed-logout.test.ts). Residual: a single-session logout publishes no revocation marker, so a peer’s warm session cache entry survives until it revalidates. - SAML IdP-initiated login and Single Logout. Unsolicited ACS responses are accepted only when
SAML_ALLOW_IDP_INITIATEDis on (default off, and a response carryingInResponseTois never treated as unsolicited); SLO handles IdP-initiated LogoutRequest over both bindings and the LogoutResponse for our own SP-initiated logout, destroying the session byNameID/SessionIndex. Pinned bytests/unit/auth/saml-slo.test.ts.findSamlSessions()now resolves candidates through the shared index (see above), so a LogoutRequest handled by another node still finds the session. Residual: a signed LogoutResponse requiresSAML_SP_PRIVATE_KEY, andat_hashis still not validated. - SCIM
active:falsenow locks the account. PATCH, PUT and POST set bothisActiveandblocked(the field authentication enforces), and non-boolean values are rejected with 400 instead of coerced. Pinned bytests/unit/api/scim-deprovisioning.test.tsandtests/unit/api/scim-put-endpoint.test.ts. Residual: no session row is deleted and no audit record is written.
3.78 November 2026 — Import publication gate in the worker, operator-resolved actors, distributed revocation reads (2026-11-11)
- The background import worker gates publishing rows before any write.
importDataHandlernow accepts the plan’s pre-resolvedoperations, groups them per collection and runs each chunk through the existingbulkImportCollectionDocuments; both lanes callassertJobPublishAllowed()(src/services/background/jobs/import-jobs.ts:244-286) before writing — including before replace mode’sdeleteMany— and re-check every publish transition withworkflowService.assertPublishAllowed(:277), because a job can be replayed after the workflow changed. A gate that cannot resolvepayload.userIdfails closed withPERMANENT_FAILURE(:258-271). The content-package dispatch no longer carriesduplicateStrategy: the plan already resolved create/update/skip/conflict (content-package-service.ts:885-894). Pinned bytests/unit/services/import-worker-workflow-gate.test.ts(9 tests, including the replace-wipe ordering and the content-package round trip). - Imports act as the operator, never the
"system"sentinel.content-sync-service.tspasses the operator id persisted in the job payload toplanImport/applyImport(:692-751) and surfaces a gate block as an explicit job error naming the channel instead of a green job that wrote nothing. The SDK resolvesparams.userId→options.userId→options.user._id(data-operations.ts:76-85) and omits the actor when none exists rather than substituting the sentinel. Pinned bytests/unit/services/import-actor-resolution.test.ts(9 tests). - Distributed revocation is now read, not only published. Warm session snapshots and the in-memory/Redis session stores compare the session’s issued-at against the user, tenant and global markers through
getDistributedRevocationEpoch()(revocation-publish.server.ts:149-179, one memoized read per scope per 5 s), after the synchronous local epoch check (handle-authentication.ts:305-321, call:586-592;session-manager.ts:53-64,:94-97,:117-120,:283-289,:321-327). Pinned bytests/unit/auth/revocation-read-path.test.ts(8 tests) andtests/unit/auth/revocation-distributed.test.ts(6 tests). - Still open.
publishTenantRevocation()/publishGlobalRevocation()have no production caller, so nothing currently publishes a tenant/global marker; the hook’ssession:<tenant>:<id>snapshot branch (handle-authentication.ts:652-671) and the store branches do not read the distributed user marker; the memo admits up to 5 s of staleness;ImporterNamespacedispatchesimport-datawithout auserId(misc-namespaces.ts:244-259), so a publishing import through it fails closed;src/services/core/backup-service.ts:721-732/:1470-1481still dispatches the pre-existingbackupTaskshape that does not matchImportJobPayload; the worker counts planconflictoperations as skipped instead of honouring the plan’s"fail"strategy (import-jobs.ts:322-326; the synchronous lane halts,content-package-service.ts:914-922). - Counts, 2026-11-11: the five cited suites were run in isolation (9 + 9 + 8 + 6 + 9 = 41 tests green on the default Vitest unit config). No full
bun run test:unit, build or E2E run was performed for this entry.
3.79 November 2026 — Four new drift gates, two re-registered checks, and two browser-proven editor contracts (2026-11-13)
- Locale formatting is gated.
scripts/lint/lint-locale-format.tsbanstoLocaleDateString,toLocaleTimeStringand the overloadedtoLocaleStringoutside the formatter implementations (src/utils/format-date.ts,src/utils/date.ts); those methods resolve the locale from the runtime, so server render and hydration can disagree. The 2026-11-13 UI audit found nine call sites (one date, eight number formats) outside the helpers. A reviewed exception carries// lint-locale-format: allow <reason>. This closes the §7 “Date-display drift” roadmap item. - A referenced color must be able to exist.
scripts/lint/lint-css-tokens.tsrequires@theme staticfor any block that declares a--color-*ramp (Tailwind v4 only emits theme variables a generated utility references, sovar()-only shades silently vanish; the audit found eight transparent categories) and fails on a literalvar(--color-…)that neithersrc/app.cssnorsrc/utilities.cssdeclares and the same file does not define. - Click-away handlers must prove containment.
scripts/lint/lint-click-away.tsrequires adocument.addEventListener("click", …)in a.sveltefile to callclosest()/contains()in its handler and forbids building the ignore-list fromdata-testid— a testid deny-list is always one trigger short, which is how the dashboard’s empty-state button opened its menu and closed it in the same click.src/components/ui/popover.svelteis the allowlisted shared primitive; a reviewed exception carries// lint-click-away: allow <reason>. - The copy scanner is a ratchet.
scripts/check/check-hardcoded-copy.ts --checkcomparespath::snippetfingerprints againstscripts/check/hardcoded-copy-baseline.json(199 entries recorded 2026-11-13): a new unlocalized string fails, a baseline entry the scan no longer produces is reported stale, and--updatere-records. npm scripts:check:copy(advisory report) andcheck:copy:ratchet(the gate). - Two orphaned checks joined the fast suite.
check-route-efficiency(directdbAdapter.*access in route loaders/actions, and four-or-more sequential awaits;--checkfails only on acriticalviolation, and both current rules emitadvisory) andcheck-translations(a key missing from a non-reference catalog is an error; extra keys and empty values warn) are declared inscripts/check/rule-registry.ts. That registry is the single owner of the suite, now 18 entries; before this change the two scripts ran only when invoked by hand. - Thirteen source rules share one tree read.
scripts/check/run-source-lints.tsrunsdate-helpers,locale-format,css-tokens,click-away,silent-catch,live-paths,transient-classification,global-timers,duplicate-testids,remote-transport,anonymous-leaks,designandrule-budgetsover one workspace read, emitting a single violation list with per-rule prefixes. - AUD-001 is a browser contract, not only a lint.
tests/e2e/routes/dashboard/dashboard.spec.tsproves every add-widget trigger opens a menu that survives the click, because the empty-state trigger shares the surface with the toolbar trigger. The static scanner rejects the defect shape; the spec proves the behaviour in a real browser. - AUD-002/016 — dirty state follows real edits.
src/stores/collection-store.svelte.tsdefineshasChangesas “the value differs and the user has interacted”: widgets normalise missing values on mount, so a freshly opened entry used to report “Unsaved changes”.markInteracted()is raised by the nativeinput/changecapture listener insrc/components/collection-display/fields.svelte, andstableSnapshot()sorts object keys so key order alone is not a change.tests/e2e/routes/collection-builder/kitchen-sink.spec.tsasserts clean-on-open, dirty-after-typing and a confirm dialog before closing. - Docs:
docs/tests/testing-scripts.mdx(source-lint rule table, the 18-entry registry, the new linters and the copy ratchet),docs/contributing/validation-pipeline.mdx(gate count, one-read grouping),docs/tests/test-to-docs-map.mdx(new suite rows and the AUD contracts) andAGENTS.md§4 (the drift-gate list).