feat(v1.5.0): temp-table data flow and internal resilience (D, F, E) - #5
Merged
Conversation
- Temp-table producer→consumer data-flow edges with conservative, ambiguous-merge handling (temp_flow_ambiguous info annotation) - Honest external-node labels and provenance for 3/4-part names - Savepoint-only recovery in CATCH and catch-scoped SET XACT_ABORT - Data-flow edge styling derived from the data kind in Mermaid + draw.io - Construct-coverage signal in the UI (detected/resolved/opaque) - Correction: sequential edges from io nodes are control, not data Golden 188→199, UI 13→14, fuzz 400 green; typecheck/build/smoke pass.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR: v1.5.0 — Data flow and internal resilience
Summary
Implements the v1.5.0 — Data flow and internal resilience milestone from
ROADMAP.md: Workstream D in full, F data-flow rendering in both exporters,and the E construct-coverage statistic surfaced in the UI. The golden suite
grows from 188 to 199; fuzz (400) and UI (13 → 14) suites stay green.
What's included
Temporary-table producer→consumer data edges (D)
buildGraph(src/ir.ts) now tracks temp-table (#name) writes as reachingdefinitions while emitting the flow graph. A consumer wires to its unique
reaching definition — the most recent write on a provably linear path — with a
labelled semantic
dataedge:SELECT … INTO #stage→ laterUPDATE #stage/SELECT … FROM #stage/INSERT … SELECT … FROM #stageconsumers form a visible pipeline.UPDATE #t)also consumes the current content, so chains stay connected.
no data edge is invented for its consumers, and a region-scoped
informational
temp_flow_ambiguousannotation explains why. Infoannotations never inflate the findings count.
graph.stats.dataflowand in constructcoverage as
temp_flow.Conservative external nodes (D)
In the estate dependency graph (
dependencyGraph), an unmatched three- orfour-part name now renders with its complete identity —
external: remotesrv.salesdb.dbo.pull_orders— instead of a bare name thatcould be mistaken for a known object. Unmatched non-temp targets carry
provenance: 'external'(previously misclassifiedsynthetic); temp tablesare workspace-internal and remain synthetic.
Transaction edge cases (D)
TRYbody remainvisible inside its
CATCH, soROLLBACK TRANSACTION stage_saveisannotated "roll back to savepoint stage_save; depth unchanged" instead of
"named target unresolved; full or savepoint rollback".
SET XACT_ABORTinsideCATCHis annotated "set inside CATCH; appliesto later statements", distinguishing handler-scoped changes from
procedure-level settings.
Data-flow rendering in both exporters (F)
Data edges derive their presentation from the semantic
dataedge kind viathe canonical mapping:
linkStyleentry (green, 2 px) covering every data edge.kind="data"render withstrokeWidth=2on top of theexisting canonical stroke colour and
data-procflow-kindmetadata.Reviewed accuracy correction
v1.1.0 classified every sequential edge leaving an
io/srcnode as asemantic
dataedge, conflating control flow with data flow. With realproducer→consumer data edges shipping in v1.5.0, that mapping is removed:
sequential edges are
control, and only explicit temp-table edges anddependency-graph writes are
data. The v1.1.0 semantic fixture intests/tests.tsnow stages through#workso it still asserts a genuinedata edge. No other golden output changed.
Construct coverage in the UI (E)
The analysis panel gains a Constructs signal next to Confidence, Coverage,
and Diagnostics: resolved/detected in the header strip, and a Details line
with the full detected/resolved/opaque counts plus the per-kind breakdown
(branches, loops, handlers, CTEs, source refs, temp flow). Estate scope
aggregates the statistic across all objects.
Not changed
semantics are untouched; all prior fixtures remain green except the one
documented correction above.
lineage are deferred per the roadmap.
Fixtures
tests/dialects/tsql.ts— four v1.5.0 graph fixtures: linear temp-tablepipeline (kind-asserted data edges), conservative branch merge
(
temp_flow_ambiguous, no invented edges), savepoint-only recovery inCATCH, and catch-scopedSET XACT_ABORT.tests/tests.ts—matchingWirecan now assert edgekind; v1.5.0 blockscover external-node labels/provenance, F data-edge rendering in both
exporters, and construct-coverage counts.
tests/ui-tests.ts— construct-coverage display assertion.Verification
npm run typecheck— passesnpm run build— passesnpm run test:file— passesdist/committed in syncDeferred (per roadmap)