next -> main #46

Merged
clawbot merged 2 commits from next into main 2026-08-10 15:58:35 +02:00
Collaborator

Milestone branch for the current cycle. Further commits will accumulate here.

Commits

  • 60442ce build: add a make build target, drop README's raw go build (closes #19)
  • e3ab4ab build: add a make cover target for per-function coverage (closes #17)

What changed

Makefile gains build, cover and cover-html. Every generated artifact goes under build/, which .gitignore covers as a whole:

  • make buildbuild/rogue
  • make coverbuild/coverage.out, then the per-function report on stdout
  • make cover-htmlbuild/coverage.html

None of the three is in check or test; check is still exactly fmt-check lint test. All three write files, so adding any of them to check would break the rule that check does not modify the working tree — the check recipe carries a comment saying so.

README.md: the "Building and running" block and the run examples use make build / ./build/rogue, and the make-target list names build, cover and cover-html. No raw go invocation is left in the file.

.dockerignore excludes /build/. Not asked for in either issue: the new targets put a multi-megabyte binary inside the repo, which would otherwise ship into the lint build context. Nothing excluded is a Go source, go.mod/go.sum or .golangci.yml.

TODO.md gets a Completed Steps entry per commit. "Next Step" is not rotated.

No Go source changes. .golangci.yml untouched (git diff over it is empty across both commits).

Verification

GOFLAGS=-count=1 make check on the rebased head, with build/ deleted first:

#10 [lint 2/2] RUN golangci-lint run --config .golangci.yml ./...
#10 11.92 0 issues.
#10 DONE 13.2s
ok  git.eeqj.de/sneak/rgoue/cmd/rogue  1.075s  coverage: 29.7% of statements
ok  git.eeqj.de/sneak/rgoue/game       4.049s  coverage: 64.0% of statements
real 0m22.453s

The lint layer reports DONE 13.2s, not CACHED, so it executed. No test line carries (cached); the durations are real runs under -race. git status --porcelain is empty afterwards.

Artifacts, created after that check:

=== BUILD ===
go build -o build/rogue ./cmd/rogue
=== COVER ===
ok  git.eeqj.de/sneak/rgoue/cmd/rogue  0.009s  coverage: 29.7% of statements
ok  git.eeqj.de/sneak/rgoue/game       0.448s  coverage: 64.0% of statements
total:  (statements)  62.6%
wrote build/coverage.html
=== ARTIFACTS ===
coverage.html
coverage.out
rogue

git status --porcelain empty with all three present, so none is committable.

make cover output is per-function, e.g. game/weapons.go:109: wield 0.0%, term/tcell.go:94: ReadChar 0.0%.

.dockerignore change confirmed by build-context size: the run before it transferred 6.25MB with build/rogue present; after it, 72.32kB.

Note

golangci-lint emits a deprecation warning on every run — gomodguard deprecated since v2.12.0, replaced by gomodguard_v2. Not touched here: .golangci.yml is out of scope for both issues.

Milestone branch for the current cycle. Further commits will accumulate here. ## Commits - `60442ce` build: add a `make build` target, drop README's raw `go build` (closes https://git.eeqj.de/sneak/rgoue/issues/19) - `e3ab4ab` build: add a `make cover` target for per-function coverage (closes https://git.eeqj.de/sneak/rgoue/issues/17) ## What changed `Makefile` gains `build`, `cover` and `cover-html`. Every generated artifact goes under `build/`, which `.gitignore` covers as a whole: - `make build` → `build/rogue` - `make cover` → `build/coverage.out`, then the per-function report on stdout - `make cover-html` → `build/coverage.html` None of the three is in `check` or `test`; `check` is still exactly `fmt-check lint test`. All three write files, so adding any of them to `check` would break the rule that `check` does not modify the working tree — the `check` recipe carries a comment saying so. `README.md`: the "Building and running" block and the run examples use `make build` / `./build/rogue`, and the make-target list names `build`, `cover` and `cover-html`. No raw `go` invocation is left in the file. `.dockerignore` excludes `/build/`. Not asked for in either issue: the new targets put a multi-megabyte binary inside the repo, which would otherwise ship into the lint build context. Nothing excluded is a Go source, `go.mod`/`go.sum` or `.golangci.yml`. `TODO.md` gets a Completed Steps entry per commit. "Next Step" is not rotated. No Go source changes. `.golangci.yml` untouched (`git diff` over it is empty across both commits). ## Verification `GOFLAGS=-count=1 make check` on the rebased head, with `build/` deleted first: ``` #10 [lint 2/2] RUN golangci-lint run --config .golangci.yml ./... #10 11.92 0 issues. #10 DONE 13.2s ok git.eeqj.de/sneak/rgoue/cmd/rogue 1.075s coverage: 29.7% of statements ok git.eeqj.de/sneak/rgoue/game 4.049s coverage: 64.0% of statements real 0m22.453s ``` The lint layer reports `DONE 13.2s`, not `CACHED`, so it executed. No test line carries `(cached)`; the durations are real runs under `-race`. `git status --porcelain` is empty afterwards. Artifacts, created after that `check`: ``` === BUILD === go build -o build/rogue ./cmd/rogue === COVER === ok git.eeqj.de/sneak/rgoue/cmd/rogue 0.009s coverage: 29.7% of statements ok git.eeqj.de/sneak/rgoue/game 0.448s coverage: 64.0% of statements total: (statements) 62.6% wrote build/coverage.html === ARTIFACTS === coverage.html coverage.out rogue ``` `git status --porcelain` empty with all three present, so none is committable. `make cover` output is per-function, e.g. `game/weapons.go:109: wield 0.0%`, `term/tcell.go:94: ReadChar 0.0%`. `.dockerignore` change confirmed by build-context size: the run before it transferred 6.25MB with `build/rogue` present; after it, 72.32kB. ## Note `golangci-lint` emits a deprecation warning on every run — `gomodguard` deprecated since v2.12.0, replaced by `gomodguard_v2`. Not touched here: `.golangci.yml` is out of scope for both issues.
clawbot added the needs-review label 2026-08-10 15:50:07 +02:00
clawbot added 2 commits 2026-08-10 15:50:07 +02:00
The executable builds to build/rogue. All generated artifacts go under
build/, which .gitignore covers as a whole; a target writing outside it
can commit its output.

build is in neither check nor test: check stays fmt-check lint test and
still writes nothing into the working tree.

README's "Building and running" block and the run examples use
./build/rogue, and no raw go invocation is left in the file.

Verified: make build writes build/rogue and git status stays clean;
GOFLAGS=-count=1 make check green in 34s with the lint layer executing
(21.9s, "0 issues.", not CACHED) and the suite running for real (cmd/rogue
1.027s, game 3.450s), git status clean afterwards.
make cover writes build/coverage.out and prints the per-function report;
make cover-html renders the same profile to build/coverage.html. The
per-package percentage make test prints cannot say which function is
untested.

Both write files, so neither is in check, and neither may be added to it:
check must not modify the working tree. Their output lands under the
already-ignored build/.

Verified: make cover printed per-function lines and a 62.6% total,
make cover-html wrote build/coverage.html, and git status stayed clean.
GOFLAGS=-count=1 make check green in 24s with the lint layer executing
(12.0s, "0 issues.", not CACHED) and the suite running for real (cmd/rogue
1.037s, game 3.410s); check is still fmt-check lint test and git status is
clean afterwards.
clawbot changed title from next -> main to next -> main 2026-08-10 15:50:13 +02:00
Author
Collaborator

Review: PASS

Independent review of e3ab4ab in a fresh clone. Both definitions of done are met (#19, #17); no defects found. Verified: .dockerignore gate intact (below), check still exactly fmt-check lint test, clean git status after check/build/cover/cover-html, working binary at build/rogue, genuine 607-line per-function report plus HTML, no raw go in README.md, one TODO entry per commit with "Next Step" unrotated, exact (closes #19) / (closes #17) titles, no Go or .golangci.yml changes, no scaffold additions, prettier clean, merges cleanly to main, no Claude/Anthropic references or trailers.

.dockerignore gate, verified behaviourally not by reasoning

Planted two real violations (an unused over-length global in the tracked game/misc.go, and a brand-new self-contained game/probe_*.go referenced by nothing) plus one in a Go file under build/, then ran make lint. Result: both normal-source violations were caught and the build failed (3 issues: lll 1, unused 2); only the build/ one was invisible. lll firing at 88 columns proves .golangci.yml reached and was applied, and go mod download proves go.mod/go.sum did. Probes reverted; tree clean.

The exclusion cannot become the silent-drop trap the file warns about, because /build/ is also in .gitignoregit add build/x.go is refused, so no Go source under that path can ever exist in a tracked state. Effectiveness confirmed too: with 6MB of artifacts present the lint context transferred 15.85kB.

Anomalies and disclosures

  • make cover is subject to Go's test cache and prints (cached) on a repeat run. Probed rather than assumed: with the profile deleted, a fully-cached run still regenerates build/coverage.out and the report is cache-keyed to the sources, so it cannot go stale. Not a defect, but a cached cover looks like nothing ran.
  • The PR body's .dockerignore evidence (6.25MB → 72.32kB) is a BuildKit incremental-context delta, not absolute context size. On a fresh clone the full transfer is 835.77kB. The conclusion stands; the figures are not reproducible as absolutes.
  • No CI exists in this repo (no workflow files; 0 commit statuses on the head), so "CI green" is not applicable — the gate is local make check, which I ran green in full: lint layer DONE 21.6s with 0 issues. (not CACHED), tests cmd/rogue 1.022s / game 3.461s under GOFLAGS=-count=1 with zero (cached) markers.
  • #17 DoD item 3 is satisfied in substance without commit 2 touching .gitignore: /build/ landed in commit 1 (and *.out predates both), so a stray profile is uncommittable either way.
  • The gomodguard deprecation warning noted in the PR body is real and correctly left alone — .golangci.yml is byte-identical to the canonical shared config per MEMORY.md and must not be edited, so it belongs upstream or in its own issue.
  • Nit, not blocking: the middle sentence of the cover comment ("The percentage make test prints is a per-package total and cannot answer that") is rationale rather than a trap, so it sits on the line the 2026-08-10 comment rule draws.

Labels left unchanged for the caller.

## Review: PASS Independent review of `e3ab4ab` in a fresh clone. Both definitions of done are met (https://git.eeqj.de/sneak/rgoue/issues/19, https://git.eeqj.de/sneak/rgoue/issues/17); no defects found. Verified: `.dockerignore` gate intact (below), `check` still exactly `fmt-check lint test`, clean `git status` after `check`/`build`/`cover`/`cover-html`, working binary at `build/rogue`, genuine 607-line per-function report plus HTML, no raw `go` in `README.md`, one TODO entry per commit with "Next Step" unrotated, exact ` (closes #19)` / ` (closes #17)` titles, no Go or `.golangci.yml` changes, no scaffold additions, prettier clean, merges cleanly to `main`, no Claude/Anthropic references or trailers. ### `.dockerignore` gate, verified behaviourally not by reasoning Planted two real violations (an unused over-length global in the tracked `game/misc.go`, and a brand-new self-contained `game/probe_*.go` referenced by nothing) plus one in a Go file under `build/`, then ran `make lint`. Result: both normal-source violations were caught and the build failed (`3 issues: lll 1, unused 2`); only the `build/` one was invisible. `lll` firing at 88 columns proves `.golangci.yml` reached and was applied, and `go mod download` proves `go.mod`/`go.sum` did. Probes reverted; tree clean. The exclusion cannot become the silent-drop trap the file warns about, because `/build/` is also in `.gitignore` — `git add build/x.go` is refused, so no Go source under that path can ever exist in a tracked state. Effectiveness confirmed too: with 6MB of artifacts present the lint context transferred 15.85kB. ### Anomalies and disclosures - `make cover` is subject to Go's test cache and prints `(cached)` on a repeat run. Probed rather than assumed: with the profile deleted, a fully-cached run still regenerates `build/coverage.out` and the report is cache-keyed to the sources, so it cannot go stale. Not a defect, but a cached `cover` looks like nothing ran. - The PR body's `.dockerignore` evidence (6.25MB → 72.32kB) is a BuildKit incremental-context delta, not absolute context size. On a fresh clone the full transfer is 835.77kB. The conclusion stands; the figures are not reproducible as absolutes. - No CI exists in this repo (no workflow files; 0 commit statuses on the head), so "CI green" is not applicable — the gate is local `make check`, which I ran green in full: lint layer `DONE 21.6s` with `0 issues.` (not `CACHED`), tests `cmd/rogue 1.022s` / `game 3.461s` under `GOFLAGS=-count=1` with zero `(cached)` markers. - https://git.eeqj.de/sneak/rgoue/issues/17 DoD item 3 is satisfied in substance without commit 2 touching `.gitignore`: `/build/` landed in commit 1 (and `*.out` predates both), so a stray profile is uncommittable either way. - The `gomodguard` deprecation warning noted in the PR body is real and correctly left alone — `.golangci.yml` is byte-identical to the canonical shared config per `MEMORY.md` and must not be edited, so it belongs upstream or in its own issue. - Nit, not blocking: the middle sentence of the `cover` comment ("The percentage `make test` prints is a per-package total and cannot answer that") is rationale rather than a trap, so it sits on the line the 2026-08-10 comment rule draws. Labels left unchanged for the caller.
clawbot merged commit 0bef53bd11 into main 2026-08-10 15:58:35 +02:00
Sign in to join this conversation.