Commit Graph
4 Commits
Author SHA1 Message Date
DarkSky af0d124d5d feat(server): add lockless compaction CAS, search projection v6, and server-search
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.
2026-11-24 23:36:03 +09:00
DarkSky ae1bd232db feat(server): add public API parity and cloud E2E cutover for affine-server
Add public-repo API parity to `affine-server` and run the core cloud
Playwright suite against the Rust all-in-one server.

- Add HS256 Bearer access tokens, native session exchange, refresh,
  revoke, and list REST endpoints, login preflight, profile updates,
  WebP avatar transcoding and safe removal, and a distributed-locked
  expired-session cleanup worker with background lease renewal.

- Unify workspace and per-document ACL evaluation (`acl.rs`), split
  REST and GraphQL modules, and add workspace member management,
  ownership transfer with readonly and quota invalidation guards, atomic
  invite links, `createWorkspace(init)` transactional root snapshots,
  `DocType`, `DocPermissions`, `createBlobUpload`, `calendarProviders`,
  and SocketIO realtime workspace access and config rooms.

- Extract reachable blob keys with `y-octo` bounded BFS under
  `REPEATABLE READ` snapshots with pre-merge budgets and bounded caching,
  check per-doc ACL and reserved doc isolation on source-scoped blob
  routes, paginate `readable-blob-manifest/v1` with SQL cursor pushdown,
  and reject legacy blob reads with `403 UNSUPPORTED_CLIENT_VERSION`.

- Keep fresh DB bootstrap on the default v1 sync protocol until
  activated, and accept both absent (v1) and active (v2) lifecycle
  checkpoints on existing databases.

- Add `AFFINE_E2E_RUST_SERVER=1` Playwright support and a
  `cloud-e2e-rust-server` CI job, extend the live parity scenario to
  23 steps, and lower `waitForTimeout` usage from 336 to 312 (ratchet
  from 324 to 316).
2026-11-24 07:59:26 +09:00
DarkSky c245d8e1f7 feat(server): add domain, mail, blob, sync services and writing rules
Add server-domain, server-mail, server-blob, and server-sync under packages/backend with y-octo 0.4.0.
Wire auth, blob, mail worker, and Socket.IO routes into server-http and affine-server.
Extend the parity harness and CSF frame audit checks.
Fix mail error redaction, expired terminal error codes, database clock reads in blob checks, and permission docs.
Add the STE writing skill and update AGENTS.md rules.
2026-11-23 16:04:20 +09:00
DarkSky b375374c7f refactor(server): move server crates under packages/backend and upgrade y-octo to 0.4.0
Move the server Rust workspace directly under packages/backend.
Exclude native and server from that workspace.
Move frame-audit to tools/frame-audit as a standalone crate.
Isolate packages/backend/native under the root workspace.
Upgrade y-octo to 0.4.0 in native-playground and remove the old removal workarounds.
Update CI workflows, static gates, and docs for the new paths.
2026-11-23 15:12:26 +09:00