Skip to main content
This page documents the integration and regression testing infrastructure for the Palyra platform. The suite ensures the reliability of the core daemon (palyrad), the CLI (palyra), the browser automation service (palyra-browserd), and the connector ecosystem.

Daemon Integration Surface

The daemon integration tests verify the HTTP and gRPC boundaries of palyrad. These tests typically involve spawning a live daemon process with dynamic ports and an isolated state root to ensure no side effects between test runs.

Admin and Console API Testing

The admin_surface.rs suite validates the security and functionality of the Axum-based HTTP router. It specifically tests:

Health and Diagnostics

The health_endpoint.rs and console_diagnostics_handler crates/palyra-daemon/src/transport/http/handlers/console/diagnostics.rs#6-9 tests ensure the observability of the system. The diagnostics payload includes:

Daemon Integration Data Flow

The following diagram illustrates how the integration tests interact with the daemon’s internal components. Integration Test Boundary Sources: crates/palyra-daemon/tests/admin_surface.rs#30-71, crates/palyra-daemon/src/transport/http/router.rs#17-157, crates/palyra-daemon/src/transport/http/handlers/admin/core.rs#1-20 (implied by router).

CLI Regression and Parity

CLI testing focuses on command-line argument parsing, profile management, and the bridge between the CLI and the daemon.

Daemon Status and Connectivity

The daemon_status.rs suite verifies that the CLI can communicate with the daemon’s management endpoints. It tests the daemon status command against a live palyrad instance crates/palyra-cli/tests/daemon_status.rs#19-37.

Workflow Regression Matrix

The workflow_regression_matrix.rs and associated scripts (run-workflow-regression.sh) execute end-to-end scenarios to ensure that complex agentic workflows remain functional across versions. These tests often use the “Simulator Harness” to mock external model providers or channel interactions.

CLI to Daemon Communication

Sources: crates/palyra-cli/tests/daemon_status.rs#19-70, crates/palyra-daemon/src/transport/http/router.rs#19-19.

Browser Automation Tests

The palyra-browserd tests ensure that the headless Chromium engine and its gRPC service wrapper function correctly.

Session Lifecycle

Tests in support/tests.rs cover the creation and management of browser sessions:

Redaction and Security

Simulator Harness for Connectors

The simulator_harness.rs provides a mock environment for testing ChannelPlatform implementations (e.g., Discord, Slack) without requiring live API tokens or network connectivity.

Key Features

  • Message Injection: Allows tests to inject InboundMessage payloads directly into the ConnectorSupervisor.
  • Outcome Verification: Captures outbound actions like SendMessage or EditMessage to verify the daemon’s response logic.
  • State Mocking: Simulates connector health refreshes and queue draining operations crates/palyra-daemon/src/transport/http/router.rs#67-80.

Vault and Identity Persistence

Tests for the palyra-vault and palyra-identity crates focus on data integrity and encryption.

Vault Backend Testing

The backend.rs logic is tested across multiple storage types:

Identity Store Security

The FilesystemSecretStore tests crates/palyra-identity/src/store.rs#87-92 ensure: Sources: crates/palyra-daemon/tests/admin_surface.rs#1-107, crates/palyra-cli/tests/daemon_status.rs#1-194, crates/palyra-browserd/src/support/tests.rs#1-180, crates/palyra-browserd/src/transport/grpc/service.rs#1-161, crates/palyra-vault/src/backend.rs#1-204, crates/palyra-identity/src/store.rs#1-215.