Overview
Following the "CloudWatch Lesson" and the recording of the Observability Mandate (State over Streams), we must transition Mecris from a system that relies on unstructured log files to a self-describing, state-driven architecture.
The goal is to move from "Grep for logs" to "Describe the state."
Philosophy: "If you need a log to know what happened, your system is opaque. If your system is observable, the state tells the story."
The Auditor's Corollary: "If you can't tell what happened from the log, your system is inscrutable to auditors. They will always use the logs."
Requirements
1. Database Schema Evolution
2. Peer-to-Peer Reporting Responsibility
3. Rust WASM Backend (Cloud Hub)
4. Local Host (Python MCP Peer)
5. Mobile Host & Standard Bus
6. Auditability & Persistence
7. Observability Tools (The "Describe" Command)
References
docs/OBSERVABILITY_MANDATE.md
docs/AKAMAI_CRON_EVALUATION.md
ARCHITECTURE.md (Peer Persistence Model)
Overview
Following the "CloudWatch Lesson" and the recording of the Observability Mandate (State over Streams), we must transition Mecris from a system that relies on unstructured log files to a self-describing, state-driven architecture.
The goal is to move from "Grep for logs" to "Describe the state."
Philosophy: "If you need a log to know what happened, your system is opaque. If your system is observable, the state tells the story."
The Auditor's Corollary: "If you can't tell what happened from the log, your system is inscrutable to auditors. They will always use the logs."
Requirements
1. Database Schema Evolution
scheduler_electiontable with the following columns:last_status: (String) What the process did during its last turn (e.g., "Sent Walk Reminder", "Stood down (fresh Android heartbeat)", "Sync Complete").last_error: (Text/JSON) Details of any failure that occurred.intent: (String) What the process was trying to do.2. Peer-to-Peer Reporting Responsibility
3. Rust WASM Backend (Cloud Hub)
sync-service/src/lib.rsto record every "Silent Decision" (especially stand-downs) into thescheduler_election.last_statusfield.last_errorso they appear in the system pulse without log access.4. Local Host (Python MCP Peer)
scheduler.py(Local Leader) to report its task-level status and intent.5. Mobile Host & Standard Bus
HeartbeatWorkerto report its internal state via the new status columns.6. Auditability & Persistence
message_logandautonomous_turnstables serve as the definitive audit trail, capturing enough context that a third party can reconstruct system history without access to ephemeral stdout/stderr.7. Observability Tools (The "Describe" Command)
get_system_health: Update the MCP tool to return and format these new status/error fields.last_statusstring for each modality (Fermyon, Akamai, Local).References
docs/OBSERVABILITY_MANDATE.mddocs/AKAMAI_CRON_EVALUATION.mdARCHITECTURE.md(Peer Persistence Model)