Skip to content

Integrate SQL-cov and SARIF reporting into CI#154

Open
cuzzo wants to merge 46 commits into
self-host-ifrom
lineage-launch
Open

Integrate SQL-cov and SARIF reporting into CI#154
cuzzo wants to merge 46 commits into
self-host-ifrom
lineage-launch

Conversation

@cuzzo

@cuzzo cuzzo commented Jul 11, 2026

Copy link
Copy Markdown
Owner

This PR integrates SQL-cov hazard and three-valued logic checking into the GitHub Actions CI pipeline, exports findings in SARIF format, and updates SQL-cov test coverage to 85.8%.

cuzzo and others added 30 commits July 9, 2026 13:41
…ineage UI

- Add compiler/ to RELATIVE_ROOTS and stack trace normalizer markers so compiler coverage and stack trace paths are correctly resolved.
- Implement partial coverage background styling when line annotations contain dark arms.
- Fix CSS swap bug where mode-coverage and mode-churn highlights were using each other's CSS variables.
- Add cargo unit test verifying coverage_background renders correct colors for partial coverage.

Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com>
…ounds in gutter

- Update SlopCop rollup and report to preserve and include start/end columns/lines for dark arm findings
- Update lineage coverage_background to only paint gutter in partial coverage color and keep source background green
- Swap gutter highlights variable mapping in app.css so gutter shows churn under coverage mode and vice-versa
- Ingest Ruby spec mutant data for compiler/ruby

Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com>
- Add tools/mutants/go_mutants.rb to scan, mutate, run tests, and generate mutant-facts JSON for Go code
- Ingest boobytrap Go mutants into lineage database

Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com>
- Only show partial coverage styles for lines that are actually covered
- Add ClearParser to mutant subject matrix and run its specs
- Ingest ClearParser mutants (4701 kills) into the database

Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com>
… paths

- Update codecov.yml to track compiler/ instead of src/
- Update tools/generate_generalized_gem_sarif.rb to integrate nil-kill aggregation evidence
- Update fuzz mutant patch files to target compiler/ruby/ paths instead of src/

Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com>
- Add tools/lineage_build_db.sh to automate the full test suite run, mutant generation, and database ingestion
- Style verified concurrency hazards with a deep green rail in the UI gutter

Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com>
…/multi-type coverage

Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com>
… and add post-commit update script

Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com>
… coverage generation

Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com>
…ize import discovery

Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com>
…on folding, and private function layer controls

Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com>
Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com>
Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com>
…bar, and conditional percent coloring

Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com>
Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com>
…aders

Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com>
…igh Complexity Functions in Lineage UI

Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com>
…alier complexity metrics

Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com>
…ctor and expand multi-language tests

Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com>
…ions in Big-O tests

Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com>
…azards are present

Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com>
Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com>
cuzzo and others added 11 commits July 11, 2026 17:47
…/CTE recursion, and JOIN ON telemetry

- Implement schema-aware nullability for coverage. Refactor nullability logic from hazard.rs into a shared nullability.rs module and pass SchemaCatalog to analyze_sql.
- Implement subquery and CTE recursion by recursively traversing AST select/query blocks and generating separate TelemetryDomain objects, while avoiding recursing into subqueries for the parent query's expression collection.
- Add correlation checks to filter out correlated subquery predicates from standalone telemetry queries.
- Implement JOIN ON telemetry via CROSS JOIN pre-join candidate-pair evaluation.
- Clean up unused imports and variables, and update tests.

Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com>
…spalier

- Add Getting Started, Prerequisites, Installation instructions.
- Detail CLI output formats (JSON, LCOV, HTML, SARIF).
- Update supported dialects roadmap to show complete coverage for SQLite, Postgres, MySQL.
- Define boundaries and CI integration strategies.

Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com>
- Create tools/generate_sql_cov_sarif.rb to run sql-cov hazards on all project queries
- Add sql-cov build, scanning, and SARIF upload to .github/workflows/ci.yml
- Add detailed CI setup documentation to gems/sql-cov/README.md
- Add sql-cov project reference to gems/README.md
- Expand tests in uncovered_paths.rs and cli.rs to achieve 85.8% overall code coverage

Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com>
@codecov-commenter

codecov-commenter commented Jul 11, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 80.40895% with 709 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (self-host-i@5453cbb). Learn more about missing BASE report.

Files with missing lines Patch % Lines
gems/lineage/src/ui/controllers/architecture.rs 9.32% 175 Missing ⚠️
gems/sql-cov/src/driver.rs 74.90% 69 Missing ⚠️
gems/sql-cov/src/parser.rs 88.35% 66 Missing ⚠️
...ems/espalier/lib/espalier/architecture_artifact.rb 64.16% 62 Missing ⚠️
gems/lineage/src/ui/controllers/index.rs 14.08% 61 Missing ⚠️
gems/sql-cov/src/nullability.rs 82.11% 49 Missing ⚠️
gems/lineage/src/ui/controllers/source.rs 15.38% 44 Missing ⚠️
gems/lineage/src/ui/controllers/assets.rs 21.42% 33 Missing ⚠️
gems/sql-cov/src/main.rs 88.84% 30 Missing ⚠️
gems/lineage/src/db/architecture.rs 92.09% 28 Missing ⚠️
... and 14 more
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff               @@
##             self-host-i     #154   +/-   ##
==============================================
  Coverage               ?   76.32%           
==============================================
  Files                  ?      361           
  Lines                  ?   106867           
  Branches               ?    20669           
==============================================
  Hits                   ?    81571           
  Misses                 ?    21918           
  Partials               ?     3378           
Flag Coverage Δ
bc-lower 74.27% <ø> (?)
bc-lower-shard-0 66.80% <ø> (?)
bc-lower-shard-1 68.62% <ø> (?)
bc-lower-shard-2 66.15% <ø> (?)
bc-lower-shard-3 67.40% <ø> (?)
bc-lower-shard-4 67.34% <ø> (?)
decomplex-rust 97.17% <87.48%> (?)
examples-benchmarks 70.66% <ø> (?)
examples-benchmarks-shard-0 65.12% <ø> (?)
examples-benchmarks-shard-1 65.71% <ø> (?)
examples-benchmarks-shard-2 63.97% <ø> (?)
examples-benchmarks-shard-3 67.08% <ø> (?)
examples-benchmarks-shard-4 65.16% <ø> (?)
gems 78.80% <85.86%> (?)
go 77.29% <87.48%> (?)
lineage-rust 86.52% <69.48%> (?)
ruby 79.26% <ø> (?)
zig 95.05% <ø> (?)
zig-mutants 92.50% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
gems/espalier/lib/espalier.rb 100.00% <100.00%> (ø)
gems/espalier/lib/espalier/aggregator.rb 98.44% <100.00%> (ø)
gems/lineage/src/db/hazard.rs 98.37% <100.00%> (ø)
gems/lineage/src/db/model.rs 95.56% <ø> (ø)
gems/lineage/src/db/mutant.rs 95.42% <100.00%> (ø)
gems/lineage/src/db/sarif.rs 98.55% <100.00%> (ø)
gems/lineage/src/db/stack_trace.rs 96.36% <100.00%> (ø)
gems/lineage/src/ui/lsp.rs 33.49% <100.00%> (ø)
gems/lineage/src/ui/ui.rs 86.66% <ø> (ø)
gems/slopcop/lib/slopcop/report.rb 99.05% <100.00%> (ø)
... and 26 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

fields.each { |field| nodes << state_node(field, root) }

nodes_by_id = nodes.to_h { |node| [node["id"], node] }
method_by_id = methods.to_h { |method| [method["id"], method] }
when "O(N)" then 10
when "O(log N)" then 5
when "O(1)" then 1
else 1
cuzzo and others added 5 commits July 11, 2026 20:39
- Add `--sqlfluff` and `--sqlfluff-sarif` options to `sql-cov hazards` CLI
- Parse, merge, and classify SQLFluff findings by tiers (T1, T2, T3) in output SARIF
- Update generate_sql_cov_sarif.rb to run sql-cov with SQLFluff integration
- Install SQLFluff and configure it in GitHub Actions CI pipeline

Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com>
- Assign stable, unique hexadecimal hashes to each HazardFinding
- Add generate-check CLI subcommand to output diagnostic queries for nullable columns
- Output alternate DDL statements to alter columns to NOT NULL on Postgres and MySQL
- Document the generate-check command and schema hardening notes in README.md
- Add unit test coverage for target column extraction logic

Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com>
Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com>
…ase coverage

Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com>
Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants