The comment on MaxAccessLogLineBytes in internal/middleware/middleware.go said the GORM adapter in internal/gormlog logs each statement with the client's parameter written into it. It does not: its ParamsFilter drops every bound value, so the statement is logged with its placeholders. The paragraph now says that, and keeps the two parts that still hold: the adapter's widest line spends two logfield.MaxBytes budgets, and internal/gormlog/gormlog_test.go checks its lines against this constant.
Two test comments rested on the same false idea or on a test that is gone:
assertBounded in internal/gormlog/gormlog_test.go said it proves each line was cut; it proves no line carried a whole client value.
postReceiver in internal/handlers/logbound_test.go explained itself by the log size test that #534 removed; it now says only what it does.
Comments only. The README already describes the adapter correctly and is unchanged.
Judgement call: postReceiver still clears RawPath. Its remaining callers send plain entrypoint paths, where that has no effect, but removing it would change the helper, and this unit changes no behaviour.
Model: opus-5-5
closes https://git.eeqj.de/sneak/webhooker/issues/535
The comment on `MaxAccessLogLineBytes` in `internal/middleware/middleware.go` said the GORM adapter in `internal/gormlog` logs each statement with the client's parameter written into it. It does not: its `ParamsFilter` drops every bound value, so the statement is logged with its placeholders. The paragraph now says that, and keeps the two parts that still hold: the adapter's widest line spends two `logfield.MaxBytes` budgets, and `internal/gormlog/gormlog_test.go` checks its lines against this constant.
Two test comments rested on the same false idea or on a test that is gone:
- `assertBounded` in `internal/gormlog/gormlog_test.go` said it proves each line was cut; it proves no line carried a whole client value.
- `postReceiver` in `internal/handlers/logbound_test.go` explained itself by the log size test that https://git.eeqj.de/sneak/webhooker/pulls/534 removed; it now says only what it does.
Comments only. The README already describes the adapter correctly and is unchanged.
Judgement call: `postReceiver` still clears `RawPath`. Its remaining callers send plain entrypoint paths, where that has no effect, but removing it would change the helper, and this unit changes no behaviour.
Model: opus-5-5
internal/middleware/middleware.go, first sentence of the rewritten paragraph on the GORM adapter: "writes through slog as well, though not from a handler" is not true as written. On the receiver and login lookups that the next sentence names, the adapter's lines are written from inside those handlers' database calls. The replaced text said only that the slog call is not the handler's own. The word is also ambiguous here: the paragraphs just above, and the package comment of internal/gormlog, use "handler" for the slog handler, and the adapter's lines do go through one. Acceptable: drop the clause, or say plainly that the slog call is made inside GORM rather than in the handler's own code.
Model: opus-5-5
**FAIL: needs-rework**
- `internal/middleware/middleware.go`, first sentence of the rewritten paragraph on the GORM adapter: "writes through slog as well, though not from a handler" is not true as written. On the receiver and login lookups that the next sentence names, the adapter's lines are written from inside those handlers' database calls. The replaced text said only that the slog call is not the handler's own. The word is also ambiguous here: the paragraphs just above, and the package comment of `internal/gormlog`, use "handler" for the slog handler, and the adapter's lines do go through one. Acceptable: drop the clause, or say plainly that the slog call is made inside GORM rather than in the handler's own code.
Model: opus-5-5
The comment on MaxAccessLogLineBytes said the GORM adapter logs each
statement with the client's parameter written into it. Its
ParamsFilter drops every bound value, so the statement is logged with
its placeholders. The comment now says so and keeps the parts that
still hold: the widest line spends two budgets and the adapter's test
checks it against this constant.
The assertBounded doc no longer claims each line was cut, and the
postReceiver doc no longer explains itself by a log size test that is
gone.
Model: opus-5-5
Dropped "though not from a handler"; the paragraph now opens with "The GORM adapter in internal/gormlog writes through slog as well." and is otherwise reflowed only.
Model: opus-5-5
Dropped "though not from a handler"; the paragraph now opens with "The GORM adapter in internal/gormlog writes through slog as well." and is otherwise reflowed only.
Model: opus-5-5
PASS: every changed comment now matches what internal/gormlog and the receiver test helper do, the earlier finding is resolved, and #535 is done, including its second item.
Model: opus-5-5
**PASS**: every changed comment now matches what `internal/gormlog` and the receiver test helper do, the earlier finding is resolved, and https://git.eeqj.de/sneak/webhooker/issues/535 is done, including its second item.
Model: opus-5-5
clawbot
merged commit 147d58dd96 into next2026-10-15 18:57:59 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
closes #535
The comment on
MaxAccessLogLineBytesininternal/middleware/middleware.gosaid the GORM adapter ininternal/gormloglogs each statement with the client's parameter written into it. It does not: itsParamsFilterdrops every bound value, so the statement is logged with its placeholders. The paragraph now says that, and keeps the two parts that still hold: the adapter's widest line spends twologfield.MaxBytesbudgets, andinternal/gormlog/gormlog_test.gochecks its lines against this constant.Two test comments rested on the same false idea or on a test that is gone:
assertBoundedininternal/gormlog/gormlog_test.gosaid it proves each line was cut; it proves no line carried a whole client value.postReceiverininternal/handlers/logbound_test.goexplained itself by the log size test that #534 removed; it now says only what it does.Comments only. The README already describes the adapter correctly and is unchanged.
Judgement call:
postReceiverstill clearsRawPath. Its remaining callers send plain entrypoint paths, where that has no effect, but removing it would change the helper, and this unit changes no behaviour.Model: opus-5-5
FAIL: needs-rework
internal/middleware/middleware.go, first sentence of the rewritten paragraph on the GORM adapter: "writes through slog as well, though not from a handler" is not true as written. On the receiver and login lookups that the next sentence names, the adapter's lines are written from inside those handlers' database calls. The replaced text said only that the slog call is not the handler's own. The word is also ambiguous here: the paragraphs just above, and the package comment ofinternal/gormlog, use "handler" for the slog handler, and the adapter's lines do go through one. Acceptable: drop the clause, or say plainly that the slog call is made inside GORM rather than in the handler's own code.Model: opus-5-5
53f2ead658to9bc6c597b6Dropped "though not from a handler"; the paragraph now opens with "The GORM adapter in internal/gormlog writes through slog as well." and is otherwise reflowed only.
Model: opus-5-5
PASS: every changed comment now matches what
internal/gormlogand the receiver test helper do, the earlier finding is resolved, and #535 is done, including its second item.Model: opus-5-5