agentleFS
dylanroscoverdylanroscover/Embody/.claude/skills/run-tests/SKILL.md

run-tests

Skill213 starsChanged 2 months agoMITView on GitHub

Run Embody's test suite and write new tests (Embody development)

48 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use prepare-release, create-pr and 2 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.
  • ShopifySkill

    prepare-release

    Prepare the changeset-release/main branch for release by syncing version.ts files and running pnpm install

    Also in 3 projects that use this

  • SentrySkill

    create-pr

    Create pull requests following Sentry conventions. Use when opening PRs, writing PR descriptions, or preparing changes for review. Follows Sentry's code review guidelines.

    Also in 4 projects that use this

  • SentrySkill

    commit

    Create commit messages following Sentry conventions. Use when committing code changes, writing commit messages, or formatting git history. Follows conventional commits with Sentry-specific issue references.

    Also in 4 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 5 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 44 edited versions we read keep these.

  • 0

    Distinctive

    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. Very specific:

    Create a test file in dev/embody/unit_tests/:

    line 60
  2. Very specific:

    Always read log files at dev/logs/ - the ring buffer only holds 200 entries.

    line 89

“Common” is measured: kept by at least 6 in 10 of the 44 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

Test Suite

Embody has 110+ test suites (2,500+ tests) under dev/embody/unit_tests/ covering externalization, MCP tools, TDXN format, the Envoy server/bridge/jobs, install/upgrade paths, and infrastructure. Destructive and agent tiers are segregated behind their own entry points.

The save gate (read this before a full run)

run_tests refuses a full run when the saved .toe is missing or more than an hour old, and reports the recovery point's age on every run. Call save_project first; pass confirm_saved=True only to deliberately accept losing everything since the last save. A single suite (suite_name=...) is never gated -- gating cheap frequent runs would just train callers to pass the override reflexively.

Never gate on "is there unsaved work". project.dirty does not exist on TD 2025 (a getattr guard silently read None and the check was off), and project.modified returns a LIST of operator paths -- not a bool -- that re-populates within seconds of a successful save. Both proxies have failed here, in opposite directions. The age of the .toe on disk is the only honest signal, which is what the gate and RunDestructiveTests both use.

Running Tests

From TouchDesigner:

op.unit_tests.RunTests()                          # All tests, one per frame
op.unit_tests.RunTests(suite_name='test_path_utils')  # Specific suite
op.unit_tests.RunTests(suite_name='test_path_utils', test_name='test_normalizePath_backslashes_converted')
op.unit_tests.RunTestsSync()                      # Synchronous (blocks TD)
results = op.unit_tests.GetResults()              # Get results dict

Via MCP -- use the run_tests tool, NOT RunTestsSync inside execute_python:

run_tests(background=True)           # all suites -- RECOMMENDED for full runs
get_job_status(job_id='job_...')     # poll; the finished record carries the summary
run_tests(suite_name='test_path_utils')   # small targeted runs may stay synchronous

For a FULL run always pass background=True: it returns a job id immediately and results park restart-proof in .embody/jobs/. The synchronous mode holds the HTTP call open for the whole run, and the Envoy watchdog suites restart the very server it waits on -- the call is severed ("Server force-restarted / shutting down during test run") even though the run finishes. (Pre-job-layer fallback, still valid: poll execute_python(code="result = op.unit_tests.GetResults()") until the totals stop moving.)

RunTestsSync() inside execute_python runs the whole suite INSIDE that dispatch's undo block: the undo-guard tests fail (a block is already open) and the entire run becomes one giant Ctrl+Z step.

Writing New Tests

Create a test file in dev/embody/unit_tests/:

"""Test suite: description of what this tests."""

class TestMyFeature(EmbodyTestCase):
    def test_something(self):
        """Test description."""
        op = self.sandbox.create(baseCOMP, 'test_op')
        result = self.embody_ext.someMethod(op)
        self.assertEqual(result, expected_value)
        self.assertTrue(op.valid)
        self.assertIn('foo', result)

    def setUp(self):
        pass

    def tearDown(self):
        super().tearDown()  # Cleans up sandbox

Key objects: self.sandbox (temp baseCOMP), self.embody (op.Embody), self.embody_ext (op.Embody.ext.Embody), self.runner (TestRunnerExt). All TD globals available.

Test Coverage

Count suites with ls dev/embody/unit_tests/test_*.py -- the hand-maintained breakdown that used to sit here drifted 4x stale and was removed. Suite docstrings state their scope.

After Running Tests

Always read log files at dev/logs/ - the ring buffer only holds 200 entries. Grep for ERROR and WARNING.

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.