Skip to main content

Deployment Lifecycle

Deployment is the process of routing live traffic to a published policy version. LexQ tracks every deployment action for a complete audit trail.
Publish (DRAFT → ACTIVE)  →  Deploy (ACTIVE → LIVE)

                              Rollback / Undeploy

Deployment Actions

ActionDescription
PublishTransitions a DRAFT version to ACTIVE. Locks the version — no more rule changes.
DeployPromotes an ACTIVE version to LIVE. This version now receives production traffic.
RollbackReverts the group to its previously deployed version. Creates a new deployment record.
UndeployRemoves the live version. No traffic is processed until a new version is deployed.

Step-by-Step Deployment

1. Validate with Dry Run

Before publishing, always test your rules:
lexq analytics dry-run --version-id <vid> --debug --mock \
  --json '{"facts": {"payment_amount": 150000, "customer_tier": "VIP"}}'

2. Publish

lexq deploy publish --group-id <gid> --version-id <vid> --memo "Validated"

3. Deploy to Production

lexq deploy live --group-id <gid> --version-id <vid> --memo "Go live — v3"

4. Monitor

lexq deploy overview
lexq history list --group-id <gid>
lexq history stats --group-id <gid>

Rollback

If something goes wrong after deployment:
lexq deploy history --group-id <gid>
lexq deploy rollback --group-id <gid> --memo "Reverting due to high error rate"

Undeploy

To stop all traffic processing for a group:
lexq deploy undeploy --group-id <gid> --memo "Pausing for maintenance"

Deployment History

Every deployment action is recorded with a timestamp, actor, memo, and the previous/new version:
lexq deploy history --group-id <gid>
lexq deploy detail --deployment-id <deploymentId>

Next Steps

Dry Run

Pre-deployment validation for individual inputs.

Batch Simulation

Batch validation against historical data before deploying.