Files
git.stella-ops.org/docs/reachability/callgraph-formats.md
master 5a480a3c2a
Some checks failed
Reachability Corpus Validation / validate-corpus (push) Waiting to run
Reachability Corpus Validation / validate-ground-truths (push) Waiting to run
Reachability Corpus Validation / determinism-check (push) Blocked by required conditions
Scanner Analyzers / Discover Analyzers (push) Waiting to run
Scanner Analyzers / Build Analyzers (push) Blocked by required conditions
Scanner Analyzers / Test Language Analyzers (push) Blocked by required conditions
Scanner Analyzers / Validate Test Fixtures (push) Waiting to run
Scanner Analyzers / Verify Deterministic Output (push) Blocked by required conditions
Signals CI & Image / signals-ci (push) Waiting to run
Signals Reachability Scoring & Events / reachability-smoke (push) Waiting to run
Signals Reachability Scoring & Events / sign-and-upload (push) Blocked by required conditions
AOC Guard CI / aoc-guard (push) Has been cancelled
AOC Guard CI / aoc-verify (push) Has been cancelled
Docs CI / lint-and-preview (push) Has been cancelled
Export Center CI / export-ci (push) Has been cancelled
Findings Ledger CI / build-test (push) Has been cancelled
Findings Ledger CI / migration-validation (push) Has been cancelled
Findings Ledger CI / generate-manifest (push) Has been cancelled
Lighthouse CI / Lighthouse Audit (push) Has been cancelled
Lighthouse CI / Axe Accessibility Audit (push) Has been cancelled
Policy Lint & Smoke / policy-lint (push) Has been cancelled
Add call graph fixtures for various languages and scenarios
- Introduced `all-edge-reasons.json` to test edge resolution reasons in .NET.
- Added `all-visibility-levels.json` to validate method visibility levels in .NET.
- Created `dotnet-aspnetcore-minimal.json` for a minimal ASP.NET Core application.
- Included `go-gin-api.json` for a Go Gin API application structure.
- Added `java-spring-boot.json` for the Spring PetClinic application in Java.
- Introduced `legacy-no-schema.json` for legacy application structure without schema.
- Created `node-express-api.json` for an Express.js API application structure.
2025-12-16 10:44:24 +02:00

2.4 KiB

Reachability Callgraph Formats (richgraph-v1)

Purpose

Normalize static callgraphs across languages so Signals can merge them with runtime traces and replay bundles deterministically.

Core fields (per node/edge)

  • nodes[].id — canonical SymbolID (language-specific, stable, lowercase where applicable).
  • nodes[].kind — e.g., method/function/class/file.
  • edges[].sourceId / edges[].targetId — SymbolIDs; edge types include call, import, inherit, reference.
  • artifact — CAS paths for source graph files; include sha256, uri, optional generator (analyzer name/version).

Language-specific notes

  • JVM: use JVM internal names; include signature for overloads.
  • .NET/Roslyn: fully-qualified method token; include assembly and module for cross-assembly edges.
  • Go SSA: package path + function; include receiver for methods.
  • Node/Deno TS: module path + exported symbol; ES module graph only.
  • Rust MIR: crate::module::symbol; monomorphized forms allowed if stable.
  • Swift SIL: mangled name; demangled kept in metadata only.
  • Shell/binaries: SymbolID = sym:binary:{sha256(file)\0section\0addr\0name\0linkage} via SymbolId.ForBinaryAddressed, include code_id = CodeId.ForBinarySegment(...) and set kind=binary.

CAS layout

  • Store graph bundles under reachability_graphs/<hh>/<sha>.tar.zst.
  • Bundle SHOULD contain meta.json with analyzer, version, language, component, and entry points (array).
  • File order inside tar must be lexicographic to keep hashes stable.

Validation rules

  • No duplicate node IDs; edges must reference existing nodes.
  • Entry points list must be present (even if empty) for Signals recompute.
  • Graph SHA256 must match tar content; Signals rejects mismatched SHA.
  • Only ASCII; UTF-8 paths are allowed but must be normalized (NFC).

V1 Schema Reference

The stella.callgraph.v1 schema provides enhanced fields for explainability:

  • Edge Reasons: 13 reason codes explaining why edges exist
  • Symbol Visibility: Public/Internal/Protected/Private access levels
  • Typed Entrypoints: Framework-aware entrypoint detection

See Callgraph Schema Reference for complete v1 schema documentation.

References

  • V1 Schema Reference: docs/signals/callgraph-formats.md
  • Union schema: docs/reachability/runtime-static-union-schema.md
  • Delivery guide: docs/reachability/DELIVERY_GUIDE.md