Skip to content

Persistent/event-driven Reliability Governor follow-up #29

Description

@Svaag

Context

Production rollout of the timer-driven Reliability Governor is complete as of 2026-06-30.

Observed rollout state:

  • Governor timer is enabled and running on the loop VM.
  • Dry run and first live passes were conservative: no unexpected loop:approved labels.
  • Missing Knowledge context routed work to loop:knowledge-gap.
  • NOC LHP fetches worked for the observed handoffs and produced concrete CaseService payload hashes.
  • Engineering daemon continued consuming only loop:approved; after Governor routing, approved count was zero.

Remaining work

  1. Rollout hardening
  • Make loop protocol label creation part of the managed rollout/runbook so first live pass cannot fail on missing loop:knowledge-gap / terminal labels.
  • Review idempotency around comment/CDR writes after partial failures. The first production attempt wrote an audit record/comment before label mutation failed because labels were missing.
  • Decide whether duplicate GitHub comments should be de-duplicated or left as audit evidence.
  1. Knowledge-context recovery
  • Debug why production Knowledge MCP/context returns missing with no included_refs for current queue items.
  • Make the Governor's knowledge-gap output actionable enough for Knowledge Loop/humans to repair the missing context.
  • Confirm stale/missing/contradictory Knowledge continues to deny conservatively.
  • Re-run a production dry run after Knowledge context starts returning usable refs.
  1. Persistent/event-driven Governor design and implementation
  • Add durable inbox/outbox storage for Governor work and side effects.
  • Add GitHub webhook wakeups instead of relying only on timer polling.
  • Add NOC, Knowledge, and Engineering callback ingestion.
  • Move callback handling to reconciliation-based authorization instead of direct callback actions.
  • Preserve human merge as mandatory and keep Engineering daemon consuming only loop:approved.
  • Make GitHub comments, labels, and local CDR persistence idempotent and replay-safe.
  • Add reconciliation for missed webhook/callback events.
  • Add metrics/logging/alerts for queue depth, decision counts, callback failures, CDR writes, and label transition failures.

Acceptance criteria

  • Governor can resume safely after process restart or partial GitHub/API failure.
  • Every external mutation has a durable outbox record and can be retried without duplicate unsafe effects.
  • Webhook/callback events wake the Governor, but authorization is still derived from reconciled GitHub/Knowledge/NOC state.
  • No callback directly applies loop:approved or causes Engineering execution without Governor reconciliation.
  • CDRs remain the audit source for decisions and include enough identity material to detect stale LHP/Knowledge inputs.
  • Engineering daemon remains label-gated on loop:approved; human merge remains mandatory.

Non-goals

  • Do not relax the conservative Knowledge-deny policy.
  • Do not introduce auto-merge.
  • Do not let NOC/Knowledge/Engineering callbacks directly authorize work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    loop:knowledge-gapKnowledge context is missing, stale, or contradictory

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions