audit follow-up: bring PR-A + PR-B into main + bump VERSION to 0.1.3#18
Merged
Conversation
Per docs/dev/0015-audit-follow-up-plan-address-all-16-findings.md. No behavioral changes; comment / doc / test-helper edits only. Findings closed: - F-1 cite AP-02 → AP-13 (pkg/golist/errors.go:16) - F-2 cite EH-08 → CC-08 + post-hoc-vs-propagation rationale (pkg/golist/golist.go:204-211) - F-3 cite EH-08 → CC-08 + same rationale (internal/cli/seam.go:62-69) - F-4 rationale strengthened in both classifier comments above (PR-C ctx-first refactor declined per work-order recommendation) - F-6 "Parallel-unsafe" header on each with*Seam test file (4 files) - F-7 cross-reference comment in cli_test.go:TestRun_Version pointing at version_test.withMetadata as the canonical pattern - F-8 inline writeAll into writeFile; delete helpers_test.go - F-9 inline-map subtest name → struct table in golist_test.go - F-10/F-11 changeset doc + internal comment rewritten to describe actual post-bug-#12 behaviour (filepath.Abs("") → cwd, not "stays empty") - F-12 PS-06 deviation note added to CLAUDE.md Architecture § (carry-forward to v1.0) - F-13 dead `_ = io.EOF` placeholder + comment removed - F-15 moduleRootSet config field doc-commented; flag stays - F-16 AP-07 deviation paragraph added at version.go var block (link-time vs runtime; kubectl/hugo/cobra precedent; no t.Parallel) - PROMPT-1 audit-prompt cite TD-09/IM-04 → IM-12/TD-09 in workbench/cc-audit-prompt-go-quality.md S-1 (citation drift): closed; all 3 concrete + 1 meta instance fixed. S-2 (seam-pattern discipline): closed at the doc layer; structural enforcement (vet linter) logged as v1.0+ future work. F-5, F-14 deferred to PR-B (cousin-shape symmetry). make check passes: build + lint (golangci-lint clean) + test (go test -race -count=1 ./...) all green.
Per docs/dev/0015-audit-follow-up-plan-address-all-16-findings.md. F-5: *GitDiffError grows a Dir field, mirroring *golist.ExitError's shape. classifyGitDiffError's third parameter changes from `_` to `dir string`; the caller at internal/cli/cli.go passes cfg.root which is now stored on the diagnostic instead of discarded. Assertion added in TestClassifyGitDiffError/exec_exit_error verifies ge.Dir == "/m". F-14: gitDiffResult gains argv []string. defaultRunGitDiff constructs argv once and uses it both for exec.CommandContext and as the returned diagnostic argv — the two paths can no longer drift. The synthetic argv reconstruction at cli.go's loadChangeSet (the dead-letter that the audit flagged) is removed; the call site now reads res.argv. Tests that synthesize gitDiffResult without setting argv produce nil Cmd in the diagnostic; acceptable for the existing tests (none assert on Cmd) and a future test that needs argv sets it on the synthetic. Audit doc 0014 grows a "Post-audit closure — PR-B" section at the bottom (separate from PR-A's closure walk to avoid merge conflict). make check passes: build + lint (golangci-lint clean) + test (go test -race -count=1 ./...) all green. Closes the last 2 of 16 audit findings + 1 meta-finding (PROMPT-1) when both PR-A and PR-B land on main.
Picks up the audit follow-up content (PR-A + PR-B) merging into main. Matches the b1a0c03 micro-bump pattern.
49c8162 to
d14ad7e
Compare
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.
Summary
Brings the merged PR-A (#16) and PR-B (#17) content from
audit/0014-go-quality-auditintomain, plus a release-prep VERSION bump from 0.1.2 → 0.1.3.PR #15 (the audit doc + CDC verification + 0015 plan) already merged to main; this PR carries only the action layer that landed on the audit branch afterward.
What's in this PR
Code / doc changes from PR-A (#16) — documentation pass closing 14 findings
(AP-02)→(AP-13)atpkg/golist/errors.goEH-08→CC-08+ post-hoc-vs-propagation rationale atpkg/golist/golist.gointernal/cli/seam.gocli_test.go(decline-with-doc)internal/cli/helpers_test.godeleted;writeAllinlinedpkg/changeset_ = io.EOFplaceholder removedmoduleRootSetdoc-commented; flag staysversion.govar blockTD-09 / IM-04→IM-12 / TD-09Code changes from PR-B (#17) — cousin-shape symmetry
*GitDiffError.Dirfield added; populated fromcfg.root(was discarded)gitDiffResult.argvadded; synthetic argv reconstruction at the cli call site removed (cannot drift from real exec)Release prep
internal/project/VERSION: 0.1.2 → 0.1.3 (matches the b1a0c03 micro-bump pattern)Diff scope
17 files changed, 168 insertions / 39 deletions:
Test plan
make check(build + lint viagolangci-lint+go test -race -count=1 ./...) — passes locally on this branch tip0.1.3(cat internal/project/VERSION; should be 5 bytes, no trailing newline — symlink at./VERSIONreflects)cascade --versionagainst a built binary reports0.1.3once merged + taggedgrep -n 'AP-13' pkg/golist/errors.goshould hit;grep -n 'AP-02' pkg/golist/errors.goshould missgrep -n 'Dir ' internal/cli/errors.go pkg/golist/errors.goshould show both types carry the fieldClosure ledger reference
docs/dev/0014-go-quality-audit.md(already on main from PR #15) carries the per-finding closure walks for PR-A (above the existing## Closureheading) and PR-B (appended at the bottom of the file). When this PR merges, every audit finding will be closed onmain.🤖 Generated with Claude Code