agentleFS
all-source-osall-source-os/all-source/.claude/skills/chronos-data-flow-embedded/SKILL.md

chronos-data-flow-embedded

Skill4 starsChanged yesterdayApache-2.0View on GitHub

Test Chronos MCP server with embedded Core backend (CORE_MODE=embedded). Verifies Rustler NIF prerequisites, event ingest/query through embedded backend, schema operations, stats/health, and data persistence across restarts. Triggers on "test embedded data flow", "test embedded", "embedded health", "test embedded backend", "verify embedded", "test nif".

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the embedded data flow test script:

    line 15
  2. Distinctive:

    If specific sections were requested, use the appropriate flag:

    line 26
  3. Very specific:

    If the user just wants to check implementation status, run with --prereqs only.

    line 35
  4. Very specific:

    Run --prereqs to get a live status check of which components exist.

    line 84

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “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

Chronos Embedded Data Flow Test

Tests the MCP server running with an embedded Core backend — no separate Core container needed. Core runs in-process via Rustler NIFs (CORE_MODE=embedded).

When invoked:

  1. Run the embedded data flow test script:
    bash tooling/embedded-data-flow-test/test-embedded-data-flow.sh
  2. Analyze the output and report:
    • Whether prerequisites are met (NIF compiled, CoreBackend behaviour, CoreEmbedded module)
    • Which tests passed, failed, or were skipped
    • Whether the embedded backend is fully functional or still in development
    • Root cause analysis for any failures
  3. If specific sections were requested, use the appropriate flag:
    • --prereqs — check prerequisites only (no server start)
    • --ingest — event ingestion tests only
    • --query — event querying tests only
    • --schema — schema operations tests only
    • --stats — stats/health tests only
    • --persist — persistence test (restart cycle, opt-in)
    • --json — append for machine-readable output
  4. If the user just wants to check implementation status, run with --prereqs only.

Test Coverage

The script tests these embedded data flow paths:

Test AreaWhat's Checked
PrerequisitesMCP dir, mix.exs, Elixir runtime, Rustler NIF source/binary, CoreBackend behaviour, CoreEmbedded module, CORE_MODE config
Server StartStart MCP server with CORE_MODE=embedded, MCP initialize handshake
Event IngestionIngest single event, ingest batch (3 events) via ingest_event tool
Event QueryingQuery by entity_id, query by event_type, query with limit, state reconstruction
Schema OpsRegister schema, list schemas, get schema by subject
Stats/Healthget_stats, storage_stats, wal_status, deep health check
PersistenceWrite 5 events, stop server, restart with same data dir, verify events survived

Architecture Context

In embedded mode, the data flow is:

MCP Tool Call → CoreBackend behaviour → CoreEmbedded (Rustler NIF) → Core Rust Engine
                                                                        ↓
                                                              WAL + Parquet + DashMap

vs. remote mode (the Docker stack):

MCP Tool Call → CoreBackend behaviour → CoreClient (HTTP) → Core Container (port 3900)

Both backends implement the same CoreBackend behaviour (27 callbacks). The embedded test verifies the NIF path works identically to the HTTP path.

Implementation Status

The embedded backend is being built in phases (see docs/proposals/MCP_EMBEDDED_BACKEND.md):

PhaseComponentStatus
1CoreBackend behaviourDone
1CoreClient implements @behaviourDone
1mcp_tools.ex uses state.backendNot started
1server.ex stores backend in stateNot started
2CoreEmbedded NIF moduleNot started
2native/core_nif/ Rustler crateNot started
3CORE_MODE config switchNot started
4application.ex conditional childrenNot started

Run --prereqs to get a live status check of which components exist.

Common Failure Patterns

  • "NIF not compiled": Expected during development. Run --prereqs to verify implementation status.
  • "Cannot start MCP server": The CoreEmbedded module or CORE_MODE config switch isn't implemented yet.
  • "Events not found after restart": WAL/Parquet persistence in the embedded backend isn't wired up — check that ALLSOURCE_DATA_DIR is being passed to the Rust engine via NIF.
  • "Timeout on tool call": NIF is blocking the BEAM scheduler — ensure schedule = "DirtyCpu" is set on all Rustler functions.

Environment Variables

# Override defaults
MCP_DIR=/path/to/mcp-server-elixir \
DATA_DIR=/tmp/my-test-data \
bash tooling/embedded-data-flow-test/test-embedded-data-flow.sh

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.