Skip to content

Tri-comparison sweep: kotlin (4/4 shapes validated, 2 audit-tool defects fixed) - #2102

Merged
squid-protocol merged 1 commit into
mainfrom
tri-comparison-sweep-kotlin
Aug 22, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
tri-comparison-sweep-kotlin

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Summary

  • Investigated all 4 open kotlin discrepancy shapes in tri_comparison_ledger.json against the okhttp corpus (language-crucible/data/kotlin), following the tri-comparison-ledger-sweep skill.
  • Found and fixed 2 real, confirmed bugs in this repo's own comparison tooling (not GitGalaxy's engine):
    • ctags_reader.py: kotlin's CLASS_KINDS was missing "o" (objects), silently excluding every object Foo { ... } singleton declaration from the ctags-side class comparison — same shape as the existing cpp/fortran gaps.
    • tree_sitter_accuracy_audit.py: kotlin's func_node_types was missing secondary_constructor (plus, proactively, anonymous_initializer — same underlying gap, no live corpus occurrence), so tree-sitter's own real-function count silently excluded every Kotlin secondary constructor.
  • The remaining shape (ctags tagging trailing-lambda blocks / for-loop iteration variables as functions) is a genuine, permanent ctags parser limitation — documented, not fixable via a kind-map change, and debited in the ledger.
  • Adds docs/language_status/kotlin.md (sections 1-8 from primary sources + a §9 tri-comparison write-up) and updates the language-status README index.

Test plan

  • python tests/ruff_audit.py --ci — clean
  • python tests/mypy_audit.py --ci — clean
  • Verified both audit-tool fixes directly against tri_comparison_gatherer.gather_language('kotlin') before/after
  • tri_comparison_chart.py --all --write regenerated, diff confirmed scoped to kotlin plus expected timestamp churn elsewhere
  • Not applicable: this PR only touches test/audit tooling and docs, not language_standards.py/detector.py/prism.py, so crucible_check.py/golden-master re-blessing isn't required (CLAUDE.md's Differential Scan protocol)

🤖 Generated with Claude Code

…cts fixed)

Investigated all 4 open kotlin discrepancy shapes in tri_comparison_ledger.json against the
okhttp corpus (language-crucible/data/kotlin). Two real, confirmed bugs found and fixed in
this repo's own comparison tooling -- GitGalaxy's engine itself had no confirmed defects:

- ctags_reader.py: kotlin's CLASS_KINDS was missing "o" (objects), silently excluding every
  `object Foo { ... }` singleton declaration from the ctags-side class comparison (same shape
  as the existing cpp/fortran CLASS_KINDS gaps).
- tree_sitter_accuracy_audit.py: kotlin's func_node_types was missing `secondary_constructor`
  (plus, proactively, `anonymous_initializer` for `init { }` blocks -- same underlying gap, no
  live occurrence in this corpus), so tree-sitter's own real-function count silently excluded
  every Kotlin secondary constructor.

The remaining shape (ctags' Kotlin parser tagging trailing-lambda blocks and for-loop iteration
variables as functions) is a genuine, permanent ctags parser limitation, not fixable via a
kind-map change -- documented in ctags_reader.py and debited in the ledger.

Also adds docs/language_status/kotlin.md (sections 1-8 from primary sources, plus a §9
tri-comparison write-up) and updates the README index.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@squid-protocol
squid-protocol merged commit 48ccff5 into main Aug 22, 2026
26 of 27 checks passed
@squid-protocol
squid-protocol deleted the tri-comparison-sweep-kotlin branch August 22, 2026 11:52
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

squid-protocol added a commit that referenced this pull request Aug 22, 2026
…ary_constructor fix (#2105)

PR #2102's func_node_types fix (adding secondary_constructor/anonymous_initializer so
tree-sitter correctly counts Kotlin secondary constructors) legitimately changed the pinned
ground-truth real_functions count for kotlin from 27 to 28, which correctly failed CI's
baseline-gated regression check (the check can't distinguish "corpus changed" from "ground
truth measurement improved" -- it just flags any drift for a human to look at, per its own
message). Not a corpus change: verified this is the direct, expected effect of the merged fix.
Regenerated via `tree_sitter_accuracy_audit.py --lang kotlin --regenerate`, which also updated
kotlin's accuracy summary row in language_standards.py from 96.4% to 100.0% func_start
recall/precision.

Co-authored-by: Joe Esquibel <[email protected]>
Co-authored-by: Claude Sonnet 5 <[email protected]>
squid-protocol added a commit that referenced this pull request Aug 22, 2026
…r cleared) (#2108)

PR #2102 validated kotlin's 4th ledger shape (agree[gitgalaxy,tree_sitter]_vs[ctags], the
constructor shape that only appeared after the func_node_types fix) but never re-ran
tri_comparison_chart.py --all --write afterward -- the committed SVG still reflected the
prior regeneration, where that shape was still unvalidated. Every kotlin ledger entry has been
status=validated (has_open_question() returns False for both function/existence and
class/existence) since #2102 merged; the chart just never caught up. Regenerated -- the
asterisks are gone from kotlin's Functions Found/Function Precision panels, and the summary
legend's ranked-comparison count/percentages update accordingly. No other language's cells
changed.

Co-authored-by: Joe Esquibel <[email protected]>
Co-authored-by: Claude Sonnet 5 <[email protected]>
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.

1 participant