AI Initiative logoAI Initiative
Reading room / Manthan

G-012 — Define Operations And Observability

G-012 — Define Operations And Observability. Covers 1. Job of this gate; 2. Health endpoints; 2.1 `GET /healthz` — liveness; 2.2 `GET /readyz` — readiness.

Platform design / acceptance contract
This is the retained source text, not a new validation of its claims. Numerical results and comparative claims require the accompanying source review before public reuse.

Read the connected case study or article →

driver-claude · 2026-05-06

Provenance, authorship and editorial notes

G-012 — Define Operations And Observability

Id

manthan-manthan-platform-gates-g-012-operations-observability

Project

Manthan

Source path

manthan/manthan-platform/gates/G-012-operations-observability.md

Source sha256

9c332f198664da7dbe23425c8e5b2ebfd1bd645e9a54e4387b71712d26df2826

Local copy sha256

9c332f198664da7dbe23425c8e5b2ebfd1bd645e9a54e4387b71712d26df2826

Repo head

3a94084024a3434cef331fecac91c2c3b43f0313

Date

2026-05-06

Date basis

Explicit document metadata

Author

driver-claude

Author basis

Author

Last source commit

8b75d1b0157c20a0a463f0e31008ef9f73099beb

Last source commit date

2026-06-08T07:40:14Z

Document status

Platform design / acceptance contract

Summary

G-012 — Define Operations And Observability. Covers 1. Job of this gate; 2. Health endpoints; 2.1 `GET /healthz` — liveness; 2.2 `GET /readyz` — readiness.

Topics
  • From protocol to platform
  • 1. Job of this gate
  • 2. Health endpoints
  • 2.1 `GET /healthz` — liveness
Theme

From protocol to platform

Priority

deep

Related ids
  • manthan-manthan-platform-gates-g-001-mvp-workflow
Evidence concerns
  • Recovered source text is preserved verbatim. Assertions, comparisons, commands and results belong to its original context; they were not re-executed or externally re-verified during this corpus review.
Word count

822

Bytes

7401

Source relative

manthan-platform/gates/G-012-operations-observability.md

Remote mirror

manthan/manthan-platform/gates/G-012-operations-observability.md

Full text preserved

True

G-012 — Define Operations And Observability

Status: drafted → reviewed → accepted → closed.
Author: driver-claude
Date: 2026-05-06


1. Job of this gate

Per gemini's tracker §G-012: a Manthan deployment without observability becomes opaque. Define /healthz, /readyz, metric set, and alerting policy before any deployment.

2. Health endpoints

Every Manthan service (reference-Herald, conduit, scribe, agent SDK runtime) exposes:

2.1 GET /healthz — liveness

Returns 200 if the process is alive and not deadlocked. Cheap; no I/O.

{ "status": "ok", "uptime_seconds": <uint>, "build": "<git-sha>" }

Used by container orchestrators (Kubernetes, systemd) to decide whether to restart the process.

2.2 GET /readyz — readiness

Returns 200 only if the service can serve real traffic. Performs minimal I/O:

{
  "ready": true|false,
  "checks": {
    "db": "ok|degraded|fail",
    "key": "ok|fail",
    "charter": "ok|expiring_in_<n>_days|expired",
    "upstream_reachable": "ok|fail|unknown"
  }
}

Returns 503 with the failing-check detail when ready: false.

3. Metrics surface

Prometheus-style metrics at GET /metrics. Names follow manthan_<area>_<measurement>_<unit>:

3.1 Envelope-traffic metrics

manthan_envelopes_received_total{state, source} counter
manthan_envelopes_verified_total{result}        counter   # result = ok|signature_invalid|tampered|...
manthan_envelopes_quarantined_total{reason}     counter
manthan_verification_duration_seconds            histogram
manthan_envelope_state_total{state}              gauge    # current count per state

3.2 Gossip / peer metrics

manthan_peer_count{state}                       gauge     # state = active|degraded|excluded
manthan_gossip_frames_total{type, direction}    counter
manthan_dedupe_cache_size                       gauge
manthan_dedupe_hit_rate                         gauge     # 0.0–1.0 sliding window

3.3 CT-log metrics

manthan_ct_submissions_total{result}             counter   # result = ok|retry|failed
manthan_ct_submit_latency_seconds                histogram
manthan_ct_sip_age_seconds                       histogram # how old is the SIP we have for envelopes
manthan_ct_sth_age_seconds                       gauge     # time since last STH refresh
manthan_ct_pending_submissions                   gauge     # queue depth

3.4 Storage metrics

manthan_ledger_size_bytes                        gauge
manthan_ledger_fsync_duration_seconds            histogram
manthan_ledger_envelope_count                    gauge
manthan_backup_age_seconds                       gauge     # time since last successful backup

3.5 Patina / reputation metrics

manthan_patina_compute_duration_seconds          histogram
manthan_patina_publication_age_seconds           gauge
manthan_patina_last_recompute_unix               gauge

3.6 System / process metrics

manthan_memory_resident_bytes                    gauge
manthan_open_sockets                             gauge
manthan_clock_skew_seconds                       gauge     # vs NTP-derived reference

3.7 Domain-specific metrics

For Herald:

manthan_endorsements_issued_total                counter
manthan_endorsements_refused_total{reason_code}  counter

For Conduit:

manthan_conduit_relayed_total                    counter
manthan_conduit_refused_total{reason_code}       counter
manthan_conduit_per_sigil_refusal_rate{sigil}    gauge     # per [EXT §5.4]

For Scribe:

manthan_transcripts_emitted_total                counter
manthan_transcript_method_total{method}          counter   # verbatim|summary|...

For Churn engine (Phase 2):

manthan_churn_seeds_consumed_total{class}        counter   # cryptographic|creative|environmental
manthan_research_findings_emitted_total          counter

4. Alerts

Alerts are deployment-policy, not protocol — but the operator MUST configure at minimum:

AlertTriggerSeverity
stale-sthmanthan_ct_sth_age_seconds > MMD * 2SEV-1
ct-submit-failuresrate(manthan_ct_submissions_total{result="failed"}[10m]) > 0.01SEV-2
queue-saturationmanthan_ct_pending_submissions > 10000SEV-2
disk-exhaustiondisk_free < 10% of mount holding data/SEV-1
clock-skewabs(manthan_clock_skew_seconds) > 60SEV-2
peer-collapsemanthan_peer_count{state="active"} < 2 for 5+ minutesSEV-1
repeated-verifier-failuresrate(manthan_envelopes_verified_total{result!="ok"}[5m]) > 0.5SEV-2 — possible adversary or bug
backup-stalemanthan_backup_age_seconds > 86400 * 2SEV-3
charter-expiringmanthan_charter_age_seconds > 86400 * 330 (330 days = ~11 months)SEV-3
ledger-corruptionPRAGMA quick_check non-OKSEV-1 + immediate quarantine per G-010

Severity definitions follow R-203 §8 incident-disclosure taxonomy.

5. Logging

Structured JSON logs to stderr (or syslog/journald). Required fields per log entry:

{
  "ts":         <ISO 8601>,
  "level":      "trace|debug|info|warn|error|fatal",
  "service":    "reference-herald|conduit|scribe|agent|injector|...",
  "sigil":      "<sigil if applicable>",
  "trace_id":   "<request trace id, if applicable>",
  "envelope_id": "<if relevant>",
  "msg":        "<freeform>"
  ... + structured fields per event ...
}

MUST NOT log:

6. Tracing

Each MWP session and each CT submission carries a trace_id (16-byte random hex). Logs include this; metrics carry it as a label only at debug-level cardinality.

For Phase 2+, OpenTelemetry-compatible spans are emitted for:

7. Acceptance criteria

8. What G-012 does NOT cover

9. Sign-off


— G-012 closed, 2026-05-06.

Continue exploring