refactor: split compile-check input key writers into their own file
Merged
HA
3d ago+304+304+012345678901234567890123456789-293-293-012345678901234567890123456789
Summary
- Brings the compile-check input key source back under the 500-line limit on production Go files, which the integration branch's build-and-test has failed on since #3343 merged.
- No behavior change: the functions move verbatim.
User Impact
None. The integration branch's build-cli (and the jobs that depend on it) failed in TestProductionGoFilesStayFocused because input_key.go had 523 lines. This check counts raw lines and runs only after a merge into the integration branch, so the pull requests that grew the file did not see it.
Changes
cli/dispatcher/internal/compilecheck/input_key_identity.go(new, 304 lines): the functions that write each identity into the digest, fromwriteCompilerIdentitytoprojectPath, in their original order with their comments.cli/dispatcher/internal/compilecheck/input_key.go(now 230 lines): how the key is assembled, with its types and flag lists. Only the imports the moved functions used are removed.
Verification
- With the import blocks and blank lines removed, the two files concatenated are identical to the original file.
go test -run TestProductionGoFilesStayFocused ./internal/architecture/...incli/release-automationpasses.go test -race ./internal/compilecheck/...incli/dispatcherpasses.- For each of the four Go modules:
gofmt -lis empty,go vet ./...passes,golangci-lint run ./...reports 0 issues, andgo test ./...passes incli/dispatcherandcli/release-automation. Incli/commonandcli/project-runner, one test each fails only because the local sandbox refuses a directory under/tmpand a Unix socket bind; neither module is touched here. scripts/check-code-complexity.shandscripts/check-file-length.shpass.