agentleFS
MicrosoftKnown publishermicrosoft/PilotSwarm/.github/skills/debug-test/SKILL.md

debug-test

Skill4 starsChanged 9 months agoMITView on GitHub

Diagnose and fix a failing integration test in PilotSwarm. Covers the full call chain from PilotSwarmSession.sendAndWait through duroxide orchestration to CopilotSession, common failure patterns, and how to inspect orchestration and CMS state.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    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:

    No flag means full PostgreSQL.

    line 8
  2. Distinctive:

    If the bug touches TUI keybindings or keyboard help text, verify that the startup keybinding hint/splash and the help dialog/modal are …

    line 68

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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

For machine setup and provider coverage, read docs/developer/contributing/local-ci-and-tests.md and .github/CI.md. No flag means full PostgreSQL; --all-providers adds HDB-specific coverage; --with horizondb runs the complete suite on HDB. Default file concurrency is 8. New SDK test files join additive HDB coverage unless explicitly reviewed in scripts/provider-test-coverage.json. CI requires real HDB and rejects skips.

Debug a Failed Test

Diagnosis steps

  1. Run the specific test to reproduce:
    npm test -- --test=<name>
  2. Identify the failure layer — the call chain is:
    test → PilotSwarmSession.sendAndWait()
         → PilotSwarmClient._startAndWait()
         → duroxide orchestration
         → SessionProxy activity (runTurn)
         → SessionManager.getOrCreate()
         → ManagedSession.runTurn()
         → CopilotSession.send() + on()
  3. Common failure causes:

    SymptomLikely cause
    Timeout with no responseOrchestration stuck — check duroxide logs
    Tool handler not calledTools not registered — check setSessionConfig or registerTools was called
    Wrong tool calledSystem message not directive enough — use mode: "replace"
    Assertion on content failsLLM non-determinism — make assertions flexible (.includes(), case-insensitive)
    "Not started" errorworker.start() or client.start() not called
    Session not foundSession wasn't created in CMS — check catalog.createSession()
    Warm session missing toolsupdateConfig() not called — check session-manager.ts warm path
    nondeterministic: custom status mismatchOrchestration code uses Date.now() or other non-deterministic values to branch before yields — use yield ctx.utcNow() instead. Can also happen after redeploying changed orchestration code without resetting the database.
  4. Check CMS events — verify what actually happened:
    const events = await session.getMessages();
    console.log(events);
  5. Check session info:
    const info = await session.getInfo();
    console.log(info.status, info.iterations);

Key files

  • packages/sdk/test/sdk.test.js — test definitions
  • packages/sdk/src/client.ts — client-side orchestration polling
  • packages/sdk/src/orchestration.ts — orchestration logic
  • packages/sdk/src/managed-session.ts — LLM turn execution
  • packages/sdk/src/session-manager.ts — session lifecycle and tool resolution

TUI note

If the bug touches TUI keybindings or keyboard help text, verify that the startup keybinding hint/splash and the help dialog/modal are still synchronized with the actual bound keys.

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.