Skip to content

feat!: complete compiler-backed causal client replica#132

Merged
patrickleet merged 28 commits into
tasks--graphql-qs-epicfrom
tasks--distributed-js-client-1
Jul 25, 2026
Merged

feat!: complete compiler-backed causal client replica#132
patrickleet merged 28 commits into
tasks--graphql-qs-epicfrom
tasks--distributed-js-client-1

Conversation

@patrickleet

@patrickleet patrickleet commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • make Rust read-model, relationship, authorization, command, consistency, and
    projector declarations the typed source for deterministic
    role/application-scoped client artifacts
  • compile colocated .graphql operations into typed query, live, command,
    route, normalization, index, SSR, SvelteKit, and React artifacts
  • replace the pre-release document cache with one sparse normalized causal
    replica for all UI reads, including independent optimistic layers, durable
    status recovery, confirmed-base revalidation, optional persistence, and
    redacted diagnostics
  • split authorized record completeness from safe cross-artifact index
    comparability; order shared root and nested indexes only with comparable
    server vectors
  • migrate e2e-ui into a pure generated-contract consumer with separately
    authorized $distributed and $distributed/admin entrypoints
  • remove legacy cache targets, snapshots, policy maps, timers, raw command
    catalogs, public reconciliation APIs, and compatibility shims

Developer experience

Rust declares the application surface and typed commands. A route declares its
view once in +page.graphql. The generated operation and command APIs then own
SSR, hydration, normalized reactive reads, live updates, optimistic effects,
causal retirement, authorization-scope changes, and conservative revalidation.

Durable design decisions and specifications live in Distributed's GitKB rather
than the package source tree.

Breaking change

This is the intentional pre-release cutover. QueryCache, manual
target/at/by metadata, snapshot rollback, generated policy maps,
timer-based reconciliation, raw GraphQL command registration, and the pilot
persistence format are removed without compatibility shims.

Verification

  • GitHub Actions run 30118815579
    passed all 19 workflow jobs on exact head e328879; CodeRabbit also passed
  • cargo test --workspace --all-features --all-targets, formatting, ignored
    CLI/scaffold harnesses, and the each-feature matrix pass
  • Node 20.20.2 and Node 24.18.0 each pass 241/241 JavaScript tests, TypeScript
    checks, six API entrypoint consumers plus package metadata, bundle isolation,
    publint, and audit checks
  • the 74-file packed-consumer smoke passes; npm publish --dry-run reports
    162.5 kB packed / 821.8 kB unpacked, and nothing was published
  • e2e-ui passes 8 domain, 13 behavioral, 2 offline OIDC, production build,
    Svelte typecheck with 0 errors/0 warnings, and 7/7 structural tests
  • live OIDC/PostgreSQL passes 2/2; Playwright passes 11 browser tests with
    1 data-conditional admin test skipped
  • generated user/admin clients are current and git diff --check is clean

The final Node 20 replay also verifies that pending receipt.projected polling
keeps its runtime-owned timer alive until settlement or disposal.

GitKB

  • Epic: tasks/graphql-qs-client-replica-1 — completed
  • SvelteKit migration: tasks/graphql-qs-client-replica-12 — completed
  • Final cutover gate: tasks/graphql-qs-client-replica-14 — completed
  • Normative specs:
    • specs/query-layer/v1/client-replica
    • specs/query-layer/v1/client-compiler
    • specs/query-layer/v1/causal-command-protocol
    • specs/query-layer/v1/state

Integration

This PR targets tasks--graphql-qs-epic, which remains the head of PR #127.
PR #129 is closed and contains no unique changes. No PR merge or npm
publication is part of this update.

Screenshots: N/A — this is a compiler/runtime/package architecture cutover;
e2e-ui remains the contract consumer.

Implements [[tasks/distributed-js-client-1]]
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 60389b93-5e55-4318-a88c-68ed0600e766

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch tasks--distributed-js-client-1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@patrickleet patrickleet changed the title feat: extract Distributed JS client package feat: build compiler-backed causal client replica Jul 23, 2026
Implements the server and compiler slice of [[tasks/graphql-qs-client-replica-10]].
Covers [[tasks/graphql-qs-client-replica-10]].
Generate role-scoped query and command artifacts from Rust Surface IR, make the normalized causal replica the only public client runtime, and migrate the SvelteKit e2e consumer to the generated contract.

BREAKING CHANGE: remove the pre-release document cache, manual target/reconcile APIs, raw GraphQL command catalog, and pilot persistence format.
@patrickleet patrickleet changed the title feat: build compiler-backed causal client replica feat!: complete compiler-backed causal client replica Jul 24, 2026
Implements [[tasks/graphql-qs-client-replica-20]].
@patrickleet
patrickleet merged commit e207458 into tasks--graphql-qs-epic Jul 25, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant