Skip to content

paths incorporations: energy / telco / bom-reachability / it-dependency-mapping (1.13)#87

Draft
cafzal wants to merge 11 commits into
mainfrom
paths/energy-telco-bom-itdep
Draft

paths incorporations: energy / telco / bom-reachability / it-dependency-mapping (1.13)#87
cafzal wants to merge 11 commits into
mainfrom
paths/energy-telco-bom-itdep

Conversation

@cafzal

@cafzal cafzal commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Draft. Adds paths (variable-length traversal) stages across the templates that correspond to the validated path-eval ontologies, plus one net-new template — cross-domain paths coverage (energy, telco, supply-chain/BOM, tech-dependency). Each bumped to relationalai==1.13.x. Companion to the skills + eval work in rai-agent-evals#109.

Each incorporation composes its paths add on a centrality/structure artifact the template already computes; the domain framing stays in the template (the skill content carries the generalized pattern, per the plan).

Status — all gates cleared

Template Paths add Code+pin Docs Runbook paste-test Full-template 1.13 run
energy_grid_planning Stage 2.5 corridor fragility + contingency ✅ (421/99.833/DFW) ✅ full chain OPTIMAL; 421 / 99.833 / DFW 5-1
telco_network_recovery Stage 3.5 call-path enumeration (arity-3, PageRank) ✅ GNN→rules→PageRank→3.5→MIP; seed SUB-CON-00900, 198 paths, 54 towers; Stage 4 $4.99M
bom-reachability Assembly paths + maximal-paths (BOM DAG) ✅ verbatim n/a ✅ 18 paths / 8 maximal; assembly_depth persisted
it-dependency-mapping (new) Downstream dependency paths + maximal-paths n/a ✅ 46 paths → 6 maximal, 5-hop longest

Verification

  • py_compile + ruff green; pins match v1/; outputs bound to the ontology; dev-templates-review + repo CONTRIBUTING.md conventions followed.
  • Changed runbook prompts (energy 5b, telco 6b) paste-tested by fresh agents — both reached for the right reasoner + the paths library unprompted and reproduced the result.
  • Full-template end-to-end runs on 1.13 (each template's full reasoner chain + the new paths stage, against its own bundled data) — all four pass. The gate caught two real bugs that py_compile/ruff/offline checks missed, both fixed and re-run-verified:
    • it-dependency: p.length-fanout corrupted path reassembly → fixed.
    • energy: printed corridor count was raw walks (8844), not simple (421) → fixed.

Test plan

  • paths stage code + 1.13 pin + docstring + README (+ runbook where multi-reasoner), all four
  • py_compile + ruff; dev-templates-review + repo conventions
  • paths-stage logic validated standalone on real data
  • changed runbook prompts paste-tested by fresh agents
  • full-template end-to-end run of each template on 1.13 — all four pass

…ontingency), bump to 1.13

WIP checkpoint - code + pin + docstring. README/runbook + full-template live-run pending.
Stage 2.5 composes on Stage 2 betweenness; logic live-validated standalone (421 corridors,
max betweenness-load 99.833, top-substation removal reroutes).
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown

The docs preview for this pull request has been deployed to Vercel!

✅ Preview: https://relationalai-docs-hm91x0hh9-relationalai.vercel.app/build/templates
🔍 Inspect: https://vercel.com/relationalai/relationalai-docs/Cp8qVKdJ56pYbk4sz2Z8F4a7u12k

- How it works: Stage 2.5 subsection (transmission corridors + contingency) with
  verbatim snippet; chain-composition bullet for Substation.fragility_load.
- Runbook: step 5b 'Trace fragile transmission corridors' (question-shaped,
  betweenness anchored by structural test; 421 corridors, load 99.833, DFW
  contingency reroutes).
Derive SKU.feeds (input_sku -> output_sku) from BillOfMaterials, enumerate
assembly paths on the BOM DAG, add a maximal-paths view, persist SKU.assembly_depth.
Mirrors the live-validated Q4 pattern (18 paths -> finished goods). py_compile +
ruff green; full-template live-run is the pre-merge gate.
Arity-3 Subscriber.calls_via edge (caller via routed_through tower -> callee) from
CallDetailRecord; enumerate call paths from the top-PageRank hub (scoped; the call
graph is large/cyclic), recover the routing tower per hop via relationship_fields,
rank by PageRank summed along the route, persist Subscriber.top_call_path_influence.
Refactored to the live-validated explicit-src + pandas-field_index form (matches
telco_validate.py: 6376 simple <=3-hop paths, 120 towers). py_compile + ruff green;
pin already 1.13. Full-template live-run is the pre-merge gate.
Single-reasoner (Graph/paths) template, Technology & Telecom domain. Feature
.contributes_to self-relationship (acyclic DAG); model.path(Feature.contributes_to
.repeat(1,N)).all_paths() enumerates downstream dependency paths, reduces to
maximal chains, persists Feature.max_downstream_depth. 14 features / 15 edges;
46 paths -> 6 maximal, longest 5 hops. Uses the live-validated single-relationship
path form. py_compile + ruff green; pin 1.13.0. Full-template live-run is the
pre-merge gate.
cafzal added 2 commits June 16, 2026 10:12
….5 paths

Runbook: question-shaped 'trace most-influential call paths' step (PageRank
anchored by structural test, scoped to a seed hub). README: Subscriber
.top_call_path_influence row in the concepts table.
…3 run)

The end-to-end run surfaced a bug py_compile/ruff missed: selecting p.length
alongside p.nodes fanned out the node rows, so maximal chains showed repeated
nodes and wrong hop counts. Drop p.length from the select, dedupe (path_id, step),
derive hops = max(step). Re-run verified: 46 paths -> 6 maximal, longest 5 hops
(Clickstream Ingest -> ... -> Retention Dashboard, 6 features / 5 owners).
…plate 1.13 run)

End-to-end run surfaced that n_corridors counted all enumerated walks (8844),
mislabeled 'simple' and mismatching the runbook's 421. Count only simple
corridors (len([...]), not the shadowed sum). Re-run confirmed: 421 simple
corridors, max betweenness-load 99.833, DFW contingency 5 reroute / 1 lose all
-- matches the runbook + paste-test.
…13 run)

End-to-end run confirms the bundled data matches the eval (same seed/counts), so
the 6b response now carries the verified output: seed SUB-CON-00900, 198 simple
<=3-hop call paths, 54 towers, top route SUB-CON-00900 -> SUB-CON-00814 ->
SUB-ENT-0038 -> SUB-CON-00644 (PageRank sum 0.009041).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant