Skip to content

Go keyword families: bitwise_ops, time_date_logic, io and doc read 0.8 or better on the pinned crucible (Part of #8863) - #9313

Closed
squid-protocol wants to merge 7 commits into
mainfrom
churn/8863-go
Closed

squid-protocol wants to merge 7 commits into
mainfrom
churn/8863-go

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #8863 (Go slice, checklist line **go** [c:go]).

Checklist: done [c:go]

Class / Sibling gaps

Class: Go keyword-family cells that read under 0.8 on the pinned crucible. Four were red; closures was already green (fixed by #9267), so it is no change.

Cell Before (recall / precision) After Cause class
bitwise_ops 0.40 / 0.89 1.00 / 1.00 rule counts another construct (missed binary & | &= |=) and oracle misses a form (Go unary ^ complement)
time_date_logic - / 0.56 1.00 / 1.00 rule counts a type mention (time.Duration in field and param types)
io - / 0.60 1.00 / 1.00 rule counts type mentions (io.Reader, bufio.Writer) and import paths; oracle lacked io.Copy / ReadAll / ReadFull / WriteString
doc 0.64 / - 0.94 / 0.91 rule required a capital first word and matched indented comments

family_red_cells.py --lang go now lists only decorators and regex_execution, both hatched (not a pinned crucible).

Sibling gaps (not in this PR). No burned-estate COBOL program needs any of them:

  • decorators (Go struct tags): open owner question on Epic: keyword-family validity -- do the per-function signals measure what their names say? #8863. No burned-estate program needs it.
  • regex_execution: unpinned, measured on prometheus only. No burned-estate program needs it.
  • bitwise_ops in c, cpp, java, javascript: same mechanism, other language files. No burned-estate program needs it.
  • Known limits of the new & / | rule: Go generic type-set unions (int | string) and spaced & / | inside string literals could over-count. Measured precision is 1.0 on the crucible.
  • io alternatives (grpc., sqlx., pgx.) that no crucible function exercises.

Changes

  • go.py: io counts operations (io.Copy|ReadAll|ReadFull|WriteString, bufio.New*) and drops type mentions and the net/http / database/sql import paths. doc is a column-0 // text line (godoc ruling). bitwise_ops adds operand-anchored binary & / | (spaced or tight, with =), excluding &&, ||, &^ handled separately, and unary address-of. time_date_logic counts time.Duration( conversions and time.Now(), not type mentions. All bounded quantifiers.
  • family_oracle_ts.py: Go io list gains the four io.* calls; unary complement accepts ^ as well as ~.
  • test_go_family_validity_8863.py (new): positives and false-positive forms per family, plus an adversarial-input test for the new regex.
  • test_go_strict.py: the doc negative moves from // foo does something useful to //nolint:errcheck, because a column-0 godoc comment now counts by ruling.
  • Regenerated (not hand-written): family_validity_baseline.json, the two validity SVGs, both golden masters.

Golden diff attribution

scope_check.py --expect go: the only changes outside go/ are 55 .go files that moby ships inside the dockerfile corpus, plus repo-wide rollup fields. No non-Go file changed.

Gates

  • pr_gates --fast: green after regenerating the validity SVGs (they were stale from the baseline). pr_gates --ratchets: 9 pass, 0 fail. audit_check.py: all clear. ruff format --check and ruff check on changed files: clean. time_ratchet.py check: 0 over the limit.
  • CPU on language-crucible/data/go, 3 alternating runs, mean user seconds: main 3.10, branch 3.06 (no change).

Cross-repo

keyword-rosetta rebless owed for go (rosetta:rebless-owed; a person adds the label). rosetta_audit.py against keyword-rosetta main: the Go manifest moves on doc (main.go 1 -> 4, c.go 0 -> 5) and units_documented (a.go, b.go 0 -> 1, c.go 0 -> 2). Engine PR merges first; the corpus PR re-blesses the Go manifest after. main.go encapsulation (expected 1, got 0) already fails on engine main and is not from this PR. The c, db2_sql, hlasm, java and python moves in the same audit run were not checked against a baseline build; I did not touch those files.

Plan vs result

The plan expected closures to need work: it was already green. The bitwise_ops over-counts were an oracle gap (Go's unary ^), not a rule bug.

Lessons for agents

  • The doc rule runs over both the comment stream and the code stream and is attributed by line range from 5 lines above (_DOC_ANCHOR_LINES_ABOVE), so it cannot be anchored on the following declaration.
  • A time.Duration or io.Reader type mention is not an operation: count the call or conversion form.
  • A scratch script named dis.py shadows stdlib dis and gives a circular-import error.
  • Baseline regeneration makes tests/tools/test_family_validity_chart.py fail until family_validity_chart.py --write is run.
  • scope_check reports the .go files inside the dockerfile corpus under dockerfile: check the file extensions before reading it as out of scope.

🤖 Generated with Claude Code

squid-protocol and others added 3 commits November 25, 2026 11:57
…8 or better on the pinned crucible (Part of #8863)

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 25, 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 25, 2026 17:24
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 25, 2026 17:25
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@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 25, 2026
@squid-shepherd
squid-shepherd Bot disabled auto-merge November 25, 2026 17:32
@squid-shepherd

Copy link
Copy Markdown
Contributor

PR #9313 @ 28408c3: 2 failed check(s)

== full-suite part 2/5 (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/45664481405/job/139383082035
repro: python -m pytest -q tests/extraction/languages/test_python_strict.py::test_python_comprehensions_was_fixed_from_a_javascript_copy_paste
failing tests: tests/extraction/languages/test_python_strict.py::test_python_comprehensions_was_fixed_from_a_javascript_copy_paste
errors:
fail-on-cache-miss: false
E AssertionError: Incorrectly matched an unrelated .filter() method call (the old JS-idiom bug)
tests/extraction/languages/test_python_strict.py:202: AssertionError
FAILED tests/extraction/languages/test_python_strict.py::test_python_comprehensions_was_fixed_from_a_javascript_copy_paste - AssertionError: Incorrectly matched an unrelated .filter() method call (the old JS-idiom bug)
##[error]Process completed with exit code 1.
log tail:
GITGALAXY_LICENSE_KEY: COMMUNITY_FREE_TIER
OMP_NUM_THREADS: 1
pythonLocation: /opt/hostedtoolcache/Python/3.12.16/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.16/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.16/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.16/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.16/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.16/x64/lib
PYTEST_ADDOPTS: --ignore=tests/cobol_mainframe
##[endgroup]
Multiple search paths detected. Calculating the least common ancestor of all paths
The least common ancestor is /home/runner/work/_temp. This will be the root directory of the artifact
With the provided path, there will be 2 files uploaded
Artifact name is valid!
Root directory input is valid!
Uploading artifact: test-times-part-2.zip
Beginning upload of artifact content to blob storage
Uploaded bytes 1052052
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is e3f14b31687aac5dfa65148a539163c5a20526b5c799882f4dad6a4e9ef50cfe
Finalizing artifact upload
Artifact test-times-part-2 successfully finalized. Artifact ID 15046968261
Artifact test-times-part-2 has been successfully uploaded! Final size is 1052052 bytes. Artifact ID is 15046968261
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/45664481405/artifacts/15046968261
Post job cleanup.
[command]/usr/bin/git version
git version 2.56.1
Temporarily overriding HOME='/home/runner/work/_temp/35484299-6f6c-4104-8153-367bc041442a' 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
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

== rosetta-audit (failure) -- main
https://github.com/squid-protocol/gitgalaxy/actions/runs/45664480642/job/139382787133
repro: fails on main too: fix main (then merge origin/main here)
errors:
REG go FAIL go: 5 mismatch(es)
pre python FAIL python: 1 mismatch(es)
##[error]go: this build moves the control corpus -- FAIL go: 5 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/d62a0848-caeb-45de-8bba-f3b04f5dec7f' 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/8c485acf-a645-434f-8bdd-decf74a91be5' 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 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 25, 2026
squid-protocol and others added 2 commits November 25, 2026 14:59
@squid-shepherd squid-shepherd Bot removed the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 25, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

CI shepherd: the head of this PR (b9e9717) is not the one a maintainer labelled shepherd:merge on (new commits, or never approved), so the label was removed and nothing merges unreviewed code. Re-add the label when the new head is ready (shepherd:reapprove marks this PR until then). Until then it is a draft and runs the cheap audits only; re-adding the label marks it ready, which starts the full set on that head.

@squid-shepherd
squid-shepherd Bot marked this pull request as draft November 25, 2026 20:14
@squid-shepherd squid-shepherd Bot added shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md and removed 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 labels Nov 25, 2026
@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md labels Nov 25, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

1 similar comment
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd squid-shepherd Bot removed the shepherd:waiting-on-main Bot: the failing check fails on main too (main's to fix). Guide: docs/ci.md label Nov 25, 2026
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 25, 2026 20:39
@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 25, 2026
@squid-shepherd
squid-shepherd Bot disabled auto-merge November 25, 2026 20:40
@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 25, 2026
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 25, 2026 20:41
@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 25, 2026
@squid-shepherd
squid-shepherd Bot disabled auto-merge November 25, 2026 20:42
@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 25, 2026
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 25, 2026 20:43
@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 25, 2026
@squid-shepherd
squid-shepherd Bot disabled auto-merge November 25, 2026 20:45
@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 25, 2026
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 25, 2026 20:46
@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 25, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

CI shepherd: the head of this PR (015790c) is not the one a maintainer labelled shepherd:merge on (new commits, or never approved), so the label was removed and nothing merges unreviewed code. Re-add the label when the new head is ready (shepherd:reapprove marks this PR until then). Until then it is a draft and runs the cheap audits only; re-adding the label marks it ready, which starts the full set on that head.

@squid-protocol

Copy link
Copy Markdown
Owner Author

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

@squid-protocol

Copy link
Copy Markdown
Owner Author

Superseded by merged #9325 (one rebless for Go/TypeScript/Crystal).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant