hyperdx/agent_docs
Warren Lee 56e60ef8c8
[HDX-3796] Isolate E2E test environment with slot-based port assignment (#1983)
## Summary

- Adds worktree-aware port isolation for E2E tests, mirroring the existing `dev-int` slot mechanism so multiple agents/developers can run E2E tests in parallel without port conflicts
- Fixes the navigation E2E test that was broken by Live Tail URL updates swallowing client-side navigation
- Adds `dev-e2e` Makefile target for running specific tests with `FILE=` and `GREP=` filters, plus `REPORT=1` to open the HTML report after tests finish

## Port Isolation

Each worktree gets a deterministic slot (0–99) computed from its directory name. All E2E service ports are offset by that slot in the **44000–50100** range, avoiding collisions with `dev` (4317–27017) and `dev-int` (14320–40098).

| Service | Base + slot | Variable |
|---|---|---|
| ClickHouse HTTP | 48123 + slot | `HDX_E2E_CH_PORT` |
| ClickHouse Native | 49000 + slot | `HDX_E2E_CH_NATIVE_PORT` |
| MongoDB | 49998 + slot | `HDX_E2E_MONGO_PORT` |
| API server | 49100 + slot | `HDX_E2E_API_PORT` |
| App (fullstack) | 48081 + slot | `HDX_E2E_APP_PORT` |
| App (local) | 48001 + slot | `HDX_E2E_APP_LOCAL_PORT` |
| OpAMP | 44320 + slot | `HDX_E2E_OPAMP_PORT` |

## New Make Targets

```bash
make dev-e2e FILE=navigation                    # Run specific test file
make dev-e2e FILE=navigation GREP="help menu"   # Filter by test name
make dev-e2e GREP="should navigate"             # Grep across all files
make dev-e2e FILE=navigation REPORT=1           # Open HTML report after run
make dev-e2e-clean                              # Remove test artifacts
```

## Linear

https://linear.app/hyperdx/issue/HDX-3796
2026-03-26 18:19:14 +00:00
..
architecture.md chore: CLAUDE.md refactor (#1437) 2025-12-03 18:35:46 +00:00
code_style.md fix: ClickStack and HyperDX color token improvements (#1988) 2026-03-25 19:46:59 +00:00
development.md [HDX-3796] Isolate E2E test environment with slot-based port assignment (#1983) 2026-03-26 18:19:14 +00:00
README.md test: Backport Claude E2E Skill (#1836) 2026-03-02 21:01:59 +00:00
tech_stack.md Remove Bootstrap Icons (#1480) 2025-12-15 17:06:40 +00:00

Agent Documentation Directory

This directory contains detailed documentation for AI coding agents working on the HyperDX codebase. These files use progressive disclosure - they're referenced from CLAUDE.md but only read when needed.

Purpose

Instead of stuffing all instructions into CLAUDE.md (which goes into every conversation), we keep detailed, task-specific information here. This ensures:

  1. Better focus: Only relevant context gets loaded per task
  2. Improved performance: Smaller context window = better instruction following
  3. Easier maintenance: Update specific docs without bloating the main file

Files

  • architecture.md - System architecture, data models, service relationships, security patterns
  • tech_stack.md - Technology choices, UI component patterns, library usage
  • development.md - Development workflows, testing strategy, common tasks, debugging
  • code_style.md - Code patterns and best practices (read only when actively coding)

Usage Pattern

When starting a task:

  1. Agent reads CLAUDE.md first (always included)
  2. Agent determines which (if any) docs from this directory are relevant
  3. Agent reads only the needed documentation
  4. Agent proceeds with focused, relevant context

Maintenance

  • Keep files focused on their specific domain
  • Use file/line references instead of code snippets when possible
  • Update when patterns or architecture change
  • Keep documentation current with the codebase