agentleFS
HexamindOrganisationHexamindOrganisation/hexgate/.claude/skills/integration-tests/SKILL.md

integration-tests

Skill25 starsChanged 5 months agoMITView on GitHub

Run the opt-in integration test suites (pytest -m integration) for the SDK and/or the platform API — the ones that hit a live ClickHouse (and, for the SDK, the full OTLP pipeline: platform-api, Collector, Redpanda, span-enricher). Use when asked to run, verify, or debug integration tests, as opposed to the default unit test suite.

  • Reads credentials

20 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use add-a-use-case, branches-and-pull-requests and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • LeanMeanCleanAppsSkill

    add-a-use-case

    How to add a command or query to the Application layer as a vertical slice (request, handler, validator, tests) using source-generated Mediator. Use when adding a new feature, a new query, or a new write operation.

    Also in 5 projects that use this

  • LeanMeanCleanAppsSkill

    branches-and-pull-requests

    Branch naming (feature/, fix/, chore/), how labels and release notes follow from the branch, the pull request template, and how changes get merged in the template repository. Use when creating a branch, writing a commit or opening a pull request.

    Also in 5 projects that use this

  • +10 more from LeanMeanCleanApps

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 18 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Before starting anything, run "$(git rev-parse --show-toplevel)/.claude/skills/run-platform/preflight.sh" --full.

    line 11

“Common” is measured: kept by at least 6 in 10 of the 18 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Run Integration Tests

The local stack below is the same one docs/internals/development.md ("Run the platform locally") documents for developers; keep the two in sync.

Before starting anything, run "$(git rev-parse --show-toplevel)/.claude/skills/run-platform/preflight.sh" --full. It reports a missing or stopped Docker, a missing Go, and busy ports up front. To bring the servers up, you can follow the run-platform skill in full mode instead of the three terminals below. Minting the key and running pytest stay here.

SDK integration tests (repo root — tests/adapters/*/test_integration.py, tests/audit/test_integration.py)

Infra (idempotent):

make postgres-init
make clickhouse-up
make redpanda-topics

Mint a key — prints fty_live_… on stdout, and creates the keypair the Collector needs:

cd platform/api && DATABASE_URL=postgresql+asyncpg://hexgate:hexgate-dev-password@localhost:5433/hexgate \
    PYTHONPATH=$PWD uv run python ../../deploy/provision.py

Three blocking servers, one terminal each. Check first — they bind fixed ports and die with "Address already in use":

curl -sf http://localhost:8000/health   # platform-api already up?
curl -s -o /dev/null localhost:4318 && echo up   # collector already up? (any HTTP answer, even 404)

make platform-api-pg    # :8000 — must be -pg, never `make platform-api`
make collector-run      # :4317 / :4318
make enricher-run

Run:

export HEXGATE_API_KEY=<the fty_live_… from above>
export HEXGATE_API_URL=http://localhost:8000
pytest -m integration   # expect 5 passed, ~20s

Unset afterward — some unit tests require no API key:

unset HEXGATE_API_KEY HEXGATE_API_URL HEXGATE_OTLP_ENDPOINT \
      LANGFUSE_PUBLIC_KEY LANGFUSE_SECRET_KEY LANGFUSE_HOST

On row never landed in ClickHouse, read the export error in the captured log, then:

curl -s "http://localhost:8124/?query=SELECT+count()+FROM+hexgate_audit.policy_decision" \
     -u hexgate:hexgate-dev-password
# DLQ: want HIGH-WATERMARK 0 on every partition
docker exec hexgate-redpanda rpk topic describe hexgate.otlp.dlq -p --brokers localhost:9092

Platform API integration tests (platform/api/tests/...)

ClickHouse only — no live server, no Collector, no HEXGATE_API_KEY.

make platform-api-test-integration

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.