Skip to content

DARK-25: preserve Effect harness template and package boundaries - #14

Draft
cooper (czxtm) wants to merge 2 commits into
mainfrom
audit/DARK-25-existing-work
Draft

DARK-25: preserve Effect harness template and package boundaries#14
cooper (czxtm) wants to merge 2 commits into
mainfrom
audit/DARK-25-existing-work

Conversation

@czxtm

@czxtm cooper (czxtm) commented Sep 10, 2026

Copy link
Copy Markdown
Member

Adds an Effect harness demo with bounded journal retention, typed APIs, concurrency control, runtime disposal, and native process supervision. The demo is deterministic and documents its unavailable production sandbox transport.

Existing validation passes: types, 14 tests, lint and formatting; current verify CI includes Rust, Nix and Compose.

Keep draft under Cooper’s revised acceptance criteria: first finalize and merge common #3, then consume that merged revision through the existing dependency mechanism and run the actual shared lint/dependency checks over the template source. Demonstrate clear naming examples, including PascalCase named concepts/services, while retaining familiar entrypoints. Record both revisions and passing types, tests and build before requesting template merge. Existing green CI does not establish this consumer compatibility. DARK-25 remains backlog pending that dependency and applicable implementation approval.

Replace the ops-monorepo web demo (TanStack Start, Drizzle, oRPC,
better-auth, Polar) with an Effect-native agent harness and rename
the operational surface from ops-demo to agent-demo.

- packages/agent-core: branded IDs, schema-backed domain, capability
  services, in-memory event journal, bounded sequential agent loop
- packages/agent-demo: provider-free deterministic model/tool layers
- packages/agent-runtime: effect/unstable/ai and sandbox adapters
- packages/agent-testkit: scripted model and deterministic tool layers
- packages/sandbox-client + crates/agent-sandboxd: tagged NDJSON wire
  protocol and bounded Rust process supervisor (new root Cargo
  workspace); CI gains cargo check/test/fmt steps
- apps/cli: Effect CLI for local harness runs
- apps/harnessd: typed harness HTTP API on a long-lived Bun server
- apps/native: Tauri shell with one managed Effect runtime (moved from
  apps/web/src-tauri)
- apps/web: slim status/architecture shell with SOPS-backed config
- packages/infra: rewritten Alchemy stack (beta.70) — D1 run journal,
  R2 artifact store, Queues run dispatch, Vite dashboard worker
- drop packages/db and packages/env in favor of infra migrations and
  web-core config services
Port the deep-module boundary rules from the agents reference repo,
adapted to this template's src/index.ts entry-point convention: a
package's only public surface is src/index.ts (its manifest . export);
everything else in src/ is private.

- .dependency-cruiser.cjs: five error rules (app/cross-package/test
  entry-point boundaries, private tests/, no cycles), parsed with SWC
  because depcruise has no TypeScript 7 support yet. Cruises apps,
  packages, and tests so app-side violations are actually seen.
- lint:boundaries wired as the first step of bun run check.
- The testkit and web-core tests now import through their packages'
  entry points like every other consumer.
- dependency-cruiser + @swc/core dev deps; bun.nix regenerated.

Proven live: an app importing package internals fails
entrypoint-boundary-from-app; a test reaching another package's
internals fails tests-through-entrypoints; an implementation importing
another package's internals fails entrypoint-boundary-across-packages;
entry-point imports and the clean tree pass.
@czxtm
cooper (czxtm) marked this pull request as ready for review September 10, 2026 05:36
@czxtm
cooper (czxtm) marked this pull request as draft September 10, 2026 05:49
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