Skip to content

SQL: evidence-free .sql follows proving Postgres siblings (Part of #5622) - #5723

Merged
squid-protocol merged 1 commit into
mainfrom
churn/5622-20261020T1026Z
Oct 20, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
churn/5622-20261020T1026Z

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Part of #5622 (slice 2 of the PostgreSQL dialect; slice 1 was #5642).

What changed

  • language_lens._proof_only_sibling_vote: a .sql/.ddl/.dml file with no Postgres-only evidence of its own joins the proof-only language (postgresql) when at least 2 same-folder siblings resolved to it by content and it holds >= 70% of the resolved votes (strict lead). Every claimant votes, so a folder of proven db2/sqlite scripts is not captured by a few Postgres files; siblings with no evidence cast no vote; other folders do not vote. The vote overrides the extension-count physics (which otherwise picks sqlite), then the existing Tier 1.5 lock applies.
  • _resolve_by_sibling_content gained min_votes (default 1: existing callers unchanged); its memo key now includes the candidate set and min_votes.
  • Tests appended to test_postgresql_strict.py.

Class table (evidence-free file beside Postgres files)

Shape Result
plain DDL in .sql, .ddl, .dml beside 2 proving siblings postgresql (one test per extension)
beside only 1 proving sibling unchanged (sqlite/db2_sql)
2 proving Postgres among 3 proven db2 (2/5 < 70%) unchanged
proving siblings in a different folder unchanged

Evidence

sqldoom 95753a20e (cloned to scratch): galaxyscope --db-only: 67 files postgresql, 110 functions (= 110 CREATE [OR REPLACE] FUNCTION by grep), 5 classes, no sqlite/db2_sql file. Before slice 2 the issue measured 45 db2_sql + 20 sqlite files.
Gates: pr_gates.py --fast 6/6; test_postgresql_strict.py + test_language_lens.py + test_detection_resolution_order.py 156 passed.
Golden differential: crucible_check.py PASS on both legs (full_precision, zero_dependency) with NO re-bless: zero drift on the db2/sqlite/postgresql goldens (no language-crucible folder holds >=2 proving Postgres siblings beside evidence-free files).

Sibling gaps

  • dns_request.sql (sqlmap) %RANDSTR3% placeholders as routine names: a placeholder-tolerant name class (not here: different mechanism, func_start change plus rosetta plant).
  • .psql / .pgsql are owned outright by extension, so the discriminator is never consulted for them: audit needed (different mechanism).

Remaining slices

  • .psql/.pgsql discriminator audit; %PLACEHOLDER% routine names; keyword-rosetta data/postgresql folder; docs/language_status/README.md row; fidelity table / FIDELITY_PROVENANCE; \i import support.

Cross-repo

No companion PRs.

🤖 Generated with Claude Code

@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 20, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 20, 2026 10:43
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 20, 2026 10:50
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit ec98ced into main Oct 20, 2026
78 checks passed
@squid-protocol
squid-protocol deleted the churn/5622-20261020T1026Z branch October 20, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant