GuidesTesting and Debugging

Testing

causet build checks the rules without publishing a release. A sandbox fork is where you submit intents against Managed Causet. Compile on every change. Submit intents on sandbox before you activate main or production.

Compile

causet build compile --runtime . --out dist

A compile failure exits non-zero and does not publish a release. The codes are in Compiler diagnostics.

Exercise a fork

causet context use env sandbox
causet deploy --fork sandbox
causet intent <TYPE> \
  --stream <stream> \
  --entity <id> \
  --fork sandbox \
  --payload '{}'
causet inspect timeline --entity <id> --stream <stream> --fork sandbox
causet inspect state --entity <id> --stream <stream> --fork sandbox

Point the SDK at https://sandbox.api.causet.cloud. A sandbox deploy does not activate another fork.

What to assert

CheckPass
CompileExit 0, no diagnostic
Preflight rejectionHTTP 422, and no new timeline step
Accepted intentACCEPTED, a timeline id, and the expected events
ProjectionThe named query returns the row after the worker applies the event
RetryThe same intent id does not create a second commit

The intent shape is in Intents and rules. Activating the fork you will serve is Deployment.