Skip to content

OpenSIN-Code/SIN-Code-EFM-Tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SIN-Code Ephemeral Full-Stack Mocking Orchestration (EFSM)

Spin up a complete, isolated test environment per agent task — stateful API mocks, an optional sandboxed runner, and one-command teardown.

Python License: MIT

Part of the SIN-Code agent-engineering stack.

Why

Agents that touch external services (payments, third-party APIs, a database) either hit real systems (dangerous, flaky, costly) or rely on brittle, stateless stubs. EFSM builds a disposable full-stack environment: stateful mocks that remember what you POSTed, wired into a runner, so tests exercise realistic behavior and then vanish.

Features

  • Stateful mock server (FastAPI) — POST creates, GET returns what you created; per-resource in-memory state and scripted scenarios.
  • Orchestrator — configures mocks + env vars from a task description (external_apis, requires_db, test_command).
  • Sandboxed execution — Docker when available, with an automatic subprocess fallback so it still runs without Docker.
  • In-process dispatch for fast unit testing of mocks (no network needed).
  • CLI (efsm) to set up an environment and run tests in one shot.

Quickstart

pip install -e .
efsm setup mytask --api stripe --api github --db --test-cmd "pytest"

Documentation

Note on isolation

Docker gives the strongest isolation. When Docker is not present, EFSM falls back to a resource-limited subprocess runner — convenient for local/CI use, but not a security boundary for untrusted code.

License

MIT — see LICENSE.

About

Ephemeral Full-Stack Mocking Orchestration for AI coding agents — extracted from SIN-Code-Bundle (issue #28)

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages