Skip to main content

10. Test and diagnose the integration

A clip appearing once is useful evidence, but it does not prove that an application handles retries, cancellation or restart. Studio separates fast local tests from managed-host integration and real inference qualification.

Build confidence in layers​

LayerExerciseWhat it proves
Pure contracts and planningRequest shapes, modes, duration/frame grids, reference collisions, plan digestsResolution is consistent without network access.
Fake Skulk™ HTTP serviceCatalog/state, job creation/status, media, chat and cancellationAdapter behavior and bounded decoding.
SDK operationsReservation, duplicate starts, scope, uncertainty, journal restartWork is tracked without blind replay.
Application storage/HTTPAsset import, digest checks, retention, ticket paths, origin checksFiles and interface boundaries behave correctly.
Managed hostReal startup, IPC, health, invocation and shutdownThe child actually integrates with its owner.
Signed packageBuild validation, install, manifest and schema agreementThe installed artifact matches the advertised contract.
BrowserClient URL resolution, stale replies, polling, batches and controlsOperator actions reach the intended application behavior.
Real inferenceMounted models, long jobs, cancellation, output review and soakThe selected model/engine deployment works in practice.

A fake backend can prove a render was submitted once. It cannot prove a GPU produces useful video.

Read the existing tests as examples​

Studio's Python tests and integration tests cover:

  • A single submission followed by collection of the completed clip.
  • Accepted-job reconciliation after reopening the journal.
  • Refusal when the reviewed plan no longer matches.
  • Digests binding reviewed settings and references.
  • Corrupt, oversized or uncollectable output.
  • Unknown backend states remaining outstanding instead of guessed completion.
  • Outages before submission being definite failures.
  • Asset validation, reference uploads, keep/delete behavior and cleanup races.

The managed-owner tests additionally check that the child remains outside Skulk™ implementation imports. A capability author calls the supported boundary instead of importing worker internals.

Some integration tests currently depend on managed-host and publisher tooling distributed separately from the authoring SDK. A public Studio repository by itself does not install that tooling. Run the layer you have prerequisites for; report skipped layers explicitly.

Keep generated contracts consistent​

Once the repository's pinned Python dependencies are available, its schema/web checks are:

uv run python tools/export_schemas.py
npm --prefix web run gen:api
npm --prefix web run check

web's check runs lint, type checking, tests and a production build. Review schema/type diffs when you change Python contracts. Type generation succeeding is not proof that the server implements the new behavior.

Run focused Python tests for the boundary you changed, then the repository's required full validation before publishing an artifact. See the Studio repository's contribution instructions for the exact dependency and host setup.

Diagnose by the last proven boundary​

SymptomFirst evidence to inspect
Capability missingInstalled manifest, announced descriptors, child startup/health and host admission.
Interface missingDeclared surface id, reported URL, serving address and browser reachability.
Plan refusedCard mode/bounds, references, ready placement and current plan digest.
Start returns but no clipOperation state and submission state, backend reference and adapter observations.
Job completed but operation failedOutput metadata, bounded download, digest/size check and local storage.
Cancel seems slowActual backend terminal state; a request acknowledgment is not completion.
Refinement failed after restartWhether the owned in-process chat task survived—it cannot at this revision.
UI shows old statusClient/store generation guards, list hydration and polling lifecycle.

Do not restart a healthy child repeatedly to repair a missing model. Do not resubmit uncertain work merely because the interface has no clip yet. Find the last boundary with confirmed evidence, then investigate the next one.

Your minimum failure exercise​

Before publishing your own application, deliberately lose a start reply, interrupt collection, restart after backend acceptance and race cancellation with completion. Check that the application preserves uncertainty, does not duplicate work and never reports success for corrupt output.

Next: packaging and installation.