Update Spaces client to the October 22 alpha #20

Merged scarnecchia.net
targeting main
Merged opened by and assigned to scarnecchia.net
targeting main

Summary #

  • Update Ziran's Spaces client and recovery tooling to the October 22 alpha (0.0.0-spaces-alpha-20261022141228).
  • Replace legacy Spaces wire fallback with current SDK signatures and verified credentialed reads while preserving OAuth and local documents.

Changes #

  • Pin the affected SDK dependencies and regenerate the Deno lockfile. Three exact-alpha package overrides avoid published workspace:* dependency manifests; add SDK JSON conversion and syntax imports.
  • Use body-only credential exchange, tagged SDK signatures, and one credential renewal only for HTTP 401 JwtExpired.
  • Verify record and commit response MACs with request-local KEM material; fully verify STAR downloads before returning bytes. Retry MAC mismatches once with fresh key material.
  • Update the in-memory fixtures and regression tests, including recovery request header and configured PLC resolver wiring.
  • Surface SpaceDeleted without removing local documents or registrations; classify InvalidDelegationToken as a permission failure.
  • Pin devnet source to ac0c9f15392f6f0298d71dc52aa88c05036150be and document PDS migrations, KEM-key backups, backfill checks, and image compatibility verification.

Validation #

  • deno install — passed.
  • deno task test:spaces — passed, including the recovery-tool wiring regression.
  • deno task test:sync — passed after the final recovery fix.
  • deno task build:ui and deno task build:webapp — passed; unrelated generated output changes excluded.
  • Deno checks for touched production modules and tools — passed.
  • git diff --check — passed.
  • Final standard and adversarial delivery reviews — no actionable findings after fixes.
  • Not run — live PDS smoke, image verification, and database migrations require an external deployment and accounts.

Review notes #

  • October 22-only Spaces wire behavior intentionally drops older-host compatibility; OAuth DPoP remains SDK-owned.
  • The provider retains a filtered application projection, not a complete incremental replica. Full-repo verification applies to STAR recovery.
  • No deployment or live account changes were performed. The floating PDS image must be verified to contain the pinned commit or compatible newer code before upgrading.
  • Existing Deno compiler-option warnings remain. The recovery tool also retains pre-existing no-explicit-any lint findings in older helpers.

Round 3: configurable hosted OAuth origin #

Commit ba9f69918b0729da89d94a3c15a18d6770e2b86f adds build-time ZIRAN_APP_ORIGIN. The source default remains https://app.ziran.space.

  • A temporary import map supplies the same origin to the browser bundle and served OAuth metadata. It preserves dependency mappings and removes temporary files after success or failure.
  • Origin validation rejects invalid input before changing output. HTTPS ports and a root trailing slash are supported.
  • The startup warning hides on the configured origin and names that origin on a mismatch.
  • test:webapp runs through test:sync. Tests use isolated output directories and compare real browser metadata with served JSON.
  • README and build contracts explain custom builds, public metadata, the root callback, rebuild requirements, and renewed consent for a new client identity.

Origin-fix validation #

  • deno task test:webapp and the full deno task test:sync passed after review fixes.
  • Changed-module type checks, focused lint, and git diff --check passed on Deno 2.9.7.
  • Standard and adversarial reviews found no remaining actionable defects in round 2 of implementation review.
  • The literal command ZIRAN_APP_ORIGIN=https://ziran.scarnecchia.net deno task build:webapp passed. Final metadata identifies https://ziran.scarnecchia.net/oauth-client-metadata.json, with callback https://ziran.scarnecchia.net/.
  • The final index stamp matches the first six SHA-256 bytes of the bundle: 3a5a11f1e0a3.

The custom bundle and metadata JSON are local, ignored build outputs. The committed index contains their hash-stamped script URL. Rebuild without ZIRAN_APP_ORIGIN to restore the upstream identity. webapp/service.json still names app.ziran.space; custom hosting requires matching host, TLS, and routing configuration.

No deployment, image build, live sign-in, consent, or account operation was performed. This change does not establish a live OAuth result or resolve the separate Spaces BadSpaceSignature issue.

This pull request has no versions submitted yet.