Skip to content

Commit dd92a2f

Browse files
ajitpratap0Ajit Pratap Singhclaude
authored
test(cbinding): harden C binding coverage 18% to 93% (#447)
* docs: add Q2 2026 roadmap design spec from multi-persona audit Full-project audit using 5 parallel analytical personas (Performance, SQL Compatibility, API/DX, Competitive, Community). Synthesizes into prioritized P0–P3 roadmap covering: HN launch, query fingerprinting, linter expansion to 30 rules, DML transforms, C binding hardening, live DB schema introspection, SQL transpilation, CONNECT BY, OTel, GORM integration, and advisor expansion. Corresponding GitHub issues: #442#460 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs: add Q2 2026 implementation plans for all roadmap items 12 implementation plans covering all prioritized GitHub issues: P0 (Critical): - 2026-03-29-sentry-fixes.md (#434, #437) — fix Sentry noise filters - 2026-03-29-openssf-scorecard.md (#443) — security scorecard badge P1 (High Priority): - 2026-03-29-query-fingerprinting.md (#444) — SQL normalization + SHA-256 fingerprints - 2026-03-29-linter-expansion.md (#445) — L011-L030 safety/performance/naming rules - 2026-03-29-dml-transforms.md (#446) — SET clause and RETURNING transforms - 2026-03-29-cbinding-hardening.md (#447) — C binding coverage + stress tests - 2026-03-29-advisor-expansion.md (#453) — OPT-009 through OPT-020 advisor rules P2 (Medium Priority): - 2026-03-29-sql-parser-additions.md (#450, #454, #455, #456) — DDL formatter, CONNECT BY, SAMPLE, PIVOT/UNPIVOT - 2026-03-29-schema-introspection.md (#448) — live DB schema introspection (Postgres, MySQL, SQLite) - 2026-03-29-integrations.md (#451, #452) — OpenTelemetry + GORM sub-modules - 2026-03-29-sql-transpilation.md (#449) — SQL dialect transpilation API P3 (Low Priority): - 2026-03-29-p3-items.md (#458, #459, #460) — CLI watch registration, pool stats, JSON functions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test(cbinding): add coverage tests, stress tests, and Python ctypes integration (#447) Raises pkg/cbinding coverage from 18.1% to 93.3% by adding: - cbinding_testhelpers.go: CGo wrapper functions enabling Go tests to call all 9 exported C functions (gosqlx_parse, validate, format, extract_tables, extract_columns, extract_functions, extract_metadata, version, free) - cbinding_coverage_test.go: functional tests for all 9 exported functions with valid SQL, invalid SQL, edge cases (empty, unicode, large, CTE, window), all DML statement types, and toJSON helper coverage - cbinding_stress_test.go: 50 goroutines x 100 iterations concurrent parse, concurrent validate/format, all-functions concurrency, large SQL (100-clause UNION ALL), unicode SQL, mixed valid/invalid, and version singleton stability - pkg/cbinding/tests/test_ctypes.py: Python ctypes integration test that skips gracefully when the shared library has not been built - pkg/cbinding/tests/run_tests.sh: script to build the library and run Python tests All 73 tests pass with -race; zero data races detected. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Ajit Pratap Singh <ajitpratapsingh@Ajits-Mac-mini-2655.local> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 155da55 commit dd92a2f

5 files changed

Lines changed: 1123 additions & 0 deletions

File tree

0 commit comments

Comments
 (0)