PolySwarmPolySwarmPolySwarmPolySwarm
Go to PolySwarm
Home

Testing your Engine

Before you run your Engine as a webhook service or request verification, your Engine should pass a minimum set of local tests. This prevents the most common failure modes during Development Community testing and verification.

Minimum Quality Gate (required)

1 - Structure validation

Your analyzer must always return a valid analysis object:

  • verdict is always present
  • bid is always an integer
  • metadata is optional, but if confidence is provided it must be 0.0 to 1.0

2 - Empty bounty handling

Your Engine should handle an empty or minimal bounty without crashing.

Run:

python -m microenginewebhookspy.engine analyze --check-empty

Expected:

  • no exceptions
  • returns UNKNOWN (or a safe default) with bid 0

3 - Known-good checks

Use the built-in checks relevant to your Engine type.

File Engines:

python -m microenginewebhookspy.engine analyze --check-eicar

URL Engines:

python -m microenginewebhookspy.engine analyze --check-wicar

4 - Unsupported artifact types

If a bounty is outside your scope, return UNKNOWN with bid 0.

Example expectation:

  • File engine receives URL bounty, returns UNKNOWN
  • URL engine receives file bounty, returns UNKNOWN
  • Determinism: same input yields same verdict and stable metadata
  • Timeout behavior: slow backends return UNKNOWN rather than hanging indefinitely
  • Error mapping: backend errors become UNKNOWN, not 500 crashes
  • Metadata sanity: malware_family present only when meaningful, confidence only when justified

2026 © Swarm Technologies Inc.