Self-Healing Patches
When Overseer detects a production error, it classifies the fix type and applies the appropriate delivery strategy. Four fix types cover the full spectrum, from instant config changes to complete rebuilds.
Fix types
Every proposed patch is classified into one of four types based on what needs to change. The classification determines the delivery mechanism and the approval policy.
DATA_FIX patches can be auto-approved when autoApplyDataFix is enabled.PatchRuntime polls a manifest endpoint and applies DOM operations: text-replace, css-inject, attr-modify, html-replace, and script-inject. Seconds to apply.Patch lifecycle
Every patch follows a deterministic pipeline from detection to monitoring.
SDK configuration
Enable self-healing in your Codmir.init() call. The selfHealing block controls which fix types are auto-applied and how frequently the PatchRuntime polls for new manifests.
import * as Codmir from '@codmir/sdk/nextjs';
Codmir.init({
dsn: process.env.NEXT_PUBLIC_OVERSEER_DSN,
selfHealing: {
enabled: true,
autoApplyDataFix: true,
autoApplyEdgeFix: false,
manifestPollInterval: 30, // seconds
},
});enabledMaster switch. When false, the PatchRuntime is not initialized.autoApplyDataFixAutomatically apply DATA_FIX patches that pass validation. Skips the Inbox review gate for safe config changes.autoApplyEdgeFixAutomatically apply EDGE_FIX patches. Defaults to false because DOM mutations carry higher risk.manifestPollIntervalHow often (in seconds) the PatchRuntime checks for new EDGE_FIX manifests. Default is 30.CRP operations
The Client-side Runtime Patching engine supports five DOM operation types. Each operation in the manifest specifies a CSS selector, the operation type, and the payload.
text-replaceReplace text content within a matched element.css-injectInject or override CSS rules on matched elements.attr-modifyAdd, update, or remove HTML attributes.html-replaceReplace the inner HTML of a matched element.script-injectInject a script tag. Restricted to same-origin URLs for security.Security
Self-healing patches modify production behavior, so every layer is authenticated and auditable.
script-inject operations are restricted to same-origin URLs. Cross-origin scripts are blocked by the runtime.PatchEvent with the actor ID, timestamp, action type (propose, approve, reject, apply, rollback), and the full patch payload.Review gate
Every proposed patch creates an Inbox notification with the full diff, risk assessment, and one-click approve/reject actions. The review gate ensures no patch reaches production without accountability.
autoApplyDataFix is true) and EDGE_FIX (when autoApplyEdgeFix is true). INCREMENTAL and STANDARD always require manual approval.Time to resolution
Patch delivery speed depends on the fix type. All times measured from approval to production.
manifestPollInterval (default 30s).