feat: platform-independent runtime adapters and standalone test suite - #121
Merged
Conversation
Replace the orbian integration with first-party platform contracts, add an Effect Cluster adapter, and make this repository fully standalone: it runs its own self-host stack and every test suite without the private repository. Platform - Restore `@voidhash/platform` contracts and `@voidhash/platform-node`, and drop every `@orbian/*` dependency, workspace escape, and release script. - Add `@voidhash/platform-cluster`: durable workflows on ClusterWorkflowEngine, cron on ClusterCron, queues on PersistedQueue, and a durable entity host on Sharding, with single-node and in-memory topologies. - Extract the shared Effect workflow-engine mapping to `@voidhash/platform/EffectWorkflowRunner` so node and cluster adapters differ only in the engine they install. - Add `@voidhash/platform/conformance`: one suite every adapter must pass, run against the memory, node, and cluster backends. Self-host as the development environment - Add a compose dev overlay publishing Postgres and the compiler to the host, `pnpm stack:up`, and `pnpm test:integration` covering eight suites. - Document every variable, including operator-provided ones, in `.env.example`. Standalone tests - Move the core integration harness into `packages/core/test/_testing/`, with `CoreTestConnections` as the environment contract a composition injects and an env-driven global setup over the self-host stack. - Stop excluding integration tests from typecheck.
|
Too many files changed for review (705 files, 100 file limit). |
|
Thank you for following the naming conventions for pull request titles! 🙏 |
|
Install the packages built from 0063b90: @voidhash/paywalls pnpm add @voidhash/paywalls@https://pkg.voidha.sh/paywalls/0063b90@voidhash/node pnpm add @voidhash/node@https://pkg.voidha.sh/node/0063b90@voidhash/web pnpm add @voidhash/web@https://pkg.voidha.sh/web/0063b90voidhash-cli pnpm add voidhash-cli@https://pkg.voidha.sh/cli/0063b90@voidhash/react-native pnpm add @voidhash/react-native@https://pkg.voidha.sh/react-native/0063b90Internal workspace deps (generated-clients, shared, studio) are published at the same sha and resolved automatically. Replace the sha with |
The landing page and the design-system site are cloud-company surfaces
rather than open-core product surface, so they move to the host repository
and this app keeps only what a self-hosted deployment needs.
- `/` now hands off to the studio. The route shell stays here because a
host cannot add a second `/` route without colliding with this one;
instead `_marketing/index.tsx` renders `features/www/marketing-home-slot`,
which hosts replace the same way as the other extension points.
- `features/www/landing` and the whole `features/design` + `routes/design`
tree move out. `hero-shader` stays as `components/hero-shader` because
the auth pages use it, and `lib/waitlist` / `lib/paths` stay because the
studio and auth flows depend on them.
- `source.config.ts` keeps only the product-docs collection. A host that
adds documentation surfaces replaces this config wholesale, since two
`mdx()` instances would clobber each other's `.source` output.
- Drop `features/www/{button,logo,refraction-stripes,section,navbar,hero}`
and the `voidhash-gradient-*` cluster, which were reachable only from the
unreferenced `hero/hero.tsx` that this change removes.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
refactor(www): move the marketing and design sites to the host build
…lf-host app - promote @voidhash/backend to packages/backend with a curated exports map - merge platform-node + platform-cluster into @voidhash/platform-selfhost; the Postgres queue/workflow/cron engines are replaced by Effect Cluster - add WebSocket sessions and a SQL alarm control plane to the cluster entity host; delete the Postgres entity host - move the composition app selfhost/entry -> apps/backend (@voidhash/backend-app) - isolate test-built cluster topologies onto a DATABASE_PLATFORM_* database so they cannot steal shards from the running app - add scripts/check-platform-seam.mjs: packages/** must not bind the platform-selfhost adapter at runtime - fix selfhost CI env propagation (--env-file + GITHUB_ENV), the voidql compatibility test connections, and the mimic entity-session attachment bug - pin fumadocs-openapi to 11.2.2 and Node to 22.23.2 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the orbian integration with first-party platform contracts, adds an Effect Cluster adapter, and makes this repository fully standalone — it now runs its own self-host stack and every test suite without the private repository.
Platform independence
Queues, durable workflows, cron, and durable entities sit behind thin first-party contracts (
@voidhash/platform); runtime backends are swappable per primitive, not per provider.@voidhash/platformand@voidhash/platform-node; drop every@orbian/*dependency, the workspace escape into a sibling checkout, and the tarball-pinning release script. The repository installs standalone again.@voidhash/platform-cluster: durable workflows onClusterWorkflowEngine, cron onClusterCron, queues onPersistedQueue, and a durable entity host onSharding, with single-node (Postgres) and in-memory topologies.@voidhash/platform/EffectWorkflowRunner, so the node and cluster adapters differ only in the engine they install (platform-node's runner drops from 233 lines to 10).@voidhash/platform/conformance— one suite every adapter must pass. It runs unmodified against the memory host, the in-memory cluster, and cluster-over-Postgres, which is what makes "swappable" verifiable rather than aspirational.Self-host as the development environment
docker-compose.dev.ymlpublishes Postgres and the compiler to the host; the production compose stays locked down.pnpm stack:upbrings up the full stack (Postgres, ClickHouse, MinIO, Mailpit, compiler, app);pnpm test:integrationruns every suite against it..env.exampledocuments every variable, including a "Values you must provide" section (WorkOS, model providers, encryption key).Standalone tests
The core integration harness moves into
packages/core/test/_testing/— the location the tsconfig alias already named. The seam between the suite and whichever composition runs it is one injected contract,CoreTestConnections(db,clickhouse,workos). This repository supplies an env-driven global setup over the self-host stack; downstream compositions provision their own environment and inject the same shape.packages/coreno longer excludes integration tests from typecheck, so drift is caught.Verification
Against the full local stack: 921 tests across 8 suites, no skips — platform-node 42 (incl. S3/SMTP/Chromium), platform-cluster 43 (incl. conformance on real Postgres), selfhost-entry 62 (incl. ClickHouse + compiler), core 688, backend rpc-smoke 6, agent 15, db 1, mimic-db 64 — plus both e2e smokes (
selfhost:smoke,selfhost:release-smoke) and the full unit + typecheck sweep.The conformance kit found five real bugs while being written, three of them silent — most notably
PersistedQueue'smaxAttemptsbeing bound into SQL against anINTcolumn, whereNumber.MAX_SAFE_INTEGERbroke the take query and a blanketcatchCausereported the failure as "empty queue".Notes for review
selfhost/entrystill composesplatform-node; switching that composition is the natural follow-up.DATABASE_DIRECT_*work that was already in the tree and too entangled to split cleanly.🤖 Generated with Claude Code