Loading Lion artifact…
Inspect Lion Program Source (JSON)
[
  "begin",
  [
    "relation",
    "dev_node",
    [
      "id",
      "label",
      "kind",
      "team",
      "summary",
      "tone"
    ],
    {
      "certified": true,
      "description": "Engineering graph entities: specs, pull requests, services, and release gates",
      "key": [
        "id"
      ]
    }
  ],
  [
    "relation",
    "dep",
    [
      "from",
      "to",
      "rel",
      "tone"
    ],
    {
      "certified": true,
      "references": {
        "from": [
          "dev_node",
          "id"
        ],
        "to": [
          "dev_node",
          "id"
        ]
      }
    }
  ],
  [
    "relation",
    "ui_state",
    [
      "k",
      "v"
    ],
    {
      "key": [
        "k"
      ]
    }
  ],
  [
    "fact",
    [
      "dev_node",
      "spec_42",
      "RFC-42: Ledger v2",
      "spec",
      "core-eng",
      "Adds idempotent invoice keys across Checkout and Billing.",
      "ok"
    ],
    [
      "dev_node",
      "pr_418",
      "PR #418: Schema",
      "pr",
      "core-eng",
      "Introduces non-null invoice_key column on ledger_entries.",
      "accent"
    ],
    [
      "dev_node",
      "mig_job",
      "Migration #88",
      "migration",
      "data-infra",
      "Backfills invoice_key on 14M existing rows before deploy.",
      "ok"
    ],
    [
      "dev_node",
      "checkout_svc",
      "Checkout API",
      "service",
      "payments",
      "Writes new ledger entries on every card capture.",
      "ok"
    ],
    [
      "dev_node",
      "billing_svc",
      "Billing Worker",
      "service",
      "payments",
      "Reconciles daily settlement batches; fails on null invoice_key.",
      "ok"
    ],
    [
      "dev_node",
      "rel_24",
      "Release v2.4",
      "release",
      "release-eng",
      "Production rollout gated on migration + integration checks.",
      "accent"
    ],
    [
      "dep",
      "spec_42",
      "pr_418",
      "specified_by",
      "ok"
    ],
    [
      "dep",
      "pr_418",
      "mig_job",
      "requires",
      "ok"
    ],
    [
      "dep",
      "mig_job",
      "checkout_svc",
      "prepares",
      "ok"
    ],
    [
      "dep",
      "checkout_svc",
      "billing_svc",
      "feeds",
      "ok"
    ],
    [
      "dep",
      "billing_svc",
      "rel_24",
      "verified_for",
      "ok"
    ],
    [
      "ui_state",
      "selected",
      "pr_418"
    ],
    [
      "ui_state",
      "skip_migration",
      false
    ]
  ],
  [
    "relation",
    "impacts",
    [
      "src",
      "dst"
    ]
  ],
  [
    "rule",
    [
      "impacts",
      "?a",
      "?b"
    ],
    [
      "dep",
      "?a",
      "?b",
      "?_r",
      "?_t"
    ]
  ],
  [
    "rule",
    [
      "impacts",
      "?a",
      "?c"
    ],
    [
      "dep",
      "?a",
      "?b",
      "?_r",
      "?_t"
    ],
    [
      "impacts",
      "?b",
      "?c"
    ]
  ],
  [
    "define",
    "view",
    [
      "lambda",
      [],
      [
        "begin",
        [
          "define",
          "sel",
          [
            "array/head",
            [
              "find",
              "?v",
              [
                "ui_state",
                "selected",
                "?v"
              ]
            ]
          ]
        ],
        [
          "define",
          "skip_mig",
          [
            "array/head",
            [
              "find",
              "?v",
              [
                "ui_state",
                "skip_migration",
                "?v"
              ]
            ]
          ]
        ],
        [
          "define",
          "nodes",
          [
            "find",
            {
              "group": "?kind",
              "id": "?id",
              "label": "?label",
              "subtitle": "?kind",
              "tone": [
                "cond",
                [
                  [
                    "boolean/and",
                    "skip_mig",
                    [
                      "=",
                      "?id",
                      "billing_svc"
                    ]
                  ],
                  "error"
                ],
                [
                  "else",
                  "?tone"
                ]
              ]
            },
            [
              "dev_node",
              "?id",
              "?label",
              "?kind",
              "?_team",
              "?_sum",
              "?tone"
            ]
          ]
        ],
        [
          "define",
          "edges",
          [
            "cond",
            [
              "skip_mig",
              [
                "assuming",
                [
                  "fact",
                  [
                    "dep",
                    "pr_418",
                    "billing_svc",
                    "UNMIGRATED_WRITE (P0 RISK)",
                    "warn"
                  ]
                ],
                [
                  "find",
                  {
                    "from": "?a",
                    "label": "?r",
                    "to": "?b",
                    "tone": "?t"
                  },
                  [
                    "dep",
                    "?a",
                    "?b",
                    "?r",
                    "?t"
                  ]
                ]
              ]
            ],
            [
              "else",
              [
                "find",
                {
                  "from": "?a",
                  "label": "?r",
                  "to": "?b",
                  "tone": "?t"
                },
                [
                  "dep",
                  "?a",
                  "?b",
                  "?r",
                  "?t"
                ]
              ]
            ]
          ]
        ],
        [
          "define",
          "blast_rows",
          [
            "find",
            {
              "id": "?dst",
              "kind": "?k",
              "node": "?l",
              "team": "?team"
            },
            [
              "and",
              [
                "impacts",
                "sel",
                "?dst"
              ],
              [
                "dev_node",
                "?dst",
                "?l",
                "?k",
                "?team",
                "?_s",
                "?_t"
              ]
            ]
          ]
        ],
        [
          "define",
          "sel_info",
          [
            "array/head",
            [
              "find",
              {
                "kind": "?k",
                "label": "?l",
                "summary": "?sum",
                "team": "?team"
              },
              [
                "dev_node",
                "sel",
                "?l",
                "?k",
                "?team",
                "?sum",
                "?_t"
              ]
            ]
          ]
        ],
        [
          "define",
          "why_rel",
          [
            "why",
            [
              "impacts",
              "pr_418",
              "rel_24"
            ]
          ]
        ],
        [
          "ui/stack",
          {
            "gap": "lg"
          },
          [
            "ui/hero",
            {
              "badges": [
                "quote",
                [
                  {
                    "label": "Engineering Dev Graph",
                    "tone": "accent"
                  },
                  {
                    "label": "Transitive Blast Radius",
                    "tone": "ok"
                  },
                  {
                    "label": "Counterfactual Release Check",
                    "tone": "warn"
                  }
                ]
              ],
              "eyebrow": "Omnigraph Blueprint 02 · Software Delivery",
              "subtitle": "Map specs, PRs, migrations, services, and release gates into one queryable graph. Click any artifact to compute its exact downstream blast radius before merging.",
              "title": "Engineering Dependency & Blast-Radius Graph"
            }
          ],
          [
            "ui/grid",
            {
              "cols": 3,
              "gap": "md"
            },
            [
              "ui/metric",
              {
                "caption": [
                  "object/get",
                  "sel_info",
                  "kind"
                ],
                "label": "Focused Artifact",
                "tone": "accent",
                "value": [
                  "object/get",
                  "sel_info",
                  "label"
                ]
              }
            ],
            [
              "ui/metric",
              {
                "caption": "Transitively impacted downstream nodes",
                "label": "Blast Radius",
                "value": [
                  "array/length",
                  "blast_rows"
                ]
              }
            ],
            [
              "ui/metric",
              {
                "caption": [
                  "cond",
                  [
                    "skip_mig",
                    "Migration #88 bypassed"
                  ],
                  [
                    "else",
                    "Migration #88 precedes rollout"
                  ]
                ],
                "label": "Release v2.4 Gate",
                "tone": [
                  "cond",
                  [
                    "skip_mig",
                    "error"
                  ],
                  [
                    "else",
                    "ok"
                  ]
                ],
                "value": [
                  "cond",
                  [
                    "skip_mig",
                    "BLOCKED (P0)"
                  ],
                  [
                    "else",
                    "PASS"
                  ]
                ]
              }
            ]
          ],
          [
            "ui/section",
            {
              "badge": [
                "cond",
                [
                  "skip_mig",
                  "P0 Risk Simulated"
                ],
                [
                  "else",
                  "Safe Pipeline"
                ]
              ],
              "step": "01",
              "subtitle": "Click any node to shift focus and recompute its transitive blast radius. Toggle the counterfactual branch to preview bypassing Migration #88.",
              "title": "Delivery Pipeline & What-If Branch",
              "tone": [
                "cond",
                [
                  "skip_mig",
                  "error"
                ],
                [
                  "else",
                  "ok"
                ]
              ]
            },
            [
              "ui/card",
              [
                "ui/toggle",
                {
                  "checked": "skip_mig",
                  "label": "Simulate counterfactual branch: Merge PR #418 directly without Migration #88 (assuming)",
                  "onChange": [
                    "quote",
                    [
                      "fact",
                      [
                        "ui_state",
                        "skip_migration",
                        "value"
                      ]
                    ]
                  ]
                }
              ]
            ],
            [
              "cond",
              [
                "skip_mig",
                [
                  "ui/alert",
                  {
                    "title": "Release Policy Violation: Unmigrated Production Write",
                    "tone": "error"
                  },
                  "Bypassing Migration #88 exposes Billing Worker to null invoice_key crashes. Release v2.4 is automatically blocked."
                ]
              ]
            ],
            [
              "ui/graph",
              {
                "edges": "edges",
                "height": 230,
                "layout": "layered",
                "nodes": "nodes",
                "onSelect": [
                  "quote",
                  [
                    "fact",
                    [
                      "ui_state",
                      "selected",
                      "value"
                    ]
                  ]
                ],
                "selected": "sel",
                "title": "Engineering Delivery DAG"
              }
            ]
          ],
          [
            "ui/section",
            {
              "step": "02",
              "subtitle": "Every row below is transitively reachable from your selected node via recursive Datalog. Click any row to jump focus downstream.",
              "title": "Downstream Blast Radius & Node Details"
            },
            [
              "ui/split",
              {
                "gap": "md",
                "ratio": "3:2"
              },
              [
                "ui/table",
                {
                  "columns": [
                    "quote",
                    [
                      {
                        "key": "node",
                        "label": "Impacted Artifact"
                      },
                      {
                        "key": "kind",
                        "label": "Type"
                      },
                      {
                        "key": "team",
                        "label": "Owning Team"
                      }
                    ]
                  ],
                  "onSelect": [
                    "quote",
                    [
                      "fact",
                      [
                        "ui_state",
                        "selected",
                        "value"
                      ]
                    ]
                  ],
                  "rowKey": "id",
                  "rows": "blast_rows",
                  "selected": "sel",
                  "title": "Transitively Impacted Nodes (click to focus)"
                }
              ],
              [
                "ui/card",
                {
                  "subtitle": [
                    "object/get",
                    "sel_info",
                    "summary"
                  ],
                  "title": [
                    "object/get",
                    "sel_info",
                    "label"
                  ]
                },
                [
                  "ui/kv",
                  {
                    "columns": 2,
                    "items": [
                      "array/make",
                      {
                        "label": "ID",
                        "mono": true,
                        "value": "sel"
                      },
                      {
                        "label": "Team",
                        "value": [
                          "object/get",
                          "sel_info",
                          "team"
                        ]
                      },
                      {
                        "label": "Kind",
                        "value": [
                          "object/get",
                          "sel_info",
                          "kind"
                        ]
                      },
                      {
                        "label": "Downstream Count",
                        "value": [
                          "array/length",
                          "blast_rows"
                        ]
                      }
                    ]
                  }
                ]
              ]
            ]
          ],
          [
            "ui/section",
            {
              "step": "03",
              "subtitle": "Audit the exact causal chain connecting PR #418 to Release v2.4.",
              "title": "Causal Trace & Branch Diff"
            },
            [
              "cond",
              [
                "skip_mig",
                [
                  "ui/diff",
                  {
                    "added": [
                      "quote",
                      [
                        "[\"dep\", \"pr_418\", \"billing_svc\", \"UNMIGRATED_WRITE (P0 RISK)\"]"
                      ]
                    ],
                    "removed": [
                      "quote",
                      []
                    ],
                    "title": "Counterfactual Branch Diff"
                  }
                ]
              ]
            ],
            [
              "ui/accordion",
              {
                "badge": "why(impacts)",
                "open": false,
                "subtitle": "Recursive derivation showing why PR #418 affects Release v2.4",
                "title": "Inspect Derivation Chain: PR #418 -> Release v2.4"
              },
              [
                "ui/why",
                {
                  "title": "Impact Derivation"
                },
                "why_rel"
              ]
            ]
          ]
        ]
      ]
    ],
    {
      "persist": true
    }
  ],
  [
    "view"
  ]
]