Repository navigation
ci: enforce the review findings that kept coming back - #165
Conversation
The module zip that the Go proxy serves leaves out every folder with a go.mod of its own, so a test that reads one passes in the checkout and fails in a consumer's `go test all`. That happened twice: the bench corpus tests (#148, #158) and TestUnion_MarshalJSON_RoundTripsTheG2Transcripts (#143), which still fails on main in the module zip. - repoFiles (repo_files_test.go) is the one way to read such a file: it skips in the module zip and fails in a checkout when nothing matches. The corpus loader and the union transcript test use it. - make test-module-zip (scripts/test-module-zip) builds the real module zip with golang.org/x/mod/zip from the files git tracks or would track, and runs go vet and go test there. CI runs it after make test. Without the union test change, make test-module-zip fails with "find the G2 transcripts: <nil> (0 files)". --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
…e numbers The barrier's model-to-code tables cited connection.go by line number, so every edit to connection.go moved them: nine PRs (#68, #88, #89, #110, #129, #135, #139, #142, #153) rewrote 60 to 110 rows each, and a verifier on #135 found 153 of 258 numbers moved. check.sh already finds every line by its text, so the numbers bought nothing. - Each row now names the function and quotes the code, as verify-session-cancel/SKILL.md already did. Rows that held only a range quote the code that check.sh reads. - scripts/check-code-citations fails on a line-number citation in the SKILL.md of any skill with a fingerprint.txt, and names the form to use. make check (and so CI) runs it first. On the SKILL.md of main the check reports 94 citations and exits 1. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
Integer width came up in review seven times (#100, #118, #124, #138, #150, #152, #159): an int that wraps on 386, a 2^31 error code that hung a request on 386 before #160, and a generator test that cannot hold 2^31 in int. Each was found by Codex or a verifier who ran GOARCH=386 by hand. make test-386 runs go vet and go test for the SDK and cmd/generate with GOARCH=386, and CI runs it after the module zip step. At 6c4769e it fails TestWriteTypesJen_ValidateChecksIntegerRanges ("cannot unmarshal number 2147483648 into ... of type int"); it passes on main. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
…again MIGRATION_v0.21.md said "114 types more than in v0.20.0"; main has 126 since the 1.34.1 bump (#161). The same count was wrong on #143 (112 vs 119) and on #150 and #152 (112 vs 114): every PR that adds a type moves it. The sentence now gives the v0.20.0 count, which a tag fixes, and names the examples. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
verify-notification-barrier and verify-session-cancel record a sha256 of every function and constant their models cover in fingerprint.txt, but only check.sh compares it, and check.sh runs by hand (it needs Java). Main twice landed covered changes with a stale fingerprint.txt (70aab41, 2ca53de). scripts/check-model-fingerprints computes each fingerprint the way check.sh --update-fingerprint does (no TLC, under a second), compares it with the committed file, restores the file, and names the steps to take. make check (and so CI) runs it. At 70aab41 it exits 1 and lists shutdownReceive, processNotifications and handleResponse; a one-line edit inside receive on main also fails it. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
AGENTS.md now ends with a table of the rules that came from repeated review findings and the check that enforces each, or "Nothing: judgment" where no check can. It also stops suggesting `gofumpt -w .`: the repo formats Go with gofmt through treefmt, and gofumpt rewrites 13 files that no change touched. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
An independent verifier of #165 found: - check-model-fingerprints left a rewritten fingerprint.txt behind if it was interrupted between check.sh and the restore. It now keeps every committed file in a temp folder and puts it back on any exit; a TERM mid-run exits 130 with the files unchanged. - check-code-citations said nine PRs rewrote "60 to 110 rows"; that counted added and removed lines. They rewrote 31 to 55 rows each. - The AGENTS.md fingerprint row now says what the check does: it recomputes the fingerprint; nothing checks that TLC ran. Correction to 04b6206's message: at 70aab41 the check lists only `receive`, not shutdownReceive, processNotifications and handleResponse. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
|
@codex review |
timeout and Ctrl-C signal the whole process group, so the INT/TERM trap could fire again inside the EXIT trap and cut restore short before it removed its temp folder (3 of 24 interrupted runs, found by the #165 verifier). restore now ignores INT and TERM first. 40 interrupted runs under `timeout -s INT|TERM` leave no temp folder (the old script leaked 3) and every fingerprint.txt unchanged. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b6cf7d49ae
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codex on #165: test-module-zip ran `rm -rf "$MODZIP_OUT"`, so MODZIP_OUT=$PWD or another kept folder deleted it (reproduced: a file in the named folder was gone), and a relative MODZIP_OUT unpacked under scripts/modzip and then failed with "cd: rel/out: No such file or directory". MODZIP_OUT must now be a new or empty folder: the script creates it, resolves it to an absolute path, and exits 2 when it holds anything. A non-empty folder keeps its files; MODZIP_OUT=rel/out unpacks there and the tests pass. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Turns five mistake classes that kept coming back in review into checks that fail in CI (or into code that can no longer be written), and records the rest as rules in AGENTS.md. The module zip check found a live bug:
go testof the module zip fails onmaintoday.Classes, evidence and fix
TestUnion_MarshalJSON_RoundTripsTheG2Transcriptsstill fails in the module zip onmainrepoFiles(repo_files_test.go) is the one way to read such a file: it skips in the module zip, fails in a checkout when nothing matches.make test-module-zipbuilds the real zip withgolang.org/x/mod/zip(newscripts/modzipmodule) and runsgo vet+go testthere. CI step added.connection.gorewrote 31-55 rows each (#68, #88, #89, #110, #129, #135, #139, #142, #153); a verifier on #135 found 153 of 258 numbers moved(1024)becomes1024 entriesso the check does not mistake a constant for a line).scripts/check-code-citationsinmake checkfails on a line-number citation in any skill with afingerprint.txt.mainlanded with a stalefingerprint.txtat 70aab41 and 2ca53descripts/check-model-fingerprintsinmake checkrecomputes each fingerprint (no TLC, < 1 s), compares, restores the file on every exit (interrupts included) and names the steps.intwraps on 32-bitmake test-386(GOARCH=386vet + test for the SDK andcmd/generate). CI step added.main(says 114, is 126)MIGRATION_v0.21.md; the v0.20.0 count (80), which a tag fixes, stays. Rule added.AGENTS.md now ends with a table that pairs each rule with what enforces it. False doc sentences, fixes that miss a sibling path, and assertions that cannot fail stay "Nothing: judgment": no cheap mechanical check covers them. AGENTS.md also stops suggesting
gofumpt -w ., which rewrites 13 files that the repo formats withgofmt.Proof that each check fails on a real past mistake
make test-module-zipwithout the union test change:find the G2 transcripts: <nil> (0 files), exit 1.scripts/check-code-citationsonmain's barrier SKILL.md: 94 citations, exit 1.scripts/check-model-fingerprintsat 70aab41: exit 1, listsreceive. A one-line edit insidereceiveon this branch also fails it. (Commit 04b6206's message names three other functions; that is wrong, and 048c7ab corrects it.)GOARCH=386 go test ./...incmd/generateat 6c4769e:TestWriteTypesJen_ValidateChecksIntegerRangesfails withcannot unmarshal number 2147483648 ... of type int.Protocol impact
None. No schema, generated file or SDK code changes; test, script, CI and doc changes only.
Validation
An independent verifier re-derived the claims above and re-ran the checks (module zip contents match a
CreateFromVCSzip of a fresh clone byte for byte; every rewritten barrier row quotes code that exists in the named function).make check(TREEFMT_NO_CACHE=1): passmake test: passmake test-module-zip: pass (~40 s)make test-386: pass (~85 s on a loaded host)actionlint .github/workflows/ci.yaml: passGenerated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high