Skip to content

petrova_act_reconcile_drift

Reconcile a drifted consumer registry entry. Given a slug whose state-sweep reports contract_drift=true, opens a PR against petrova-codes:main bumping registry.yaml > repos[slug].contract_sha to match the consumer’s current .petrova/contract.yaml SHA. Co-emits a docs/decisions/-petrova_act_reconcile_drift-.md ADR recording the realignment. target_repo MUST be petrova-codes (control-plane self-edit).

Upholds: MR-4 · MR-7 · MR-12 Side effects: Creates branch petrova/registry-edit/petrova_act_reconcile_drift/ in petrova-codes. Modifies registry.yaml. Adds the ADR. Opens a PR labelled registry-edit + awaiting-human-merge. Does NOT auto-merge (MR-12).

  • TARGET_REPO_IS_PETROVA_CODES — envelope.target_repo must be ‘petrova-codes’ — this verb is a control-plane self-edit.
  • SLUG_NOT_IN_REGISTRY — params.slug must already appear in registry.yaml. Use petrova_act_register_consumer for new entries.
  • STALE_SWEEP_REPORT — state/.yaml’s last_full_sweep must be ≤60 minutes old. Refuses on stale drift signal — operator must re-sweep.
  • NO_DRIFT_DETECTED — state/.yaml’s contract_drift must be true and actual_contract_sha must be present.
  • slugRepoSlug (required)
  • registry_path string
  • adr_path string
  • before_contract_sha string
  • after_contract_sha string
  • prPRRef
  • diff_previewDiffPreview

Input:

{
"envelope": {
"verb": "petrova_act_reconcile_drift",
"target_repo": "petrova-codes",
"idempotency_key": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"dry_run": true,
"actor": "human:alex@devarno.com",
"triggered_by": {
"kind": "drift_check",
"ref": "state-sweep:2026-05-14T09:00Z"
}
},
"params": {
"slug": "choco-hq"
}
}

Output (output_dry_run):

{
"envelope": {
"verb": "petrova_act_reconcile_drift",
"status": "dry_run",
"idempotency_key": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"mr_citations": [
"MR-4",
"MR-7",
"MR-12"
]
},
"result": {
"registry_path": "registry.yaml",
"adr_path": "docs/decisions/2026-05-14-petrova_act_reconcile_drift-choco-hq.md",
"before_contract_sha": "aaaaaaaa",
"after_contract_sha": "bbbbbbbb",
"diff_preview": {
"files": [
{
"path": "registry.yaml",
"operation": "modify"
},
{
"path": "docs/decisions/2026-05-14-petrova_act_reconcile_drift-choco-hq.md",
"operation": "create"
}
],
"branch": "petrova/registry-edit/petrova_act_reconcile_drift/choco-hq",
"commit_message": "act(petrova): reconcile drift for choco-hq"
}
}
}

(no recipe yet — see SKILL guide)