FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

docs: add ADRs for dynamic call resolution and interprocedural dataflow by carlos-alm · Pull Request #1675 · optave/ops-codegraph-tool · GitHub

docs: add ADRs for dynamic call resolution and interprocedural dataflow - #1675

Merged
carlos-alm merged 1 commit into
mainfrom
docs/adr-dynamic-call-and-dataflow
Jun 21, 2026
Merged

docs: add ADRs for dynamic call resolution and interprocedural dataflow#1675
carlos-alm merged 1 commit into
mainfrom
docs/adr-dynamic-call-and-dataflow

Conversation

Copy link
Copy Markdown
Contributor

Summary

  • ADR-002 — Dynamic Call Resolution: documents the DynamicKind taxonomy replacing the boolean Call.dynamic, the sink-edge design that reuses kind='calls' + a new dynamic_kind column (avoiding a new edge kind and its blast radius), the Track A (resolve) / Track B (flag) split, and the per-language-family delivery sequence across all 34 languages.

  • ADR-003 — Interprocedural Dataflow: documents the variable-level vertex model (dataflow_vertices table kept separate from nodes to avoid polluting graph analytics), function summaries for bounded interprocedural stitching, stitching on resolved calls edges (replacing ambiguous name-based matching), the backward-compatible dataflow_fn view, and the DP-1 approval gate that controls whether variable-level output becomes the default.

Both ADRs follow the structure established in ADR-001 (Decision → Context → Trade-offs → Key Decisions → Delivery → Alternatives → Outcome).

Source

Transformed from local plan files (DYNAMIC_CALL_RESOLUTION_PLAN.md and INTERPROCEDURAL_DATAFLOW_PLAN.md) that captured approved architecture decisions but had not been committed or PR'd. The plan files can be deleted locally once this merges.

Closes #N/A — documentation only, no code changes.

ADR-002 captures the DynamicKind taxonomy, sink-edge design (reusing
kind='calls' + dynamic_kind column), Track A/B split, and per-family
delivery sequence for dynamic call resolution across all 34 languages.

ADR-003 captures the variable-level vertex model (dataflow_vertices
table separate from nodes), function summaries, interprocedural
stitching on resolved calls edges, the backward-compatible dataflow_fn
view, and the DP-1 approval gate for the breaking-change lever.

greptile-apps Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds two architecture decision records (ADRs) that formalize previously untracked design decisions for dynamic call resolution and interprocedural dataflow. Both documents follow the structure established in ADR-001 and clearly capture decision context, trade-offs, key design choices, and phased delivery sequences.

  • ADR-002 documents the DynamicKind taxonomy, the sink-edge design (kind='calls' + dynamic_kind column) that avoids a new edge kind, and the Track A (resolve) / Track B (flag) split across all 34 supported languages.
  • ADR-003 documents the variable-level dataflow_vertices table, function summaries, stitching on resolved calls edges, the backward-compatible dataflow_fn view, and the DP-1 approval gate that gates any breaking default change to Phase 6.

Confidence Score: 4/5

Documentation-only PR; safe to merge after correcting the language count in ADR-003.

ADR-003 states '8 languages have dataflow rules today' but lists 10 in the same sentence, and carries the error forward into the 'other 26' figure (should be 24). This will directly mislead batch-planning for Phase P5 language groups. Both ADRs are otherwise internally consistent and well-structured.

docs/architecture/decisions/003-interprocedural-dataflow.md — language count needs correction before the P5 batch plans are drawn up.

Important Files Changed

Filename Overview
docs/architecture/decisions/002-dynamic-call-resolution.md ADR-002 documents the DynamicKind taxonomy, sink-edge design, Track A/B split, and 34-language delivery sequence; no factual inconsistencies found.
docs/architecture/decisions/003-interprocedural-dataflow.md ADR-003 documents the variable-level vertex model and delivery phases; contains a language-count inconsistency (claims 8 languages with dataflow rules, lists 10, and derives '26 without' instead of 24).

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Dynamic Call Site Detected] --> B{DynamicKind?}
    B -->|computed-literal / computed-key const / reflection| C[Track A: Resolve]
    B -->|eval / new Function / runtimeVar / unresolved-dynamic| D[Track B: Flag]
    C --> E[Real calls edge\nfull or penalized confidence]
    D --> F[Sink edge\nkind=calls, dynamic=1\ndynamic_kind=..., confidence=0.0]
    F --> G[Filtered out of normal queries\nQueryable via --dynamic]
    E --> H[Graph Analytics\nDead-code / Blast-radius]
    G --> H

    subgraph ADR-003: Interprocedural Dataflow
        I[Intra-function visitor\nextracts param/local/return facts] --> J[dataflow_vertices table\nnot added to nodes]
        J --> K[Function summaries\nparam to return reachability]
        K --> L{Resolved calls edge?}
        L -->|yes| M[Inter-edge stitching\narg_in / return_out / mutates]
        L -->|no| N[Dropped — no ambiguous name matching]
        M --> O[dataflow_fn view\nbackward-compatible contract]
    end
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[Dynamic Call Site Detected] --> B{DynamicKind?}
    B -->|computed-literal / computed-key const / reflection| C[Track A: Resolve]
    B -->|eval / new Function / runtimeVar / unresolved-dynamic| D[Track B: Flag]
    C --> E[Real calls edge\nfull or penalized confidence]
    D --> F[Sink edge\nkind=calls, dynamic=1\ndynamic_kind=..., confidence=0.0]
    F --> G[Filtered out of normal queries\nQueryable via --dynamic]
    E --> H[Graph Analytics\nDead-code / Blast-radius]
    G --> H

    subgraph ADR-003: Interprocedural Dataflow
        I[Intra-function visitor\nextracts param/local/return facts] --> J[dataflow_vertices table\nnot added to nodes]
        J --> K[Function summaries\nparam to return reachability]
        K --> L{Resolved calls edge?}
        L -->|yes| M[Inter-edge stitching\narg_in / return_out / mutates]
        L -->|no| N[Dropped — no ambiguous name matching]
        M --> O[dataflow_fn view\nbackward-compatible contract]
    end
Loading

Reviews (1): Last reviewed commit: "docs: add ADRs for dynamic call resoluti..." | Re-trigger Greptile

Comment on lines +63 to +65

3. **No limitation in README.** The "intraprocedural only" caveat is removed at P6, reflecting a genuinely resolved limitation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Language count and arithmetic are inconsistent

The section states "8 languages have dataflow rules today" but the parenthetical list contains 10 — JavaScript, TypeScript, TSX, Python, Go, Rust, Java, C#, PHP, Ruby. Because the total supported languages is 34, the follow-on figure "The other 26 have no DATAFLOW_RULES" is also wrong (should be 24). Teams tracking Phase B batches against the 26-language backlog will mis-scope the remaining work by two languages, likely missing C# or Rust from a batch plan.

carlos-alm merged commit 932af1c into main Jun 21, 2026
28 checks passed
carlos-alm deleted the docs/adr-dynamic-call-and-dataflow branch June 21, 2026 09:29
github-actions Bot locked and limited conversation to collaborators Jun 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL