Skip to content

Kotlin family validity: io, time_date_logic, panics_and_aborts, bitwise_ops, regex_execution read the construct their contract names (Part of #8863, #9330) - #9392

Closed
squid-protocol wants to merge 1 commit into
mainfrom
churn/9330-20261126T1620Z
Closed

squid-protocol wants to merge 1 commit into
mainfrom
churn/9330-20261126T1620Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #8863. Issue #9330: Kotlin keyword-family red cells.

Checklist: done [c:3d9860c9]

What changed

Five Kotlin rules in languages/kotlin.py now read the construct their contract names. closures and doc were already green on main (fixed by #9358): no change.

Measured on okhttp (the only corpus with 10+ oracle functions for these cells; they are hatched, not a pinned crucible), oracle recall / precision, before -> after:

cell cause class before after
panics_and_aborts rule counts a different construct (return, ruled not an abort in #8868) + missing TODO( / error( 0.72 / 0.37 0.99 / 0.99
io rule counts a type mention (File, Dao, HttpClient in imports and types), not an operation 0.21 / 0.14 0.91 / 0.85
time_date_logic missing keywords (System.nanoTime, Duration., .toMillis, Date(, measureTime*, ...); Instant.parse stays out (not a clock read, pinned by test_kotlin_strict) 0.12 / 1.00 0.97 / 1.00
bitwise_ops missing infix and / or; right operand must be a literal, constant, paren or member so English in strings and backticked test names do not count 0.46 / 1.00 0.99 / 0.96
regex_execution bare .find( / .matches( are collection / domain calls; regex members now named 0.98 / 0.55 1.00 / 0.91
closures, doc already fixed (#9358) green no change

family_red_cells.py --lang kotlin: 0 red cells. Baseline rows (okhttp) and the two chart SVGs regenerated.

Family-validity checklist

  • one language, one PR
  • each cell re-measured on current main first (baseline scan matched the committed rows)
  • cause class per cell in the table; oracle read against the contract, no oracle change needed
  • oracle recall / precision before and after (okhttp; pinned crucible has under 10 functions for these cells)
  • regression test with positives and the false-positive forms (test_kotlin_family_validity_9330.py); test_kotlin_strict.py regex test moved off .matches(
  • CPU, three alternating runs on okhttp, mean user s: base 40.83, branch 39.98 (no slowdown)
  • keyword-rosetta: verify_language.py kotlin PASS on main, FAIL on branch: main.kt io expected 3, got 0 (the plant is the bare words File, Retrofit, Ktor, which are exactly the type mentions the io contract excludes). Companion plant change needed, see Cross-repo.
  • goldens blessed with golden-lock.sh crucible_check.py --update --yes; diff is the Kotlin files plus aggregates (error exits, file/network i/o, regex, time/date signal parts, fingerprint, snapshots). Did not separately bless unmodified main to zero.
  • not in this PR: below
  • draft; pinned ruff format applied to touched files; pr_gates --fast (only stale chart SVGs, regenerated) and --ratchets 9/9 pass

Cross-repo

Companion: keyword-rosetta data/kotlin/main.kt plants val disk = File, val web = Retrofit, val net = Ktor for io; these become 0 here. Its plant needs a call form (e.g. File(path), x.readText()) and a rebless (rosetta:rebless-owed). This PR merges first; rosetta CI checks out this repo's main, so the rosetta PR follows. Its expected_signals.json does not round-trip under rebless.py, so the rebless needs the file's own formatting fixed first.

Class / Sibling gaps

Class: Kotlin keyword-family cells whose rule counts a type or word mention instead of the operation the contract names, or lacks the contract's keyword forms. All five red cells share the mechanism (a rule in kotlin.py) and are handled here with positive and false-positive tests; closures and doc were already handled (#9358). Sibling gaps: the five cells are hatched (okhttp, not pinned), so no pinned-crucible number backs them; a crucible Kotlin corpus with io / time / bitwise use would. String literals are still not shielded for these families (#2535): bitwise and/or and time words inside a string can still count, mitigated by operand anchors. Scala (#9332) and Java siblings carry their own issues.

Lessons for agents

  • rebless.py refuses keyword-rosetta data/kotlin/expected_signals.json ("does not round-trip"); use tools/verify_language.py <lang> --engine <tree> on main and branch.
  • Bare ruff check without the repo's pinned config reports S101 on every test assert; ignore it and use pr_gates --fast.

🤖 Generated with Claude Code

…se_ops, regex_execution read the construct their contract names (Part of #8863, #9330)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 26, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 26, 2026 16:44
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 26, 2026 16:44
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-shepherd
squid-shepherd Bot disabled auto-merge November 26, 2026 16:50
@squid-shepherd

Copy link
Copy Markdown
Contributor

PR #9392 @ a0efd4b: 1 failed check(s)

== rosetta-audit (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/45861472715/job/140053320648
repro: no local equivalent; read the check page
errors:
pre csharp FAIL csharp: 1 mismatch(es)
pre go FAIL go: 5 mismatch(es)
REG kotlin FAIL kotlin: 1 mismatch(es)
pre scala FAIL scala: 1 mismatch(es)
pre typescript FAIL typescript: 1 mismatch(es)
##[error]kotlin: this build moves the control corpus -- FAIL kotlin: 1 mismatch(es)
##[error]Process completed with exit code 1.
log tail:
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Post job cleanup.
[command]/usr/bin/git version
git version 2.56.1
Temporarily overriding HOME='/home/runner/work/_temp/2421749d-c650-41b5-a9cd-a5f911654ae4' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy/gitgalaxy-baseline
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Post job cleanup.
[command]/usr/bin/git version
git version 2.56.1
Temporarily overriding HOME='/home/runner/work/_temp/3bf8d82c-d725-48d3-8a2f-fca5bbfc1ca8' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

@squid-shepherd squid-shepherd Bot added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Nov 26, 2026
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 26, 2026 16:50
@squid-shepherd squid-shepherd Bot added shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md labels Nov 26, 2026
@squid-shepherd
squid-shepherd Bot disabled auto-merge November 26, 2026 16:53
@squid-shepherd squid-shepherd Bot added shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md and removed shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md labels Nov 26, 2026
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 26, 2026 16:55
@squid-shepherd squid-shepherd Bot added shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md labels Nov 26, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

Waiting on an owner decision (asked privately, 2026-11-26). Nothing is needed from contributors; work resumes once it is answered.

@squid-shepherd
squid-shepherd Bot disabled auto-merge November 26, 2026 17:08
@squid-shepherd squid-shepherd Bot added shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md and removed shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md labels Nov 26, 2026
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 26, 2026 17:09
@squid-shepherd squid-shepherd Bot added shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md labels Nov 26, 2026
@squid-shepherd
squid-shepherd Bot disabled auto-merge November 26, 2026 17:11
@squid-shepherd squid-shepherd Bot added shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md and removed shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md labels Nov 26, 2026
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 26, 2026 17:12
@squid-shepherd squid-shepherd Bot added the shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md label Nov 26, 2026
@squid-shepherd squid-shepherd Bot removed the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Nov 26, 2026
@squid-shepherd
squid-shepherd Bot disabled auto-merge November 26, 2026 17:22
@squid-shepherd squid-shepherd Bot added shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md and removed shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md labels Nov 26, 2026
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 26, 2026 17:23
@squid-shepherd squid-shepherd Bot added shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md labels Nov 26, 2026
@squid-shepherd
squid-shepherd Bot disabled auto-merge November 26, 2026 17:25
@squid-shepherd squid-shepherd Bot added shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md and removed shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md labels Nov 26, 2026
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 26, 2026 17:26
@squid-shepherd squid-shepherd Bot added shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md labels Nov 26, 2026
@squid-shepherd
squid-shepherd Bot disabled auto-merge November 26, 2026 17:28
@squid-shepherd squid-shepherd Bot added shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md and removed shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md labels Nov 26, 2026
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 26, 2026 17:29
@squid-shepherd squid-shepherd Bot added shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md labels Nov 26, 2026
@squid-shepherd
squid-shepherd Bot disabled auto-merge November 26, 2026 17:31
@squid-shepherd squid-shepherd Bot added shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md and removed shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md labels Nov 26, 2026
@squid-shepherd squid-shepherd Bot added shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md and removed shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md labels Nov 26, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

Closing as superseded by #9387. Both PRs fix the same five Kotlin red cells of #9330 in the same lines of kotlin.py, the same new test file and the same baseline rows, so only one can merge. #9387 was re-grafted onto current main and is the one that is conflict-free; this one conflicts and has failing checks. The measured before/after table in this PR's body is worth keeping for the record. Nothing in this PR is lost: its changes are equivalent to #9387's.

🤖 Generated with Claude Code

https://claude.ai/code/session_018srRvhLsKhsTZmCyX36Qem

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 shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant