Исправить замечания ревью кода: убрать повтор в AppendOnce за счёт запаса у чистки ключей, вынести MessagePayload и SameContent, принять X-Request-Id от балансировщика, упростить фоновые задачи сервера, сократить комментарии

This commit is contained in:
2026-11-04 12:19:49 +03:00
parent c9d0f73221
commit 7fbd781ca3
25 changed files with 207 additions and 247 deletions
-2
View File
@@ -52,7 +52,6 @@ func TestMain(m *testing.M) {
const testPassword = "correct-horse-battery"
// testInstance is the alias of the in-process application under test.
const testInstance = "00000000000000a1"
// errorBody mirrors the contract error envelope.
@@ -245,7 +244,6 @@ func (ts *tester) message(token, chatID, text string) chat.MessageResponse {
return decode[chat.MessageResponse](ts.t, res)
}
// freshKey is the header of a first attempt: a key never used before.
func freshKey() map[string]string {
return map[string]string{"Idempotency-Key": uuid.NewString()}
}