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".
In this repository25 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- allsource-incident-statusSkill
- allsource-partnershipsSkill
- ritual-fullSkill
- ritualSkill
- semantic-isaSkill
- admin-healthSkill
- allsource-data-accessSkill
- allsource-debugSkill
- allsource-incident-statusSkill
- allsource-mcp-setupSkill
- allsource-onboardSkill
- chronos-data-flowSkill
- chronos-durabilitySkill
- chronos-embedded-durabilitySkill
- chronos-releaseSkill
- fly-statusSkill
- mammoth-memorySkill
- ritual-fullSkill
- ritualSkill
- semantic-isaSkill
- seo-aeo-auditSkill
- allsource-customerSkill
- allsource-prime-memorySkill
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
- Distinctive: line 15
Run the embedded data flow test script:
- Distinctive: line 26
If specific sections were requested, use the appropriate flag:
- Very specific: line 35
If the user just wants to check implementation status, run with --prereqs only.
- Very specific: line 84
Run --prereqs to get a live status check of which components exist.
≈ “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.
Files
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:
- Run the embedded data flow test script:
bash tooling/embedded-data-flow-test/test-embedded-data-flow.sh - 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
- 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
- If the user just wants to check implementation status, run with
--prereqsonly.
Test Coverage
The script tests these embedded data flow paths:
| Test Area | What's Checked |
| Prerequisites | MCP dir, mix.exs, Elixir runtime, Rustler NIF source/binary, CoreBackend behaviour, CoreEmbedded module, CORE_MODE config |
| Server Start | Start MCP server with CORE_MODE=embedded, MCP initialize handshake |
| Event Ingestion | Ingest single event, ingest batch (3 events) via ingest_event tool |
| Event Querying | Query by entity_id, query by event_type, query with limit, state reconstruction |
| Schema Ops | Register schema, list schemas, get schema by subject |
| Stats/Health | get_stats, storage_stats, wal_status, deep health check |
| Persistence | Write 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 + DashMapvs. 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):
| Phase | Component | Status |
| 1 | CoreBackend behaviour | Done |
| 1 | CoreClient implements @behaviour | Done |
| 1 | mcp_tools.ex uses state.backend | Not started |
| 1 | server.ex stores backend in state | Not started |
| 2 | CoreEmbedded NIF module | Not started |
| 2 | native/core_nif/ Rustler crate | Not started |
| 3 | CORE_MODE config switch | Not started |
| 4 | application.ex conditional children | Not started |
Run --prereqs to get a live status check of which components exist.
Common Failure Patterns
- "NIF not compiled": Expected during development. Run
--prereqsto 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_DIRis 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.shDoes 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
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.

