feat(project-files): add core storage and realtime operations

Merged
MZ
4d ago
+20137-1663

Summary

  • Keep unreleased Project API and CLI references out of published docs, using explicit documentation exclusions. Runtime contracts, commands, and feature gates remain unchanged; publish the retained definitions at launch.
  • Add authorized Project file CRUD, folders, uploads, history, lifecycle, and realtime document/list operations.
  • Part 2 of the five-PR split of #8610, based on staging after the storage-foundation PR #9015 merged. Includes contracts, CLI/API generation, and core HTTP acceptance coverage.
  • Unify Workspace and Project realtime permissions: readers remain subscribed, mutation frames require write access, and write loss stops browser editing and agent streams. Persist snapshots with their authenticated editor.
  • Preserve old-app/new-relay mutation checks and new-app/old-schema-v2-relay writer admission. The latter is limited to Workspace relays whose acknowledged joins require write access; live readers require the upgraded relay.
  • Keep rendering/search, bulk operations, and sharing in subsequent PRs. These are review boundaries, not five required releases.

Testing

  • Documentation change: 147 focused generator/docs tests passed; OpenAPI, CLI docs, docs-manifest and import checks passed. Verified only Project paths were removed, published CLI references omit Projects, and runtime CLI help remains available.
  • Current capability change: 82 provider/editor tests, 43 realtime unit tests, and 36 PostgreSQL/Redis/Socket.IO integration checks passed. Negative controls fail when the capability/streaming guards are removed.
  • Real local app + relay + Chromium: six checks passed for reader/writer admission, live edits and downloaded persisted bytes, downgrade, continued subscription/reload, network reconnect, and revocation.
  • Browser coverage is the existing Workspace UI. Project backend/socket paths are covered; the Project product browser surface remains in #9034.
  • Staging synchronization previously passed 54 focused migrated database checks, 28 storage units, 12 CLI checks, and 57 realtime tests. Regenerated CLI/API/OpenAPI artifacts and verified their checks after synchronization; targeted formatting and commit hooks passed.
  • Prepared the pre-deployment staging fixture and private after-deployment verification handoff. Post-deployment validation and current-head hosted CI remain pending.

Type of Change

  • Feature / refactor

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Focused tests added/updated and passing
  • Full hosted CI passed
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Review stack

  1. #9015 — mutation accounting and retention (merged into staging)
  2. #9016 — core files, history, uploads, realtime (base: staging)
  3. #9017 — rendering, derived content, search
  4. #9018 — cross-owner copy, extraction, downloads, export
  5. #9019 — public sharing

Review #9016 against staging; later slices remain based on their immediate parent. #8610 is superseded by this stack.