Upgrade assetpack-core to 0.4.2 (default-features = false, file-transform),
assetpack-transform-precomp2 to 0.4.4 (precomp2 0.3.4), brotli to 9, and
zstd to 0.14, and drop the direct lzma-rust2 dependency.
Refactor AssetpackBlobStorage onto sqlx SqlitePool, FileTransformConfig::fast,
FileReader, and TransformDecoderRegistry with zero-clone chunk reads, separate
read/write/transform semaphores, manifest-only promote_object, and Unix-second
object/cache timestamps. Add config.precomp2 (default true), reject precomp2 on
fs configs in both validation and startup parsing, document v0.27.5 coexistence
in docs/rollout-coexistence.md, and cover real 0.1.0 interop, PCF2 segment
bombs, and 16000x16000 PNG regressions.
Add the server foundation contracts for SQL execution order, outbound SSRF
protection, deployment and role route isolation, and client version control:
- Add the ordered SQL manifest (`packages/backend/server-db/sql-manifest.json`)
and check manifest coverage and SHA-256 digests in `check-l0-tier-a.mjs`.
- Add `server_domain::safe_fetch` with pinned DNS resolution, per-origin
private network allowlist, redirect header filtering, cross-origin body
replay blocking, and legacy error envelope mapping.
- Add `RouteMountMatrix` across `(DeploymentMode, dev_mode, ServerRole)` with
modular REST and GraphQL route wiring and `ServerExtension` isolation.
- Enforce `client.versionControl` with cached `AppConfigService` snapshots,
anonymous fast-path short-circuiting, npm semver range parsing, named guard
coverage on public auth endpoints, and read-only cookie session resolution
with TTR refresh.
Refactor document compaction and search projection to remove cross-workspace lock contention and hold zero locks during CRDT merges.
Document compaction and user deletion changes:
- Replace single-transaction compaction with lock-free reads, owned-permit blocking CRDT merges, and short strict-CAS write transactions.
- Retry compaction on snapshot or update CAS mismatches and PostgreSQL 40P01 deadlocks.
- Replace full-table pending update grouping with a rotating primary-key loose index scan and per-batch quota cache.
- Delete owned personal workspaces in individual short transactions with post-lock Team verification and partial cleanup returns.
Connection, rate-limit, and test harness changes:
- Set default statement and idle transaction timeouts on dedicated PostgreSQL session connections.
- Run deferred invite rate-limit effects only after rejected invite transactions roll back cleanly.
- Pass prebound SMTP sinks in parity-harness replay tests to eliminate ephemeral port races.
Search projection v6 and pure-Rust runtime changes:
- Add search_projection_v6.sql with per-workspace advisory locks, post-lock mode re-checks, and a 30s pre-expiry dual-lock bridge.
- Skip steady-state workspace_states updates during ordinary document snapshot writes to remove hot-row contention.
- Validate forward-compatible contiguous prefixes in native_schema_migrations during rolling upgrades.
- Add pure-Rust server-search (disabled by default) with committed marker-XID fences, deferred GC progress retention, repeatable-read ACL snapshots, and GraphQL resolvers.