05

Secure Delivery, Promotion, and Rollback

Click Publish to release the exact tested artifact, then use production feedback to build v2, apply a compatible migration, canary it, roll back, correct it, and redeploy.

The enterprise problem and today’s slice

Enterprise problem: A customer can test a preview successfully yet publish different bytes, bindings, or database assumptions, turning “Publish” into an unreviewed rebuild with no safe recovery path.

Whole-course context: Days 03–04 produced a revision-bound stateful preview and governed connectors, while the companion authorization course defines separate identities and sharing/revocation evidence; today promotes those exact tested inputs rather than recreating them.

Today’s slice: The customer releases v1, attaches a stable custom domain, responds to production feedback with a backward-compatible v2 migration, canaries v2, rolls back on a threshold breach, fixes it, and redeploys.

End-of-day evidence: Digest-bound v1/v2 manifests, provenance, SBOM, migration records, domain/TLS checks, canary observations, rollback traces, and corrected-redeploy results all carry immutable artifact or run IDs.

Still unsolved: Cross-fleet SLO ownership, incidents, break-glass, backup restoration, residency, retention, export, deletion, and retirement remain deferred.

Customer use cases

A release course can become a catalogue of delivery tools while leaving the customer's publish and recovery jobs implicit, so operators may optimize individual gates without proving a complete application change is controllable. These use cases bind each product action to visible success and failure evidence.

Use case IDActorCustomer jobSuccess outcomeDenial or recovery evidence
D05-UC-01Workboard app ownerPublish the verified v1 application through one accountable actionrel-workboard-v1 admits the Day 3 BuildArtifact, creates dep-workboard-v1 in the reused production AppEnvironment, and serves the approved digestMissing, stale, or mismatched attestation evidence denies admission before production routing changes
D05-UC-02Customer domain administratorAttach a verified custom domain and managed TLSOwnership verifies, one active DomainBinding routes to dep-workboard-v1, and a browser observes a valid certificate and Workboard responseFailed ownership or certificate verification leaves the prior platform route active and records the denial
D05-UC-03Release operatorAdd todo review_status, apply a compatible migration, and canary v2Candidate 1 remains immutable, canary evidence detects a blocking journey failure, and traffic returns to v1 while the expanded schema remainsRecovery proves v1 service without routine database restore or destructive schema reversal
D05-UC-04App owner and release approverCorrect the v2 defect and redeploy without overwriting failed evidenceNew source, digest, rel-workboard-v2-candidate-2, and dep-workboard-v2-candidate-2 repeat admission and canary gatesReusing a failed release, deployment, revision, or digest is denied as an identity violation

Actor-centred user stories

Release machinery without actor-centred acceptance can report green while the owner or operator still cannot complete the intended job, so every use case needs an observable story rather than a feature wish.

Story IDUse case IDsUser storyObservable acceptance conditions
D05-US-01D05-UC-01As a Workboard app owner, I want one Publish action to bind approved evidence to exact bytes, so that I know which v1 artifact customers receive.The product shows release, digest, source revision, approver, environment, and deployment; a mismatch produces a visible hold with no route change.
D05-US-02D05-UC-02As a customer domain administrator, I want to prove domain ownership and activate managed TLS, so that users reach Workboard at an approved address.Challenge, certificate status, active binding, DNS target, TLS probe, and prior-route behavior are observable.
D05-US-03D05-UC-03As a release operator, I want to canary the review_status change and route back safely on failure, so that customer data remains usable while exposure is bounded.The schema accepts v1 and v2, declared thresholds halt candidate 1, v1 journeys recover, and no routine data restore or contraction occurs.
D05-US-04D05-UC-04As a release approver, I want corrected v2 to have new immutable identities and repeat every gate, so that failed evidence cannot be rewritten into a pass.Candidate 2 has a distinct revision, digest, release, and deployment; admission and canary evidence binds them before promotion.

End-to-end product flows

A publish button is unsafe when hidden steps can swap bytes, partially bind a domain, or confuse routing rollback with data rollback, so these flows start with a customer-visible action and end in inspectable evidence.

Flow IDUse case IDsPathTriggerNumbered stepsTerminal evidence
D05-FLOW-01D05-UC-01HappyApp owner selects Publish v11. Resolve the approved Day 3 artifact and production environment; 2. verify provenance, signature, SBOM, policy, and approvers; 3. create immutable release and deployment; 4. route and run tenant-denial journeysReceipt names rel-workboard-v1, dep-workboard-v1, digest, environment, decision, route, and probes
D05-FLOW-02D05-UC-02DeniedDomain administrator submits a hostname without valid ownership proof1. Create a pending binding; 2. issue the ownership challenge; 3. deny certificate and route activation; 4. verify the platform hostname still serves v1Binding denial, challenge observation, no certificate, and unchanged-route probe
D05-FLOW-03D05-UC-03FailureOperator starts candidate 1 canary after the compatible review_status expansion1. Admit immutable candidate 1; 2. apply the additive migration while v1 remains compatible; 3. route a bounded cohort; 4. observe the declared journey breach; 5. halt expansionFailed observation binds rel-workboard-v2-candidate-1 and dep-workboard-v2-candidate-1; promotion never occurs
D05-FLOW-04D05-UC-03RecoveryOperator selects Route back to v11. Shift candidate traffic to dep-workboard-v1; 2. verify v1 user and denial journeys; 3. retain expanded schema and migration history; 4. record that restore and contract migration were not invokedRollback event shows recovered v1 routing, healthy journeys, compatible schema, and no routine data restore
D05-FLOW-05D05-UC-04HappyApp owner submits corrected v2 source1. Build a new digest; 2. create candidate 2 release and deployment; 3. repeat admission and migration-compatibility gates; 4. canary for the full window; 5. promoteReceipt binds corrected source and digest to rel-workboard-v2-candidate-2 and dep-workboard-v2-candidate-2; candidate 1 remains immutable

System design derived from the flows

An architecture list not derived from publish and recovery steps can omit the component that owns a denial or rollback, so each use case maps to its entry point, responsible services, authoritative state, and failure evidence.

Use case IDEntry pointResponsible servicesAuthoritative storeFailure evidence
D05-UC-01Publish v1 actionRelease service, artifact registry, provenance and SBOM verifier, admission controller, environment binding service, deployment controller, traffic managerReused Day 3 artifact registry and environment controller plus append-only release and deployment storesAdmission decision names missing or mismatched evidence; deployment and route remain absent or unchanged
D05-UC-02Add custom domain actionDomain-binding service, ownership verifier, DNS controller, certificate manager, gatewayDomain-binding store owns pending and active bindings; DNS and certificate providers execute changesChallenge observation, certificate failure, uniqueness conflict, and unchanged-route probe
D05-UC-03Start v2 canary and Route back actionsBuild service, migration controller, admission controller, deployment controller, traffic manager, journey and data-health probes, rollback controllerArtifact, migration, release, deployment, observation, decision, rollback stores; Workboard database owns review_statusFailed threshold binds candidate 1; rollback proves v1 routing and compatible schema without restore
D05-UC-04Submit corrected v2 and Promote actionSource-revision service, build service, evidence verifiers, admission controller, deployment controller, traffic managerImmutable source, artifact, release, deployment, observation, and decision recordsIdentity-reuse denial or repeated gate failure holds candidate 2 without altering candidate 1

Data model and ownership

Release state becomes untrustworthy when a new table duplicates an existing artifact or environment authority, and rollback becomes destructive when deployment state is confused with customer data. This model reuses Day 3 ownership and records artifact, routing, migration, and data lifecycles separately.

Generated-application database: Required in this slice — the Workboard data service owns tenant-scoped todos and the additive review_status field exercised by v1, failed v2, routing rollback, and corrected v2.

Record or entityStore and ownerPrimary keyForeign key or opaque referenceTenant keyMaterial constraintLifecycle and deletionUse case IDs
BuildArtifactReused Day 3 artifact registry owned by build servicebuild_artifact_digestsource_revision references immutable sourceorganization_id partitions customer artifactsDigest and bytes are immutable and cannot be reboundRetained through evidence and rollback windows, then expired by artifact policyD05-UC-01, D05-UC-03, D05-UC-04
AppEnvironmentReused Day 3 environment store owned by environment controllerenvironment_idapplication_id references app-workboardorganization_id partitions environmentsProduction identity, region, network, secret policy, and database binding are explicitRetained while deployed; destroyed after domain, data, and evidence lifecycle checksD05-UC-01, D05-UC-02, D05-UC-03, D05-UC-04
AttestationProvenance store owned by supply-chain verifierattestation_idbuild_artifact_digest is an immutable artifact referenceorganization_id scopes policySubject digest, builder, source, build type, and parameters must match policyRetained append-only with release evidence, then expired under governed retentionD05-UC-01, D05-UC-03, D05-UC-04
ReleaseRelease store owned by release servicerelease_idbuild_artifact_digest and environment_id bind bytes and targetorganization_id partitions releasesv1, failed candidate 1, and corrected candidate 2 are immutable distinct IDsRetained as release history; never overwritten, then archived or expired by policyD05-UC-01, D05-UC-03, D05-UC-04
DeploymentDeployment store owned by deployment controllerdeployment_idrelease_id and environment_id bind release to runtimeorganization_id partitions deploymentsIdempotency key is unique per target and release; all three deployment IDs remain distinctSuperseded deployments scale down but remain through rollback and investigation before purgeD05-UC-01, D05-UC-03, D05-UC-04
DomainBindingDomain store owned by domain-binding servicedomain_binding_idenvironment_id references productionorganization_id partitions domain ownershipOne active binding per hostname; ownership and certificate verify before routingPending and denied bindings expire; active binding is removed with DNS and TLS evidenceD05-UC-02
MigrationPlanMigration store owned by migration controllermigration_plan_idapplication_id and target source_revision reference the changeorganization_id partitions migration authorityState follows expand, migrate, contract; expansion remains compatible with v1 and v2Retained with schema history; contract cleanup waits beyond rollback and never accompanies route rollbackD05-UC-03, D05-UC-04
MigrationExecutionMigration store owned by migration controllermigration_execution_idmigration_plan_id, environment_id, and deployment reference bind executionorganization_id partitions executionChecksum and idempotency key prevent divergent or repeated applicationRetained as evidence; compatible expansion remains after route rollbackD05-UC-03, D05-UC-04
CanaryObservationObservation store owned by rollout controllercanary_observation_iddeployment_id references candidate and baselineorganization_id partitions observationsWindow, cohort, journey, threshold, value, and digest are immutableRetained append-only through release and incident windows, then expires by policyD05-UC-03, D05-UC-04
RolloutDecisionDecision store owned by release authorityrollout_decision_idrelease_id references exact candidateorganization_id partitions decisionsPromote, halt, or route-back includes actor, evidence, and timestampRetained append-only; superseded decisions expire only under evidence policyD05-UC-03, D05-UC-04
RollbackEventRollback store owned by rollback controllerrollback_event_idFailed and target deployment_id values identify routing changeorganization_id partitions rollbackRouting, artifact, configuration, and data actions are separate; routine data restore is falseRetained append-only with recovery evidence; never rewritten into successD05-UC-03
TodoWorkboard database owned by Workboard data serviceCompound app_tenant_id, todo_idCompound app_tenant_id, board_id references same-tenant boardapp_tenant_id is the app tenant boundaryreview_status is backward-compatible for v1 and constrained to declared v2 statesRetained under app policy; deleted with tenant or app after export and holdsD05-UC-03, D05-UC-04

Make Publish a promotion, not a hidden rebuild

If Publish compiles mutable source again, the production result can differ from the preview the customer accepted. HelixWorks therefore builds once in an isolated builder, identifies the output by cryptographic digest, tests that digest, and promotes the same immutable artifact through environments.

Environment-specific configuration remains outside the artifact but is versioned in a release manifest. Promotion verifies the digest, signature, provenance predicate, software bill of materials (SBOM), acceptance evidence, policy, and approvers before creating a deployment. It never trusts a tag such as latest or a filename as identity.

Bind the release manifest to tested facts

A dashboard can show green checks from another revision or environment, so the admission decision needs one immutable join key. The release manifest binds source, build, artifact, tests, data changes, runtime bindings, policy, and customer approval.

{
  "releaseId": "rel-workboard-v1",
  "sourceRevision": "rev-3",
  "artifactDigest": "sha256:8a94...c12e",
  "buildRunId": "build-07-001",
  "provenanceId": "att-07-001",
  "sbomDigest": "sha256:26de...91aa",
  "acceptanceRunId": "accept-06-014",
  "migrationSet": ["m001", "m002"],
  "bindingSet": "bindings-prod-17",
  "policyVersion": "release-policy-9",
  "decision": "release"
}

The admission controller verifies that evidence was observed against the same digest or an explicitly declared pre-deployment condition. It rejects stale scans, unsigned or unexpected provenance, an unapproved builder, unresolved critical findings, missing migration compatibility proof, expired exceptions, and mutable dependencies. A human release, release-with-time-bounded-exception, or hold decision remains attributable and scoped.

Promote runtime bindings without copying preview secrets

An exact artifact can still behave incorrectly if production silently inherits preview databases, tokens, or networks. Runtime bindings are environment-owned references to secrets, databases, object storage, workload identity, connector grants, egress policy, telemetry, scaling, and domains; they are validated separately from artifact identity.

The production binding set names secret references and versions, never secret values. A deployment receives a new production workload identity and can request only production-scoped credentials. Day 4’s connector definition may be promoted by an administrator, but preview and production grants remain distinct; the companion authorization course keeps user delegation user- and source-scoped. The publish action does not copy refresh tokens, preview data, customer source data, or generated-app sessions.

Run preflight checks from the production network and identity: resolve required endpoints, authenticate through the broker, execute a harmless authorized source probe, deny unapproved destinations, verify database role and tenant predicates, and confirm telemetry intake. Network reachability is not authorization, and successful secret resolution is not permission to use every resource behind that secret.

Use expand-migrate-contract database discipline

Rolling back code while a destructive schema change remains can make the prior artifact fail, so database evolution must tolerate old and new versions during a canary. HelixWorks treats artifact rollback and database rollback as different operations and favors forward-compatible recovery.

Use three phases:

  1. Expand: add nullable columns, new tables, indexes built with an availability-safe method, or dual-readable structures without removing what v1 needs.
  2. Migrate: deploy code that can read the old and new shapes, write compatibly, backfill in bounded resumable batches, and measure lag and errors.
  3. Contract: remove old columns, constraints, or paths only after v1 can no longer receive traffic, rollback windows expire, backups are verified, and an explicit approval is recorded.

The Day 5 v2 change adds feedback_status to Workboard so customers can distinguish new, reviewing, and resolved feedback. The expand migration adds the field with compatible behavior; v1 continues to function. v2 reads the field and writes valid values. Contract cleanup is deferred beyond the rollback window. A down migration is not assumed safe merely because a framework generated one.

Attach a custom domain and automate TLS safely

A stable release at the wrong hostname or with an unrenewable certificate is not production-ready, so domain ownership and certificate lifecycle are publish gates. The customer adds a DNS record for an approved hostname, and HelixWorks verifies control before routing traffic or issuing a certificate.

Use the Automated Certificate Management Environment (ACME) protocol for issuance and renewal. Scope DNS automation narrowly when DNS validation is required; do not give an app runtime unrestricted DNS credentials. Bind the verified hostname to one customer organization and deployment, prevent cross-tenant claim races, redirect HTTP to HTTPS, enable modern TLS policy, and monitor certificate expiry and renewal failures.

Test the hostname from multiple resolvers and regions, validate the certificate chain and names, confirm Host/SNI routing reaches the intended deployment, and ensure removed domains stop routing before reassignment. Domain ownership proves control of a name; it does not grant HelixWorks project membership, app role, connector access, or tenant data.

Define canary thresholds before exposing v2

Changing thresholds after seeing bad results turns a canary into a justification exercise, so the customer records promotion and rollback rules before traffic moves. Compare v2 with the accepted v1 baseline by customer journey, not only by process health.

Use a small internal or customer-approved cohort first, then bounded traffic steps such as 1%, 10%, 25%, 50%, and 100%. At each step require minimum sample size and observation time. Measure authenticated page success, tenant-authorized mutation success, latency, error rate, saturation, connector failures, migration/backfill health, and security invariants. A confirmed cross-tenant or authorization failure triggers immediate rollback regardless of error budget.

Rollback switches routing to the previous accepted digest and freezes expansion. It does not delete v2, reverse the expand migration, recall external side effects, or restore corrupted data. The incident record retains both artifact digests, cohorts, metrics, traces, audit events, and the exact threshold that fired.

Primary lab: v1 to v2, rollback, correct, and redeploy

A first release alone does not prove HelixWorks can learn safely from production, so the primary lab starts with customer feedback on v1 and completes the whole corrected-release loop. The injected v2 defect affects only one feedback-status path, making rollback evidence observable without inventing a database reversal.

Execute the lab in the production-like environment:

  1. Click Publish for v1. Verify the deployed digest equals the tested preview digest, the production binding set is approved, the migration record is compatible, and the custom hostname presents the expected certificate.
  2. Capture production feedback requesting feedback-status tracking and link it to revision rev-4. Build v2 once, generate provenance and SBOM, and run the acceptance suite against its digest.
  3. Apply additive migration m003 for feedback_status while v1 serves traffic. Prove v1 reads and writes still succeed and the backfill is bounded and resumable.
  4. Canary an intentionally defective v2 at 10%. Observe the predeclared mutation-error threshold breach and automatic stop; route all traffic back to v1 without reversing the schema.
  5. Confirm v1 remains healthy on the expanded schema. Create corrected source revision rev-5, produce a new digest, and repeat every admission check—never relabel the failed v2 artifact.
  6. Canary the corrected v2 through every step, verify tenant and authorization invariants, promote to 100%, and record customer acceptance. Leave contract cleanup blocked until the rollback window ends.

Prove artifact, data, and routing outcomes separately

A successful route switch can hide a failed migration or mismatched artifact, so evidence must distinguish code, data, configuration, and traffic decisions. Each row records actor, resource, scope, precondition, expected and observed result, environment, timestamp, plus immutable release, artifact, migration, trace, or run identifiers.

ClaimRequired observationImmutable join
Exact v1 publishedRegistry digest, runtime digest, and tested digest equalrel-workboard-v1, artifact digest, acceptance run
Production bindings validCorrect workload, secret refs, connector scope, network denialsBinding-set version and preflight trace IDs
Migration compatiblev1 and v2 operate on expanded schema; backfill metrics boundedMigration run and schema version
Canary rollback worksThreshold fires; v2 receives no new traffic; v1 recoversRouting event, threshold snapshot, both digests
Corrected redeploy worksNew digest passes admission and every canary stepNew build, provenance, SBOM, acceptance and canary run IDs
Domain/TLS worksDNS control, certificate, routing, renewal monitorDomain verification and certificate IDs

Preserve the failed v2 evidence; failure is part of the proof. A rollback rehearsal that omits the corrected redeploy tests escape, not recovery.

Keep rollback boundaries honest

Operators under pressure may assume one rollback button restores all state, which can worsen corruption or erase evidence. HelixWorks presents separate controls for traffic rollback, artifact selection, feature flags, credential revocation, migration pause, data restore, and external-side-effect reconciliation.

Artifact rollback is safe only while the database and bindings remain compatible with v1. Database restore is a later, destructive recovery operation with recovery-point loss and tenant implications; it is not part of routine code rollback. Connector calls, emails, webhooks, and downloaded data may require idempotent compensation or human reconciliation because routing cannot undo them. The release manifest names these limits before approval.

Secondary release reference

One Workboard release cannot prove every generated application has the same state or traffic shape, so secondary checks apply shared publish invariants to other archetypes. They remain reference coverage rather than separate labs.

For the revenue dashboard, verify production connector grants and delegated user grants are promoted or recreated explicitly, never copied from preview. For the public intake app, verify anonymous create stays bounded during canary and object scanning/queues remain compatible across versions. All three archetypes use immutable artifacts, digest-bound evidence, versioned bindings, compatible migrations where state exists, and independent artifact/data recovery.

Further reading

Delivery controls are strongest when their artifact, certificate, and rollout semantics come from primary specifications and project documentation. These sources were accessed on 2026-07-28.

Key takeaways

Publish is trustworthy only when it promotes tested bytes under validated production bindings and preserves a safe path through data change. Production feedback closes the loop only after a corrected artifact repeats admission and canary evidence.

  • Build once, test by digest, and promote the same immutable artifact.
  • Version production bindings and create separate workload and connector grants; never copy preview secrets or sessions.
  • Expand, migrate, then contract after rollback windows—not during the first v2 canary.
  • Treat artifact rollback, database recovery, and external compensation as different operations.
  • Preserve failed-canary evidence and require a new digest for the corrected redeploy.

Checklist

A green Publish button can conceal mismatched bytes or unsafe state changes, so each check must resolve to observed, digest-bound evidence. The failed v2 and corrected v2 are different artifacts.

  • [ ] v1 production digest equals the accepted preview digest.
  • [ ] Provenance signer/builder, SBOM, policy, approvals, and exceptions were verified.
  • [ ] Production binding set uses production workload identity, secret references, connectors, network policy, telemetry, and scaling.
  • [ ] Custom-domain ownership, TLS routing, renewal monitoring, and removal behavior were tested.
  • [ ] Expand migration remained compatible with v1 and corrected v2; contract cleanup is gated.
  • [ ] Predeclared canary thresholds include user journeys, data health, and immediate security invariants.
  • [ ] Defective v2 triggered rollback to v1 without pretending to roll back the database.
  • [ ] Corrected v2 has a new source revision and digest and repeated every admission and canary step.
  • [ ] Evidence rows include actor, resource, scope, precondition, expected and observed results, environment, timestamp, and immutable identifier.