feat: record how Go is written across the organization - #77
Merged
Conversation
Five repositories state the same conventions in five files, with nothing keeping them in agreement. Two rules are already universal in practice but written down in only two or three of the repositories that follow them. Measured against the code rather than against the other documents, which is what surfaced the gap: comparing documents finds what everyone wrote, comparing documents to code finds what everyone does. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Thank you for contributing to this project! 😊🕹️ |
This was referenced Aug 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The org-wide capability you asked for. Spec only — no implementation.
What the survey found
I compared what each repository states against what its code does, rather than comparing the five documents to each other. Nothing conflicts:
types.goholds only typeshelpers.go/utils.goanywhereexport_test.goexposes only settersTwo rules are universal in practice and written down in only two or three places. That gap is the reason for the capability — a convention followed everywhere and recorded twice survives on memory, and the next repository copies whichever file it started from.
Comparing the documents to each other would have missed this: the intersection of what all five state drops
types.goand the file-naming rule, both of which all five obey.Mocking is conditional, deliberately
osapi-orchestratordeclares no mocking library and mocks nothing — it tests againsthttptest.Server. Written as "SHALL use gomock", the requirement would make a compliant repository non-compliant and the fix would be adding a dependency it does not need. So the requirement binds which mock, not whether to mock.This is the second time that repository's approach has been read as an omission —
correct-documentation-driftcarried a task asking it to "state that it uses no mocking library", on the same mistaken premise.export_test.go, org-wide per your callConstrained by what such a file may expose rather than requiring one to exist, so the two repositories not using the pattern are unaffected. The reasoning generalizes past the collector-testing problem it came from: an alias makes an internal step directly callable, and a directly callable step attracts a test that duplicates coverage the caller's test already provides.
Note on my own numbers
An earlier count in this session said 77 of 109 gohai test files used testify — that was wrong three attempts running. Files that add methods to a suite declared in a sibling file do not import
testify/suitethemselves, so counting imports undercounts badly. Measured per package, it is 100% in all five.Sections 2 and 3 stay open — they are the implementation, and the spec merges first.
🤖 Generated with Claude Code