Delivery bundle
Use this bundle for CI/CD, GitOps, release artifacts, environment promotion, deployment order, and rollback evidence for Drasi projects.
Delivery principle
Drasi resource deployment should be repeatable, reviewable, environment-aware, and validated end to end before promotion.
New-project repository layout
Prefer a clear separation like:
drasi/
sources/
queries/
reactions/
validation/
environments/
dev/
test/
prod/Keep provider-specific secrets out of source control. Store only secret references, environment parameters, or non-sensitive local development placeholders.
Deployment order
Apply in forward dependency order:
- Runtime infrastructure.
- Source-system prerequisites.
- Sources.
- ContinuousQueries.
- Reactions.
- Validation tests.
- Observability and release evidence.
Rollback or delete in reverse dependency order:
- Reactions.
- ContinuousQueries.
- Sources.
- Runtime infrastructure only when required.
CI/CD gates
Use gates appropriate to the repository, such as:
- YAML/schema validation.
- Secret scanning.
- Version pin checks.
- Linting for banned production
latesttags and unbounded crate/action versions. - Skill/package validation with
scripts/validate-skill-package.pyafter changes to the skill itself. - Provider schema verification note.
- Environment parameter validation.
- Dry-run or plan step when the selected deployment tool supports it.
- Apply to dev or ephemeral environment.
- End-to-end validation bundle.
- Manual approval before production or destructive recovery.
Release artifact contents
Store or publish:
- Runtime form and versions.
- Image tag and digest.
- Source/query/reaction manifests or API payloads.
- Environment parameters excluding secrets.
- Validation output.
- Observability links.
- Rollback commands or workflow.
- Known risk notes.
Promotion rules
Promote the same reviewed artifact between environments. Do not regenerate production manifests with unreviewed differences.
Allow environment-specific differences only for:
- Resource names and suffixes.
- Secret references.
- Hostnames and network paths.
- Sizing and scaling.
- Logging retention.
- Explicitly approved feature flags.
Failure handling
If deployment fails:
- Stop promotion.
- Preserve logs and release artifacts.
- Identify the first failed dependency.
- Avoid broad retry loops that hide root cause.
- Route to
operationsfor diagnosis. - Route to
recoverybefore any destructive cleanup.
Drasi version-compatibility CI gate
Every PR that touches Drasi manifests, Drasi Server configuration, or drasi-lib Rust code MUST pass these PR-time checks. Each check fails the PR when not satisfied.
- Pinned CLI version matches the target platform release. Parse
drasiCLI version fromversions.mdand confirm it matches the platform release in the same file. - Manifest apiVersion matches the installed platform. Every Source/ContinuousQuery/Reaction manifest under
drasi/declares anapiVersionaccepted by the pinned platform release. drasi-libcrate matches the AI-context stable version. Thedrasi-libversion inCargo.tomlmatches thecurrent_stable_versionfield fromdrasi-context.yaml, OR an approved exception is documented inversions.md.- MCP spec version is declared and matches the client. The MCP Reaction config declares spec version
2025-03-26or higher, and any consumer/agent capability advertises the same version. - Image digest resolves and matches
versions.md. Every Drasi Server (or related) image reference uses@sha256:digest pinning, the digest resolves on the registry, and it matches the digest captured inversions.md.
Pseudocode example of the pinned-CLI check:
# .github/checks/drasi-cli-pin.sh
set -euo pipefail
pinned_cli="$(awk -F'`' '/Drasi CLI version/ {print $2}' versions.md)"
ci_cli="$(drasi version)" # docs document plain `drasi version`; strip any prefix/suffix your CI adds
if [ "$pinned_cli" != "$ci_cli" ]; then
echo "Pinned CLI ($pinned_cli) does not match CI CLI ($ci_cli)" >&2
exit 1
fiEquivalent checks for apiVersion, MCP spec, and image digest follow the same pattern: parse versions.md, diff against the artifact under review, fail on mismatch.
Release-notes subscription discipline
Drasi is pre-1.0 and moves quickly. Subscribe to upstream release notifications and run a quarterly diff review so breaking changes never surprise a delivery pipeline.
Upstream sources to monitor:
drasi-project/drasi-platformGitHub releases - platform release line, apiVersion bumps, CLI compatibility.drasi-project/drasi-serverGitHub releases (and the GHCR image registry until tagged releases ship) - server behaviour, REST endpoint changes, config schema.drasi-libcrate on crates.io - embedded Rust API changes.- The published
drasi-context.yaml(linked fromhttps://drasi.io/reference/context/) - authoritative current_stable_version, schemas, and AI-context surface area.
Operational discipline:
- Use GitHub's per-repository release-notification subscription (Watch -> Custom -> Releases) for every
drasi-project/*repository the delivery pipeline depends on. - Subscribe a delivery channel (mailing list, Teams channel) so notifications are not lost in an individual inbox.
- Run a quarterly diff review of
drasi-context.yaml, platform CHANGELOG, and server CHANGELOG. Record the diff in the next release artifact and updateversions.mdaccordingly. - On any notified release, run the apiVersion migration playbook (see
bundles/sources/guide.md) and the upgrade-evidence template before promoting past dev.
Release gate - SLO and load-test wiring
The version-compatibility CI gate above is necessary but not sufficient. Production-bound PRs MUST also produce the following evidence at merge, drawn from the named source bundle:
| Required evidence at merge | Source bundle | Tool / signal |
|---|---|---|
| p95 reaction latency ≤ baseline | bundles/observability/guide.md (SLO baselines table) |
Prom query against the reaction-delivery-latency metric your team registers, captured in the PR check |
| Reaction success rate ≥ baseline | bundles/observability/guide.md (SLO baselines table) |
Last-1h Prom range query against the reaction-delivery-success metric your team registers |
| Source lag ≤ baseline at steady state | bundles/observability/guide.md (SLO baselines table) |
Replication-slot / CDC lag-bytes signal exposed by the source connector |
| Load test passed at production scale | bundles/scaling-and-capacity/guide.md |
Recorded load-test run identifier and exit criteria attached to the PR |
| Acceptance evidence captured | templates/drasi-acceptance-evidence.md |
Filled template uploaded as a PR artifact |
Operational rules:
- The PR check fails if any row above is missing or below baseline; do not merge to a production-bound branch.
- If a baseline is not yet set for your environment, set one (see
bundles/observability/guide.md) before opening a production-bound PR - an unset baseline is not a free pass. - The version-compatibility gate continues to run alongside these gates; both must pass.