Skip to main content

Chapter 18. Release Readiness and Configuration Integrity

Implementation guide: detect configuration changes and monitor production consistency

What the system must detect

Juniper’s team approves a release with a refund prompt that requires identity verification. During packaging, an operator edits the prompt but leaves its version label unchanged. The new agent is deployed successfully, and latency and availability remain normal, while the first customer impact may arrive much later. A deployment dashboard that checks only the release name cannot see the edit, and a quality dashboard may need many observed cases before it detects the missing instruction.

The team needs two independent controls. Configuration integrity asks whether the combination used on a particular call was approved for that route, instance, and rollout, while behavioral consistency asks whether the deployed agent continues to meet its outcome and safety requirements. A matching configuration does not prove that the model, retrieval corpus, environment, or user behavior is unchanged. Conversely, a detected behavior change does not by itself identify its cause.

The design below is a reference implementation plan, not a claim that the companion code provides a production monitoring service. It extends Chapter 16’s versioned run manifests and evidence plane into production. The teams that own deployment authorization and business permissions retain those responsibilities; the evaluation service supplies evidence and can enforce only policies it is authorized to enforce.

Define the detection contract

The monitor needs an explicit answer for each of these conditions, not just a generic drift score:

Condition Evidence and decision
An accidental or unauthorized prompt edit, including an unchanged label Compare the loaded static template and composition artifacts against the approved release at the call boundary. An unauthorized complete combination is a mismatch.
A changed requested model, endpoint, settings, tool schema, permission, or other controlled configuration Compare the complete observed combination with the policy for the specific workload and rollout; separately list any fields the gateway cannot independently observe.
A provider backend change behind an unchanged model alias Compare provider-returned identity where available and monitor behavior. If the provider exposes no stable identity, report partial observability rather than claiming the backend is unchanged.
Degraded task outcomes, unsafe behavior, or changed tool use Compare separately defined outcome and safety measures with a suitable baseline, accounting for traffic and evaluator changes. A behavior alert does not establish which component caused it.
Missing, delayed, unverifiable, or bypassed observations Measure evidence coverage independently, expose missing calls and uncertain decisions, and apply the documented risk-specific fallback. Absence of an alert is not proof of a match.
Choose prevention and detection boundaries

For each agent route, record which changes are approved, what is observable before a model call, what can be learned only from the provider response, and which actions require synchronous authorization. Assign an owner and response time for each signal. This distinction matters because detection after a call or action can support investigation and stop subsequent traffic, but it cannot prevent an earlier side effect.

Reference architecture
Boundaries, components, and ownership

flowchart TB
    subgraph CHANGE["Change and approval boundary"]
        SRC["Prompt registry, code, model and tool configuration"]
        BUILD["Build and resolve immutable artifacts"]
        EVAL["Offline evaluation and approval"]
        REG["Approved release and rollout registry"]
        SRC --> BUILD --> EVAL --> REG
    end
    subgraph RUNTIME["Production agent and environment boundary"]
        DEP["Deployment controller"]
        AGENT["Agent runtime and prompt resolver"]
        GATE["Controlled model gateway and tool authorization"]
        TOOLS["External model and tools"]
        DEP --> AGENT --> GATE --> TOOLS
    end
    subgraph EVIDENCE["Integrity and evidence boundary"]
        CMP["Rollout-aware integrity comparator"]
        STORE["Restricted evidence and result store"]
        QUALITY["Online graders and quality monitors"]
        PROBE["Scheduled isolated synthetic probes"]
        CMP --> STORE
        QUALITY --> STORE
        PROBE --> QUALITY
    end
    subgraph RESPONSE["Response boundary"]
        ALERT["Alert, incident and rollout control"]
        OWNER["Release owner and human review"]
        ALERT --> OWNER
    end
    REG --> DEP
    REG --> CMP
    AGENT -->|deployment and runtime observations| CMP
    GATE -->|call evidence and outcomes| CMP
    GATE -->|traces and outcomes| QUALITY
    PROBE -->|synthetic calls, isolated state| GATE
    CMP --> ALERT
    QUALITY --> ALERT
    ALERT -->|authorized pause or rollback| DEP

The change and approval plane produces an approved manifest and authorizes rollout scope. The runtime boundary resolves the prompt and executes the agent with restricted credentials and tool permissions. The evidence plane compares approved and observed configuration, stores protected evidence, and runs quality checks. The response boundary routes an actionable alert to an owner and invokes only authorized rollout or fallback actions. The product team owns business policy, approval, and customer impact; platform owners operate the gateway and deployment controls; evaluation and monitoring owners qualify graders and verify evidence; security and privacy owners review access and retention. A separate service account should not be able to approve its own release, rewrite the approved registry, and suppress its own alerts.

Build incrementally: (1) inventory prompt, model, route, tool, retrieval, and feature-flag sources; (2) issue immutable manifests and record deployment events; (3) instrument the model gateway and compare observations with rollout policy; (4) add safe enforcement for the highest-risk actions; (5) add synthetic probes and quality monitoring; (6) fault-inject missing evidence and practice rollback. The minimum useful version can be an instrumented gateway and an append-only registry; a new framework or hosted evaluation vendor is not required.

Establish an approved configuration
3.1 Create an immutable release manifest

In source control, review the actual prompt and policy edits alongside agent code. Before tests run, CI resolves the prompt templates, renderer, model route, tool schemas, permissions, feature flags, retrieval configuration, and dependency versions. Evaluate that resolved candidate on the versioned suite described in the offline lifecycle chapter; bind the results, reviewer approval, and deployment authorization to the exact candidate manifest digest. If anything material changes after evaluation, produce a new candidate and re-evaluate the affected checks. Approval is not transferable to a different prompt merely because it has the same friendly version label.

The following illustrative manifest contains references, not secrets or customer content:

schema_version: agent-release/v1
release_id: juniper-release-42
agent: {service: juniper-support, build_digest: "sha256:<image>"}
prompt:
  template_id: refund-assistant
  template_version: "17"
  template_digest: "sha256:<template>"
  canonicalization: prompt-bytes/v1
  renderer_version: "renderer@3.2"
  policy_bundle_digest: "sha256:<policy>"
model:
  provider: provider-a
  endpoint: production-east
  requested_id: model-x-2026-10-01
  expected_resolved_id: model-x-2026-10-01
  settings: {temperature: 0.2, max_output_tokens: 1200}
environment:
  tool_schema_digest: "sha256:<schemas>"
  permission_profile: support-write-v5
  retrieval_index_version: support-index-42
evaluation:
  suite: release-regression@8
  grader_bundle: graders@6
  run_id: eval-42
  result: approved
approval: {owner: support-team, approved_at: "2026-11-24T18:00:00Z"}

sha256:<template> denotes a placeholder, not a valid digest. In production record the full digest, artifact location, schema version, approval identity, signing-key identifier, and immutable manifest digest. Protect the registry and release artifacts with separate write and approval privileges, audit records, encryption, and verified signatures or equivalent authenticated integrity checks. Secrets are referenced by scoped name and injected at use; never serialize them into manifests or routine traces. A secret version or permission scope can be recorded when it affects behavior without recording the secret value.

3.2 Define which versions are allowed during rollout

A rollout policy specifies allowed combinations, not independent lists. Otherwise an approved prompt for release A and an approved model for release B could form an untested combination. The policy key includes service, environment, route, tenant when applicable, deployment or workload identity, and a bounded validity interval. Its value identifies the complete approved manifest and the instance or traffic scope. During a canary, allow the old manifest for the incumbent and the new one only for designated canary instances. A completed rollout revokes or expires the old authorization according to the rollback policy. Sign or otherwise authenticate policy updates, record an increasing policy version, and reject stale replays. Store the last known verified policy with its expiry for the bounded-cache procedure below.

For example, the following policy refers to two complete manifests, not independent component allowlists. A real implementation must also bind the scopes to authenticated workload identities and include its policy version and integrity proof.

rollout_id: rollout-42
service: juniper-support
environment: production
allowed_releases:
  - {manifest: "sha256:<incumbent-manifest>", traffic_scope: existing-instances}
  - {manifest: "sha256:<candidate-manifest>", traffic_scope: approved-canary-instances}
valid_from: "2026-11-24T18:00:00Z"
expires_at: "2026-11-24T20:00:00Z"
Detect prompt changes at the point of use
4.1 Observe the effective configuration

Instrument the prompt resolver and a controlled model gateway. At every eligible model-call attempt, the gateway records the route and workload identity, release and deployment IDs, trace and span IDs, policy version, template ID and version, digest of the actual loaded static template, renderer and static policy-bundle digests, model provider, requested endpoint and model, decoding settings, and tool-schema digest. Record a resolved provider model or fingerprint only if the provider returns one. A missing fingerprint means not supplied, not unchanged. Emit a distinct terminal status when a call is blocked, fails before the provider, times out, or completes; an observed configuration is not an outcome.

4.2 Separate stable instructions from dynamic content

Compute the template identity after the runtime has selected and loaded the artifact, close to the outbound call. A startup log cannot detect a hot reload or a route-specific substitution. Where a prompt is composed from several files, fingerprint each ordered static block and the renderer/composition version. Define the byte representation, encoding, block ordering, and any transformations in a versioned canonicalization contract; preserve whitespace and order when they affect model behavior. Verify that CI and the gateway produce identical fingerprints for identical artifacts and different fingerprints for material edits. Record the canonicalization version so an algorithm migration is not mistaken for a prompt change.

Keep dynamic user messages, retrieved documents, timestamps, account fields, and conversation state separate from static template identity. Their changing values should not trigger a configuration mismatch on every request. Capture only approved metadata such as retrieval index version and access-controlled document references; do not emit raw prompt or customer content into ordinary telemetry. For confidential or guessable static text, a plain digest can enable dictionary guessing and cross-system correlation. Where that matters, compare a keyed HMAC computed by a trusted service using the same scoped key, record its key ID and canonicalization version, restrict access, and plan dual-key verification during rotation. A digest or HMAC is an integrity signal, not encryption.

Emit a protected observation.

This abbreviated event illustrates the boundary:

{
  "schema_version": "config-observation/v1",
  "event_id": "evt-1042",
  "occurred_at": "2026-11-24T18:06:12Z",
  "release_id": "juniper-release-42",
  "rollout_id": "rollout-42",
  "service": "juniper-support",
  "route": "refund",
  "instance_id": "worker-42",
  "trace_id": "trace-1042",
  "template_digest": "sha256:<observed-template>",
  "canonicalization": "prompt-bytes/v1",
  "renderer_version": "renderer@3.2",
  "policy_bundle_digest": "sha256:<observed-policy>",
  "requested_model": "model-x-2026-10-01",
  "resolved_model": null,
  "provider_fingerprint": null,
  "tool_schema_digest": "sha256:<observed-schemas>"
}

Include model endpoint, settings, environment and permission identity in the complete event even though this abbreviated example omits them. Authenticate the event producer, validate its schema, and protect the path between the gateway, comparator, and evidence store. An agent process can lie about its own configuration; an independently controlled gateway should calculate what it can from the outbound request and trusted artifact resolution. Even a gateway cannot prove what a remote provider internally executed. If some model requests bypass the gateway, enforce network policy where feasible and monitor bypasses with independent service-level traffic counts.

4.3 Compare observed against approved

Use the authenticated event and the verified policy valid for its service, route, instance, and event time. The following is decision pseudocode, not deployable authorization code:

policy = verified_policy(service, environment, route, instance, event_time)

if policy is unavailable, expired, ambiguous, or cannot be verified:
    result = UNVERIFIED
elif a required observation field is missing or invalid:
    result = INCOMPLETE
elif observed_configuration is an authorized complete combination in policy:
    result = MATCH
else:
    result = MISMATCH

Record the decision, reason, observed and expected artifact references, manifest and policy versions, event and ingestion times, and decision ID. MATCH means the observed fields matched an authorized configuration; it does not mean the agent’s output is correct. Keep INCOMPLETE, UNVERIFIED, and MISMATCH distinct. A missing provider-reported fingerprint can be an explicitly permitted partially observable model identity, but it must never be treated as a verified model snapshot. Policy lookup failure is not a match.

Make event IDs unique and process duplicates idempotently. Reconcile late and out-of-order events against the policy history valid at event time; bound accepted clock skew and flag ambiguous time windows. A replayed observation cannot extend policy validity or authorize a later action. To make later investigation possible, retain the original event, a comparison decision, and any correction with its reason and actor. The release registry must retain old policy versions long enough to investigate delayed events and honor documented retention rules.

Enforce at the consequential action boundary.

Where the risk warrants prevention, evaluate configuration authorization synchronously before the model call or consequential tool action. Define the exact boundary: an asynchronous monitoring alert can pause future rollout but cannot retroactively prevent a write already made. A tool gateway should check current authorization and the approved release identity immediately before the action, use an idempotency key and least-privilege credential, and bind the decision to the same action and configuration. If policy changes between checking and use, require revalidation at the action boundary; do not assume an earlier check authorizes later steps. A blocked or uncertain write is never silently retried as a successful action.

Detect model-version changes
Distinguish requested identity from provider evidence

Record both the requested model and the provider-returned resolved model or fingerprint when available. Compare immutable snapshots if the provider actually guarantees their identity. A mutable alias, endpoint name, or unchanged friendly label does not establish an unchanged backend. A provider-reported fingerprint is evidence under that provider’s documented semantics, not an independent attestation. When the provider does not expose a stable version, report partially observable identity and combine the signals below:

Signal Trigger and decision Limitation
Requested model, endpoint, and deployment Unexpected route or identifier triggers configuration mismatch An unchanged alias may point to a different backend
Provider-returned identifier or fingerprint Unexpected change triggers review and the applicable rollout policy May be absent, delayed, or defined differently by the provider
Provider notice or metadata poll A documented update schedules re-evaluation and ownership review Notices and polling may not reveal every update
Fixed synthetic probes A repeatable behavioral shift triggers diagnosis Limited to tested cases; stochastic variation can look like drift
Production outcomes and traces A meaningful change in eligible, comparable traffic triggers triage Traffic, tools, graders, and policy may also have changed
Respond to an unexpected model identity

On an unexpected fingerprint, retain the previous and observed identifiers, first-seen time, provider response metadata, affected releases, and alert. Correlate with provider notices, deployment events, and traffic routing; treat the unexpected identity as unapproved or unverified according to the policy rather than silently accepting it. Pause rollout or switch to an approved fallback only if the decision policy calls for it and the fallback has been tested. Run the fixed probe suite and inspect critical failures. A passing probe does not prove that the model is unchanged, and a failing one does not by itself prove a provider update caused the change.

Monitor production behavior separately
6.1 Signals

Attach release, route, model identity state, task family, risk, and other privacy-approved slice keys to outcome records. Keep configuration-integrity checks separate from quality metrics:

Measure Numerator and denominator, or unit Interpretation
Verified task completion Verified successful tasks / eligible tasks with observable outcomes; report missing outcomes separately Outcome quality for the observed population, not all started runs unless coverage supports it
Unauthorized writes Confirmed unauthorized writes / eligible runs with a write attempt A confirmed critical incident triggers a hard stop; zero observed events is not zero risk
Tool errors Failed calls / attempted calls, by tool and error type Can reveal an environment or dependency change
Policy adherence Reviewed policy-compliant cases / reviewed eligible cases Report the sampling design and missing or disputed labels; reviewed cases need not represent all traffic
Loop rate Runs exceeding a predeclared repeated-action or step threshold / eligible runs Depends on the threshold and eligible population
Latency and cost End-to-end duration per eligible run; total attributable cost / eligible runs and / verified successes Report timeouts, missing costs, and the number of successful tasks separately
Evidence completeness Eligible calls with required evidence / all independently counted eligible calls A pipeline outage cannot disappear from the denominator
Judge health Agreement and error categories on a versioned human-adjudicated reference set Judge scores can drift independently of agent quality

For each metric specify eligibility, event time, aggregation window, baseline, slice, minimum sample, owner, practical threshold, uncertainty method, and missing-data rule. A success rate over only completed, successfully graded tasks can conceal deterioration, so report missing outcomes, timeouts, traces, and ungraded cases separately.

6.2 Compare like with like

A candidate release can appear worse simply because it receives more difficult requests, or better because failed or ungraded cases are missing. To make the comparison more informative, compare candidate and incumbent on concurrently eligible traffic by task type and intent, language, risk, tool route, customer eligibility, and time window. Preserve release IDs in traces and report the denominator and missing-outcome rate for each slice. Compare against a baseline with the same outcome definition, evaluator, and observation window, or explicitly identify differences that prevent a fair comparison.

For example, compare the two releases on eligible identity-verification refund requests during the same hour, using the same success definition and adjudication procedure. If the candidate handles a higher proportion of difficult cases or its outcomes are less complete, show those differences before interpreting the aggregate. Changing traffic composition, policies, tools, or evaluators can explain a difference. An observational comparison is not proof of causal impact; plan a safe randomized experiment when the decision requires a causal estimate.

Sampling and grader qualification.

Use a probability-based sample, with known inclusion probabilities and suitable weighting, to estimate population-level outcomes. Separate targeted samples can focus on severe risks, disagreements, and rare failures; they are useful for diagnosis, but their failure rate is not the population failure rate. Where automated judges grade subjective quality, validate against independent, adjudicated human labels, monitor disagreement and abstention, and requalify after judge or rubric changes. If a judge is unavailable, retain the ungraded state and use a qualified fallback or report insufficient evidence.

6.3 Run synthetic canaries

Schedule a versioned, fixed set of synthetic tasks through the same deployment, configuration resolution, gateway, and evaluator interfaces as production. Use isolated state, non-production identities and credentials, explicitly blocked external side effects, verified reset, and separate probe labels so their results never inflate customer metrics. Include routine successful cases, hard prompt-sensitive tasks, policy boundaries such as a refund without verified identity, tool errors and recovery, structured-output and citation checks, and relevant language or modality slices.

Each probe record pins task and environment version, manifest and policy version, requested and available resolved model identity, grader version, attempt, seed or randomness metadata, evidence reference, and terminal status. Repeat stochastic cases and predeclare the schedule, number of trials, tolerable variation, and hard safety checks. Compare with a fixed reference and absolute policy requirements. A probe pass demonstrates behavior only on those cases at that time; a failure asks for investigation across prompt, model, tools, data, environment, and graders. Do not retry until green or discard failed attempts.

Example detection and response policies

The values below are illustrative decisions for Juniper, not universal targets. Choose them with the risk owner, observed volumes, and tested response capacity.

Signal and unit Example trigger and denominator Response
Configuration mismatch One authenticated eligible call with a non-authorized complete combination Page owner, stop rollout expansion, identify scope; enforce the action-boundary policy where configured
Evidence completeness Required configuration evidence received for eligible calls / independently counted eligible gateway calls; example objective 99.9% in 24 hours Alert on a miss, mark affected claims unverified, use the declared fallback for critical actions
Detection timeliness Valid mismatch events alerted within two minutes / valid mismatch events requiring an alert, measured over 28 days Escalate through a tested backup route when delivery or acknowledgement fails
Verified task degradation Candidate-minus-incumbent verified task outcome by defined eligible slice and window, with minimum volume and prespecified uncertainty rule Investigate practical effect, slice composition, missing outcomes, and evaluator health; apply release stop rules
Confirmed critical harm Any confirmed unauthorized action, irrespective of aggregate score Stop the consequential action or rollout as authorized; initiate incident response
A. Unexpected prompt or model configuration

The unit is one eligible model-call attempt. On an authenticated mismatch against the complete combination authorized for that route and rollout, page the owner, identify affected instances, and stop expanding the rollout. For consequential calls or writes, enforce the predefined block or tested human-review fallback synchronously at the appropriate boundary. Lower-risk advisory routes may instead use alerting with a time-bounded response when the risk owner has accepted that policy. Missing configuration evidence is not a match.

B. Missing configuration evidence

For completeness, count all eligible calls at the gateway independently of the event collector, then reconcile stable call IDs. For example, 9,985 complete observations out of 10,000 eligible calls is 99.85%, below a 99.9% objective; 15 missing calls must remain visible and be investigated. Define cancellations and retries before measuring: distinguish one logical request, model-call attempts, and tool-action attempts. A successful retry does not erase the earlier missing or failed attempt. Measure detection latency from authenticated observation time to successful alert delivery; report delayed events separately and test the backup route.

C. Behavioral degradation

For a defined outcome, an illustrative trigger is an absolute performance floor or a candidate-versus-incumbent degradation margin, subject to the predeclared minimum volume and uncertainty rule. Investigate affected slices, evidence completeness, and evaluator health; halt or roll back when the release policy’s stop conditions are met. A confirmed critical safety violation can trigger an immediate stop without waiting for a statistical threshold.

Behavior monitors require a reference window, primary metrics and slices, minimum volume, effect size, and a multiple-look plan. Use a valid sequential method or a prespecified persistence rule calibrated for the data rather than repeatedly checking an ordinary p-value until it crosses 0.05. The plan must also account for correlated requests, repeated users, low-volume slices, and multiple comparisons. A drift alert is a signal for review, not an automatic causal finding.

Worked incident: an accidental prompt edit

The approved manifest binds refund-assistant@17 to digest P17. A packaging edit removes identity verification but preserves the label; the gateway observes digest P17-modified. These identifiers are symbolic examples.

  1. The gateway emits an authenticated observation for the selected refund route. The comparator checks the active rollout policy and returns MISMATCH: the label matches, but the digest does not.
  2. The alert names the release, route, affected workload, first-seen time, expected and observed artifact references, and incident owner; it does not copy customer data or prompt text into the page.
  3. Rollout automation pauses expansion. For consequential writes, the independently enforced policy blocks the action or sends it to the documented human fallback. Calls already completed require separate review.
  4. The owner checks the deployment and policy history, compares protected prompt artifacts, and confirms the edit. The team either restores the complete approved release configuration or creates and evaluates a new corrected manifest.
  5. Review the affected time window and impacted actions; account for delayed or missing telemetry. A rollback must restore a compatible prompt, model route, tools, permissions, and flags, not merely one file.
  6. Add a reviewed missing-identity case to the regression suite if absent, verify that the detector and fallback work, document the incident, and close it with an owner.

If the digest matches but probes or production metrics degrade, do not declare a prompt incident. Compare provider identity, retrieval and tool versions, user mix, and grader health before attributing cause.

Reliability and operational edge cases
Failure or edge case Required behavior
Registry or policy lookup unavailable Use a previously verified cached policy only within its explicitly permitted scope and expiry; after expiry return UNVERIFIED and apply the risk-specific block, human fallback, or time-bounded escalation policy. Test availability consequences before choosing fail-closed behavior.
Collector or network unavailable Independently count eligible gateway calls, buffer only within bounded durable capacity, expose loss and lag, and reconcile IDs. Missing evidence is incomplete even if no mismatch alert arrived.
Authorized rollout overlap Match the full combination and workload/route scope against a time-bounded policy; expire old authorization and prevent replay.
Hot reload or changed flag Re-resolve and check at each affected call or action; emit a change event. A startup-only check is inadequate.
Late, duplicated, or clock-skewed events Deduplicate by event ID, retain event and ingestion times, compare with authenticated historical policy, and mark ambiguous timing unverified.
Mutable or undisclosed provider model Record partial observability, check provider metadata where available, and run probes; do not assert an immutable snapshot.
Grader unavailable or drifting Preserve missing/abstained grades; qualify a fallback or report insufficient evidence. Do not count ungraded cases as passes.
Rollback or uncertain write Roll back a tested compatible bundle; reconcile external state before retrying and enforce idempotency. An uncertain side effect is not a clean failure or success.
Sensitive prompt artifacts or traces Minimize recorded content, restrict and audit access, encrypt where appropriate, and enforce documented retention and deletion.
Acceptance tests

Before launch, test the contract end to end: inject an edited prompt with an unchanged label; inject an unauthorized model route and an unapproved prompt/model combination; exercise both valid canary versions; remove a required field; change a policy between check and action; expire the cached policy; lose and duplicate events; delay an event across rollout boundaries; simulate provider fingerprint absence and change; fail a grader; and test write isolation, rollback, and alert delivery. Verify each expected decision and incident owner, not just that a metric was emitted. Track the percentage of injected faults detected and correctly routed using the number of injected eligible faults as the denominator, plus detection latency and false alerts during known-valid rollouts. A detector that cannot prove its own coverage leaves the release decision unverified.

Chapter 16 supplies the evaluation-service package and run contracts; this design adds an approved production release manifest and call-boundary observations. The production-monitoring chapter covers statistical drift detection, Chapter 21 covers longitudinal changes, and Chapter 35 connects versioned CI gates to shadow and canary deployment.