Skip to content

Harness: create local agent runtime harness for server and dashboard #301

Description

@mashenjun

Context

The server exposes health and metrics endpoints, and plugins have debug logging, but there is no one-command local harness that starts an isolated mem9 runtime, captures logs, runs smoke checks, and tears down cleanly.

A stronger harness would let agents reproduce bugs and validate fixes without relying on human copy-paste across terminals.

Scope

  1. Add scripts/dev-harness.sh or make dev-harness.
  2. Start server and dashboard on isolated configurable ports.
  3. Capture server logs, dashboard logs, health checks, and metrics snapshots.
  4. Run local smoke tests where possible.
  5. Ensure cleanup handles interrupts and failed runs.
  6. Document required env vars and safe defaults.

Acceptance Criteria

  1. One command starts a local isolated server/dashboard harness.
  2. Harness records logs to a predictable temp directory.
  3. Harness verifies /healthz and /metrics availability.
  4. Harness can run at least one local smoke check.
  5. Harness exits cleanly and tears down child processes.
  6. It does not require production credentials for basic operation.

Effort

~200-500 LoC net.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions