my-homelab-configs/apps/opsproof
juvenal.diaz 193f07b044
Homelab Main / validate (push) Failing after 1m28s Details
Homelab Main / running-update (push) Has been skipped Details
Homelab Main / debian-ops (push) Has been skipped Details
Add OpsProof incident evidence view
2026-12-04 15:59:12 -06:00
..
overlay Add OpsProof incident evidence view 2026-12-04 15:59:12 -06:00
README.md Add OpsProof incident evidence view 2026-12-04 15:59:12 -06:00

README.md

OpsProof

OpsProof is an evidence-first operations workspace built on top of Jeannie. It turns the homelab's existing status, Doctor, incident, and change-journal data into a reviewable workflow:

  1. show desired and observed state together;
  2. preserve the commands and output that support a diagnosis;
  3. explain the likely root cause without treating AI output as evidence;
  4. propose an allowlisted Jeannie mitigation with risk and rollback context;
  5. require an explicit operator approval before a state-changing request;
  6. validate the result and produce a reusable incident report.

Technology decision

The UI will use Laravel Go with Inertia, React, and TypeScript. Laravel Go fits the repository's existing Go services and produces a single deployable binary while still providing a modern client UI. Laravel Rust was considered, but it would add a second systems language without improving the first OpsProof use cases.

Laravel Go is currently beta and requires Go 1.27 or newer. OpsProof therefore lives in its own module and deployment boundary. The UI must depend on the stable OpsProof/Jeannie HTTP contract rather than importing Jeannie internals, so the framework can be upgraded or replaced without changing remediation authority.

The application will run on Debian, outside Kubernetes. It must remain usable when the cluster is the component being diagnosed.

The Debian installation is owned by the Jeannie pipeline:

./jeannie deploy-opsproof

The command starts a dedicated, persistent PostgreSQL container, downloads a checksum-pinned Go 1.27 toolchain into the OpsProof data directory, checks out an exact Laravel Go starter commit, normalizes the UI overlay with that starter's pinned formatter, runs its frontend checks and build, runs the Go feature tests against PostgreSQL, builds the binary, applies database migrations, installs a hardened systemd unit, and verifies /up. Database credentials are generated once and retained in the private OpsProof data directory. Jeannie resolves the database account's UID and GID from the image before preparing the bind mount, so it does not depend on a host-specific numeric account. The single OpsProof process uses Laravel Go's supported in-memory cache and session stores; durable application records remain in PostgreSQL. A successful redeployment explicitly restarts the systemd service so updated listen addresses and other environment values take effect. It does not replace Debian's system Go.

The landing page collects status all --json through the authenticated Jeannie API on the server side. Browser props contain only the status, area, check, and summary fields; the bearer token and raw diagnostic details remain on Debian. If the API, token, execution, or JSON contract is unavailable, OpsProof fails closed and labels the overview unavailable instead of presenting stale data as current. Warning and failing checks show a read-only focused Doctor command but cannot submit it.

Unhealthy Kubernetes applications link to /incidents/cluster/{application}. The incident page runs the exact focused Doctor target with --json, assigns stable evidence IDs to the returned rows, and presents bounded command-output excerpts, observed state, missing evidence, and root-cause hypotheses. Route input is restricted to Kubernetes application names and cannot become arbitrary Jeannie arguments. The page deliberately has no mitigation control.

Security boundary

OpsProof is not a shell console.

  • Read operations consume structured data from authenticated Jeannie API endpoints.
  • Mutations submit only commands advertised by Jeannie's allowlist.
  • A proposal and an approval are separate records.
  • The server revalidates command, arguments, current evidence, and operator identity at execution time.
  • Secrets and raw bearer tokens are never sent to browser props or reports.
  • Every proposal, approval, execution, validation, and report is auditable.
  • Public portfolio mode uses sanitized fixtures and cannot reach the execution API.

Delivery slices

Each slice should be a small, independently testable commit:

  1. architecture decision and API contract;
  2. Laravel Go/Inertia application shell and health page;
  3. read-only homelab overview backed by Jeannie status;
  4. incident evidence page backed by Doctor output (implemented for Kubernetes applications);
  5. remediation proposal with risk and rollback details;
  6. Dex login and operator authorization;
  7. approval-gated execution and live progress;
  8. post-change validation and incident report;
  9. sanitized public demo mode and portfolio link.

Initial demonstration

The first complete scenario will model the Orange Pi K3s storage incident:

  • desired state: the pinned SSD is mounted read-write and K3s is active;
  • observed state: a stale read-only mount refers to a disappeared device;
  • evidence: service state, mount identity, block-device inventory, and kernel filesystem errors;
  • proposal: the existing guarded doctor opi5 --repair-k3s path;
  • validation: pinned cluster identity, node readiness, and application health;
  • report: findings, diagnosis, 5 Whys, mitigation, and validation evidence.

This scenario is valuable to a prospective client because it demonstrates diagnosis, safety design, AI-assisted reasoning, infrastructure automation, observability, and a verified operational outcome rather than a chat demo.