Skip to content

Deepen the origin integration-test harness #6

Description

@chrhicks

Context

The 10 August 2026 architecture review found that the main origin integration suite repeats service boot, listener lifetime, typed HTTP, SSE, controlled worker passes, restart, and cleanup across many scenarios.

After the Processing Project cleanup, apps/server/src/server.integration.test.ts remains about 6,000 lines with roughly 200 direct service creation, listener, close, and worker-pass operations. A thin fetch helper would only move syntax; the opportunity is a deep scenario module expressed in domain language.

Blocked by: #3

Accepted outcome

Create one deep origin integration-test module that owns fixture boot, listener lifetime, typed requests and decoding, controlled worker passes, restart, SSE, and cleanup. Scenario tests should describe domain behavior through the production origin interface.

Scope

  • Wait for the deep origin runtime interface in Deepen the origin runtime module #3.
  • Define a small scenario interface for boot, request, pass, restart, event observation, and close.
  • Preserve isolated SQLite and temporary filesystem behavior.
  • Replace repeated lifecycle setup in the main integration suite.
  • Keep focused domain tests at their owning lifecycle interfaces.
  • Delete superseded setup helpers and implementation-specific assertions after equivalent scenario proof exists.

Non-goals

  • Splitting the large test file without hiding setup knowledge.
  • A generic fetch assertion library.
  • Replacing focused domain lifecycle tests with HTTP-only coverage.
  • Product or runtime behavior changes.
  • Provider, hardware, or physical-capture work.

Acceptance criteria

  • Scenario tests use domain operations and observable outcomes rather than listener/database plumbing.
  • The production origin interface remains the test surface.
  • Restart, SSE, worker-pass, and cleanup behavior are owned once.
  • Tests remain deterministic and use Effect-aware synchronization rather than sleeps.
  • Existing consequential HTTP, persistence, restart, and publication coverage is preserved.
  • Server formatting, lint, build, source checks, and tests pass.

Proof boundary

This proves a smaller and more local test interface for the local origin. It does not add provider, hardware, deployment, physical-capture, or processing-quality evidence.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions