Files
mattermost/server/AGENTS.md
a7c6862497 [MM-70221] Use request loggers in store methods (#37648)
* Use request loggers in store methods

Co-authored-by: Ben Schumacher <hanzei@users.noreply.github.com>

* Document request logger guidance

Co-authored-by: Ben Schumacher <hanzei@users.noreply.github.com>

* Fix missed rctx args in scheduled post tests after master merge

go vet caught call sites the build alone didn't: test files with
stale ScheduledPostStore signatures missing the new rctx parameter.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Ben Schumacher <hanzei@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2026-08-19 13:08:45 +02:00

709 B

AGENTS.md

Never run go mod tidy directly. Always run make modules-tidy instead — it excludes private enterprise imports that would otherwise break the tidy.

After editing i18n/en.json, always run make i18n-extract — it regenerates the file with strings in the required order.

Prefer request-scoped loggers when logging from request paths. If a method needs to log and does not have access to the request logger, it is reasonable to add request.CTX to the method signature when the caller can provide it. In the store layer, do not use context.Context in store method signatures. Use request.CTX and only call rctx.Context() inside internals that require a standard context.Context.