Commit graph

3 commits

Author SHA256 Message Date
69297f1ac0 feat(web): minimal LiveView dashboard, ceremonies, artifacts
Three LiveView modules reading from the Ops DB:

- DashboardLive at /: governance overview with artifact count,
  healthy/drifted deployment states, and the five most recent
  verification results. Subscribes to Guildhall.PubSub for
  ceremony:* and posture:* topics.

- CeremonyLive.Index at /ceremonies: lists open ceremonies. Query
  finds the latest custody_transition per artifact and keeps the
  ones where to_state = 'ceremony_open'. PubSub-driven refresh.
  Will integrate with substrate CRD watcher in a future sprint.

- ArtifactLive.Index at /artifacts: lists governed artifacts with
  name, type, tier, truncated CID, and aggregate drift status
  derived from their deployment_states.

Router updated to mount these LiveViews at /, /ceremonies,
/artifacts. Default PageController route removed.

Inline Heex templates (no separate .html.heex files); uses
Tailwind classes from Phoenix 1.8 default CSS.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Tyler J King <tking@guildhouse.dev>
2026-04-18 07:19:31 -04:00
4d9acf96d8 feat(ops_db): Ecto schemas for five Ops DB tables
Direct translation of DESIGN-OPS-DB-CHAIN-OF-CUSTODY-0001 §2.2:
- AccordBinding: governance context per artifact
- GovernedArtifact: registry with JSONB content + content_schema
- CustodyTransition: append-only chain of custody
- DeploymentState: current deployment per (artifact, target)
- VerificationResult: continuous attestation records
- ProjectorCheckpoint: Chronicle projector resume state

All JSONB fields use Ecto :map type (Postgres JSONB).
GIN indexes (jsonb_path_ops) on accord_terms and content columns.
Partitioning notes for time-series tables (DBA applies in prod).
Migrations renumbered to enforce FK dependency order
(accord_bindings → governed_artifacts → dependents).

Dev seed data (priv/repo/seeds.exs) creates nine governed artifacts
matching the JSONB content examples in the design doc §2.3
(Intune profile, DNS zone, DSC MOF, YANG config, Helm values,
JEA role, Conditional Access, TLS cert, OCI image) plus custody
transitions, deployment states, and verification results.

Verified: mix ecto.create + mix ecto.migrate + mix run seeds all
pass; 9 artifacts in governed_artifacts table.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Tyler J King <tking@guildhouse.dev>
2026-04-18 07:17:51 -04:00
4e22729bef feat: scaffold guildhall Elixir umbrella
Ceremony orchestrator + governance UI layer over substrate CRDs.
guildhall presents and coordinates; substrate decides and enforces.

Apps:
- guildhall_web: Phoenix LiveView UI for ceremony workflows,
  Forge visualization, posture dashboards
- guildhall_orchestrator: watches CeremonyRequest CRDs, notifies
  witnesses, collects signatures, tracks ceremony lifecycle
- guildhall_ops_db: Ecto schemas for the five Ops DB tables
  (per DESIGN-OPS-DB-CHAIN-OF-CUSTODY-0001)
- guildhall_graph_bridge: Microsoft Graph API reconciler (stub)
- guildhall_chronicle: Chronicle event consumer + Ops DB
  projector (stub)

Naming: guildhall components are orchestrators (workflow),
NOT engines (enforcement). The ceremony engine is a substrate
K8s operator. guildhall coordinates humans around CRDs.

Elixir 1.17.3 / OTP 27 / Phoenix 1.8.5. SHA-256 git repo.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Tyler J King <tking@guildhouse.dev>
2026-04-18 07:09:20 -04:00