From 4300d49c209a560bcd52f96528ef932dac1d9e79 Mon Sep 17 00:00:00 2001 From: Vladislav Kunetskiy Date: Fri, 25 Sep 2026 00:15:40 +0300 Subject: [PATCH 1/3] lab1 --- .github/workflows/app.yml | 47 + .golangci.yml | 139 + .mockery.yml | 23 + .ogen.yml | 10 + Dockerfile | 42 + cmd/messenger/main.go | 103 + evidence/check.txt | 3 + evidence/concurrency.txt | 2 + evidence/docker.txt | 11 + evidence/health.txt | 1 + evidence/memory-experiment.json | 17279 ++++++++++++++++ evidence/memory-experiment.png | Bin 0 -> 104191 bytes evidence/memory-experiment.txt | 8 + evidence/quality.txt | 43 + evidence/restart.txt | 10 + evidence/sigterm.txt | 7 + evidence/smoke.txt | 2 + .../track1/baseline-storage-benchmark.txt | 21 + evidence/track1/baseline.json | 128 + evidence/track1/comparison.json | 110 + evidence/track1/go-baseline/results.json | 211 + evidence/track1/go-comparison.json | 266 + evidence/track1/go-optimized/results.json | 209 + .../track1/optimized-storage-benchmark.txt | 21 + evidence/track1/optimized.json | 128 + go.mod | 82 + go.sum | 172 + internal/config/config.go | 93 + internal/config/config_test.go | 184 + internal/domain/chat.go | 38 + internal/domain/cursor.go | 17 + internal/domain/errors.go | 11 + internal/domain/message.go | 25 + internal/domain/page.go | 8 + internal/domain/text.go | 14 + internal/domain/user.go | 23 + internal/domain/validation_test.go | 86 + internal/logger/errors.go | 8 + internal/logger/logger.go | 138 + internal/logger/logger_test.go | 193 + internal/service/chat/mocks/Repository.go | 265 + internal/service/chat/service.go | 71 + internal/service/chat/service_test.go | 140 + internal/service/message/mocks/Repository.go | 199 + internal/service/message/service.go | 61 + internal/service/message/service_test.go | 143 + internal/service/user/mocks/Repository.go | 181 + internal/service/user/service.go | 47 + internal/service/user/service_test.go | 85 + internal/storage/memory/chat_repository.go | 95 + .../storage/memory/message_benchmark_test.go | 51 + internal/storage/memory/message_repository.go | 77 + internal/storage/memory/repository_test.go | 378 + internal/storage/memory/store.go | 144 + internal/storage/memory/store_test.go | 175 + internal/storage/memory/user_repository.go | 50 + internal/transport/rest/errors.go | 116 + internal/transport/rest/handler.go | 318 + internal/transport/rest/logging.go | 130 + internal/transport/rest/logging_test.go | 206 + internal/transport/rest/oas/oas_cfg_gen.go | 173 + .../transport/rest/oas/oas_handlers_gen.go | 1023 + .../transport/rest/oas/oas_interfaces_gen.go | 38 + internal/transport/rest/oas/oas_json_gen.go | 1514 ++ .../transport/rest/oas/oas_middleware_gen.go | 10 + .../transport/rest/oas/oas_operations_gen.go | 18 + .../transport/rest/oas/oas_parameters_gen.go | 543 + .../rest/oas/oas_request_decoders_gen.go | 252 + .../rest/oas/oas_response_encoders_gen.go | 2158 ++ internal/transport/rest/oas/oas_router_gen.go | 647 + .../transport/rest/oas/oas_schemas_gen.go | 1068 + .../transport/rest/oas/oas_security_gen.go | 84 + internal/transport/rest/oas/oas_server_gen.go | 86 + .../rest/oas/oas_unimplemented_gen.go | 95 + .../transport/rest/oas/oas_validators_gen.go | 1332 ++ internal/transport/rest/requestid.go | 35 + internal/transport/rest/router.go | 28 + internal/transport/rest/router_test.go | 643 + internal/transport/rest/security.go | 56 + scripts/memory_experiment.py | 271 + scripts/track1_benchmark.py | 267 + 81 files changed, 33189 insertions(+) create mode 100644 .github/workflows/app.yml create mode 100644 .golangci.yml create mode 100644 .mockery.yml create mode 100644 .ogen.yml create mode 100644 Dockerfile create mode 100644 cmd/messenger/main.go create mode 100644 evidence/check.txt create mode 100644 evidence/concurrency.txt create mode 100644 evidence/docker.txt create mode 100644 evidence/health.txt create mode 100644 evidence/memory-experiment.json create mode 100644 evidence/memory-experiment.png create mode 100644 evidence/memory-experiment.txt create mode 100644 evidence/quality.txt create mode 100644 evidence/restart.txt create mode 100644 evidence/sigterm.txt create mode 100644 evidence/smoke.txt create mode 100644 evidence/track1/baseline-storage-benchmark.txt create mode 100644 evidence/track1/baseline.json create mode 100644 evidence/track1/comparison.json create mode 100644 evidence/track1/go-baseline/results.json create mode 100644 evidence/track1/go-comparison.json create mode 100644 evidence/track1/go-optimized/results.json create mode 100644 evidence/track1/optimized-storage-benchmark.txt create mode 100644 evidence/track1/optimized.json create mode 100644 go.mod create mode 100644 go.sum create mode 100644 internal/config/config.go create mode 100644 internal/config/config_test.go create mode 100644 internal/domain/chat.go create mode 100644 internal/domain/cursor.go create mode 100644 internal/domain/errors.go create mode 100644 internal/domain/message.go create mode 100644 internal/domain/page.go create mode 100644 internal/domain/text.go create mode 100644 internal/domain/user.go create mode 100644 internal/domain/validation_test.go create mode 100644 internal/logger/errors.go create mode 100644 internal/logger/logger.go create mode 100644 internal/logger/logger_test.go create mode 100644 internal/service/chat/mocks/Repository.go create mode 100644 internal/service/chat/service.go create mode 100644 internal/service/chat/service_test.go create mode 100644 internal/service/message/mocks/Repository.go create mode 100644 internal/service/message/service.go create mode 100644 internal/service/message/service_test.go create mode 100644 internal/service/user/mocks/Repository.go create mode 100644 internal/service/user/service.go create mode 100644 internal/service/user/service_test.go create mode 100644 internal/storage/memory/chat_repository.go create mode 100644 internal/storage/memory/message_benchmark_test.go create mode 100644 internal/storage/memory/message_repository.go create mode 100644 internal/storage/memory/repository_test.go create mode 100644 internal/storage/memory/store.go create mode 100644 internal/storage/memory/store_test.go create mode 100644 internal/storage/memory/user_repository.go create mode 100644 internal/transport/rest/errors.go create mode 100644 internal/transport/rest/handler.go create mode 100644 internal/transport/rest/logging.go create mode 100644 internal/transport/rest/logging_test.go create mode 100644 internal/transport/rest/oas/oas_cfg_gen.go create mode 100644 internal/transport/rest/oas/oas_handlers_gen.go create mode 100644 internal/transport/rest/oas/oas_interfaces_gen.go create mode 100644 internal/transport/rest/oas/oas_json_gen.go create mode 100644 internal/transport/rest/oas/oas_middleware_gen.go create mode 100644 internal/transport/rest/oas/oas_operations_gen.go create mode 100644 internal/transport/rest/oas/oas_parameters_gen.go create mode 100644 internal/transport/rest/oas/oas_request_decoders_gen.go create mode 100644 internal/transport/rest/oas/oas_response_encoders_gen.go create mode 100644 internal/transport/rest/oas/oas_router_gen.go create mode 100644 internal/transport/rest/oas/oas_schemas_gen.go create mode 100644 internal/transport/rest/oas/oas_security_gen.go create mode 100644 internal/transport/rest/oas/oas_server_gen.go create mode 100644 internal/transport/rest/oas/oas_unimplemented_gen.go create mode 100644 internal/transport/rest/oas/oas_validators_gen.go create mode 100644 internal/transport/rest/requestid.go create mode 100644 internal/transport/rest/router.go create mode 100644 internal/transport/rest/router_test.go create mode 100644 internal/transport/rest/security.go create mode 100644 scripts/memory_experiment.py create mode 100644 scripts/track1_benchmark.py diff --git a/.github/workflows/app.yml b/.github/workflows/app.yml new file mode 100644 index 00000000..dd8c0d55 --- /dev/null +++ b/.github/workflows/app.yml @@ -0,0 +1,47 @@ +name: Application + +on: [push, pull_request] + +permissions: + contents: read + +env: + GO_VERSION: "1.27.0" + GOLANGCI_LINT_VERSION: v2.13.2 + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: ${{ env.GO_VERSION }} + cache: true + - run: make lint + + unit-test: + name: Unit tests + needs: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: ${{ env.GO_VERSION }} + cache: true + - run: make unit-test + + build: + name: Docker build + needs: unit-test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-buildx-action@v3 + - uses: docker/build-push-action@v6 + with: + context: . + push: false + tags: mtusi-messenger:ci diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 00000000..a2014d8b --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,139 @@ +# yaml-language-server: $schema=https://golangci-lint.run/jsonschema/golangci.v2.13.jsonschema.json + +version: "2" + +run: + timeout: 5m + tests: true + build-tags: + - integration + +linters: + default: standard + enable: + - bodyclose + - contextcheck + - containedctx + - noctx + - rowserrcheck + - sqlclosecheck + - fatcontext + - errorlint + - errname + - nilerr + - nilnil + - asasalint + - durationcheck + - exhaustive + - forcetypeassert + - gocheckcompilerdirectives + - gocritic + - makezero + - musttag + - reassign + - recvcheck + - unparam + - wastedassign + - gosec + - canonicalheader + - copyloopvar + - exptostd + - intrange + - perfsprint + - unconvert + - usestdlibvars + - usetesting + - prealloc + - revive + - misspell + - nolintlint + - gomoddirectives + - sloglint + - depguard + - forbidigo + - testifylint + - thelper + - tparallel + + settings: + govet: + enable-all: true + disable: + - fieldalignment + - shadow + + gosec: + excludes: + - G404 + + exhaustive: + default-signifies-exhaustive: true + + nolintlint: + require-explanation: true + require-specific: true + + sloglint: + attr-only: true + no-global: default + context: scope + + testifylint: + enable-all: true + + depguard: + rules: + main: + deny: + - pkg: math/rand$ + desc: use math/rand/v2 + - pkg: github.com/pkg/errors + desc: use stdlib errors and fmt.Errorf with %w + - pkg: io/ioutil + desc: deprecated + domain: + files: + - "**/internal/domain/**" + deny: + - pkg: database/sql + desc: domain must not depend on infrastructure + - pkg: net/http + desc: domain must not depend on transport + + forbidigo: + forbid: + - pattern: ^fmt\.Print(f|ln)?$ + msg: use slog + - pattern: ^log\.(Print|Fatal|Panic).*$ + msg: use slog + + exclusions: + generated: lax + presets: + - comments + - std-error-handling + - common-false-positives + rules: + - path: _test\.go + linters: + - gosec + - prealloc + - forcetypeassert + - unparam + +formatters: + enable: + - gofumpt + - goimports + settings: + gofumpt: + module-path: mtusi-messenger + goimports: + local-prefixes: + - mtusi-messenger + exclusions: + generated: lax + +issues: + max-issues-per-linter: 0 + max-same-issues: 0 \ No newline at end of file diff --git a/.mockery.yml b/.mockery.yml new file mode 100644 index 00000000..6e8f23fd --- /dev/null +++ b/.mockery.yml @@ -0,0 +1,23 @@ +#https://vektra.github.io/mockery/latest/configuration/ + +all: false +dir: "{{.InterfaceDir}}/mocks" +pkgname: mocks +filename: "{{.InterfaceName}}.go" +structname: "Mock{{.InterfaceName}}" +template: testify +formatter: goimports +force-file-write: true +include-auto-generated: false +log-level: info + +packages: + mtusi-messenger/internal/service/user: + config: + all: true + mtusi-messenger/internal/service/chat: + config: + all: true + mtusi-messenger/internal/service/message: + config: + all: true diff --git a/.ogen.yml b/.ogen.yml new file mode 100644 index 00000000..8995023f --- /dev/null +++ b/.ogen.yml @@ -0,0 +1,10 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/ogen-go/ogen/v1.24.0/schemas/ogen.jsonschema.json + +# https://ogen.dev/docs/config/ +generator: + features: + disable: + - paths/client + - webhooks/client + - webhooks/server + - ogen/otel diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..428d034e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,42 @@ +# syntax=docker/dockerfile:1.7 + +ARG GO_VERSION=1.27.1 +ARG ALPINE_VERSION=3.22 + +FROM golang:${GO_VERSION}-alpine AS build +ARG TARGETOS=linux +ARG TARGETARCH=amd64 +ARG VERSION=dev +ENV GOTOOLCHAIN=local +WORKDIR /opt + +COPY go.mod go.sum ./ +RUN go mod download + +COPY . . +RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \ + go build -trimpath -buildvcs=false -tags timetzdata \ + -ldflags="-s -w -X main.version=${VERSION}" \ + -o /out/messenger ./cmd/messenger + +FROM alpine:${ALPINE_VERSION} AS runtime +RUN apk add --no-cache ca-certificates wget \ + && addgroup -S -g 10001 app \ + && adduser -S -D -H -u 10001 -G app app + +COPY --from=build --chown=10001:10001 /out/messenger /usr/local/bin/messenger + +ENV APP_HOST=0.0.0.0 \ + APP_PORT=8080 \ + APP_READ_HEADER_TIMEOUT=10s \ + APP_SHUTDOWN_TIMEOUT=10s \ + APP_LOG_LEVEL=info \ + APP_LOG_FORMAT=json + +USER 10001:10001 +EXPOSE 8080 +STOPSIGNAL SIGTERM +HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=3 \ + CMD wget -q -O /dev/null "http://127.0.0.1:${APP_PORT}/health/live" || exit 1 + +ENTRYPOINT ["/usr/local/bin/messenger"] diff --git a/cmd/messenger/main.go b/cmd/messenger/main.go new file mode 100644 index 00000000..e56923c3 --- /dev/null +++ b/cmd/messenger/main.go @@ -0,0 +1,103 @@ +package main + +import ( + "context" + "errors" + "fmt" + "log/slog" + "net/http" + "os" + "os/signal" + "syscall" + + "mtusi-messenger/internal/config" + "mtusi-messenger/internal/logger" + "mtusi-messenger/internal/service/chat" + "mtusi-messenger/internal/service/message" + "mtusi-messenger/internal/service/user" + "mtusi-messenger/internal/storage/memory" + "mtusi-messenger/internal/transport/rest" +) + +func main() { + log := logger.New() + + cfg, err := config.Load() + if err != nil { + log.Error("load config", slog.Any("error", err)) + os.Exit(1) + } + + log = logger.New( + logger.WithLevel(cfg.SlogLevel()), + logger.WithFormat(cfg.LoggerFormat()), + ) + slog.SetDefault(log) + + if err := run(cfg, log); err != nil { + log.Error("shutdown with error", slog.Any("error", err)) + os.Exit(1) + } +} + +func run(cfg config.Config, log *slog.Logger) error { + store := memory.NewStore() + userService := user.NewService(store.Users()) + + router, err := rest.NewRouter( + rest.NewHandler( + userService, + chat.NewService(store.Chats()), + message.NewService(store.Messages()), + ), + rest.NewSecurityHandler(userService), + log, + ) + if err != nil { + return fmt.Errorf("build router: %w", err) + } + + server := &http.Server{ + Addr: cfg.Addr(), + Handler: router, + ReadHeaderTimeout: cfg.ReadHeaderTimeout, + } + + ctx, stop := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM) + defer stop() + + errc := make(chan error, 1) + + go func() { + log.Info("server started", slog.String("addr", cfg.Addr())) + + if err := server.ListenAndServe(); err != nil && !errors.Is(err, http.ErrServerClosed) { + errc <- err + } + + close(errc) + }() + + select { + case err, ok := <-errc: + if ok && err != nil { + return fmt.Errorf("listen: %w", err) + } + + return nil + case <-ctx.Done(): + } + + log.Info("shutdown signal received", slog.Duration("timeout", cfg.ShutdownTimeout)) + + shutdownCtx, cancel := context.WithTimeout(context.Background(), cfg.ShutdownTimeout) + defer cancel() + + if err := server.Shutdown(shutdownCtx); err != nil { + return fmt.Errorf("shutdown: %w", err) + } + + log.Info("server stopped") + + return nil +} diff --git a/evidence/check.txt b/evidence/check.txt new file mode 100644 index 00000000..16782521 --- /dev/null +++ b/evidence/check.txt @@ -0,0 +1,3 @@ +$ make check +env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 scripts/check_contract.py +PASS: offline skeleton structure, local refs and Python syntax; application NOT tested. diff --git a/evidence/concurrency.txt b/evidence/concurrency.txt new file mode 100644 index 00000000..58dbcb62 --- /dev/null +++ b/evidence/concurrency.txt @@ -0,0 +1,2 @@ +command: docker run + Python ThreadPoolExecutor(10), 100 POST messages +{"sent": 100, "read": 100, "unique": 100} diff --git a/evidence/docker.txt b/evidence/docker.txt new file mode 100644 index 00000000..22b35293 --- /dev/null +++ b/evidence/docker.txt @@ -0,0 +1,11 @@ +$ docker inspect --format ... +status=running health=healthy user=10001:10001 +$ curl -i http://127.0.0.1:8080/health/live +HTTP/1.1 200 OK +Access-Control-Expose-Headers: X-Request-Id +Content-Type: application/json; charset=utf-8 +X-Request-Id: 3d145e7d-423a-4510-9d6b-6f45b7cf552d +Date: Thu, 24 Sep 2026 20:13:14 GMT +Content-Length: 15 + +{"status":"ok"} \ No newline at end of file diff --git a/evidence/health.txt b/evidence/health.txt new file mode 100644 index 00000000..1a36cf5f --- /dev/null +++ b/evidence/health.txt @@ -0,0 +1 @@ +{"status":"ok"} \ No newline at end of file diff --git a/evidence/memory-experiment.json b/evidence/memory-experiment.json new file mode 100644 index 00000000..1068e429 --- /dev/null +++ b/evidence/memory-experiment.json @@ -0,0 +1,17279 @@ +{ + "image": "mtusi2026lab1-messenger:arm64", + "memory_limit": "64m", + "memory_limit_mib": 64.0, + "successful_messages": 8610, + "failed_requests": 0, + "oom_killed": true, + "last_error": null, + "fatal_error": "IncompleteRead: IncompleteRead(0 bytes read)", + "container_state": { + "Status": "exited", + "Running": false, + "Paused": false, + "Restarting": false, + "OOMKilled": true, + "Dead": false, + "Pid": 0, + "ExitCode": 137, + "Error": "", + "StartedAt": "2026-09-24T20:55:58.307994245Z", + "FinishedAt": "2026-09-24T20:56:04.29060562Z", + "Health": { + "Status": "unhealthy", + "FailingStreak": 0, + "Log": [ + { + "Start": "2026-09-24T23:56:03.357136035+03:00", + "End": "2026-09-24T23:56:03.371812177+03:00", + "ExitCode": 0, + "Output": "" + } + ] + } + }, + "container_logs_tail": "", + "failure_time_seconds": 5.931530750000093, + "memory_samples": [ + { + "time_seconds": 41378.968726375, + "memory": "10.11MiB", + "memory_mib": 10.11 + }, + { + "time_seconds": 41380.971784666, + "memory": "33.5MiB", + "memory_mib": 33.5 + }, + { + "time_seconds": 41382.973903625, + "memory": "52.24MiB", + "memory_mib": 52.24 + } + ], + "message_points_x": [ + 0.5184139170014532, + 0.5204068339953665, + 0.5219206670008134, + 0.5230430000010529, + 0.5242924999984098, + 0.5255186249996768, + 0.526668749997043, + 0.5277829589977046, + 0.5289297089984757, + 0.5299583749947487, + 0.5310334589958075, + 0.5322612499949173, + 0.5332877499968163, + 0.5342921249975916, + 0.535259500000393, + 0.5361602499979199, + 0.5370337089989334, + 0.5380593750014668, + 0.5389899169967975, + 0.5398404169973219, + 0.540663041996595, + 0.5415193750013714, + 0.5423362090004957, + 0.5431351250008447, + 0.5439704999953392, + 0.544804249999288, + 0.5456645419981214, + 0.5464134590001777, + 0.54733141700126, + 0.548126499998034, + 0.5489054999998189, + 0.549695541994879, + 0.5504482920005103, + 0.5512134589953348, + 0.5520517920012935, + 0.5529058749962132, + 0.553739625000162, + 0.5545109169979696, + 0.5552669589960715, + 0.5560028749969206, + 0.5567628339995281, + 0.5575472089985851, + 0.5583592920011142, + 0.5591555840001092, + 0.5599456669951905, + 0.5607333750012913, + 0.5614233749947743, + 0.562186124996515, + 0.5629096670018043, + 0.5636121669958811, + 0.5643381249974482, + 0.5650693749994389, + 0.5657560839972575, + 0.5664414999992005, + 0.5671678340004291, + 0.5678588340015267, + 0.5690906249947147, + 0.5698721669978113, + 0.5706161669950234, + 0.5713675000006333, + 0.5721129169978667, + 0.5728685419962858, + 0.5735694169998169, + 0.5742667090016766, + 0.5749773749994347, + 0.5756967919951421, + 0.5764001669958816, + 0.5770828339955187, + 0.5777844589974848, + 0.5785861249969457, + 0.5792511670006206, + 0.5799325839980156, + 0.5806418749998556, + 0.5813412919960683, + 0.581995583997923, + 0.5827191669959575, + 0.5834124589964631, + 0.5841665839980124, + 0.5849062089982908, + 0.5856551670003682, + 0.5863690839978517, + 0.5871183339986601, + 0.5877875840014894, + 0.5884722089977004, + 0.5892090419947635, + 0.5899365419973037, + 0.5906328339988249, + 0.5912689589968068, + 0.5920083339951816, + 0.592761125000834, + 0.593522249997477, + 0.5942453339957865, + 0.5949209169993992, + 0.5955799169969396, + 0.5963211669950397, + 0.5970629590010503, + 0.5978052499995101, + 0.5984491249982966, + 0.5991153340000892, + 0.5997544999991078, + 0.600359459000174, + 0.6009986669960199, + 0.6016269169995212, + 0.6022871249952004, + 0.6029002919967752, + 0.6035444590015686, + 0.6043039169962867, + 0.6048937919986201, + 0.6055339589947835, + 0.6061541669987491, + 0.6067552499953308, + 0.6073647919984069, + 0.6079727089963853, + 0.6085505839946563, + 0.6092511249953532, + 0.6099042089990689, + 0.6104623339997488, + 0.6110740840013023, + 0.6117397919952055, + 0.6124364999996033, + 0.6132009169959929, + 0.6139017499954207, + 0.6145433339988813, + 0.6151680420007324, + 0.615861499994935, + 0.6164850419954746, + 0.6171578339999542, + 0.6178212919985526, + 0.618482749996474, + 0.6191684169971268, + 0.6197867500013672, + 0.620482667000033, + 0.6211232919959002, + 0.6217566669947701, + 0.6223663749988191, + 0.6230042499955744, + 0.6236522499966668, + 0.6243039589971886, + 0.6249877500013099, + 0.6257640839976375, + 0.6264105000009295, + 0.6270391250000102, + 0.6277013340004487, + 0.6283780419980758, + 0.6290188749990193, + 0.62966216699715, + 0.6303317919955589, + 0.6310257919976721, + 0.6317227499966975, + 0.6324197089998052, + 0.6330538339971099, + 0.6336742919957032, + 0.6343468339982792, + 0.6350101669959258, + 0.6356489999961923, + 0.6363151670011575, + 0.6369789589953143, + 0.6376079589972505, + 0.6382454999984475, + 0.6388775000013993, + 0.639548166996974, + 0.6401784999980009, + 0.6408622499948251, + 0.6414877919960418, + 0.6421079589999863, + 0.6427445000008447, + 0.6433672089988249, + 0.643976624996867, + 0.6446119999964139, + 0.6452468749994296, + 0.6458980419993168, + 0.6465418340012548, + 0.6471705000003567, + 0.6478516249990207, + 0.648482459000661, + 0.6492391249994398, + 0.6498975840004277, + 0.6505527499975869, + 0.6512256669957424, + 0.6519522499947925, + 0.6526021249956102, + 0.6532350839988794, + 0.6538310420000926, + 0.6544814169974416, + 0.6551320840007975, + 0.655773209000472, + 0.6564397089969134, + 0.6570341249971534, + 0.6576618339968263, + 0.6582876249958645, + 0.6589354999960051, + 0.6596007499974803, + 0.6602243339948473, + 0.6608792499973788, + 0.6615296249947278, + 0.6621900419995654, + 0.6628199999977369, + 0.6634553339972626, + 0.6641407499992056, + 0.6647986249954556, + 0.6654613339997013, + 0.6661163339958875, + 0.6667379589998745, + 0.667355208999652, + 0.6679822500009323, + 0.6686080419967766, + 0.6692318339992198, + 0.6699011669988977, + 0.6705691249953816, + 0.6712787090000347, + 0.6720528750010999, + 0.6726831249980023, + 0.673339417000534, + 0.6739381669976865, + 0.6747349590004887, + 0.6753525839958456, + 0.6761363749974407, + 0.6768189590002294, + 0.6775881249996019, + 0.6782003749976866, + 0.6788513749997946, + 0.6794713339986629, + 0.6801543339970522, + 0.6807948339992436, + 0.6814544169974397, + 0.6821445419991505, + 0.6827979590016184, + 0.6834393339959206, + 0.6841052919990034, + 0.6847229170016362, + 0.6853701250001905, + 0.6859554589973413, + 0.6865738749984303, + 0.6871685000005527, + 0.6878155000013066, + 0.6885477499963599, + 0.6892197089982801, + 0.6899046670005191, + 0.6905384999990929, + 0.6912058339948999, + 0.6918827920017065, + 0.6925021249990095, + 0.6931414169957861, + 0.6938070420001168, + 0.6944683339970652, + 0.6950644589960575, + 0.6958125839955756, + 0.696425417001592, + 0.6970299589956994, + 0.6977391670006909, + 0.6984105839947006, + 0.6990365419987938, + 0.6996563339998829, + 0.7003364999982296, + 0.7009742919981363, + 0.7016083339985926, + 0.7022284589984338, + 0.7028550839968375, + 0.7035207919980166, + 0.704159583998262, + 0.7047847919966443, + 0.7054155840014573, + 0.7060796669975389, + 0.7066871249990072, + 0.7073193339965655, + 0.7080209170017042, + 0.7086323749972507, + 0.7092991249955958, + 0.7100246670015622, + 0.7107215419964632, + 0.7113945839955704, + 0.7120392500000889, + 0.7127007499948377, + 0.7133515419991454, + 0.714004624998779, + 0.7146291669996572, + 0.7152715420015738, + 0.7159206669966807, + 0.7165268339958857, + 0.7172255420009606, + 0.7179105839968543, + 0.718550833997142, + 0.7191538339975523, + 0.7197732089989586, + 0.7204269169960753, + 0.7210396250011399, + 0.7216524169998593, + 0.7222911669960013, + 0.7229739999966114, + 0.7236452090000967, + 0.7243870839956799, + 0.7250047499983339, + 0.7256294999970123, + 0.7262228749968926, + 0.7268766249981127, + 0.7275339170009829, + 0.7281923749978887, + 0.7288876669990714, + 0.7295797920014593, + 0.7302502089951304, + 0.7309008750016801, + 0.7315497499948833, + 0.7322054169999319, + 0.732817708994844, + 0.7334464589948766, + 0.7340894590015523, + 0.734732917000656, + 0.7353822500008391, + 0.7360126669955207, + 0.736632959000417, + 0.737248624995118, + 0.7378862089972245, + 0.7385313339982531, + 0.7391983339985018, + 0.7398598750005476, + 0.7405030839945539, + 0.7411182089999784, + 0.7417897089981125, + 0.7425152919968241, + 0.7431825419989764, + 0.7438407090012333, + 0.7444735839962959, + 0.7452394169959007, + 0.7459312499995576, + 0.7466316249992815, + 0.7473506669994094, + 0.7480540420001489, + 0.7487243340001442, + 0.7494109999970533, + 0.750112417001219, + 0.7508354999954463, + 0.7514743339997949, + 0.7521295839978848, + 0.752903291999246, + 0.7535692919991561, + 0.7542105839966098, + 0.7549755000000005, + 0.7556059589987854, + 0.7562496669997927, + 0.7569001250012661, + 0.7575037089991383, + 0.7581601249985397, + 0.75880687499739, + 0.7595177089970093, + 0.7601517090006382, + 0.7608166669961065, + 0.7614688339963323, + 0.7621040000012727, + 0.7627385000014328, + 0.7633910840013414, + 0.7640176669956418, + 0.7646791250008391, + 0.765362958998594, + 0.7659789999961504, + 0.7666380839946214, + 0.7673123749991646, + 0.7679994169957354, + 0.7687116669985699, + 0.7694159589955234, + 0.7700839169992832, + 0.7707527499951539, + 0.7714205000011134, + 0.7721213339973474, + 0.7727749589976156, + 0.7734382089984138, + 0.7740348750012345, + 0.7747124999950756, + 0.7753627089987276, + 0.7759780839987798, + 0.7766068749988335, + 0.7772285419996479, + 0.7778938339979504, + 0.7785501249964, + 0.7792036669998197, + 0.7798726670007454, + 0.780483374997857, + 0.7812164589995518, + 0.7818722919982974, + 0.7825164999958361, + 0.7831692499967176, + 0.7837751670012949, + 0.784428624996508, + 0.7851038340013474, + 0.7857498340017628, + 0.7864819589958643, + 0.7871889589951024, + 0.7879917919999571, + 0.7886484589980682, + 0.789309667001362, + 0.7899667089950526, + 0.7906144169974141, + 0.7912849999993341, + 0.7919452499991166, + 0.7925789169967175, + 0.7932271669997135, + 0.7938613750011427, + 0.7945078749980894, + 0.795150541998737, + 0.7957939999978407, + 0.7964372499991441, + 0.7970954170014011, + 0.7978748749956139, + 0.798495584000193, + 0.7991426669977955, + 0.799797416999354, + 0.8004426670013345, + 0.8010637499974109, + 0.8017242919959244, + 0.802363583999977, + 0.8030040839948924, + 0.8036244169998099, + 0.8042551249964163, + 0.8048780419994728, + 0.8055318749975413, + 0.806319874995097, + 0.807023458997719, + 0.8076849999997648, + 0.8083500419961638, + 0.8090357499968377, + 0.809666291999747, + 0.8102953339985106, + 0.8109624999997322, + 0.8116052920013317, + 0.812248834001366, + 0.8129138340009376, + 0.813640583997767, + 0.8142274169949815, + 0.8148451250017388, + 0.8154416249963106, + 0.8160943749971921, + 0.8167397090001032, + 0.81733545899624, + 0.8179709169999114, + 0.8186304999981076, + 0.8192848749968107, + 0.8199278749962104, + 0.8206395839952165, + 0.8213106249968405, + 0.8219412499965983, + 0.82259662499564, + 0.8232428339979379, + 0.8239938339975197, + 0.8246624999956111, + 0.8254516669985605, + 0.8261809589967015, + 0.8269463749966235, + 0.8276099590002559, + 0.8282552499949816, + 0.8288460839976324, + 0.8294932919961866, + 0.830184708996967, + 0.8308255839947378, + 0.8314710420017946, + 0.8321482499959529, + 0.832775999995647, + 0.8333912089947262, + 0.8340397089996259, + 0.8347864169991226, + 0.8354329590001726, + 0.8360665000000154, + 0.8367241669984651, + 0.8373906249980791, + 0.8380332919987268, + 0.8386750419958844, + 0.8393355000007432, + 0.8399785840010736, + 0.8405962499964517, + 0.841255250001268, + 0.8418895419963519, + 0.8425385419977829, + 0.843199791997904, + 0.8438477499948931, + 0.8445081669997307, + 0.8453110839982401, + 0.8461466250009835, + 0.8469648339960258, + 0.8476910839963239, + 0.8483675839961506, + 0.849066374998074, + 0.8497066669951892, + 0.8503576669972972, + 0.851029749996087, + 0.8516163749955012, + 0.8522922499978449, + 0.8529543339973316, + 0.8536197089997586, + 0.8543839170015417, + 0.855086042000039, + 0.8557201250005164, + 0.8563566250013537, + 0.8569952499965439, + 0.857611542000086, + 0.8582464169958257, + 0.8589438749986584, + 0.8595557500011637, + 0.8601860419948935, + 0.8608362500017392, + 0.8614728339962312, + 0.8621068749998813, + 0.8627197919995524, + 0.8633281669972348, + 0.8639666249946458, + 0.8647587919986108, + 0.8655055419949349, + 0.8662219589969027, + 0.8670333749978454, + 0.8677367089985637, + 0.8684091249961057, + 0.8690514170011738, + 0.869709458995203, + 0.8703985839965753, + 0.8710700839947094, + 0.8717131250014063, + 0.8723584589970415, + 0.8729618340003071, + 0.8735761669959174, + 0.8742086669954006, + 0.8749006250000093, + 0.8755362919982872, + 0.8761877500000992, + 0.8768401669949526, + 0.8775060839980142, + 0.878146041999571, + 0.878774249998969, + 0.8794192919958732, + 0.8800274589957553, + 0.8806592089968035, + 0.8813103339998634, + 0.881968166999286, + 0.882607374995132, + 0.8832825419958681, + 0.8839514589999453, + 0.8846694169988041, + 0.8853855419947649, + 0.8860094999981811, + 0.8866541669995058, + 0.8872888339974452, + 0.8879539999979897, + 0.8885634999969625, + 0.8891755840013502, + 0.8899544999949285, + 0.8905842089952785, + 0.891262666998955, + 0.891945791998296, + 0.8926495839987183, + 0.8934294169957866, + 0.8941153749983641, + 0.8947504589959863, + 0.8953652089985553, + 0.8960499169988907, + 0.8967349999948055, + 0.8973554170006537, + 0.8979747089979355, + 0.8986264999984996, + 0.8994230419993983, + 0.9001743339977111, + 0.9008518749978975, + 0.9014402920001885, + 0.9020516669988865, + 0.9026657499998691, + 0.9035271669999929, + 0.9041936669964343, + 0.9048791249952046, + 0.9055280839966144, + 0.90635308399942, + 0.9069974169979105, + 0.9076066249981523, + 0.9082304589974228, + 0.9088969590011402, + 0.9096225839966792, + 0.9103182499966351, + 0.9110378749974188, + 0.9117287920016679, + 0.9124074999999721, + 0.913077749995864, + 0.9137640420012758, + 0.9144117089963402, + 0.9150587920012185, + 0.9156509999957052, + 0.9162714999984019, + 0.9169459999975516, + 0.9175595839988091, + 0.9181948339974042, + 0.9188264170006732, + 0.9194585419973009, + 0.920213083998533, + 0.9208639589996892, + 0.9215036669993424, + 0.9221212499978719, + 0.9227599169971654, + 0.9234288340012426, + 0.924195374995179, + 0.9248040419988683, + 0.9255241669961833, + 0.9262475840005209, + 0.9269639589983854, + 0.9276114999956917, + 0.9282501669949852, + 0.9288867499999469, + 0.9295096669957275, + 0.9301811670011375, + 0.9308597499984899, + 0.9315007499972126, + 0.9321670419958537, + 0.9328095839955495, + 0.9335401669959538, + 0.9341952920003678, + 0.9348547499976121, + 0.9354881249964819, + 0.936140041994804, + 0.9367534999983036, + 0.9373239999986254, + 0.9379705419996753, + 0.9387245420002728, + 0.9393779169986374, + 0.9400345839967486, + 0.9406466250002268, + 0.941258792001463, + 0.9419276670014369, + 0.9425713749951683, + 0.9432124999948428, + 0.9439115839995793, + 0.9445392499983427, + 0.9452093750005588, + 0.945886541994696, + 0.9466038339960505, + 0.9472448749947944, + 0.947914167001727, + 0.9485807919991203, + 0.9492278339967015, + 0.9498565419999068, + 0.9504921670013573, + 0.9511350839966326, + 0.9517600839972147, + 0.9523709999994026, + 0.95301516699692, + 0.9536602090011002, + 0.9544291669953964, + 0.9550380000000587, + 0.9557272089950857, + 0.9563425839951378, + 0.9570088339969516, + 0.9576826249976875, + 0.9583507499992265, + 0.959175874995708, + 0.9598374589986634, + 0.960445416996663, + 0.9610509589983849, + 0.9616812089952873, + 0.9623031669980264, + 0.9629518340007053, + 0.9635810839972692, + 0.9642740419949405, + 0.9649308750013006, + 0.96557779199793, + 0.9662873339984799, + 0.966925959000946, + 0.9676125420010067, + 0.9682907089954824, + 0.9689473749967874, + 0.9695922499959124, + 0.9702262499995413, + 0.9708932919966173, + 0.9715289169980679, + 0.9721750839962624, + 0.9727999169990653, + 0.9733816250009113, + 0.9739998750010272, + 0.9746099999974831, + 0.9752227499993751, + 0.9758687499997905, + 0.976501459001156, + 0.9771456669986947, + 0.9777957499973127, + 0.978430874994956, + 0.9790849999990314, + 0.9796767500010901, + 0.9803068749970407, + 0.9809831669990672, + 0.9816053339964128, + 0.9822397499956423, + 0.9829100839997409, + 0.9836085839997395, + 0.9842744169945945, + 0.9849862919945735, + 0.9857524170001852, + 0.9864109999980428, + 0.9870339589979267, + 0.9876529589964775, + 0.9883029170014197, + 0.988948291997076, + 0.9895976249972591, + 0.9902442499951576, + 0.9909775419946527, + 0.9916536249947967, + 0.9923237499970128, + 0.9931110420002369, + 0.9937628339976072, + 0.994470833997184, + 0.9952084589967853, + 0.9959592090017395, + 0.9966284999973141, + 0.9972522089956328, + 0.9979131669970229, + 0.9985563340014778, + 0.9992098750008154, + 0.9998549589945469, + 1.0005754999947385, + 1.00126787499903, + 1.001965958996152, + 1.0026574169969535, + 1.003385124997294, + 1.0041443750014878, + 1.0048771250003483, + 1.0055522499969811, + 1.0061402919964166, + 1.0067452090006554, + 1.0073526669948478, + 1.0079100419970928, + 1.0084815839945804, + 1.0090810420006164, + 1.0097314169979654, + 1.0104347499946016, + 1.01099479199911, + 1.0120392499957234, + 1.0125666249950882, + 1.0131089169954066, + 1.013674916997843, + 1.0142782920011086, + 1.0147718340012943, + 1.015302416999475, + 1.015901999999187, + 1.0163944169980823, + 1.016919458998018, + 1.0174603749983362, + 1.0181480839964934, + 1.0186908749965369, + 1.0193297090008855, + 1.0199160420015687, + 1.0204759999978705, + 1.021009708994825, + 1.021566333998635, + 1.0220730000000913, + 1.0226067089970456, + 1.0232385839990457, + 1.023805374999938, + 1.024681791997864, + 1.0254696249976405, + 1.0264432089970796, + 1.027052042001742, + 1.0292267089971574, + 1.0301007919988479, + 1.030809459000011, + 1.0314735419960925, + 1.0321328339996398, + 1.0327611669999897, + 1.0333527920010965, + 1.034026333996735, + 1.0346310839959187, + 1.0351884999981849, + 1.0357489589951, + 1.0365015839997795, + 1.0371517919993494, + 1.037764791995869, + 1.0384526249981718, + 1.039085749995138, + 1.0397126669995487, + 1.0403384999954142, + 1.0410054169988143, + 1.0417437919968506, + 1.042436625000846, + 1.0430662090002443, + 1.0437082499993267, + 1.0443229169977712, + 1.0449623339954996, + 1.045554333999462, + 1.046089999996184, + 1.046664959001646, + 1.0471924589946866, + 1.0477484169969102, + 1.0483179590009968, + 1.048864374999539, + 1.0494218749954598, + 1.0500030839975807, + 1.0505608749954263, + 1.0512694169956376, + 1.0518768339970848, + 1.0524612919980427, + 1.052992249999079, + 1.0535431669995887, + 1.0540903750006692, + 1.0546270420018118, + 1.0551473749947036, + 1.055688624997856, + 1.0562536669967812, + 1.0567766669992125, + 1.0573037089998252, + 1.0578541669965489, + 1.0583732500017504, + 1.0588856249960372, + 1.0593769589977455, + 1.0599361669956124, + 1.0605024589967798, + 1.061050541997247, + 1.061669416994846, + 1.0622421669977484, + 1.062860958998499, + 1.0634130420003203, + 1.0639289589962573, + 1.0645133340003667, + 1.0650230839964934, + 1.0655662919962197, + 1.066138083995611, + 1.0666802919949987, + 1.0675097089988412, + 1.0682048339949688, + 1.0687223749991972, + 1.0692450419956003, + 1.0697723749981378, + 1.0703094999989844, + 1.0708216249986435, + 1.0713662499983911, + 1.071929874997295, + 1.072510375001002, + 1.0730040419948637, + 1.073525250001694, + 1.0740366669997456, + 1.0745768749984563, + 1.0751352090010187, + 1.0757110420017852, + 1.0762119589999202, + 1.0767149589955807, + 1.077301459001319, + 1.077868499996839, + 1.0784016249963315, + 1.0789064169948688, + 1.0794087499962188, + 1.0799710840001353, + 1.0805361249949783, + 1.081285708998621, + 1.08191179199639, + 1.0825124999973923, + 1.0831066669998108, + 1.083684083998378, + 1.0842169999959879, + 1.0847625419992255, + 1.0852947919993312, + 1.0858834169994225, + 1.086421749998408, + 1.0869749589983257, + 1.0875259169988567, + 1.0881064169952879, + 1.0887584589945618, + 1.0892919589969097, + 1.0898059999963152, + 1.0903907920001075, + 1.0909389590015053, + 1.0914699589993688, + 1.0920477920008125, + 1.0926581249950686, + 1.0931880839998485, + 1.0937153339982615, + 1.094273874994542, + 1.0949134999973467, + 1.0955134169998928, + 1.0960293339958298, + 1.096698124994873, + 1.09730383400165, + 1.097892124998907, + 1.0984669999961625, + 1.0989948749993346, + 1.09951970900147, + 1.1001259589975234, + 1.100764666996838, + 1.101309666999441, + 1.1019402089950745, + 1.1025378749982337, + 1.1030917089956347, + 1.1036804589966778, + 1.1041996249987278, + 1.1047873749994324, + 1.1053276249949704, + 1.1058982089962228, + 1.1064176669970038, + 1.106990959000541, + 1.1075256670010276, + 1.1080436670017662, + 1.1085778339984245, + 1.1091003339970484, + 1.1096655419969466, + 1.1102050420013256, + 1.1107321669987869, + 1.111317416995007, + 1.111890874999517, + 1.1124504170002183, + 1.113070458995935, + 1.1136314589966787, + 1.114196249996894, + 1.11480729199684, + 1.1153992089966778, + 1.1159892499999842, + 1.11656524999853, + 1.1171345420007128, + 1.117655999994895, + 1.1182114999974146, + 1.1187260000006063, + 1.1192700419996982, + 1.1199199589973432, + 1.1205497089977143, + 1.1211885000011534, + 1.1217852089976077, + 1.1223544589956873, + 1.1228776669959188, + 1.1233915839984547, + 1.12395375000051, + 1.1245373749989085, + 1.1250873749959283, + 1.1256345000001602, + 1.126189875001728, + 1.1268126249997295, + 1.1273469169973396, + 1.127911874995334, + 1.1284755419983412, + 1.1291950839950005, + 1.1297516249978798, + 1.130276916999719, + 1.1308600839984138, + 1.131461083998147, + 1.1320317499994417, + 1.132629874999111, + 1.1332253750006203, + 1.1337393750000047, + 1.1343286670016823, + 1.1348775419974118, + 1.1354403340010322, + 1.1360011249998934, + 1.1365471669996623, + 1.1371186249962193, + 1.1377009999996517, + 1.138224916998297, + 1.1387960419961018, + 1.13933937499678, + 1.1399445419956464, + 1.140536708997388, + 1.1411257500003558, + 1.1417397089971928, + 1.1439872499977355, + 1.1446458749996964, + 1.1453561249945778, + 1.1459464590006974, + 1.1465122919980786, + 1.1470558340006392, + 1.1476045419985894, + 1.148188458995719, + 1.1487490419967799, + 1.14936258400121, + 1.1499830419998034, + 1.1507948750004289, + 1.1514159590005875, + 1.1520009999949252, + 1.1526694589992985, + 1.1533417089958675, + 1.1539486670008046, + 1.1545580419988255, + 1.1551428339953418, + 1.1557589590011048, + 1.1562982089963043, + 1.1568622089980636, + 1.1573674169994774, + 1.157925791994785, + 1.1585051669972017, + 1.15911262499867, + 1.159770166996168, + 1.1603392920005717, + 1.1609600839947234, + 1.1615598749995115, + 1.1621290420007426, + 1.1626607500002137, + 1.1632087920006597, + 1.1638326249958482, + 1.1643509169953177, + 1.1648976249998668, + 1.1654338750013267, + 1.1659819999986212, + 1.1665207920013927, + 1.1670617089985171, + 1.1676194169995142, + 1.1681647090008482, + 1.1687184170004912, + 1.169463916994573, + 1.1700420419947477, + 1.1706013750008424, + 1.171165125000698, + 1.171705959000974, + 1.1722813749947818, + 1.1728908340010094, + 1.1734494170013932, + 1.1739917500017327, + 1.1745444999978645, + 1.1751195839970023, + 1.1757114169959095, + 1.1762874170017312, + 1.1768331249986659, + 1.1773625419955351, + 1.1778906670006108, + 1.1784412089982652, + 1.1789981670008274, + 1.1795850419948692, + 1.1802739999984624, + 1.180961499994737, + 1.1815203340011067, + 1.182097500000964, + 1.1826672089955537, + 1.183229834001395, + 1.1837891249961103, + 1.184359916995163, + 1.1849379999985103, + 1.1855029169964837, + 1.1860879999949248, + 1.1866134589945432, + 1.1871429169987096, + 1.1876381670008413, + 1.1881753339985153, + 1.1886626669947873, + 1.1892299169994658, + 1.1897754589954275, + 1.1903368339990266, + 1.1909092499990948, + 1.1914107919947128, + 1.1919586669973796, + 1.1924948749947362, + 1.1930197089968715, + 1.1935656249988824, + 1.1942643750007846, + 1.1948198749960284, + 1.1953805839948473, + 1.1959066249983152, + 1.1964327089954168, + 1.1970223339958466, + 1.1977087919949554, + 1.1983517089975066, + 1.199038083999767, + 1.1996357499956503, + 1.2001783749947208, + 1.2007560839992948, + 1.2013118339964421, + 1.2018805839979905, + 1.2024307499959832, + 1.2030039589953958, + 1.2035433749988442, + 1.2042269589946955, + 1.2047806670016143, + 1.2053085840016138, + 1.205881624999165, + 1.2064111250001588, + 1.2069525839979178, + 1.2074880840009428, + 1.2080535419954685, + 1.2086104999980307, + 1.2091438339994056, + 1.209690416995727, + 1.210262791995774, + 1.2107685000009951, + 1.2112948750000214, + 1.2118502090015681, + 1.2123852919976343, + 1.2129334589990322, + 1.2134774590012967, + 1.214062708997517, + 1.2146135000002687, + 1.2151681249961257, + 1.2156863749987679, + 1.2162019589959527, + 1.216731833999802, + 1.2173628749951604, + 1.21797770899866, + 1.218726749997586, + 1.2192582919960842, + 1.2197892089970992, + 1.2203325419977773, + 1.2208810419979272, + 1.2214017090009293, + 1.2219607090009958, + 1.2225066669998341, + 1.223014916999091, + 1.223530541996297, + 1.2240562500010128, + 1.224571416998515, + 1.2251042499992764, + 1.2257145839976147, + 1.2262891249993118, + 1.2268263750011101, + 1.2273387919995002, + 1.2278850419970695, + 1.2284440840012394, + 1.2289902089978568, + 1.2295190000004368, + 1.2300813339970773, + 1.230660875000467, + 1.2312042089979514, + 1.2317340840018005, + 1.2322549589953269, + 1.232788374996744, + 1.2333582499995828, + 1.2338847089995397, + 1.234444749999966, + 1.2349394999982906, + 1.2354755839987774, + 1.2361722089990508, + 1.236838249998982, + 1.237512166997476, + 1.238084999997227, + 1.2386970840016147, + 1.2392868749957415, + 1.239853041995957, + 1.2403489999996964, + 1.2408968749950873, + 1.2413957499957178, + 1.2419174169990583, + 1.2424838340011775, + 1.2430452089975006, + 1.2435925839963602, + 1.244196291998378, + 1.2447140000003856, + 1.2452579999953741, + 1.2458249170013005, + 1.2463522089965409, + 1.2469877499970607, + 1.2475545419947593, + 1.2480898750000051, + 1.2486241669976152, + 1.249147541995626, + 1.2497158749974915, + 1.250263083995378, + 1.2509375000008731, + 1.2517601250001462, + 1.2522921249983483, + 1.2528333340014797, + 1.2533933339946088, + 1.253952583996579, + 1.254462999997486, + 1.255041042000812, + 1.2555824169976404, + 1.2562071249994915, + 1.2567601249975269, + 1.2574656249998952, + 1.258211708998715, + 1.2588265419981326, + 1.2593897499973536, + 1.2599688339978456, + 1.2605404169953545, + 1.2611021249977057, + 1.261623916994722, + 1.262161250000645, + 1.2627002090011956, + 1.2632633749963134, + 1.2638412499945844, + 1.2644394589951844, + 1.2649982500006445, + 1.2655590840004152, + 1.2660696249949979, + 1.2666381249946426, + 1.2672137499976088, + 1.2677488339977572, + 1.2682942920000642, + 1.2688080840016482, + 1.2693546250011423, + 1.269945583997469, + 1.2705009589990368, + 1.271045666995633, + 1.2715517920005368, + 1.2720452499997918, + 1.2725888339991798, + 1.2731730839950615, + 1.273701666999841, + 1.2742105840006843, + 1.2748616249955376, + 1.275460208998993, + 1.2760816250010976, + 1.2766827500017826, + 1.2772770839947043, + 1.2778212919947691, + 1.2783620420013904, + 1.27890437500173, + 1.2794675839977572, + 1.2799927499945625, + 1.2805184169992572, + 1.281110042000364, + 1.2816771249999874, + 1.282263791996229, + 1.2828171250002924, + 1.283364041999448, + 1.283922458998859, + 1.2844860420009354, + 1.2850113339954987, + 1.2855362920017797, + 1.2860728749947157, + 1.28661424999882, + 1.2871689999956288, + 1.2877010839947616, + 1.2882391669991193, + 1.288868999996339, + 1.2895046669946169, + 1.2901279590005288, + 1.2907888339977944, + 1.2914427089999663, + 1.292051917000208, + 1.292658541999117, + 1.293282624996209, + 1.2939027499960503, + 1.2945543749956414, + 1.295273208997969, + 1.2959952919991338, + 1.2966428340005223, + 1.2972460419987328, + 1.2978759999969043, + 1.2984653339954093, + 1.2990772499979357, + 1.2996862500003772, + 1.3003092919971095, + 1.30096920899814, + 1.3015712089982117, + 1.3022590839973418, + 1.3029081669956213, + 1.3035324589945958, + 1.3042123339982936, + 1.3048429589980515, + 1.3054583339981036, + 1.3061065419969964, + 1.3066964999961783, + 1.3073108339958708, + 1.3079190839998773, + 1.3085466670017922, + 1.3091453339948202, + 1.3097836669985554, + 1.31041974999971, + 1.3111912089952966, + 1.3118039999972098, + 1.3124182920000749, + 1.312981374998344, + 1.3136109999977634, + 1.3142689169981168, + 1.3148822919974918, + 1.3155675000016345, + 1.316334333998384, + 1.316997124995396, + 1.3177425419999054, + 1.3184458339965204, + 1.319090334000066, + 1.3197287090006284, + 1.3204170419994625, + 1.3210571249946952, + 1.3216874589998042, + 1.3223166669995408, + 1.3229537919978611, + 1.3235865839960752, + 1.3242300839992822, + 1.3248337920013, + 1.3254365419998066, + 1.326085583998065, + 1.3268137919949368, + 1.3273964589971001, + 1.328028791998804, + 1.3286529589968268, + 1.329278583994892, + 1.3299015419979696, + 1.330610708995664, + 1.331286499997077, + 1.3320259169995552, + 1.3326614589968813, + 1.3333040419965982, + 1.3340343339950778, + 1.3347014999962994, + 1.3353991670010146, + 1.3361687090000487, + 1.3368448749970412, + 1.3374528749991441, + 1.3381050839961972, + 1.3387304589996347, + 1.3393878339993535, + 1.3400031669953023, + 1.3406193749979138, + 1.3412325419994886, + 1.341954083996825, + 1.3425796250012354, + 1.3431827919994248, + 1.343796333996579, + 1.3444541669960017, + 1.3450788339978317, + 1.3456730420002714, + 1.3462752919949708, + 1.3469537499986473, + 1.3476839590002783, + 1.3483969169974444, + 1.3490780419961084, + 1.3498173339976347, + 1.3505214999968302, + 1.3511727090008208, + 1.352095083995664, + 1.3527846669967403, + 1.3534679590011365, + 1.3541255839954829, + 1.3548870000013267, + 1.3554712920013117, + 1.3561424169965903, + 1.3567780419980409, + 1.3574068339949008, + 1.3580665420013247, + 1.358687749998353, + 1.3593352919997415, + 1.3599750840003253, + 1.3606123749996186, + 1.361250249996374, + 1.3618863340016105, + 1.3624794999996084, + 1.3631446250001318, + 1.363798874997883, + 1.3644549169985112, + 1.365073916997062, + 1.3657244169953628, + 1.3663469169987366, + 1.3669885419949424, + 1.3676328340006876, + 1.3682174589994247, + 1.3688217499948223, + 1.369476333995408, + 1.3700511249990086, + 1.3706658750015777, + 1.3712894169948413, + 1.3719071250015986, + 1.372679916996276, + 1.3733152499989956, + 1.373964624996006, + 1.3746581669984153, + 1.3754292500016163, + 1.3760935839964077, + 1.3767667499996605, + 1.3774053339948296, + 1.378130124998279, + 1.3788422500001616, + 1.3794454999951995, + 1.3800793749978766, + 1.3807607499984442, + 1.381429583998397, + 1.38207170899841, + 1.3826693750015693, + 1.3832749590001185, + 1.3838771669979906, + 1.384402042000147, + 1.3849677089965553, + 1.3855049589983537, + 1.38616304199968, + 1.386702374999004, + 1.3872478749981383, + 1.387820666997868, + 1.388354458998947, + 1.3889157919984427, + 1.3894269169977633, + 1.3899692089980817, + 1.3904647499948624, + 1.3909984589990927, + 1.3915656669996679, + 1.3922748749973834, + 1.392858333994809, + 1.3934668340007192, + 1.3940584169977228, + 1.3946189999987837, + 1.3951474589994177, + 1.3957025419949787, + 1.3961985419955454, + 1.3967372499973862, + 1.3972735839997767, + 1.397849208995467, + 1.398436416995537, + 1.3990186250011902, + 1.3995663339956081, + 1.4000689999957103, + 1.4005768339993665, + 1.4011260839979514, + 1.4017101249992265, + 1.4022688339973683, + 1.4028213749988936, + 1.40335999999661, + 1.4038968339955318, + 1.4044361669948557, + 1.4049958339965087, + 1.405526791997545, + 1.406044709001435, + 1.406573959000525, + 1.407132416999957, + 1.407591750001302, + 1.4081838749989402, + 1.4088826669976697, + 1.4094666249948204, + 1.4099940419982886, + 1.410538167001505, + 1.4110924589986098, + 1.4116490000014892, + 1.4123321250008303, + 1.4136496249993797, + 1.4144407919957303, + 1.4150045839996892, + 1.415583041998616, + 1.4161643339975853, + 1.4167001669993624, + 1.4172748749988386, + 1.417976999997336, + 1.4185413339946535, + 1.4191200839995872, + 1.4196129170013592, + 1.4201409589950345, + 1.420702709001489, + 1.4212284169989289, + 1.4217647499972372, + 1.422286916997109, + 1.4229365419960232, + 1.4235004169968306, + 1.424080500000855, + 1.4247054169973126, + 1.4252419589975034, + 1.4257924999983516, + 1.4263814169971738, + 1.4269428339976002, + 1.427514874994813, + 1.42807133399765, + 1.4286194169981172, + 1.4291549589979695, + 1.4296813339969958, + 1.4302062499991735, + 1.4309234169995761, + 1.4315840839990415, + 1.432223083997087, + 1.4329272089962615, + 1.433550916997774, + 1.4341135840004426, + 1.4347067919952678, + 1.4352171669961535, + 1.4357566670005326, + 1.4363316669987398, + 1.4369185420000576, + 1.437523084001441, + 1.4380882499972358, + 1.4386299170000711, + 1.4391875419969438, + 1.4398365419983747, + 1.4403710839978885, + 1.4409528339965618, + 1.4415049589952105, + 1.441968209001061, + 1.4424924999984796, + 1.44306904199766, + 1.4436022919981042, + 1.4441512919947854, + 1.4446509589979541, + 1.445224083996436, + 1.44573649999802, + 1.4462700840012985, + 1.4468518339999719, + 1.4474241249990882, + 1.4479812089994084, + 1.4485511669990956, + 1.4491365419962676, + 1.4496899169971584, + 1.4503064589953283, + 1.450908624996373, + 1.4515173339968896, + 1.4521191669991822, + 1.452692708997347, + 1.453289874996699, + 1.4538309589988785, + 1.4544241670009797, + 1.4550381669978378, + 1.455581958995026, + 1.4561701249986072, + 1.4567216249997728, + 1.4572209589969134, + 1.4580174169968814, + 1.4586678339983337, + 1.4592330000014044, + 1.4597894170001382, + 1.460292458999902, + 1.4608042920008302, + 1.4613101249997271, + 1.4618813339984627, + 1.4623908749999828, + 1.4629336250000051, + 1.4634487090006587, + 1.463983791996725, + 1.4645037919981405, + 1.4650150000015856, + 1.4655564589993446, + 1.4661307919959654, + 1.4666817499964964, + 1.4672365419974085, + 1.4677664999981062, + 1.468296792001638, + 1.4688962919972255, + 1.4694374169994262, + 1.4700377920016763, + 1.4706266669963952, + 1.4712653339956887, + 1.4718628749978961, + 1.47245433399803, + 1.4729963749996386, + 1.4735315840007388, + 1.4740762090004864, + 1.4746179590001702, + 1.475139374997525, + 1.4756670419956208, + 1.4762113339966163, + 1.4767735419954988, + 1.4773392499992042, + 1.4778850000002421, + 1.478550166997593, + 1.4792337920007412, + 1.4798789999986184, + 1.4804977089952445, + 1.4811552920000395, + 1.4818036669967114, + 1.48243562499556, + 1.4830682920000982, + 1.4836341670015827, + 1.4842722920002416, + 1.4849206669969135, + 1.485530124999059, + 1.486187249996874, + 1.4868179999975837, + 1.4874400839980808, + 1.4880873750007595, + 1.4886964170000283, + 1.489344624998921, + 1.490006583997456, + 1.4907569999995758, + 1.491376041994954, + 1.491992625000421, + 1.4926253340017865, + 1.4932702090009116, + 1.4939670419989852, + 1.4946176669982378, + 1.4952702500013402, + 1.4958862919957028, + 1.4965148749979562, + 1.4971455839986447, + 1.497758833997068, + 1.4984235419979086, + 1.4990987919954932, + 1.4997608749981737, + 1.5003867089981213, + 1.5010199999960605, + 1.5017268340016017, + 1.5023719589953544, + 1.5029653749952558, + 1.5036237919994164, + 1.5042584589973558, + 1.5049054999981308, + 1.5055233749953914, + 1.5061589589968207, + 1.5069078339947737, + 1.5075689169971156, + 1.508227458994952, + 1.508996833996207, + 1.5096572920010658, + 1.5103570419960306, + 1.5110185839948826, + 1.5116251669969643, + 1.5122630839978228, + 1.5129090420014109, + 1.513551791998907, + 1.514241459000914, + 1.5148874590013293, + 1.515533375000814, + 1.5161280839965912, + 1.5167648749993532, + 1.517357833996357, + 1.5179984999995213, + 1.518634749998455, + 1.519407333995332, + 1.520032499996887, + 1.5206613749978715, + 1.5212584589971812, + 1.5218913339995197, + 1.5225181249988964, + 1.5231273749959655, + 1.5237440839991905, + 1.5243762499958393, + 1.5249969590004184, + 1.5256462920006015, + 1.526277917000698, + 1.5269249589982792, + 1.5275383339976543, + 1.5281886250013486, + 1.5289419170003384, + 1.5296259999959148, + 1.5303376669980935, + 1.5309977919969242, + 1.5316295839947998, + 1.5322360840000329, + 1.5328986249951413, + 1.5335609999965527, + 1.534160333998443, + 1.534772792001604, + 1.5354358749973471, + 1.5360400839999784, + 1.5366694999975152, + 1.5373150000013993, + 1.5379704590013716, + 1.5385813339962624, + 1.5392007499976899, + 1.5399261249986012, + 1.5405664589998196, + 1.5412045420016511, + 1.5418714589977753, + 1.5425397919971147, + 1.5431624999982887, + 1.5437725000010687, + 1.5444048749996, + 1.5450314999980037, + 1.5456554999982473, + 1.5462667920000968, + 1.5469007919964497, + 1.5476044169990928, + 1.5482715420002933, + 1.5489810419967398, + 1.5497316249966389, + 1.5503614170011133, + 1.550990042000194, + 1.5516207089967793, + 1.552245958999265, + 1.5529106670001056, + 1.5535424999980023, + 1.5541901249962393, + 1.5548218749972875, + 1.555560125001648, + 1.5562088340011542, + 1.5568271669981186, + 1.557510792001267, + 1.5581467500014696, + 1.5587555839956622, + 1.5593844999966677, + 1.5600651669956278, + 1.5606865000008838, + 1.5612854589999188, + 1.5619313749994035, + 1.562565000000177, + 1.5631894170001033, + 1.5638282500003697, + 1.5644296249956824, + 1.5650728339969646, + 1.565700333994755, + 1.5663188749967958, + 1.5670308339977055, + 1.5677264999976614, + 1.5683723339971039, + 1.5690344999966328, + 1.569673291996878, + 1.5702907500017318, + 1.5709480840014294, + 1.5716179169976385, + 1.5722472089983057, + 1.5729307090005022, + 1.5735405419982271, + 1.5742111250001471, + 1.5751691249970463, + 1.5758283749964903, + 1.57651249999617, + 1.5771892499979003, + 1.5778638339979807, + 1.578496208996512, + 1.5791265840016422, + 1.5797319170014816, + 1.5803650839952752, + 1.581007041997509, + 1.5816650839988142, + 1.582286374999967, + 1.5829112499995972, + 1.5835321249978733, + 1.5841806669996004, + 1.5849832089952542, + 1.5856165000004694, + 1.5863114999956451, + 1.5869520419946639, + 1.5875692920017173, + 1.588313084001129, + 1.5890724999990198, + 1.5897353749969625, + 1.5904859169968404, + 1.5912000419994001, + 1.5918447090007248, + 1.592480125000293, + 1.593090124995797, + 1.593729333995725, + 1.5943348340006196, + 1.5950199169965344, + 1.5956645839978592, + 1.596281583995733, + 1.5969766669950332, + 1.5976107919996139, + 1.5982325000004494, + 1.598857749995659, + 1.5995154170013848, + 1.600152667000657, + 1.600785916998575, + 1.6014334999999846, + 1.60206725000171, + 1.6027029589968151, + 1.6034129170002416, + 1.6040367919995333, + 1.604654083996138, + 1.6052982499968493, + 1.605910458994913, + 1.6065525000012713, + 1.6071908340018126, + 1.6078023340014624, + 1.6084409589966526, + 1.6090889170009177, + 1.6097667499998352, + 1.6104555839992827, + 1.6111679999958142, + 1.6118268339996575, + 1.6124749590017018, + 1.6131329589989036, + 1.613785875000758, + 1.614454416994704, + 1.6152504999990924, + 1.6159151249958086, + 1.6165919999984908, + 1.6172299169993494, + 1.6179111669989652, + 1.6185699589987053, + 1.6191961669974262, + 1.6198548749962356, + 1.6205087089983863, + 1.621192083999631, + 1.621801624998625, + 1.6224010000005364, + 1.6230613750012708, + 1.6236969589954242, + 1.6243226669976139, + 1.624979499996698, + 1.62563691700052, + 1.6263237089951872, + 1.6269888749957317, + 1.6276494170015212, + 1.6283483750012238, + 1.6289936249959283, + 1.6296795000016573, + 1.6303297089980333, + 1.6309868749958696, + 1.6316130839986727, + 1.6322312919946853, + 1.632926583995868, + 1.633619333995739, + 1.6342510419999599, + 1.634894541995891, + 1.63553208400117, + 1.636174209001183, + 1.6368004999967525, + 1.637413500000548, + 1.6380069169972558, + 1.638679208997928, + 1.6392991249958868, + 1.6399425839990727, + 1.640580458995828, + 1.6412566250000964, + 1.6418880839992198, + 1.6425312089995714, + 1.6432087919965852, + 1.643834958995285, + 1.6444832919951295, + 1.6452472919991123, + 1.6458418339971104, + 1.646473374996276, + 1.6471246669971151, + 1.6478015839966247, + 1.6484606669982895, + 1.64925137499813, + 1.6499578750008368, + 1.6505722500005504, + 1.6511867090011947, + 1.6518306669968297, + 1.65247833399917, + 1.6530996250003227, + 1.65372433399898, + 1.6543572500013397, + 1.6549952089990256, + 1.6556665419993806, + 1.6563658749946626, + 1.6570087500003865, + 1.6576704170001904, + 1.6582964999979595, + 1.6589588339993497, + 1.6596261669983505, + 1.6602825419977307, + 1.660918417001085, + 1.661540666995279, + 1.6621902089973446, + 1.6629301669963752, + 1.6636615419993177, + 1.6643233340000734, + 1.664957916997082, + 1.6655765839968808, + 1.6661944590014173, + 1.6668715839987271, + 1.6675576669949805, + 1.6682629999995697, + 1.6689447919998202, + 1.6696356249958626, + 1.6702604999954929, + 1.6709267499973066, + 1.6715401249966817, + 1.672224499998265, + 1.6729037089971825, + 1.6735405840008752, + 1.6742134169981, + 1.6748559589977958, + 1.675454958996852, + 1.67608316699625, + 1.6767048339970643, + 1.6773298339976463, + 1.6779608340002596, + 1.6785796670010313, + 1.6791727499949047, + 1.6798542499964242, + 1.680560417000379, + 1.6811930420008139, + 1.6818483749957522, + 1.682451583998045, + 1.6830419589969097, + 1.6835939999946277, + 1.6842428749951068, + 1.684873250000237, + 1.685515042001498, + 1.6861189589981223, + 1.6868562499948894, + 1.6875933749979595, + 1.6883165839972207, + 1.6889672499964945, + 1.6896122089965502, + 1.6902113749965793, + 1.6908601249961066, + 1.6915023339970503, + 1.692137999998522, + 1.6928047920009703, + 1.6934226669982309, + 1.694010667000839, + 1.6946137089980766, + 1.6952499589970103, + 1.6958955419977428, + 1.6965394169965293, + 1.6972162919992115, + 1.6978512499990757, + 1.6985184590012068, + 1.6991562499970314, + 1.6997785839994322, + 1.7003837500014924, + 1.7010051249962999, + 1.7016757499950472, + 1.7022978749955655, + 1.7029546669946285, + 1.7036315419973107, + 1.704288084001746, + 1.7049497089974466, + 1.705566208998789, + 1.706216583996138, + 1.7068482089962345, + 1.7075399169989396, + 1.7082680839957902, + 1.7089494589963579, + 1.7096124589952524, + 1.7102394999965327, + 1.7110218749949127, + 1.7116449589957483, + 1.7122797499978333, + 1.7129070419978234, + 1.713622208997549, + 1.7142510839985334, + 1.7149217089972808, + 1.7155402089993004, + 1.716168041995843, + 1.7168052499982878, + 1.7174305000007735, + 1.7180724169957102, + 1.7188415839991649, + 1.7195056669952464, + 1.720166999999492, + 1.720821041999443, + 1.7214531669960706, + 1.722070416995848, + 1.7226659169973573, + 1.7233117499999935, + 1.723937709000893, + 1.72459162499581, + 1.7253572920017177, + 1.7261682089956594, + 1.7268398749947664, + 1.7275527089950629, + 1.7282505839975784, + 1.72891558399715, + 1.7295460419991286, + 1.7301421250012936, + 1.7307670839945786, + 1.7314268339978298, + 1.732052916995599, + 1.7326703340004315, + 1.733309791998181, + 1.7339829999982612, + 1.7345662500010803, + 1.735192084001028, + 1.7358399590011686, + 1.7364688749948982, + 1.7371367500018096, + 1.7377769589948002, + 1.7384155839972664, + 1.7390496250009164, + 1.7397578339950996, + 1.7404340419961954, + 1.7410581250005635, + 1.7417002090005553, + 1.7422979999973904, + 1.7429970000011963, + 1.7436507919992437, + 1.7442617089982377, + 1.7450012499975855, + 1.7456698749956558, + 1.7462487500015413, + 1.746932083995489, + 1.7475612919952255, + 1.748214499995811, + 1.748924084000464, + 1.7495565419958439, + 1.7501748750000843, + 1.7507732919984846, + 1.7513673749999725, + 1.7520100839974475, + 1.7527947089984082, + 1.7534503339993535, + 1.7540851669982658, + 1.7547313749964815, + 1.755334417000995, + 1.7559890839984291, + 1.7567474999959813, + 1.757394583997666, + 1.758008124998014, + 1.7586565419987892, + 1.759316541996668, + 1.7600302919963724, + 1.7606821669978672, + 1.761327791995427, + 1.7619243750013993, + 1.7625729999999749, + 1.7632357089969446, + 1.763817166996887, + 1.764621124995756, + 1.7653024999963236, + 1.7660375839986955, + 1.7667097919984371, + 1.767314874996373, + 1.767958999997063, + 1.7685916670016013, + 1.7693399999989197, + 1.769950958994741, + 1.7705614590013283, + 1.7711794999995618, + 1.7718285839946475, + 1.7724723339997581, + 1.77314808400115, + 1.773834416999307, + 1.7745019590001903, + 1.7751577919989359, + 1.7757846669992432, + 1.776398292000522, + 1.777001416994608, + 1.777619833999779, + 1.778229958996235, + 1.7788464999975986, + 1.7795333749963902, + 1.7801951669971459, + 1.7808357089961646, + 1.7814741670008516, + 1.782084833997942, + 1.7826824169969768, + 1.7832797090013628, + 1.7839740419949521, + 1.7846388749967446, + 1.7853442919949885, + 1.7860407089974615, + 1.7866710419984884, + 1.7872852919972502, + 1.7879169590014499, + 1.7885577919951174, + 1.7891942089991062, + 1.7897803339947131, + 1.7903538339960505, + 1.791020374999789, + 1.7916487920010695, + 1.792317291998188, + 1.7929872919994523, + 1.7936172499976237, + 1.794249916994886, + 1.7948514169984264, + 1.7954929170009564, + 1.7961029169964604, + 1.796714833995793, + 1.7973910840009921, + 1.7979805840004701, + 1.7985746249978547, + 1.79917379199469, + 1.7997988339993753, + 1.8004158339972491, + 1.8010309999954188, + 1.8016410419950262, + 1.8022555419956916, + 1.80286150000029, + 1.803517959000601, + 1.8041715419967659, + 1.8049115839967271, + 1.805572334000317, + 1.806217208999442, + 1.8068080000011832, + 1.8074158339950372, + 1.8080439589975867, + 1.8086898339970503, + 1.8093114590010373, + 1.8099464589977288, + 1.8105217089978396, + 1.811170791996119, + 1.8117486249975627, + 1.812382999996771, + 1.813003833995026, + 1.8136042499972973, + 1.8142093749993364, + 1.814818541999557, + 1.815405583998654, + 1.8160379999972065, + 1.8166410839985474, + 1.8172732499951962, + 1.8178796669963049, + 1.8185024999984307, + 1.8190970419964287, + 1.8197242919995915, + 1.8203339999963646, + 1.82099316699896, + 1.8215848749969155, + 1.82235049999872, + 1.8230836250004359, + 1.8237330420015496, + 1.8244178339955397, + 1.8250224590010475, + 1.825705499999458, + 1.8263762919959845, + 1.8270402919952176, + 1.8276505839967285, + 1.8282931249996182, + 1.8289365419987007, + 1.8295690419981838, + 1.830227541999193, + 1.8308611669999664, + 1.831544833999942, + 1.832175333998748, + 1.8327829589979956, + 1.8333796250008163, + 1.8340094169980148, + 1.8346163339956547, + 1.835294459000579, + 1.8359068749996368, + 1.8365175840008305, + 1.8371220839981106, + 1.8377323339955183, + 1.8383314589955262, + 1.8389366670016898, + 1.8395683749986347, + 1.8401958749964251, + 1.840871166998113, + 1.8414869170010206, + 1.8420716249966063, + 1.8428492499951972, + 1.843561541994859, + 1.8442801669953042, + 1.84493233399553, + 1.8455616669962183, + 1.846171459001198, + 1.8468012500015902, + 1.8474052919991664, + 1.848150291996717, + 1.8487552919978043, + 1.849433458999556, + 1.8500257499981672, + 1.8506568750017323, + 1.85124937499495, + 1.8518174169948907, + 1.8524277499964228, + 1.8530664999998407, + 1.8536962500002119, + 1.8543125840005814, + 1.854988916995353, + 1.8556246669977554, + 1.8562284169966006, + 1.856850874995871, + 1.857476791999943, + 1.858112458998221, + 1.8587266249960521, + 1.8593478749971837, + 1.8600172919977922, + 1.8605852499968023, + 1.8611777089972747, + 1.8618673749951995, + 1.8625584589972277, + 1.8632084589989972, + 1.863905166996119, + 1.8645202499974403, + 1.8651836249991902, + 1.8658127089947811, + 1.8664314589987043, + 1.8671035840015975, + 1.8677640839960077, + 1.868420166996657, + 1.8690359589963919, + 1.8696510000008857, + 1.8703827089993865, + 1.871035167001537, + 1.8716392499991343, + 1.8722252500010654, + 1.8728453750009066, + 1.873440124996705, + 1.8740464590009651, + 1.874698499996157, + 1.875336791999871, + 1.8760366249989602, + 1.8766574589972151, + 1.8772564589962712, + 1.8779169589979574, + 1.878550458997779, + 1.879191374995571, + 1.8798369590003858, + 1.8804563749945373, + 1.8812369590013986, + 1.8819140839987085, + 1.8825759999963338, + 1.8831919169970206, + 1.883840666996548, + 1.8844881249970058, + 1.8851414589953492, + 1.8858052499999758, + 1.8864776670016, + 1.8870725839951774, + 1.8876717919993098, + 1.8883539169983123, + 1.8889737089994014, + 1.8895941250011674, + 1.8902161250007339, + 1.890851208998356, + 1.8914716669969494, + 1.8920582919963636, + 1.8926806249946821, + 1.893313249995117, + 1.8939072919965838, + 1.894505083997501, + 1.8951264589995844, + 1.89574724999693, + 1.8964810839970596, + 1.8970944589964347, + 1.8977076250012033, + 1.8982501669961493, + 1.8989468750005472, + 1.8995346250012517, + 1.9002181249961723, + 1.900826541997958, + 1.9015068340013386, + 1.9023311249984545, + 1.9031094589954591, + 1.903777416999219, + 1.9044828339974629, + 1.905194416998711, + 1.9058069169986993, + 1.9064652499946533, + 1.9070947500003967, + 1.9076864999951795, + 1.9082953749966691, + 1.9089764169984846, + 1.909610041999258, + 1.910260083997855, + 1.910933416998887, + 1.9116074589983327, + 1.9122369589968002, + 1.9129247499949997, + 1.913721833996533, + 1.9144234170016716, + 1.915077833997202, + 1.915669166999578, + 1.9162553339992883, + 1.9168577089949395, + 1.9173674999983632, + 1.9179421669978183, + 1.918551666996791, + 1.919086541995057, + 1.919605874994886, + 1.9202367089965264, + 1.9209106669950415, + 1.921459249999316, + 1.9220155000002705, + 1.9225694999986445, + 1.9232027089965413, + 1.923776874995383, + 1.9243974999990314, + 1.9249607919991831, + 1.9255580839962931, + 1.9261448339966591, + 1.926708166996832, + 1.9272678749985062, + 1.9278271669973037, + 1.9283839169947896, + 1.9289506249988335, + 1.929482667001139, + 1.9300097500017728, + 1.9305909589966177, + 1.9311452920010197, + 1.9317005839984631, + 1.9322635839998838, + 1.932813791994704, + 1.9334004999982426, + 1.9339611249961308, + 1.934489624996786, + 1.9350347090003197, + 1.9356454590015346, + 1.936203666999063, + 1.93686904200149, + 1.9374227919979603, + 1.9379681669961428, + 1.938504792000458, + 1.939044874998217, + 1.9395697500003735, + 1.9400838340006885, + 1.940613624996331, + 1.9411819589950028, + 1.9417456250012037, + 1.9423319999987143, + 1.9429950420017121, + 1.9436475839975174, + 1.9442004169977736, + 1.944765208994795, + 1.945326875000319, + 1.9459266669946373, + 1.9464639169964357, + 1.9470173340014298, + 1.9475764999951934, + 1.94813137500023, + 1.9487183749952237, + 1.9492961669966462, + 1.9498457919980865, + 1.950407541997265, + 1.950998708998668, + 1.9516152500000317, + 1.952281416997721, + 1.95295674999943, + 1.9536393339949427, + 1.9542450000008103, + 1.9548603340008412, + 1.955497958995693, + 1.9561323339949013, + 1.956741249996412, + 1.9574487089994363, + 1.9581409169986728, + 1.958747124997899, + 1.9593903749992023, + 1.9600151249978808, + 1.960636167001212, + 1.9613014169954113, + 1.9620383750007022, + 1.9627291249998962, + 1.9634468750009546, + 1.9640757919987664, + 1.9647646250014077, + 1.965372375001607, + 1.9660365839954466, + 1.9666655839973828, + 1.967315834001056, + 1.9679787499990198, + 1.9686404999956721, + 1.9692725839995546, + 1.9699262919966714, + 1.9705489170009969, + 1.9712230840013945, + 1.971842333994573, + 1.9724850419952418, + 1.973160875000758, + 1.9737916250014678, + 1.9744091669999762, + 1.9750515839987202, + 1.9756633340002736, + 1.976278292000643, + 1.976925625000149, + 1.977575999997498, + 1.9781925419956679, + 1.978781291996711, + 1.9793703749965061, + 1.9800065839954186, + 1.9806049170001643, + 1.9813431669972488, + 1.9820435000001453, + 1.982761125000252, + 1.9835258339953725, + 1.984196500001417, + 1.984819500001322, + 1.985501833994931, + 1.9861968339973828, + 1.9868640419954318, + 1.9876318339956924, + 1.9883305420007673, + 1.9890279169994756, + 1.9897307919964078, + 1.9903988750011194, + 1.9910915840009693, + 1.9918024169965065, + 1.9924927089959965, + 1.9931942089970107, + 1.9938921249995474, + 1.994519959000172, + 1.9950598340001306, + 1.9956069999971078, + 1.9963096669962397, + 1.9968762499993318, + 1.9974873749961262, + 1.9980406670001685, + 1.9986212919975515, + 1.9991899999949965, + 1.999735666999186, + 2.0003397920008865, + 2.0009733339975355, + 2.0015636249954696, + 2.0021650419948855, + 2.0028221249958733, + 2.003454541998508, + 2.00410383399867, + 2.0046651250013383, + 2.005193208999117, + 2.0058184169974993, + 2.006396416996722, + 2.0069337919994723, + 2.007513584001572, + 2.008081542000582, + 2.0085585419947165, + 2.0090853750007227, + 2.0096080000002985, + 2.01014129199757, + 2.0106543340007192, + 2.0112516669978504, + 2.01179904199671, + 2.013785541996185, + 2.0143562500015832, + 2.0148572089965455, + 2.0153884169994853, + 2.015895124997769, + 2.0163846249997732, + 2.016907999997784, + 2.0174160839960678, + 2.0179705420014216, + 2.018484374995751, + 2.0191675839960226, + 2.0200431249977555, + 2.0207736250013113, + 2.021395374998974, + 2.022030000000086, + 2.022591291999561, + 2.0231362499980605, + 2.0236199169958127, + 2.024146916999598, + 2.024816583994834, + 2.025440459001402, + 2.0260013340011938, + 2.0265279589948477, + 2.0272515839969856, + 2.0278208749950863, + 2.0283937499989406, + 2.028926083999977, + 2.0295043750011246, + 2.030135708999296, + 2.030729624995729, + 2.0313045000002603, + 2.0318943339952966, + 2.032488042001205, + 2.033016041998053, + 2.033555875001184, + 2.0341558340005577, + 2.03469524999673, + 2.0352377089948277, + 2.0358087919958052, + 2.0363926669961074, + 2.0370092500015744, + 2.037530292000156, + 2.0380306669976562, + 2.0385915000006207, + 2.039142458997958, + 2.039778458994988, + 2.040440500000841, + 2.0410783749975963, + 2.04178470899933, + 2.042392709001433, + 2.0429833339949255, + 2.0435610419954173, + 2.0441462919989135, + 2.044698999998218, + 2.045296791999135, + 2.0458168749973993, + 2.0463481249971665, + 2.0468557919957675, + 2.04737870900135, + 2.0479297089987085, + 2.048506916995393, + 2.0490304170016316, + 2.0495709169990732, + 2.0500880839972524, + 2.050686875001702, + 2.0512426249988494, + 2.051769166995655, + 2.052300292001746, + 2.052869084000122, + 2.0534252500001458, + 2.0540105420004693, + 2.0545604169965372, + 2.0551122920005582, + 2.055687333995593, + 2.056235124997329, + 2.0567707090012846, + 2.057311208998726, + 2.0578221670002677, + 2.0583356249990175, + 2.0588818339965655, + 2.059503666998353, + 2.060066708996601, + 2.0606757499990636, + 2.0612223749994882, + 2.0617930840016925, + 2.0623267919945647, + 2.0629228339967085, + 2.0635012919956353, + 2.064029749999463, + 2.0645887089995085, + 2.065159792000486, + 2.065732916998968, + 2.0662699169988628, + 2.0668197919949307, + 2.067357041996729, + 2.0679012089967728, + 2.0684259589979774, + 2.0689786250004545, + 2.0695248339980026, + 2.070103250000102, + 2.0706971249965136, + 2.0712577090016566, + 2.07180245899508, + 2.0723764169961214, + 2.0729004589957185, + 2.073450708994642, + 2.073990541997773, + 2.0745090839991462, + 2.0750440420015366, + 2.075668334000511, + 2.0762243749995832, + 2.0767777919973014, + 2.077343042001303, + 2.0779707089968724, + 2.0788299170017126, + 2.0795127499950468, + 2.0801436249967082, + 2.080700667000201, + 2.0812552499992307, + 2.0818168339974363, + 2.082369625000865, + 2.0829255419957917, + 2.08343587499985, + 2.0839829169999575, + 2.0845240419948823, + 2.0850624589947984, + 2.0856222919974243, + 2.0861580839991802, + 2.086720791994594, + 2.0872295840017614, + 2.087732583997422, + 2.088305291996221, + 2.088864375000412, + 2.0894325420013047, + 2.089996834001795, + 2.0905434169981163, + 2.0910797089964035, + 2.091618541999196, + 2.0922435839966056, + 2.0928162089985562, + 2.0933883339966997, + 2.0939302089973353, + 2.094468416995369, + 2.094985874995473, + 2.0955185419952613, + 2.0960540839951136, + 2.0966631249975762, + 2.097327541996492, + 2.098019334000128, + 2.098652000000584, + 2.099254666994966, + 2.099795374997484, + 2.100343749996682, + 2.1009138750014245, + 2.1014847499973257, + 2.102051208996272, + 2.1025475839996943, + 2.1031256249989383, + 2.1036252499980037, + 2.1041888749969075, + 2.104755208994902, + 2.1053065000014612, + 2.1058275420000427, + 2.1063417089972063, + 2.106925667001633, + 2.107522209000308, + 2.1080692499963334, + 2.108613416996377, + 2.1091971249989, + 2.1096967499979655, + 2.1102189169978374, + 2.11079933399742, + 2.111370958999032, + 2.1119528339986573, + 2.112504791999527, + 2.1130284999962896, + 2.1135916669954895, + 2.1141692089950084, + 2.114904124995519, + 2.115570417001436, + 2.1163805420001154, + 2.1170147090015234, + 2.1176259589992696, + 2.118269999999029, + 2.118896959000267, + 2.119473749997269, + 2.1200656250002794, + 2.120613166996918, + 2.121160083996074, + 2.121679749994655, + 2.1222287919954397, + 2.1228419999970356, + 2.123413499997696, + 2.123943499995221, + 2.124538833995757, + 2.1251274589958484, + 2.1256642090011155, + 2.126185749999422, + 2.126775833996362, + 2.127285167000082, + 2.1278729589976138, + 2.1284264589994564, + 2.128961624999647, + 2.1295041249977658, + 2.1300441669955035, + 2.1305696249983157, + 2.1310804589957115, + 2.1316156670000055, + 2.132160417000705, + 2.1327406669952325, + 2.1332661249980447, + 2.1338462499988964, + 2.134384749995661, + 2.134917167000822, + 2.1354838749975897, + 2.136075416994572, + 2.136727791999874, + 2.1373045000000275, + 2.137902666996524, + 2.13846754199767, + 2.1390515839957516, + 2.139585958997486, + 2.1401186250004685, + 2.1406444999956875, + 2.1411576669997885, + 2.14171387499664, + 2.1422618750002584, + 2.1427791669993894, + 2.143286583996087, + 2.1438738750002813, + 2.1444231669956935, + 2.1449629589988035, + 2.14565058399603, + 2.1461864999946556, + 2.1467602089978755, + 2.147301500001049, + 2.1478489590008394, + 2.148394999996526, + 2.148950666996825, + 2.149498999999196, + 2.1500735000008717, + 2.150623417001043, + 2.1511589590008953, + 2.1517082919963286, + 2.1522522090017446, + 2.152767125000537, + 2.153303209001024, + 2.1538535419967957, + 2.1543809169961605, + 2.1549869590016897, + 2.155509833995893, + 2.156156249999185, + 2.1566959589981707, + 2.157300833998306, + 2.15792504199635, + 2.1584777919997578, + 2.15901483399648, + 2.1595390840011532, + 2.1600332089947187, + 2.1605763749976177, + 2.161125416998402, + 2.161632124996686, + 2.1622039590001805, + 2.162753791999421, + 2.1632942919968627, + 2.1639452089948463, + 2.1645498750003753, + 2.1650852089951513, + 2.165628791997733, + 2.166124374998617, + 2.166680208996695, + 2.1671900000001187, + 2.16775216699898, + 2.168267166998703, + 2.1688145000007353, + 2.169365124995238, + 2.169888042000821, + 2.1704295839954284, + 2.1710026250002556, + 2.1715622919946327, + 2.1721548339992296, + 2.172687166996184, + 2.17323370899976, + 2.1738084999960847, + 2.174341291996825, + 2.1748992499997257, + 2.1754740420001326, + 2.1761724589960068, + 2.1767455419976613, + 2.177329666999867, + 2.1778832919953857, + 2.1784556669954327, + 2.1790007499948842, + 2.179603999997198, + 2.180159666997497, + 2.180715083995892, + 2.1812428339981125, + 2.181759916995361, + 2.18228408399591, + 2.1828164589969674, + 2.183351916995889, + 2.183914041997923, + 2.1844627919999766, + 2.1851557920017513, + 2.1856772499959334, + 2.1862225840013707, + 2.186849166995671, + 2.1873873340009595, + 2.187944666999101, + 2.1884844589949353, + 2.189072542001668, + 2.1896113749971846, + 2.190190333996725, + 2.1907068750006147, + 2.1912388339987956, + 2.191799041997001, + 2.192352749996644, + 2.192913499995484, + 2.1935030839958927, + 2.194046584001626, + 2.194632708997233, + 2.1953052499957266, + 2.195978291994834, + 2.196548416999576, + 2.1971489589996054, + 2.197699083997577, + 2.1982855839960393, + 2.1988362499978393, + 2.199393292001332, + 2.1999551249973592, + 2.2005108340017614, + 2.2010833749955054, + 2.2016535000002477, + 2.202203084001667, + 2.2027412919997005, + 2.2033583750016987, + 2.2038874169957126, + 2.204479624997475, + 2.2050480420002714, + 2.2056007089995546, + 2.2061594999977387, + 2.206694874999812, + 2.207273084000917, + 2.2078849999961676, + 2.2084855840003, + 2.2090112500009127, + 2.209573125001043, + 2.2101485839957604, + 2.2107009589963127, + 2.2113095419990714, + 2.2118559169975924, + 2.2123549999960233, + 2.2129881669970928, + 2.2135478339987458, + 2.2141490419962793, + 2.21473483400041, + 2.2153330000001006, + 2.2159547089977423, + 2.216502541996306, + 2.2170642919954844, + 2.2175962920009624, + 2.2181299590010894, + 2.2186991249982384, + 2.2192204169987235, + 2.2197253749982337, + 2.220266584001365, + 2.2207714169999235, + 2.221292458998505, + 2.2218184169978485, + 2.222378624996054, + 2.222935416997643, + 2.2234654999992927, + 2.223997083994618, + 2.2245136669953354, + 2.2250406249950174, + 2.2255992499995045, + 2.2261095419962658, + 2.226637874999142, + 2.2272121669957414, + 2.2277424589992734, + 2.2282322499959264, + 2.2287573749999865, + 2.229267541995796, + 2.2298601669972413, + 2.230400499996904, + 2.2309483339995495, + 2.2314622919948306, + 2.2320317499979865, + 2.232533208996756, + 2.233121459001268, + 2.2337394999995013, + 2.234358791996783, + 2.2349688749964116, + 2.235527374999947, + 2.236169042000256, + 2.236745541995333, + 2.237385208994965, + 2.237953916999686, + 2.238490499999898, + 2.2390749999976833, + 2.239620125001238, + 2.2401967920013703, + 2.240738041997247, + 2.241302624999662, + 2.2418203339984757, + 2.2423612919956213, + 2.2429147090006154, + 2.2435152499965625, + 2.244083874997159, + 2.244629624998197, + 2.2451549589968636, + 2.245686083995679, + 2.246214749997307, + 2.2468056669968064, + 2.247490124995238, + 2.2480822919969796, + 2.248598624995793, + 2.2491341669956455, + 2.2496855839999625, + 2.250203541996598, + 2.2507321250013774, + 2.251295999994909, + 2.251880291994894, + 2.252444083998853, + 2.253012041997863, + 2.2536065419990337, + 2.254171583997959, + 2.2547087499988265, + 2.255368499994802, + 2.2563105419976637, + 2.2569960839973646, + 2.2576301250010147, + 2.2582147089997306, + 2.2587887920017238, + 2.2593742919998476, + 2.259942124997906, + 2.2604784590002964, + 2.2610272919991985, + 2.2615783750006813, + 2.2621215420003864, + 2.2627009169955272, + 2.263247750001028, + 2.2638230839947937, + 2.2643844170015655, + 2.264929166994989, + 2.2654315839972696, + 2.2659967090003192, + 2.2665576250001322, + 2.2671329169970704, + 2.267643125000177, + 2.268178291997174, + 2.268722208995314, + 2.269255624996731, + 2.2697970419976627, + 2.2704369999992196, + 2.2710783750007977, + 2.27171562500007, + 2.2723620839969954, + 2.272991334000835, + 2.273604541995155, + 2.275007459000335, + 2.2759231669988367, + 2.276816208999662, + 2.277512624998053, + 2.278118041998823, + 2.278742541995598, + 2.27944520899473, + 2.280026041997189, + 2.2806763339976897, + 2.2813496669987217, + 2.28199870899698, + 2.282658708994859, + 2.283334499996272, + 2.2839502089991583, + 2.284560291998787, + 2.285183916996175, + 2.285836167000525, + 2.286490041995421, + 2.287108917000296, + 2.287698084001022, + 2.2882970419959747, + 2.288950541995291, + 2.2895512499962933, + 2.2901517919963226, + 2.2907975419948343, + 2.291439291999268, + 2.2920773750010994, + 2.2928276249949704, + 2.293504249995749, + 2.2941461250011344, + 2.2948257089956314, + 2.295536166995589, + 2.2962075839968747, + 2.296895333995053, + 2.297557499994582, + 2.298212749999948, + 2.298850125000172, + 2.299468833996798, + 2.3001324590004515, + 2.300792249996448, + 2.301402874996711, + 2.302040834001673, + 2.3027884170005564, + 2.3033840839998447, + 2.304005416997825, + 2.304605500001344, + 2.3052455419965554, + 2.305825041999924, + 2.3064555839955574, + 2.307082958999672, + 2.307708291999006, + 2.308309249994636, + 2.3089742090014624, + 2.3095808340003714, + 2.310191833996214, + 2.3109454169971286, + 2.3115646250007558, + 2.3122022919997107, + 2.3128033749962924, + 2.3134297500000685, + 2.3141116249971674, + 2.314762541995151, + 2.3154201669967733, + 2.3161042499996256, + 2.3167560840010992, + 2.3173852920008358, + 2.318018874997506, + 2.3186081249950803, + 2.3192406249945634, + 2.319869541999651, + 2.320491624996066, + 2.321151500000269, + 2.3217623339951388, + 2.322373124996375, + 2.3230312500018044, + 2.3236744589958107, + 2.3242977499976405, + 2.324967166998249, + 2.325654583997675, + 2.326315334001265, + 2.3269324590000906, + 2.3275627920011175, + 2.328169333995902, + 2.328772166998533, + 2.3293788340015453, + 2.3300173339957837, + 2.3306733339995844, + 2.3313650419950136, + 2.332003249997797, + 2.3326414589973865, + 2.333283208994544, + 2.333954083995195, + 2.3346550419955747, + 2.335370791995956, + 2.3360312090007938, + 2.336689625000872, + 2.337325000000419, + 2.3379465420002816, + 2.338627874996746, + 2.339265416994749, + 2.3399172499994165, + 2.3405301249949844, + 2.341161291995377, + 2.3418024169950513, + 2.3424460839960375, + 2.34305295899685, + 2.3436950420000358, + 2.3443299999999, + 2.3449547919954057, + 2.3455812920001335, + 2.3462704999983544, + 2.346986124997784, + 2.347641708998708, + 2.3482946250005625, + 2.3489638339960948, + 2.3496068339954945, + 2.3502087089946144, + 2.350903124999604, + 2.3515414590001456, + 2.3521550000004936, + 2.3528001250015222, + 2.353552916996705, + 2.354292459000135, + 2.3550279999981285, + 2.355662709000171, + 2.356274375000794, + 2.356911709000997, + 2.357511208996584, + 2.3581639589974657, + 2.358732417000283, + 2.359381834001397, + 2.3599793749963283, + 2.3606147919999785, + 2.3612382919964148, + 2.3619556249977904, + 2.362623374996474, + 2.3633353339973837, + 2.3639929999990272, + 2.3646381669968832, + 2.3652634999962174, + 2.3658801249985117, + 2.3665230839978904, + 2.3671552919986425, + 2.3678353750001406, + 2.3684912499957136, + 2.3691087499973946, + 2.369757458996901, + 2.3703632920005475, + 2.3709705419969396, + 2.3715985839953646, + 2.3722009170014644, + 2.373023291998834, + 2.3736687089985935, + 2.3743789169966476, + 2.3750944169951254, + 2.375710916996468, + 2.3763337499985937, + 2.3769752090011025, + 2.3775894589998643, + 2.378202791995136, + 2.378843209000479, + 2.379480625000724, + 2.3801003339976887, + 2.380747833994974, + 2.381388750000042, + 2.3821119169952, + 2.382765958995151, + 2.38340829200024, + 2.384032624999236, + 2.3846648749968153, + 2.3853002920004656, + 2.3859347499965224, + 2.3865745840012096, + 2.3871902089958894, + 2.387839333998272, + 2.388433833999443, + 2.3890254169964464, + 2.389632708996942, + 2.3902560839997022, + 2.390852459000598, + 2.3914942089977558, + 2.3921593749983003, + 2.392794125000364, + 2.3934772499997052, + 2.3941268749986193, + 2.3947607500012964, + 2.395383041999594, + 2.3960327089953353, + 2.3966759169998113, + 2.3973279999991064, + 2.3979393749978044, + 2.398582499998156, + 2.3992000419966644, + 2.3997974999947473, + 2.400376833997143, + 2.4009626249971916, + 2.401593499998853, + 2.402223500001128, + 2.4030231249998906, + 2.4036493339954177, + 2.4043249589958577, + 2.404948791998322, + 2.405566292000003, + 2.4061674589975155, + 2.4067536250004196, + 2.4073709169970243, + 2.4080161249949015, + 2.4086261249976815, + 2.409265417001734, + 2.4099132499977713, + 2.4105148749949876, + 2.411132000001089, + 2.4117602499973145, + 2.412432749995787, + 2.41306962499948, + 2.413782083996921, + 2.4144929999965825, + 2.415140375000192, + 2.415812499995809, + 2.4164445839996915, + 2.4170940420008264, + 2.4177181249979185, + 2.4183689169949503, + 2.4189970000006724, + 2.4196397499981686, + 2.4202817089972086, + 2.420899249998911, + 2.4215241669953684, + 2.4221398750014487, + 2.4227750840000226, + 2.4235378750017844, + 2.424186374999408, + 2.4248008750000736, + 2.4254247919961927, + 2.426090333996399, + 2.4267099169956055, + 2.427339000001666, + 2.427932916994905, + 2.4285662089969264, + 2.4291728339958354, + 2.4298475420000614, + 2.430473874999734, + 2.4312317090007127, + 2.4319414169949596, + 2.4326600419954048, + 2.4332854999956908, + 2.433894292000332, + 2.434501249997993, + 2.435114291998616, + 2.4357708749957965, + 2.436391374998493, + 2.437043583995546, + 2.4378533749986673, + 2.4385098749989993, + 2.439221666994854, + 2.439836083998671, + 2.4404682499953196, + 2.441089499996451, + 2.441719666996505, + 2.442303791998711, + 2.4429279589967337, + 2.4435801669969806, + 2.4441913339978782, + 2.4448393339989707, + 2.445446041994728, + 2.44613450000179, + 2.4468230419952306, + 2.447479166999983, + 2.448133334000886, + 2.4488086249984917, + 2.4494495839971933, + 2.4500902500003576, + 2.450857874995563, + 2.451526416996785, + 2.4522557919990504, + 2.4529161669997848, + 2.4535542500016163, + 2.4542113339994103, + 2.4548691249947296, + 2.455515249996097, + 2.456125749995408, + 2.4567880839967984, + 2.4574664999963716, + 2.458096709000529, + 2.458733250001387, + 2.459286749995954, + 2.4599201249948237, + 2.460597291996237, + 2.4611728749951, + 2.4617262499959907, + 2.462214708997635, + 2.4627311669974006, + 2.463250333996257, + 2.4637630419965717, + 2.464255458995467, + 2.4647647089950624, + 2.4652830839986564, + 2.465850833999866, + 2.4663793340005213, + 2.466923499996483, + 2.4674645839986624, + 2.4680025839988957, + 2.468543208997289, + 2.469067999998515, + 2.469687459000852, + 2.4703353340009926, + 2.4709404169989284, + 2.4715115840008366, + 2.4720495419969666, + 2.4726039589950233, + 2.473123541996756, + 2.4736510000002454, + 2.4741789999970933, + 2.4747617920002085, + 2.4754288339972845, + 2.4760055000006105, + 2.476625041999796, + 2.477213458994811, + 2.4778691669998807, + 2.4785144999987097, + 2.479144291995908, + 2.47978395899554, + 2.480517833995691, + 2.4811294589962927, + 2.4817606669967063, + 2.482363584000268, + 2.483006583999668, + 2.4836208749984507, + 2.484222792001674, + 2.4848062089949963, + 2.485451791995729, + 2.486066124998615, + 2.486687874996278, + 2.4872855840003467, + 2.487948834001145, + 2.488565125000605, + 2.489239666996582, + 2.489923834000365, + 2.4909611670009326, + 2.491624124995724, + 2.4922632919988246, + 2.4928825839961064, + 2.493532125001366, + 2.4941503340014606, + 2.4947832920006476, + 2.4954010840010596, + 2.4960190419951687, + 2.496783875001711, + 2.4974042089961586, + 2.49808079200011, + 2.498698041999887, + 2.499331708997488, + 2.4999615419947077, + 2.5005719589971704, + 2.5011755419982364, + 2.501915458997246, + 2.502542166999774, + 2.503173291996063, + 2.5037984590017004, + 2.5044154999995953, + 2.5050215419978485, + 2.505668459001754, + 2.5062910419947, + 2.5069062920010765, + 2.5075363750001998, + 2.508181874996808, + 2.5088490419948357, + 2.5095423749953625, + 2.5102150839957176, + 2.5110275839979295, + 2.511689250000927, + 2.5123150419967715, + 2.512903999995615, + 2.51357737500075, + 2.5142128340012277, + 2.514850833998935, + 2.515464541997062, + 2.516139250001288, + 2.5167925839996315, + 2.5175234169946634, + 2.518174166994868, + 2.5187919169984525, + 2.5194104589972994, + 2.5200582920006127, + 2.52065366700117, + 2.521291334000125, + 2.5219309169988264, + 2.5225511669996195, + 2.523180666998087, + 2.5237635000012233, + 2.524371166997298, + 2.524976249995234, + 2.525593874997867, + 2.526348166997195, + 2.5269681249992573, + 2.527626124996459, + 2.5282031669994467, + 2.5290113750015735, + 2.5297168339966447, + 2.53040966700064, + 2.53114279199508, + 2.5317842090007616, + 2.532414166998933, + 2.5330269999976736, + 2.53364899999724, + 2.5342717499952414, + 2.5348555839955225, + 2.535486624998157, + 2.5360778749964084, + 2.5366949169983855, + 2.5372943339971243, + 2.537867125000048, + 2.538519916997757, + 2.539082083996618, + 2.5395934589978424, + 2.5401649170016753, + 2.540724083999521, + 2.5412702499961597, + 2.541877083996951, + 2.542381958999613, + 2.542944084001647, + 2.5435177499966812, + 2.544031666999217, + 2.544632334000198, + 2.5452077919981093, + 2.545800791995134, + 2.5464305839996086, + 2.5469451249955455, + 2.5475433339961455, + 2.548149458998523, + 2.548752083996078, + 2.549347583997587, + 2.549932916997932, + 2.550452541996492, + 2.5509809590002988, + 2.551494624996849, + 2.5520060839990037, + 2.5525310000011814, + 2.5530547089947504, + 2.5535908749952796, + 2.554105958995933, + 2.554642374998366, + 2.555231874997844, + 2.555770708997443, + 2.556283291996806, + 2.556823209000868, + 2.5573472499963827, + 2.5579204999958165, + 2.5584484589999192, + 2.55896483399556, + 2.5595438749951427, + 2.560086166995461, + 2.560633458997472, + 2.561195249996672, + 2.5617137500012177, + 2.5622280839961604, + 2.5627764589953586, + 2.5633111669958453, + 2.5638741250004387, + 2.5643858749972424, + 2.5649534999975003, + 2.5655022919963812, + 2.5659650419984246, + 2.5664707499963697, + 2.567066416995658, + 2.5676743750009337, + 2.5682501249975758, + 2.5688122089995886, + 2.56941458399524, + 2.570113374997163, + 2.570705708996684, + 2.5712630839989288, + 2.571840833996248, + 2.572401917001116, + 2.5729707089994918, + 2.573576583999966, + 2.5741290419973666, + 2.574633833995904, + 2.5752175839952542, + 2.5758320419990923, + 2.576407583997934, + 2.5769870840013027, + 2.577573750000738, + 2.5782483750008396, + 2.578823416995874, + 2.5793542499959585, + 2.5798897499989835, + 2.5804220419959165, + 2.5809537089953665, + 2.581481791996339, + 2.5820412920002127, + 2.5826068749956903, + 2.5831281669961754, + 2.5836730419978267, + 2.5841702920006355, + 2.5846793339951546, + 2.5852059999961057, + 2.5857541669975035, + 2.5862607499948354, + 2.5868277920017135, + 2.587389208994864, + 2.587952875001065, + 2.588471709001169, + 2.5890287500005797, + 2.5895640839953558, + 2.590119833999779, + 2.590775999997277, + 2.5913775000008172, + 2.591988374995708, + 2.592556584000704, + 2.593115666997619, + 2.593628958995396, + 2.594289791995834, + 2.594873333997384, + 2.59537362500123, + 2.5959168749977835, + 2.5964316249956028, + 2.5969904999947175, + 2.5975847500012605, + 2.5981087499967543, + 2.5987002499969094, + 2.5992744999966817, + 2.599814499997592, + 2.6003283749960246, + 2.6009251669966034, + 2.601444708998315, + 2.601957083999878, + 2.6024794170007226, + 2.6030255000005127, + 2.603610291997029, + 2.604173916995933, + 2.604682833996776, + 2.6054798339973786, + 2.606011416995898, + 2.60656987499533, + 2.6070912089999183, + 2.607661541995185, + 2.608230999998341, + 2.6088709169998765, + 2.6095149999964633, + 2.6101254589957534, + 2.6106977089948487, + 2.611264792001748, + 2.6118332089972682, + 2.6123939999961294, + 2.612925583998731, + 2.613519708997046, + 2.6140789999990375, + 2.6146882089960855, + 2.6152376249956433, + 2.615799209001125, + 2.6163218750007218, + 2.616889083998103, + 2.617402999996557, + 2.6179228339969995, + 2.618461458994716, + 2.6191021669947077, + 2.6196344169948134, + 2.6201797089961474, + 2.6207178749973536, + 2.6212316669989377, + 2.621765249998134, + 2.6222662090003723, + 2.6228074169994215, + 2.623358459000883, + 2.623898041994835, + 2.6244353750007576, + 2.625023417000193, + 2.6255470420001075, + 2.6260829589955392, + 2.626602083997568, + 2.6274367090009036, + 2.6282505419949302, + 2.6288870419957675, + 2.6295105419994798, + 2.630135583996889, + 2.630685124997399, + 2.6312329590000445, + 2.631757541996194, + 2.632359083996562, + 2.632934208995721, + 2.6334918339998694, + 2.634047166997334, + 2.6345965000000433, + 2.635139624995645, + 2.6357117090010433, + 2.6362582500005374, + 2.636788625000918, + 2.6374843750018044, + 2.6380238339988864, + 2.6385725419968367, + 2.6391337499953806, + 2.6396950839989586, + 2.6401805839996086, + 2.640686792001361, + 2.6412402919959277, + 2.641769249996287, + 2.6423077919971547, + 2.6428920420003124, + 2.6434112499991897, + 2.6439655419962946, + 2.6444824999998673, + 2.645016541995574, + 2.6455754169946886, + 2.6461343339979067, + 2.646670374997484, + 2.647227916997508, + 2.6478026249969844, + 2.6484332499967422, + 2.6490499999999884, + 2.6496318749996135, + 2.650211667001713, + 2.650760333999642, + 2.651289083994925, + 2.6518448749993695, + 2.6524145000003045, + 2.6530166669981554, + 2.65358254199964, + 2.6541529589958373, + 2.6546774589951383, + 2.655239209001593, + 2.6558023339966894, + 2.6563614170008805, + 2.6568964589969255, + 2.657437083995319, + 2.657965583995974, + 2.6584781669953372, + 2.659046834000037, + 2.6597202499979176, + 2.660337624998647, + 2.660915666994697, + 2.661510666999675, + 2.662080624999362, + 2.6625949169974774, + 2.6631225839955732, + 2.663660792000883, + 2.6642138339957455, + 2.664776958998118, + 2.665360166996834, + 2.6659044999978505, + 2.6664508339963504, + 2.6670646669954294, + 2.6676619589998154, + 2.668414916995971, + 2.6690489999964484, + 2.669620374996157, + 2.670176874999015, + 2.67072874999576, + 2.6712659999975585, + 2.671836749999784, + 2.672410374994797, + 2.672977333997551, + 2.673520249998546, + 2.674068416999944, + 2.67463329200109, + 2.6751851250010077, + 2.675712708994979, + 2.676260458996694, + 2.6768108749965904, + 2.677392666999367, + 2.677967791998526, + 2.6785457090009004, + 2.679087749995233, + 2.6796473340000375, + 2.6801926249972894, + 2.6807827090015053, + 2.68134570899565, + 2.681897583999671, + 2.6825013749985374, + 2.683058875001734, + 2.6836296249966836, + 2.6841594169964083, + 2.684700124998926, + 2.685325083999487, + 2.685897416995431, + 2.6865326249971986, + 2.687147708995326, + 2.687731874997553, + 2.6883483339988743, + 2.6889623749957536, + 2.689560624996375, + 2.69014995899488, + 2.6907299169979524, + 2.6913656670003547, + 2.692028792000201, + 2.692660959000932, + 2.6932820419970085, + 2.6939314589981223, + 2.6945952089954517, + 2.695223499998974, + 2.696027541998774, + 2.696721208994859, + 2.6973914170011994, + 2.698048749996815, + 2.698713958998269, + 2.699389166999026, + 2.700058791997435, + 2.700714999999036, + 2.7013759999972535, + 2.7020301669981563, + 2.702677291999862, + 2.7032968749990687, + 2.7039629999999306, + 2.7046105839981465, + 2.705397958998219, + 2.7061224589997437, + 2.7067410419986118, + 2.707340208995447, + 2.7080830419945414, + 2.708750375000818, + 2.7094110420002835, + 2.710063667000213, + 2.7106901250008377, + 2.711303500000213, + 2.712076124997111, + 2.712700666997989, + 2.7133564169998863, + 2.7140092499976163, + 2.7146400839992566, + 2.715263583995693, + 2.7159076669995557, + 2.716544499999145, + 2.7172281249950174, + 2.7178667089974624, + 2.7185684590003802, + 2.719185458998254, + 2.7198137500017765, + 2.720451791996311, + 2.721078041999135, + 2.721705416995974, + 2.72233087499626, + 2.722979917001794, + 2.7235994169968762, + 2.7242585839994717, + 2.7248976249975385, + 2.7255404999959865, + 2.7261585839951294, + 2.7268077920016367, + 2.7275549999976647, + 2.728229708998697, + 2.728912209000555, + 2.729526958995848, + 2.730256709000969, + 2.730912499995611, + 2.731531375000486, + 2.7321828749991255, + 2.7328370839968557, + 2.7335487499949522, + 2.7341889169983915, + 2.7347926250004093, + 2.7355040420006844, + 2.7361323750010342, + 2.736761916996329, + 2.737532667000778, + 2.7382585419982206, + 2.738877791998675, + 2.7394956249991083, + 2.7400977090001106, + 2.7407370840010117, + 2.74146354199911, + 2.742081042000791, + 2.742737542001123, + 2.7433564589955495, + 2.7439624999969965, + 2.744643375001033, + 2.7453183339966927, + 2.7460272499956773, + 2.7467483750006068, + 2.74737629199808, + 2.747999166997033, + 2.748622749997594, + 2.7492510000010952, + 2.7499115419996087, + 2.750549124997633, + 2.751236999996763, + 2.751877999995486, + 2.7524911250002333, + 2.753105167001195, + 2.7537167920017964, + 2.754382250001072, + 2.755039833995397, + 2.7557511669947417, + 2.756380958999216, + 2.7570083339960547, + 2.757622208999237, + 2.758357667000382, + 2.759004374995129, + 2.7596234589946107, + 2.7602570000017295, + 2.760878208995564, + 2.761485499999253, + 2.762126374997024, + 2.762721833998512, + 2.7633430419955403, + 2.76403266700072, + 2.7648445419981726, + 2.7655062089979765, + 2.7661822919981205, + 2.7668574589988566, + 2.7675050839970936, + 2.768142208995414, + 2.768787249995512, + 2.7694020419949084, + 2.770240833997377, + 2.7709665000002133, + 2.7716262089961674, + 2.7722752499976195, + 2.7728809999971418, + 2.7734782920015277, + 2.77409366700158, + 2.7747485840009176, + 2.7754027919945656, + 2.776006291998783, + 2.776607374995365, + 2.777215541995247, + 2.7778528339986224, + 2.778513874996861, + 2.779145000000426, + 2.7797939169977326, + 2.7804123339956277, + 2.781021458999021, + 2.7816546249960084, + 2.782277541999065, + 2.7830292500002543, + 2.783707083995978, + 2.7843421249999665, + 2.7851402499945834, + 2.785840541997459, + 2.786534999999276, + 2.7871720420007478, + 2.787836083996808, + 2.788491333994898, + 2.7891204170009587, + 2.7897479589955765, + 2.7904856669993023, + 2.7911843749971013, + 2.791811292001512, + 2.792426667001564, + 2.793028416999732, + 2.7937089999977616, + 2.7943228340009227, + 2.794956624995393, + 2.795611249996, + 2.796222459001001, + 2.796872209000867, + 2.797512833996734, + 2.798122542000783, + 2.798746708998806, + 2.799484167000628, + 2.800091708995751, + 2.800732124997012, + 2.8013729999947827, + 2.8020167499998934, + 2.8026392920000944, + 2.803273999998055, + 2.803895291996014, + 2.804660541994963, + 2.8053429999999935, + 2.8059666249973816, + 2.8066084169986425, + 2.807222791998356, + 2.8078625419948366, + 2.808498916994722, + 2.8091162919954513, + 2.8096946669975296, + 2.8103505420003785, + 2.8109941669972613, + 2.811626458998944, + 2.812251083996671, + 2.812848292000126, + 2.8134821249987, + 2.814081416996487, + 2.8146884169982513, + 2.815322834001563, + 2.8159251249962836, + 2.816558874998009, + 2.817203583996161, + 2.8178260839995346, + 2.818538041996362, + 2.8191440839946154, + 2.819761667000421, + 2.820455834000313, + 2.8210657089948654, + 2.821661000001768, + 2.8222465840008226, + 2.8229625419990043, + 2.823651083999721, + 2.824464708995947, + 2.8251145419999375, + 2.8257947089950903, + 2.8264263339951867, + 2.8270641669951146, + 2.8276979590009432, + 2.8283558339971933, + 2.82899075000023, + 2.8297647919971496, + 2.8304897919952055, + 2.8311400419988786, + 2.8318097919982392, + 2.832458166994911, + 2.8330989999958547, + 2.8337586669949815, + 2.8343954589945497, + 2.8350064999976894, + 2.8356802919952315, + 2.836275041998306, + 2.836923458999081, + 2.8375572500008275, + 2.838193333998788, + 2.8388584169952082, + 2.8395233339979313, + 2.840143417000945, + 2.840757209000003, + 2.8414162499975646, + 2.8420652499989956, + 2.8429011670014006, + 2.8436191250002594, + 2.84448049999628, + 2.8451175000009243, + 2.8457280000002356, + 2.846349209001346, + 2.8470276669977466, + 2.8476477090007393, + 2.8482594589950168, + 2.8489074999961304, + 2.8495863749994896, + 2.85019795900007, + 2.8508283339979243, + 2.851489542001218, + 2.852156749999267, + 2.8527992089948384, + 2.853437624995422, + 2.854044833999069, + 2.85466383399762, + 2.855322208997677, + 2.8559530839993386, + 2.8565857499997946, + 2.857222749997163, + 2.857864249999693, + 2.85850008399575, + 2.859120916997199, + 2.8597493749985006, + 2.8603399169951444, + 2.8609570839980734, + 2.861618750001071, + 2.8624445839959662, + 2.863130124998861, + 2.8638047499989625, + 2.864484416997584, + 2.865108917001635, + 2.865744624999934, + 2.8663867919967743, + 2.8670177919993876, + 2.8676861669955542, + 2.8683105839954806, + 2.8689663339973777, + 2.8696378339955118, + 2.8702634169967496, + 2.8709007919969736, + 2.8715133340010652, + 2.8721388749981998, + 2.8727607089967933, + 2.8733722920005675, + 2.8740559590005432, + 2.8747206249972805, + 2.8753496249992168, + 2.8759670840008766, + 2.8766169590016943, + 2.877257374995679, + 2.8779414589953376, + 2.87857570900087, + 2.879323834000388, + 2.87993108399678, + 2.880640958996082, + 2.8814119169983314, + 2.882117166998796, + 2.8828277089996845, + 2.883451374997094, + 2.8841122500016354, + 2.884733958999277, + 2.8853700420004316, + 2.8860461250005756, + 2.886715833999915, + 2.887330124998698, + 2.887983374996111, + 2.8886559999955352, + 2.8893184999978985, + 2.8899782500011497, + 2.890600999999151, + 2.8913000419997843, + 2.8919388340000296, + 2.8925529589978396, + 2.893203833998996, + 2.8938471669971477, + 2.8944595840002876, + 2.895107917000132, + 2.8957366670001647, + 2.8963530420005554, + 2.8969853339949623, + 2.8976481669960776, + 2.898270459001651, + 2.898936124998727, + 2.8995615419989917, + 2.900222999996913, + 2.900883624999551, + 2.90156137500162, + 2.902232208994974, + 2.902864249997947, + 2.9034969999993336, + 2.9042176669972832, + 2.9048688339971704, + 2.9055144589947304, + 2.9061782919961843, + 2.906821708995267, + 2.9074381249956787, + 2.9081673749969923, + 2.9088244999948074, + 2.909487375000026, + 2.9101260419993196, + 2.9107510419999016, + 2.911411708999367, + 2.9120524169993587, + 2.912692583995522, + 2.913326791996951, + 2.9139787089952733, + 2.914607166996575, + 2.9152287499964586, + 2.9158394589976524, + 2.9164404170005582, + 2.917074999997567, + 2.9177020419956534, + 2.918357709000702, + 2.9190239169984125, + 2.9196473749980214, + 2.920276583994564, + 2.9209192089983844, + 2.9215667089956696, + 2.9222005839983467, + 2.922890624999127, + 2.923592416998872, + 2.9243477919953875, + 2.925035084001138, + 2.9256609169970034, + 2.9263513749974663, + 2.926986874997965, + 2.92763679199561, + 2.9282819169966388, + 2.928848499999731, + 2.9294722089980496, + 2.93027162499493, + 2.930967125001189, + 2.931638041998667, + 2.9323023749966524, + 2.9329495839992887, + 2.9335846670001047, + 2.9342178750011954, + 2.9348436669970397, + 2.9354765839962056, + 2.9360948339963215, + 2.936715791998722, + 2.937292916998558, + 2.937925250000262, + 2.938534125001752, + 2.939170459001616, + 2.9398143340004026, + 2.9404322920017876, + 2.9410748340014834, + 2.9417412920010975, + 2.9425112919998355, + 2.9432269999961136, + 2.943928333996155, + 2.944566499994835, + 2.9452204999979585, + 2.9459222500008764, + 2.9465817919990513, + 2.947232874998008, + 2.9478623339964543, + 2.9485035839970806, + 2.9491398749960354, + 2.949772916996153, + 2.950421624998853, + 2.951058250000642, + 2.9518526249958086, + 2.9525179999982356, + 2.953130333997251, + 2.953738833995885, + 2.9544557920016814, + 2.9550826249978854, + 2.955705833999673, + 2.9563371670010383, + 2.956999916998029, + 2.9576537089960766, + 2.958357709001575, + 2.9589954589973786, + 2.959627708994958, + 2.9602764590017614, + 2.960865749999357, + 2.9615081250012736, + 2.9621480839996366, + 2.9628731249977136, + 2.9635291669983417, + 2.964215208994574, + 2.9648604999965755, + 2.9654573340012575, + 2.9660787920001894, + 2.9667255419990397, + 2.9673999169972376, + 2.968028499999491, + 2.9686271249956917, + 2.9692742089973763, + 2.9698868749983376, + 2.970506749996275, + 2.971163834001345, + 2.971802249994653, + 2.972478333998879, + 2.9730706670015934, + 2.9737096249955357, + 2.974330833996646, + 2.9750397499956307, + 2.9756639589977567, + 2.9763395839981968, + 2.976981749998231, + 2.977780041997903, + 2.9784445839977707, + 2.979071750000003, + 2.9796745419953368, + 2.980307334000827, + 2.980967374998727, + 2.9816799589971197, + 2.9823916669993196, + 2.983073584000522, + 2.983697874995414, + 2.984349416998157, + 2.9850150419952115, + 2.985646542001632, + 2.9862564169961843, + 2.986853333997715, + 2.9876137920000474, + 2.9882745419963612, + 2.988925334000669, + 2.989576166997722, + 2.990248292000615, + 2.99086774999887, + 2.991503166995244, + 2.9921492919966113, + 2.992809584000497, + 2.9935522919986397, + 2.9942622919988935, + 2.9949156250004307, + 2.9955497499977355, + 2.9962109589978354, + 2.9968579999986105, + 2.9974886249983683, + 2.9981694589951076, + 2.998747083998751, + 2.9993179999946733, + 2.9998669999986305, + 3.0007026249950286, + 3.0013829999952577, + 3.0020688340009656, + 3.002752959000645, + 3.0033182089973707, + 3.00391829200089, + 3.004559834000247, + 3.005155583996384, + 3.005756250000559, + 3.00642608400085, + 3.0069830419961363, + 3.007524333996116, + 3.008087999995041, + 3.008642583998153, + 3.009197333994962, + 3.009755084000062, + 3.0103012089966796, + 3.0108299999992596, + 3.0113304999977117, + 3.011834999997518, + 3.012349666998489, + 3.012879083995358, + 3.0134201670007315, + 3.0139564589990187, + 3.016509875000338, + 3.0170960839968757, + 3.017672499998298, + 3.018217042001197, + 3.018770541995764, + 3.019340499995451, + 3.0200519999998505, + 3.0206707499964978, + 3.0212478339963127, + 3.0218328749979264, + 3.0224268339952687, + 3.0229643339989707, + 3.0234959590015933, + 3.0240657499962253, + 3.0248271669988753, + 3.025426833999518, + 3.0259908750012983, + 3.0265586669993354, + 3.027113666998048, + 3.027676917001372, + 3.0283099169973866, + 3.028878334000183, + 3.0296154169991496, + 3.0322401669982355, + 3.033234791997529, + 3.0338321249946603, + 3.034469792000891, + 3.0350795420017675, + 3.035782749997452, + 3.0364859999972396, + 3.037096667001606, + 3.03767608400085, + 3.0382912089989986, + 3.0389313749983557, + 3.0395792499984964, + 3.0404022919974523, + 3.0411411249951925, + 3.042086041998118, + 3.0429220000005444, + 3.0435335419970215, + 3.044169166998472, + 3.0448133339959895, + 3.0453909169955296, + 3.0460097499963013, + 3.046565124997869, + 3.0471899589974782, + 3.0477493340004003, + 3.048453958996106, + 3.049035208998248, + 3.04956674999994, + 3.050134375000198, + 3.050697083999694, + 3.0513012500014156, + 3.051906874999986, + 3.0524182919980376, + 3.0529653749981662, + 3.053559416999633, + 3.0541087919991696, + 3.0547274999989895, + 3.0554101250017993, + 3.0559714589981013, + 3.056514291994972, + 3.057060667000769, + 3.0575879589960095, + 3.0581105839955853, + 3.0586442919957335, + 3.059204334000242, + 3.059767250000732, + 3.060379333997844, + 3.06102208399534, + 3.0616251669998746, + 3.062183541995182, + 3.062706042001082, + 3.063289249999798, + 3.0638750419966527, + 3.0644485000011628, + 3.0650262919953093, + 3.065610833997198, + 3.0661679589975392, + 3.0667107089975616, + 3.067255292000482, + 3.067807166997227, + 3.0683461669977987, + 3.0688866669952404, + 3.069441374995222, + 3.0700277500000084, + 3.0705889589953586, + 3.0711965000009513, + 3.0717569170010393, + 3.072281208995264, + 3.0728234999987762, + 3.0734051249964978, + 3.073904083998059, + 3.0744404590004706, + 3.0749837920011487, + 3.0755754169949796, + 3.0761367919985787, + 3.076687624998158, + 3.077243166997505, + 3.0778144169962616, + 3.0783878750007716, + 3.079038916999707, + 3.0796561669994844, + 3.080303249997087, + 3.0809318339961465, + 3.081475833998411, + 3.082029708995833, + 3.082566124998266, + 3.0831275839955197, + 3.083691291998548, + 3.0842585419959505, + 3.084849041995767, + 3.085435916997085, + 3.0859508749999804, + 3.0865125419950346, + 3.0872028749945457, + 3.087796374995378, + 3.088351458995021, + 3.088954916995135, + 3.089492084000085, + 3.090050083999813, + 3.090599958995881, + 3.091138666997722, + 3.0917002499991213, + 3.092337709000276, + 3.0929552919988055, + 3.0934915420002653, + 3.0940639589971397, + 3.0946584999983315, + 3.0952451249977457, + 3.0957486249972135, + 3.096325209000497, + 3.096871875000943, + 3.0975045419982052, + 3.098093666994828, + 3.0986794999989797, + 3.09926304200053, + 3.099854249994678, + 3.100372959001106, + 3.1009541249950416, + 3.1014635839965194, + 3.1020035420006025, + 3.1025599589993362, + 3.103144417000294, + 3.1037408339980175, + 3.1043034589965828, + 3.1048826670012204, + 3.105439083999954, + 3.1061505839970778, + 3.1066896249976708, + 3.107256791998225, + 3.10778679199575, + 3.1083500839959015, + 3.108890416995564, + 3.109436166996602, + 3.109952083999815, + 3.110508874997322, + 3.111023541998293, + 3.1115658749986324, + 3.1121401249984046, + 3.1127055839970126, + 3.1132710839956417, + 3.113814917000127, + 3.114511959000083, + 3.1151069999978063, + 3.1156681249995017, + 3.1161715839989483, + 3.1167404590014485, + 3.117376541995327, + 3.117975959001342, + 3.1186025839997455, + 3.1191934589951416, + 3.119722333998652, + 3.1202927499980433, + 3.120842708995042, + 3.121383708996291, + 3.1219075839981087, + 3.1224395419994835, + 3.122979874999146, + 3.1235466250000172, + 3.1240594999981113, + 3.124641583999619, + 3.125237374995777, + 3.1257757089988445, + 3.126343416995951, + 3.1269067089961027, + 3.127446708997013, + 3.128023958997801, + 3.128618833994551, + 3.129139042001043, + 3.129827166994801, + 3.1303840420005145, + 3.1309493750013644, + 3.1314870419955696, + 3.1320130419990164, + 3.1325933749976684, + 3.13316537499486, + 3.133702416998858, + 3.134216041995387, + 3.1347677919984562, + 3.135299000001396, + 3.135861083996133, + 3.136510749995068, + 3.137201500001538, + 3.137939208994794, + 3.138591750001069, + 3.1392303749962593, + 3.1398940419967403, + 3.140543791996606, + 3.141198708995944, + 3.1417794590015546, + 3.1423686669950257, + 3.1429897919952055, + 3.143634166997799, + 3.1442914590006694, + 3.1461784999992233, + 3.1473142089962494, + 3.147958292000112, + 3.1487090839946177, + 3.1493323339964263, + 3.1500156670008437, + 3.1506879169974127, + 3.151364334000391, + 3.152015209001547, + 3.152615416998742, + 3.1533846669990453, + 3.1541455420010607, + 3.1549099999974715, + 3.1556391669946606, + 3.1563449169989326, + 3.1571032919964637, + 3.1578229590013507, + 3.158508249995066, + 3.159188459001598, + 3.1598425839983975, + 3.1604769170007785, + 3.161112374997174, + 3.1617534589968272, + 3.1627594999954454, + 3.163469166996947, + 3.164185583998915, + 3.1648425419989508, + 3.165494791996025, + 3.166167791998305, + 3.1668260840015137, + 3.1674744999982067, + 3.168104083997605, + 3.1687218750012107, + 3.169341417000396, + 3.169958708997001, + 3.1705888340002275, + 3.1713534590016934, + 3.172032666996529, + 3.1726693339951453, + 3.173315208994609, + 3.173945416994684, + 3.1745927090014447, + 3.1754319999963627, + 3.1761416669978644, + 3.1768406670016702, + 3.177503541999613, + 3.1782113750014105, + 3.178868541996053, + 3.179519958997844, + 3.180217458997504, + 3.1808722089990624, + 3.181494416996429, + 3.1821434589946875, + 3.1827980839952943, + 3.183432375000848, + 3.1840762499996345, + 3.184718917000282, + 3.1853459589983686, + 3.185983999996097, + 3.186659166996833, + 3.1873002919965074, + 3.1879494589957176, + 3.1886094590008724, + 3.189256416997523, + 3.1898834589956095, + 3.190503958998306, + 3.1911713750014314, + 3.1917877919986495, + 3.1924303749983665, + 3.1930466249978053, + 3.193655958995805, + 3.1943129999999655, + 3.194957166997483, + 3.195776084001409, + 3.1964153750013793, + 3.197071999995387, + 3.1978018340014387, + 3.1985352499978035, + 3.199189083999954, + 3.19981099999859, + 3.2004404999970575, + 3.2010604169990984, + 3.2016877499991097, + 3.2023164999991423, + 3.2029784170008497, + 3.2035937089967774, + 3.204208249997464, + 3.2049166669967235, + 3.2055959999997867, + 3.206206458999077, + 3.206884250001167, + 3.2075040839990834, + 3.2082028750010068, + 3.2088552089990117, + 3.209512041998096, + 3.2101410839968594, + 3.210813708996284, + 3.2114552919956623, + 3.2120555419969605, + 3.2126490000009653, + 3.213272834000236, + 3.2138927089981735, + 3.2145259589960915, + 3.215168624999933, + 3.215873291999742, + 3.2165598339997814, + 3.2172377499955473, + 3.21792845899472, + 3.218534791994898, + 3.2191385420010192, + 3.219730459000857, + 3.220347167, + 3.2210782499969355, + 3.2217356249966542, + 3.222391499999503, + 3.222987208995619, + 3.223619708995102, + 3.2242617919982877, + 3.224871667000116, + 3.225563833999331, + 3.2261963749988354, + 3.2268307089980226, + 3.2275000419977005, + 3.228118708997499, + 3.2287273339970852, + 3.229374458998791, + 3.2299828749964945, + 3.2307580419947044, + 3.2313649589996203, + 3.2319976250000764, + 3.2326227919984376, + 3.233271249999234, + 3.2339404999947874, + 3.2346051249987795, + 3.2353435839977465, + 3.2360122919999412, + 3.2366865419971873, + 3.2373247089999495, + 3.2380058749986347, + 3.2386619999961113, + 3.239310500001011, + 3.239958291997027, + 3.240552958995977, + 3.241162541999074, + 3.24176545899536, + 3.242396708999877, + 3.2430446250000386, + 3.2437056669950834, + 3.2443222500005504, + 3.244964917001198, + 3.245588083998882, + 3.246175542000856, + 3.246838333994674, + 3.247599166999862, + 3.248220916997525, + 3.248890292001306, + 3.249540791999607, + 3.2502012499971897, + 3.2508552090002922, + 3.2514735419972567, + 3.2521323339969967, + 3.2527599169989116, + 3.2534228340009577, + 3.2541183339999407, + 3.254775333996804, + 3.255412416998297, + 3.256062333995942, + 3.256756583999959, + 3.257538083998952, + 3.2582414169955882, + 3.2589417499984847, + 3.2596367090009153, + 3.2602917089971015, + 3.260974708995491, + 3.261614249997365, + 3.2622512499947334, + 3.2628969590005, + 3.263619416997244, + 3.264262291995692, + 3.2649291249981616, + 3.2655919169992558, + 3.2662851249988307, + 3.266913374995056, + 3.2675420839950675, + 3.268174958997406, + 3.2688517499991576, + 3.2694997919970774, + 3.270145083995885, + 3.2707757919997675, + 3.27137912499893, + 3.272003209000104, + 3.2726302919982118, + 3.2732778339996003, + 3.273941958999785, + 3.2745652090015938, + 3.2752917499965406, + 3.2759909169981256, + 3.2767066250016796, + 3.2773775839959853, + 3.2781149169968558, + 3.278763333997631, + 3.279424416999973, + 3.280059541997616, + 3.280644083999505, + 3.2812757919964497, + 3.2819489169996814, + 3.282596958997601, + 3.2832426249951823, + 3.283902584000316, + 3.2845695419964613, + 3.285198917001253, + 3.2858230419951724, + 3.2864636250014883, + 3.287090708996402, + 3.287763749998703, + 3.288390834000893, + 3.2890507919946685, + 3.2896669170004316, + 3.2902744169987272, + 3.2909160839990363, + 3.2916325839978526, + 3.2922719169946504, + 3.2929236669951933, + 3.293542958999751, + 3.2942230420012493, + 3.294907791998412, + 3.295593999995617, + 3.2962675000017043, + 3.296959583996795, + 3.297624041995732, + 3.298241999997117, + 3.2989020419990993, + 3.299605000000156, + 3.3002712089946726, + 3.3009477500017965, + 3.3016184169973712, + 3.3022860839992063, + 3.302934416999051, + 3.303578374994686, + 3.304193708994717, + 3.3048376250008005, + 3.305430874999729, + 3.3061100419945433, + 3.306737708997389, + 3.3073635420005303, + 3.3080019999979413, + 3.3086177919976762, + 3.309279166998749, + 3.3099199589996715, + 3.310700750000251, + 3.311351083997579, + 3.3119937919982476, + 3.3126898749978864, + 3.31334433399752, + 3.3139993750010035, + 3.3146590420001303, + 3.3153308339969954, + 3.3160411669960013, + 3.3167107499975828, + 3.317365292001341, + 3.3180281249951804, + 3.318766083997616, + 3.319411833996128, + 3.320068499997433, + 3.3208208340001875, + 3.3214944589999504, + 3.3221349169980385, + 3.322788249999576, + 3.323464834000333, + 3.3241142089973437, + 3.3247379589956836, + 3.3253545420011505, + 3.326063084001362, + 3.326701250000042, + 3.3273434169968823, + 3.3280101669952273, + 3.3286192500017933, + 3.3292625839967513, + 3.329871458998241, + 3.330524583994702, + 3.331263084000966, + 3.331901874997129, + 3.332546249999723, + 3.3331979590002447, + 3.333888499997556, + 3.3345742089950363, + 3.335289541995735, + 3.3360761250005453, + 3.3367260839950177, + 3.33739070899901, + 3.3380390839956817, + 3.3386600839949097, + 3.3393160839987104, + 3.33996366700012, + 3.3405950000014855, + 3.3412170419978793, + 3.341856833998463, + 3.3424987499965937, + 3.3431088750003255, + 3.34373054200114, + 3.3443724169992493, + 3.345017542000278, + 3.345648666996567, + 3.3462386669998523, + 3.3469436669984134, + 3.3476524590005283, + 3.3483074589967146, + 3.3490077499955078, + 3.3497561249969294, + 3.350413583997579, + 3.3510585839976557, + 3.3517078750010114, + 3.352380374999484, + 3.353049708995968, + 3.353686791997461, + 3.35450279199722, + 3.3551896669960115, + 3.3558499589998974, + 3.356484541996906, + 3.35707358399668, + 3.3576872919948073, + 3.3583485839990317, + 3.359012333996361, + 3.3596360000010463, + 3.3602938749972964, + 3.360932124996907, + 3.3615910000007716, + 3.362252124999941, + 3.362869791999401, + 3.3635061669992865, + 3.3643061249968014, + 3.3652555840017158, + 3.3658603750009206, + 3.366502958997444, + 3.3671693750002305, + 3.36786462499731, + 3.3684834169980604, + 3.3691267920003156, + 3.3697196249995613, + 3.370327584001643, + 3.3709754169976804, + 3.37161820899928, + 3.3722664169981726, + 3.3729079170007026, + 3.3736322920012753, + 3.3743342089946964, + 3.37519975000032, + 3.375896334000572, + 3.3765396249946207, + 3.3771783339980175, + 3.377830375000485, + 3.3784997089969693, + 3.3791303749967483, + 3.3797821670013946, + 3.380444249996799, + 3.3810913749985048, + 3.3817543749973993, + 3.3823724999965634, + 3.382995084000868, + 3.383608916999947, + 3.384238541999366, + 3.384987874997023, + 3.3855795839990606, + 3.386210291995667, + 3.386847875000967, + 3.3874817920004716, + 3.388099042000249, + 3.3887057089959853, + 3.3893366670017713, + 3.389943750000384, + 3.3905692089974764, + 3.391206249994866, + 3.391845458994794, + 3.392499666995718, + 3.3931780839993735, + 3.3938234169982024, + 3.3944976669954485, + 3.3952364169963403, + 3.3958626669991645, + 3.396502999996301, + 3.3971652089967392, + 3.397787875001086, + 3.3984167919988977, + 3.399052084001596, + 3.399683374998858, + 3.4003630000006524, + 3.4009723749986733, + 3.4016021249990445, + 3.402213708999625, + 3.40284037499805, + 3.40349412499927, + 3.4041620419957326, + 3.404766624997137, + 3.4054207090011914, + 3.406050666999363, + 3.4066757089967723, + 3.407317166995199, + 3.4079725420015166, + 3.408576958994672, + 3.409270500000275, + 3.4099206249957206, + 3.41054395899846, + 3.4112137089978205, + 3.411928749999788, + 3.4126195419958094, + 3.4134592920017894, + 3.414146458999312, + 3.4148024169990094, + 3.415473333996488, + 3.416105708995019, + 3.416734541999176, + 3.417412874994625, + 3.418056958995294, + 3.418679666996468, + 3.4193407089987886, + 3.4200043339951662, + 3.4206351670000004, + 3.4212619999962044, + 3.4219241669998155, + 3.4225857499986887, + 3.4232239589982782, + 3.4238701249996666, + 3.424489791999804, + 3.4251300420000916, + 3.4257457919957233, + 3.4264114589968813, + 3.4270170839954517, + 3.427683083995362, + 3.4282834170007845, + 3.4288880839958438, + 3.4295159589964896, + 3.4301805419963785, + 3.4309999589968356, + 3.4316750840007444, + 3.4323575000016717, + 3.4330132089962717, + 3.4336978339997586, + 3.4343175839967444, + 3.434924166998826, + 3.4355808749969583, + 3.436199874995509, + 3.436837959001423, + 3.43745316699642, + 3.438069291994907, + 3.4386738339962903, + 3.439273708994733, + 3.439879249999649, + 3.44048233400099, + 3.4410764169952017, + 3.4416935839981306, + 3.442326708995097, + 3.442971166994539, + 3.44361362500058, + 3.444210124995152, + 3.4448706670009415, + 3.445488124998519, + 3.4460844169952907, + 3.446721125001204, + 3.4473894170005224, + 3.448063124997134, + 3.448707999996259, + 3.449337874997582, + 3.449958583994885, + 3.4506303339949227, + 3.451299749998725, + 3.452016958995955, + 3.452711708996503, + 3.4534405000013066, + 3.4541183339970303, + 3.4547372089946293, + 3.4553353340015747, + 3.4559217919959337, + 3.4565253749969997, + 3.457180334000441, + 3.457806124999479, + 3.458487833995605, + 3.4591041669991682, + 3.4597715419949964, + 3.460478000000876, + 3.461153167001612, + 3.4617918340009055, + 3.4624021669951617, + 3.4631165839964524, + 3.4637339170003543, + 3.4643543749989476, + 3.4650108749992796, + 3.46566266699665, + 3.4663013749959646, + 3.466940041995258, + 3.4676045839951257, + 3.468227334000403, + 3.4688772090012208, + 3.4695341249971534, + 3.470236916997237, + 3.4708920839984785, + 3.47163599999476, + 3.4723017500000424, + 3.4729155419991002, + 3.473530416995345, + 3.474177749994851, + 3.474828209000407, + 3.475463791997754, + 3.476055916995392, + 3.476818541996181, + 3.477461583999684, + 3.4781332919956185, + 3.478756249998696, + 3.479351041998598, + 3.479977124996367, + 3.480630541998835, + 3.4812851669994416, + 3.481976416995167, + 3.4826257089953288, + 3.4832756249961676, + 3.4839362089987844, + 3.484688999997161, + 3.4853234170004725, + 3.4860551249948912, + 3.486718791995372, + 3.4873681249955553, + 3.4880050419960753, + 3.4886401670009946, + 3.489279000001261, + 3.4901076249952894, + 3.490818375001254, + 3.4914757500009728, + 3.492121124996629, + 3.4927845839993097, + 3.4934117090015206, + 3.494044541999756, + 3.4946675839964882, + 3.4952719590000925, + 3.4958867499954067, + 3.4965122919966234, + 3.4971759589971043, + 3.497805209000944, + 3.4984264169979724, + 3.499114334001206, + 3.499759999998787, + 3.500374750001356, + 3.5010088749986608, + 3.5016061249989434, + 3.502222499999334, + 3.502855291997548, + 3.503582749995985, + 3.504217374997097, + 3.504875999999058, + 3.505487499998708, + 3.506228291997104, + 3.5068723750009667, + 3.5075207089976175, + 3.5081792089986266, + 3.5088741250001476, + 3.509629667001718, + 3.5103787499974715, + 3.511021416998119, + 3.511659083997074, + 3.5122948749994976, + 3.512920249995659, + 3.5135892089965637, + 3.5142232500002137, + 3.514834374997008, + 3.5155035839998163, + 3.5161559589978424, + 3.516809959000966, + 3.5174497089974466, + 3.5181024170015007, + 3.518726834001427, + 3.519344624997757, + 3.520002999997814, + 3.52066087500134, + 3.521281417000864, + 3.5219090839964338, + 3.522540666999703, + 3.5231666670006234, + 3.5237950000009732, + 3.5244231249962468, + 3.5250925419968553, + 3.5258293340011733, + 3.526504124994972, + 3.5271437089977553, + 3.5277922919995035, + 3.5284862920016167, + 3.5292219999973895, + 3.529953958997794, + 3.530712166997546, + 3.531400667001435, + 3.5320532089972403, + 3.5327256249947823, + 3.5333757089974824, + 3.5339961669960758, + 3.5346477499988396, + 3.535320666996995, + 3.5359379169967724, + 3.5365502089989604, + 3.537176999998337, + 3.5378104170013103, + 3.5384308339998825, + 3.539070916995115, + 3.539687917000265, + 3.5403492089972133, + 3.5411611249946873, + 3.541832292001345, + 3.5424574999997276, + 3.543096583998704, + 3.5437209169976995, + 3.5443177089982782, + 3.5449250419987948, + 3.5455860840011155, + 3.5461448339992785, + 3.5467733339974075, + 3.5474626249997527, + 3.5481374169976334, + 3.5488220839979476, + 3.549560333995032, + 3.550244541998836, + 3.550873499996669, + 3.5514630839970778, + 3.5521528749959543, + 3.5528410420010914, + 3.553455124994798, + 3.554087459000584, + 3.554759958999057, + 3.5553819589986233, + 3.555996666997089, + 3.5566191670004628, + 3.557271249999758, + 3.557880208994902, + 3.558517291996395, + 3.5592073750012787, + 3.5598481249980978, + 3.5604525839953567, + 3.5610919589962577, + 3.5617336249997607, + 3.5623607089946745, + 3.562998624998727, + 3.5636486669973237, + 3.5644134169997415, + 3.5650327920011478, + 3.56572341699939, + 3.566324583996902, + 3.5670259170001373, + 3.5677232919988455, + 3.568391916996916, + 3.569053166997037, + 3.5697057919969666, + 3.5703446670013363, + 3.5710591669994756, + 3.5717240839949227, + 3.57235404200037, + 3.5729930000015884, + 3.573597124996013, + 3.5741951249947306, + 3.5748190000012983, + 3.575457374994585, + 3.5761510000011185, + 3.5768859589952626, + 3.577525833999971, + 3.5781873339947197, + 3.5787964170012856, + 3.5793987500001094, + 3.5799790839955676, + 3.580663666994951, + 3.581327291998605, + 3.5819649170007324, + 3.58260208399588, + 3.5832276250002906, + 3.5838596670000697, + 3.5844815419986844, + 3.585118249997322, + 3.585748708996107, + 3.5864266249991488, + 3.587070749999839, + 3.5877054999946267, + 3.588360499998089, + 3.5890516669969657, + 3.589760874994681, + 3.5904516669979785, + 3.591192209001747, + 3.5918755419988884, + 3.592506708999281, + 3.59312625000166, + 3.5937599589960882, + 3.5943669170010253, + 3.5950203749962384, + 3.595619125000667, + 3.5962496669963, + 3.5969199999963166, + 3.5975484590017004, + 3.5981711669955985, + 3.598779291998653, + 3.599395375000313, + 3.600010875001317, + 3.6006698749988573, + 3.6012967499991646, + 3.6019535000014002, + 3.6025621250009863, + 3.603216124996834, + 3.603826416998345, + 3.6044695419986965, + 3.605097667001246, + 3.6057295840000734, + 3.606383583995921, + 3.607026334000693, + 3.6077824999956647, + 3.608474499997101, + 3.6091415420014528, + 3.609756166995794, + 3.610389124994981, + 3.6110920419960166, + 3.61176025000168, + 3.6124319169975934, + 3.613093249994563, + 3.6137369589996524, + 3.6143877919967053, + 3.615010916997562, + 3.615667874997598, + 3.6163025839996408, + 3.616925041998911, + 3.617577874996641, + 3.6182120419980492, + 3.618814041998121, + 3.6193892090013833, + 3.6199967499997, + 3.6206199590014876, + 3.6212712089982233, + 3.6219373749991064, + 3.622546541999327, + 3.623172583997075, + 3.623769459001778, + 3.6244097919989144, + 3.6250638749988866, + 3.625722999997379, + 3.626330250001047, + 3.6269446250007604, + 3.62753816699842, + 3.628251083995565, + 3.628929792001145, + 3.629745083999296, + 3.630404916999396, + 3.631051333999494, + 3.6316563750006026, + 3.632321375000174, + 3.6329532919990015, + 3.6336053339982755, + 3.634247709000192, + 3.634914124995703, + 3.6355353749968344, + 3.636179542001628, + 3.6368073749981704, + 3.637442874998669, + 3.638095958995109, + 3.6387164170009783, + 3.6393337920017075, + 3.6399934590008343, + 3.6406080839951755, + 3.641362208996725, + 3.641978250001557, + 3.642591291994904, + 3.643223125000077, + 3.6438324999980978, + 3.6444754999974975, + 3.645103458999074, + 3.645702292000351, + 3.646313042001566, + 3.646957500001008, + 3.647881042001245, + 3.648591999997734, + 3.649245708998933, + 3.6498996669979533, + 3.650578000000678, + 3.6512574590014992, + 3.651923583995085, + 3.6525472089997493, + 3.653169124998385, + 3.653807374997996, + 3.654444624997268, + 3.6550774999996065, + 3.6556923749958514, + 3.656321083995863, + 3.656954833997588, + 3.657573541997408, + 3.658164583997859, + 3.6587854999961564, + 3.6594184169953223, + 3.6600916249954025, + 3.660726458998397, + 3.661337958998047, + 3.661952875001589, + 3.6625959999946645, + 3.663248416996794, + 3.6640092089946847, + 3.6646822499969858, + 3.665304333997483, + 3.665968333996716, + 3.6666019999975106, + 3.667264958996384, + 3.667972833995009, + 3.668610249995254, + 3.669297624997853, + 3.669996666998486, + 3.670667250000406, + 3.671296959000756, + 3.6719734169964795, + 3.6725837499980116, + 3.6732067089978955, + 3.673850749997655, + 3.6745059169988963, + 3.675165874999948, + 3.6757988749959623, + 3.6765534590012976, + 3.6772080839946284, + 3.677858541996102, + 3.6785195420015953, + 3.6791424170005484, + 3.679784749998362, + 3.680519249995996, + 3.6811253749983734, + 3.6817948339958093, + 3.6824470840001595, + 3.683184875000734, + 3.683804666994547, + 3.6844979589950526, + 3.685122833994683, + 3.685754583995731, + 3.6864134999996168, + 3.6871154170003138, + 3.687785875001282, + 3.688431834001676, + 3.6890852919968893, + 3.6897372089952114, + 3.690381583997805, + 3.6910284999976284, + 3.6916653340013, + 3.6923001670002122, + 3.692987999995239, + 3.693615083997429, + 3.694283666998672, + 3.694920624999213, + 3.69555233400024, + 3.696184666994668, + 3.696811458998127, + 3.6974987919966225, + 3.698148167000909, + 3.698806208994938, + 3.6994543749970035, + 3.7001544999948237, + 3.7007682920011575, + 3.7013845420005964, + 3.7020582089971867, + 3.702770291994966, + 3.703414833995339, + 3.70407104199694, + 3.704669541999465, + 3.7053329999980633, + 3.7059487090009497, + 3.706738166998548, + 3.7074075839991565, + 3.70819237500109, + 3.7088691249955446, + 3.709527084000001, + 3.7101568750003935, + 3.7107735839963425, + 3.7114759999967646, + 3.7121389169988106, + 3.7127570419979747, + 3.713376749998133, + 3.7140029590009362, + 3.714640792000864, + 3.7152825419980218, + 3.7159317920013564, + 3.7165744169979007, + 3.717225624997809, + 3.717865749997145, + 3.7185056669986807, + 3.7191217919971677, + 3.7197601669977303, + 3.7203932919946965, + 3.721022958998219, + 3.7216671249989304, + 3.722409541995148, + 3.723052124994865, + 3.723901042001671, + 3.72466274999897, + 3.725324416998774, + 3.7260731249989476, + 3.7267879999999423, + 3.727483416994801, + 3.7281553339998936, + 3.7288213339998038, + 3.729440541996155, + 3.7300954169986653, + 3.7307652089948533, + 3.7313979169994127, + 3.732048208999913, + 3.732652250000683, + 3.733329834001779, + 3.7339773339990643, + 3.7345956249992014, + 3.735410374996718, + 3.736237416997028, + 3.7368754589988384, + 3.737529749996611, + 3.7381740839991835, + 3.7387930839977344, + 3.7394254589962657, + 3.740099458998884, + 3.7407336670003133, + 3.741336749997572, + 3.74199737500021, + 3.742670374995214, + 3.7432936249970226, + 3.7439646249986254, + 3.744607166998321, + 3.7452958750000107, + 3.745957291997911, + 3.746651708999707, + 3.747348624994629, + 3.747996833997604, + 3.7486100419992, + 3.749285958998371, + 3.7499231249967124, + 3.750573124998482, + 3.7512224999954924, + 3.7518560419994174, + 3.7525152919988614, + 3.753145249997033, + 3.7537862089957343, + 3.754441583994776, + 3.755081584000436, + 3.7558432090008864, + 3.7565281669958495, + 3.7572106669977074, + 3.757860666999477, + 3.758514083994669, + 3.759166458999971, + 3.759799708997889, + 3.7604105419959524, + 3.7610135419963626, + 3.761642999998003, + 3.762288375000935, + 3.7629271670011804, + 3.7635706669971114, + 3.7642421669952455, + 3.7649441249959636, + 3.765664749997086, + 3.7663847919975524, + 3.7670827499969164, + 3.767756166998879, + 3.7684154999951716, + 3.769086291998974, + 3.7697337089994107, + 3.7703692089999095, + 3.7710039999947185, + 3.7716777499954333, + 3.772329499995976, + 3.772945584001718, + 3.7735845419956604, + 3.7742618749980466, + 3.7749142089960515, + 3.7755902919961954, + 3.7762575000015204, + 3.776904458994977, + 3.777524874996743, + 3.7782166249962756, + 3.77887962499517, + 3.7795290840003872, + 3.780328291999467, + 3.7810148339995067, + 3.781696334001026, + 3.782347749998735, + 3.7830066249953234, + 3.7836824170008185, + 3.7844082500014338, + 3.7851716250006575, + 3.785865208999894, + 3.7865040420001606, + 3.787130291995709, + 3.787763000000268, + 3.788420208999014, + 3.7890486249962123, + 3.789677417000348, + 3.790279708999151, + 3.7909158339971327, + 3.7915695420015254, + 3.7922157919965684, + 3.7928644999992684, + 3.7934914590005064, + 3.7941219999993336, + 3.794753750000382, + 3.7953707089982345, + 3.7959894169980544, + 3.796635291997518, + 3.7972609999997076, + 3.7979101669989177, + 3.798604958996293, + 3.7992517499951646, + 3.799944999998843, + 3.8005994589984766, + 3.8012155839969637, + 3.8017998750001425, + 3.8024262089966214, + 3.8031238339972333, + 3.803785791998962, + 3.804516666998097, + 3.8051926249972894, + 3.8058411669990164, + 3.806485499997507, + 3.807160541997291, + 3.807856333995005, + 3.8085329169989564, + 3.8091888749986538, + 3.809813916996063, + 3.8104331669965177, + 3.8110345839959336, + 3.8117751669997233, + 3.8124450420000358, + 3.8131102089973865, + 3.8137124169952585, + 3.8143583339988254, + 3.8150013749982463, + 3.8155915419993107, + 3.8162156249964028, + 3.816867583998828, + 3.8174995000008494, + 3.8181168750015786, + 3.8187612920009997, + 3.8194007919955766, + 3.8200615839959937, + 3.8207010420010192, + 3.821344958996633, + 3.8219869999957155, + 3.822664541999984, + 3.8233079169949633, + 3.82399712500046, + 3.8246281249957974, + 3.82525058399915, + 3.8259094589957385, + 3.826561124995351, + 3.8271675419964595, + 3.827820166996389, + 3.82847879199835, + 3.829075292000198, + 3.829659041999548, + 3.8303353340015747, + 3.831011750000471, + 3.8316369589956594, + 3.832276916997216, + 3.8329051670007175, + 3.8335778339969693, + 3.834230916996603, + 3.834826250000333, + 3.83543758399901, + 3.8360730839995085, + 3.8366933340003015, + 3.8373464589967625, + 3.837985166996077, + 3.838608624995686, + 3.8392472919949796, + 3.839872958997148, + 3.840524084000208, + 3.841155791997153, + 3.841803167000762, + 3.8425068340002326, + 3.84324524999829, + 3.8439837920013815, + 3.844635583998752, + 3.845266708995041, + 3.8459124169967254, + 3.846573416994943, + 3.847240791998047, + 3.847868083998037, + 3.848533791999216, + 3.8491899169966928, + 3.8497979169987957, + 3.850415000000794, + 3.8510596249980154, + 3.8516746669993154, + 3.8524171249955543, + 3.853050459001679, + 3.8536918749960023, + 3.8543173750003916, + 3.854947791995073, + 3.8555946669948753, + 3.8562244589993497, + 3.8568677919975016, + 3.857530916997348, + 3.8581661249991157, + 3.8588126670001657, + 3.85942987499584, + 3.8602174170009675, + 3.86085487499804, + 3.861496249999618, + 3.8622915000014473, + 3.8629612090007868, + 3.8636635840011877, + 3.864442499994766, + 3.865167083997221, + 3.865780291998817, + 3.866436584001349, + 3.8670751669997117, + 3.8677435839999816, + 3.868382249995193, + 3.8690363749992684, + 3.8696471669973107, + 3.8702564999985043, + 3.870873916996061, + 3.8714887089954573, + 3.8721114590007346, + 3.8727232499950333, + 3.8733520839959965, + 3.8740243749998626, + 3.874700208994909, + 3.875363084000128, + 3.876031125000736, + 3.876685916999122, + 3.877305041998625, + 3.8779622919973917, + 3.8785808339962387, + 3.87921058399661, + 3.87985229199694, + 3.880482959000801, + 3.881266083997616, + 3.8819435839977814, + 3.8826037920007366, + 3.8832252499996684, + 3.883886999996321, + 3.8845102089981083, + 3.8851774590002606, + 3.885858374997042, + 3.8864778749994002, + 3.8871651250010473, + 3.8877929169975687, + 3.888439666996419, + 3.8890797499989276, + 3.8897066669960623, + 3.8903165419978905, + 3.8909776250002324, + 3.8916199169980246, + 3.8923525419959333, + 3.893030084000202, + 3.893674374994589, + 3.894353791998583, + 3.89499487500143, + 3.8956393749976996, + 3.896238417000859, + 3.896875291997276, + 3.897507666995807, + 3.898184041994682, + 3.898844499999541, + 3.8994981669966364, + 3.900116541997704, + 3.900773624998692, + 3.901455541999894, + 3.902206416998524, + 3.902865042000485, + 3.9035272920009447, + 3.904169916997489, + 3.904900749999797, + 3.905507999996189, + 3.9061276669963263, + 3.906818833995203, + 3.9074368750007125, + 3.9080695000011474, + 3.9086974169986206, + 3.9093516249995446, + 3.9100087499973597, + 3.9106417919974774, + 3.9112647919973824, + 3.911916500001098, + 3.912536584000918, + 3.913218166999286, + 3.9138976670001284, + 3.9145209999987856, + 3.9151402919960674, + 3.915755417001492, + 3.916382541996427, + 3.917024208996736, + 3.917641749998438, + 3.9182903749970137, + 3.918905583996093, + 3.9195236250016023, + 3.920247834001202, + 3.920897584001068, + 3.9215485419990728, + 3.922188124997774, + 3.922819499995967, + 3.923455374999321, + 3.924095666996436, + 3.924844499997562, + 3.9255317089991877, + 3.9261936670009163, + 3.9268341249990044, + 3.9274277919976157, + 3.9280782919959165, + 3.9286936249991413, + 3.9293898749965592, + 3.930083791994548, + 3.9307497499976307, + 3.931390999998257, + 3.9320294999997714, + 3.9326890839947737, + 3.9333189589960966, + 3.9339402920013526, + 3.9345816249988275, + 3.9352222089946736, + 3.935844499996165, + 3.936461124998459, + 3.9370783749982365, + 3.9376957499989658, + 3.9383345839960384, + 3.9389585419994546, + 3.939581458995235, + 3.9401915419948637, + 3.940802958997665, + 3.941449041994929, + 3.9420662919947063, + 3.9429114169979584, + 3.943579583996325, + 3.944301584000641, + 3.9449430419990676, + 3.945560291998845, + 3.946213709001313, + 3.946822624995548, + 3.9474801249962184, + 3.9481160419964, + 3.948752333999437, + 3.9494106249985634, + 3.9500549169970327, + 3.950716499995906, + 3.9513415420005913, + 3.9519881250016624, + 3.9526290419962606, + 3.953249375001178, + 3.9539246249987627, + 3.954578541997762, + 3.9551933339971583, + 3.955838458998187, + 3.956478291998792, + 3.9572271249999176, + 3.95784512499813, + 3.9585110420011915, + 3.9591762089985423, + 3.9598588750013732, + 3.9605102499990608, + 3.9611440419976134, + 3.961801833997015, + 3.962439208997239, + 3.963151874995674, + 3.9638298339996254, + 3.9644886669993866, + 3.9651307499952964, + 3.965754917000595, + 3.966404999999213, + 3.9670438339962857, + 3.9676724589953665, + 3.9682764589961153, + 3.968914083998243, + 3.9696107499985374, + 3.970248666999396, + 3.9708552500014775, + 3.9714945839950815, + 3.9721456249972107, + 3.9727821669948753, + 3.9734388340002624, + 3.974084292000043, + 3.9747310419988935, + 3.9753484169996227, + 3.976014166997629, + 3.976636084000347, + 3.977288709000277, + 3.977930875000311, + 3.9785322499956237, + 3.9791647089950857, + 3.979795084000216, + 3.980439541999658, + 3.9811451669957023, + 3.981815999999526, + 3.982478624995565, + 3.9831466249961522, + 3.983781666996947, + 3.9844073339991155, + 3.9850541669948143, + 3.9856489169978886, + 3.9862735419956152, + 3.9868973749980796, + 3.9876799170015147, + 3.9883542919997126, + 3.9889875419976306, + 3.98968520899507, + 3.9904248339953483, + 3.9911050419977983, + 3.9917882090012426, + 3.992465249997622, + 3.993155874995864, + 3.9938484169979347, + 3.994559291997575, + 3.9952280840007006, + 3.9959077919993433, + 3.996563041997433, + 3.9972369169990998, + 3.998005541994644, + 3.9986704170005396, + 3.999284459001501, + 3.9999777089979034, + 4.000729958999727, + 4.001464666995162, + 4.002223584000603, + 4.002867249997507, + 4.003481667001324, + 4.004126041996642, + 4.0047309169967775, + 4.005364416996599, + 4.0060546249951585, + 4.006642458996794, + 4.007208124996396, + 4.007808666996425, + 4.00840108400007, + 4.008994499999972, + 4.009617833995435, + 4.010145583997655, + 4.010652375000063, + 4.011290292000922, + 4.011856958997669, + 4.012382666995109, + 4.012892334001663, + 4.0134201670007315, + 4.01395395900181, + 4.014472709000984, + 4.015009666996775, + 4.015528584001004, + 4.0160102919981, + 4.016578208997089, + 4.019120666998788, + 4.0200388340017525, + 4.0207057500010706, + 4.02139399999578, + 4.0221842089958955, + 4.0227269169990905, + 4.0232345839976915, + 4.023731666995445, + 4.02430212499894, + 4.024976208995213, + 4.025498333998257, + 4.026076417001605, + 4.026654333996703, + 4.027223541997955, + 4.027803166995, + 4.02831979199982, + 4.028872083996248, + 4.029430499998853, + 4.0300764169951435, + 4.030913124996005, + 4.031531791995803, + 4.03216304200032, + 4.032696249996661, + 4.03323987499607, + 4.0337731249965145, + 4.034496208994824, + 4.0350403749980615, + 4.035586124999099, + 4.036127916995611, + 4.036729209001351, + 4.0373154589979094, + 4.037868333994993, + 4.038415167000494, + 4.0389571669948054, + 4.039680124995357, + 4.04032775000087, + 4.0409565000009025, + 4.041588084000978, + 4.0421920840017265, + 4.042766749997099, + 4.043325499995262, + 4.04389179199643, + 4.04441954199865, + 4.0449181250005495, + 4.0454750419958145, + 4.046030666999286, + 4.046589666999353, + 4.047269208997022, + 4.0478416249970905, + 4.048405166999146, + 4.048941083994578, + 4.049468749995867, + 4.0500022919950425, + 4.050517042000138, + 4.051036083998042, + 4.051567416994658, + 4.0520972090016585, + 4.052639541994722, + 4.053169334001723, + 4.053737374997581, + 4.0542628339972, + 4.054904249998799, + 4.055471708998084, + 4.056035959001747, + 4.05652425000153, + 4.057073833995673, + 4.057614666999143, + 4.058136374995229, + 4.058675708998635, + 4.059352541997214, + 4.059901874999923, + 4.060540291997313, + 4.0610986669998965, + 4.061652500000491, + 4.062223333996371, + 4.0627662089973455, + 4.063313416998426, + 4.063851166996756, + 4.064403124997625, + 4.064946209000482, + 4.06552170899522, + 4.066011333998176, + 4.066564374996233, + 4.067080959001032, + 4.067627416996402, + 4.068149250000715, + 4.06870354199782, + 4.069234499998856, + 4.06982679200155, + 4.070519875000173, + 4.071080208996136, + 4.071563291996426, + 4.072132875000534, + 4.072680249999394, + 4.073195416996896, + 4.07370070899924, + 4.074244584000553, + 4.0747824589998345, + 4.0753409169992665, + 4.075849458997254, + 4.076418708995334, + 4.076992624999548, + 4.077537708995806, + 4.078161583995097, + 4.078837333996489, + 4.079464958995231, + 4.080107041998417, + 4.08073429200158, + 4.081314750001184, + 4.081842833998962, + 4.082391333999112, + 4.082979999999225, + 4.083546458998171, + 4.084110124997096, + 4.084716874996957, + 4.085307499997725, + 4.085852917000011, + 4.086445125001774, + 4.0870387089962605, + 4.087589083996136, + 4.088104333997762, + 4.0886778339991, + 4.089262000001327, + 4.089829708995239, + 4.090387791999092, + 4.09092654199776, + 4.091481416995521, + 4.092024375000619, + 4.092593000001216, + 4.0931888749983045, + 4.093781833995308, + 4.094346083998971, + 4.094922208998469, + 4.095490542000334, + 4.096047792001627, + 4.09660804199666, + 4.0971676249973825, + 4.0979109999971115, + 4.09850537499733, + 4.099172499998531, + 4.099769374995958, + 4.100322334001248, + 4.100943583995104, + 4.101468666995061, + 4.102033292001579, + 4.1026754999984405, + 4.10323733399855, + 4.103776374999143, + 4.1043184169975575, + 4.104906499997014, + 4.105492583999876, + 4.1060312499976135, + 4.106611208997492, + 4.10717641699739, + 4.107748999995238, + 4.108291083997756, + 4.108868999996048, + 4.109427958996093, + 4.109974209000939, + 4.110527666998678, + 4.111071166997135, + 4.111606749997009, + 4.11218929199822, + 4.112814208994678, + 4.113450958997419, + 4.114077583995822, + 4.1146758339964435, + 4.115202000000863, + 4.115747124997142, + 4.116257041998324, + 4.116885584000556, + 4.117530083996826, + 4.1181120420005755, + 4.118731791997561, + 4.119275791999826, + 4.119887959001062, + 4.12044616699859, + 4.121040666999761, + 4.121570625000459, + 4.122147124995536, + 4.12264783399587, + 4.123205416995916, + 4.123748041994986, + 4.124322374998883, + 4.124925584001176, + 4.125637459001155, + 4.126252916998055, + 4.126819583994802, + 4.12740012499853, + 4.127978666998388, + 4.128522749997501, + 4.129094083997188, + 4.129638083999453, + 4.130193791999773, + 4.1307742499993765, + 4.131321542001388, + 4.1318253749996074, + 4.132344459001615, + 4.1329255839955295, + 4.133452709000267, + 4.133999291996588, + 4.134546583998599, + 4.135064666996186, + 4.135616667001159, + 4.136210666998522, + 4.136786709001171, + 4.137382166998577, + 4.138031709000643, + 4.138596791999589, + 4.139190249996318, + 4.139730791997863, + 4.140263291999872, + 4.140865000001213, + 4.14142183399963, + 4.141986124996038, + 4.1425278339957, + 4.143081083995639, + 4.143655749998288, + 4.144202499999665, + 4.1447641249978915, + 4.145332333995611, + 4.1458961669995915, + 4.146465792000527, + 4.146993750000547, + 4.147549583998625, + 4.148562958995171, + 4.149109499994665, + 4.149767791997874, + 4.150346166999952, + 4.1509058750016266, + 4.151429541998368, + 4.151983958996425, + 4.152535333996639, + 4.153125833996455, + 4.153703083997243, + 4.154238041999633, + 4.154772709000099, + 4.155348708998645, + 4.155978750000941, + 4.156624249997549, + 4.157220542001596, + 4.157794833998196, + 4.158369833996403, + 4.158914458996151, + 4.159530208999058, + 4.16009016699536, + 4.160675833998539, + 4.1612192089960445, + 4.161759416994755, + 4.162344459000451, + 4.16287949999969, + 4.163432333996752, + 4.164070541999536, + 4.164643874995818, + 4.165147667001293, + 4.165688208995562, + 4.166237124998588, + 4.166820124999504, + 4.167345834001026, + 4.167921667001792, + 4.168476749997353, + 4.169011166995915, + 4.169562750001205, + 4.170144458999857, + 4.17067537499679, + 4.1712145839992445, + 4.171765958999458, + 4.172311333997641, + 4.172916541996528, + 4.1734737919978215, + 4.174055666997447, + 4.174616124997556, + 4.175325958996837, + 4.176058749995718, + 4.17674195899599, + 4.177386249997653, + 4.177974291997089, + 4.1785625420016, + 4.179077583998151, + 4.179619875001663, + 4.180152749999252, + 4.180765375000192, + 4.1813515839967295, + 4.181914458997198, + 4.1824486249970505, + 4.182993458998681, + 4.183570374996634, + 4.18408429199917, + 4.184625834001054, + 4.185196334001375, + 4.185699916997692, + 4.186270416998013, + 4.186814249995223, + 4.187325999999302, + 4.18788024999958, + 4.188409834001504, + 4.188999083999079, + 4.189529333998507, + 4.190047958996729, + 4.190579709000303, + 4.191146708995802, + 4.191738458997861, + 4.19229779199668, + 4.192806416998792, + 4.1934742500016, + 4.194037583998579, + 4.194585541998094, + 4.195250917000521, + 4.195931166999799, + 4.196525499995914, + 4.197139167001296, + 4.197712708999461, + 4.198276374998386, + 4.198831666995829, + 4.199365166998177, + 4.199903084001562, + 4.2004742919962155, + 4.201028291994589, + 4.201531583996257, + 4.202050374995451, + 4.2025744169950485, + 4.203133916998922, + 4.20369208399643, + 4.204257208999479, + 4.204815042001428, + 4.205371291995107, + 4.205926208996971, + 4.206466333998833, + 4.2070103750011185, + 4.207547166995937, + 4.208105666999472, + 4.208767374999297, + 4.209339083994564, + 4.209973291995993, + 4.210521249995509, + 4.2110694169969065, + 4.211635583997122, + 4.212188583995157, + 4.21275041699846, + 4.213267624996661, + 4.213829833999625, + 4.214413666995824, + 4.214989374995639, + 4.2156529589992715, + 4.216308416995162, + 4.216832624995732, + 4.217364208998333, + 4.217917000001762, + 4.218458666997321, + 4.219015458998911, + 4.219551333997515, + 4.220094541997241, + 4.2206686249992345, + 4.22121683399746, + 4.221763791996636, + 4.222369124996476, + 4.222887459000049, + 4.223432209000748, + 4.223947250000492, + 4.224531250001746, + 4.225100916999509, + 4.225697124995349, + 4.2262701250001555, + 4.226813291999861, + 4.227316416996473, + 4.227869624999585, + 4.228390749995015, + 4.22891820899531, + 4.229435499997635, + 4.230030209000688, + 4.230538999996497, + 4.23110016699502, + 4.231655124996905, + 4.232199458994728, + 4.232775500000571, + 4.23332941699482, + 4.233981999997923, + 4.2345194590016035, + 4.235093625000445, + 4.235702874997514, + 4.236245041996881, + 4.236833499999193, + 4.237431333996938, + 4.237943916996301, + 4.238517291996686, + 4.239087541995104, + 4.239669624999806, + 4.240222166998137, + 4.240766958995664, + 4.2413028750015656, + 4.241861958995287, + 4.242417959001614, + 4.242996542001492, + 4.243562042000121, + 4.24411304199748, + 4.2446783339983085, + 4.245200291996298, + 4.245750458998373, + 4.246654124995985, + 4.247392208999372, + 4.247918959001254, + 4.248476417000347, + 4.249023999997007, + 4.249561416996585, + 4.250146416998177, + 4.250733499997295, + 4.251258584001334, + 4.251745292000123, + 4.2522734999947716, + 4.252814125000441, + 4.253367124998476, + 4.253921499999706, + 4.254464583995286, + 4.255078834001324, + 4.25560429199686, + 4.256284083996434, + 4.256854209001176, + 4.257439249995514, + 4.258048083996982, + 4.2586114590012585, + 4.259254874996259, + 4.259837459001574, + 4.260440291996929, + 4.261057833995437, + 4.261625166996964, + 4.262212208996061, + 4.26279079199594, + 4.26340537500073, + 4.263957292001578, + 4.264516999995976, + 4.265016042001662, + 4.265562333996058, + 4.266115458995046, + 4.2666436250001425, + 4.267163541997434, + 4.26768841699959, + 4.268198041994765, + 4.2686952500007465, + 4.269242791997385, + 4.269776542001637, + 4.270308583996666, + 4.270839917000558, + 4.2714117919967975, + 4.272108999997727, + 4.272664500000246, + 4.273227749996295, + 4.273779416995239, + 4.274280749996251, + 4.274836459000653, + 4.275330459000543, + 4.27601416700054, + 4.276559124999039, + 4.277139500001795, + 4.277723084000172, + 4.278298708995862, + 4.278901375000714, + 4.279467041997123, + 4.280038291995879, + 4.280575625001802, + 4.2811411669972586, + 4.281754916999489, + 4.282342541999242, + 4.282893584000703, + 4.283431458999985, + 4.283983624998655, + 4.284534916994744, + 4.285117166997225, + 4.285677749998285, + 4.286213833998772, + 4.286741666997841, + 4.287240874997224, + 4.287802833998285, + 4.288363333995221, + 4.288931958995818, + 4.289485959001468, + 4.290027916998952, + 4.2905757920016185, + 4.291108042001724, + 4.291683499999635, + 4.292291083998862, + 4.292900791995635, + 4.293433792001451, + 4.293989083998895, + 4.294583167000383, + 4.295225000001665, + 4.295767791998514, + 4.296335125000041, + 4.296879166999133, + 4.297449166995648, + 4.297963416996936, + 4.29854041699582, + 4.299082792000263, + 4.299658083997201, + 4.3001924169948325, + 4.300757375000103, + 4.301307000001543, + 4.301881583996874, + 4.302410249998502, + 4.302971416997025, + 4.303576708996843, + 4.304105374998471, + 4.304639000001771, + 4.305154791996756, + 4.305719167001371, + 4.3062705420015845, + 4.306847166997613, + 4.307383999999729, + 4.307906083995476, + 4.308442959001695, + 4.309012541998527, + 4.309551541999099, + 4.310089958999015, + 4.310598916999879, + 4.311133625000366, + 4.311702041995886, + 4.312235792000138, + 4.312785249996523, + 4.3133298749962705, + 4.3138610839960165, + 4.314478666994546, + 4.315057209001679, + 4.315665499998431, + 4.316227041999809, + 4.31675191699469, + 4.317280666997249, + 4.3178015839948785, + 4.31836441699852, + 4.31889974999649, + 4.31957433399657, + 4.320135166999535, + 4.32067983399611, + 4.321269624997512, + 4.321835709000879, + 4.322402291996696, + 4.3229469590005465, + 4.323482374995365, + 4.324021374995937, + 4.324570249998942, + 4.325146999995923, + 4.325673916995584, + 4.3262196669966215, + 4.32679541700054, + 4.327333624998573, + 4.3278752920014085, + 4.328438874996209, + 4.3289794999946025, + 4.32949708399974, + 4.330022292000649, + 4.330611541998223, + 4.331133916995896, + 4.331618749994959, + 4.332169916997373, + 4.332736666998244, + 4.333296208998945, + 4.334002750001673, + 4.334644333997858, + 4.335273500000767, + 4.335867041998426, + 4.336462541999936, + 4.337023084000975, + 4.337573083997995, + 4.338083666996681, + 4.338616417000594, + 4.339187999998103, + 4.3397882919962285, + 4.340335624998261, + 4.340904249998857, + 4.3415061669948045, + 4.342047583995736, + 4.342624541997793, + 4.343207958998391, + 4.343755499998224, + 4.344341291995079, + 4.34489841699542, + 4.345456833994831, + 4.345992916998512, + 4.346520499995677, + 4.347089458999108, + 4.347749874999863, + 4.348336833994836, + 4.34894487499696, + 4.34963741699903, + 4.35029349999968, + 4.3510027500014985, + 4.351640749999206, + 4.3522924999997485, + 4.352992458996596, + 4.353641958994558, + 4.354347291999147, + 4.354999625000346, + 4.355698916995607, + 4.3563022919988725, + 4.356937917000323, + 4.357592041997123, + 4.358208833997196, + 4.358806749994983, + 4.359437084000092, + 4.36004604199843, + 4.3606862089945935, + 4.361300333999679, + 4.361993958998937, + 4.362716416995681, + 4.363348334001785, + 4.363990124998963, + 4.364690124995832, + 4.365380625000398, + 4.366060624997772, + 4.366694374999497, + 4.367419709000387, + 4.368065167000168, + 4.368736500000523, + 4.369375666996348, + 4.370035749998351, + 4.37064366699633, + 4.371284499997273, + 4.371918208998977, + 4.372719416998734, + 4.373366791995068, + 4.374076708998473, + 4.374802792000992, + 4.375500333997479, + 4.3761327089960105, + 4.376772124996933, + 4.377389458997641, + 4.378010458996869, + 4.378640124996309, + 4.379266625001037, + 4.379965125001036, + 4.38057362499967, + 4.381218624999747, + 4.381879708998895, + 4.382515833996877, + 4.383175625000149, + 4.3838159590013674, + 4.384445167001104, + 4.38507920900156, + 4.385722333994636, + 4.386375624999346, + 4.3870048339958885, + 4.387625541996385, + 4.388286875000631, + 4.388909959001467, + 4.389555999994627, + 4.3901646669983165, + 4.39082166699518, + 4.391470916998514, + 4.392144749996078, + 4.392842749999545, + 4.393526041996665, + 4.394343416999618, + 4.394982208999863, + 4.395618583999749, + 4.3962709170009475, + 4.396868833995541, + 4.397512584000651, + 4.398169000000053, + 4.398761459000525, + 4.399351874999411, + 4.400021708999702, + 4.400682499996037, + 4.401343334000558, + 4.401994791995094, + 4.402636083999823, + 4.403232291995664, + 4.404046666997601, + 4.404714042000705, + 4.405378374998691, + 4.4060403749972465, + 4.406686583999544, + 4.407321291997505, + 4.407965458995022, + 4.408594833999814, + 4.409254833997693, + 4.409916708995297, + 4.410564999998314, + 4.411227958997188, + 4.411932249997335, + 4.4126047089957865, + 4.413299125000776, + 4.414696833999187, + 4.4153460419984185, + 4.415961708997202, + 4.41654158399615, + 4.417240499999025, + 4.417890625001746, + 4.418537874997128, + 4.4191941669996595, + 4.419836208995548, + 4.420507874994655, + 4.4211521670004, + 4.421828375001496, + 4.422496333994786, + 4.423167041997658, + 4.423785792001581, + 4.42447008399904, + 4.425140749997809, + 4.4257842090009945, + 4.426403124998615, + 4.427071583995712, + 4.427705624999362, + 4.428341667000495, + 4.429015666995838, + 4.429625416996714, + 4.430325166998955, + 4.431023459001153, + 4.431683916998736, + 4.432487083999149, + 4.433146791998297, + 4.433773625001777, + 4.434411333997559, + 4.435058416995162, + 4.435696499996993, + 4.436357334001514, + 4.436977249999472, + 4.437655958994583, + 4.43828124999709, + 4.438934833997337, + 4.439573208997899, + 4.440206374994887, + 4.440850416998728, + 4.441445042000851, + 4.44207029199606, + 4.44269645899476, + 4.443349458997545, + 4.44397683400166, + 4.444606708995707, + 4.445211708996794, + 4.445863249995455, + 4.446535666997079, + 4.447197749999759, + 4.44789049999963, + 4.448526583997591, + 4.449169791994791, + 4.449797374996706, + 4.450481667001441, + 4.451146749997861, + 4.4518100839995896, + 4.452586250001332, + 4.453250624996144, + 4.453944041997602, + 4.4545945419959025, + 4.455231833999278, + 4.455865416995948, + 4.456506541995623, + 4.457082583998272, + 4.457769374996133, + 4.4584412920012255, + 4.459093459001451, + 4.459719041995413, + 4.460370125001646, + 4.461023374999058, + 4.461635708998074, + 4.462261874999967, + 4.462900041995454, + 4.463524124999822, + 4.46419858399895, + 4.4648597089981195, + 4.465496416996757, + 4.466173458997218, + 4.466785541997524, + 4.467393333994551, + 4.468023166999046, + 4.468623249995289, + 4.469241124999826, + 4.469884458994784, + 4.470504791999701, + 4.471200499996485, + 4.471854584000539, + 4.472504958997888, + 4.473212666998734, + 4.473843250001664, + 4.474480208999012, + 4.475093291999656, + 4.475708250000025, + 4.476351375000377, + 4.476981583997258, + 4.4776395419976325, + 4.478291291998175, + 4.47891924999567, + 4.47956841699488, + 4.480220792000182, + 4.480892084000516, + 4.481527666997863, + 4.482251749999705, + 4.482918083995173, + 4.4835440419992665, + 4.484160374995554, + 4.484785791995819, + 4.48544291700091, + 4.486058292000962, + 4.486697499996808, + 4.48735733400099, + 4.48801258399908, + 4.48869345899584, + 4.489351208998414, + 4.4899849590001395, + 4.49070324999775, + 4.491409124995698, + 4.492077333998168, + 4.492741541995201, + 4.493400084000314, + 4.494070708999061, + 4.494730792001064, + 4.495364458998665, + 4.496064416998706, + 4.496731250001176, + 4.497331166996446, + 4.497964292000688, + 4.498591416995623, + 4.499253124995448, + 4.499897541994869, + 4.500542709000001, + 4.5011645420017885, + 4.501793541996449, + 4.502432041997963, + 4.503076959001191, + 4.503737125000043, + 4.5043367499965825, + 4.504967624998244, + 4.505710833997, + 4.506333958997857, + 4.50696291699569, + 4.507613666995894, + 4.508267708995845, + 4.509031083995069, + 4.50974420899729, + 4.510477333999006, + 4.511148917001265, + 4.5117526249960065, + 4.512390833995596, + 4.513052999995125, + 4.513762999995379, + 4.514436624995142, + 4.515065624997078, + 4.515707833998022, + 4.516425124995294, + 4.517053291994671, + 4.517706083999656, + 4.518359999994573, + 4.51901320899924, + 4.519650709000416, + 4.520284916994569, + 4.5209265839948785, + 4.521591749995423, + 4.522213958996872, + 4.522869874999742, + 4.523596708997502, + 4.52421966700058, + 4.524845916996128, + 4.525562208997144, + 4.526209291994746, + 4.526815541998076, + 4.527467749998323, + 4.5281139590006205, + 4.528922708996106, + 4.529612250000355, + 4.530347542000527, + 4.531010250000691, + 4.53161583399924, + 4.532287499998347, + 4.5329677920017275, + 4.5336489170003915, + 4.534306708999793, + 4.53492854200158, + 4.535543749996577, + 4.536200416994689, + 4.536830083998211, + 4.5375815840016, + 4.538213416999497, + 4.538859416999912, + 4.53945720900083, + 4.540074042000924, + 4.540718874995946, + 4.541369833998033, + 4.541999875000329, + 4.542660209001042, + 4.543304749997333, + 4.543958292000752, + 4.54459433399461, + 4.545253291995323, + 4.545872666996729, + 4.546477666997816, + 4.547099584000534, + 4.547872750001261, + 4.548585666998406, + 4.549292374998913, + 4.549931041998207, + 4.550584584001626, + 4.551232917001471, + 4.551884666994738, + 4.552489417001198, + 4.553127458995732, + 4.55381716699776, + 4.554497208999237, + 4.555122874997323, + 4.555754124994564, + 4.556381958995189, + 4.557047124995734, + 4.55769433399837, + 4.5583542919994215, + 4.558982834001654, + 4.559598084000754, + 4.560240792001423, + 4.560904209, + 4.561514834000263, + 4.562144999996235, + 4.562771833996521, + 4.563441541999055, + 4.5640454999957, + 4.564669999999751, + 4.565287291996356, + 4.565942708999501, + 4.5665953749994515, + 4.567416249999951, + 4.5680949589950615, + 4.568772667000303, + 4.569465125001443, + 4.570137916998647, + 4.5707925419992534, + 4.571430625001085, + 4.572033083997667, + 4.572621999999683, + 4.573267749998195, + 4.57391637499677, + 4.5746689590014284, + 4.575304250000045, + 4.575993209000444, + 4.57661558399559, + 4.577232124996954, + 4.5778650419961195, + 4.578481833996193, + 4.579111166996881, + 4.579718499997398, + 4.58040304199676, + 4.581039083997894, + 4.581659541996487, + 4.582294833999185, + 4.583023250001133, + 4.583657625000342, + 4.584502208999766, + 4.585121541997069, + 4.585911916998157, + 4.586543416997301, + 4.587151209001604, + 4.587764916999731, + 4.58837762499752, + 4.589045249995252, + 4.589760709000984, + 4.590437041995756, + 4.591151749998971, + 4.59181266700034, + 4.592481374995259, + 4.593117958997027, + 4.593777624999348, + 4.594444958995155, + 4.595078458994976, + 4.595709791996342, + 4.596325708997028, + 4.597025833994849, + 4.597652541997377, + 4.598284916995908, + 4.5989544589974685, + 4.599609666998731, + 4.600238041995908, + 4.600911333996919, + 4.601527874998283, + 4.602161958995566, + 4.602806999995664, + 4.603443084000901, + 4.604087333995267, + 4.604708458995447, + 4.605334333995415, + 4.605977708997671, + 4.6066262499953154, + 4.607247624997399, + 4.607849708998401, + 4.608462625001266, + 4.609125916998892, + 4.60974804199941, + 4.61043479199725, + 4.611101499998767, + 4.61174470900005, + 4.612367875000928, + 4.613121292000869, + 4.613826834000065, + 4.614487874998304, + 4.615127541997936, + 4.615782374996343, + 4.616415874996164, + 4.617043250000279, + 4.617688416998135, + 4.61832104199857, + 4.618941166998411, + 4.6195891669995035, + 4.620230499996978, + 4.620864459000586, + 4.621602792001795, + 4.622265708996565, + 4.622875791996194, + 4.623498749999271, + 4.624152249998588, + 4.624812249996467, + 4.6254670419948525, + 4.626104833994759, + 4.62671262499498, + 4.627274416998262, + 4.627960999998322, + 4.628620041999966, + 4.629343374996097, + 4.630039958996349, + 4.630689334000635, + 4.631313917001535, + 4.631946708999749, + 4.632582334001199, + 4.633211624997784, + 4.633861292000802, + 4.634466750001593, + 4.635118334001163, + 4.635708499998145, + 4.636367250001058, + 4.637003416995867, + 4.637607416996616, + 4.6382064999997965, + 4.638835583995387, + 4.6394590839991, + 4.640045084001031, + 4.640679124997405, + 4.64136408399645, + 4.642024458997184, + 4.642631874994549, + 4.643234791998111, + 4.643837249997887, + 4.644460750001599, + 4.64508020899666, + 4.645763666994753, + 4.646400666999398, + 4.64702108399797, + 4.647713209000358, + 4.64833579200058, + 4.649029583997617, + 4.649645042001794, + 4.650303875001555, + 4.650921874999767, + 4.651515874997131, + 4.652137624994793, + 4.652916084000026, + 4.65350179199595, + 4.654127249996236, + 4.654765458995826, + 4.655428708996624, + 4.656064624999999, + 4.656711083996925, + 4.657326249995094, + 4.657955666996713, + 4.658592250001675, + 4.6592151669974555, + 4.659846333997848, + 4.660517666998203, + 4.661129333995632, + 4.661778083995159, + 4.662391208999907, + 4.663027666996641, + 4.6637358340012725, + 4.664359583999612, + 4.665039209001407, + 4.665705416999117, + 4.666303666999738, + 4.667019542001071, + 4.6676702499971725, + 4.668357834001654, + 4.669042083995009, + 4.669755249997252, + 4.670382291995338, + 4.67102916699514, + 4.671679499995662, + 4.6723119169982965, + 4.672992874999181, + 4.673637166997651, + 4.674273249998805, + 4.674924999999348, + 4.675572959000419, + 4.676227208998171, + 4.676977541996166, + 4.677585583995096, + 4.6782344589955756, + 4.678838959000132, + 4.67943324999942, + 4.6800701249958365, + 4.680673874994682, + 4.681316458998481, + 4.681938166999316, + 4.6825607499995385, + 4.6832430840004236, + 4.684017250001489, + 4.68465595899761, + 4.685303541999019, + 4.685960458999034, + 4.686685542001214, + 4.687304499995662, + 4.688036958999874, + 4.688742958998773, + 4.689385416997538, + 4.6900312090001535, + 4.690677874998073, + 4.6913162089986145, + 4.691993458996876, + 4.692599499998323, + 4.6932081669947365, + 4.6938533339998685, + 4.6945249999989755, + 4.695196916996792, + 4.695819333996042, + 4.696462250001787, + 4.697112999994715, + 4.697804374998668, + 4.698487541994837, + 4.699101458994846, + 4.699768624996068, + 4.700443583999004, + 4.701059749997512, + 4.701723250000214, + 4.702392624996719, + 4.703069958995911, + 4.703674416996364, + 4.704311834000691, + 4.7049463340008515, + 4.705579041998135, + 4.7062324169964995, + 4.706903541999054, + 4.707558666996192, + 4.708302041995921, + 4.708964624995133, + 4.70960183400166, + 4.710310916998424, + 4.710958999996365, + 4.711624499999743, + 4.712261249995208, + 4.712916291995498, + 4.713606749995961, + 4.714242374997411, + 4.714883208995161, + 4.715515208998113, + 4.716191374995105, + 4.716855541999394, + 4.717507834000571, + 4.718168833998789, + 4.718777916998079, + 4.719422124995617, + 4.720042041997658, + 4.720660792001581, + 4.721414916995855, + 4.722039833999588, + 4.722682833998988, + 4.723301458994683, + 4.7239325839982484, + 4.724558541995066, + 4.7252518749955925, + 4.725926458995673, + 4.726612458995078, + 4.727307791996282, + 4.727999458998966, + 4.728627749995212, + 4.729275124998821, + 4.72990949999803, + 4.730546334001701, + 4.731298083999718, + 4.7319421249994775, + 4.732610209000995, + 4.733231792000879, + 4.733876291997149, + 4.734479958999145, + 4.735064542001055, + 4.735682166996412, + 4.73633316699852, + 4.7369665000005625, + 4.7376708750016405, + 4.738320749995182, + 4.738981791997503, + 4.739680583996233, + 4.740319416996499, + 4.740958416994545, + 4.741600749999634, + 4.742390374995011, + 4.743039834000228, + 4.743735666997964, + 4.74438158400153, + 4.7450339589995565, + 4.7456929170002695, + 4.746341416997893, + 4.7470643339984235, + 4.7477408749982715, + 4.748399708994839, + 4.7491095419973135, + 4.749749458998849, + 4.750382041995181, + 4.751037208996422, + 4.751670583995292, + 4.752321041996765, + 4.7529850419959985, + 4.7536066669999855, + 4.754218583999318, + 4.754881666995061, + 4.755479667001055, + 4.756136374999187, + 4.756754374997399, + 4.757351708998613, + 4.75799954199465, + 4.758699209000042, + 4.759360584001115, + 4.760006833996158, + 4.760610583995003, + 4.761231999997108, + 4.761825916997623, + 4.762429416994564, + 4.763059208999039, + 4.7637867500016, + 4.764436958997976, + 4.765142083997489, + 4.7658099999971455, + 4.766470709000714, + 4.767104958998971, + 4.767725459001667, + 4.768312916996365, + 4.768937417000416, + 4.769584666995797, + 4.770389166995301, + 4.771020791995397, + 4.771705708997615, + 4.772369166996214, + 4.773016874998575, + 4.773673458999838, + 4.774294458999066, + 4.774940625000454, + 4.775560709000274, + 4.776221499996609, + 4.776852083996346, + 4.777482958998007, + 4.778107375001127, + 4.778752166996128, + 4.779358667001361, + 4.779998999998497, + 4.780723208998097, + 4.7813603339964175, + 4.781988499998988, + 4.782629875000566, + 4.783255249996728, + 4.7842190000010305, + 4.784997999995539, + 4.785697416999028, + 4.786279291998653, + 4.786951417001546, + 4.787629749996995, + 4.7883124590007355, + 4.788928499998292, + 4.789549834000354, + 4.790185541998653, + 4.7907984999983455, + 4.791459791995294, + 4.792070208997757, + 4.792675500000769, + 4.793296249998093, + 4.793974708998576, + 4.794569124998816, + 4.7952272499969695, + 4.795882166996307, + 4.796522459000698, + 4.797151874998235, + 4.79775691699615, + 4.798455916999956, + 4.799140541996167, + 4.7997584999975516, + 4.800348541997664, + 4.800936833999003, + 4.801568833994679, + 4.802208749999409, + 4.802895333996275, + 4.803571791999275, + 4.804232791997492, + 4.805090499998187, + 4.805670333997114, + 4.806410416997096, + 4.807055833996856, + 4.807640624996566, + 4.808276916999603, + 4.8089349169968045, + 4.809541124996031, + 4.81014258399955, + 4.8107327920006355, + 4.811353583994787, + 4.811974374999409, + 4.812619333999464, + 4.813234624998586, + 4.8138532919983845, + 4.814514416997554, + 4.815172624999832, + 4.815809542000352, + 4.816451250000682, + 4.817082749999827, + 4.817672749995836, + 4.818290541996248, + 4.818913333998353, + 4.819566499994835, + 4.820163666998269, + 4.820807874995808, + 4.821453333999671, + 4.822051916999044, + 4.822846208997362, + 4.823545166997064, + 4.8242717499961145, + 4.824876041995594, + 4.825559166994935, + 4.826245333999395, + 4.826879916996404, + 4.827534541997011, + 4.828146542000468, + 4.82875358399906, + 4.829460000000836, + 4.830099624996365, + 4.830748416999995, + 4.831393499996921, + 4.832042834001186, + 4.832676083999104, + 4.833305959000427, + 4.833975041998201, + 4.834648374999233, + 4.835262749998947, + 4.835888583998894, + 4.836495833995286, + 4.837122708995594, + 4.83776133399806, + 4.8384219169965945, + 4.839024791996053, + 4.839676958996279, + 4.840307792001113, + 4.840966458999901, + 4.841587041999446, + 4.84236987499753, + 4.843135874994914, + 4.843857499996375, + 4.844488709000871, + 4.845095042001049, + 4.845760999996855, + 4.846376916997542, + 4.847003292001318, + 4.847638958999596, + 4.848288834000414, + 4.848949458995776, + 4.849578624998685, + 4.850212459001341, + 4.850812249998853, + 4.851431499999308, + 4.852082291996339, + 4.85271987500164, + 4.853351208999811, + 4.854001667001285, + 4.854660334000073, + 4.8552990419993876, + 4.85589629199967, + 4.8565200839948375, + 4.8571076250009355, + 4.857713208999485, + 4.8583591249989695, + 4.859001583994541, + 4.859623042000749, + 4.860232958999404, + 4.860850459001085, + 4.861492666997947, + 4.862201874995662, + 4.862800750001043, + 4.863606541999616, + 4.86428045899811, + 4.864955833996646, + 4.8656341249952675, + 4.866273667001224, + 4.8669480419994215, + 4.86761541699525, + 4.868274000000383, + 4.868896374995529, + 4.869561791994784, + 4.8702002499994705, + 4.870836166999652, + 4.871494958999392, + 4.8721215420009685, + 4.87275262500043, + 4.873367708998558, + 4.87397495899495, + 4.874624708994816, + 4.875261249995674, + 4.875886000001628, + 4.876534625000204, + 4.877180374998716, + 4.877814416999172, + 4.878559291995771, + 4.879199709001114, + 4.879860708999331, + 4.880495999997947, + 4.881218834001629, + 4.881884041999001, + 4.882567791995825, + 4.88321987499512, + 4.883838791996823, + 4.884468124997511, + 4.885150666996196, + 4.885782334000396, + 4.88641179199476, + 4.887031792000926, + 4.887658874999033, + 4.888333750001038, + 4.888966334001452, + 4.889601292001316, + 4.890214499995636, + 4.890830874996027, + 4.89145204200031, + 4.892079624994949, + 4.8927268749976065, + 4.89332704199478, + 4.893948375000036, + 4.89456537499791, + 4.895207166999171, + 4.895873541994661, + 4.89651241699903, + 4.897126958996523, + 4.897772666998208, + 4.898421583995514, + 4.899076041998342, + 4.899733166996157, + 4.900535000000673, + 4.901235541998176, + 4.90201079200051, + 4.902690167000401, + 4.903363459001412, + 4.904030749996309, + 4.90466795899556, + 4.9052922499977285, + 4.905959833995439, + 4.906584666998242, + 4.907237833998806, + 4.9080031249977765, + 4.908622374998231, + 4.909295083998586, + 4.909956709001563, + 4.910582208998676, + 4.911208291996445, + 4.911807584001508, + 4.912430500000482, + 4.913046083995141, + 4.913657541997964, + 4.914307084000029, + 4.914953999999852, + 4.915595916994789, + 4.916211333998945, + 4.916837584001769, + 4.917504999997618, + 4.918103833995701, + 4.918716708998545, + 4.919316416999209, + 4.919978583995544, + 4.920671416999539, + 4.921343666996108, + 4.922014333998959, + 4.922676333997515, + 4.923351541998272, + 4.924029666995921, + 4.924694791996444, + 4.925351833997411, + 4.926004208995437, + 4.9266565419966355, + 4.927315333996376, + 4.9279761249999865, + 4.92859533400042, + 4.929227125001489, + 4.929874834000657, + 4.9305302089996985, + 4.931143083995266, + 4.931798792000336, + 4.932444917001703, + 4.933072959000128, + 4.9337281249972875, + 4.934401458995126, + 4.935020999997505, + 4.935651624997263, + 4.936317125000642, + 4.9369757089953055, + 4.93761066699517, + 4.938209125000867, + 4.938880875000905, + 4.939619333999872, + 4.940288708996377, + 4.940964083994913, + 4.9415887919967645, + 4.942277166999702, + 4.942931041994598, + 4.943614958996477, + 4.944350334000774, + 4.945017792000726, + 4.945657208998455, + 4.946327334000671, + 4.94699454199872, + 4.947607417001564, + 4.9482380420013214, + 4.948914583997976, + 4.949562333997164, + 4.950189541996224, + 4.950816584001586, + 4.9514847499958705, + 4.952235291995748, + 4.952922416996444, + 4.95361704199604, + 4.9542427499982296, + 4.954926749996957, + 4.955560916998365, + 4.956178291999095, + 4.9568456249980954, + 4.957519791998493, + 4.95815975000005, + 4.958808208997652, + 4.9594630419960595, + 4.960057042000699, + 4.960687749997305, + 4.961347917000239, + 4.96205637499952, + 4.962779417001002, + 4.963487624998379, + 4.96416745899478, + 4.964800749999995, + 4.965472874995612, + 4.966101375001017, + 4.966715124995972, + 4.967405541996413, + 4.96809362500062, + 4.968746792001184, + 4.969411999998556, + 4.970068124996033, + 4.970706458996574, + 4.971342708995508, + 4.971979374997318, + 4.972575250001682, + 4.97324520899565, + 4.973883916994964, + 4.974543749995064, + 4.975148041994544, + 4.97579041699646, + 4.976447208995523, + 4.977200499997707, + 4.977822291999473, + 4.978469541994855, + 4.979135000001406, + 4.979841416999989, + 4.980504624996684, + 4.981143541997881, + 4.981795333995251, + 4.9825011669963715, + 4.983134624999366, + 4.983754291999503, + 4.984402208996471, + 4.985050958995998, + 4.985720124997897, + 4.986394624997047, + 4.987048874994798, + 4.987711666995892, + 4.988371084000391, + 4.98901987499994, + 4.989701916994818, + 4.990340500000457, + 4.991071416996419, + 4.991678041995328, + 4.992406334000407, + 4.9930990419961745, + 4.9937838339974405, + 4.9945313339994755, + 4.995196791998751, + 4.995890874997713, + 4.996575833996758, + 4.99724766700092, + 4.997917708999012, + 4.998646624997491, + 4.9997589170016, + 5.00054541699501, + 5.001234999996086, + 5.002005666996411, + 5.002753583998128, + 5.00341616699734, + 5.004545458999928, + 5.005258208999294, + 5.006082667001465, + 5.007007499996689, + 5.00767966699641, + 5.008330083997862, + 5.008952291995229, + 5.009657416994742, + 5.010393208998721, + 5.011480583998491, + 5.012551624997286, + 5.013234583995654, + 5.013975624999148, + 5.014606625001761, + 5.015184124997177, + 5.015760458998557, + 5.016331541999534, + 5.0169799590003095, + 5.017505042000266, + 5.018059374997392, + 5.018552083995019, + 5.019080334001046, + 5.019870208998327, + 5.023319250001805, + 5.023944916996697, + 5.024686500000826, + 5.025402374994883, + 5.02603866699792, + 5.0265863749955315, + 5.027174167000339, + 5.0277263749958365, + 5.028289834001043, + 5.028825583998696, + 5.029369833995588, + 5.030127291996905, + 5.030742791997909, + 5.031504541999311, + 5.032155875000171, + 5.032802124995214, + 5.035026375000598, + 5.035886124998797, + 5.036503541996353, + 5.037145124995732, + 5.037741333995655, + 5.038370875001419, + 5.039005124999676, + 5.039750249998178, + 5.040424083999824, + 5.041114667001239, + 5.041888583997206, + 5.042599041997164, + 5.043205083995417, + 5.043963833995804, + 5.044586541996978, + 5.045345999998972, + 5.04605783399893, + 5.046694625001692, + 5.0473515420017065, + 5.047905667001032, + 5.048501999997825, + 5.049089749998529, + 5.049668333995214, + 5.050240833996213, + 5.050795333998394, + 5.051339083998755, + 5.05189441699622, + 5.0524343340002815, + 5.053004666995548, + 5.053548958996544, + 5.05409787499957, + 5.054669083998306, + 5.05522991700127, + 5.055838166998001, + 5.0563959589999286, + 5.056946749995404, + 5.0575206669964246, + 5.058065583994903, + 5.058605458994862, + 5.059229291997326, + 5.059852166996279, + 5.060573958995519, + 5.0612550000005285, + 5.061972625000635, + 5.062634249996336, + 5.06327387499914, + 5.063922666995495, + 5.06455529199593, + 5.065198500000406, + 5.0658301250005024, + 5.066488124997704, + 5.067164333995606, + 5.067828791994543, + 5.068489708995912, + 5.069180749997031, + 5.069814124995901, + 5.070487958997546, + 5.071149874995172, + 5.071925708994968, + 5.072581666994665, + 5.073257042000478, + 5.073933583997132, + 5.07453383399843, + 5.075144333997741, + 5.0757993340012035, + 5.076523416995769, + 5.077237666999281, + 5.077892749999592, + 5.078536583998357, + 5.079190291995474, + 5.079878584001563, + 5.080590874997142, + 5.081265542001347, + 5.081871709000552, + 5.08251216699864, + 5.08313087499846, + 5.083794917001796, + 5.084546917001717, + 5.0852278339953045, + 5.085909624998749, + 5.0866287919998285, + 5.087302084000839, + 5.087968833999184, + 5.088600999995833, + 5.089233166996564, + 5.089885000001232, + 5.090496999997413, + 5.091139167001529, + 5.091806917000213, + 5.092489666996698, + 5.093138042000646, + 5.093802625000535, + 5.094424333998177, + 5.095094541997241, + 5.095737874995393, + 5.096422374997928, + 5.097141499994905, + 5.097871874997509, + 5.0985434589965735, + 5.099205958998937, + 5.099920499997097, + 5.10056766699563, + 5.101276499997766, + 5.102021916995, + 5.102639749995433, + 5.103300999995554, + 5.1039591250009835, + 5.104617042001337, + 5.1052906670011, + 5.105966458999319, + 5.10662679199595, + 5.107270749998861, + 5.1079346670012455, + 5.108566083996266, + 5.109228666995477, + 5.1098334999987856, + 5.110461416996259, + 5.111114499995892, + 5.111749874995439, + 5.11244091700064, + 5.113096708999365, + 5.1137430839953595, + 5.114368709000701, + 5.115063249999366, + 5.115713833998598, + 5.11631808400125, + 5.117020459001651, + 5.1176415000009, + 5.118343541995273, + 5.119002999999793, + 5.119671417000063, + 5.1203010419994825, + 5.120923499998753, + 5.121567333997518, + 5.12219691700011, + 5.12283749999915, + 5.123437333997572, + 5.124103292000655, + 5.124761958999443, + 5.125457458998426, + 5.126118959000451, + 5.126789624999219, + 5.127397042000666, + 5.12801795899577, + 5.12864350000018, + 5.12930575000064, + 5.130074249995232, + 5.13067074999708, + 5.1313599169952795, + 5.132091458996001, + 5.13276658399991, + 5.133341374996235, + 5.133975917000498, + 5.134593541995855, + 5.135234083994874, + 5.1358321250008885, + 5.13649599999917, + 5.137169208996056, + 5.137902541995572, + 5.138586916997156, + 5.139222500001779, + 5.139875916996971, + 5.140480624999327, + 5.141048042001785, + 5.1416627500002505, + 5.142376333998982, + 5.142985749997024, + 5.143539124997915, + 5.1440880419977475, + 5.144616083998699, + 5.145206959001371, + 5.145727958995849, + 5.1462449169994215, + 5.148241833994689, + 5.149255500000436, + 5.149849417000951, + 5.150470000000496, + 5.15105354199477, + 5.151713499995822, + 5.152370042000257, + 5.153083999997762, + 5.1537233339986415, + 5.154354792000959, + 5.15530966699589, + 5.156100416999834, + 5.156995541998185, + 5.1577779590006685, + 5.158518958996865, + 5.159215291998407, + 5.159879999999248, + 5.160532374997274, + 5.1612178340001265, + 5.161899041995639, + 5.162501541999518, + 5.163111624999146, + 5.163768792001065, + 5.164421374996891, + 5.165119583994965, + 5.165750749998551, + 5.166375791995961, + 5.1670010419984465, + 5.167610249998688, + 5.168192833996727, + 5.168861749996722, + 5.169538083995576, + 5.1702101249975385, + 5.170830750001187, + 5.171480166995025, + 5.172122208998189, + 5.172733333994984, + 5.173348749995057, + 5.174023041996406, + 5.174668041996483, + 5.175431124996976, + 5.176224916998763, + 5.176957541996671, + 5.177610458995332, + 5.17824483399454, + 5.178886541994871, + 5.179490583999723, + 5.180138666997664, + 5.180757999994967, + 5.181384083996818, + 5.182025624999369, + 5.1826324590001605, + 5.183271958994737, + 5.183908458995575, + 5.184541999995417, + 5.185299958997348, + 5.185971749997407, + 5.186585458999616, + 5.187212333999923, + 5.1878881250013364, + 5.188510416999634, + 5.189144249998208, + 5.189813500001037, + 5.190483499995025, + 5.191088958999899, + 5.191694124994683, + 5.192468374996679, + 5.1930561249973834, + 5.193676416995004, + 5.194324791998952, + 5.195008666996728, + 5.195639083998685, + 5.196334959000524, + 5.197044791995722, + 5.197720333999314, + 5.198362416995224, + 5.198994624995976, + 5.1996307500012335, + 5.200240209000185, + 5.200913666994893, + 5.201518083995325, + 5.20214529200166, + 5.20275699999911, + 5.203390958995442, + 5.204030959001102, + 5.204699041998538, + 5.20531724999455, + 5.20593462499528, + 5.206564125001023, + 5.207191875000717, + 5.207868334000523, + 5.208666499995161, + 5.209359417000087, + 5.21001770899602, + 5.210565541994583, + 5.211134874996787, + 5.2116787499981, + 5.212254708996625, + 5.212844749999931, + 5.213403124995239, + 5.213984000001801, + 5.214586083995528, + 5.2152003750015865, + 5.2158671249999315, + 5.216427708997799, + 5.217023083998356, + 5.217581166994933, + 5.2181244589955895, + 5.21863754199876, + 5.219167124996602, + 5.219653624997591, + 5.220226749996073, + 5.220717917000002, + 5.221265583997592, + 5.221804875000089, + 5.222331874996598, + 5.222893624995777, + 5.223475041995698, + 5.224012624996249, + 5.224519625000539, + 5.225043291997281, + 5.2256009170014295, + 5.226171541995427, + 5.22668962500029, + 5.22721054199792, + 5.227717000001576, + 5.228286917001242, + 5.228858541995578, + 5.229393124995113, + 5.229967874998692, + 5.230508125001506, + 5.231059459001699, + 5.231647624998004, + 5.232191833994875, + 5.232697958999779, + 5.233242292000796, + 5.233840499997314, + 5.234428541996749, + 5.235025333997328, + 5.235613833996467, + 5.236187333997805, + 5.236705916999199, + 5.237258708999434, + 5.2378161669985275, + 5.238323459001549, + 5.238877791998675, + 5.239471959001094, + 5.240005499996187, + 5.240559499994561, + 5.24110274999839, + 5.241659708997759, + 5.242223499997635, + 5.242821041996649, + 5.243381125001179, + 5.243937749997713, + 5.244497209001565, + 5.245051499994588, + 5.2456227090006, + 5.246199542001705, + 5.246818958999938, + 5.247474249998049, + 5.248035749995324, + 5.24858620899613, + 5.249177874997258, + 5.249720291998528, + 5.250265499998932, + 5.250827374999062, + 5.251384874994983, + 5.2519239589964855, + 5.252434624999296, + 5.253076208995481, + 5.253673749997688, + 5.254433083995536, + 5.25505775000056, + 5.255594791997282, + 5.256180625001434, + 5.256693499999528, + 5.257261792001373, + 5.257825666994904, + 5.25837304200104, + 5.258970041999419, + 5.259524041997793, + 5.260045791997982, + 5.260592416998406, + 5.26112958399608, + 5.2617019999961485, + 5.262337125001068, + 5.262884416995803, + 5.263433208994684, + 5.264035833999515, + 5.264637291998952, + 5.265182541996182, + 5.2657803339971, + 5.266323042000295, + 5.266864208999323, + 5.267428958999517, + 5.267962874997465, + 5.268516291995184, + 5.269047124995268, + 5.2695807089985465, + 5.27011020899954, + 5.270682458998635, + 5.271229749996564, + 5.271769499995571, + 5.272349749997375, + 5.272974209001404, + 5.273550166995847, + 5.274154041995644, + 5.274732166995818, + 5.275323709000077, + 5.275899833999574, + 5.276461333996849, + 5.277061834000051, + 5.277588708995609, + 5.278156959000626, + 5.278715666994685, + 5.279378374994849, + 5.279957958999148, + 5.28053920900129, + 5.281081417000678, + 5.281642374997318, + 5.282218125001236, + 5.282756417000201, + 5.283303167001577, + 5.283827291998023, + 5.284360208999715, + 5.284948959000758, + 5.285496749995218, + 5.286049333997653, + 5.286601749998226, + 5.287184333996265, + 5.287735083998996, + 5.2882714590014075, + 5.288810958998511, + 5.289350125000055, + 5.28990899999917, + 5.290457458999299, + 5.290992999995069, + 5.291575999995985, + 5.292308374999266, + 5.2930397919990355, + 5.293832208997628, + 5.294437042000936, + 5.294995167001616, + 5.295560166996438, + 5.296115958997689, + 5.29666599999473, + 5.297197749998304, + 5.29775195899856, + 5.298312458995497, + 5.298910583995166, + 5.299442709001596, + 5.299979916999291, + 5.300461749997339, + 5.301005333996727, + 5.301563041997724, + 5.302104999995208, + 5.302684166999825, + 5.3032385839978815, + 5.303779791996931, + 5.3043370000013965, + 5.304877916998521, + 5.305450041996664, + 5.305998833995545, + 5.306579333999252, + 5.307101958998828, + 5.307636416997411, + 5.308174459001748, + 5.3087259589956375, + 5.309246999997413, + 5.309892459001276, + 5.3104291669951635, + 5.31099712500145, + 5.311608958996658, + 5.312168999997084, + 5.312926583996159, + 5.313580834001186, + 5.314298208999389, + 5.314941459000693, + 5.315582208997512, + 5.316253249999136, + 5.3168688750010915, + 5.3175001249983325, + 5.31815391699638, + 5.31877858399821, + 5.319405541995366, + 5.320023749998654, + 5.320654416995239, + 5.321307041995169, + 5.321952916994633, + 5.32259183399583, + 5.323224791995017, + 5.323833416994603, + 5.324479874994722, + 5.325107124997885, + 5.325738833998912, + 5.326426874999015, + 5.327041500000632, + 5.327669291997154, + 5.328320916996745, + 5.329013458998816, + 5.32961449999857, + 5.330300791996706, + 5.331016833995818, + 5.331711041995732, + 5.332747874999768, + 5.33352054200077, + 5.3341744169956655, + 5.334788667001703, + 5.335459499998251, + 5.336118125000212, + 5.336761209000542, + 5.337396750001062, + 5.338007499995001, + 5.33863541699975, + 5.339212833998317, + 5.339859374995285, + 5.340508249995764, + 5.341161459000432, + 5.341816959000425, + 5.3425686249975115, + 5.343205208999279, + 5.343846416995802, + 5.3444775419993675, + 5.345086166998954, + 5.345746833998419, + 5.346323249999841, + 5.347014999999374, + 5.347701250000682, + 5.34842158399988, + 5.349088958995708, + 5.3497474169998895, + 5.350358374998905, + 5.350990250000905, + 5.3516359999994165, + 5.352217374995234, + 5.352808999996341, + 5.353382374996727, + 5.353948500000115, + 5.354458041998441, + 5.355002374999458, + 5.355571874999441, + 5.356099291995633, + 5.356601791994763, + 5.357166999994661, + 5.357714917001431, + 5.358288666997396, + 5.358808500001032, + 5.3593394169947715, + 5.359863749996293, + 5.360446291997505, + 5.360977584001375, + 5.36150666699541, + 5.362037833998329, + 5.3626157089966, + 5.363103042000148, + 5.363627958999132, + 5.364151208996191, + 5.364789250001195, + 5.365388749996782, + 5.365955417000805, + 5.366553250001743, + 5.367102833995887, + 5.367632041998149, + 5.3681677089989535, + 5.368703416999779, + 5.369238708997727, + 5.369894999996177, + 5.370542791999469, + 5.371179666995886, + 5.371777333995851, + 5.37247433399898, + 5.373037749996001, + 5.37358245899668, + 5.374180334001721, + 5.374702166998759, + 5.375292459000775, + 5.375874624995049, + 5.376418041996658, + 5.3769154170004185, + 5.3774792089971015, + 5.378001583994774, + 5.3785909169964725, + 5.3791377499946975, + 5.3797247920010705, + 5.3802722499967786, + 5.380965791999188, + 5.381528041994898, + 5.382069583996781, + 5.382619459000125, + 5.38318816699757, + 5.383746749997954, + 5.384316124996985, + 5.384888208995108, + 5.3854377919997205, + 5.385973958997056, + 5.3865384589953464, + 5.3871171249993495, + 5.387699874998361, + 5.388239874999272, + 5.388791624995065, + 5.389476791999186, + 5.390087583997229, + 5.390670583998144, + 5.39126079199923, + 5.3918179999964195, + 5.392364209001244, + 5.392943166996702, + 5.39348433399573, + 5.394012917000509, + 5.39454833399941, + 5.39508499999647, + 5.395630209000956, + 5.396205833996646, + 5.396768124999653, + 5.397336333997373, + 5.397900249998202, + 5.398406749998685, + 5.398924417000671, + 5.399481458996888, + 5.400041000000783, + 5.4005898339964915, + 5.401090708997799, + 5.401643999997759, + 5.402157999997144, + 5.402711458998965, + 5.403248916998564, + 5.403871583999717, + 5.404451041998982, + 5.405030541995075, + 5.405580999999074, + 5.40614362499764, + 5.4067129169998225, + 5.4072620419974555, + 5.407778333996248, + 5.408307291996607, + 5.408874000000651, + 5.409522499998275, + 5.41010812499735, + 5.4107422919987584, + 5.411302458996943, + 5.41186474999995, + 5.4123630419999245, + 5.412919499998679, + 5.413453458997537, + 5.414028209001117, + 5.414560958997754, + 5.415126416999556, + 5.415632042000652, + 5.416196375001164, + 5.416762041997572, + 5.41730424999696, + 5.41784312499658, + 5.4184150000000955, + 5.418972416999168, + 5.419540709001012, + 5.420122124996851, + 5.420693708998442, + 5.421235166999395, + 5.421748749999097, + 5.42234974999883, + 5.42292629199801, + 5.423485250001249, + 5.424036584001442, + 5.42464291700162, + 5.425203792001412, + 5.425796999996237, + 5.426354666997213, + 5.426932166999904, + 5.427602124997065, + 5.42812733399478, + 5.428732249994937, + 5.429302833996189, + 5.429851875000168, + 5.430440749994887, + 5.431020167001407, + 5.431593083994812, + 5.432127749998472, + 5.4326632090014755, + 5.43317720900086, + 5.433722499998112, + 5.434284541996021, + 5.434787375001179, + 5.435343917000864, + 5.435897416995431, + 5.43642225000076, + 5.436924208996061, + 5.4374370000005, + 5.437942374999693, + 5.4384641669967095, + 5.438991208997322, + 5.439527875001659, + 5.440098166996904, + 5.440635416998703, + 5.441151416998764, + 5.441678874994977, + 5.44223479199718, + 5.442768291999528, + 5.443312874995172, + 5.44383329199627, + 5.444341374997748, + 5.444899666996207, + 5.445439709001221, + 5.445986541999446, + 5.446549916996446, + 5.447024374996545, + 5.44757474999642, + 5.4483073340015835, + 5.448977959000331, + 5.449557041996741, + 5.450143624999328, + 5.4507197919956525, + 5.451276542000414, + 5.4518108339980245, + 5.452338584000245, + 5.453032416997303, + 5.453619833999255, + 5.454182333996869, + 5.454758874999243, + 5.455302583999583, + 5.455877208994934, + 5.456434499996249, + 5.456995249995089, + 5.457521666998218, + 5.458063833997585, + 5.45864570899721, + 5.459214750000683, + 5.45982974999788, + 5.460356083996885, + 5.46091216700006, + 5.461436917001265, + 5.461983959001373, + 5.462540333996003, + 5.463044124997396, + 5.463612833998923, + 5.464163083997846, + 5.464706583996303, + 5.465270249995228, + 5.465793874995143, + 5.466342209001596, + 5.466914999997243, + 5.467548041997361, + 5.468117042000813, + 5.468685084000754, + 5.469254584000737, + 5.46980520899524, + 5.47042112499912, + 5.47094924999692, + 5.471500833999016, + 5.472046292001323, + 5.472548291996645, + 5.473111667000921, + 5.473692958999891, + 5.474221874996147, + 5.4747836669994285, + 5.475343541998882, + 5.475906458996178, + 5.476422374995309, + 5.476945999995223, + 5.477560583996819, + 5.478288583995891, + 5.478966041999229, + 5.479597500001546, + 5.480212750000646, + 5.480854208995879, + 5.481520291999914, + 5.482205249994877, + 5.4828225419987575, + 5.483410499997262, + 5.4840463750006165, + 5.4846785420013475, + 5.485307541996008, + 5.4858937919998425, + 5.48659087499982, + 5.487196875001246, + 5.4879102499980945, + 5.488560833997326, + 5.48923233399546, + 5.489870708996023, + 5.490515459001472, + 5.491143333994842, + 5.491805500001647, + 5.492544834, + 5.493212666995532, + 5.493867083998339, + 5.494559667000431, + 5.495172374998219, + 5.4957914170008735, + 5.49648295899533, + 5.497134708995873, + 5.497760958998697, + 5.498394374997588, + 5.499031166997156, + 5.499657000000298, + 5.50024741699599, + 5.500883166998392, + 5.501542792000691, + 5.502215417000116, + 5.502852874997188, + 5.503466374997515, + 5.504078749996552, + 5.504681166996306, + 5.505307958999765, + 5.505974125000648, + 5.50661024999863, + 5.507258624995302, + 5.507875791998231, + 5.508568749995902, + 5.509270374997868, + 5.510062541994557, + 5.510785667000164, + 5.5113812089985, + 5.5120421669998905, + 5.512684208995779, + 5.513374458998442, + 5.514016666995303, + 5.514622834001784, + 5.515239833999658, + 5.515849208997679, + 5.516440708997834, + 5.5170815419987775, + 5.517726999998558, + 5.518377458996838, + 5.5190219590003835, + 5.519690666995302, + 5.52034054199612, + 5.521001542001613, + 5.5216217919951305, + 5.522217334000743, + 5.522819249999884, + 5.523432292000507, + 5.52403124999546, + 5.524654458997247, + 5.525336708997202, + 5.525971916998969, + 5.526566458996967, + 5.527201833996514, + 5.527998334000586, + 5.528734542000166, + 5.529425458997139, + 5.530073709000135, + 5.530729499994777, + 5.531380374995933, + 5.532040416997916, + 5.532661666999047, + 5.53331079200143, + 5.5339505419979105, + 5.534558916995593, + 5.535170666997146, + 5.535761041996011, + 5.5363652919986635, + 5.537022124997748, + 5.537666708994948, + 5.538301916996716, + 5.538938166995649, + 5.539585708997038, + 5.54020070900151, + 5.540875375001633, + 5.54151075000118, + 5.542149791996053, + 5.542770041996846, + 5.543506999994861, + 5.544143916995381, + 5.544765291997464, + 5.545386749996396, + 5.546017041997402, + 5.546641166998597, + 5.5472850000005565, + 5.548089333999087, + 5.548778374999529, + 5.549475125000754, + 5.550136124998971, + 5.550737375000608, + 5.551372292000451, + 5.552002124997671, + 5.55260529199586, + 5.553217666994897, + 5.553875999998127, + 5.554521541998838, + 5.555144666999695, + 5.555805291995057, + 5.55643124999915, + 5.5570737089947215, + 5.5576991669950075, + 5.55832883399853, + 5.559031500000856, + 5.559679124999093, + 5.56032525000046, + 5.560985416996118, + 5.561774292000337, + 5.562395624998317, + 5.563028083997779, + 5.5636567499968805, + 5.564307666994864, + 5.564939374999085, + 5.565600624999206, + 5.566219374995853, + 5.566899375000503, + 5.567575583998405, + 5.5682604589965194, + 5.568949166998209, + 5.569615583997802, + 5.570242791996861, + 5.570934874995146, + 5.571573499997612, + 5.572146583996073, + 5.57280804200127, + 5.573451374999422, + 5.57408349999605, + 5.574718625000969, + 5.575389249999716, + 5.576020791995688, + 5.576654625001538, + 5.57727916699514, + 5.577889333995699, + 5.578555208994658, + 5.579272541996033, + 5.5799352920003, + 5.580604874994606, + 5.581209874995693, + 5.581841166997037, + 5.582476249997853, + 5.583133458996599, + 5.5838112919955165, + 5.5844794169970555, + 5.585241959000996, + 5.585892416995193, + 5.5865683750016615, + 5.587254958998528, + 5.587955374998273, + 5.588621416995011, + 5.58926524999697, + 5.589899916994909, + 5.590507916997012, + 5.591199916998448, + 5.5919052499957616, + 5.592624459000945, + 5.593267917000048, + 5.593933416996151, + 5.594609874999151, + 5.595258374996774, + 5.595882875000825, + 5.596509916998912, + 5.597148458997253, + 5.59781291699619, + 5.598460666995379, + 5.599093917000573, + 5.599734958996123, + 5.6003601670017815, + 5.600956292000774, + 5.601596458996937, + 5.602213041995128, + 5.602882374994806, + 5.603546416998142, + 5.604150792001747, + 5.60487433399976, + 5.605473249997885, + 5.606129667001369, + 5.6068131669962895, + 5.607478624995565, + 5.608230249999906, + 5.608911416995397, + 5.60956074999558, + 5.610194333996333, + 5.610877458995674, + 5.611517042001651, + 5.612153292000585, + 5.612810749997152, + 5.6135102920015925, + 5.614123708997795, + 5.6147648749974906, + 5.6154103340013535, + 5.616016708998359, + 5.616632999997819, + 5.617233166994993, + 5.617916083996533, + 5.618601791997207, + 5.619253374999971, + 5.619907749998674, + 5.620563291995495, + 5.621219499997096, + 5.62184508399514, + 5.622484333995089, + 5.6231578340011765, + 5.623789917000977, + 5.6244108749961015, + 5.625085583997134, + 5.6258670419992995, + 5.626545833998534, + 5.627259499997308, + 5.627845458999218, + 5.628434792000917, + 5.629017624996777, + 5.62959045900061, + 5.6301526249953895, + 5.63078216699796, + 5.631319333995634, + 5.631881333996716, + 5.632595541996125, + 5.633143084000039, + 5.633705333995749, + 5.63427312499698, + 5.634815459001402, + 5.635335667000618, + 5.635849166996195, + 5.636392166998121, + 5.6369422919960925, + 5.637501917000918, + 5.638043499995547, + 5.638589374997537, + 5.639146083995001, + 5.639677667000797, + 5.6402351669967175, + 5.640788584001712, + 5.64131287499913, + 5.641822500001581, + 5.64238695899985, + 5.642923499995959, + 5.643470208997314, + 5.644048249996558, + 5.644632208997791, + 5.645254625000234, + 5.64581770899531, + 5.6464214169973275, + 5.646964291998302, + 5.647532791997946, + 5.648057083999447, + 5.648592624995217, + 5.649147124997398, + 5.649681625000085, + 5.650220874995284, + 5.650767708997591, + 5.651329583997722, + 5.651859208999667, + 5.652442291997431, + 5.652958541999396, + 5.653505124995718, + 5.654059624997899, + 5.654649416996108, + 5.65528424999502, + 5.655945958998927, + 5.656600834001438, + 5.657221124994976, + 5.6579495839978335, + 5.658584291995794, + 5.659227833995828, + 5.659871749994636, + 5.6605179170001065, + 5.661189166996337, + 5.661820124994847, + 5.66242791699915, + 5.663062542000262, + 5.663699416996678, + 5.664400166999258, + 5.665070292001474, + 5.66589445900172, + 5.666545084000973, + 5.667190667001705, + 5.667846208998526, + 5.668446249997942, + 5.669078041995817, + 5.669733874994563, + 5.670390958999633, + 5.67100595899683, + 5.671605333998741, + 5.672226666996721, + 5.672865249995084, + 5.673478958997293, + 5.6740992499981076, + 5.674725416996807, + 5.675379542000883, + 5.6760369170006015, + 5.676815041995724, + 5.677413749996049, + 5.678024208995339, + 5.678711666994786, + 5.679367999997339, + 5.679975999999442, + 5.681135209000786, + 5.68199787499907, + 5.682667083994602, + 5.68343145900144, + 5.68408449999697, + 5.684704084000259, + 5.685376959001587, + 5.686047916999087, + 5.686680041995714, + 5.687349374995392, + 5.688012667000294, + 5.688712124996528, + 5.6893162919950555, + 5.689949499996146, + 5.690587708995736, + 5.691232124998351, + 5.691879833997518, + 5.692511166998884, + 5.693148209000356, + 5.6937707499964745, + 5.694421542000782, + 5.695064749997982, + 5.695710542000597, + 5.696317834001093, + 5.6969345420002355, + 5.697589499999594, + 5.69826858399756, + 5.698985958995763, + 5.699623874999816, + 5.700358249996498, + 5.700969917001203, + 5.701590874996327, + 5.702229624999745, + 5.702836042000854, + 5.703502833996026, + 5.704210749994672, + 5.704927541999496, + 5.705567334000079, + 5.706194083999435, + 5.706807750000735, + 5.707445041996834, + 5.708135834000132, + 5.708773708996887, + 5.709540916999686, + 5.710260291998566, + 5.710932041998603, + 5.711553333996562, + 5.712227374999202, + 5.712879458995303, + 5.713502334001532, + 5.714126624996425, + 5.714777249995677, + 5.715387291995285, + 5.715998542000307, + 5.71659345900116, + 5.717220916994847, + 5.717857916999492, + 5.718515542001114, + 5.719165834001615, + 5.719824125000741, + 5.72048562499549, + 5.721140916997683, + 5.721768416995474, + 5.722449959001096, + 5.723129833997518, + 5.72379333400022, + 5.724459375000151, + 5.72513666699524, + 5.725798624996969, + 5.726457917000516, + 5.727085749997059, + 5.727685459001805, + 5.72829708399513, + 5.728945666996879, + 5.72958262499742, + 5.730187417000707, + 5.730821583994839, + 5.7314692919972, + 5.732081958994968, + 5.732677667001553, + 5.733282708999468, + 5.733919667000009, + 5.734525041996676, + 5.735111249996407, + 5.735751791995426, + 5.736398666995228, + 5.737018959000125, + 5.737671916998806, + 5.738282708996849, + 5.73891929200181, + 5.739553874998819, + 5.740354249996017, + 5.741034624996246, + 5.741675958997803, + 5.742361833996256, + 5.743075958998816, + 5.743775833994732, + 5.744453166997118, + 5.7451297090010485, + 5.745759958997951, + 5.74651866700151, + 5.747228000000177, + 5.747889708996809, + 5.748520458997518, + 5.749161125000683, + 5.749802166996233, + 5.750450166997325, + 5.751055458997143, + 5.751661166999838, + 5.752264999995532, + 5.75288449999789, + 5.753477792000922, + 5.754084000000148, + 5.754745166996145, + 5.755528208996111, + 5.756199249997735, + 5.756810667000536, + 5.757437041997036, + 5.758042875000683, + 5.758703166997293, + 5.759369958999741, + 5.760017291999247, + 5.760602791997371, + 5.761271167000814, + 5.761909791996004, + 5.762562291994982, + 5.763274500000989, + 5.763996166999277, + 5.7646624999979394, + 5.765350249996118, + 5.76600420899922, + 5.766648416996759, + 5.767273208999541, + 5.7679325839999365, + 5.768582584001706, + 5.769268124997325, + 5.769886249996489, + 5.770510499998636, + 5.7711389169999165, + 5.77182612499746, + 5.772480542000267, + 5.773147250001784, + 5.773771708998538, + 5.77446954199695, + 5.775163209000311, + 5.775796000001719, + 5.776444666997122, + 5.777064791996963, + 5.777706708999176, + 5.778307458997006, + 5.7789347500001895, + 5.779534749999584, + 5.780171250000421, + 5.780840958999761, + 5.781557541995426, + 5.7822583749948535, + 5.782946833998722, + 5.783616749999055, + 5.784262499997567, + 5.7849170839981525, + 5.7855541669996455, + 5.786245167000743, + 5.786897666999721, + 5.787543624996033, + 5.788159458999871, + 5.7888028339948505, + 5.789445624999644, + 5.790102541999659, + 5.790772416999971, + 5.791471291995549, + 5.792145667001023, + 5.792776750000485, + 5.793433624996396, + 5.794100291997893, + 5.794753249996575, + 5.7954331669971, + 5.796110208997561, + 5.796743749997404, + 5.79736899999989, + 5.79801462499745, + 5.79866620899702, + 5.799324791994877, + 5.799966124999628, + 5.800571708998177, + 5.801186584001698, + 5.801829208998242, + 5.802446333997068, + 5.803074041999935, + 5.803632249997463, + 5.804205458996876, + 5.804764749998867, + 5.8053289169984055, + 5.805874334000691, + 5.806443249995937, + 5.8070036669960245, + 5.80753833399649, + 5.808079041999008, + 5.808671041995694, + 5.80918337500043, + 5.809736958995927, + 5.810259917001531, + 5.810807541995018, + 5.8113250419992255, + 5.811907791998237, + 5.812512666998373, + 5.813131374998193, + 5.813784708996536, + 5.814452708997123, + 5.8150558339984855, + 5.8156614170002285, + 5.81633512499684, + 5.816975292000279, + 5.817596208995383, + 5.8182072499985225, + 5.818818959000055, + 5.819426750000275, + 5.8202002920006635, + 5.820871874995646, + 5.82159262499772, + 5.822269042000698, + 5.822879041996202, + 5.823495999997249, + 5.824127833999228, + 5.824803750001593, + 5.825430749995576, + 5.826101916994958, + 5.826727209001547, + 5.82736758399551, + 5.828043916997558, + 5.828684374995646, + 5.829374666995136, + 5.830058166997333, + 5.830646374997741, + 5.831297917000484, + 5.831969083999866, + 5.832578583998838, + 5.8332104590008385, + 5.833894458999566, + 5.834508791995177, + 5.8351109169962, + 5.835681249998743, + 5.836314499996661, + 5.83692579199851, + 5.837544791997061, + 5.838138084000093, + 5.838796249998268, + 5.839446792000672, + 5.840086249998421, + 5.840719749998243, + 5.841371791997517, + 5.842061541996372, + 5.842785624998214, + 5.843465124999057, + 5.844131792000553, + 5.844794917000399, + 5.845459124997433, + 5.846133166996879, + 5.846826959001191, + 5.847433333998197, + 5.84805116699863, + 5.84859508399677, + 5.84909854199941, + 5.849649708994548, + 5.8502101249978296, + 5.850697417001356, + 5.851228542000172, + 5.8517655420000665, + 5.852259624996805, + 5.852776458996232, + 5.853341541995178, + 5.8539288749962, + 5.854481666996435, + 5.854976916998567, + 5.855550959000539, + 5.856100666998827, + 5.856666374995257, + 5.857228333996318, + 5.85780016699573, + 5.858351999995648, + 5.8589033339958405, + 5.859472083997389, + 5.860015124999336, + 5.860551583995402, + 5.861087874996883, + 5.861797874997137, + 5.862770084000658, + 5.863493833996472, + 5.864086249996035, + 5.864665041997796, + 5.865207333998114, + 5.865760874999978, + 5.866301583999302, + 5.8668279589983285, + 5.867317958996864, + 5.867874458999722, + 5.86843283399503, + 5.868994208998629, + 5.869499916996574, + 5.870066958996176, + 5.870627374999458, + 5.8711791669993545, + 5.871702208998613, + 5.87233645899687, + 5.872922666996601, + 5.873443666998355, + 5.873970499997085, + 5.874500541998714, + 5.8750488750010845, + 5.875599416998739, + 5.876184041997476, + 5.876708042000246, + 5.877219709000201, + 5.877727041995968, + 5.87827108399506, + 5.878861541998049, + 5.8794156669973745, + 5.879999874996429, + 5.880557708995184, + 5.881202124997799, + 5.881823291994806, + 5.882459874999768, + 5.883052917000896, + 5.883593209000537, + 5.884099541995965, + 5.884629624997615, + 5.885154750001675, + 5.885732583999925, + 5.886266583998804, + 5.886817916994914, + 5.887373249999655, + 5.8880449589996715, + 5.888585000000603, + 5.88911625000037, + 5.8896314589947, + 5.890155542001594, + 5.89074033399811, + 5.891297292000672, + 5.891834624999319, + 5.892307583999354, + 5.8928201669987175, + 5.893349209000007, + 5.893919916998129, + 5.894483958996716, + 5.895033583998156, + 5.895561708995956, + 5.896085041997139, + 5.896646791996318, + 5.897222416999284, + 5.897817833996669, + 5.898381209000945, + 5.8989145000014105, + 5.89942579199851, + 5.899928667000495, + 5.900526166995405, + 5.901100083996425, + 5.901707583994721, + 5.902288459001284, + 5.902945916997851, + 5.9036173339991365, + 5.904197083997133, + 5.904731292001088, + 5.905232833996706, + 5.905854333999741, + 5.906449249996513, + 5.906962208995537, + 5.907496624997293, + 5.908064709001337, + 5.9086199999946984, + 5.909188708996226, + 5.909762833995046, + 5.91034029200091, + 5.910880167000869, + 5.911416041999473, + 5.911990791995777, + 5.912543291997281, + 5.913059041995439, + 5.913623708998784, + 5.914161708999018, + 5.914721583998471, + 5.91527241699805, + 5.915828416997101, + 5.9163517499982845, + 5.916918208997231, + 5.917458042000362, + 5.918012624999392, + 5.918606624996755, + 5.919254166998144, + 5.920039500000712, + 5.920612791996973, + 5.921219124997151, + 5.921826792000502, + 5.922383917000843, + 5.9229531249948195, + 5.923495625000214, + 5.924122958997032, + 5.924694291999913, + 5.925315542001044, + 5.92586612499872, + 5.926426083999104, + 5.927026666999154, + 5.927581584001018, + 5.92814266699861 + ], + "message_points_y": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135, + 136, + 137, + 138, + 139, + 140, + 141, + 142, + 143, + 144, + 145, + 146, + 147, + 148, + 149, + 150, + 151, + 152, + 153, + 154, + 155, + 156, + 157, + 158, + 159, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 174, + 175, + 176, + 177, + 178, + 179, + 180, + 181, + 182, + 183, + 184, + 185, + 186, + 187, + 188, + 189, + 190, + 191, + 192, + 193, + 194, + 195, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 210, + 211, + 212, + 213, + 214, + 215, + 216, + 217, + 218, + 219, + 220, + 221, + 222, + 223, + 224, + 225, + 226, + 227, + 228, + 229, + 230, + 231, + 232, + 233, + 234, + 235, + 236, + 237, + 238, + 239, + 240, + 241, + 242, + 243, + 244, + 245, + 246, + 247, + 248, + 249, + 250, + 251, + 252, + 253, + 254, + 255, + 256, + 257, + 258, + 259, + 260, + 261, + 262, + 263, + 264, + 265, + 266, + 267, + 268, + 269, + 270, + 271, + 272, + 273, + 274, + 275, + 276, + 277, + 278, + 279, + 280, + 281, + 282, + 283, + 284, + 285, + 286, + 287, + 288, + 289, + 290, + 291, + 292, + 293, + 294, + 295, + 296, + 297, + 298, + 299, + 300, + 301, + 302, + 303, + 304, + 305, + 306, + 307, + 308, + 309, + 310, + 311, + 312, + 313, + 314, + 315, + 316, + 317, + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 331, + 332, + 333, + 334, + 335, + 336, + 337, + 338, + 339, + 340, + 341, + 342, + 343, + 344, + 345, + 346, + 347, + 348, + 349, + 350, + 351, + 352, + 353, + 354, + 355, + 356, + 357, + 358, + 359, + 360, + 361, + 362, + 363, + 364, + 365, + 366, + 367, + 368, + 369, + 370, + 371, + 372, + 373, + 374, + 375, + 376, + 377, + 378, + 379, + 380, + 381, + 382, + 383, + 384, + 385, + 386, + 387, + 388, + 389, + 390, + 391, + 392, + 393, + 394, + 395, + 396, + 397, + 398, + 399, + 400, + 401, + 402, + 403, + 404, + 405, + 406, + 407, + 408, + 409, + 410, + 411, + 412, + 413, + 414, + 415, + 416, + 417, + 418, + 419, + 420, + 421, + 422, + 423, + 424, + 425, + 426, + 427, + 428, + 429, + 430, + 431, + 432, + 433, + 434, + 435, + 436, + 437, + 438, + 439, + 440, + 441, + 442, + 443, + 444, + 445, + 446, + 447, + 448, + 449, + 450, + 451, + 452, + 453, + 454, + 455, + 456, + 457, + 458, + 459, + 460, + 461, + 462, + 463, + 464, + 465, + 466, + 467, + 468, + 469, + 470, + 471, + 472, + 473, + 474, + 475, + 476, + 477, + 478, + 479, + 480, + 481, + 482, + 483, + 484, + 485, + 486, + 487, + 488, + 489, + 490, + 491, + 492, + 493, + 494, + 495, + 496, + 497, + 498, + 499, + 500, + 501, + 502, + 503, + 504, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520, + 521, + 522, + 523, + 524, + 525, + 526, + 527, + 528, + 529, + 530, + 531, + 532, + 533, + 534, + 535, + 536, + 537, + 538, + 539, + 540, + 541, + 542, + 543, + 544, + 545, + 546, + 547, + 548, + 549, + 550, + 551, + 552, + 553, + 554, + 555, + 556, + 557, + 558, + 559, + 560, + 561, + 562, + 563, + 564, + 565, + 566, + 567, + 568, + 569, + 570, + 571, + 572, + 573, + 574, + 575, + 576, + 577, + 578, + 579, + 580, + 581, + 582, + 583, + 584, + 585, + 586, + 587, + 588, + 589, + 590, + 591, + 592, + 593, + 594, + 595, + 596, + 597, + 598, + 599, + 600, + 601, + 602, + 603, + 604, + 605, + 606, + 607, + 608, + 609, + 610, + 611, + 612, + 613, + 614, + 615, + 616, + 617, + 618, + 619, + 620, + 621, + 622, + 623, + 624, + 625, + 626, + 627, + 628, + 629, + 630, + 631, + 632, + 633, + 634, + 635, + 636, + 637, + 638, + 639, + 640, + 641, + 642, + 643, + 644, + 645, + 646, + 647, + 648, + 649, + 650, + 651, + 652, + 653, + 654, + 655, + 656, + 657, + 658, + 659, + 660, + 661, + 662, + 663, + 664, + 665, + 666, + 667, + 668, + 669, + 670, + 671, + 672, + 673, + 674, + 675, + 676, + 677, + 678, + 679, + 680, + 681, + 682, + 683, + 684, + 685, + 686, + 687, + 688, + 689, + 690, + 691, + 692, + 693, + 694, + 695, + 696, + 697, + 698, + 699, + 700, + 701, + 702, + 703, + 704, + 705, + 706, + 707, + 708, + 709, + 710, + 711, + 712, + 713, + 714, + 715, + 716, + 717, + 718, + 719, + 720, + 721, + 722, + 723, + 724, + 725, + 726, + 727, + 728, + 729, + 730, + 731, + 732, + 733, + 734, + 735, + 736, + 737, + 738, + 739, + 740, + 741, + 742, + 743, + 744, + 745, + 746, + 747, + 748, + 749, + 750, + 751, + 752, + 753, + 754, + 755, + 756, + 757, + 758, + 759, + 760, + 761, + 762, + 763, + 764, + 765, + 766, + 767, + 768, + 769, + 770, + 771, + 772, + 773, + 774, + 775, + 776, + 777, + 778, + 779, + 780, + 781, + 782, + 783, + 784, + 785, + 786, + 787, + 788, + 789, + 790, + 791, + 792, + 793, + 794, + 795, + 796, + 797, + 798, + 799, + 800, + 801, + 802, + 803, + 804, + 805, + 806, + 807, + 808, + 809, + 810, + 811, + 812, + 813, + 814, + 815, + 816, + 817, + 818, + 819, + 820, + 821, + 822, + 823, + 824, + 825, + 826, + 827, + 828, + 829, + 830, + 831, + 832, + 833, + 834, + 835, + 836, + 837, + 838, + 839, + 840, + 841, + 842, + 843, + 844, + 845, + 846, + 847, + 848, + 849, + 850, + 851, + 852, + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937, + 938, + 939, + 940, + 941, + 942, + 943, + 944, + 945, + 946, + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020, + 1021, + 1022, + 1023, + 1024, + 1025, + 1026, + 1027, + 1028, + 1029, + 1030, + 1031, + 1032, + 1033, + 1034, + 1035, + 1036, + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057, + 1058, + 1059, + 1060, + 1061, + 1062, + 1063, + 1064, + 1065, + 1066, + 1067, + 1068, + 1069, + 1070, + 1071, + 1072, + 1073, + 1074, + 1075, + 1076, + 1077, + 1078, + 1079, + 1080, + 1081, + 1082, + 1083, + 1084, + 1085, + 1086, + 1087, + 1088, + 1089, + 1090, + 1091, + 1092, + 1093, + 1094, + 1095, + 1096, + 1097, + 1098, + 1099, + 1100, + 1101, + 1102, + 1103, + 1104, + 1105, + 1106, + 1107, + 1108, + 1109, + 1110, + 1111, + 1112, + 1113, + 1114, + 1115, + 1116, + 1117, + 1118, + 1119, + 1120, + 1121, + 1122, + 1123, + 1124, + 1125, + 1126, + 1127, + 1128, + 1129, + 1130, + 1131, + 1132, + 1133, + 1134, + 1135, + 1136, + 1137, + 1138, + 1139, + 1140, + 1141, + 1142, + 1143, + 1144, + 1145, + 1146, + 1147, + 1148, + 1149, + 1150, + 1151, + 1152, + 1153, + 1154, + 1155, + 1156, + 1157, + 1158, + 1159, + 1160, + 1161, + 1162, + 1163, + 1164, + 1165, + 1166, + 1167, + 1168, + 1169, + 1170, + 1171, + 1172, + 1173, + 1174, + 1175, + 1176, + 1177, + 1178, + 1179, + 1180, + 1181, + 1182, + 1183, + 1184, + 1185, + 1186, + 1187, + 1188, + 1189, + 1190, + 1191, + 1192, + 1193, + 1194, + 1195, + 1196, + 1197, + 1198, + 1199, + 1200, + 1201, + 1202, + 1203, + 1204, + 1205, + 1206, + 1207, + 1208, + 1209, + 1210, + 1211, + 1212, + 1213, + 1214, + 1215, + 1216, + 1217, + 1218, + 1219, + 1220, + 1221, + 1222, + 1223, + 1224, + 1225, + 1226, + 1227, + 1228, + 1229, + 1230, + 1231, + 1232, + 1233, + 1234, + 1235, + 1236, + 1237, + 1238, + 1239, + 1240, + 1241, + 1242, + 1243, + 1244, + 1245, + 1246, + 1247, + 1248, + 1249, + 1250, + 1251, + 1252, + 1253, + 1254, + 1255, + 1256, + 1257, + 1258, + 1259, + 1260, + 1261, + 1262, + 1263, + 1264, + 1265, + 1266, + 1267, + 1268, + 1269, + 1270, + 1271, + 1272, + 1273, + 1274, + 1275, + 1276, + 1277, + 1278, + 1279, + 1280, + 1281, + 1282, + 1283, + 1284, + 1285, + 1286, + 1287, + 1288, + 1289, + 1290, + 1291, + 1292, + 1293, + 1294, + 1295, + 1296, + 1297, + 1298, + 1299, + 1300, + 1301, + 1302, + 1303, + 1304, + 1305, + 1306, + 1307, + 1308, + 1309, + 1310, + 1311, + 1312, + 1313, + 1314, + 1315, + 1316, + 1317, + 1318, + 1319, + 1320, + 1321, + 1322, + 1323, + 1324, + 1325, + 1326, + 1327, + 1328, + 1329, + 1330, + 1331, + 1332, + 1333, + 1334, + 1335, + 1336, + 1337, + 1338, + 1339, + 1340, + 1341, + 1342, + 1343, + 1344, + 1345, + 1346, + 1347, + 1348, + 1349, + 1350, + 1351, + 1352, + 1353, + 1354, + 1355, + 1356, + 1357, + 1358, + 1359, + 1360, + 1361, + 1362, + 1363, + 1364, + 1365, + 1366, + 1367, + 1368, + 1369, + 1370, + 1371, + 1372, + 1373, + 1374, + 1375, + 1376, + 1377, + 1378, + 1379, + 1380, + 1381, + 1382, + 1383, + 1384, + 1385, + 1386, + 1387, + 1388, + 1389, + 1390, + 1391, + 1392, + 1393, + 1394, + 1395, + 1396, + 1397, + 1398, + 1399, + 1400, + 1401, + 1402, + 1403, + 1404, + 1405, + 1406, + 1407, + 1408, + 1409, + 1410, + 1411, + 1412, + 1413, + 1414, + 1415, + 1416, + 1417, + 1418, + 1419, + 1420, + 1421, + 1422, + 1423, + 1424, + 1425, + 1426, + 1427, + 1428, + 1429, + 1430, + 1431, + 1432, + 1433, + 1434, + 1435, + 1436, + 1437, + 1438, + 1439, + 1440, + 1441, + 1442, + 1443, + 1444, + 1445, + 1446, + 1447, + 1448, + 1449, + 1450, + 1451, + 1452, + 1453, + 1454, + 1455, + 1456, + 1457, + 1458, + 1459, + 1460, + 1461, + 1462, + 1463, + 1464, + 1465, + 1466, + 1467, + 1468, + 1469, + 1470, + 1471, + 1472, + 1473, + 1474, + 1475, + 1476, + 1477, + 1478, + 1479, + 1480, + 1481, + 1482, + 1483, + 1484, + 1485, + 1486, + 1487, + 1488, + 1489, + 1490, + 1491, + 1492, + 1493, + 1494, + 1495, + 1496, + 1497, + 1498, + 1499, + 1500, + 1501, + 1502, + 1503, + 1504, + 1505, + 1506, + 1507, + 1508, + 1509, + 1510, + 1511, + 1512, + 1513, + 1514, + 1515, + 1516, + 1517, + 1518, + 1519, + 1520, + 1521, + 1522, + 1523, + 1524, + 1525, + 1526, + 1527, + 1528, + 1529, + 1530, + 1531, + 1532, + 1533, + 1534, + 1535, + 1536, + 1537, + 1538, + 1539, + 1540, + 1541, + 1542, + 1543, + 1544, + 1545, + 1546, + 1547, + 1548, + 1549, + 1550, + 1551, + 1552, + 1553, + 1554, + 1555, + 1556, + 1557, + 1558, + 1559, + 1560, + 1561, + 1562, + 1563, + 1564, + 1565, + 1566, + 1567, + 1568, + 1569, + 1570, + 1571, + 1572, + 1573, + 1574, + 1575, + 1576, + 1577, + 1578, + 1579, + 1580, + 1581, + 1582, + 1583, + 1584, + 1585, + 1586, + 1587, + 1588, + 1589, + 1590, + 1591, + 1592, + 1593, + 1594, + 1595, + 1596, + 1597, + 1598, + 1599, + 1600, + 1601, + 1602, + 1603, + 1604, + 1605, + 1606, + 1607, + 1608, + 1609, + 1610, + 1611, + 1612, + 1613, + 1614, + 1615, + 1616, + 1617, + 1618, + 1619, + 1620, + 1621, + 1622, + 1623, + 1624, + 1625, + 1626, + 1627, + 1628, + 1629, + 1630, + 1631, + 1632, + 1633, + 1634, + 1635, + 1636, + 1637, + 1638, + 1639, + 1640, + 1641, + 1642, + 1643, + 1644, + 1645, + 1646, + 1647, + 1648, + 1649, + 1650, + 1651, + 1652, + 1653, + 1654, + 1655, + 1656, + 1657, + 1658, + 1659, + 1660, + 1661, + 1662, + 1663, + 1664, + 1665, + 1666, + 1667, + 1668, + 1669, + 1670, + 1671, + 1672, + 1673, + 1674, + 1675, + 1676, + 1677, + 1678, + 1679, + 1680, + 1681, + 1682, + 1683, + 1684, + 1685, + 1686, + 1687, + 1688, + 1689, + 1690, + 1691, + 1692, + 1693, + 1694, + 1695, + 1696, + 1697, + 1698, + 1699, + 1700, + 1701, + 1702, + 1703, + 1704, + 1705, + 1706, + 1707, + 1708, + 1709, + 1710, + 1711, + 1712, + 1713, + 1714, + 1715, + 1716, + 1717, + 1718, + 1719, + 1720, + 1721, + 1722, + 1723, + 1724, + 1725, + 1726, + 1727, + 1728, + 1729, + 1730, + 1731, + 1732, + 1733, + 1734, + 1735, + 1736, + 1737, + 1738, + 1739, + 1740, + 1741, + 1742, + 1743, + 1744, + 1745, + 1746, + 1747, + 1748, + 1749, + 1750, + 1751, + 1752, + 1753, + 1754, + 1755, + 1756, + 1757, + 1758, + 1759, + 1760, + 1761, + 1762, + 1763, + 1764, + 1765, + 1766, + 1767, + 1768, + 1769, + 1770, + 1771, + 1772, + 1773, + 1774, + 1775, + 1776, + 1777, + 1778, + 1779, + 1780, + 1781, + 1782, + 1783, + 1784, + 1785, + 1786, + 1787, + 1788, + 1789, + 1790, + 1791, + 1792, + 1793, + 1794, + 1795, + 1796, + 1797, + 1798, + 1799, + 1800, + 1801, + 1802, + 1803, + 1804, + 1805, + 1806, + 1807, + 1808, + 1809, + 1810, + 1811, + 1812, + 1813, + 1814, + 1815, + 1816, + 1817, + 1818, + 1819, + 1820, + 1821, + 1822, + 1823, + 1824, + 1825, + 1826, + 1827, + 1828, + 1829, + 1830, + 1831, + 1832, + 1833, + 1834, + 1835, + 1836, + 1837, + 1838, + 1839, + 1840, + 1841, + 1842, + 1843, + 1844, + 1845, + 1846, + 1847, + 1848, + 1849, + 1850, + 1851, + 1852, + 1853, + 1854, + 1855, + 1856, + 1857, + 1858, + 1859, + 1860, + 1861, + 1862, + 1863, + 1864, + 1865, + 1866, + 1867, + 1868, + 1869, + 1870, + 1871, + 1872, + 1873, + 1874, + 1875, + 1876, + 1877, + 1878, + 1879, + 1880, + 1881, + 1882, + 1883, + 1884, + 1885, + 1886, + 1887, + 1888, + 1889, + 1890, + 1891, + 1892, + 1893, + 1894, + 1895, + 1896, + 1897, + 1898, + 1899, + 1900, + 1901, + 1902, + 1903, + 1904, + 1905, + 1906, + 1907, + 1908, + 1909, + 1910, + 1911, + 1912, + 1913, + 1914, + 1915, + 1916, + 1917, + 1918, + 1919, + 1920, + 1921, + 1922, + 1923, + 1924, + 1925, + 1926, + 1927, + 1928, + 1929, + 1930, + 1931, + 1932, + 1933, + 1934, + 1935, + 1936, + 1937, + 1938, + 1939, + 1940, + 1941, + 1942, + 1943, + 1944, + 1945, + 1946, + 1947, + 1948, + 1949, + 1950, + 1951, + 1952, + 1953, + 1954, + 1955, + 1956, + 1957, + 1958, + 1959, + 1960, + 1961, + 1962, + 1963, + 1964, + 1965, + 1966, + 1967, + 1968, + 1969, + 1970, + 1971, + 1972, + 1973, + 1974, + 1975, + 1976, + 1977, + 1978, + 1979, + 1980, + 1981, + 1982, + 1983, + 1984, + 1985, + 1986, + 1987, + 1988, + 1989, + 1990, + 1991, + 1992, + 1993, + 1994, + 1995, + 1996, + 1997, + 1998, + 1999, + 2000, + 2001, + 2002, + 2003, + 2004, + 2005, + 2006, + 2007, + 2008, + 2009, + 2010, + 2011, + 2012, + 2013, + 2014, + 2015, + 2016, + 2017, + 2018, + 2019, + 2020, + 2021, + 2022, + 2023, + 2024, + 2025, + 2026, + 2027, + 2028, + 2029, + 2030, + 2031, + 2032, + 2033, + 2034, + 2035, + 2036, + 2037, + 2038, + 2039, + 2040, + 2041, + 2042, + 2043, + 2044, + 2045, + 2046, + 2047, + 2048, + 2049, + 2050, + 2051, + 2052, + 2053, + 2054, + 2055, + 2056, + 2057, + 2058, + 2059, + 2060, + 2061, + 2062, + 2063, + 2064, + 2065, + 2066, + 2067, + 2068, + 2069, + 2070, + 2071, + 2072, + 2073, + 2074, + 2075, + 2076, + 2077, + 2078, + 2079, + 2080, + 2081, + 2082, + 2083, + 2084, + 2085, + 2086, + 2087, + 2088, + 2089, + 2090, + 2091, + 2092, + 2093, + 2094, + 2095, + 2096, + 2097, + 2098, + 2099, + 2100, + 2101, + 2102, + 2103, + 2104, + 2105, + 2106, + 2107, + 2108, + 2109, + 2110, + 2111, + 2112, + 2113, + 2114, + 2115, + 2116, + 2117, + 2118, + 2119, + 2120, + 2121, + 2122, + 2123, + 2124, + 2125, + 2126, + 2127, + 2128, + 2129, + 2130, + 2131, + 2132, + 2133, + 2134, + 2135, + 2136, + 2137, + 2138, + 2139, + 2140, + 2141, + 2142, + 2143, + 2144, + 2145, + 2146, + 2147, + 2148, + 2149, + 2150, + 2151, + 2152, + 2153, + 2154, + 2155, + 2156, + 2157, + 2158, + 2159, + 2160, + 2161, + 2162, + 2163, + 2164, + 2165, + 2166, + 2167, + 2168, + 2169, + 2170, + 2171, + 2172, + 2173, + 2174, + 2175, + 2176, + 2177, + 2178, + 2179, + 2180, + 2181, + 2182, + 2183, + 2184, + 2185, + 2186, + 2187, + 2188, + 2189, + 2190, + 2191, + 2192, + 2193, + 2194, + 2195, + 2196, + 2197, + 2198, + 2199, + 2200, + 2201, + 2202, + 2203, + 2204, + 2205, + 2206, + 2207, + 2208, + 2209, + 2210, + 2211, + 2212, + 2213, + 2214, + 2215, + 2216, + 2217, + 2218, + 2219, + 2220, + 2221, + 2222, + 2223, + 2224, + 2225, + 2226, + 2227, + 2228, + 2229, + 2230, + 2231, + 2232, + 2233, + 2234, + 2235, + 2236, + 2237, + 2238, + 2239, + 2240, + 2241, + 2242, + 2243, + 2244, + 2245, + 2246, + 2247, + 2248, + 2249, + 2250, + 2251, + 2252, + 2253, + 2254, + 2255, + 2256, + 2257, + 2258, + 2259, + 2260, + 2261, + 2262, + 2263, + 2264, + 2265, + 2266, + 2267, + 2268, + 2269, + 2270, + 2271, + 2272, + 2273, + 2274, + 2275, + 2276, + 2277, + 2278, + 2279, + 2280, + 2281, + 2282, + 2283, + 2284, + 2285, + 2286, + 2287, + 2288, + 2289, + 2290, + 2291, + 2292, + 2293, + 2294, + 2295, + 2296, + 2297, + 2298, + 2299, + 2300, + 2301, + 2302, + 2303, + 2304, + 2305, + 2306, + 2307, + 2308, + 2309, + 2310, + 2311, + 2312, + 2313, + 2314, + 2315, + 2316, + 2317, + 2318, + 2319, + 2320, + 2321, + 2322, + 2323, + 2324, + 2325, + 2326, + 2327, + 2328, + 2329, + 2330, + 2331, + 2332, + 2333, + 2334, + 2335, + 2336, + 2337, + 2338, + 2339, + 2340, + 2341, + 2342, + 2343, + 2344, + 2345, + 2346, + 2347, + 2348, + 2349, + 2350, + 2351, + 2352, + 2353, + 2354, + 2355, + 2356, + 2357, + 2358, + 2359, + 2360, + 2361, + 2362, + 2363, + 2364, + 2365, + 2366, + 2367, + 2368, + 2369, + 2370, + 2371, + 2372, + 2373, + 2374, + 2375, + 2376, + 2377, + 2378, + 2379, + 2380, + 2381, + 2382, + 2383, + 2384, + 2385, + 2386, + 2387, + 2388, + 2389, + 2390, + 2391, + 2392, + 2393, + 2394, + 2395, + 2396, + 2397, + 2398, + 2399, + 2400, + 2401, + 2402, + 2403, + 2404, + 2405, + 2406, + 2407, + 2408, + 2409, + 2410, + 2411, + 2412, + 2413, + 2414, + 2415, + 2416, + 2417, + 2418, + 2419, + 2420, + 2421, + 2422, + 2423, + 2424, + 2425, + 2426, + 2427, + 2428, + 2429, + 2430, + 2431, + 2432, + 2433, + 2434, + 2435, + 2436, + 2437, + 2438, + 2439, + 2440, + 2441, + 2442, + 2443, + 2444, + 2445, + 2446, + 2447, + 2448, + 2449, + 2450, + 2451, + 2452, + 2453, + 2454, + 2455, + 2456, + 2457, + 2458, + 2459, + 2460, + 2461, + 2462, + 2463, + 2464, + 2465, + 2466, + 2467, + 2468, + 2469, + 2470, + 2471, + 2472, + 2473, + 2474, + 2475, + 2476, + 2477, + 2478, + 2479, + 2480, + 2481, + 2482, + 2483, + 2484, + 2485, + 2486, + 2487, + 2488, + 2489, + 2490, + 2491, + 2492, + 2493, + 2494, + 2495, + 2496, + 2497, + 2498, + 2499, + 2500, + 2501, + 2502, + 2503, + 2504, + 2505, + 2506, + 2507, + 2508, + 2509, + 2510, + 2511, + 2512, + 2513, + 2514, + 2515, + 2516, + 2517, + 2518, + 2519, + 2520, + 2521, + 2522, + 2523, + 2524, + 2525, + 2526, + 2527, + 2528, + 2529, + 2530, + 2531, + 2532, + 2533, + 2534, + 2535, + 2536, + 2537, + 2538, + 2539, + 2540, + 2541, + 2542, + 2543, + 2544, + 2545, + 2546, + 2547, + 2548, + 2549, + 2550, + 2551, + 2552, + 2553, + 2554, + 2555, + 2556, + 2557, + 2558, + 2559, + 2560, + 2561, + 2562, + 2563, + 2564, + 2565, + 2566, + 2567, + 2568, + 2569, + 2570, + 2571, + 2572, + 2573, + 2574, + 2575, + 2576, + 2577, + 2578, + 2579, + 2580, + 2581, + 2582, + 2583, + 2584, + 2585, + 2586, + 2587, + 2588, + 2589, + 2590, + 2591, + 2592, + 2593, + 2594, + 2595, + 2596, + 2597, + 2598, + 2599, + 2600, + 2601, + 2602, + 2603, + 2604, + 2605, + 2606, + 2607, + 2608, + 2609, + 2610, + 2611, + 2612, + 2613, + 2614, + 2615, + 2616, + 2617, + 2618, + 2619, + 2620, + 2621, + 2622, + 2623, + 2624, + 2625, + 2626, + 2627, + 2628, + 2629, + 2630, + 2631, + 2632, + 2633, + 2634, + 2635, + 2636, + 2637, + 2638, + 2639, + 2640, + 2641, + 2642, + 2643, + 2644, + 2645, + 2646, + 2647, + 2648, + 2649, + 2650, + 2651, + 2652, + 2653, + 2654, + 2655, + 2656, + 2657, + 2658, + 2659, + 2660, + 2661, + 2662, + 2663, + 2664, + 2665, + 2666, + 2667, + 2668, + 2669, + 2670, + 2671, + 2672, + 2673, + 2674, + 2675, + 2676, + 2677, + 2678, + 2679, + 2680, + 2681, + 2682, + 2683, + 2684, + 2685, + 2686, + 2687, + 2688, + 2689, + 2690, + 2691, + 2692, + 2693, + 2694, + 2695, + 2696, + 2697, + 2698, + 2699, + 2700, + 2701, + 2702, + 2703, + 2704, + 2705, + 2706, + 2707, + 2708, + 2709, + 2710, + 2711, + 2712, + 2713, + 2714, + 2715, + 2716, + 2717, + 2718, + 2719, + 2720, + 2721, + 2722, + 2723, + 2724, + 2725, + 2726, + 2727, + 2728, + 2729, + 2730, + 2731, + 2732, + 2733, + 2734, + 2735, + 2736, + 2737, + 2738, + 2739, + 2740, + 2741, + 2742, + 2743, + 2744, + 2745, + 2746, + 2747, + 2748, + 2749, + 2750, + 2751, + 2752, + 2753, + 2754, + 2755, + 2756, + 2757, + 2758, + 2759, + 2760, + 2761, + 2762, + 2763, + 2764, + 2765, + 2766, + 2767, + 2768, + 2769, + 2770, + 2771, + 2772, + 2773, + 2774, + 2775, + 2776, + 2777, + 2778, + 2779, + 2780, + 2781, + 2782, + 2783, + 2784, + 2785, + 2786, + 2787, + 2788, + 2789, + 2790, + 2791, + 2792, + 2793, + 2794, + 2795, + 2796, + 2797, + 2798, + 2799, + 2800, + 2801, + 2802, + 2803, + 2804, + 2805, + 2806, + 2807, + 2808, + 2809, + 2810, + 2811, + 2812, + 2813, + 2814, + 2815, + 2816, + 2817, + 2818, + 2819, + 2820, + 2821, + 2822, + 2823, + 2824, + 2825, + 2826, + 2827, + 2828, + 2829, + 2830, + 2831, + 2832, + 2833, + 2834, + 2835, + 2836, + 2837, + 2838, + 2839, + 2840, + 2841, + 2842, + 2843, + 2844, + 2845, + 2846, + 2847, + 2848, + 2849, + 2850, + 2851, + 2852, + 2853, + 2854, + 2855, + 2856, + 2857, + 2858, + 2859, + 2860, + 2861, + 2862, + 2863, + 2864, + 2865, + 2866, + 2867, + 2868, + 2869, + 2870, + 2871, + 2872, + 2873, + 2874, + 2875, + 2876, + 2877, + 2878, + 2879, + 2880, + 2881, + 2882, + 2883, + 2884, + 2885, + 2886, + 2887, + 2888, + 2889, + 2890, + 2891, + 2892, + 2893, + 2894, + 2895, + 2896, + 2897, + 2898, + 2899, + 2900, + 2901, + 2902, + 2903, + 2904, + 2905, + 2906, + 2907, + 2908, + 2909, + 2910, + 2911, + 2912, + 2913, + 2914, + 2915, + 2916, + 2917, + 2918, + 2919, + 2920, + 2921, + 2922, + 2923, + 2924, + 2925, + 2926, + 2927, + 2928, + 2929, + 2930, + 2931, + 2932, + 2933, + 2934, + 2935, + 2936, + 2937, + 2938, + 2939, + 2940, + 2941, + 2942, + 2943, + 2944, + 2945, + 2946, + 2947, + 2948, + 2949, + 2950, + 2951, + 2952, + 2953, + 2954, + 2955, + 2956, + 2957, + 2958, + 2959, + 2960, + 2961, + 2962, + 2963, + 2964, + 2965, + 2966, + 2967, + 2968, + 2969, + 2970, + 2971, + 2972, + 2973, + 2974, + 2975, + 2976, + 2977, + 2978, + 2979, + 2980, + 2981, + 2982, + 2983, + 2984, + 2985, + 2986, + 2987, + 2988, + 2989, + 2990, + 2991, + 2992, + 2993, + 2994, + 2995, + 2996, + 2997, + 2998, + 2999, + 3000, + 3001, + 3002, + 3003, + 3004, + 3005, + 3006, + 3007, + 3008, + 3009, + 3010, + 3011, + 3012, + 3013, + 3014, + 3015, + 3016, + 3017, + 3018, + 3019, + 3020, + 3021, + 3022, + 3023, + 3024, + 3025, + 3026, + 3027, + 3028, + 3029, + 3030, + 3031, + 3032, + 3033, + 3034, + 3035, + 3036, + 3037, + 3038, + 3039, + 3040, + 3041, + 3042, + 3043, + 3044, + 3045, + 3046, + 3047, + 3048, + 3049, + 3050, + 3051, + 3052, + 3053, + 3054, + 3055, + 3056, + 3057, + 3058, + 3059, + 3060, + 3061, + 3062, + 3063, + 3064, + 3065, + 3066, + 3067, + 3068, + 3069, + 3070, + 3071, + 3072, + 3073, + 3074, + 3075, + 3076, + 3077, + 3078, + 3079, + 3080, + 3081, + 3082, + 3083, + 3084, + 3085, + 3086, + 3087, + 3088, + 3089, + 3090, + 3091, + 3092, + 3093, + 3094, + 3095, + 3096, + 3097, + 3098, + 3099, + 3100, + 3101, + 3102, + 3103, + 3104, + 3105, + 3106, + 3107, + 3108, + 3109, + 3110, + 3111, + 3112, + 3113, + 3114, + 3115, + 3116, + 3117, + 3118, + 3119, + 3120, + 3121, + 3122, + 3123, + 3124, + 3125, + 3126, + 3127, + 3128, + 3129, + 3130, + 3131, + 3132, + 3133, + 3134, + 3135, + 3136, + 3137, + 3138, + 3139, + 3140, + 3141, + 3142, + 3143, + 3144, + 3145, + 3146, + 3147, + 3148, + 3149, + 3150, + 3151, + 3152, + 3153, + 3154, + 3155, + 3156, + 3157, + 3158, + 3159, + 3160, + 3161, + 3162, + 3163, + 3164, + 3165, + 3166, + 3167, + 3168, + 3169, + 3170, + 3171, + 3172, + 3173, + 3174, + 3175, + 3176, + 3177, + 3178, + 3179, + 3180, + 3181, + 3182, + 3183, + 3184, + 3185, + 3186, + 3187, + 3188, + 3189, + 3190, + 3191, + 3192, + 3193, + 3194, + 3195, + 3196, + 3197, + 3198, + 3199, + 3200, + 3201, + 3202, + 3203, + 3204, + 3205, + 3206, + 3207, + 3208, + 3209, + 3210, + 3211, + 3212, + 3213, + 3214, + 3215, + 3216, + 3217, + 3218, + 3219, + 3220, + 3221, + 3222, + 3223, + 3224, + 3225, + 3226, + 3227, + 3228, + 3229, + 3230, + 3231, + 3232, + 3233, + 3234, + 3235, + 3236, + 3237, + 3238, + 3239, + 3240, + 3241, + 3242, + 3243, + 3244, + 3245, + 3246, + 3247, + 3248, + 3249, + 3250, + 3251, + 3252, + 3253, + 3254, + 3255, + 3256, + 3257, + 3258, + 3259, + 3260, + 3261, + 3262, + 3263, + 3264, + 3265, + 3266, + 3267, + 3268, + 3269, + 3270, + 3271, + 3272, + 3273, + 3274, + 3275, + 3276, + 3277, + 3278, + 3279, + 3280, + 3281, + 3282, + 3283, + 3284, + 3285, + 3286, + 3287, + 3288, + 3289, + 3290, + 3291, + 3292, + 3293, + 3294, + 3295, + 3296, + 3297, + 3298, + 3299, + 3300, + 3301, + 3302, + 3303, + 3304, + 3305, + 3306, + 3307, + 3308, + 3309, + 3310, + 3311, + 3312, + 3313, + 3314, + 3315, + 3316, + 3317, + 3318, + 3319, + 3320, + 3321, + 3322, + 3323, + 3324, + 3325, + 3326, + 3327, + 3328, + 3329, + 3330, + 3331, + 3332, + 3333, + 3334, + 3335, + 3336, + 3337, + 3338, + 3339, + 3340, + 3341, + 3342, + 3343, + 3344, + 3345, + 3346, + 3347, + 3348, + 3349, + 3350, + 3351, + 3352, + 3353, + 3354, + 3355, + 3356, + 3357, + 3358, + 3359, + 3360, + 3361, + 3362, + 3363, + 3364, + 3365, + 3366, + 3367, + 3368, + 3369, + 3370, + 3371, + 3372, + 3373, + 3374, + 3375, + 3376, + 3377, + 3378, + 3379, + 3380, + 3381, + 3382, + 3383, + 3384, + 3385, + 3386, + 3387, + 3388, + 3389, + 3390, + 3391, + 3392, + 3393, + 3394, + 3395, + 3396, + 3397, + 3398, + 3399, + 3400, + 3401, + 3402, + 3403, + 3404, + 3405, + 3406, + 3407, + 3408, + 3409, + 3410, + 3411, + 3412, + 3413, + 3414, + 3415, + 3416, + 3417, + 3418, + 3419, + 3420, + 3421, + 3422, + 3423, + 3424, + 3425, + 3426, + 3427, + 3428, + 3429, + 3430, + 3431, + 3432, + 3433, + 3434, + 3435, + 3436, + 3437, + 3438, + 3439, + 3440, + 3441, + 3442, + 3443, + 3444, + 3445, + 3446, + 3447, + 3448, + 3449, + 3450, + 3451, + 3452, + 3453, + 3454, + 3455, + 3456, + 3457, + 3458, + 3459, + 3460, + 3461, + 3462, + 3463, + 3464, + 3465, + 3466, + 3467, + 3468, + 3469, + 3470, + 3471, + 3472, + 3473, + 3474, + 3475, + 3476, + 3477, + 3478, + 3479, + 3480, + 3481, + 3482, + 3483, + 3484, + 3485, + 3486, + 3487, + 3488, + 3489, + 3490, + 3491, + 3492, + 3493, + 3494, + 3495, + 3496, + 3497, + 3498, + 3499, + 3500, + 3501, + 3502, + 3503, + 3504, + 3505, + 3506, + 3507, + 3508, + 3509, + 3510, + 3511, + 3512, + 3513, + 3514, + 3515, + 3516, + 3517, + 3518, + 3519, + 3520, + 3521, + 3522, + 3523, + 3524, + 3525, + 3526, + 3527, + 3528, + 3529, + 3530, + 3531, + 3532, + 3533, + 3534, + 3535, + 3536, + 3537, + 3538, + 3539, + 3540, + 3541, + 3542, + 3543, + 3544, + 3545, + 3546, + 3547, + 3548, + 3549, + 3550, + 3551, + 3552, + 3553, + 3554, + 3555, + 3556, + 3557, + 3558, + 3559, + 3560, + 3561, + 3562, + 3563, + 3564, + 3565, + 3566, + 3567, + 3568, + 3569, + 3570, + 3571, + 3572, + 3573, + 3574, + 3575, + 3576, + 3577, + 3578, + 3579, + 3580, + 3581, + 3582, + 3583, + 3584, + 3585, + 3586, + 3587, + 3588, + 3589, + 3590, + 3591, + 3592, + 3593, + 3594, + 3595, + 3596, + 3597, + 3598, + 3599, + 3600, + 3601, + 3602, + 3603, + 3604, + 3605, + 3606, + 3607, + 3608, + 3609, + 3610, + 3611, + 3612, + 3613, + 3614, + 3615, + 3616, + 3617, + 3618, + 3619, + 3620, + 3621, + 3622, + 3623, + 3624, + 3625, + 3626, + 3627, + 3628, + 3629, + 3630, + 3631, + 3632, + 3633, + 3634, + 3635, + 3636, + 3637, + 3638, + 3639, + 3640, + 3641, + 3642, + 3643, + 3644, + 3645, + 3646, + 3647, + 3648, + 3649, + 3650, + 3651, + 3652, + 3653, + 3654, + 3655, + 3656, + 3657, + 3658, + 3659, + 3660, + 3661, + 3662, + 3663, + 3664, + 3665, + 3666, + 3667, + 3668, + 3669, + 3670, + 3671, + 3672, + 3673, + 3674, + 3675, + 3676, + 3677, + 3678, + 3679, + 3680, + 3681, + 3682, + 3683, + 3684, + 3685, + 3686, + 3687, + 3688, + 3689, + 3690, + 3691, + 3692, + 3693, + 3694, + 3695, + 3696, + 3697, + 3698, + 3699, + 3700, + 3701, + 3702, + 3703, + 3704, + 3705, + 3706, + 3707, + 3708, + 3709, + 3710, + 3711, + 3712, + 3713, + 3714, + 3715, + 3716, + 3717, + 3718, + 3719, + 3720, + 3721, + 3722, + 3723, + 3724, + 3725, + 3726, + 3727, + 3728, + 3729, + 3730, + 3731, + 3732, + 3733, + 3734, + 3735, + 3736, + 3737, + 3738, + 3739, + 3740, + 3741, + 3742, + 3743, + 3744, + 3745, + 3746, + 3747, + 3748, + 3749, + 3750, + 3751, + 3752, + 3753, + 3754, + 3755, + 3756, + 3757, + 3758, + 3759, + 3760, + 3761, + 3762, + 3763, + 3764, + 3765, + 3766, + 3767, + 3768, + 3769, + 3770, + 3771, + 3772, + 3773, + 3774, + 3775, + 3776, + 3777, + 3778, + 3779, + 3780, + 3781, + 3782, + 3783, + 3784, + 3785, + 3786, + 3787, + 3788, + 3789, + 3790, + 3791, + 3792, + 3793, + 3794, + 3795, + 3796, + 3797, + 3798, + 3799, + 3800, + 3801, + 3802, + 3803, + 3804, + 3805, + 3806, + 3807, + 3808, + 3809, + 3810, + 3811, + 3812, + 3813, + 3814, + 3815, + 3816, + 3817, + 3818, + 3819, + 3820, + 3821, + 3822, + 3823, + 3824, + 3825, + 3826, + 3827, + 3828, + 3829, + 3830, + 3831, + 3832, + 3833, + 3834, + 3835, + 3836, + 3837, + 3838, + 3839, + 3840, + 3841, + 3842, + 3843, + 3844, + 3845, + 3846, + 3847, + 3848, + 3849, + 3850, + 3851, + 3852, + 3853, + 3854, + 3855, + 3856, + 3857, + 3858, + 3859, + 3860, + 3861, + 3862, + 3863, + 3864, + 3865, + 3866, + 3867, + 3868, + 3869, + 3870, + 3871, + 3872, + 3873, + 3874, + 3875, + 3876, + 3877, + 3878, + 3879, + 3880, + 3881, + 3882, + 3883, + 3884, + 3885, + 3886, + 3887, + 3888, + 3889, + 3890, + 3891, + 3892, + 3893, + 3894, + 3895, + 3896, + 3897, + 3898, + 3899, + 3900, + 3901, + 3902, + 3903, + 3904, + 3905, + 3906, + 3907, + 3908, + 3909, + 3910, + 3911, + 3912, + 3913, + 3914, + 3915, + 3916, + 3917, + 3918, + 3919, + 3920, + 3921, + 3922, + 3923, + 3924, + 3925, + 3926, + 3927, + 3928, + 3929, + 3930, + 3931, + 3932, + 3933, + 3934, + 3935, + 3936, + 3937, + 3938, + 3939, + 3940, + 3941, + 3942, + 3943, + 3944, + 3945, + 3946, + 3947, + 3948, + 3949, + 3950, + 3951, + 3952, + 3953, + 3954, + 3955, + 3956, + 3957, + 3958, + 3959, + 3960, + 3961, + 3962, + 3963, + 3964, + 3965, + 3966, + 3967, + 3968, + 3969, + 3970, + 3971, + 3972, + 3973, + 3974, + 3975, + 3976, + 3977, + 3978, + 3979, + 3980, + 3981, + 3982, + 3983, + 3984, + 3985, + 3986, + 3987, + 3988, + 3989, + 3990, + 3991, + 3992, + 3993, + 3994, + 3995, + 3996, + 3997, + 3998, + 3999, + 4000, + 4001, + 4002, + 4003, + 4004, + 4005, + 4006, + 4007, + 4008, + 4009, + 4010, + 4011, + 4012, + 4013, + 4014, + 4015, + 4016, + 4017, + 4018, + 4019, + 4020, + 4021, + 4022, + 4023, + 4024, + 4025, + 4026, + 4027, + 4028, + 4029, + 4030, + 4031, + 4032, + 4033, + 4034, + 4035, + 4036, + 4037, + 4038, + 4039, + 4040, + 4041, + 4042, + 4043, + 4044, + 4045, + 4046, + 4047, + 4048, + 4049, + 4050, + 4051, + 4052, + 4053, + 4054, + 4055, + 4056, + 4057, + 4058, + 4059, + 4060, + 4061, + 4062, + 4063, + 4064, + 4065, + 4066, + 4067, + 4068, + 4069, + 4070, + 4071, + 4072, + 4073, + 4074, + 4075, + 4076, + 4077, + 4078, + 4079, + 4080, + 4081, + 4082, + 4083, + 4084, + 4085, + 4086, + 4087, + 4088, + 4089, + 4090, + 4091, + 4092, + 4093, + 4094, + 4095, + 4096, + 4097, + 4098, + 4099, + 4100, + 4101, + 4102, + 4103, + 4104, + 4105, + 4106, + 4107, + 4108, + 4109, + 4110, + 4111, + 4112, + 4113, + 4114, + 4115, + 4116, + 4117, + 4118, + 4119, + 4120, + 4121, + 4122, + 4123, + 4124, + 4125, + 4126, + 4127, + 4128, + 4129, + 4130, + 4131, + 4132, + 4133, + 4134, + 4135, + 4136, + 4137, + 4138, + 4139, + 4140, + 4141, + 4142, + 4143, + 4144, + 4145, + 4146, + 4147, + 4148, + 4149, + 4150, + 4151, + 4152, + 4153, + 4154, + 4155, + 4156, + 4157, + 4158, + 4159, + 4160, + 4161, + 4162, + 4163, + 4164, + 4165, + 4166, + 4167, + 4168, + 4169, + 4170, + 4171, + 4172, + 4173, + 4174, + 4175, + 4176, + 4177, + 4178, + 4179, + 4180, + 4181, + 4182, + 4183, + 4184, + 4185, + 4186, + 4187, + 4188, + 4189, + 4190, + 4191, + 4192, + 4193, + 4194, + 4195, + 4196, + 4197, + 4198, + 4199, + 4200, + 4201, + 4202, + 4203, + 4204, + 4205, + 4206, + 4207, + 4208, + 4209, + 4210, + 4211, + 4212, + 4213, + 4214, + 4215, + 4216, + 4217, + 4218, + 4219, + 4220, + 4221, + 4222, + 4223, + 4224, + 4225, + 4226, + 4227, + 4228, + 4229, + 4230, + 4231, + 4232, + 4233, + 4234, + 4235, + 4236, + 4237, + 4238, + 4239, + 4240, + 4241, + 4242, + 4243, + 4244, + 4245, + 4246, + 4247, + 4248, + 4249, + 4250, + 4251, + 4252, + 4253, + 4254, + 4255, + 4256, + 4257, + 4258, + 4259, + 4260, + 4261, + 4262, + 4263, + 4264, + 4265, + 4266, + 4267, + 4268, + 4269, + 4270, + 4271, + 4272, + 4273, + 4274, + 4275, + 4276, + 4277, + 4278, + 4279, + 4280, + 4281, + 4282, + 4283, + 4284, + 4285, + 4286, + 4287, + 4288, + 4289, + 4290, + 4291, + 4292, + 4293, + 4294, + 4295, + 4296, + 4297, + 4298, + 4299, + 4300, + 4301, + 4302, + 4303, + 4304, + 4305, + 4306, + 4307, + 4308, + 4309, + 4310, + 4311, + 4312, + 4313, + 4314, + 4315, + 4316, + 4317, + 4318, + 4319, + 4320, + 4321, + 4322, + 4323, + 4324, + 4325, + 4326, + 4327, + 4328, + 4329, + 4330, + 4331, + 4332, + 4333, + 4334, + 4335, + 4336, + 4337, + 4338, + 4339, + 4340, + 4341, + 4342, + 4343, + 4344, + 4345, + 4346, + 4347, + 4348, + 4349, + 4350, + 4351, + 4352, + 4353, + 4354, + 4355, + 4356, + 4357, + 4358, + 4359, + 4360, + 4361, + 4362, + 4363, + 4364, + 4365, + 4366, + 4367, + 4368, + 4369, + 4370, + 4371, + 4372, + 4373, + 4374, + 4375, + 4376, + 4377, + 4378, + 4379, + 4380, + 4381, + 4382, + 4383, + 4384, + 4385, + 4386, + 4387, + 4388, + 4389, + 4390, + 4391, + 4392, + 4393, + 4394, + 4395, + 4396, + 4397, + 4398, + 4399, + 4400, + 4401, + 4402, + 4403, + 4404, + 4405, + 4406, + 4407, + 4408, + 4409, + 4410, + 4411, + 4412, + 4413, + 4414, + 4415, + 4416, + 4417, + 4418, + 4419, + 4420, + 4421, + 4422, + 4423, + 4424, + 4425, + 4426, + 4427, + 4428, + 4429, + 4430, + 4431, + 4432, + 4433, + 4434, + 4435, + 4436, + 4437, + 4438, + 4439, + 4440, + 4441, + 4442, + 4443, + 4444, + 4445, + 4446, + 4447, + 4448, + 4449, + 4450, + 4451, + 4452, + 4453, + 4454, + 4455, + 4456, + 4457, + 4458, + 4459, + 4460, + 4461, + 4462, + 4463, + 4464, + 4465, + 4466, + 4467, + 4468, + 4469, + 4470, + 4471, + 4472, + 4473, + 4474, + 4475, + 4476, + 4477, + 4478, + 4479, + 4480, + 4481, + 4482, + 4483, + 4484, + 4485, + 4486, + 4487, + 4488, + 4489, + 4490, + 4491, + 4492, + 4493, + 4494, + 4495, + 4496, + 4497, + 4498, + 4499, + 4500, + 4501, + 4502, + 4503, + 4504, + 4505, + 4506, + 4507, + 4508, + 4509, + 4510, + 4511, + 4512, + 4513, + 4514, + 4515, + 4516, + 4517, + 4518, + 4519, + 4520, + 4521, + 4522, + 4523, + 4524, + 4525, + 4526, + 4527, + 4528, + 4529, + 4530, + 4531, + 4532, + 4533, + 4534, + 4535, + 4536, + 4537, + 4538, + 4539, + 4540, + 4541, + 4542, + 4543, + 4544, + 4545, + 4546, + 4547, + 4548, + 4549, + 4550, + 4551, + 4552, + 4553, + 4554, + 4555, + 4556, + 4557, + 4558, + 4559, + 4560, + 4561, + 4562, + 4563, + 4564, + 4565, + 4566, + 4567, + 4568, + 4569, + 4570, + 4571, + 4572, + 4573, + 4574, + 4575, + 4576, + 4577, + 4578, + 4579, + 4580, + 4581, + 4582, + 4583, + 4584, + 4585, + 4586, + 4587, + 4588, + 4589, + 4590, + 4591, + 4592, + 4593, + 4594, + 4595, + 4596, + 4597, + 4598, + 4599, + 4600, + 4601, + 4602, + 4603, + 4604, + 4605, + 4606, + 4607, + 4608, + 4609, + 4610, + 4611, + 4612, + 4613, + 4614, + 4615, + 4616, + 4617, + 4618, + 4619, + 4620, + 4621, + 4622, + 4623, + 4624, + 4625, + 4626, + 4627, + 4628, + 4629, + 4630, + 4631, + 4632, + 4633, + 4634, + 4635, + 4636, + 4637, + 4638, + 4639, + 4640, + 4641, + 4642, + 4643, + 4644, + 4645, + 4646, + 4647, + 4648, + 4649, + 4650, + 4651, + 4652, + 4653, + 4654, + 4655, + 4656, + 4657, + 4658, + 4659, + 4660, + 4661, + 4662, + 4663, + 4664, + 4665, + 4666, + 4667, + 4668, + 4669, + 4670, + 4671, + 4672, + 4673, + 4674, + 4675, + 4676, + 4677, + 4678, + 4679, + 4680, + 4681, + 4682, + 4683, + 4684, + 4685, + 4686, + 4687, + 4688, + 4689, + 4690, + 4691, + 4692, + 4693, + 4694, + 4695, + 4696, + 4697, + 4698, + 4699, + 4700, + 4701, + 4702, + 4703, + 4704, + 4705, + 4706, + 4707, + 4708, + 4709, + 4710, + 4711, + 4712, + 4713, + 4714, + 4715, + 4716, + 4717, + 4718, + 4719, + 4720, + 4721, + 4722, + 4723, + 4724, + 4725, + 4726, + 4727, + 4728, + 4729, + 4730, + 4731, + 4732, + 4733, + 4734, + 4735, + 4736, + 4737, + 4738, + 4739, + 4740, + 4741, + 4742, + 4743, + 4744, + 4745, + 4746, + 4747, + 4748, + 4749, + 4750, + 4751, + 4752, + 4753, + 4754, + 4755, + 4756, + 4757, + 4758, + 4759, + 4760, + 4761, + 4762, + 4763, + 4764, + 4765, + 4766, + 4767, + 4768, + 4769, + 4770, + 4771, + 4772, + 4773, + 4774, + 4775, + 4776, + 4777, + 4778, + 4779, + 4780, + 4781, + 4782, + 4783, + 4784, + 4785, + 4786, + 4787, + 4788, + 4789, + 4790, + 4791, + 4792, + 4793, + 4794, + 4795, + 4796, + 4797, + 4798, + 4799, + 4800, + 4801, + 4802, + 4803, + 4804, + 4805, + 4806, + 4807, + 4808, + 4809, + 4810, + 4811, + 4812, + 4813, + 4814, + 4815, + 4816, + 4817, + 4818, + 4819, + 4820, + 4821, + 4822, + 4823, + 4824, + 4825, + 4826, + 4827, + 4828, + 4829, + 4830, + 4831, + 4832, + 4833, + 4834, + 4835, + 4836, + 4837, + 4838, + 4839, + 4840, + 4841, + 4842, + 4843, + 4844, + 4845, + 4846, + 4847, + 4848, + 4849, + 4850, + 4851, + 4852, + 4853, + 4854, + 4855, + 4856, + 4857, + 4858, + 4859, + 4860, + 4861, + 4862, + 4863, + 4864, + 4865, + 4866, + 4867, + 4868, + 4869, + 4870, + 4871, + 4872, + 4873, + 4874, + 4875, + 4876, + 4877, + 4878, + 4879, + 4880, + 4881, + 4882, + 4883, + 4884, + 4885, + 4886, + 4887, + 4888, + 4889, + 4890, + 4891, + 4892, + 4893, + 4894, + 4895, + 4896, + 4897, + 4898, + 4899, + 4900, + 4901, + 4902, + 4903, + 4904, + 4905, + 4906, + 4907, + 4908, + 4909, + 4910, + 4911, + 4912, + 4913, + 4914, + 4915, + 4916, + 4917, + 4918, + 4919, + 4920, + 4921, + 4922, + 4923, + 4924, + 4925, + 4926, + 4927, + 4928, + 4929, + 4930, + 4931, + 4932, + 4933, + 4934, + 4935, + 4936, + 4937, + 4938, + 4939, + 4940, + 4941, + 4942, + 4943, + 4944, + 4945, + 4946, + 4947, + 4948, + 4949, + 4950, + 4951, + 4952, + 4953, + 4954, + 4955, + 4956, + 4957, + 4958, + 4959, + 4960, + 4961, + 4962, + 4963, + 4964, + 4965, + 4966, + 4967, + 4968, + 4969, + 4970, + 4971, + 4972, + 4973, + 4974, + 4975, + 4976, + 4977, + 4978, + 4979, + 4980, + 4981, + 4982, + 4983, + 4984, + 4985, + 4986, + 4987, + 4988, + 4989, + 4990, + 4991, + 4992, + 4993, + 4994, + 4995, + 4996, + 4997, + 4998, + 4999, + 5000, + 5001, + 5002, + 5003, + 5004, + 5005, + 5006, + 5007, + 5008, + 5009, + 5010, + 5011, + 5012, + 5013, + 5014, + 5015, + 5016, + 5017, + 5018, + 5019, + 5020, + 5021, + 5022, + 5023, + 5024, + 5025, + 5026, + 5027, + 5028, + 5029, + 5030, + 5031, + 5032, + 5033, + 5034, + 5035, + 5036, + 5037, + 5038, + 5039, + 5040, + 5041, + 5042, + 5043, + 5044, + 5045, + 5046, + 5047, + 5048, + 5049, + 5050, + 5051, + 5052, + 5053, + 5054, + 5055, + 5056, + 5057, + 5058, + 5059, + 5060, + 5061, + 5062, + 5063, + 5064, + 5065, + 5066, + 5067, + 5068, + 5069, + 5070, + 5071, + 5072, + 5073, + 5074, + 5075, + 5076, + 5077, + 5078, + 5079, + 5080, + 5081, + 5082, + 5083, + 5084, + 5085, + 5086, + 5087, + 5088, + 5089, + 5090, + 5091, + 5092, + 5093, + 5094, + 5095, + 5096, + 5097, + 5098, + 5099, + 5100, + 5101, + 5102, + 5103, + 5104, + 5105, + 5106, + 5107, + 5108, + 5109, + 5110, + 5111, + 5112, + 5113, + 5114, + 5115, + 5116, + 5117, + 5118, + 5119, + 5120, + 5121, + 5122, + 5123, + 5124, + 5125, + 5126, + 5127, + 5128, + 5129, + 5130, + 5131, + 5132, + 5133, + 5134, + 5135, + 5136, + 5137, + 5138, + 5139, + 5140, + 5141, + 5142, + 5143, + 5144, + 5145, + 5146, + 5147, + 5148, + 5149, + 5150, + 5151, + 5152, + 5153, + 5154, + 5155, + 5156, + 5157, + 5158, + 5159, + 5160, + 5161, + 5162, + 5163, + 5164, + 5165, + 5166, + 5167, + 5168, + 5169, + 5170, + 5171, + 5172, + 5173, + 5174, + 5175, + 5176, + 5177, + 5178, + 5179, + 5180, + 5181, + 5182, + 5183, + 5184, + 5185, + 5186, + 5187, + 5188, + 5189, + 5190, + 5191, + 5192, + 5193, + 5194, + 5195, + 5196, + 5197, + 5198, + 5199, + 5200, + 5201, + 5202, + 5203, + 5204, + 5205, + 5206, + 5207, + 5208, + 5209, + 5210, + 5211, + 5212, + 5213, + 5214, + 5215, + 5216, + 5217, + 5218, + 5219, + 5220, + 5221, + 5222, + 5223, + 5224, + 5225, + 5226, + 5227, + 5228, + 5229, + 5230, + 5231, + 5232, + 5233, + 5234, + 5235, + 5236, + 5237, + 5238, + 5239, + 5240, + 5241, + 5242, + 5243, + 5244, + 5245, + 5246, + 5247, + 5248, + 5249, + 5250, + 5251, + 5252, + 5253, + 5254, + 5255, + 5256, + 5257, + 5258, + 5259, + 5260, + 5261, + 5262, + 5263, + 5264, + 5265, + 5266, + 5267, + 5268, + 5269, + 5270, + 5271, + 5272, + 5273, + 5274, + 5275, + 5276, + 5277, + 5278, + 5279, + 5280, + 5281, + 5282, + 5283, + 5284, + 5285, + 5286, + 5287, + 5288, + 5289, + 5290, + 5291, + 5292, + 5293, + 5294, + 5295, + 5296, + 5297, + 5298, + 5299, + 5300, + 5301, + 5302, + 5303, + 5304, + 5305, + 5306, + 5307, + 5308, + 5309, + 5310, + 5311, + 5312, + 5313, + 5314, + 5315, + 5316, + 5317, + 5318, + 5319, + 5320, + 5321, + 5322, + 5323, + 5324, + 5325, + 5326, + 5327, + 5328, + 5329, + 5330, + 5331, + 5332, + 5333, + 5334, + 5335, + 5336, + 5337, + 5338, + 5339, + 5340, + 5341, + 5342, + 5343, + 5344, + 5345, + 5346, + 5347, + 5348, + 5349, + 5350, + 5351, + 5352, + 5353, + 5354, + 5355, + 5356, + 5357, + 5358, + 5359, + 5360, + 5361, + 5362, + 5363, + 5364, + 5365, + 5366, + 5367, + 5368, + 5369, + 5370, + 5371, + 5372, + 5373, + 5374, + 5375, + 5376, + 5377, + 5378, + 5379, + 5380, + 5381, + 5382, + 5383, + 5384, + 5385, + 5386, + 5387, + 5388, + 5389, + 5390, + 5391, + 5392, + 5393, + 5394, + 5395, + 5396, + 5397, + 5398, + 5399, + 5400, + 5401, + 5402, + 5403, + 5404, + 5405, + 5406, + 5407, + 5408, + 5409, + 5410, + 5411, + 5412, + 5413, + 5414, + 5415, + 5416, + 5417, + 5418, + 5419, + 5420, + 5421, + 5422, + 5423, + 5424, + 5425, + 5426, + 5427, + 5428, + 5429, + 5430, + 5431, + 5432, + 5433, + 5434, + 5435, + 5436, + 5437, + 5438, + 5439, + 5440, + 5441, + 5442, + 5443, + 5444, + 5445, + 5446, + 5447, + 5448, + 5449, + 5450, + 5451, + 5452, + 5453, + 5454, + 5455, + 5456, + 5457, + 5458, + 5459, + 5460, + 5461, + 5462, + 5463, + 5464, + 5465, + 5466, + 5467, + 5468, + 5469, + 5470, + 5471, + 5472, + 5473, + 5474, + 5475, + 5476, + 5477, + 5478, + 5479, + 5480, + 5481, + 5482, + 5483, + 5484, + 5485, + 5486, + 5487, + 5488, + 5489, + 5490, + 5491, + 5492, + 5493, + 5494, + 5495, + 5496, + 5497, + 5498, + 5499, + 5500, + 5501, + 5502, + 5503, + 5504, + 5505, + 5506, + 5507, + 5508, + 5509, + 5510, + 5511, + 5512, + 5513, + 5514, + 5515, + 5516, + 5517, + 5518, + 5519, + 5520, + 5521, + 5522, + 5523, + 5524, + 5525, + 5526, + 5527, + 5528, + 5529, + 5530, + 5531, + 5532, + 5533, + 5534, + 5535, + 5536, + 5537, + 5538, + 5539, + 5540, + 5541, + 5542, + 5543, + 5544, + 5545, + 5546, + 5547, + 5548, + 5549, + 5550, + 5551, + 5552, + 5553, + 5554, + 5555, + 5556, + 5557, + 5558, + 5559, + 5560, + 5561, + 5562, + 5563, + 5564, + 5565, + 5566, + 5567, + 5568, + 5569, + 5570, + 5571, + 5572, + 5573, + 5574, + 5575, + 5576, + 5577, + 5578, + 5579, + 5580, + 5581, + 5582, + 5583, + 5584, + 5585, + 5586, + 5587, + 5588, + 5589, + 5590, + 5591, + 5592, + 5593, + 5594, + 5595, + 5596, + 5597, + 5598, + 5599, + 5600, + 5601, + 5602, + 5603, + 5604, + 5605, + 5606, + 5607, + 5608, + 5609, + 5610, + 5611, + 5612, + 5613, + 5614, + 5615, + 5616, + 5617, + 5618, + 5619, + 5620, + 5621, + 5622, + 5623, + 5624, + 5625, + 5626, + 5627, + 5628, + 5629, + 5630, + 5631, + 5632, + 5633, + 5634, + 5635, + 5636, + 5637, + 5638, + 5639, + 5640, + 5641, + 5642, + 5643, + 5644, + 5645, + 5646, + 5647, + 5648, + 5649, + 5650, + 5651, + 5652, + 5653, + 5654, + 5655, + 5656, + 5657, + 5658, + 5659, + 5660, + 5661, + 5662, + 5663, + 5664, + 5665, + 5666, + 5667, + 5668, + 5669, + 5670, + 5671, + 5672, + 5673, + 5674, + 5675, + 5676, + 5677, + 5678, + 5679, + 5680, + 5681, + 5682, + 5683, + 5684, + 5685, + 5686, + 5687, + 5688, + 5689, + 5690, + 5691, + 5692, + 5693, + 5694, + 5695, + 5696, + 5697, + 5698, + 5699, + 5700, + 5701, + 5702, + 5703, + 5704, + 5705, + 5706, + 5707, + 5708, + 5709, + 5710, + 5711, + 5712, + 5713, + 5714, + 5715, + 5716, + 5717, + 5718, + 5719, + 5720, + 5721, + 5722, + 5723, + 5724, + 5725, + 5726, + 5727, + 5728, + 5729, + 5730, + 5731, + 5732, + 5733, + 5734, + 5735, + 5736, + 5737, + 5738, + 5739, + 5740, + 5741, + 5742, + 5743, + 5744, + 5745, + 5746, + 5747, + 5748, + 5749, + 5750, + 5751, + 5752, + 5753, + 5754, + 5755, + 5756, + 5757, + 5758, + 5759, + 5760, + 5761, + 5762, + 5763, + 5764, + 5765, + 5766, + 5767, + 5768, + 5769, + 5770, + 5771, + 5772, + 5773, + 5774, + 5775, + 5776, + 5777, + 5778, + 5779, + 5780, + 5781, + 5782, + 5783, + 5784, + 5785, + 5786, + 5787, + 5788, + 5789, + 5790, + 5791, + 5792, + 5793, + 5794, + 5795, + 5796, + 5797, + 5798, + 5799, + 5800, + 5801, + 5802, + 5803, + 5804, + 5805, + 5806, + 5807, + 5808, + 5809, + 5810, + 5811, + 5812, + 5813, + 5814, + 5815, + 5816, + 5817, + 5818, + 5819, + 5820, + 5821, + 5822, + 5823, + 5824, + 5825, + 5826, + 5827, + 5828, + 5829, + 5830, + 5831, + 5832, + 5833, + 5834, + 5835, + 5836, + 5837, + 5838, + 5839, + 5840, + 5841, + 5842, + 5843, + 5844, + 5845, + 5846, + 5847, + 5848, + 5849, + 5850, + 5851, + 5852, + 5853, + 5854, + 5855, + 5856, + 5857, + 5858, + 5859, + 5860, + 5861, + 5862, + 5863, + 5864, + 5865, + 5866, + 5867, + 5868, + 5869, + 5870, + 5871, + 5872, + 5873, + 5874, + 5875, + 5876, + 5877, + 5878, + 5879, + 5880, + 5881, + 5882, + 5883, + 5884, + 5885, + 5886, + 5887, + 5888, + 5889, + 5890, + 5891, + 5892, + 5893, + 5894, + 5895, + 5896, + 5897, + 5898, + 5899, + 5900, + 5901, + 5902, + 5903, + 5904, + 5905, + 5906, + 5907, + 5908, + 5909, + 5910, + 5911, + 5912, + 5913, + 5914, + 5915, + 5916, + 5917, + 5918, + 5919, + 5920, + 5921, + 5922, + 5923, + 5924, + 5925, + 5926, + 5927, + 5928, + 5929, + 5930, + 5931, + 5932, + 5933, + 5934, + 5935, + 5936, + 5937, + 5938, + 5939, + 5940, + 5941, + 5942, + 5943, + 5944, + 5945, + 5946, + 5947, + 5948, + 5949, + 5950, + 5951, + 5952, + 5953, + 5954, + 5955, + 5956, + 5957, + 5958, + 5959, + 5960, + 5961, + 5962, + 5963, + 5964, + 5965, + 5966, + 5967, + 5968, + 5969, + 5970, + 5971, + 5972, + 5973, + 5974, + 5975, + 5976, + 5977, + 5978, + 5979, + 5980, + 5981, + 5982, + 5983, + 5984, + 5985, + 5986, + 5987, + 5988, + 5989, + 5990, + 5991, + 5992, + 5993, + 5994, + 5995, + 5996, + 5997, + 5998, + 5999, + 6000, + 6001, + 6002, + 6003, + 6004, + 6005, + 6006, + 6007, + 6008, + 6009, + 6010, + 6011, + 6012, + 6013, + 6014, + 6015, + 6016, + 6017, + 6018, + 6019, + 6020, + 6021, + 6022, + 6023, + 6024, + 6025, + 6026, + 6027, + 6028, + 6029, + 6030, + 6031, + 6032, + 6033, + 6034, + 6035, + 6036, + 6037, + 6038, + 6039, + 6040, + 6041, + 6042, + 6043, + 6044, + 6045, + 6046, + 6047, + 6048, + 6049, + 6050, + 6051, + 6052, + 6053, + 6054, + 6055, + 6056, + 6057, + 6058, + 6059, + 6060, + 6061, + 6062, + 6063, + 6064, + 6065, + 6066, + 6067, + 6068, + 6069, + 6070, + 6071, + 6072, + 6073, + 6074, + 6075, + 6076, + 6077, + 6078, + 6079, + 6080, + 6081, + 6082, + 6083, + 6084, + 6085, + 6086, + 6087, + 6088, + 6089, + 6090, + 6091, + 6092, + 6093, + 6094, + 6095, + 6096, + 6097, + 6098, + 6099, + 6100, + 6101, + 6102, + 6103, + 6104, + 6105, + 6106, + 6107, + 6108, + 6109, + 6110, + 6111, + 6112, + 6113, + 6114, + 6115, + 6116, + 6117, + 6118, + 6119, + 6120, + 6121, + 6122, + 6123, + 6124, + 6125, + 6126, + 6127, + 6128, + 6129, + 6130, + 6131, + 6132, + 6133, + 6134, + 6135, + 6136, + 6137, + 6138, + 6139, + 6140, + 6141, + 6142, + 6143, + 6144, + 6145, + 6146, + 6147, + 6148, + 6149, + 6150, + 6151, + 6152, + 6153, + 6154, + 6155, + 6156, + 6157, + 6158, + 6159, + 6160, + 6161, + 6162, + 6163, + 6164, + 6165, + 6166, + 6167, + 6168, + 6169, + 6170, + 6171, + 6172, + 6173, + 6174, + 6175, + 6176, + 6177, + 6178, + 6179, + 6180, + 6181, + 6182, + 6183, + 6184, + 6185, + 6186, + 6187, + 6188, + 6189, + 6190, + 6191, + 6192, + 6193, + 6194, + 6195, + 6196, + 6197, + 6198, + 6199, + 6200, + 6201, + 6202, + 6203, + 6204, + 6205, + 6206, + 6207, + 6208, + 6209, + 6210, + 6211, + 6212, + 6213, + 6214, + 6215, + 6216, + 6217, + 6218, + 6219, + 6220, + 6221, + 6222, + 6223, + 6224, + 6225, + 6226, + 6227, + 6228, + 6229, + 6230, + 6231, + 6232, + 6233, + 6234, + 6235, + 6236, + 6237, + 6238, + 6239, + 6240, + 6241, + 6242, + 6243, + 6244, + 6245, + 6246, + 6247, + 6248, + 6249, + 6250, + 6251, + 6252, + 6253, + 6254, + 6255, + 6256, + 6257, + 6258, + 6259, + 6260, + 6261, + 6262, + 6263, + 6264, + 6265, + 6266, + 6267, + 6268, + 6269, + 6270, + 6271, + 6272, + 6273, + 6274, + 6275, + 6276, + 6277, + 6278, + 6279, + 6280, + 6281, + 6282, + 6283, + 6284, + 6285, + 6286, + 6287, + 6288, + 6289, + 6290, + 6291, + 6292, + 6293, + 6294, + 6295, + 6296, + 6297, + 6298, + 6299, + 6300, + 6301, + 6302, + 6303, + 6304, + 6305, + 6306, + 6307, + 6308, + 6309, + 6310, + 6311, + 6312, + 6313, + 6314, + 6315, + 6316, + 6317, + 6318, + 6319, + 6320, + 6321, + 6322, + 6323, + 6324, + 6325, + 6326, + 6327, + 6328, + 6329, + 6330, + 6331, + 6332, + 6333, + 6334, + 6335, + 6336, + 6337, + 6338, + 6339, + 6340, + 6341, + 6342, + 6343, + 6344, + 6345, + 6346, + 6347, + 6348, + 6349, + 6350, + 6351, + 6352, + 6353, + 6354, + 6355, + 6356, + 6357, + 6358, + 6359, + 6360, + 6361, + 6362, + 6363, + 6364, + 6365, + 6366, + 6367, + 6368, + 6369, + 6370, + 6371, + 6372, + 6373, + 6374, + 6375, + 6376, + 6377, + 6378, + 6379, + 6380, + 6381, + 6382, + 6383, + 6384, + 6385, + 6386, + 6387, + 6388, + 6389, + 6390, + 6391, + 6392, + 6393, + 6394, + 6395, + 6396, + 6397, + 6398, + 6399, + 6400, + 6401, + 6402, + 6403, + 6404, + 6405, + 6406, + 6407, + 6408, + 6409, + 6410, + 6411, + 6412, + 6413, + 6414, + 6415, + 6416, + 6417, + 6418, + 6419, + 6420, + 6421, + 6422, + 6423, + 6424, + 6425, + 6426, + 6427, + 6428, + 6429, + 6430, + 6431, + 6432, + 6433, + 6434, + 6435, + 6436, + 6437, + 6438, + 6439, + 6440, + 6441, + 6442, + 6443, + 6444, + 6445, + 6446, + 6447, + 6448, + 6449, + 6450, + 6451, + 6452, + 6453, + 6454, + 6455, + 6456, + 6457, + 6458, + 6459, + 6460, + 6461, + 6462, + 6463, + 6464, + 6465, + 6466, + 6467, + 6468, + 6469, + 6470, + 6471, + 6472, + 6473, + 6474, + 6475, + 6476, + 6477, + 6478, + 6479, + 6480, + 6481, + 6482, + 6483, + 6484, + 6485, + 6486, + 6487, + 6488, + 6489, + 6490, + 6491, + 6492, + 6493, + 6494, + 6495, + 6496, + 6497, + 6498, + 6499, + 6500, + 6501, + 6502, + 6503, + 6504, + 6505, + 6506, + 6507, + 6508, + 6509, + 6510, + 6511, + 6512, + 6513, + 6514, + 6515, + 6516, + 6517, + 6518, + 6519, + 6520, + 6521, + 6522, + 6523, + 6524, + 6525, + 6526, + 6527, + 6528, + 6529, + 6530, + 6531, + 6532, + 6533, + 6534, + 6535, + 6536, + 6537, + 6538, + 6539, + 6540, + 6541, + 6542, + 6543, + 6544, + 6545, + 6546, + 6547, + 6548, + 6549, + 6550, + 6551, + 6552, + 6553, + 6554, + 6555, + 6556, + 6557, + 6558, + 6559, + 6560, + 6561, + 6562, + 6563, + 6564, + 6565, + 6566, + 6567, + 6568, + 6569, + 6570, + 6571, + 6572, + 6573, + 6574, + 6575, + 6576, + 6577, + 6578, + 6579, + 6580, + 6581, + 6582, + 6583, + 6584, + 6585, + 6586, + 6587, + 6588, + 6589, + 6590, + 6591, + 6592, + 6593, + 6594, + 6595, + 6596, + 6597, + 6598, + 6599, + 6600, + 6601, + 6602, + 6603, + 6604, + 6605, + 6606, + 6607, + 6608, + 6609, + 6610, + 6611, + 6612, + 6613, + 6614, + 6615, + 6616, + 6617, + 6618, + 6619, + 6620, + 6621, + 6622, + 6623, + 6624, + 6625, + 6626, + 6627, + 6628, + 6629, + 6630, + 6631, + 6632, + 6633, + 6634, + 6635, + 6636, + 6637, + 6638, + 6639, + 6640, + 6641, + 6642, + 6643, + 6644, + 6645, + 6646, + 6647, + 6648, + 6649, + 6650, + 6651, + 6652, + 6653, + 6654, + 6655, + 6656, + 6657, + 6658, + 6659, + 6660, + 6661, + 6662, + 6663, + 6664, + 6665, + 6666, + 6667, + 6668, + 6669, + 6670, + 6671, + 6672, + 6673, + 6674, + 6675, + 6676, + 6677, + 6678, + 6679, + 6680, + 6681, + 6682, + 6683, + 6684, + 6685, + 6686, + 6687, + 6688, + 6689, + 6690, + 6691, + 6692, + 6693, + 6694, + 6695, + 6696, + 6697, + 6698, + 6699, + 6700, + 6701, + 6702, + 6703, + 6704, + 6705, + 6706, + 6707, + 6708, + 6709, + 6710, + 6711, + 6712, + 6713, + 6714, + 6715, + 6716, + 6717, + 6718, + 6719, + 6720, + 6721, + 6722, + 6723, + 6724, + 6725, + 6726, + 6727, + 6728, + 6729, + 6730, + 6731, + 6732, + 6733, + 6734, + 6735, + 6736, + 6737, + 6738, + 6739, + 6740, + 6741, + 6742, + 6743, + 6744, + 6745, + 6746, + 6747, + 6748, + 6749, + 6750, + 6751, + 6752, + 6753, + 6754, + 6755, + 6756, + 6757, + 6758, + 6759, + 6760, + 6761, + 6762, + 6763, + 6764, + 6765, + 6766, + 6767, + 6768, + 6769, + 6770, + 6771, + 6772, + 6773, + 6774, + 6775, + 6776, + 6777, + 6778, + 6779, + 6780, + 6781, + 6782, + 6783, + 6784, + 6785, + 6786, + 6787, + 6788, + 6789, + 6790, + 6791, + 6792, + 6793, + 6794, + 6795, + 6796, + 6797, + 6798, + 6799, + 6800, + 6801, + 6802, + 6803, + 6804, + 6805, + 6806, + 6807, + 6808, + 6809, + 6810, + 6811, + 6812, + 6813, + 6814, + 6815, + 6816, + 6817, + 6818, + 6819, + 6820, + 6821, + 6822, + 6823, + 6824, + 6825, + 6826, + 6827, + 6828, + 6829, + 6830, + 6831, + 6832, + 6833, + 6834, + 6835, + 6836, + 6837, + 6838, + 6839, + 6840, + 6841, + 6842, + 6843, + 6844, + 6845, + 6846, + 6847, + 6848, + 6849, + 6850, + 6851, + 6852, + 6853, + 6854, + 6855, + 6856, + 6857, + 6858, + 6859, + 6860, + 6861, + 6862, + 6863, + 6864, + 6865, + 6866, + 6867, + 6868, + 6869, + 6870, + 6871, + 6872, + 6873, + 6874, + 6875, + 6876, + 6877, + 6878, + 6879, + 6880, + 6881, + 6882, + 6883, + 6884, + 6885, + 6886, + 6887, + 6888, + 6889, + 6890, + 6891, + 6892, + 6893, + 6894, + 6895, + 6896, + 6897, + 6898, + 6899, + 6900, + 6901, + 6902, + 6903, + 6904, + 6905, + 6906, + 6907, + 6908, + 6909, + 6910, + 6911, + 6912, + 6913, + 6914, + 6915, + 6916, + 6917, + 6918, + 6919, + 6920, + 6921, + 6922, + 6923, + 6924, + 6925, + 6926, + 6927, + 6928, + 6929, + 6930, + 6931, + 6932, + 6933, + 6934, + 6935, + 6936, + 6937, + 6938, + 6939, + 6940, + 6941, + 6942, + 6943, + 6944, + 6945, + 6946, + 6947, + 6948, + 6949, + 6950, + 6951, + 6952, + 6953, + 6954, + 6955, + 6956, + 6957, + 6958, + 6959, + 6960, + 6961, + 6962, + 6963, + 6964, + 6965, + 6966, + 6967, + 6968, + 6969, + 6970, + 6971, + 6972, + 6973, + 6974, + 6975, + 6976, + 6977, + 6978, + 6979, + 6980, + 6981, + 6982, + 6983, + 6984, + 6985, + 6986, + 6987, + 6988, + 6989, + 6990, + 6991, + 6992, + 6993, + 6994, + 6995, + 6996, + 6997, + 6998, + 6999, + 7000, + 7001, + 7002, + 7003, + 7004, + 7005, + 7006, + 7007, + 7008, + 7009, + 7010, + 7011, + 7012, + 7013, + 7014, + 7015, + 7016, + 7017, + 7018, + 7019, + 7020, + 7021, + 7022, + 7023, + 7024, + 7025, + 7026, + 7027, + 7028, + 7029, + 7030, + 7031, + 7032, + 7033, + 7034, + 7035, + 7036, + 7037, + 7038, + 7039, + 7040, + 7041, + 7042, + 7043, + 7044, + 7045, + 7046, + 7047, + 7048, + 7049, + 7050, + 7051, + 7052, + 7053, + 7054, + 7055, + 7056, + 7057, + 7058, + 7059, + 7060, + 7061, + 7062, + 7063, + 7064, + 7065, + 7066, + 7067, + 7068, + 7069, + 7070, + 7071, + 7072, + 7073, + 7074, + 7075, + 7076, + 7077, + 7078, + 7079, + 7080, + 7081, + 7082, + 7083, + 7084, + 7085, + 7086, + 7087, + 7088, + 7089, + 7090, + 7091, + 7092, + 7093, + 7094, + 7095, + 7096, + 7097, + 7098, + 7099, + 7100, + 7101, + 7102, + 7103, + 7104, + 7105, + 7106, + 7107, + 7108, + 7109, + 7110, + 7111, + 7112, + 7113, + 7114, + 7115, + 7116, + 7117, + 7118, + 7119, + 7120, + 7121, + 7122, + 7123, + 7124, + 7125, + 7126, + 7127, + 7128, + 7129, + 7130, + 7131, + 7132, + 7133, + 7134, + 7135, + 7136, + 7137, + 7138, + 7139, + 7140, + 7141, + 7142, + 7143, + 7144, + 7145, + 7146, + 7147, + 7148, + 7149, + 7150, + 7151, + 7152, + 7153, + 7154, + 7155, + 7156, + 7157, + 7158, + 7159, + 7160, + 7161, + 7162, + 7163, + 7164, + 7165, + 7166, + 7167, + 7168, + 7169, + 7170, + 7171, + 7172, + 7173, + 7174, + 7175, + 7176, + 7177, + 7178, + 7179, + 7180, + 7181, + 7182, + 7183, + 7184, + 7185, + 7186, + 7187, + 7188, + 7189, + 7190, + 7191, + 7192, + 7193, + 7194, + 7195, + 7196, + 7197, + 7198, + 7199, + 7200, + 7201, + 7202, + 7203, + 7204, + 7205, + 7206, + 7207, + 7208, + 7209, + 7210, + 7211, + 7212, + 7213, + 7214, + 7215, + 7216, + 7217, + 7218, + 7219, + 7220, + 7221, + 7222, + 7223, + 7224, + 7225, + 7226, + 7227, + 7228, + 7229, + 7230, + 7231, + 7232, + 7233, + 7234, + 7235, + 7236, + 7237, + 7238, + 7239, + 7240, + 7241, + 7242, + 7243, + 7244, + 7245, + 7246, + 7247, + 7248, + 7249, + 7250, + 7251, + 7252, + 7253, + 7254, + 7255, + 7256, + 7257, + 7258, + 7259, + 7260, + 7261, + 7262, + 7263, + 7264, + 7265, + 7266, + 7267, + 7268, + 7269, + 7270, + 7271, + 7272, + 7273, + 7274, + 7275, + 7276, + 7277, + 7278, + 7279, + 7280, + 7281, + 7282, + 7283, + 7284, + 7285, + 7286, + 7287, + 7288, + 7289, + 7290, + 7291, + 7292, + 7293, + 7294, + 7295, + 7296, + 7297, + 7298, + 7299, + 7300, + 7301, + 7302, + 7303, + 7304, + 7305, + 7306, + 7307, + 7308, + 7309, + 7310, + 7311, + 7312, + 7313, + 7314, + 7315, + 7316, + 7317, + 7318, + 7319, + 7320, + 7321, + 7322, + 7323, + 7324, + 7325, + 7326, + 7327, + 7328, + 7329, + 7330, + 7331, + 7332, + 7333, + 7334, + 7335, + 7336, + 7337, + 7338, + 7339, + 7340, + 7341, + 7342, + 7343, + 7344, + 7345, + 7346, + 7347, + 7348, + 7349, + 7350, + 7351, + 7352, + 7353, + 7354, + 7355, + 7356, + 7357, + 7358, + 7359, + 7360, + 7361, + 7362, + 7363, + 7364, + 7365, + 7366, + 7367, + 7368, + 7369, + 7370, + 7371, + 7372, + 7373, + 7374, + 7375, + 7376, + 7377, + 7378, + 7379, + 7380, + 7381, + 7382, + 7383, + 7384, + 7385, + 7386, + 7387, + 7388, + 7389, + 7390, + 7391, + 7392, + 7393, + 7394, + 7395, + 7396, + 7397, + 7398, + 7399, + 7400, + 7401, + 7402, + 7403, + 7404, + 7405, + 7406, + 7407, + 7408, + 7409, + 7410, + 7411, + 7412, + 7413, + 7414, + 7415, + 7416, + 7417, + 7418, + 7419, + 7420, + 7421, + 7422, + 7423, + 7424, + 7425, + 7426, + 7427, + 7428, + 7429, + 7430, + 7431, + 7432, + 7433, + 7434, + 7435, + 7436, + 7437, + 7438, + 7439, + 7440, + 7441, + 7442, + 7443, + 7444, + 7445, + 7446, + 7447, + 7448, + 7449, + 7450, + 7451, + 7452, + 7453, + 7454, + 7455, + 7456, + 7457, + 7458, + 7459, + 7460, + 7461, + 7462, + 7463, + 7464, + 7465, + 7466, + 7467, + 7468, + 7469, + 7470, + 7471, + 7472, + 7473, + 7474, + 7475, + 7476, + 7477, + 7478, + 7479, + 7480, + 7481, + 7482, + 7483, + 7484, + 7485, + 7486, + 7487, + 7488, + 7489, + 7490, + 7491, + 7492, + 7493, + 7494, + 7495, + 7496, + 7497, + 7498, + 7499, + 7500, + 7501, + 7502, + 7503, + 7504, + 7505, + 7506, + 7507, + 7508, + 7509, + 7510, + 7511, + 7512, + 7513, + 7514, + 7515, + 7516, + 7517, + 7518, + 7519, + 7520, + 7521, + 7522, + 7523, + 7524, + 7525, + 7526, + 7527, + 7528, + 7529, + 7530, + 7531, + 7532, + 7533, + 7534, + 7535, + 7536, + 7537, + 7538, + 7539, + 7540, + 7541, + 7542, + 7543, + 7544, + 7545, + 7546, + 7547, + 7548, + 7549, + 7550, + 7551, + 7552, + 7553, + 7554, + 7555, + 7556, + 7557, + 7558, + 7559, + 7560, + 7561, + 7562, + 7563, + 7564, + 7565, + 7566, + 7567, + 7568, + 7569, + 7570, + 7571, + 7572, + 7573, + 7574, + 7575, + 7576, + 7577, + 7578, + 7579, + 7580, + 7581, + 7582, + 7583, + 7584, + 7585, + 7586, + 7587, + 7588, + 7589, + 7590, + 7591, + 7592, + 7593, + 7594, + 7595, + 7596, + 7597, + 7598, + 7599, + 7600, + 7601, + 7602, + 7603, + 7604, + 7605, + 7606, + 7607, + 7608, + 7609, + 7610, + 7611, + 7612, + 7613, + 7614, + 7615, + 7616, + 7617, + 7618, + 7619, + 7620, + 7621, + 7622, + 7623, + 7624, + 7625, + 7626, + 7627, + 7628, + 7629, + 7630, + 7631, + 7632, + 7633, + 7634, + 7635, + 7636, + 7637, + 7638, + 7639, + 7640, + 7641, + 7642, + 7643, + 7644, + 7645, + 7646, + 7647, + 7648, + 7649, + 7650, + 7651, + 7652, + 7653, + 7654, + 7655, + 7656, + 7657, + 7658, + 7659, + 7660, + 7661, + 7662, + 7663, + 7664, + 7665, + 7666, + 7667, + 7668, + 7669, + 7670, + 7671, + 7672, + 7673, + 7674, + 7675, + 7676, + 7677, + 7678, + 7679, + 7680, + 7681, + 7682, + 7683, + 7684, + 7685, + 7686, + 7687, + 7688, + 7689, + 7690, + 7691, + 7692, + 7693, + 7694, + 7695, + 7696, + 7697, + 7698, + 7699, + 7700, + 7701, + 7702, + 7703, + 7704, + 7705, + 7706, + 7707, + 7708, + 7709, + 7710, + 7711, + 7712, + 7713, + 7714, + 7715, + 7716, + 7717, + 7718, + 7719, + 7720, + 7721, + 7722, + 7723, + 7724, + 7725, + 7726, + 7727, + 7728, + 7729, + 7730, + 7731, + 7732, + 7733, + 7734, + 7735, + 7736, + 7737, + 7738, + 7739, + 7740, + 7741, + 7742, + 7743, + 7744, + 7745, + 7746, + 7747, + 7748, + 7749, + 7750, + 7751, + 7752, + 7753, + 7754, + 7755, + 7756, + 7757, + 7758, + 7759, + 7760, + 7761, + 7762, + 7763, + 7764, + 7765, + 7766, + 7767, + 7768, + 7769, + 7770, + 7771, + 7772, + 7773, + 7774, + 7775, + 7776, + 7777, + 7778, + 7779, + 7780, + 7781, + 7782, + 7783, + 7784, + 7785, + 7786, + 7787, + 7788, + 7789, + 7790, + 7791, + 7792, + 7793, + 7794, + 7795, + 7796, + 7797, + 7798, + 7799, + 7800, + 7801, + 7802, + 7803, + 7804, + 7805, + 7806, + 7807, + 7808, + 7809, + 7810, + 7811, + 7812, + 7813, + 7814, + 7815, + 7816, + 7817, + 7818, + 7819, + 7820, + 7821, + 7822, + 7823, + 7824, + 7825, + 7826, + 7827, + 7828, + 7829, + 7830, + 7831, + 7832, + 7833, + 7834, + 7835, + 7836, + 7837, + 7838, + 7839, + 7840, + 7841, + 7842, + 7843, + 7844, + 7845, + 7846, + 7847, + 7848, + 7849, + 7850, + 7851, + 7852, + 7853, + 7854, + 7855, + 7856, + 7857, + 7858, + 7859, + 7860, + 7861, + 7862, + 7863, + 7864, + 7865, + 7866, + 7867, + 7868, + 7869, + 7870, + 7871, + 7872, + 7873, + 7874, + 7875, + 7876, + 7877, + 7878, + 7879, + 7880, + 7881, + 7882, + 7883, + 7884, + 7885, + 7886, + 7887, + 7888, + 7889, + 7890, + 7891, + 7892, + 7893, + 7894, + 7895, + 7896, + 7897, + 7898, + 7899, + 7900, + 7901, + 7902, + 7903, + 7904, + 7905, + 7906, + 7907, + 7908, + 7909, + 7910, + 7911, + 7912, + 7913, + 7914, + 7915, + 7916, + 7917, + 7918, + 7919, + 7920, + 7921, + 7922, + 7923, + 7924, + 7925, + 7926, + 7927, + 7928, + 7929, + 7930, + 7931, + 7932, + 7933, + 7934, + 7935, + 7936, + 7937, + 7938, + 7939, + 7940, + 7941, + 7942, + 7943, + 7944, + 7945, + 7946, + 7947, + 7948, + 7949, + 7950, + 7951, + 7952, + 7953, + 7954, + 7955, + 7956, + 7957, + 7958, + 7959, + 7960, + 7961, + 7962, + 7963, + 7964, + 7965, + 7966, + 7967, + 7968, + 7969, + 7970, + 7971, + 7972, + 7973, + 7974, + 7975, + 7976, + 7977, + 7978, + 7979, + 7980, + 7981, + 7982, + 7983, + 7984, + 7985, + 7986, + 7987, + 7988, + 7989, + 7990, + 7991, + 7992, + 7993, + 7994, + 7995, + 7996, + 7997, + 7998, + 7999, + 8000, + 8001, + 8002, + 8003, + 8004, + 8005, + 8006, + 8007, + 8008, + 8009, + 8010, + 8011, + 8012, + 8013, + 8014, + 8015, + 8016, + 8017, + 8018, + 8019, + 8020, + 8021, + 8022, + 8023, + 8024, + 8025, + 8026, + 8027, + 8028, + 8029, + 8030, + 8031, + 8032, + 8033, + 8034, + 8035, + 8036, + 8037, + 8038, + 8039, + 8040, + 8041, + 8042, + 8043, + 8044, + 8045, + 8046, + 8047, + 8048, + 8049, + 8050, + 8051, + 8052, + 8053, + 8054, + 8055, + 8056, + 8057, + 8058, + 8059, + 8060, + 8061, + 8062, + 8063, + 8064, + 8065, + 8066, + 8067, + 8068, + 8069, + 8070, + 8071, + 8072, + 8073, + 8074, + 8075, + 8076, + 8077, + 8078, + 8079, + 8080, + 8081, + 8082, + 8083, + 8084, + 8085, + 8086, + 8087, + 8088, + 8089, + 8090, + 8091, + 8092, + 8093, + 8094, + 8095, + 8096, + 8097, + 8098, + 8099, + 8100, + 8101, + 8102, + 8103, + 8104, + 8105, + 8106, + 8107, + 8108, + 8109, + 8110, + 8111, + 8112, + 8113, + 8114, + 8115, + 8116, + 8117, + 8118, + 8119, + 8120, + 8121, + 8122, + 8123, + 8124, + 8125, + 8126, + 8127, + 8128, + 8129, + 8130, + 8131, + 8132, + 8133, + 8134, + 8135, + 8136, + 8137, + 8138, + 8139, + 8140, + 8141, + 8142, + 8143, + 8144, + 8145, + 8146, + 8147, + 8148, + 8149, + 8150, + 8151, + 8152, + 8153, + 8154, + 8155, + 8156, + 8157, + 8158, + 8159, + 8160, + 8161, + 8162, + 8163, + 8164, + 8165, + 8166, + 8167, + 8168, + 8169, + 8170, + 8171, + 8172, + 8173, + 8174, + 8175, + 8176, + 8177, + 8178, + 8179, + 8180, + 8181, + 8182, + 8183, + 8184, + 8185, + 8186, + 8187, + 8188, + 8189, + 8190, + 8191, + 8192, + 8193, + 8194, + 8195, + 8196, + 8197, + 8198, + 8199, + 8200, + 8201, + 8202, + 8203, + 8204, + 8205, + 8206, + 8207, + 8208, + 8209, + 8210, + 8211, + 8212, + 8213, + 8214, + 8215, + 8216, + 8217, + 8218, + 8219, + 8220, + 8221, + 8222, + 8223, + 8224, + 8225, + 8226, + 8227, + 8228, + 8229, + 8230, + 8231, + 8232, + 8233, + 8234, + 8235, + 8236, + 8237, + 8238, + 8239, + 8240, + 8241, + 8242, + 8243, + 8244, + 8245, + 8246, + 8247, + 8248, + 8249, + 8250, + 8251, + 8252, + 8253, + 8254, + 8255, + 8256, + 8257, + 8258, + 8259, + 8260, + 8261, + 8262, + 8263, + 8264, + 8265, + 8266, + 8267, + 8268, + 8269, + 8270, + 8271, + 8272, + 8273, + 8274, + 8275, + 8276, + 8277, + 8278, + 8279, + 8280, + 8281, + 8282, + 8283, + 8284, + 8285, + 8286, + 8287, + 8288, + 8289, + 8290, + 8291, + 8292, + 8293, + 8294, + 8295, + 8296, + 8297, + 8298, + 8299, + 8300, + 8301, + 8302, + 8303, + 8304, + 8305, + 8306, + 8307, + 8308, + 8309, + 8310, + 8311, + 8312, + 8313, + 8314, + 8315, + 8316, + 8317, + 8318, + 8319, + 8320, + 8321, + 8322, + 8323, + 8324, + 8325, + 8326, + 8327, + 8328, + 8329, + 8330, + 8331, + 8332, + 8333, + 8334, + 8335, + 8336, + 8337, + 8338, + 8339, + 8340, + 8341, + 8342, + 8343, + 8344, + 8345, + 8346, + 8347, + 8348, + 8349, + 8350, + 8351, + 8352, + 8353, + 8354, + 8355, + 8356, + 8357, + 8358, + 8359, + 8360, + 8361, + 8362, + 8363, + 8364, + 8365, + 8366, + 8367, + 8368, + 8369, + 8370, + 8371, + 8372, + 8373, + 8374, + 8375, + 8376, + 8377, + 8378, + 8379, + 8380, + 8381, + 8382, + 8383, + 8384, + 8385, + 8386, + 8387, + 8388, + 8389, + 8390, + 8391, + 8392, + 8393, + 8394, + 8395, + 8396, + 8397, + 8398, + 8399, + 8400, + 8401, + 8402, + 8403, + 8404, + 8405, + 8406, + 8407, + 8408, + 8409, + 8410, + 8411, + 8412, + 8413, + 8414, + 8415, + 8416, + 8417, + 8418, + 8419, + 8420, + 8421, + 8422, + 8423, + 8424, + 8425, + 8426, + 8427, + 8428, + 8429, + 8430, + 8431, + 8432, + 8433, + 8434, + 8435, + 8436, + 8437, + 8438, + 8439, + 8440, + 8441, + 8442, + 8443, + 8444, + 8445, + 8446, + 8447, + 8448, + 8449, + 8450, + 8451, + 8452, + 8453, + 8454, + 8455, + 8456, + 8457, + 8458, + 8459, + 8460, + 8461, + 8462, + 8463, + 8464, + 8465, + 8466, + 8467, + 8468, + 8469, + 8470, + 8471, + 8472, + 8473, + 8474, + 8475, + 8476, + 8477, + 8478, + 8479, + 8480, + 8481, + 8482, + 8483, + 8484, + 8485, + 8486, + 8487, + 8488, + 8489, + 8490, + 8491, + 8492, + 8493, + 8494, + 8495, + 8496, + 8497, + 8498, + 8499, + 8500, + 8501, + 8502, + 8503, + 8504, + 8505, + 8506, + 8507, + 8508, + 8509, + 8510, + 8511, + 8512, + 8513, + 8514, + 8515, + 8516, + 8517, + 8518, + 8519, + 8520, + 8521, + 8522, + 8523, + 8524, + 8525, + 8526, + 8527, + 8528, + 8529, + 8530, + 8531, + 8532, + 8533, + 8534, + 8535, + 8536, + 8537, + 8538, + 8539, + 8540, + 8541, + 8542, + 8543, + 8544, + 8545, + 8546, + 8547, + 8548, + 8549, + 8550, + 8551, + 8552, + 8553, + 8554, + 8555, + 8556, + 8557, + 8558, + 8559, + 8560, + 8561, + 8562, + 8563, + 8564, + 8565, + 8566, + 8567, + 8568, + 8569, + 8570, + 8571, + 8572, + 8573, + 8574, + 8575, + 8576, + 8577, + 8578, + 8579, + 8580, + 8581, + 8582, + 8583, + 8584, + 8585, + 8586, + 8587, + 8588, + 8589, + 8590, + 8591, + 8592, + 8593, + 8594, + 8595, + 8596, + 8597, + 8598, + 8599, + 8600, + 8601, + 8602, + 8603, + 8604, + 8605, + 8606, + 8607, + 8608, + 8609, + 8610 + ], + "reason": "process stopped after the container memory limit was reached" +} \ No newline at end of file diff --git a/evidence/memory-experiment.png b/evidence/memory-experiment.png new file mode 100644 index 0000000000000000000000000000000000000000..84ac64d3ec49903adce18f757612b9dc0a192802 GIT binary patch literal 104191 zcmeFZcUO~X+c%1!IHHJM0l_xXi}Vhng3@~@pi)EVozO+GAfWW#As`T>C3H|nLklgC z00DwhLudk_m-o!f-1qam`;Wc$2iVtIvxG@VuAJpKe(lU#UG2xrOl(Yabac#WPaf&h z(J@Za(J{3B!3h4(Ut_JOz(2CyDyH5BZuZ`O&phquw4QmpJG*&1L!aODwe$3Xy19x8 ziQE&C7P#r??d|R*D=h5t-)9K9c{&JxvGC~uuX4)$iJ2E2-L-Vuf5+5(A`(@(j{9fui5V0#A9?k zg(M??v=7Dj@IX&}0bdRq1y9JH{s4xU=NP^F->;UV$u4U9<`kn31&<{dDf9LRm+TpC z3DVJpDczmMzPg)Gk2kOeqwp~!<9fhMqDcXy(N{nB!HE*f`l^kEAq{(M z+Kf19pipCG6jqTa>$8yJi`)A7?RD43JCB*l=Ms1gG! zP&aB;inP-0H#3E}#l;5`D4WMmo=hiC1k7bVpbQl2-4R>5Y+`xqur4%l*}x@gd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OY?PmI<{Vs`lNf<6`PU= zl^b_n1gK)@I6ETkG9x6MgM3dmRNzQJgfcU$r?SIm8mtn()&y}G>sAE@EbmE3Nt?iWam8NbQqU$uTbgVN3JL?rc1D(A zm`iVk$Mc$U?}g7R)j{jaJDalxKi^+KvRxjq8b)MAwHe@u(PAskgT4XRSOJoe3|}&6 zJuD{r$m*JBC5?btOuohQ)tTPb5=Z;R60D484pA4J7XCp&Ppl)ljSFi}B+)y}-CCY( zukUe()oOL@)7kwmC{;)pfBYFGL%(9oVt-)>xSUq@$vfPn9)2 z!A`Ue%8x-33K&Q}N7QYw5BY}d)v|RzP*Hw0?p5C1SuLf}s`2Xbs^kplcYqqYcAoF{ zqf2XCF5GB#zDv4D&NYld_I_Ia2sH%8@w_2#Swq7VDsSq|GAaoLtI0M=r_F90b*w0| z%J`cIy?Jgu(Ma^cr`Q_?;7=KV^d;)vKt$o%G%f*g4h5zA_wV;QdUl#(ry&c1mV+W) z%OcW@;2QUQG>NEA!G1AzGsBvzS~T86sw+z@l@50vju@=kpwVy>8NUb|uX{qu$-r;g~`E5!rO0VKYqLHvMNa43LbZ8wKzT-Hf87_H0d!F zK^I`pYq3!s#eXg8`MwSf{Lh9rL5R=g-sfKbV7A1OZmkN>F_n;o(jev7Wm Trz;YWKmOpJ)ZMh(PhI{Wk5)5l literal 0 HcmV?d00001 diff --git a/evidence/memory-experiment.txt b/evidence/memory-experiment.txt new file mode 100644 index 00000000..6e9dfea9 --- /dev/null +++ b/evidence/memory-experiment.txt @@ -0,0 +1,8 @@ +$ python3 scripts/memory_experiment.py --image mtusi2026lab1-messenger:arm64 --memory 64m --max-messages 20000 --output evidence/memory-experiment.json --plot evidence/memory-experiment.png +memory_limit=64m +successful_messages=8610 +failed_requests=0 +OOMKilled=true +exit_code=137 +failure_time_seconds=5.9315 +plot=evidence/memory-experiment.png diff --git a/evidence/quality.txt b/evidence/quality.txt new file mode 100644 index 00000000..300529d2 --- /dev/null +++ b/evidence/quality.txt @@ -0,0 +1,43 @@ +$ make check +env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 scripts/check_contract.py +PASS: offline skeleton structure, local refs and Python syntax; application NOT tested. + +$ go vet ./... + +$ make lint +/Users/vladislav/Projects/mtusi2026lab1-fork/bin/golangci-lint run -v +level=info msg="golangci-lint has version 2.13.2 built with go1.27.0 from (unknown, modified: ?, mod sum: \"h1:bCyq3E4vo9qwzifjpzJqYndEt7Ncva80qkk8G2B4TXU=\") on (unknown)" +level=info msg="[config_reader] Config search paths: [./ /Users/vladislav/Projects/mtusi2026lab1-fork /Users/vladislav/Projects /Users/vladislav /Users /]" +level=info msg="[config_reader] Used config file .golangci.yml" +level=info msg="[config_reader] Module name \"mtusi-messenger\"" +level=info msg="[goenv] Read go env for 5.97475ms: map[string]string{\"GOCACHE\":\"/Users/vladislav/Library/Caches/go-build\", \"GOROOT\":\"/opt/homebrew/Cellar/go/1.27.1/libexec\"}" +level=info msg="[lintersdb] Active 50 linters: [asasalint bodyclose canonicalheader containedctx contextcheck copyloopvar depguard durationcheck errcheck errname errorlint exhaustive exptostd fatcontext forbidigo forcetypeassert gocheckcompilerdirectives gocritic gofumpt goimports gomoddirectives gosec govet ineffassign intrange makezero misspell musttag nilerr nilnil noctx nolintlint perfsprint prealloc reassign recvcheck revive rowserrcheck sloglint sqlclosecheck staticcheck testifylint thelper tparallel unconvert unparam unused usestdlibvars usetesting wastedassign]" +level=info msg="[loader] Using build tags: [integration]" +level=info msg="[loader] Go packages loading at mode 8767 (compiled_files|files|name|types_sizes|deps|exports_file|imports) took 122.006042ms" +level=info msg="[runner/filename_unadjuster] Pre-built 0 adjustments in 4.792166ms" +level=info msg="[linters_context/goanalysis] analyzers took 0s with no stages" +level=info msg="[runner/exclusion_rules] Skipped 2 issues by rules: [Path: \"_test\\\\.go\", Linters: \"gosec, prealloc, forcetypeassert, unparam\"]" +level=info msg="[runner] Issues before processing: 280, after processing: 0" +level=info msg="[runner] Processors filtering stat (in/out): exclusion_paths: 280/280, invalid_issue: 280/280, path_absoluter: 280/280, filename_unadjuster: 280/280, generated_file_filter: 280/100, exclusion_rules: 100/0, cgo: 280/280, path_relativity: 280/280" +level=info msg="[runner] processing took 607.916µs with stages: generated_file_filter: 420.959µs, exclusion_rules: 86.124µs, path_relativity: 83.917µs, sort_results: 4.458µs, invalid_issue: 4.292µs, cgo: 3.959µs, path_absoluter: 1.417µs, filename_unadjuster: 792ns, max_same_issues: 582ns, nolint_filter: 457ns, fixer: 292ns, exclusion_paths: 167ns, path_prettifier: 125ns, source_code: 125ns, path_shortener: 124ns, uniq_by_line: 42ns, severity-rules: 42ns, max_per_file_from_linter: 42ns, max_from_linter: 0s, diff: 0s" +level=info msg="[runner] linters took 422.737625ms with stages: goanalysis_metalinter: 422.101875ms" +0 issues. +level=info msg="File cache stats: 0 entries of total size 0B" +level=info msg="Memory: 7 samples, avg is 87.0MB, max is 111.2MB" +level=info msg="Execution took 555.972916ms" + +$ make unit-test +go test -race -shuffle=on -count=1 -timeout=5m ./... +? mtusi-messenger/cmd/messenger [no test files] +ok mtusi-messenger/internal/config 1.838s +ok mtusi-messenger/internal/domain 1.498s +ok mtusi-messenger/internal/logger 2.150s +ok mtusi-messenger/internal/service/chat 2.470s +? mtusi-messenger/internal/service/chat/mocks [no test files] +ok mtusi-messenger/internal/service/message 2.797s +? mtusi-messenger/internal/service/message/mocks [no test files] +ok mtusi-messenger/internal/service/user 3.474s +? mtusi-messenger/internal/service/user/mocks [no test files] +ok mtusi-messenger/internal/storage/memory 3.159s +ok mtusi-messenger/internal/transport/rest 3.863s +? mtusi-messenger/internal/transport/rest/oas [no test files] diff --git a/evidence/restart.txt b/evidence/restart.txt new file mode 100644 index 00000000..f695225c --- /dev/null +++ b/evidence/restart.txt @@ -0,0 +1,10 @@ +$ docker stop mtusi2026lab1-messenger-lab1 +$ docker run -d --name mtusi2026lab1-messenger-lab1 -p 127.0.0.1:8080:8080 mtusi2026lab1-messenger:verify +$ curl -i -H "X-User-Id: " http://127.0.0.1:8080/api/v1/users/me +HTTP/1.1 401 Unauthorized +Content-Type: application/json; charset=utf-8 +X-Request-Id: eadf9c21-d861-4c2c-8e76-46f086d27a11 +Date: Thu, 24 Sep 2026 20:13:02 GMT +Content-Length: 110 + +{"error":{"code":"unauthorized","message":"Unauthorized","request_id":"eadf9c21-d861-4c2c-8e76-46f086d27a11"}} \ No newline at end of file diff --git a/evidence/sigterm.txt b/evidence/sigterm.txt new file mode 100644 index 00000000..65cf8c63 --- /dev/null +++ b/evidence/sigterm.txt @@ -0,0 +1,7 @@ +$ docker kill --signal=TERM mtusi2026lab1-messenger-lab1 +$ docker wait mtusi2026lab1-messenger-lab1 +0 +elapsed_ms=114 +{"level":"info","time":"2026-09-24T20:14:19.192628563Z","msg":"server started","addr":"0.0.0.0:8080"} +{"level":"info","time":"2026-09-24T20:14:20.186231067Z","msg":"shutdown signal received","timeout":"10s"} +{"level":"info","time":"2026-09-24T20:14:20.188996621Z","msg":"server stopped"} diff --git a/evidence/smoke.txt b/evidence/smoke.txt new file mode 100644 index 00000000..cc78c7ac --- /dev/null +++ b/evidence/smoke.txt @@ -0,0 +1,2 @@ +env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 tests/smoke.py --base-url "http://127.0.0.1:8080" +PASS: lab1 public API scenario; infrastructure and grading evidence remain separate. diff --git a/evidence/track1/baseline-storage-benchmark.txt b/evidence/track1/baseline-storage-benchmark.txt new file mode 100644 index 00000000..2565d062 --- /dev/null +++ b/evidence/track1/baseline-storage-benchmark.txt @@ -0,0 +1,21 @@ +goos: darwin +goarch: arm64 +pkg: mtusi-messenger/internal/storage/memory +cpu: Apple M5 Pro +BenchmarkMessageCreate/history=1000-18 3822346 309.5 ns/op 16 B/op 1 allocs/op +BenchmarkMessageCreate/history=1000-18 3904586 307.6 ns/op 16 B/op 1 allocs/op +BenchmarkMessageCreate/history=1000-18 3889698 308.1 ns/op 16 B/op 1 allocs/op +BenchmarkMessageCreate/history=1000-18 3892981 308.2 ns/op 16 B/op 1 allocs/op +BenchmarkMessageCreate/history=1000-18 3888345 308.3 ns/op 16 B/op 1 allocs/op +BenchmarkMessageCreate/history=10000-18 3578911 335.4 ns/op 16 B/op 1 allocs/op +BenchmarkMessageCreate/history=10000-18 3570348 335.9 ns/op 16 B/op 1 allocs/op +BenchmarkMessageCreate/history=10000-18 3581305 335.0 ns/op 16 B/op 1 allocs/op +BenchmarkMessageCreate/history=10000-18 3573933 336.0 ns/op 16 B/op 1 allocs/op +BenchmarkMessageCreate/history=10000-18 3563053 336.4 ns/op 16 B/op 1 allocs/op +BenchmarkMessageCreate/history=50000-18 3425475 349.8 ns/op 16 B/op 1 allocs/op +BenchmarkMessageCreate/history=50000-18 3435330 349.1 ns/op 16 B/op 1 allocs/op +BenchmarkMessageCreate/history=50000-18 3438290 349.3 ns/op 16 B/op 1 allocs/op +BenchmarkMessageCreate/history=50000-18 3420394 349.8 ns/op 16 B/op 1 allocs/op +BenchmarkMessageCreate/history=50000-18 3420736 350.1 ns/op 16 B/op 1 allocs/op +PASS +ok mtusi-messenger/internal/storage/memory 18.237s diff --git a/evidence/track1/baseline.json b/evidence/track1/baseline.json new file mode 100644 index 00000000..32d17dac --- /dev/null +++ b/evidence/track1/baseline.json @@ -0,0 +1,128 @@ +[ + { + "history": 100, + "concurrency": 1, + "duration_seconds": 2.002, + "successful_requests": 526, + "failed_requests": 0, + "rps": 262.791, + "p50_ms": 3.378, + "p95_ms": 4.12, + "p99_ms": 16.979, + "rss_min_kib": 18880, + "rss_max_kib": 22816, + "rss_delta_kib": 3936 + }, + { + "history": 100, + "concurrency": 4, + "duration_seconds": 2.002, + "successful_requests": 1450, + "failed_requests": 0, + "rps": 724.134, + "p50_ms": 4.18, + "p95_ms": 16.695, + "p99_ms": 21.604, + "rss_min_kib": 20512, + "rss_max_kib": 24208, + "rss_delta_kib": 3696 + }, + { + "history": 100, + "concurrency": 16, + "duration_seconds": 2.079, + "successful_requests": 2315, + "failed_requests": 0, + "rps": 1113.309, + "p50_ms": 8.563, + "p95_ms": 29.584, + "p99_ms": 93.023, + "rss_min_kib": 18880, + "rss_max_kib": 25296, + "rss_delta_kib": 6416 + }, + { + "history": 1000, + "concurrency": 1, + "duration_seconds": 2.007, + "successful_requests": 478, + "failed_requests": 0, + "rps": 238.14, + "p50_ms": 3.477, + "p95_ms": 10.892, + "p99_ms": 20.404, + "rss_min_kib": 23120, + "rss_max_kib": 23584, + "rss_delta_kib": 464 + }, + { + "history": 1000, + "concurrency": 4, + "duration_seconds": 2.003, + "successful_requests": 1380, + "failed_requests": 0, + "rps": 688.971, + "p50_ms": 4.197, + "p95_ms": 17.189, + "p99_ms": 28.458, + "rss_min_kib": 23344, + "rss_max_kib": 24592, + "rss_delta_kib": 1248 + }, + { + "history": 1000, + "concurrency": 16, + "duration_seconds": 2.005, + "successful_requests": 2298, + "failed_requests": 0, + "rps": 1146.063, + "p50_ms": 8.474, + "p95_ms": 29.384, + "p99_ms": 92.528, + "rss_min_kib": 23232, + "rss_max_kib": 26272, + "rss_delta_kib": 3040 + }, + { + "history": 5000, + "concurrency": 1, + "duration_seconds": 2.001, + "successful_requests": 494, + "failed_requests": 0, + "rps": 246.902, + "p50_ms": 3.414, + "p95_ms": 10.767, + "p99_ms": 18.996, + "rss_min_kib": 25248, + "rss_max_kib": 25296, + "rss_delta_kib": 48 + }, + { + "history": 5000, + "concurrency": 4, + "duration_seconds": 2.004, + "successful_requests": 1398, + "failed_requests": 0, + "rps": 697.712, + "p50_ms": 4.147, + "p95_ms": 17.142, + "p99_ms": 26.446, + "rss_min_kib": 24816, + "rss_max_kib": 25104, + "rss_delta_kib": 288 + }, + { + "history": 5000, + "concurrency": 16, + "duration_seconds": 2.006, + "successful_requests": 2261, + "failed_requests": 0, + "rps": 1126.862, + "p50_ms": 8.635, + "p95_ms": 24.133, + "p99_ms": 93.225, + "rss_min_kib": 25200, + "rss_max_kib": 26752, + "rss_delta_kib": 1552 + } +] diff --git a/evidence/track1/comparison.json b/evidence/track1/comparison.json new file mode 100644 index 00000000..2718ba4e --- /dev/null +++ b/evidence/track1/comparison.json @@ -0,0 +1,110 @@ +[ + { + "history": 100, + "concurrency": 1, + "rps_before": 262.791, + "p95_ms_before": 4.12, + "p99_ms_before": 16.979, + "rss_max_kib_before": 22816, + "rps_after": 265.189, + "p95_ms_after": 4.276, + "p99_ms_after": 17.123, + "rss_max_kib_after": 22736 + }, + { + "history": 100, + "concurrency": 4, + "rps_before": 724.134, + "p95_ms_before": 16.695, + "p99_ms_before": 21.604, + "rss_max_kib_before": 24208, + "rps_after": 720.55, + "p95_ms_after": 16.868, + "p99_ms_after": 21.043, + "rss_max_kib_after": 24128 + }, + { + "history": 100, + "concurrency": 16, + "rps_before": 1113.309, + "p95_ms_before": 29.584, + "p99_ms_before": 93.023, + "rss_max_kib_before": 25296, + "rps_after": 1125.923, + "p95_ms_after": 29.142, + "p99_ms_after": 91.221, + "rss_max_kib_after": 25216 + }, + { + "history": 1000, + "concurrency": 1, + "rps_before": 238.14, + "p95_ms_before": 10.892, + "p99_ms_before": 20.404, + "rss_max_kib_before": 23584, + "rps_after": 237.68, + "p95_ms_after": 11.279, + "p99_ms_after": 19.675, + "rss_max_kib_after": 23504 + }, + { + "history": 1000, + "concurrency": 4, + "rps_before": 688.971, + "p95_ms_before": 17.189, + "p99_ms_before": 28.458, + "rss_max_kib_before": 24592, + "rps_after": 667.05, + "p95_ms_after": 17.243, + "p99_ms_after": 29.938, + "rss_max_kib_after": 25280 + }, + { + "history": 1000, + "concurrency": 16, + "rps_before": 1146.063, + "p95_ms_before": 29.384, + "p99_ms_before": 92.528, + "rss_max_kib_before": 26272, + "rps_after": 1102.581, + "p95_ms_after": 30.252, + "p99_ms_after": 93.912, + "rss_max_kib_after": 25200 + }, + { + "history": 5000, + "concurrency": 1, + "rps_before": 246.902, + "p95_ms_before": 10.767, + "p99_ms_before": 18.996, + "rss_max_kib_before": 25296, + "rps_after": 241.241, + "p95_ms_after": 10.897, + "p99_ms_after": 18.681, + "rss_max_kib_after": 25456 + }, + { + "history": 5000, + "concurrency": 4, + "rps_before": 697.712, + "p95_ms_before": 17.142, + "p99_ms_before": 26.446, + "rss_max_kib_before": 25104, + "rps_after": 685.839, + "p95_ms_after": 17.418, + "p99_ms_after": 26.618, + "rss_max_kib_after": 25376 + }, + { + "history": 5000, + "concurrency": 16, + "rps_before": 1126.862, + "p95_ms_before": 24.133, + "p99_ms_before": 93.225, + "rss_max_kib_before": 26752, + "rps_after": 1079.866, + "p95_ms_after": 31.525, + "p99_ms_after": 94.709, + "rss_max_kib_after": 26640 + } +] diff --git a/evidence/track1/go-baseline/results.json b/evidence/track1/go-baseline/results.json new file mode 100644 index 00000000..322933b8 --- /dev/null +++ b/evidence/track1/go-baseline/results.json @@ -0,0 +1,211 @@ +{ + "mode": "baseline", + "command": [ + "go", + "run", + "-overlay", + "/var/folders/jd/nsgkfx9s75xb84909646j0zm0000gn/T/messenger-track1-58qai1az/overlay.json", + "./cmd/messenger" + ], + "go_version": "go version go1.27.1 darwin/arm64", + "os_arch": [ + "darwin", + "arm64" + ], + "requests_per_case": 100000, + "rss_source": "ps RSS of go run child executable, KiB; sampled every 100 ms", + "rows": [ + { + "history": 1000, + "concurrency": 1, + "duration_seconds": 13.634, + "requested_requests": 100000, + "warmup_requests": 100, + "successful_requests": 100000, + "failed_requests": 0, + "rps": 7334.409, + "p50_ms": 0.13, + "p95_ms": 0.146, + "p99_ms": 0.186, + "rss_min_kib": 23616, + "rss_max_kib": 59968, + "rss_delta_kib": 36352 + }, + { + "history": 1000, + "concurrency": 4, + "duration_seconds": 11.333, + "requested_requests": 100000, + "warmup_requests": 100, + "successful_requests": 100000, + "failed_requests": 0, + "rps": 8823.924, + "p50_ms": 0.42, + "p95_ms": 0.654, + "p99_ms": 0.869, + "rss_min_kib": 23424, + "rss_max_kib": 58464, + "rss_delta_kib": 35040 + }, + { + "history": 1000, + "concurrency": 16, + "duration_seconds": 13.63, + "requested_requests": 100000, + "warmup_requests": 100, + "successful_requests": 100000, + "failed_requests": 0, + "rps": 7336.995, + "p50_ms": 2.021, + "p95_ms": 3.514, + "p99_ms": 4.631, + "rss_min_kib": 23520, + "rss_max_kib": 66544, + "rss_delta_kib": 43024 + }, + { + "history": 1000, + "concurrency": 32, + "duration_seconds": 13.538, + "requested_requests": 100000, + "warmup_requests": 100, + "successful_requests": 100000, + "failed_requests": 0, + "rps": 7386.656, + "p50_ms": 4.022, + "p95_ms": 7.026, + "p99_ms": 8.953, + "rss_min_kib": 23856, + "rss_max_kib": 65616, + "rss_delta_kib": 41760 + }, + { + "history": 10000, + "concurrency": 1, + "duration_seconds": 14.008, + "requested_requests": 100000, + "warmup_requests": 100, + "successful_requests": 100000, + "failed_requests": 0, + "rps": 7138.887, + "p50_ms": 0.13, + "p95_ms": 0.149, + "p99_ms": 0.21, + "rss_min_kib": 25984, + "rss_max_kib": 70416, + "rss_delta_kib": 44432 + }, + { + "history": 10000, + "concurrency": 4, + "duration_seconds": 11.057, + "requested_requests": 100000, + "warmup_requests": 100, + "successful_requests": 100000, + "failed_requests": 0, + "rps": 9043.732, + "p50_ms": 0.406, + "p95_ms": 0.626, + "p99_ms": 0.841, + "rss_min_kib": 26272, + "rss_max_kib": 67376, + "rss_delta_kib": 41104 + }, + { + "history": 10000, + "concurrency": 16, + "duration_seconds": 13.436, + "requested_requests": 100000, + "warmup_requests": 100, + "successful_requests": 100000, + "failed_requests": 0, + "rps": 7442.895, + "p50_ms": 1.977, + "p95_ms": 3.485, + "p99_ms": 4.703, + "rss_min_kib": 26576, + "rss_max_kib": 75616, + "rss_delta_kib": 49040 + }, + { + "history": 10000, + "concurrency": 32, + "duration_seconds": 13.546, + "requested_requests": 100000, + "warmup_requests": 100, + "successful_requests": 100000, + "failed_requests": 0, + "rps": 7382.485, + "p50_ms": 4.01, + "p95_ms": 7.051, + "p99_ms": 9.096, + "rss_min_kib": 25456, + "rss_max_kib": 77792, + "rss_delta_kib": 52336 + }, + { + "history": 50000, + "concurrency": 1, + "duration_seconds": 13.969, + "requested_requests": 100000, + "warmup_requests": 100, + "successful_requests": 100000, + "failed_requests": 0, + "rps": 7158.653, + "p50_ms": 0.13, + "p95_ms": 0.149, + "p99_ms": 0.211, + "rss_min_kib": 40080, + "rss_max_kib": 81072, + "rss_delta_kib": 40992 + }, + { + "history": 50000, + "concurrency": 4, + "duration_seconds": 11.014, + "requested_requests": 100000, + "warmup_requests": 100, + "successful_requests": 100000, + "failed_requests": 0, + "rps": 9079.212, + "p50_ms": 0.404, + "p95_ms": 0.623, + "p99_ms": 0.823, + "rss_min_kib": 40448, + "rss_max_kib": 77088, + "rss_delta_kib": 36640 + }, + { + "history": 50000, + "concurrency": 16, + "duration_seconds": 13.479, + "requested_requests": 100000, + "warmup_requests": 100, + "successful_requests": 100000, + "failed_requests": 0, + "rps": 7419.068, + "p50_ms": 1.99, + "p95_ms": 3.471, + "p99_ms": 4.694, + "rss_min_kib": 42336, + "rss_max_kib": 79552, + "rss_delta_kib": 37216 + }, + { + "history": 50000, + "concurrency": 32, + "duration_seconds": 13.464, + "requested_requests": 100000, + "warmup_requests": 100, + "successful_requests": 100000, + "failed_requests": 0, + "rps": 7427.333, + "p50_ms": 3.99, + "p95_ms": 7.049, + "p99_ms": 9.007, + "rss_min_kib": 40336, + "rss_max_kib": 89552, + "rss_delta_kib": 49216 + } + ] +} diff --git a/evidence/track1/go-comparison.json b/evidence/track1/go-comparison.json new file mode 100644 index 00000000..de948fc4 --- /dev/null +++ b/evidence/track1/go-comparison.json @@ -0,0 +1,266 @@ +[ + { + "history": 1000, + "concurrency": 1, + "requested_requests": 100000, + "warmup_requests": 100, + "duration_seconds_before": 13.634, + "duration_seconds_after": 13.919, + "successful_requests_before": 100000, + "successful_requests_after": 100000, + "failed_requests_before": 0, + "failed_requests_after": 0, + "rps_before": 7334.409, + "rps_after": 7184.594, + "p50_ms_before": 0.13, + "p50_ms_after": 0.129, + "p95_ms_before": 0.146, + "p95_ms_after": 0.15, + "p99_ms_before": 0.186, + "p99_ms_after": 0.231, + "rss_max_kib_before": 59968, + "rss_max_kib_after": 62048 + }, + { + "history": 1000, + "concurrency": 4, + "requested_requests": 100000, + "warmup_requests": 100, + "duration_seconds_before": 11.333, + "duration_seconds_after": 11.115, + "successful_requests_before": 100000, + "successful_requests_after": 100000, + "failed_requests_before": 0, + "failed_requests_after": 0, + "rps_before": 8823.924, + "rps_after": 8996.523, + "p50_ms_before": 0.42, + "p50_ms_after": 0.407, + "p95_ms_before": 0.654, + "p95_ms_after": 0.632, + "p99_ms_before": 0.869, + "p99_ms_after": 0.867, + "rss_max_kib_before": 58464, + "rss_max_kib_after": 61040 + }, + { + "history": 1000, + "concurrency": 16, + "requested_requests": 100000, + "warmup_requests": 100, + "duration_seconds_before": 13.63, + "duration_seconds_after": 13.364, + "successful_requests_before": 100000, + "successful_requests_after": 100000, + "failed_requests_before": 0, + "failed_requests_after": 0, + "rps_before": 7336.995, + "rps_after": 7482.719, + "p50_ms_before": 2.021, + "p50_ms_after": 1.977, + "p95_ms_before": 3.514, + "p95_ms_after": 3.445, + "p99_ms_before": 4.631, + "p99_ms_after": 4.577, + "rss_max_kib_before": 66544, + "rss_max_kib_after": 61328 + }, + { + "history": 1000, + "concurrency": 32, + "requested_requests": 100000, + "warmup_requests": 100, + "duration_seconds_before": 13.538, + "duration_seconds_after": 13.547, + "successful_requests_before": 100000, + "successful_requests_after": 100000, + "failed_requests_before": 0, + "failed_requests_after": 0, + "rps_before": 7386.656, + "rps_after": 7381.5, + "p50_ms_before": 4.022, + "p50_ms_after": 4.016, + "p95_ms_before": 7.026, + "p95_ms_after": 7.058, + "p99_ms_before": 8.953, + "p99_ms_after": 9.054, + "rss_max_kib_before": 65616, + "rss_max_kib_after": 68768 + }, + { + "history": 10000, + "concurrency": 1, + "requested_requests": 100000, + "warmup_requests": 100, + "duration_seconds_before": 14.008, + "duration_seconds_after": 13.984, + "successful_requests_before": 100000, + "successful_requests_after": 100000, + "failed_requests_before": 0, + "failed_requests_after": 0, + "rps_before": 7138.887, + "rps_after": 7150.931, + "p50_ms_before": 0.13, + "p50_ms_after": 0.131, + "p95_ms_before": 0.149, + "p95_ms_after": 0.146, + "p99_ms_before": 0.21, + "p99_ms_after": 0.187, + "rss_max_kib_before": 70416, + "rss_max_kib_after": 68128 + }, + { + "history": 10000, + "concurrency": 4, + "requested_requests": 100000, + "warmup_requests": 100, + "duration_seconds_before": 11.057, + "duration_seconds_after": 11.046, + "successful_requests_before": 100000, + "successful_requests_after": 100000, + "failed_requests_before": 0, + "failed_requests_after": 0, + "rps_before": 9043.732, + "rps_after": 9052.965, + "p50_ms_before": 0.406, + "p50_ms_after": 0.404, + "p95_ms_before": 0.626, + "p95_ms_after": 0.628, + "p99_ms_before": 0.841, + "p99_ms_after": 0.859, + "rss_max_kib_before": 67376, + "rss_max_kib_after": 71632 + }, + { + "history": 10000, + "concurrency": 16, + "requested_requests": 100000, + "warmup_requests": 100, + "duration_seconds_before": 13.436, + "duration_seconds_after": 13.439, + "successful_requests_before": 100000, + "successful_requests_after": 100000, + "failed_requests_before": 0, + "failed_requests_after": 0, + "rps_before": 7442.895, + "rps_after": 7440.817, + "p50_ms_before": 1.977, + "p50_ms_after": 1.989, + "p95_ms_before": 3.485, + "p95_ms_after": 3.468, + "p99_ms_before": 4.703, + "p99_ms_after": 4.701, + "rss_max_kib_before": 75616, + "rss_max_kib_after": 73712 + }, + { + "history": 10000, + "concurrency": 32, + "requested_requests": 100000, + "warmup_requests": 100, + "duration_seconds_before": 13.546, + "duration_seconds_after": 13.478, + "successful_requests_before": 100000, + "successful_requests_after": 100000, + "failed_requests_before": 0, + "failed_requests_after": 0, + "rps_before": 7382.485, + "rps_after": 7419.326, + "p50_ms_before": 4.01, + "p50_ms_after": 3.984, + "p95_ms_before": 7.051, + "p95_ms_after": 7.049, + "p99_ms_before": 9.096, + "p99_ms_after": 9.096, + "rss_max_kib_before": 77792, + "rss_max_kib_after": 70976 + }, + { + "history": 50000, + "concurrency": 1, + "requested_requests": 100000, + "warmup_requests": 100, + "duration_seconds_before": 13.969, + "duration_seconds_after": 13.863, + "successful_requests_before": 100000, + "successful_requests_after": 100000, + "failed_requests_before": 0, + "failed_requests_after": 0, + "rps_before": 7158.653, + "rps_after": 7213.61, + "p50_ms_before": 0.13, + "p50_ms_after": 0.129, + "p95_ms_before": 0.149, + "p95_ms_after": 0.145, + "p99_ms_before": 0.211, + "p99_ms_after": 0.191, + "rss_max_kib_before": 81072, + "rss_max_kib_after": 81824 + }, + { + "history": 50000, + "concurrency": 4, + "requested_requests": 100000, + "warmup_requests": 100, + "duration_seconds_before": 11.014, + "duration_seconds_after": 11.066, + "successful_requests_before": 100000, + "successful_requests_after": 100000, + "failed_requests_before": 0, + "failed_requests_after": 0, + "rps_before": 9079.212, + "rps_after": 9036.335, + "p50_ms_before": 0.404, + "p50_ms_after": 0.405, + "p95_ms_before": 0.623, + "p95_ms_after": 0.63, + "p99_ms_before": 0.823, + "p99_ms_after": 0.842, + "rss_max_kib_before": 77088, + "rss_max_kib_after": 86832 + }, + { + "history": 50000, + "concurrency": 16, + "requested_requests": 100000, + "warmup_requests": 100, + "duration_seconds_before": 13.479, + "duration_seconds_after": 13.416, + "successful_requests_before": 100000, + "successful_requests_after": 100000, + "failed_requests_before": 0, + "failed_requests_after": 0, + "rps_before": 7419.068, + "rps_after": 7453.53, + "p50_ms_before": 1.99, + "p50_ms_after": 1.978, + "p95_ms_before": 3.471, + "p95_ms_after": 3.455, + "p99_ms_before": 4.694, + "p99_ms_after": 4.688, + "rss_max_kib_before": 79552, + "rss_max_kib_after": 89824 + }, + { + "history": 50000, + "concurrency": 32, + "requested_requests": 100000, + "warmup_requests": 100, + "duration_seconds_before": 13.464, + "duration_seconds_after": 13.542, + "successful_requests_before": 100000, + "successful_requests_after": 100000, + "failed_requests_before": 0, + "failed_requests_after": 0, + "rps_before": 7427.333, + "rps_after": 7384.536, + "p50_ms_before": 3.99, + "p50_ms_after": 4.005, + "p95_ms_before": 7.049, + "p95_ms_after": 7.084, + "p99_ms_before": 9.007, + "p99_ms_after": 9.203, + "rss_max_kib_before": 89552, + "rss_max_kib_after": 80128 + } +] diff --git a/evidence/track1/go-optimized/results.json b/evidence/track1/go-optimized/results.json new file mode 100644 index 00000000..abd5f1cf --- /dev/null +++ b/evidence/track1/go-optimized/results.json @@ -0,0 +1,209 @@ +{ + "mode": "optimized", + "command": [ + "go", + "run", + "./cmd/messenger" + ], + "go_version": "go version go1.27.1 darwin/arm64", + "os_arch": [ + "darwin", + "arm64" + ], + "requests_per_case": 100000, + "rss_source": "ps RSS of go run child executable, KiB; sampled every 100 ms", + "rows": [ + { + "history": 1000, + "concurrency": 1, + "duration_seconds": 13.919, + "requested_requests": 100000, + "warmup_requests": 100, + "successful_requests": 100000, + "failed_requests": 0, + "rps": 7184.594, + "p50_ms": 0.129, + "p95_ms": 0.15, + "p99_ms": 0.231, + "rss_min_kib": 23504, + "rss_max_kib": 62048, + "rss_delta_kib": 38544 + }, + { + "history": 1000, + "concurrency": 4, + "duration_seconds": 11.115, + "requested_requests": 100000, + "warmup_requests": 100, + "successful_requests": 100000, + "failed_requests": 0, + "rps": 8996.523, + "p50_ms": 0.407, + "p95_ms": 0.632, + "p99_ms": 0.867, + "rss_min_kib": 23744, + "rss_max_kib": 61040, + "rss_delta_kib": 37296 + }, + { + "history": 1000, + "concurrency": 16, + "duration_seconds": 13.364, + "requested_requests": 100000, + "warmup_requests": 100, + "successful_requests": 100000, + "failed_requests": 0, + "rps": 7482.719, + "p50_ms": 1.977, + "p95_ms": 3.445, + "p99_ms": 4.577, + "rss_min_kib": 22480, + "rss_max_kib": 61328, + "rss_delta_kib": 38848 + }, + { + "history": 1000, + "concurrency": 32, + "duration_seconds": 13.547, + "requested_requests": 100000, + "warmup_requests": 100, + "successful_requests": 100000, + "failed_requests": 0, + "rps": 7381.5, + "p50_ms": 4.016, + "p95_ms": 7.058, + "p99_ms": 9.054, + "rss_min_kib": 23152, + "rss_max_kib": 68768, + "rss_delta_kib": 45616 + }, + { + "history": 10000, + "concurrency": 1, + "duration_seconds": 13.984, + "requested_requests": 100000, + "warmup_requests": 100, + "successful_requests": 100000, + "failed_requests": 0, + "rps": 7150.931, + "p50_ms": 0.131, + "p95_ms": 0.146, + "p99_ms": 0.187, + "rss_min_kib": 25936, + "rss_max_kib": 68128, + "rss_delta_kib": 42192 + }, + { + "history": 10000, + "concurrency": 4, + "duration_seconds": 11.046, + "requested_requests": 100000, + "warmup_requests": 100, + "successful_requests": 100000, + "failed_requests": 0, + "rps": 9052.965, + "p50_ms": 0.404, + "p95_ms": 0.628, + "p99_ms": 0.859, + "rss_min_kib": 26448, + "rss_max_kib": 71632, + "rss_delta_kib": 45184 + }, + { + "history": 10000, + "concurrency": 16, + "duration_seconds": 13.439, + "requested_requests": 100000, + "warmup_requests": 100, + "successful_requests": 100000, + "failed_requests": 0, + "rps": 7440.817, + "p50_ms": 1.989, + "p95_ms": 3.468, + "p99_ms": 4.701, + "rss_min_kib": 26480, + "rss_max_kib": 73712, + "rss_delta_kib": 47232 + }, + { + "history": 10000, + "concurrency": 32, + "duration_seconds": 13.478, + "requested_requests": 100000, + "warmup_requests": 100, + "successful_requests": 100000, + "failed_requests": 0, + "rps": 7419.326, + "p50_ms": 3.984, + "p95_ms": 7.049, + "p99_ms": 9.096, + "rss_min_kib": 26176, + "rss_max_kib": 70976, + "rss_delta_kib": 44800 + }, + { + "history": 50000, + "concurrency": 1, + "duration_seconds": 13.863, + "requested_requests": 100000, + "warmup_requests": 100, + "successful_requests": 100000, + "failed_requests": 0, + "rps": 7213.61, + "p50_ms": 0.129, + "p95_ms": 0.145, + "p99_ms": 0.191, + "rss_min_kib": 40592, + "rss_max_kib": 81824, + "rss_delta_kib": 41232 + }, + { + "history": 50000, + "concurrency": 4, + "duration_seconds": 11.066, + "requested_requests": 100000, + "warmup_requests": 100, + "successful_requests": 100000, + "failed_requests": 0, + "rps": 9036.335, + "p50_ms": 0.405, + "p95_ms": 0.63, + "p99_ms": 0.842, + "rss_min_kib": 42944, + "rss_max_kib": 86832, + "rss_delta_kib": 43888 + }, + { + "history": 50000, + "concurrency": 16, + "duration_seconds": 13.416, + "requested_requests": 100000, + "warmup_requests": 100, + "successful_requests": 100000, + "failed_requests": 0, + "rps": 7453.53, + "p50_ms": 1.978, + "p95_ms": 3.455, + "p99_ms": 4.688, + "rss_min_kib": 40768, + "rss_max_kib": 89824, + "rss_delta_kib": 49056 + }, + { + "history": 50000, + "concurrency": 32, + "duration_seconds": 13.542, + "requested_requests": 100000, + "warmup_requests": 100, + "successful_requests": 100000, + "failed_requests": 0, + "rps": 7384.536, + "p50_ms": 4.005, + "p95_ms": 7.084, + "p99_ms": 9.203, + "rss_min_kib": 42848, + "rss_max_kib": 80128, + "rss_delta_kib": 37280 + } + ] +} diff --git a/evidence/track1/optimized-storage-benchmark.txt b/evidence/track1/optimized-storage-benchmark.txt new file mode 100644 index 00000000..0122d9de --- /dev/null +++ b/evidence/track1/optimized-storage-benchmark.txt @@ -0,0 +1,21 @@ +goos: darwin +goarch: arm64 +pkg: mtusi-messenger/internal/storage/memory +cpu: Apple M5 Pro +BenchmarkMessageCreate/history=1000-18 4830075 243.3 ns/op 16 B/op 1 allocs/op +BenchmarkMessageCreate/history=1000-18 4958697 241.4 ns/op 16 B/op 1 allocs/op +BenchmarkMessageCreate/history=1000-18 4984602 241.8 ns/op 16 B/op 1 allocs/op +BenchmarkMessageCreate/history=1000-18 4976372 241.8 ns/op 16 B/op 1 allocs/op +BenchmarkMessageCreate/history=1000-18 4962843 241.7 ns/op 16 B/op 1 allocs/op +BenchmarkMessageCreate/history=10000-18 4967149 241.8 ns/op 16 B/op 1 allocs/op +BenchmarkMessageCreate/history=10000-18 4946976 242.1 ns/op 16 B/op 1 allocs/op +BenchmarkMessageCreate/history=10000-18 4950400 242.3 ns/op 16 B/op 1 allocs/op +BenchmarkMessageCreate/history=10000-18 4938321 242.4 ns/op 16 B/op 1 allocs/op +BenchmarkMessageCreate/history=10000-18 4955269 242.2 ns/op 16 B/op 1 allocs/op +BenchmarkMessageCreate/history=50000-18 4943572 242.0 ns/op 16 B/op 1 allocs/op +BenchmarkMessageCreate/history=50000-18 4969927 242.4 ns/op 16 B/op 1 allocs/op +BenchmarkMessageCreate/history=50000-18 4931466 242.5 ns/op 16 B/op 1 allocs/op +BenchmarkMessageCreate/history=50000-18 4948990 242.8 ns/op 16 B/op 1 allocs/op +BenchmarkMessageCreate/history=50000-18 4953249 242.6 ns/op 16 B/op 1 allocs/op +PASS +ok mtusi-messenger/internal/storage/memory 18.240s diff --git a/evidence/track1/optimized.json b/evidence/track1/optimized.json new file mode 100644 index 00000000..973b960c --- /dev/null +++ b/evidence/track1/optimized.json @@ -0,0 +1,128 @@ +[ + { + "history": 100, + "concurrency": 1, + "duration_seconds": 2.002, + "successful_requests": 531, + "failed_requests": 0, + "rps": 265.189, + "p50_ms": 3.355, + "p95_ms": 4.276, + "p99_ms": 17.123, + "rss_min_kib": 18800, + "rss_max_kib": 22736, + "rss_delta_kib": 3936 + }, + { + "history": 100, + "concurrency": 4, + "duration_seconds": 2.005, + "successful_requests": 1445, + "failed_requests": 0, + "rps": 720.55, + "p50_ms": 4.197, + "p95_ms": 16.868, + "p99_ms": 21.043, + "rss_min_kib": 20768, + "rss_max_kib": 24128, + "rss_delta_kib": 3360 + }, + { + "history": 100, + "concurrency": 16, + "duration_seconds": 2.012, + "successful_requests": 2265, + "failed_requests": 0, + "rps": 1125.923, + "p50_ms": 8.851, + "p95_ms": 29.142, + "p99_ms": 91.221, + "rss_min_kib": 20672, + "rss_max_kib": 25216, + "rss_delta_kib": 4544 + }, + { + "history": 1000, + "concurrency": 1, + "duration_seconds": 2.011, + "successful_requests": 478, + "failed_requests": 0, + "rps": 237.68, + "p50_ms": 3.467, + "p95_ms": 11.279, + "p99_ms": 19.675, + "rss_min_kib": 23264, + "rss_max_kib": 23504, + "rss_delta_kib": 240 + }, + { + "history": 1000, + "concurrency": 4, + "duration_seconds": 2.004, + "successful_requests": 1337, + "failed_requests": 0, + "rps": 667.05, + "p50_ms": 4.249, + "p95_ms": 17.243, + "p99_ms": 29.938, + "rss_min_kib": 23264, + "rss_max_kib": 25280, + "rss_delta_kib": 2016 + }, + { + "history": 1000, + "concurrency": 16, + "duration_seconds": 2.005, + "successful_requests": 2211, + "failed_requests": 0, + "rps": 1102.581, + "p50_ms": 8.818, + "p95_ms": 30.252, + "p99_ms": 93.912, + "rss_min_kib": 23424, + "rss_max_kib": 25200, + "rss_delta_kib": 1776 + }, + { + "history": 5000, + "concurrency": 1, + "duration_seconds": 2.002, + "successful_requests": 483, + "failed_requests": 0, + "rps": 241.241, + "p50_ms": 3.466, + "p95_ms": 10.897, + "p99_ms": 18.681, + "rss_min_kib": 25456, + "rss_max_kib": 25456, + "rss_delta_kib": 0 + }, + { + "history": 5000, + "concurrency": 4, + "duration_seconds": 2.003, + "successful_requests": 1374, + "failed_requests": 0, + "rps": 685.839, + "p50_ms": 4.207, + "p95_ms": 17.418, + "p99_ms": 26.618, + "rss_min_kib": 24304, + "rss_max_kib": 25376, + "rss_delta_kib": 1072 + }, + { + "history": 5000, + "concurrency": 16, + "duration_seconds": 2.002, + "successful_requests": 2162, + "failed_requests": 0, + "rps": 1079.866, + "p50_ms": 8.939, + "p95_ms": 31.525, + "p99_ms": 94.709, + "rss_min_kib": 24848, + "rss_max_kib": 26640, + "rss_delta_kib": 1792 + } +] diff --git a/go.mod b/go.mod new file mode 100644 index 00000000..89f75784 --- /dev/null +++ b/go.mod @@ -0,0 +1,82 @@ +module mtusi-messenger + +go 1.27.0 + +require ( + github.com/go-faster/errors v0.8.0 + github.com/go-faster/jx v1.2.0 + github.com/go-playground/validator/v10 v10.30.5 + github.com/google/uuid v1.6.0 + github.com/ogen-go/ogen v1.24.0 + github.com/spf13/viper v1.21.0 + github.com/stretchr/testify v1.12.1 + go.uber.org/zap v1.28.0 + go.uber.org/zap/exp v0.3.0 +) + +require ( + github.com/brunoga/deep v1.3.1 // indirect + github.com/clipperhouse/uax29/v2 v2.2.0 // indirect + github.com/dlclark/regexp2 v1.12.0 // indirect + github.com/fatih/color v1.19.0 // indirect + github.com/fatih/structs v1.1.0 // indirect + github.com/fsnotify/fsnotify v1.9.0 // indirect + github.com/gabriel-vasile/mimetype v1.4.15 // indirect + github.com/ghodss/yaml v1.0.0 // indirect + github.com/go-faster/yaml v0.4.6 // indirect + github.com/go-playground/locales v0.14.1 // indirect + github.com/go-playground/universal-translator v0.18.1 // indirect + github.com/go-viper/mapstructure/v2 v2.5.0 // indirect + github.com/google/go-cmp v0.7.0 // indirect + github.com/huandu/xstrings v1.5.0 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/jedib0t/go-pretty/v6 v6.7.8 // indirect + github.com/knadh/koanf/maps v0.1.2 // indirect + github.com/knadh/koanf/parsers/yaml v1.1.0 // indirect + github.com/knadh/koanf/providers/env v1.1.0 // indirect + github.com/knadh/koanf/providers/file v1.2.1 // indirect + github.com/knadh/koanf/providers/posflag v1.0.1 // indirect + github.com/knadh/koanf/providers/structs v1.0.0 // indirect + github.com/knadh/koanf/v2 v2.3.2 // indirect + github.com/leodido/go-urn v1.5.0 // indirect + github.com/mattn/go-colorable v0.1.14 // indirect + github.com/mattn/go-isatty v0.0.24 // indirect + github.com/mattn/go-runewidth v0.0.19 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/pelletier/go-toml/v2 v2.2.4 // indirect + github.com/rs/zerolog v1.34.0 // indirect + github.com/sagikazarmark/locafero v0.11.0 // indirect + github.com/segmentio/asm v1.2.1 // indirect + github.com/shopspring/decimal v1.4.0 // indirect + github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect + github.com/spf13/afero v1.15.0 // indirect + github.com/spf13/cast v1.10.0 // indirect + github.com/spf13/cobra v1.10.2 // indirect + github.com/spf13/pflag v1.0.10 // indirect + github.com/stretchr/objx v0.5.3 // indirect + github.com/subosito/gotenv v1.6.0 // indirect + github.com/vektra/mockery/v3 v3.8.0 // indirect + github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect + github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect + github.com/xeipuuv/gojsonschema v1.2.0 // indirect + github.com/yuin/goldmark v1.8.2 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.yaml.in/yaml/v3 v3.0.5 // indirect + golang.org/x/crypto v0.57.0 // indirect + golang.org/x/exp v0.0.0-20260212183809-81e46e3db34a // indirect + golang.org/x/mod v0.41.0 // indirect + golang.org/x/net v0.58.0 // indirect + golang.org/x/sync v0.23.0 // indirect + golang.org/x/sys v0.48.0 // indirect + golang.org/x/term v0.46.0 // indirect + golang.org/x/text v0.42.0 // indirect + golang.org/x/tools v0.49.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) + +tool ( + github.com/ogen-go/ogen/cmd/ogen + github.com/vektra/mockery/v3 +) diff --git a/go.sum b/go.sum new file mode 100644 index 00000000..6a42b0dd --- /dev/null +++ b/go.sum @@ -0,0 +1,172 @@ +github.com/brunoga/deep v1.3.1 h1:bSrL6FhAZa6JlVv4vsi7Hg8SLwroDb1kgDERRVipBCo= +github.com/brunoga/deep v1.3.1/go.mod h1:GDV6dnXqn80ezsLSZ5Wlv1PdKAWAO4L5PnKYtv2dgaI= +github.com/clipperhouse/uax29/v2 v2.2.0 h1:ChwIKnQN3kcZteTXMgb1wztSgaU+ZemkgWdohwgs8tY= +github.com/clipperhouse/uax29/v2 v2.2.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dlclark/regexp2 v1.12.0 h1:0j4c5qQmnC6XOWNjP3PIXURXN2gWx76rd3KvgdPkCz8= +github.com/dlclark/regexp2 v1.12.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= +github.com/fatih/color v1.19.0 h1:Zp3PiM21/9Ld6FzSKyL5c/BULoe/ONr9KlbYVOfG8+w= +github.com/fatih/color v1.19.0/go.mod h1:zNk67I0ZUT1bEGsSGyCZYZNrHuTkJJB+r6Q9VuMi0LE= +github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= +github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= +github.com/gabriel-vasile/mimetype v1.4.15 h1:05iP/CYtZ/w455R/KZM6rZ5ieAdh99UPtd+d3YzLmaI= +github.com/gabriel-vasile/mimetype v1.4.15/go.mod h1:azpTcoLcDZRNgFou5j+APrqQx9HqVPWa6ijYQIIVswQ= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-faster/errors v0.8.0 h1:9T9eJrM+72dFk7n4DfhuaDDe6cyuFCSW2oNUkN77Yqc= +github.com/go-faster/errors v0.8.0/go.mod h1:5ySTjWFiphBs07IKuiL69nxdfd5+fzh1u7FPGZP2quo= +github.com/go-faster/jx v1.2.0 h1:T2YHJPrFaYu21fJtUxC9GzmluKu8rVIFDwwGBKTDseI= +github.com/go-faster/jx v1.2.0/go.mod h1:UWLOVDmMG597a5tBFPLIWJdUxz5/2emOpfsj9Neg0PE= +github.com/go-faster/yaml v0.4.6 h1:lOK/EhI04gCpPgPhgt0bChS6bvw7G3WwI8xxVe0sw9I= +github.com/go-faster/yaml v0.4.6/go.mod h1:390dRIvV4zbnO7qC9FGo6YYutc+wyyUSHBgbXL52eXk= +github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= +github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= +github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= +github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= +github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= +github.com/go-playground/validator/v10 v10.30.5 h1:YyCXvVShZbs2Sm3Mb53eNOlhRXctSOzW5QJAouCTZL4= +github.com/go-playground/validator/v10 v10.30.5/go.mod h1:wEqiaov48pXX1kjhc3Da8y0M0Dtg/BK7gurFBLgwFrQ= +github.com/go-viper/mapstructure/v2 v2.5.0 h1:vM5IJoUAy3d7zRSVtIwQgBj7BiWtMPfmPEgAXnvj1Ro= +github.com/go-viper/mapstructure/v2 v2.5.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI= +github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jedib0t/go-pretty/v6 v6.7.8 h1:BVYrDy5DPBA3Qn9ICT+PokP9cvCv1KaHv2i+Hc8sr5o= +github.com/jedib0t/go-pretty/v6 v6.7.8/go.mod h1:YwC5CE4fJ1HFUDeivSV1r//AmANFHyqczZk+U6BDALU= +github.com/knadh/koanf/maps v0.1.2 h1:RBfmAW5CnZT+PJ1CVc1QSJKf4Xu9kxfQgYVQSu8hpbo= +github.com/knadh/koanf/maps v0.1.2/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= +github.com/knadh/koanf/parsers/yaml v1.1.0 h1:3ltfm9ljprAHt4jxgeYLlFPmUaunuCgu1yILuTXRdM4= +github.com/knadh/koanf/parsers/yaml v1.1.0/go.mod h1:HHmcHXUrp9cOPcuC+2wrr44GTUB0EC+PyfN3HZD9tFg= +github.com/knadh/koanf/providers/env v1.1.0 h1:U2VXPY0f+CsNDkvdsG8GcsnK4ah85WwWyJgef9oQMSc= +github.com/knadh/koanf/providers/env v1.1.0/go.mod h1:QhHHHZ87h9JxJAn2czdEl6pdkNnDh/JS1Vtsyt65hTY= +github.com/knadh/koanf/providers/file v1.2.1 h1:bEWbtQwYrA+W2DtdBrQWyXqJaJSG3KrP3AESOJYp9wM= +github.com/knadh/koanf/providers/file v1.2.1/go.mod h1:bp1PM5f83Q+TOUu10J/0ApLBd9uIzg+n9UgthfY+nRA= +github.com/knadh/koanf/providers/posflag v1.0.1 h1:EnMxHSrPkYCFnKgBUl5KBgrjed8gVFrcXDzaW4l/C6Y= +github.com/knadh/koanf/providers/posflag v1.0.1/go.mod h1:3Wn3+YG3f4ljzRyCUgIwH7G0sZ1pMjCOsNBovrbKmAk= +github.com/knadh/koanf/providers/structs v1.0.0 h1:DznjB7NQykhqCar2LvNug3MuxEQsZ5KvfgMbio+23u4= +github.com/knadh/koanf/providers/structs v1.0.0/go.mod h1:kjo5TFtgpaZORlpoJqcbeLowM2cINodv8kX+oFAeQ1w= +github.com/knadh/koanf/v2 v2.3.2 h1:Ee6tuzQYFwcZXQpc2MiVeC6qHMandf5SMUJJNoFp/c4= +github.com/knadh/koanf/v2 v2.3.2/go.mod h1:gRb40VRAbd4iJMYYD5IxZ6hfuopFcXBpc9bbQpZwo28= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/leodido/go-urn v1.5.0 h1:pLqT2kq1zpHW/1D18QMjMpdtX7cekxqtJJjg5ANyWw0= +github.com/leodido/go-urn v1.5.0/go.mod h1:9BORnCDhdPBJNDEX+w1bJisa8yOKYi116VeO96s4ifE= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= +github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.24 h1:tGZZoVgT/KiqK1c8ocVLeDS8BSWMRd47J3Lbz7vsReI= +github.com/mattn/go-isatty v0.0.24/go.mod h1:nMCL3Zebbrt45jsMDgnfIwz6ydEQApk5oEI3HqDio6A= +github.com/mattn/go-runewidth v0.0.19 h1:v++JhqYnZuu5jSKrk9RbgF5v4CGUjqRfBm05byFGLdw= +github.com/mattn/go-runewidth v0.0.19/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/ogen-go/ogen v1.24.0 h1:NehBG/8s0JeM6jYHPJeFJntBG3cE/xQgZd1q8BchPNM= +github.com/ogen-go/ogen v1.24.0/go.mod h1:hcg4aTzLcu/MS1SGGahUriPBEOZB3c82RGIC6dYcdFU= +github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= +github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= +github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0= +github.com/rs/zerolog v1.34.0 h1:k43nTLIwcTVQAncfCw4KZ2VY6ukYoZaBPNOE8txlOeY= +github.com/rs/zerolog v1.34.0/go.mod h1:bJsvje4Z08ROH4Nhs5iH600c3IkWhwp44iRc54W6wYQ= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDcg+AAIFXc= +github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik= +github.com/segmentio/asm v1.2.1 h1:DTNbBqs57ioxAD4PrArqftgypG4/qNpXoJx8TVXxPR0= +github.com/segmentio/asm v1.2.1/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= +github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= +github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= +github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrelhe64i8F6HNlS8pkoyMv5sreGx2Ry5Rw= +github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8/go.mod h1:3n1Cwaq1E1/1lhQhtRK2ts/ZwZEhjcQeJQ1RuC6Q/8U= +github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I= +github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg= +github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY= +github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo= +github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= +github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= +github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= +github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU= +github.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjbTCAY= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4= +github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= +github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= +github.com/vektra/mockery/v3 v3.8.0 h1:Tklqcx844iV8GtYziqJXam1a8RdcKip4UErMa66Nxps= +github.com/vektra/mockery/v3 v3.8.0/go.mod h1:K+L72OoFVizA9eWtO4L+kU65oylgreiJEJ57Gu8g9Ew= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/yuin/goldmark v1.8.2 h1:kEGpgqJXdgbkhcOgBxkC0X0PmoPG1ZyoZ117rDVp4zE= +github.com/yuin/goldmark v1.8.2/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.28.0 h1:IZzaP1Fv73/T/pBMLk4VutPl36uNC+OSUh3JLG3FIjo= +go.uber.org/zap v1.28.0/go.mod h1:rDLpOi171uODNm/mxFcuYWxDsqWSAVkFdX4XojSKg/Q= +go.uber.org/zap/exp v0.3.0 h1:6JYzdifzYkGmTdRR59oYH+Ng7k49H9qVpWwNSsGJj3U= +go.uber.org/zap/exp v0.3.0/go.mod h1:5I384qq7XGxYyByIhHm6jg5CHkGY0nsTfbDLgDDlgJQ= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= +go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= +golang.org/x/crypto v0.57.0 h1:3ZVCjf8Ggz7zneR/EHRVx68Ctf+2pmIMP2UFhh9cC6M= +golang.org/x/crypto v0.57.0/go.mod h1:Fdz0i5U6CoizGwLda9DttjSk6qlZo25zYNtR+ycvuZA= +golang.org/x/exp v0.0.0-20260212183809-81e46e3db34a h1:ovFr6Z0MNmU7nH8VaX5xqw+05ST2uO1exVfZPVqRC5o= +golang.org/x/exp v0.0.0-20260212183809-81e46e3db34a/go.mod h1:K79w1Vqn7PoiZn+TkNpx3BUWUQksGO3JcVX6qIjytmA= +golang.org/x/mod v0.41.0 h1:qJmnOUb4YB+FsEuM3HcWucdZASCPGhsX6uljO6pog0c= +golang.org/x/mod v0.41.0/go.mod h1:Ek9pY8RKWXwsWvd3rQiHYtMqkjSUV+s1Rj7j4H5Ur6o= +golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= +golang.org/x/net v0.58.0/go.mod h1:YwCddHnFlT7eLQqVprV19OnhLGtc5xOKgE0RyqgfWAU= +golang.org/x/sync v0.23.0 h1:KameEIfc1IkluZyXWLn39Wd4tURc6GbCiISGiZm2bQk= +golang.org/x/sync v0.23.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.48.0 h1:bbX/i/6MgT9BVLM9RT1thmxL04yeTAhbEz4SyadbXoo= +golang.org/x/sys v0.48.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og= +golang.org/x/term v0.46.0 h1:3+OXuTbaKDgwk8jTi3aSLHRlmWqHEUDUtxnbFigO4YE= +golang.org/x/term v0.46.0/go.mod h1:+K02xbkittuwc0Am4abfA3Fc+XRGXkvBXNO88NCXPoc= +golang.org/x/text v0.42.0 h1:JbOZXgfeCPU9gacVtYliJqOhD+zhrEqK4LfdpmlUZqI= +golang.org/x/text v0.42.0/go.mod h1:ojzP1Z+2QtioaF8DTtO8K5q7JWVVYwZKenzujK0Zd0E= +golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= +golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/internal/config/config.go b/internal/config/config.go new file mode 100644 index 00000000..38caaea0 --- /dev/null +++ b/internal/config/config.go @@ -0,0 +1,93 @@ +package config + +import ( + "fmt" + "log/slog" + "net" + "reflect" + "strconv" + "strings" + "time" + + "github.com/go-playground/validator/v10" + "github.com/spf13/viper" + + "mtusi-messenger/internal/logger" +) + +const envPrefix = "APP" + +type Config struct { + Host string `mapstructure:"host" validate:"required,hostname|ip"` + Port int `mapstructure:"port" validate:"required,min=1,max=65535"` + ReadHeaderTimeout time.Duration `mapstructure:"read_header_timeout" validate:"required,gt=0"` + ShutdownTimeout time.Duration `mapstructure:"shutdown_timeout" validate:"required,gt=0"` + LogLevel string `mapstructure:"log_level" validate:"required,oneof=debug info warn error"` + LogFormat string `mapstructure:"log_format" validate:"required,oneof=json console"` +} + +var defaults = map[string]any{ + "host": "0.0.0.0", + "port": 8080, + "read_header_timeout": "10s", + "shutdown_timeout": "10s", + "log_level": "info", + "log_format": "json", +} + +func Load() (Config, error) { + v := viper.New() + + v.SetEnvPrefix(envPrefix) + v.AllowEmptyEnv(true) + v.AutomaticEnv() + + for key, value := range defaults { + v.SetDefault(key, value) + } + + var cfg Config + if err := v.Unmarshal(&cfg); err != nil { + return Config{}, fmt.Errorf("unmarshal config: %w", err) + } + + if err := validate.Struct(cfg); err != nil { + return Config{}, fmt.Errorf("validate config: %w", err) + } + + return cfg, nil +} + +func (c Config) Addr() string { + return net.JoinHostPort(c.Host, strconv.Itoa(c.Port)) +} + +func (c Config) SlogLevel() slog.Level { + level, _ := logger.ParseLevel(c.LogLevel) + + return level +} + +func (c Config) LoggerFormat() logger.Format { + format, _ := logger.ParseFormat(c.LogFormat) + + return format +} + +var validate = newValidator() + +func newValidator() *validator.Validate { + v := validator.New(validator.WithRequiredStructEnabled()) + v.RegisterTagNameFunc(envName) + + return v +} + +func envName(field reflect.StructField) string { + key := field.Tag.Get("mapstructure") + if key == "" { + return field.Name + } + + return envPrefix + "_" + strings.ToUpper(key) +} diff --git a/internal/config/config_test.go b/internal/config/config_test.go new file mode 100644 index 00000000..40d9df61 --- /dev/null +++ b/internal/config/config_test.go @@ -0,0 +1,184 @@ +package config_test + +import ( + "testing" + "time" + + "github.com/go-playground/validator/v10" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" + + "mtusi-messenger/internal/config" + "mtusi-messenger/internal/logger" +) + +type ConfigSuite struct { + suite.Suite +} + +func TestConfigSuite(t *testing.T) { + suite.Run(t, new(ConfigSuite)) +} + +func (s *ConfigSuite) TestDefaults() { + cfg, err := config.Load() + s.Require().NoError(err) + + s.Equal("0.0.0.0", cfg.Host) + s.Equal(8080, cfg.Port) + s.Equal(10*time.Second, cfg.ReadHeaderTimeout) + s.Equal(10*time.Second, cfg.ShutdownTimeout) + s.Equal("info", cfg.LogLevel) + s.Equal("json", cfg.LogFormat) +} + +func (s *ConfigSuite) TestEnvOverridesDefaults() { + s.T().Setenv("APP_HOST", "127.0.0.1") + s.T().Setenv("APP_PORT", "9090") + s.T().Setenv("APP_READ_HEADER_TIMEOUT", "3s") + s.T().Setenv("APP_SHUTDOWN_TIMEOUT", "30s") + s.T().Setenv("APP_LOG_LEVEL", "debug") + s.T().Setenv("APP_LOG_FORMAT", "console") + + cfg, err := config.Load() + s.Require().NoError(err) + + s.Equal("127.0.0.1", cfg.Host) + s.Equal(9090, cfg.Port) + s.Equal(3*time.Second, cfg.ReadHeaderTimeout) + s.Equal(30*time.Second, cfg.ShutdownTimeout) + s.Equal("debug", cfg.LogLevel) + s.Equal("console", cfg.LogFormat) +} + +func (s *ConfigSuite) TestLoggerSettings() { + s.T().Setenv("APP_LOG_LEVEL", "warn") + s.T().Setenv("APP_LOG_FORMAT", "console") + + cfg, err := config.Load() + s.Require().NoError(err) + + level, err := logger.ParseLevel(cfg.LogLevel) + s.Require().NoError(err) + s.Equal(level, cfg.SlogLevel()) + + format, err := logger.ParseFormat(cfg.LogFormat) + s.Require().NoError(err) + s.Equal(format, cfg.LoggerFormat()) +} + +func (s *ConfigSuite) TestAddr() { + s.T().Setenv("APP_HOST", "0.0.0.0") + s.T().Setenv("APP_PORT", "8080") + + cfg, err := config.Load() + s.Require().NoError(err) + + s.Equal("0.0.0.0:8080", cfg.Addr()) +} + +func (s *ConfigSuite) TestAddrWithIPv6Host() { + s.T().Setenv("APP_HOST", "::1") + + cfg, err := config.Load() + s.Require().NoError(err) + + s.Equal("[::1]:8080", cfg.Addr()) +} + +func (s *ConfigSuite) TestInvalidValues() { + tests := map[string]struct { + env map[string]string + wantField string + wantTag string + }{ + "пустой host": { + env: map[string]string{"APP_HOST": ""}, + wantField: "APP_HOST", + wantTag: "required", + }, + "host не адрес и не имя": { + env: map[string]string{"APP_HOST": "не адрес"}, + wantField: "APP_HOST", + wantTag: "hostname|ip", + }, + "порт ниже диапазона": { + env: map[string]string{"APP_PORT": "0"}, + wantField: "APP_PORT", + wantTag: "required", + }, + "порт выше диапазона": { + env: map[string]string{"APP_PORT": "65536"}, + wantField: "APP_PORT", + wantTag: "max", + }, + "нулевой read header timeout": { + env: map[string]string{"APP_READ_HEADER_TIMEOUT": "0s"}, + wantField: "APP_READ_HEADER_TIMEOUT", + wantTag: "required", + }, + "отрицательный shutdown timeout": { + env: map[string]string{"APP_SHUTDOWN_TIMEOUT": "-1s"}, + wantField: "APP_SHUTDOWN_TIMEOUT", + wantTag: "gt", + }, + "неизвестный уровень логирования": { + env: map[string]string{"APP_LOG_LEVEL": "trace"}, + wantField: "APP_LOG_LEVEL", + wantTag: "oneof", + }, + "неизвестный формат логирования": { + env: map[string]string{"APP_LOG_FORMAT": "xml"}, + wantField: "APP_LOG_FORMAT", + wantTag: "oneof", + }, + } + + for name, tt := range tests { + s.Run(name, func() { + for key, value := range tt.env { + s.T().Setenv(key, value) + } + + _, err := config.Load() + s.Require().Error(err) + + var validationErrs validator.ValidationErrors + s.Require().ErrorAs(err, &validationErrs) + s.Require().Len(validationErrs, 1) + + s.Equal(tt.wantField, validationErrs[0].Field()) + s.Equal(tt.wantTag, validationErrs[0].Tag()) + }) + } +} + +func (s *ConfigSuite) TestUnparsableValues() { + tests := map[string]map[string]string{ + "порт не число": {"APP_PORT": "не-число"}, + "timeout не длительность": {"APP_READ_HEADER_TIMEOUT": "быстро"}, + } + + for name, env := range tests { + s.Run(name, func() { + for key, value := range env { + s.T().Setenv(key, value) + } + + _, err := config.Load() + s.Require().Error(err) + }) + } +} + +func TestLoadIsIndependentOfProcessState(t *testing.T) { + t.Setenv("APP_PORT", "7070") + + first, err := config.Load() + require.NoError(t, err) + + second, err := config.Load() + require.NoError(t, err) + + require.Equal(t, first, second) +} diff --git a/internal/domain/chat.go b/internal/domain/chat.go new file mode 100644 index 00000000..a97a9745 --- /dev/null +++ b/internal/domain/chat.go @@ -0,0 +1,38 @@ +package domain + +import ( + "fmt" + "slices" + "time" + + "github.com/google/uuid" +) + +type Chat struct { + ID uuid.UUID + Title string + MemberIDs []uuid.UUID + CreatedAt time.Time +} + +func (c Chat) HasMember(userID uuid.UUID) bool { + return slices.Contains(c.MemberIDs, userID) +} + +type ChatDraft struct { + Title string + MemberIDs []uuid.UUID + CallerID uuid.UUID +} + +func (d ChatDraft) Validate() error { + if err := validateNotBlank("title", d.Title); err != nil { + return err + } + + if !slices.Contains(d.MemberIDs, d.CallerID) { + return fmt.Errorf("member_ids must contain the caller: %w", ErrValidation) + } + + return nil +} diff --git a/internal/domain/cursor.go b/internal/domain/cursor.go new file mode 100644 index 00000000..e18118c5 --- /dev/null +++ b/internal/domain/cursor.go @@ -0,0 +1,17 @@ +package domain + +import ( + "time" + + "github.com/google/uuid" +) + +type Cursor struct { + Scope uuid.UUID + CreatedAt time.Time + ID uuid.UUID +} + +func (c Cursor) BelongsTo(scope uuid.UUID) bool { + return c.Scope == scope +} diff --git a/internal/domain/errors.go b/internal/domain/errors.go new file mode 100644 index 00000000..f0c235b2 --- /dev/null +++ b/internal/domain/errors.go @@ -0,0 +1,11 @@ +package domain + +import "errors" + +var ( + ErrNotFound = errors.New("not found") + ErrUsernameTaken = errors.New("username already taken") + ErrUnknownMember = errors.New("member does not exist") + ErrValidation = errors.New("validation failed") + ErrInvalidCursor = errors.New("invalid cursor") +) diff --git a/internal/domain/message.go b/internal/domain/message.go new file mode 100644 index 00000000..e39c76cb --- /dev/null +++ b/internal/domain/message.go @@ -0,0 +1,25 @@ +package domain + +import ( + "time" + + "github.com/google/uuid" +) + +type Message struct { + ID uuid.UUID + ChatID uuid.UUID + SenderID uuid.UUID + Text string + CreatedAt time.Time +} + +type MessageDraft struct { + ChatID uuid.UUID + SenderID uuid.UUID + Text string +} + +func (d MessageDraft) Validate() error { + return validateNotBlank("text", d.Text) +} diff --git a/internal/domain/page.go b/internal/domain/page.go new file mode 100644 index 00000000..bd0bd31b --- /dev/null +++ b/internal/domain/page.go @@ -0,0 +1,8 @@ +package domain + +const DefaultPageLimit = 50 + +type Page[T any] struct { + Items []T + Next *Cursor +} diff --git a/internal/domain/text.go b/internal/domain/text.go new file mode 100644 index 00000000..e944b85a --- /dev/null +++ b/internal/domain/text.go @@ -0,0 +1,14 @@ +package domain + +import ( + "fmt" + "strings" +) + +func validateNotBlank(field, value string) error { + if strings.TrimSpace(value) == "" { + return fmt.Errorf("%s consists of whitespace only: %w", field, ErrValidation) + } + + return nil +} diff --git a/internal/domain/user.go b/internal/domain/user.go new file mode 100644 index 00000000..fcf652d9 --- /dev/null +++ b/internal/domain/user.go @@ -0,0 +1,23 @@ +package domain + +import ( + "time" + + "github.com/google/uuid" +) + +type User struct { + ID uuid.UUID + Username string + DisplayName string + CreatedAt time.Time +} + +type UserDraft struct { + Username string + DisplayName string +} + +func (d UserDraft) Validate() error { + return validateNotBlank("display_name", d.DisplayName) +} diff --git a/internal/domain/validation_test.go b/internal/domain/validation_test.go new file mode 100644 index 00000000..6cd6335a --- /dev/null +++ b/internal/domain/validation_test.go @@ -0,0 +1,86 @@ +package domain_test + +import ( + "strings" + "testing" + + "github.com/google/uuid" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "mtusi-messenger/internal/domain" +) + +// Длины, regex и uniqueItems проверяет сгенерированный слой по contracts/openapi.json. +// Домен закрывает только то, что схема выразить не может. + +func TestUserDraftRejectsBlankDisplayName(t *testing.T) { + t.Parallel() + + for _, blank := range []string{" ", " ", "\t", "\n", "\u00a0"} { + draft := domain.UserDraft{Username: "alice", DisplayName: blank} + require.ErrorIs(t, draft.Validate(), domain.ErrValidation) + } +} + +func TestUserDraftAcceptsVisibleName(t *testing.T) { + t.Parallel() + + draft := domain.UserDraft{Username: "alice", DisplayName: "Алиса"} + assert.NoError(t, draft.Validate()) +} + +func TestChatDraftRequiresCallerAmongMembers(t *testing.T) { + t.Parallel() + + caller := uuid.New() + + outside := domain.ChatDraft{ + Title: "Проект", + MemberIDs: []uuid.UUID{uuid.New(), uuid.New()}, + CallerID: caller, + } + require.ErrorIs(t, outside.Validate(), domain.ErrValidation) + + inside := domain.ChatDraft{ + Title: "Проект", + MemberIDs: []uuid.UUID{uuid.New(), caller}, + CallerID: caller, + } + assert.NoError(t, inside.Validate()) +} + +func TestChatDraftRejectsBlankTitle(t *testing.T) { + t.Parallel() + + caller := uuid.New() + + draft := domain.ChatDraft{ + Title: " ", + MemberIDs: []uuid.UUID{caller}, + CallerID: caller, + } + require.ErrorIs(t, draft.Validate(), domain.ErrValidation) +} + +func TestMessageDraftRejectsBlankText(t *testing.T) { + t.Parallel() + + draft := domain.MessageDraft{ + ChatID: uuid.New(), + SenderID: uuid.New(), + Text: strings.Repeat(" ", 10), + } + require.ErrorIs(t, draft.Validate(), domain.ErrValidation) +} + +func TestMessageDraftAcceptsTextWithSurroundingSpaces(t *testing.T) { + t.Parallel() + + draft := domain.MessageDraft{ + ChatID: uuid.New(), + SenderID: uuid.New(), + Text: " привет ", + } + assert.NoError(t, draft.Validate(), "контракт запрещает только полностью пробельный текст") +} diff --git a/internal/logger/errors.go b/internal/logger/errors.go new file mode 100644 index 00000000..799c84d8 --- /dev/null +++ b/internal/logger/errors.go @@ -0,0 +1,8 @@ +package logger + +import "errors" + +var ( + ErrUnknownLevel = errors.New("unknown log level") + ErrUnknownFormat = errors.New("unknown log format") +) diff --git a/internal/logger/logger.go b/internal/logger/logger.go new file mode 100644 index 00000000..96aa8ce9 --- /dev/null +++ b/internal/logger/logger.go @@ -0,0 +1,138 @@ +package logger + +import ( + "fmt" + "io" + "log/slog" + "os" + "strings" + + "go.uber.org/zap/exp/zapslog" + "go.uber.org/zap/zapcore" +) + +type Format string + +const ( + FormatJSON Format = "json" + FormatConsole Format = "console" +) + +const ( + DefaultLevel = slog.LevelInfo + DefaultFormat = FormatJSON +) + +type options struct { + writer io.Writer + level slog.Level + format Format + name string +} + +type Option func(*options) + +func WithWriter(writer io.Writer) Option { + return func(opts *options) { + if writer != nil { + opts.writer = writer + } + } +} + +func WithLevel(level slog.Level) Option { + return func(opts *options) { + opts.level = level + } +} + +func WithFormat(format Format) Option { + return func(opts *options) { + if format != "" { + opts.format = format + } + } +} + +func WithName(name string) Option { + return func(opts *options) { + opts.name = name + } +} + +func New(options ...Option) *slog.Logger { + opts := optionsConfig() + for _, option := range options { + option(&opts) + } + + encoderCfg := zapcore.EncoderConfig{ + TimeKey: "time", + LevelKey: "level", + NameKey: "logger", + CallerKey: "caller", + MessageKey: "msg", + StacktraceKey: "stacktrace", + LineEnding: zapcore.DefaultLineEnding, + EncodeLevel: zapcore.LowercaseLevelEncoder, + EncodeTime: zapcore.RFC3339NanoTimeEncoder, + EncodeDuration: zapcore.StringDurationEncoder, + EncodeCaller: zapcore.ShortCallerEncoder, + } + + var encoder zapcore.Encoder + if opts.format == FormatConsole { + encoder = zapcore.NewConsoleEncoder(encoderCfg) + } else { + encoder = zapcore.NewJSONEncoder(encoderCfg) + } + + core := zapcore.NewCore(encoder, zapcore.AddSync(opts.writer), zapLevel(opts.level)) + handlerOptions := make([]zapslog.HandlerOption, 0, 1) + if opts.name != "" { + handlerOptions = append(handlerOptions, zapslog.WithName(opts.name)) + } + + return slog.New(zapslog.NewHandler(core, handlerOptions...)) +} + +func optionsConfig() options { + return options{ + writer: os.Stdout, + level: DefaultLevel, + format: DefaultFormat, + } +} + +func ParseLevel(raw string) (slog.Level, error) { + var level slog.Level + if err := level.UnmarshalText([]byte(strings.TrimSpace(raw))); err != nil { + return 0, fmt.Errorf("%q: %w", raw, ErrUnknownLevel) + } + + return level, nil +} + +func ParseFormat(raw string) (Format, error) { + switch Format(strings.ToLower(strings.TrimSpace(raw))) { + case FormatJSON: + return FormatJSON, nil + case FormatConsole: + return FormatConsole, nil + default: + return "", fmt.Errorf("%q: %w", raw, ErrUnknownFormat) + } +} + +func zapLevel(level slog.Level) zapcore.Level { + switch { + case level < slog.LevelInfo: + return zapcore.DebugLevel + case level < slog.LevelWarn: + return zapcore.InfoLevel + case level < slog.LevelError: + return zapcore.WarnLevel + default: + return zapcore.ErrorLevel + } +} diff --git a/internal/logger/logger_test.go b/internal/logger/logger_test.go new file mode 100644 index 00000000..0b308272 --- /dev/null +++ b/internal/logger/logger_test.go @@ -0,0 +1,193 @@ +package logger_test + +import ( + "bytes" + "encoding/json" + "log/slog" + "strings" + "testing" + + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" + + "mtusi-messenger/internal/logger" +) + +type LoggerSuite struct { + suite.Suite + + bb *bytes.Buffer +} + +func TestLoggerSuite(t *testing.T) { + t.Parallel() + suite.Run(t, new(LoggerSuite)) +} + +func (s *LoggerSuite) SetupTest() { + s.bb = &bytes.Buffer{} +} + +func (s *LoggerSuite) records() []map[string]any { + var out []map[string]any + + for line := range strings.SplitSeq(strings.TrimSpace(s.bb.String()), "\n") { + if line == "" { + continue + } + + var record map[string]any + s.Require().NoError(json.Unmarshal([]byte(line), &record)) + + out = append(out, record) + } + + return out +} + +func (s *LoggerSuite) TestJSONOutputCarriesAttributes() { + log := logger.New(logger.WithWriter(s.bb)) + + log.Info("сервер запущен", slog.String("addr", "0.0.0.0:8080")) + + records := s.records() + s.Require().Len(records, 1) + + s.Equal("info", records[0]["level"]) + s.Equal("сервер запущен", records[0]["msg"]) + s.Equal("0.0.0.0:8080", records[0]["addr"]) + s.Contains(records[0], "time") +} + +func (s *LoggerSuite) TestDefaultLevelDropsDebug() { + log := logger.New(logger.WithWriter(s.bb)) + + log.Debug("не должно попасть в вывод") + log.Info("должно попасть") + + records := s.records() + s.Require().Len(records, 1) + s.Equal("должно попасть", records[0]["msg"]) +} + +func (s *LoggerSuite) TestWithLevelEnablesDebug() { + log := logger.New(logger.WithWriter(s.bb), logger.WithLevel(slog.LevelDebug)) + + log.Debug("подробность") + + records := s.records() + s.Require().Len(records, 1) + s.Equal("debug", records[0]["level"]) +} + +func (s *LoggerSuite) TestGroupsAreNested() { + log := logger.New(logger.WithWriter(s.bb)) + + log.Info("запрос", slog.Group("payload", slog.Int("size", 12))) + + records := s.records() + s.Require().Len(records, 1) + + payload, ok := records[0]["payload"].(map[string]any) + s.Require().True(ok, "группа должна кодироваться вложенным объектом") + s.InDelta(12, payload["size"], 0) +} + +func (s *LoggerSuite) TestWithNameSetsLoggerField() { + log := logger.New(logger.WithWriter(s.bb), logger.WithName("messenger")) + + log.Info("старт") + + records := s.records() + s.Require().Len(records, 1) + s.Equal("messenger", records[0]["logger"]) +} + +func (s *LoggerSuite) TestConsoleFormatIsNotJSON() { + log := logger.New(s.consoleOptions()...) + + log.Info("человекочитаемо") + + line := strings.TrimSpace(s.bb.String()) + s.Require().NotEmpty(line) + + var record map[string]any + s.Require().Error(json.Unmarshal([]byte(line), &record), "console-формат не должен быть JSON") + s.Contains(line, "человекочитаемо") +} + +func (s *LoggerSuite) consoleOptions() []logger.Option { + return []logger.Option{ + logger.WithWriter(s.bb), + logger.WithFormat(logger.FormatConsole), + } +} + +func (s *LoggerSuite) TestNilWriterKeepsDefault() { + s.Require().NotPanics(func() { + logger.New(logger.WithWriter(nil)).Info("пишем в stdout по умолчанию") + }) +} + +func TestParseLevel(t *testing.T) { + t.Parallel() + + tests := map[string]struct { + want slog.Level + wantErr bool + }{ + "debug": {want: slog.LevelDebug}, + "info": {want: slog.LevelInfo}, + "WARN": {want: slog.LevelWarn}, + "error": {want: slog.LevelError}, + "trace": {wantErr: true}, + "": {wantErr: true}, + } + + for raw, tt := range tests { + t.Run(raw, func(t *testing.T) { + t.Parallel() + + got, err := logger.ParseLevel(raw) + if tt.wantErr { + require.ErrorIs(t, err, logger.ErrUnknownLevel) + + return + } + + require.NoError(t, err) + require.Equal(t, tt.want, got) + }) + } +} + +func TestParseFormat(t *testing.T) { + t.Parallel() + + tests := map[string]struct { + want logger.Format + wantErr bool + }{ + "json": {want: logger.FormatJSON}, + "JSON": {want: logger.FormatJSON}, + "console": {want: logger.FormatConsole}, + "xml": {wantErr: true}, + "": {wantErr: true}, + } + + for raw, tt := range tests { + t.Run(raw, func(t *testing.T) { + t.Parallel() + + got, err := logger.ParseFormat(raw) + if tt.wantErr { + require.ErrorIs(t, err, logger.ErrUnknownFormat) + + return + } + + require.NoError(t, err) + require.Equal(t, tt.want, got) + }) + } +} diff --git a/internal/service/chat/mocks/Repository.go b/internal/service/chat/mocks/Repository.go new file mode 100644 index 00000000..aa6f58f0 --- /dev/null +++ b/internal/service/chat/mocks/Repository.go @@ -0,0 +1,265 @@ +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify + +package mocks + +import ( + "context" + "mtusi-messenger/internal/domain" + + "github.com/google/uuid" + mock "github.com/stretchr/testify/mock" +) + +// NewMockRepository creates a new instance of MockRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockRepository(t interface { + mock.TestingT + Cleanup(func()) +}) *MockRepository { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + + mock := &MockRepository{} + mock.Mock.Test(t) + + t.Cleanup(func() { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + mock.AssertExpectations(t) + }) + + return mock +} + +// MockRepository is an autogenerated mock type for the Repository type +type MockRepository struct { + mock.Mock +} + +type MockRepository_Expecter struct { + mock *mock.Mock +} + +func (_m *MockRepository) EXPECT() *MockRepository_Expecter { + return &MockRepository_Expecter{mock: &_m.Mock} +} + +// Create provides a mock function for the type MockRepository +func (_mock *MockRepository) Create(ctx context.Context, draft domain.ChatDraft) (domain.Chat, error) { + ret := _mock.Called(ctx, draft) + + if len(ret) == 0 { + panic("no return value specified for Create") + } + + var r0 domain.Chat + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, domain.ChatDraft) (domain.Chat, error)); ok { + return returnFunc(ctx, draft) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, domain.ChatDraft) domain.Chat); ok { + r0 = returnFunc(ctx, draft) + } else { + r0 = ret.Get(0).(domain.Chat) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, domain.ChatDraft) error); ok { + r1 = returnFunc(ctx, draft) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockRepository_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type MockRepository_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +// - draft domain.ChatDraft +func (_e *MockRepository_Expecter) Create(ctx any, draft any) *MockRepository_Create_Call { + return &MockRepository_Create_Call{Call: _e.mock.On("Create", ctx, draft)} +} + +func (_c *MockRepository_Create_Call) Run(run func(ctx context.Context, draft domain.ChatDraft)) *MockRepository_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 domain.ChatDraft + if args[1] != nil { + arg1 = args[1].(domain.ChatDraft) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockRepository_Create_Call) Return(chat domain.Chat, err error) *MockRepository_Create_Call { + _c.Call.Return(chat, err) + return _c +} + +func (_c *MockRepository_Create_Call) RunAndReturn(run func(ctx context.Context, draft domain.ChatDraft) (domain.Chat, error)) *MockRepository_Create_Call { + _c.Call.Return(run) + return _c +} + +// GetVisible provides a mock function for the type MockRepository +func (_mock *MockRepository) GetVisible(ctx context.Context, chatID uuid.UUID, callerID uuid.UUID) (domain.Chat, error) { + ret := _mock.Called(ctx, chatID, callerID) + + if len(ret) == 0 { + panic("no return value specified for GetVisible") + } + + var r0 domain.Chat + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) (domain.Chat, error)); ok { + return returnFunc(ctx, chatID, callerID) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) domain.Chat); ok { + r0 = returnFunc(ctx, chatID, callerID) + } else { + r0 = ret.Get(0).(domain.Chat) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, uuid.UUID, uuid.UUID) error); ok { + r1 = returnFunc(ctx, chatID, callerID) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockRepository_GetVisible_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetVisible' +type MockRepository_GetVisible_Call struct { + *mock.Call +} + +// GetVisible is a helper method to define mock.On call +// - ctx context.Context +// - chatID uuid.UUID +// - callerID uuid.UUID +func (_e *MockRepository_Expecter) GetVisible(ctx any, chatID any, callerID any) *MockRepository_GetVisible_Call { + return &MockRepository_GetVisible_Call{Call: _e.mock.On("GetVisible", ctx, chatID, callerID)} +} + +func (_c *MockRepository_GetVisible_Call) Run(run func(ctx context.Context, chatID uuid.UUID, callerID uuid.UUID)) *MockRepository_GetVisible_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 uuid.UUID + if args[1] != nil { + arg1 = args[1].(uuid.UUID) + } + var arg2 uuid.UUID + if args[2] != nil { + arg2 = args[2].(uuid.UUID) + } + run( + arg0, + arg1, + arg2, + ) + }) + return _c +} + +func (_c *MockRepository_GetVisible_Call) Return(chat domain.Chat, err error) *MockRepository_GetVisible_Call { + _c.Call.Return(chat, err) + return _c +} + +func (_c *MockRepository_GetVisible_Call) RunAndReturn(run func(ctx context.Context, chatID uuid.UUID, callerID uuid.UUID) (domain.Chat, error)) *MockRepository_GetVisible_Call { + _c.Call.Return(run) + return _c +} + +// ListVisible provides a mock function for the type MockRepository +func (_mock *MockRepository) ListVisible(ctx context.Context, callerID uuid.UUID, after *domain.Cursor, limit int) (domain.Page[domain.Chat], error) { + ret := _mock.Called(ctx, callerID, after, limit) + + if len(ret) == 0 { + panic("no return value specified for ListVisible") + } + + var r0 domain.Page[domain.Chat] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, *domain.Cursor, int) (domain.Page[domain.Chat], error)); ok { + return returnFunc(ctx, callerID, after, limit) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, *domain.Cursor, int) domain.Page[domain.Chat]); ok { + r0 = returnFunc(ctx, callerID, after, limit) + } else { + r0 = ret.Get(0).(domain.Page[domain.Chat]) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, uuid.UUID, *domain.Cursor, int) error); ok { + r1 = returnFunc(ctx, callerID, after, limit) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockRepository_ListVisible_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListVisible' +type MockRepository_ListVisible_Call struct { + *mock.Call +} + +// ListVisible is a helper method to define mock.On call +// - ctx context.Context +// - callerID uuid.UUID +// - after *domain.Cursor +// - limit int +func (_e *MockRepository_Expecter) ListVisible(ctx any, callerID any, after any, limit any) *MockRepository_ListVisible_Call { + return &MockRepository_ListVisible_Call{Call: _e.mock.On("ListVisible", ctx, callerID, after, limit)} +} + +func (_c *MockRepository_ListVisible_Call) Run(run func(ctx context.Context, callerID uuid.UUID, after *domain.Cursor, limit int)) *MockRepository_ListVisible_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 uuid.UUID + if args[1] != nil { + arg1 = args[1].(uuid.UUID) + } + var arg2 *domain.Cursor + if args[2] != nil { + arg2 = args[2].(*domain.Cursor) + } + var arg3 int + if args[3] != nil { + arg3 = args[3].(int) + } + run( + arg0, + arg1, + arg2, + arg3, + ) + }) + return _c +} + +func (_c *MockRepository_ListVisible_Call) Return(page domain.Page[domain.Chat], err error) *MockRepository_ListVisible_Call { + _c.Call.Return(page, err) + return _c +} + +func (_c *MockRepository_ListVisible_Call) RunAndReturn(run func(ctx context.Context, callerID uuid.UUID, after *domain.Cursor, limit int) (domain.Page[domain.Chat], error)) *MockRepository_ListVisible_Call { + _c.Call.Return(run) + return _c +} diff --git a/internal/service/chat/service.go b/internal/service/chat/service.go new file mode 100644 index 00000000..59ca6f3c --- /dev/null +++ b/internal/service/chat/service.go @@ -0,0 +1,71 @@ +package chat + +import ( + "context" + "fmt" + + "github.com/google/uuid" + + "mtusi-messenger/internal/domain" +) + +//go:generate go tool mockery + +type Repository interface { + Create(ctx context.Context, draft domain.ChatDraft) (domain.Chat, error) + GetVisible(ctx context.Context, chatID, callerID uuid.UUID) (domain.Chat, error) + ListVisible( + ctx context.Context, + callerID uuid.UUID, + after *domain.Cursor, + limit int, + ) (domain.Page[domain.Chat], error) +} + +type Service struct { + chats Repository +} + +func NewService(chats Repository) *Service { + return &Service{chats: chats} +} + +func (s *Service) Create(ctx context.Context, draft domain.ChatDraft) (domain.Chat, error) { + if err := draft.Validate(); err != nil { + return domain.Chat{}, err + } + + created, err := s.chats.Create(ctx, draft) + if err != nil { + return domain.Chat{}, fmt.Errorf("create chat: %w", err) + } + + return created, nil +} + +func (s *Service) Get(ctx context.Context, callerID, chatID uuid.UUID) (domain.Chat, error) { + found, err := s.chats.GetVisible(ctx, chatID, callerID) + if err != nil { + return domain.Chat{}, fmt.Errorf("get chat: %w", err) + } + + return found, nil +} + +func (s *Service) List( + ctx context.Context, + callerID uuid.UUID, + after *domain.Cursor, + limit int, +) (domain.Page[domain.Chat], error) { + if after != nil && !after.BelongsTo(callerID) { + return domain.Page[domain.Chat]{}, fmt.Errorf("cursor is bound to another list: %w", domain.ErrInvalidCursor) + } + + page, err := s.chats.ListVisible(ctx, callerID, after, limit) + if err != nil { + return domain.Page[domain.Chat]{}, fmt.Errorf("list chats: %w", err) + } + + return page, nil +} diff --git a/internal/service/chat/service_test.go b/internal/service/chat/service_test.go new file mode 100644 index 00000000..47450f9c --- /dev/null +++ b/internal/service/chat/service_test.go @@ -0,0 +1,140 @@ +package chat_test + +import ( + "errors" + "testing" + "time" + + "github.com/google/uuid" + "github.com/stretchr/testify/suite" + + "mtusi-messenger/internal/domain" + "mtusi-messenger/internal/service/chat" + "mtusi-messenger/internal/service/chat/mocks" +) + +var errRepository = errors.New("repository is unavailable") + +type ServiceSuite struct { + suite.Suite + + chats *mocks.MockRepository + service *chat.Service + caller uuid.UUID + now time.Time +} + +func TestServiceSuite(t *testing.T) { + t.Parallel() + suite.Run(t, new(ServiceSuite)) +} + +func (s *ServiceSuite) SetupTest() { + s.chats = mocks.NewMockRepository(s.T()) + s.service = chat.NewService(s.chats) + s.caller = uuid.New() + s.now = time.Date(2026, 9, 1, 12, 0, 0, 0, time.UTC) +} + +func (s *ServiceSuite) draft() domain.ChatDraft { + return domain.ChatDraft{ + Title: "Проект по ВНП", + MemberIDs: []uuid.UUID{s.caller}, + CallerID: s.caller, + } +} + +func (s *ServiceSuite) TestCreateReturnsStoredChat() { + draft := s.draft() + stored := domain.Chat{ + ID: uuid.New(), + Title: draft.Title, + MemberIDs: draft.MemberIDs, + CreatedAt: s.now, + } + + s.chats.EXPECT().Create(s.T().Context(), draft).Return(stored, nil).Once() + + got, err := s.service.Create(s.T().Context(), draft) + s.Require().NoError(err) + s.Equal(stored, got) +} + +func (s *ServiceSuite) TestCreateRejectsDraftWithoutCallerWithoutRepositoryCall() { + draft := s.draft() + draft.MemberIDs = []uuid.UUID{uuid.New()} + + _, err := s.service.Create(s.T().Context(), draft) + s.Require().ErrorIs(err, domain.ErrValidation) +} + +func (s *ServiceSuite) TestCreateRejectsBlankTitleWithoutRepositoryCall() { + draft := s.draft() + draft.Title = " " + + _, err := s.service.Create(s.T().Context(), draft) + s.Require().ErrorIs(err, domain.ErrValidation) +} + +func (s *ServiceSuite) TestCreatePropagatesUnknownMember() { + draft := s.draft() + + s.chats.EXPECT().Create(s.T().Context(), draft).Return(domain.Chat{}, domain.ErrUnknownMember).Once() + + _, err := s.service.Create(s.T().Context(), draft) + s.Require().ErrorIs(err, domain.ErrUnknownMember, + "целостность участников проверяет хранилище, сервис только пробрасывает исход") +} + +func (s *ServiceSuite) TestGetPropagatesNotFoundForForeignChat() { + chatID := uuid.New() + + s.chats.EXPECT().GetVisible(s.T().Context(), chatID, s.caller).Return(domain.Chat{}, domain.ErrNotFound).Once() + + _, err := s.service.Get(s.T().Context(), s.caller, chatID) + s.Require().ErrorIs(err, domain.ErrNotFound) +} + +func (s *ServiceSuite) TestListPassesNilCursorOnFirstPage() { + stored := domain.Chat{ID: uuid.New(), Title: "Проект", MemberIDs: []uuid.UUID{s.caller}, CreatedAt: s.now} + + s.chats.EXPECT(). + ListVisible(s.T().Context(), s.caller, (*domain.Cursor)(nil), domain.DefaultPageLimit). + Return(domain.Page[domain.Chat]{Items: []domain.Chat{stored}}, nil). + Once() + + page, err := s.service.List(s.T().Context(), s.caller, nil, domain.DefaultPageLimit) + s.Require().NoError(err) + s.Equal([]domain.Chat{stored}, page.Items) + s.Nil(page.Next, "на последней странице курсора нет") +} + +func (s *ServiceSuite) TestListRejectsCursorFromAnotherCaller() { + foreign := &domain.Cursor{Scope: uuid.New(), CreatedAt: s.now, ID: uuid.New()} + + _, err := s.service.List(s.T().Context(), s.caller, foreign, domain.DefaultPageLimit) + s.Require().ErrorIs(err, domain.ErrInvalidCursor, + "курсор чужого списка не должен открывать чужие чаты") +} + +func (s *ServiceSuite) TestListAcceptsOwnCursor() { + own := &domain.Cursor{Scope: s.caller, CreatedAt: s.now, ID: uuid.New()} + + s.chats.EXPECT(). + ListVisible(s.T().Context(), s.caller, own, 10). + Return(domain.Page[domain.Chat]{}, nil). + Once() + + _, err := s.service.List(s.T().Context(), s.caller, own, 10) + s.Require().NoError(err) +} + +func (s *ServiceSuite) TestListWrapsRepositoryFailure() { + s.chats.EXPECT(). + ListVisible(s.T().Context(), s.caller, (*domain.Cursor)(nil), domain.DefaultPageLimit). + Return(domain.Page[domain.Chat]{}, errRepository). + Once() + + _, err := s.service.List(s.T().Context(), s.caller, nil, domain.DefaultPageLimit) + s.Require().ErrorIs(err, errRepository) +} diff --git a/internal/service/message/mocks/Repository.go b/internal/service/message/mocks/Repository.go new file mode 100644 index 00000000..b09b4656 --- /dev/null +++ b/internal/service/message/mocks/Repository.go @@ -0,0 +1,199 @@ +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify + +package mocks + +import ( + "context" + "mtusi-messenger/internal/domain" + + "github.com/google/uuid" + mock "github.com/stretchr/testify/mock" +) + +// NewMockRepository creates a new instance of MockRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockRepository(t interface { + mock.TestingT + Cleanup(func()) +}) *MockRepository { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + + mock := &MockRepository{} + mock.Mock.Test(t) + + t.Cleanup(func() { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + mock.AssertExpectations(t) + }) + + return mock +} + +// MockRepository is an autogenerated mock type for the Repository type +type MockRepository struct { + mock.Mock +} + +type MockRepository_Expecter struct { + mock *mock.Mock +} + +func (_m *MockRepository) EXPECT() *MockRepository_Expecter { + return &MockRepository_Expecter{mock: &_m.Mock} +} + +// Create provides a mock function for the type MockRepository +func (_mock *MockRepository) Create(ctx context.Context, draft domain.MessageDraft) (domain.Message, error) { + ret := _mock.Called(ctx, draft) + + if len(ret) == 0 { + panic("no return value specified for Create") + } + + var r0 domain.Message + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, domain.MessageDraft) (domain.Message, error)); ok { + return returnFunc(ctx, draft) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, domain.MessageDraft) domain.Message); ok { + r0 = returnFunc(ctx, draft) + } else { + r0 = ret.Get(0).(domain.Message) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, domain.MessageDraft) error); ok { + r1 = returnFunc(ctx, draft) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockRepository_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type MockRepository_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +// - draft domain.MessageDraft +func (_e *MockRepository_Expecter) Create(ctx any, draft any) *MockRepository_Create_Call { + return &MockRepository_Create_Call{Call: _e.mock.On("Create", ctx, draft)} +} + +func (_c *MockRepository_Create_Call) Run(run func(ctx context.Context, draft domain.MessageDraft)) *MockRepository_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 domain.MessageDraft + if args[1] != nil { + arg1 = args[1].(domain.MessageDraft) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockRepository_Create_Call) Return(message domain.Message, err error) *MockRepository_Create_Call { + _c.Call.Return(message, err) + return _c +} + +func (_c *MockRepository_Create_Call) RunAndReturn(run func(ctx context.Context, draft domain.MessageDraft) (domain.Message, error)) *MockRepository_Create_Call { + _c.Call.Return(run) + return _c +} + +// ListVisible provides a mock function for the type MockRepository +func (_mock *MockRepository) ListVisible(ctx context.Context, chatID uuid.UUID, callerID uuid.UUID, after *domain.Cursor, limit int) (domain.Page[domain.Message], error) { + ret := _mock.Called(ctx, chatID, callerID, after, limit) + + if len(ret) == 0 { + panic("no return value specified for ListVisible") + } + + var r0 domain.Page[domain.Message] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID, *domain.Cursor, int) (domain.Page[domain.Message], error)); ok { + return returnFunc(ctx, chatID, callerID, after, limit) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID, *domain.Cursor, int) domain.Page[domain.Message]); ok { + r0 = returnFunc(ctx, chatID, callerID, after, limit) + } else { + r0 = ret.Get(0).(domain.Page[domain.Message]) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, uuid.UUID, uuid.UUID, *domain.Cursor, int) error); ok { + r1 = returnFunc(ctx, chatID, callerID, after, limit) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockRepository_ListVisible_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListVisible' +type MockRepository_ListVisible_Call struct { + *mock.Call +} + +// ListVisible is a helper method to define mock.On call +// - ctx context.Context +// - chatID uuid.UUID +// - callerID uuid.UUID +// - after *domain.Cursor +// - limit int +func (_e *MockRepository_Expecter) ListVisible(ctx any, chatID any, callerID any, after any, limit any) *MockRepository_ListVisible_Call { + return &MockRepository_ListVisible_Call{Call: _e.mock.On("ListVisible", ctx, chatID, callerID, after, limit)} +} + +func (_c *MockRepository_ListVisible_Call) Run(run func(ctx context.Context, chatID uuid.UUID, callerID uuid.UUID, after *domain.Cursor, limit int)) *MockRepository_ListVisible_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 uuid.UUID + if args[1] != nil { + arg1 = args[1].(uuid.UUID) + } + var arg2 uuid.UUID + if args[2] != nil { + arg2 = args[2].(uuid.UUID) + } + var arg3 *domain.Cursor + if args[3] != nil { + arg3 = args[3].(*domain.Cursor) + } + var arg4 int + if args[4] != nil { + arg4 = args[4].(int) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) + }) + return _c +} + +func (_c *MockRepository_ListVisible_Call) Return(page domain.Page[domain.Message], err error) *MockRepository_ListVisible_Call { + _c.Call.Return(page, err) + return _c +} + +func (_c *MockRepository_ListVisible_Call) RunAndReturn(run func(ctx context.Context, chatID uuid.UUID, callerID uuid.UUID, after *domain.Cursor, limit int) (domain.Page[domain.Message], error)) *MockRepository_ListVisible_Call { + _c.Call.Return(run) + return _c +} diff --git a/internal/service/message/service.go b/internal/service/message/service.go new file mode 100644 index 00000000..bd7ffbec --- /dev/null +++ b/internal/service/message/service.go @@ -0,0 +1,61 @@ +package message + +import ( + "context" + "fmt" + + "github.com/google/uuid" + + "mtusi-messenger/internal/domain" +) + +//go:generate go tool mockery + +type Repository interface { + Create(ctx context.Context, draft domain.MessageDraft) (domain.Message, error) + ListVisible( + ctx context.Context, + chatID, callerID uuid.UUID, + after *domain.Cursor, + limit int, + ) (domain.Page[domain.Message], error) +} + +type Service struct { + messages Repository +} + +func NewService(messages Repository) *Service { + return &Service{messages: messages} +} + +func (s *Service) Send(ctx context.Context, draft domain.MessageDraft) (domain.Message, error) { + if err := draft.Validate(); err != nil { + return domain.Message{}, err + } + + sent, err := s.messages.Create(ctx, draft) + if err != nil { + return domain.Message{}, fmt.Errorf("create message: %w", err) + } + + return sent, nil +} + +func (s *Service) History( + ctx context.Context, + callerID, chatID uuid.UUID, + after *domain.Cursor, + limit int, +) (domain.Page[domain.Message], error) { + if after != nil && !after.BelongsTo(chatID) { + return domain.Page[domain.Message]{}, fmt.Errorf("cursor is bound to another chat: %w", domain.ErrInvalidCursor) + } + + page, err := s.messages.ListVisible(ctx, chatID, callerID, after, limit) + if err != nil { + return domain.Page[domain.Message]{}, fmt.Errorf("list messages: %w", err) + } + + return page, nil +} diff --git a/internal/service/message/service_test.go b/internal/service/message/service_test.go new file mode 100644 index 00000000..62517dc1 --- /dev/null +++ b/internal/service/message/service_test.go @@ -0,0 +1,143 @@ +package message_test + +import ( + "errors" + "testing" + "time" + + "github.com/google/uuid" + "github.com/stretchr/testify/suite" + + "mtusi-messenger/internal/domain" + "mtusi-messenger/internal/service/message" + "mtusi-messenger/internal/service/message/mocks" +) + +var errRepository = errors.New("repository is unavailable") + +type ServiceSuite struct { + suite.Suite + + messages *mocks.MockRepository + service *message.Service + caller uuid.UUID + chatID uuid.UUID + now time.Time +} + +func TestServiceSuite(t *testing.T) { + t.Parallel() + suite.Run(t, new(ServiceSuite)) +} + +func (s *ServiceSuite) SetupTest() { + s.messages = mocks.NewMockRepository(s.T()) + s.service = message.NewService(s.messages) + s.caller = uuid.New() + s.chatID = uuid.New() + s.now = time.Date(2026, 9, 1, 12, 0, 0, 0, time.UTC) +} + +func (s *ServiceSuite) draft() domain.MessageDraft { + return domain.MessageDraft{ + ChatID: s.chatID, + SenderID: s.caller, + Text: "Привет, Боб!", + } +} + +func (s *ServiceSuite) TestSendReturnsStoredMessage() { + draft := s.draft() + stored := domain.Message{ + ID: uuid.New(), + ChatID: draft.ChatID, + SenderID: draft.SenderID, + Text: draft.Text, + CreatedAt: s.now, + } + + s.messages.EXPECT().Create(s.T().Context(), draft).Return(stored, nil).Once() + + got, err := s.service.Send(s.T().Context(), draft) + s.Require().NoError(err) + s.Equal(stored, got) +} + +func (s *ServiceSuite) TestSendRejectsWhitespaceTextWithoutRepositoryCall() { + draft := s.draft() + draft.Text = " \t\n " + + _, err := s.service.Send(s.T().Context(), draft) + s.Require().ErrorIs(err, domain.ErrValidation, + "пробельный текст не проходит схему контракта, но проходит minLength") +} + +func (s *ServiceSuite) TestSendPropagatesNotFoundForOutsider() { + draft := s.draft() + + s.messages.EXPECT().Create(s.T().Context(), draft).Return(domain.Message{}, domain.ErrNotFound).Once() + + _, err := s.service.Send(s.T().Context(), draft) + s.Require().ErrorIs(err, domain.ErrNotFound, + "доступ проверяет хранилище атомарно со вставкой") +} + +func (s *ServiceSuite) TestHistoryPassesNilCursorOnFirstPage() { + stored := domain.Message{ + ID: uuid.New(), + ChatID: s.chatID, + SenderID: s.caller, + Text: "первое", + CreatedAt: s.now, + } + + s.messages.EXPECT(). + ListVisible(s.T().Context(), s.chatID, s.caller, (*domain.Cursor)(nil), domain.DefaultPageLimit). + Return(domain.Page[domain.Message]{Items: []domain.Message{stored}}, nil). + Once() + + page, err := s.service.History(s.T().Context(), s.caller, s.chatID, nil, domain.DefaultPageLimit) + s.Require().NoError(err) + s.Equal([]domain.Message{stored}, page.Items) + s.Nil(page.Next) +} + +func (s *ServiceSuite) TestHistoryRejectsCursorFromAnotherChat() { + foreign := &domain.Cursor{Scope: uuid.New(), CreatedAt: s.now, ID: uuid.New()} + + _, err := s.service.History(s.T().Context(), s.caller, s.chatID, foreign, domain.DefaultPageLimit) + s.Require().ErrorIs(err, domain.ErrInvalidCursor, + "контракт требует 400 на курсор от другого чата") +} + +func (s *ServiceSuite) TestHistoryAcceptsCursorOfSameChat() { + own := &domain.Cursor{Scope: s.chatID, CreatedAt: s.now, ID: uuid.New()} + + s.messages.EXPECT(). + ListVisible(s.T().Context(), s.chatID, s.caller, own, 7). + Return(domain.Page[domain.Message]{}, nil). + Once() + + _, err := s.service.History(s.T().Context(), s.caller, s.chatID, own, 7) + s.Require().NoError(err) +} + +func (s *ServiceSuite) TestHistoryPropagatesNotFoundForOutsider() { + s.messages.EXPECT(). + ListVisible(s.T().Context(), s.chatID, s.caller, (*domain.Cursor)(nil), domain.DefaultPageLimit). + Return(domain.Page[domain.Message]{}, domain.ErrNotFound). + Once() + + _, err := s.service.History(s.T().Context(), s.caller, s.chatID, nil, domain.DefaultPageLimit) + s.Require().ErrorIs(err, domain.ErrNotFound) +} + +func (s *ServiceSuite) TestHistoryWrapsRepositoryFailure() { + s.messages.EXPECT(). + ListVisible(s.T().Context(), s.chatID, s.caller, (*domain.Cursor)(nil), domain.DefaultPageLimit). + Return(domain.Page[domain.Message]{}, errRepository). + Once() + + _, err := s.service.History(s.T().Context(), s.caller, s.chatID, nil, domain.DefaultPageLimit) + s.Require().ErrorIs(err, errRepository) +} diff --git a/internal/service/user/mocks/Repository.go b/internal/service/user/mocks/Repository.go new file mode 100644 index 00000000..fe2e9e33 --- /dev/null +++ b/internal/service/user/mocks/Repository.go @@ -0,0 +1,181 @@ +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify + +package mocks + +import ( + "context" + "mtusi-messenger/internal/domain" + + "github.com/google/uuid" + mock "github.com/stretchr/testify/mock" +) + +// NewMockRepository creates a new instance of MockRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockRepository(t interface { + mock.TestingT + Cleanup(func()) +}) *MockRepository { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + + mock := &MockRepository{} + mock.Mock.Test(t) + + t.Cleanup(func() { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + mock.AssertExpectations(t) + }) + + return mock +} + +// MockRepository is an autogenerated mock type for the Repository type +type MockRepository struct { + mock.Mock +} + +type MockRepository_Expecter struct { + mock *mock.Mock +} + +func (_m *MockRepository) EXPECT() *MockRepository_Expecter { + return &MockRepository_Expecter{mock: &_m.Mock} +} + +// Create provides a mock function for the type MockRepository +func (_mock *MockRepository) Create(ctx context.Context, draft domain.UserDraft) (domain.User, error) { + ret := _mock.Called(ctx, draft) + + if len(ret) == 0 { + panic("no return value specified for Create") + } + + var r0 domain.User + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, domain.UserDraft) (domain.User, error)); ok { + return returnFunc(ctx, draft) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, domain.UserDraft) domain.User); ok { + r0 = returnFunc(ctx, draft) + } else { + r0 = ret.Get(0).(domain.User) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, domain.UserDraft) error); ok { + r1 = returnFunc(ctx, draft) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockRepository_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type MockRepository_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +// - draft domain.UserDraft +func (_e *MockRepository_Expecter) Create(ctx any, draft any) *MockRepository_Create_Call { + return &MockRepository_Create_Call{Call: _e.mock.On("Create", ctx, draft)} +} + +func (_c *MockRepository_Create_Call) Run(run func(ctx context.Context, draft domain.UserDraft)) *MockRepository_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 domain.UserDraft + if args[1] != nil { + arg1 = args[1].(domain.UserDraft) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockRepository_Create_Call) Return(user domain.User, err error) *MockRepository_Create_Call { + _c.Call.Return(user, err) + return _c +} + +func (_c *MockRepository_Create_Call) RunAndReturn(run func(ctx context.Context, draft domain.UserDraft) (domain.User, error)) *MockRepository_Create_Call { + _c.Call.Return(run) + return _c +} + +// GetByID provides a mock function for the type MockRepository +func (_mock *MockRepository) GetByID(ctx context.Context, id uuid.UUID) (domain.User, error) { + ret := _mock.Called(ctx, id) + + if len(ret) == 0 { + panic("no return value specified for GetByID") + } + + var r0 domain.User + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID) (domain.User, error)); ok { + return returnFunc(ctx, id) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID) domain.User); ok { + r0 = returnFunc(ctx, id) + } else { + r0 = ret.Get(0).(domain.User) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, uuid.UUID) error); ok { + r1 = returnFunc(ctx, id) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockRepository_GetByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByID' +type MockRepository_GetByID_Call struct { + *mock.Call +} + +// GetByID is a helper method to define mock.On call +// - ctx context.Context +// - id uuid.UUID +func (_e *MockRepository_Expecter) GetByID(ctx any, id any) *MockRepository_GetByID_Call { + return &MockRepository_GetByID_Call{Call: _e.mock.On("GetByID", ctx, id)} +} + +func (_c *MockRepository_GetByID_Call) Run(run func(ctx context.Context, id uuid.UUID)) *MockRepository_GetByID_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 uuid.UUID + if args[1] != nil { + arg1 = args[1].(uuid.UUID) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockRepository_GetByID_Call) Return(user domain.User, err error) *MockRepository_GetByID_Call { + _c.Call.Return(user, err) + return _c +} + +func (_c *MockRepository_GetByID_Call) RunAndReturn(run func(ctx context.Context, id uuid.UUID) (domain.User, error)) *MockRepository_GetByID_Call { + _c.Call.Return(run) + return _c +} diff --git a/internal/service/user/service.go b/internal/service/user/service.go new file mode 100644 index 00000000..37add6bf --- /dev/null +++ b/internal/service/user/service.go @@ -0,0 +1,47 @@ +package user + +import ( + "context" + "fmt" + + "github.com/google/uuid" + + "mtusi-messenger/internal/domain" +) + +//go:generate go tool mockery + +type Repository interface { + Create(ctx context.Context, draft domain.UserDraft) (domain.User, error) + GetByID(ctx context.Context, id uuid.UUID) (domain.User, error) +} + +type Service struct { + users Repository +} + +func NewService(users Repository) *Service { + return &Service{users: users} +} + +func (s *Service) Register(ctx context.Context, draft domain.UserDraft) (domain.User, error) { + if err := draft.Validate(); err != nil { + return domain.User{}, err + } + + user, err := s.users.Create(ctx, draft) + if err != nil { + return domain.User{}, fmt.Errorf("create user: %w", err) + } + + return user, nil +} + +func (s *Service) GetByID(ctx context.Context, id uuid.UUID) (domain.User, error) { + user, err := s.users.GetByID(ctx, id) + if err != nil { + return domain.User{}, fmt.Errorf("get user: %w", err) + } + + return user, nil +} diff --git a/internal/service/user/service_test.go b/internal/service/user/service_test.go new file mode 100644 index 00000000..919819df --- /dev/null +++ b/internal/service/user/service_test.go @@ -0,0 +1,85 @@ +package user_test + +import ( + "errors" + "testing" + "time" + + "github.com/google/uuid" + "github.com/stretchr/testify/suite" + + "mtusi-messenger/internal/domain" + "mtusi-messenger/internal/service/user" + "mtusi-messenger/internal/service/user/mocks" +) + +var errRepository = errors.New("repository is unavailable") + +type ServiceSuite struct { + suite.Suite + + users *mocks.MockRepository + service *user.Service + now time.Time +} + +func TestServiceSuite(t *testing.T) { + t.Parallel() + suite.Run(t, new(ServiceSuite)) +} + +func (s *ServiceSuite) SetupTest() { + s.users = mocks.NewMockRepository(s.T()) + s.service = user.NewService(s.users) + s.now = time.Date(2026, 9, 1, 12, 0, 0, 0, time.UTC) +} + +func (s *ServiceSuite) TestRegisterReturnsStoredUser() { + draft := domain.UserDraft{Username: "alice", DisplayName: "Алиса"} + stored := domain.User{ + ID: uuid.New(), + Username: draft.Username, + DisplayName: draft.DisplayName, + CreatedAt: s.now, + } + + s.users.EXPECT().Create(s.T().Context(), draft).Return(stored, nil).Once() + + got, err := s.service.Register(s.T().Context(), draft) + s.Require().NoError(err) + s.Equal(stored, got, "сервис отдаёт то, что присвоило хранилище") +} + +func (s *ServiceSuite) TestRegisterRejectsBlankDisplayNameWithoutRepositoryCall() { + draft := domain.UserDraft{Username: "alice", DisplayName: " "} + + _, err := s.service.Register(s.T().Context(), draft) + s.Require().ErrorIs(err, domain.ErrValidation) +} + +func (s *ServiceSuite) TestRegisterPropagatesUsernameConflict() { + draft := domain.UserDraft{Username: "alice", DisplayName: "Алиса"} + + s.users.EXPECT().Create(s.T().Context(), draft).Return(domain.User{}, domain.ErrUsernameTaken).Once() + + _, err := s.service.Register(s.T().Context(), draft) + s.Require().ErrorIs(err, domain.ErrUsernameTaken) +} + +func (s *ServiceSuite) TestGetByIDPropagatesNotFound() { + id := uuid.New() + + s.users.EXPECT().GetByID(s.T().Context(), id).Return(domain.User{}, domain.ErrNotFound).Once() + + _, err := s.service.GetByID(s.T().Context(), id) + s.Require().ErrorIs(err, domain.ErrNotFound) +} + +func (s *ServiceSuite) TestGetByIDWrapsRepositoryFailure() { + id := uuid.New() + + s.users.EXPECT().GetByID(s.T().Context(), id).Return(domain.User{}, errRepository).Once() + + _, err := s.service.GetByID(s.T().Context(), id) + s.Require().ErrorIs(err, errRepository) +} diff --git a/internal/storage/memory/chat_repository.go b/internal/storage/memory/chat_repository.go new file mode 100644 index 00000000..c2c1ec38 --- /dev/null +++ b/internal/storage/memory/chat_repository.go @@ -0,0 +1,95 @@ +package memory + +import ( + "context" + "slices" + "time" + + "github.com/google/uuid" + + "mtusi-messenger/internal/domain" +) + +type ChatRepository struct { + store *Store +} + +func (r *ChatRepository) Create(_ context.Context, draft domain.ChatDraft) (domain.Chat, error) { + s := r.store + + s.mu.Lock() + defer s.mu.Unlock() + + for _, id := range draft.MemberIDs { + if _, ok := s.usersByID[id]; !ok { + return domain.Chat{}, domain.ErrUnknownMember + } + } + + chat := domain.Chat{ + ID: s.ids.NewID(), + Title: draft.Title, + MemberIDs: slices.Clone(draft.MemberIDs), + CreatedAt: s.clock.Now(), + } + + s.chatsByID[chat.ID] = chat + + at, _ := slices.BinarySearchFunc(s.chatsOrdered, chat, func(a, b domain.Chat) int { + return compareKeyset(a.CreatedAt, a.ID, b.CreatedAt, b.ID) + }) + s.chatsOrdered = slices.Insert(s.chatsOrdered, at, chat) + + return cloneChat(chat), nil +} + +func (r *ChatRepository) GetVisible(_ context.Context, chatID, callerID uuid.UUID) (domain.Chat, error) { + s := r.store + + s.mu.RLock() + defer s.mu.RUnlock() + + chat, ok := s.chatsByID[chatID] + if !ok || !chat.HasMember(callerID) { + return domain.Chat{}, domain.ErrNotFound + } + + return cloneChat(chat), nil +} + +func (r *ChatRepository) ListVisible( + _ context.Context, + callerID uuid.UUID, + after *domain.Cursor, + limit int, +) (domain.Page[domain.Chat], error) { + s := r.store + + s.mu.RLock() + defer s.mu.RUnlock() + + visible := make([]domain.Chat, 0, len(s.chatsOrdered)) + + for _, chat := range s.chatsOrdered { + if chat.HasMember(callerID) { + visible = append(visible, chat) + } + } + + page := paginate(visible, callerID, chatKey, after, limit) + for i, chat := range page.Items { + page.Items[i] = cloneChat(chat) + } + + return page, nil +} + +func chatKey(chat domain.Chat) (time.Time, uuid.UUID) { + return chat.CreatedAt, chat.ID +} + +func cloneChat(chat domain.Chat) domain.Chat { + chat.MemberIDs = slices.Clone(chat.MemberIDs) + + return chat +} diff --git a/internal/storage/memory/message_benchmark_test.go b/internal/storage/memory/message_benchmark_test.go new file mode 100644 index 00000000..12f620ac --- /dev/null +++ b/internal/storage/memory/message_benchmark_test.go @@ -0,0 +1,51 @@ +package memory + +import ( + "context" + "fmt" + "testing" + "time" + + "github.com/google/uuid" + + "mtusi-messenger/internal/domain" +) + +type benchmarkClock struct{ now time.Time } + +func (c benchmarkClock) Now() time.Time { return c.now } + +func BenchmarkMessageCreate(b *testing.B) { + for _, size := range []int{1000, 10000, 50000} { + b.Run(fmt.Sprintf("history=%d", size), func(b *testing.B) { + base := time.Date(2026, 9, 1, 12, 0, 0, 0, time.UTC) + store := NewStore(WithClock(benchmarkClock{now: base.Add(time.Hour)})) + chatID, senderID := uuid.New(), uuid.New() + store.chatsByID[chatID] = domain.Chat{ID: chatID, MemberIDs: []uuid.UUID{senderID}} + history := make([]domain.Message, size, size+1) + for i := range history { + history[i] = domain.Message{ + ID: uuid.New(), + ChatID: chatID, + SenderID: senderID, + CreatedAt: base.Add(time.Duration(i) * time.Microsecond), + } + } + store.messagesByChat[chatID] = history + draft := domain.MessageDraft{ChatID: chatID, SenderID: senderID, Text: "benchmark"} + b.ReportAllocs() + b.ResetTimer() + for b.Loop() { + created, err := store.Messages().Create(context.Background(), draft) + if err != nil { + b.Fatal(err) + } + if len(store.messagesByChat[chatID]) != size+1 || + compareKeyset(history[size-1].CreatedAt, history[size-1].ID, created.CreatedAt, created.ID) >= 0 { + b.Fatal("message not appended in keyset order") + } + store.messagesByChat[chatID] = store.messagesByChat[chatID][:size] + } + }) + } +} diff --git a/internal/storage/memory/message_repository.go b/internal/storage/memory/message_repository.go new file mode 100644 index 00000000..68fa5a0d --- /dev/null +++ b/internal/storage/memory/message_repository.go @@ -0,0 +1,77 @@ +package memory + +import ( + "context" + "slices" + "time" + + "github.com/google/uuid" + + "mtusi-messenger/internal/domain" +) + +type MessageRepository struct { + store *Store +} + +func (r *MessageRepository) Create(_ context.Context, draft domain.MessageDraft) (domain.Message, error) { + s := r.store + + s.mu.Lock() + defer s.mu.Unlock() + + chat, ok := s.chatsByID[draft.ChatID] + if !ok || !chat.HasMember(draft.SenderID) { + return domain.Message{}, domain.ErrNotFound + } + + message := domain.Message{ + ID: s.ids.NewID(), + ChatID: draft.ChatID, + SenderID: draft.SenderID, + Text: draft.Text, + CreatedAt: s.clock.Now(), + } + + history := s.messagesByChat[message.ChatID] + if len(history) == 0 || compareKeyset( + history[len(history)-1].CreatedAt, + history[len(history)-1].ID, + message.CreatedAt, + message.ID, + ) < 0 { + s.messagesByChat[message.ChatID] = append(history, message) + + return message, nil + } + + at, _ := slices.BinarySearchFunc(history, message, func(a, b domain.Message) int { + return compareKeyset(a.CreatedAt, a.ID, b.CreatedAt, b.ID) + }) + s.messagesByChat[message.ChatID] = slices.Insert(history, at, message) + + return message, nil +} + +func (r *MessageRepository) ListVisible( + _ context.Context, + chatID, callerID uuid.UUID, + after *domain.Cursor, + limit int, +) (domain.Page[domain.Message], error) { + s := r.store + + s.mu.RLock() + defer s.mu.RUnlock() + + chat, ok := s.chatsByID[chatID] + if !ok || !chat.HasMember(callerID) { + return domain.Page[domain.Message]{}, domain.ErrNotFound + } + + return paginate(s.messagesByChat[chatID], chatID, messageKey, after, limit), nil +} + +func messageKey(message domain.Message) (time.Time, uuid.UUID) { + return message.CreatedAt, message.ID +} diff --git a/internal/storage/memory/repository_test.go b/internal/storage/memory/repository_test.go new file mode 100644 index 00000000..a145b64f --- /dev/null +++ b/internal/storage/memory/repository_test.go @@ -0,0 +1,378 @@ +package memory_test + +import ( + "context" + "sync" + "testing" + "time" + + "github.com/google/uuid" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" + + "mtusi-messenger/internal/domain" + "mtusi-messenger/internal/service/chat" + "mtusi-messenger/internal/service/message" + "mtusi-messenger/internal/service/user" + "mtusi-messenger/internal/storage/memory" +) + +type stepClock struct { + mu sync.Mutex + next time.Time +} + +func newStepClock() *stepClock { + return &stepClock{next: time.Date(2026, 9, 1, 12, 0, 0, 0, time.UTC)} +} + +func (c *stepClock) Now() time.Time { + c.mu.Lock() + defer c.mu.Unlock() + + out := c.next + c.next = c.next.Add(time.Second) + + return out +} + +type RepositorySuite struct { + suite.Suite + + store *memory.Store +} + +func (s *RepositorySuite) ctx() context.Context { return s.T().Context() } + +func TestRepositorySuite(t *testing.T) { + t.Parallel() + suite.Run(t, new(RepositorySuite)) +} + +func (s *RepositorySuite) SetupTest() { + s.store = memory.NewStore(memory.WithClock(newStepClock())) +} + +func (s *RepositorySuite) createUser(username string) domain.User { + s.T().Helper() + + created, err := s.store.Users().Create(s.ctx(), domain.UserDraft{ + Username: username, + DisplayName: "Пользователь", + }) + s.Require().NoError(err) + + return created +} + +func (s *RepositorySuite) createChat(title string, members ...uuid.UUID) domain.Chat { + s.T().Helper() + + created, err := s.store.Chats().Create(s.ctx(), domain.ChatDraft{ + Title: title, + MemberIDs: members, + CallerID: members[0], + }) + s.Require().NoError(err) + + return created +} + +func (s *RepositorySuite) TestCreateAssignsIdentityAndTime() { + created := s.createUser("alice") + + s.NotEqual(uuid.Nil, created.ID, "идентификатор назначает хранилище") + s.False(created.CreatedAt.IsZero(), "время назначает хранилище") + + got, err := s.store.Users().GetByID(s.ctx(), created.ID) + s.Require().NoError(err) + s.Equal(created, got) +} + +func (s *RepositorySuite) TestGetUnknownUser() { + _, err := s.store.Users().GetByID(s.ctx(), uuid.New()) + s.Require().ErrorIs(err, domain.ErrNotFound) +} + +func (s *RepositorySuite) TestDuplicateUsernameRejected() { + s.createUser("alice") + + _, err := s.store.Users().Create(s.ctx(), domain.UserDraft{ + Username: "alice", + DisplayName: "Другая Алиса", + }) + s.Require().ErrorIs(err, domain.ErrUsernameTaken) +} + +func (s *RepositorySuite) TestUsernameUniqueUnderConcurrency() { + const attempts = 50 + + var ( + wg sync.WaitGroup + mu sync.Mutex + succeeded int + ) + + for range attempts { + wg.Go(func() { + _, err := s.store.Users().Create(s.ctx(), domain.UserDraft{ + Username: "alice", + DisplayName: "Алиса", + }) + + mu.Lock() + defer mu.Unlock() + + if err == nil { + succeeded++ + } + }) + } + + wg.Wait() + + s.Equal(1, succeeded, "username уникален даже при гонке") +} + +func (s *RepositorySuite) TestChatRejectsUnknownMember() { + caller := s.createUser("alice") + + _, err := s.store.Chats().Create(s.ctx(), domain.ChatDraft{ + Title: "Проект", + MemberIDs: []uuid.UUID{caller.ID, uuid.New()}, + CallerID: caller.ID, + }) + s.Require().ErrorIs(err, domain.ErrUnknownMember, + "ссылочная целостность проверяется там же, где вставка") +} + +func (s *RepositorySuite) TestChatVisibleOnlyToMembers() { + member := s.createUser("alice") + outsider := s.createUser("bob") + + created := s.createChat("Проект", member.ID) + + got, err := s.store.Chats().GetVisible(s.ctx(), created.ID, member.ID) + s.Require().NoError(err) + s.Equal(created.ID, got.ID) + + _, err = s.store.Chats().GetVisible(s.ctx(), created.ID, outsider.ID) + s.Require().ErrorIs(err, domain.ErrNotFound, "чужой чат неотличим от отсутствующего") + + page, err := s.store.Chats().ListVisible(s.ctx(), outsider.ID, nil, domain.DefaultPageLimit) + s.Require().NoError(err) + s.Empty(page.Items, "чужой чат не попадает в список") +} + +func (s *RepositorySuite) TestStoredChatIsIsolated() { + member := s.createUser("alice") + members := []uuid.UUID{member.ID} + + created := s.createChat("Проект", members...) + + members[0] = uuid.New() + + got, err := s.store.Chats().GetVisible(s.ctx(), created.ID, member.ID) + s.Require().NoError(err) + s.Equal([]uuid.UUID{member.ID}, got.MemberIDs, "хранилище не делит срез с вызывающим") + + got.MemberIDs[0] = uuid.New() + + again, err := s.store.Chats().GetVisible(s.ctx(), created.ID, member.ID) + s.Require().NoError(err) + s.Equal([]uuid.UUID{member.ID}, again.MemberIDs) +} + +func (s *RepositorySuite) TestChatsSortedByKeyset() { + member := s.createUser("alice") + + for range 3 { + s.createChat("Чат", member.ID) + } + + page, err := s.store.Chats().ListVisible(s.ctx(), member.ID, nil, domain.DefaultPageLimit) + s.Require().NoError(err) + s.Require().Len(page.Items, 3) + + for i := 1; i < len(page.Items); i++ { + s.True( + page.Items[i-1].CreatedAt.Before(page.Items[i].CreatedAt), + "порядок (created_at, id) по возрастанию", + ) + } +} + +func (s *RepositorySuite) TestMessageRejectsOutsider() { + member := s.createUser("alice") + outsider := s.createUser("bob") + created := s.createChat("Проект", member.ID) + + _, err := s.store.Messages().Create(s.ctx(), domain.MessageDraft{ + ChatID: created.ID, + SenderID: outsider.ID, + Text: "привет", + }) + s.Require().ErrorIs(err, domain.ErrNotFound) + + _, err = s.store.Messages().ListVisible(s.ctx(), created.ID, outsider.ID, nil, domain.DefaultPageLimit) + s.Require().ErrorIs(err, domain.ErrNotFound) +} + +func (s *RepositorySuite) TestMessageHistoryIsolatedPerChat() { + member := s.createUser("alice") + first := s.createChat("Первый", member.ID) + second := s.createChat("Второй", member.ID) + + for _, tt := range []struct { + chatID uuid.UUID + text string + }{ + {chatID: first.ID, text: "в первом"}, + {chatID: second.ID, text: "во втором"}, + } { + _, err := s.store.Messages().Create(s.ctx(), domain.MessageDraft{ + ChatID: tt.chatID, + SenderID: member.ID, + Text: tt.text, + }) + s.Require().NoError(err) + } + + page, err := s.store.Messages().ListVisible(s.ctx(), first.ID, member.ID, nil, domain.DefaultPageLimit) + s.Require().NoError(err) + s.Require().Len(page.Items, 1) + s.Equal("в первом", page.Items[0].Text) +} + +func (s *RepositorySuite) TestEmptyHistoryReturnsEmptyPage() { + member := s.createUser("alice") + created := s.createChat("Проект", member.ID) + + page, err := s.store.Messages().ListVisible(s.ctx(), created.ID, member.ID, nil, domain.DefaultPageLimit) + s.Require().NoError(err) + s.NotNil(page.Items, `контракт требует "items": [], а не null`) + s.Empty(page.Items) + s.Nil(page.Next) +} + +func (s *RepositorySuite) TestConcurrentMessagesAllStored() { + const ( + clients = 10 + perClient = 10 + total = clients * perClient + readerIterations = 20 + ) + + member := s.createUser("alice") + created := s.createChat("Проект", member.ID) + + var wg sync.WaitGroup + + failures := make(chan error, total+readerIterations) + + for range clients { + wg.Go(func() { + for range perClient { + _, err := s.store.Messages().Create(s.ctx(), domain.MessageDraft{ + ChatID: created.ID, + SenderID: member.ID, + Text: "сообщение", + }) + if err != nil { + failures <- err + } + } + }) + } + + wg.Go(func() { + for range readerIterations { + _, err := s.store.Messages().ListVisible( + s.ctx(), created.ID, member.ID, nil, domain.DefaultPageLimit, + ) + if err != nil { + failures <- err + } + } + }) + + wg.Wait() + close(failures) + + for err := range failures { + s.Require().NoError(err) + } + + seen := make(map[uuid.UUID]struct{}, total) + + var cursor *domain.Cursor + + for { + page, err := s.store.Messages().ListVisible(s.ctx(), created.ID, member.ID, cursor, 7) + s.Require().NoError(err) + + for _, msg := range page.Items { + _, duplicate := seen[msg.ID] + s.Require().False(duplicate, "обход истории не должен повторять сообщения") + seen[msg.ID] = struct{}{} + } + + if page.Next == nil { + break + } + + cursor = page.Next + } + + s.Len(seen, total, "все подтверждённые сообщения должны быть видны следующему чтению") +} + +func (s *RepositorySuite) TestPageWalkIsStable() { + const total = 25 + + member := s.createUser("alice") + created := s.createChat("Проект", member.ID) + + for range total { + _, err := s.store.Messages().Create(s.ctx(), domain.MessageDraft{ + ChatID: created.ID, + SenderID: member.ID, + Text: "сообщение", + }) + s.Require().NoError(err) + } + + whole, err := s.store.Messages().ListVisible(s.ctx(), created.ID, member.ID, nil, 100) + s.Require().NoError(err) + s.Require().Len(whole.Items, total) + + var ( + walked []domain.Message + cursor *domain.Cursor + ) + + for { + page, err := s.store.Messages().ListVisible(s.ctx(), created.ID, member.ID, cursor, 4) + s.Require().NoError(err) + + walked = append(walked, page.Items...) + + if page.Next == nil { + break + } + + cursor = page.Next + } + + s.Equal(whole.Items, walked) +} + +func TestRepositoriesImplementContracts(t *testing.T) { + t.Parallel() + + store := memory.NewStore() + + require.Implements(t, (*user.Repository)(nil), store.Users()) + require.Implements(t, (*chat.Repository)(nil), store.Chats()) + require.Implements(t, (*message.Repository)(nil), store.Messages()) +} diff --git a/internal/storage/memory/store.go b/internal/storage/memory/store.go new file mode 100644 index 00000000..41bd47c2 --- /dev/null +++ b/internal/storage/memory/store.go @@ -0,0 +1,144 @@ +package memory + +import ( + "cmp" + "slices" + "sync" + "time" + + "github.com/google/uuid" + + "mtusi-messenger/internal/domain" +) + +type Clock interface { + Now() time.Time +} + +type IDGenerator interface { + NewID() uuid.UUID +} + +type systemClock struct{} + +func (systemClock) Now() time.Time { + return time.Now().UTC() +} + +type randomIDGenerator struct{} + +func (randomIDGenerator) NewID() uuid.UUID { + return uuid.New() +} + +type options struct { + clock Clock + ids IDGenerator +} + +type Option func(*options) + +func WithClock(clock Clock) Option { + return func(o *options) { + if clock != nil { + o.clock = clock + } + } +} + +func WithIDGenerator(ids IDGenerator) Option { + return func(o *options) { + if ids != nil { + o.ids = ids + } + } +} + +type Store struct { + clock Clock + ids IDGenerator + + mu sync.RWMutex + usersByID map[uuid.UUID]domain.User + usersByUsername map[string]uuid.UUID + chatsByID map[uuid.UUID]domain.Chat + chatsOrdered []domain.Chat + messagesByChat map[uuid.UUID][]domain.Message + + users *UserRepository + chats *ChatRepository + messages *MessageRepository +} + +func NewStore(opts ...Option) *Store { + cfg := options{clock: systemClock{}, ids: randomIDGenerator{}} + for _, opt := range opts { + opt(&cfg) + } + + store := &Store{ + clock: cfg.clock, + ids: cfg.ids, + usersByID: make(map[uuid.UUID]domain.User), + usersByUsername: make(map[string]uuid.UUID), + chatsByID: make(map[uuid.UUID]domain.Chat), + messagesByChat: make(map[uuid.UUID][]domain.Message), + } + + store.users = &UserRepository{store: store} + store.chats = &ChatRepository{store: store} + store.messages = &MessageRepository{store: store} + + return store +} + +func (s *Store) Users() *UserRepository { return s.users } + +func (s *Store) Chats() *ChatRepository { return s.chats } + +func (s *Store) Messages() *MessageRepository { return s.messages } + +func compareKeyset(aCreatedAt time.Time, aID uuid.UUID, bCreatedAt time.Time, bID uuid.UUID) int { + if c := aCreatedAt.Compare(bCreatedAt); c != 0 { + return c + } + + return cmp.Compare(aID.String(), bID.String()) +} + +func paginate[T any]( + items []T, + scope uuid.UUID, + key func(T) (time.Time, uuid.UUID), + after *domain.Cursor, + limit int, +) domain.Page[T] { + start := 0 + + if after != nil { + start, _ = slices.BinarySearchFunc(items, *after, func(item T, target domain.Cursor) int { + createdAt, id := key(item) + if compareKeyset(createdAt, id, target.CreatedAt, target.ID) > 0 { + return 1 + } + + return -1 + }) + } + + rest := items[start:] + + page := domain.Page[T]{Items: make([]T, 0, min(len(rest), limit))} + if len(rest) <= limit { + page.Items = append(page.Items, rest...) + + return page + } + + page.Items = append(page.Items, rest[:limit]...) + + createdAt, id := key(page.Items[limit-1]) + page.Next = &domain.Cursor{Scope: scope, CreatedAt: createdAt, ID: id} + + return page +} diff --git a/internal/storage/memory/store_test.go b/internal/storage/memory/store_test.go new file mode 100644 index 00000000..7c238ca0 --- /dev/null +++ b/internal/storage/memory/store_test.go @@ -0,0 +1,175 @@ +package memory + +import ( + "testing" + "time" + + "github.com/google/uuid" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "mtusi-messenger/internal/domain" +) + +type entry struct { + createdAt time.Time + id uuid.UUID +} + +func entryKey(e entry) (time.Time, uuid.UUID) { + return e.createdAt, e.id +} + +func TestCompareKeyset(t *testing.T) { + t.Parallel() + + earlier := time.Date(2026, 9, 1, 12, 0, 0, 0, time.UTC) + later := earlier.Add(time.Second) + + lowID := uuid.MustParse("11111111-1111-4111-8111-111111111111") + highID := uuid.MustParse("22222222-2222-4222-8222-222222222222") + + tests := map[string]struct { + a entry + b entry + want int + }{ + "время решает": { + a: entry{createdAt: earlier, id: highID}, + b: entry{createdAt: later, id: lowID}, + want: -1, + }, + "при равном времени решает id": { + a: entry{createdAt: earlier, id: lowID}, + b: entry{createdAt: earlier, id: highID}, + want: -1, + }, + "полное совпадение": { + a: entry{createdAt: earlier, id: lowID}, + b: entry{createdAt: earlier, id: lowID}, + want: 0, + }, + } + + for name, tt := range tests { + t.Run(name, func(t *testing.T) { + t.Parallel() + + assert.Equal(t, tt.want, compareKeyset(tt.a.createdAt, tt.a.id, tt.b.createdAt, tt.b.id)) + assert.Equal(t, -tt.want, compareKeyset(tt.b.createdAt, tt.b.id, tt.a.createdAt, tt.a.id), + "сравнение должно быть антисимметричным") + }) + } +} + +func makeEntries(n int) []entry { + base := time.Date(2026, 9, 1, 12, 0, 0, 0, time.UTC) + items := make([]entry, 0, n) + + for i := range n { + items = append(items, entry{ + createdAt: base.Add(time.Duration(i) * time.Second), + id: uuid.New(), + }) + } + + return items +} + +func TestPaginateFirstPage(t *testing.T) { + t.Parallel() + + scope := uuid.New() + items := makeEntries(5) + + page := paginate(items, scope, entryKey, nil, 2) + + require.Len(t, page.Items, 2) + assert.Equal(t, items[:2], page.Items) + require.NotNil(t, page.Next) + assert.Equal(t, items[1].id, page.Next.ID) + assert.Equal(t, scope, page.Next.Scope, "курсор должен нести привязку к последовательности") +} + +func TestPaginateLastPageHasNoCursor(t *testing.T) { + t.Parallel() + + items := makeEntries(3) + + page := paginate(items, uuid.New(), entryKey, nil, 3) + + assert.Equal(t, items, page.Items) + assert.Nil(t, page.Next, "на последней странице next_cursor равен null") +} + +func TestPaginateEmptyResultIsNotNil(t *testing.T) { + t.Parallel() + + page := paginate([]entry{}, uuid.New(), entryKey, nil, 10) + + assert.NotNil(t, page.Items, `контракт требует "items": [], а не null`) + assert.Empty(t, page.Items) + assert.Nil(t, page.Next) +} + +func TestPaginateWalkWithoutDuplicates(t *testing.T) { + t.Parallel() + + const ( + total = 10 + limit = 3 + ) + + scope := uuid.New() + items := makeEntries(total) + + var ( + seen []entry + cursor *domain.Cursor + ) + + for range total { + page := paginate(items, scope, entryKey, cursor, limit) + seen = append(seen, page.Items...) + + if page.Next == nil { + break + } + + cursor = page.Next + } + + assert.Equal(t, items, seen) +} + +func TestPaginateCursorBeyondEnd(t *testing.T) { + t.Parallel() + + scope := uuid.New() + items := makeEntries(3) + last := items[len(items)-1] + + page := paginate(items, scope, entryKey, &domain.Cursor{ + Scope: scope, + CreatedAt: last.createdAt, + ID: last.id, + }, 10) + + assert.Empty(t, page.Items) + assert.Nil(t, page.Next) +} + +func TestPaginateChangedLimitOnContinuation(t *testing.T) { + t.Parallel() + + scope := uuid.New() + items := makeEntries(6) + + first := paginate(items, scope, entryKey, nil, 2) + require.NotNil(t, first.Next) + + second := paginate(items, scope, entryKey, first.Next, 4) + + assert.Equal(t, items[2:], second.Items) + assert.Nil(t, second.Next, "изменение limit при продолжении допустимо") +} diff --git a/internal/storage/memory/user_repository.go b/internal/storage/memory/user_repository.go new file mode 100644 index 00000000..388decb6 --- /dev/null +++ b/internal/storage/memory/user_repository.go @@ -0,0 +1,50 @@ +package memory + +import ( + "context" + + "github.com/google/uuid" + + "mtusi-messenger/internal/domain" +) + +type UserRepository struct { + store *Store +} + +func (r *UserRepository) Create(_ context.Context, draft domain.UserDraft) (domain.User, error) { + s := r.store + + s.mu.Lock() + defer s.mu.Unlock() + + if _, taken := s.usersByUsername[draft.Username]; taken { + return domain.User{}, domain.ErrUsernameTaken + } + + user := domain.User{ + ID: s.ids.NewID(), + Username: draft.Username, + DisplayName: draft.DisplayName, + CreatedAt: s.clock.Now(), + } + + s.usersByID[user.ID] = user + s.usersByUsername[user.Username] = user.ID + + return user, nil +} + +func (r *UserRepository) GetByID(_ context.Context, id uuid.UUID) (domain.User, error) { + s := r.store + + s.mu.RLock() + defer s.mu.RUnlock() + + user, ok := s.usersByID[id] + if !ok { + return domain.User{}, domain.ErrNotFound + } + + return user, nil +} diff --git a/internal/transport/rest/errors.go b/internal/transport/rest/errors.go new file mode 100644 index 00000000..7218188f --- /dev/null +++ b/internal/transport/rest/errors.go @@ -0,0 +1,116 @@ +package rest + +import ( + "context" + "encoding/json" + "errors" + "log/slog" + "net/http" + + "github.com/ogen-go/ogen/ogenerrors" + + "mtusi-messenger/internal/domain" + "mtusi-messenger/internal/transport/rest/oas" +) + +var fallbackErrorBody = []byte(`{"error":{"code":"internal_error","message":"Internal error","request_id":""}}`) + +func newErrorHandler(log *slog.Logger) oas.ErrorHandler { + return func(ctx context.Context, w http.ResponseWriter, r *http.Request, err error) { + status := statusForError(err) + + if preMiddlewareError(err) { + logRejected(ctx, log, r, status, err) + } + + writeError(ctx, log, w, r, status) + } +} + +func statusForError(err error) int { + if status := ogenerrors.ErrorCode(err); status != http.StatusInternalServerError { + return status + } + + switch { + case errors.Is(err, ErrUnauthenticated): + return http.StatusUnauthorized + case errors.Is(err, domain.ErrNotFound): + return http.StatusNotFound + case errors.Is(err, domain.ErrUsernameTaken): + return http.StatusConflict + case errors.Is(err, domain.ErrValidation), + errors.Is(err, domain.ErrUnknownMember), + errors.Is(err, domain.ErrInvalidCursor): + return http.StatusBadRequest + default: + return http.StatusInternalServerError + } +} + +func newNotFoundHandler(log *slog.Logger) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + logRejected(r.Context(), log, r, http.StatusNotFound, nil) + writeError(r.Context(), log, w, r, http.StatusNotFound) + } +} + +func newMethodNotAllowedHandler(log *slog.Logger) func(http.ResponseWriter, *http.Request, string) { + return func(w http.ResponseWriter, r *http.Request, allowed string) { + w.Header().Set("Allow", allowed) + logRejected(r.Context(), log, r, http.StatusMethodNotAllowed, nil) + writeError(r.Context(), log, w, r, http.StatusMethodNotAllowed) + } +} + +func writeError(ctx context.Context, log *slog.Logger, w http.ResponseWriter, r *http.Request, status int) { + requestID := requestIDFromContext(ctx) + if requestID == "" { + requestID = r.Header.Get(requestIDHeader) + } + + body := oas.Error{ + Error: oas.ErrorError{ + Code: codeForStatus(status), + Message: http.StatusText(status), + RequestID: requestID, + }, + } + + payload, marshalErr := json.Marshal(body) + if marshalErr != nil { + status = http.StatusInternalServerError + payload = fallbackErrorBody + } + + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set(requestIDHeader, requestID) + w.WriteHeader(status) + + if _, err := w.Write(payload); err != nil && log != nil { + log.WarnContext(ctx, "response write failed", slog.String("error", err.Error())) + } +} + +func codeForStatus(status int) oas.ErrorErrorCode { + switch status { + case http.StatusBadRequest, http.StatusMethodNotAllowed: + return oas.ErrorErrorCodeInvalidRequest + case http.StatusUnauthorized: + return oas.ErrorErrorCodeUnauthorized + case http.StatusNotFound: + return oas.ErrorErrorCodeNotFound + case http.StatusConflict: + return oas.ErrorErrorCodeConflict + case http.StatusRequestEntityTooLarge: + return oas.ErrorErrorCodePayloadTooLarge + case http.StatusUnsupportedMediaType: + return oas.ErrorErrorCodeUnsupportedMediaType + case http.StatusTooManyRequests: + return oas.ErrorErrorCodeRateLimited + case http.StatusServiceUnavailable: + return oas.ErrorErrorCodeUnavailable + default: + return oas.ErrorErrorCodeInternalError + } +} diff --git a/internal/transport/rest/handler.go b/internal/transport/rest/handler.go new file mode 100644 index 00000000..d8389834 --- /dev/null +++ b/internal/transport/rest/handler.go @@ -0,0 +1,318 @@ +package rest + +import ( + "bytes" + "context" + "encoding/base64" + "encoding/json" + "fmt" + "time" + + "github.com/google/uuid" + + "mtusi-messenger/internal/domain" + "mtusi-messenger/internal/transport/rest/oas" +) + +type UserService interface { + Register(ctx context.Context, draft domain.UserDraft) (domain.User, error) + GetByID(ctx context.Context, id uuid.UUID) (domain.User, error) +} + +type ChatService interface { + Create(ctx context.Context, draft domain.ChatDraft) (domain.Chat, error) + Get(ctx context.Context, callerID, chatID uuid.UUID) (domain.Chat, error) + List( + ctx context.Context, + callerID uuid.UUID, + after *domain.Cursor, + limit int, + ) (domain.Page[domain.Chat], error) +} + +type MessageService interface { + Send(ctx context.Context, draft domain.MessageDraft) (domain.Message, error) + History( + ctx context.Context, + callerID, chatID uuid.UUID, + after *domain.Cursor, + limit int, + ) (domain.Page[domain.Message], error) +} + +type Handler struct { + oas.UnimplementedHandler + + users UserService + chats ChatService + messages MessageService +} + +var noCursor *domain.Cursor + +func NewHandler(users UserService, chats ChatService, messages MessageService) *Handler { + return &Handler{ + users: users, + chats: chats, + messages: messages, + } +} + +func (h *Handler) Liveness(ctx context.Context) (oas.LivenessRes, error) { + return &oas.HealthHeaders{ + XRequestID: oas.NewOptString(requestIDFromContext(ctx)), + Response: oas.Health{Status: oas.HealthStatusOk}, + }, nil +} + +func (h *Handler) Readiness(ctx context.Context) (oas.ReadinessRes, error) { + return &oas.HealthHeaders{ + XRequestID: oas.NewOptString(requestIDFromContext(ctx)), + Response: oas.Health{Status: oas.HealthStatusOk}, + }, nil +} + +func (h *Handler) RegisterUser(ctx context.Context, req *oas.CreateUser) (oas.RegisterUserRes, error) { + user, err := h.users.Register(ctx, domain.UserDraft{ + Username: req.Username, + DisplayName: req.DisplayName, + }) + if err != nil { + return nil, err + } + + return &oas.UserHeaders{ + XRequestID: oas.NewOptString(requestIDFromContext(ctx)), + Response: userResponse(user), + }, nil +} + +func (h *Handler) CurrentUser(ctx context.Context) (oas.CurrentUserRes, error) { + callerID := caller(ctx) + + user, err := h.users.GetByID(ctx, callerID) + if err != nil { + return nil, err + } + + return &oas.UserHeaders{ + XRequestID: oas.NewOptString(requestIDFromContext(ctx)), + Response: userResponse(user), + }, nil +} + +func (h *Handler) CreateChat(ctx context.Context, req *oas.CreateChat) (oas.CreateChatRes, error) { + callerID := caller(ctx) + + chat, err := h.chats.Create(ctx, domain.ChatDraft{ + Title: req.Title, + MemberIDs: req.MemberIds, + CallerID: callerID, + }) + if err != nil { + return nil, err + } + + return &oas.ChatHeaders{ + XRequestID: oas.NewOptString(requestIDFromContext(ctx)), + Response: chatResponse(chat), + }, nil +} + +func (h *Handler) GetChat(ctx context.Context, params oas.GetChatParams) (oas.GetChatRes, error) { + callerID := caller(ctx) + + chat, err := h.chats.Get(ctx, callerID, params.ChatID) + if err != nil { + return nil, err + } + + return &oas.ChatHeaders{ + XRequestID: oas.NewOptString(requestIDFromContext(ctx)), + Response: chatResponse(chat), + }, nil +} + +func (h *Handler) ListChats(ctx context.Context, params oas.ListChatsParams) (oas.ListChatsRes, error) { + callerID := caller(ctx) + + after, err := parseCursor(params.Cursor) + if err != nil { + return nil, err + } + + page, err := h.chats.List(ctx, callerID, after, limitOrDefault(params.Limit)) + if err != nil { + return nil, err + } + + items := make([]oas.Chat, 0, len(page.Items)) + for _, chat := range page.Items { + items = append(items, chatResponse(chat)) + } + + return &oas.ChatPageHeaders{ + XRequestID: oas.NewOptString(requestIDFromContext(ctx)), + Response: oas.ChatPage{ + Items: items, + NextCursor: encodeCursor(page.Next), + }, + }, nil +} + +func (h *Handler) CreateMessage( + ctx context.Context, + req *oas.CreateMessage, + params oas.CreateMessageParams, +) (oas.CreateMessageRes, error) { + callerID := caller(ctx) + + message, err := h.messages.Send(ctx, domain.MessageDraft{ + ChatID: params.ChatID, + SenderID: callerID, + Text: req.Text, + }) + if err != nil { + return nil, err + } + + return &oas.MessageHeaders{ + XRequestID: oas.NewOptString(requestIDFromContext(ctx)), + Response: messageResponse(message), + }, nil +} + +func (h *Handler) ListMessages(ctx context.Context, params oas.ListMessagesParams) (oas.ListMessagesRes, error) { + callerID := caller(ctx) + + after, err := parseCursor(params.Cursor) + if err != nil { + return nil, err + } + + page, err := h.messages.History(ctx, callerID, params.ChatID, after, limitOrDefault(params.Limit)) + if err != nil { + return nil, err + } + + items := make([]oas.Message, 0, len(page.Items)) + for _, message := range page.Items { + items = append(items, messageResponse(message)) + } + + return &oas.MessagePageHeaders{ + XRequestID: oas.NewOptString(requestIDFromContext(ctx)), + Response: oas.MessagePage{ + Items: items, + NextCursor: encodeCursor(page.Next), + }, + }, nil +} + +func parseCursor(raw oas.OptString) (*domain.Cursor, error) { + encoded, ok := raw.Get() + if !ok { + return noCursor, nil + } + + cursor, err := decodeCursor(encoded) + if err != nil { + return nil, err + } + + return &cursor, nil +} + +func encodeCursor(next *domain.Cursor) oas.NilString { + var out oas.NilString + + if next == nil { + out.SetToNull() + + return out + } + + out.SetTo(encodeCursorValue(*next)) + + return out +} + +type cursorWire struct { + Scope uuid.UUID `json:"scope"` + CreatedAt time.Time `json:"created_at"` + ID uuid.UUID `json:"id"` +} + +func encodeCursorValue(cursor domain.Cursor) string { + payload, err := json.Marshal(cursorWire{ + Scope: cursor.Scope, + CreatedAt: cursor.CreatedAt.UTC(), + ID: cursor.ID, + }) + if err != nil { + return "" + } + + return base64.RawURLEncoding.EncodeToString(payload) +} + +func decodeCursor(encoded string) (domain.Cursor, error) { + payload, err := base64.RawURLEncoding.DecodeString(encoded) + if err != nil { + return domain.Cursor{}, fmt.Errorf("decode cursor: %w", domain.ErrInvalidCursor) + } + + decoder := json.NewDecoder(bytes.NewReader(payload)) + decoder.DisallowUnknownFields() + + var wire cursorWire + if err := decoder.Decode(&wire); err != nil { + return domain.Cursor{}, fmt.Errorf("parse cursor: %w", domain.ErrInvalidCursor) + } + + if wire.ID == uuid.Nil { + return domain.Cursor{}, fmt.Errorf("cursor id is empty: %w", domain.ErrInvalidCursor) + } + + return domain.Cursor{ + Scope: wire.Scope, + CreatedAt: wire.CreatedAt.UTC(), + ID: wire.ID, + }, nil +} + +func limitOrDefault(limit oas.OptInt) int { + if value, ok := limit.Get(); ok { + return value + } + + return domain.DefaultPageLimit +} + +func userResponse(user domain.User) oas.User { + return oas.User{ + ID: user.ID, + Username: user.Username, + DisplayName: user.DisplayName, + CreatedAt: user.CreatedAt, + } +} + +func chatResponse(chat domain.Chat) oas.Chat { + return oas.Chat{ + ID: chat.ID, + Title: chat.Title, + MemberIds: chat.MemberIDs, + CreatedAt: chat.CreatedAt, + } +} + +func messageResponse(message domain.Message) oas.Message { + return oas.Message{ + ID: message.ID, + ChatID: message.ChatID, + SenderID: message.SenderID, + Text: message.Text, + CreatedAt: message.CreatedAt, + } +} diff --git a/internal/transport/rest/logging.go b/internal/transport/rest/logging.go new file mode 100644 index 00000000..dba9492c --- /dev/null +++ b/internal/transport/rest/logging.go @@ -0,0 +1,130 @@ +package rest + +import ( + "context" + "errors" + "fmt" + "log/slog" + "net/http" + "time" + + "github.com/ogen-go/ogen/middleware" + "github.com/ogen-go/ogen/ogenerrors" + + "mtusi-messenger/internal/transport/rest/oas" +) + +func loggingMiddleware(log *slog.Logger) oas.Middleware { + return func(req middleware.Request, next middleware.Next) (middleware.Response, error) { + started := time.Now() + + base := []any{ + slog.String("request_id", requestIDFromContext(req.Context)), + slog.String("operation", req.OperationID), + slog.String("method", req.Raw.Method), + slog.String("path", req.Raw.URL.Path), + } + + accepted := make([]any, 0, len(base)+6) + accepted = append(accepted, base...) + accepted = append(accepted, + slog.String("query", req.Raw.URL.RawQuery), + slog.String("remote_addr", req.Raw.RemoteAddr), + slog.String("user_agent", req.Raw.UserAgent()), + slog.Int64("content_length", req.Raw.ContentLength), + slog.Any("params", loggedParams(req.Params)), + payloadAttr(req.RawBody), + ) + + log.InfoContext(req.Context, "request accepted", accepted...) + + resp, err := next(req) + + handled := make([]any, 0, len(base)+4) + handled = append(handled, base...) + handled = append(handled, slog.Duration("duration", time.Since(started))) + + if err != nil { + status := ogenerrors.ErrorCode(err) + + handled = append(handled, + slog.Int("status", status), + slog.String("error", err.Error()), + ) + log.Log(req.Context, levelForStatus(status), "request failed", handled...) + + return resp, err + } + + handled = append(handled, slog.String("result", resultType(resp))) + log.InfoContext(req.Context, "request handled", handled...) + + return resp, nil + } +} + +func logRejected(ctx context.Context, log *slog.Logger, r *http.Request, status int, err error) { + if log == nil { + return + } + + attrs := []any{ + slog.String("request_id", requestIDFromContext(ctx)), + slog.String("method", r.Method), + slog.String("path", r.URL.Path), + slog.Int("status", status), + } + + if err != nil { + attrs = append(attrs, slog.String("error", err.Error())) + } + + log.Log(ctx, levelForStatus(status), "request rejected", attrs...) +} + +func preMiddlewareError(err error) bool { + return errors.As(err, new(*ogenerrors.SecurityError)) || + errors.As(err, new(*ogenerrors.DecodeParamsError)) || + errors.As(err, new(*ogenerrors.DecodeRequestError)) +} + +func levelForStatus(status int) slog.Level { + if status >= http.StatusInternalServerError { + return slog.LevelError + } + + return slog.LevelWarn +} + +func loggedParams(params middleware.Parameters) map[string]any { + if len(params) == 0 { + return nil + } + + out := make(map[string]any, len(params)) + for key, value := range params { + out[string(key.In)+"."+key.Name] = value + } + + return out +} + +func payloadAttr(body []byte) slog.Attr { + size := len(body) + if size == 0 { + return slog.Attr{} + } + + return slog.Group("payload", + slog.Int("size", size), + slog.Bool("content_logged", false), + ) +} + +func resultType(resp middleware.Response) string { + if resp.Type == nil { + return "" + } + + return fmt.Sprintf("%T", resp.Type) +} diff --git a/internal/transport/rest/logging_test.go b/internal/transport/rest/logging_test.go new file mode 100644 index 00000000..59e1e694 --- /dev/null +++ b/internal/transport/rest/logging_test.go @@ -0,0 +1,206 @@ +package rest + +import ( + "encoding/json" + "errors" + "log/slog" + "net/http" + "net/http/httptest" + "strings" + "testing" + + "github.com/ogen-go/ogen/middleware" + "github.com/ogen-go/ogen/openapi" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" + + "mtusi-messenger/internal/logger" + "mtusi-messenger/internal/transport/rest/oas" +) + +type LoggingSuite struct { + suite.Suite + + sink *strings.Builder + log *slog.Logger +} + +func TestLoggingSuite(t *testing.T) { + t.Parallel() + suite.Run(t, new(LoggingSuite)) +} + +func (s *LoggingSuite) SetupTest() { + s.sink = &strings.Builder{} + s.log = logger.New( + logger.WithWriter(s.sink), + logger.WithLevel(slog.LevelDebug), + ) +} + +func (s *LoggingSuite) records() []map[string]any { + var out []map[string]any + + for line := range strings.SplitSeq(strings.TrimSpace(s.sink.String()), "\n") { + if line == "" { + continue + } + + var record map[string]any + s.Require().NoError(json.Unmarshal([]byte(line), &record)) + + out = append(out, record) + } + + return out +} + +func (s *LoggingSuite) request(method, target, body string) middleware.Request { + raw := httptest.NewRequestWithContext( + s.T().Context(), + method, + target, + strings.NewReader(body), + ) + raw.RemoteAddr = "192.0.2.10:54321" + raw.Header.Set("User-Agent", "smoke/1.0") + + ctx := withRequestID(raw.Context(), "req-42") + + return middleware.Request{ + Context: ctx, + OperationName: oas.CreateMessageOperation, + OperationID: "createMessage", + RawBody: []byte(body), + Params: middleware.Parameters{ + {Name: "chat_id", In: openapi.LocationPath}: "33333333-3333-4333-8333-333333333333", + {Name: "limit", In: openapi.LocationQuery}: 50, + }, + Raw: raw, + } +} + +func (s *LoggingSuite) TestLogsAcceptedAndHandled() { + req := s.request(http.MethodPost, "/api/v1/chats/33333333-3333-4333-8333-333333333333/messages?limit=50", `{"text":"привет"}`) + + response := middleware.Response{Type: &oas.Message{}} + + got, err := loggingMiddleware(s.log)(req, func(middleware.Request) (middleware.Response, error) { + return response, nil + }) + + s.Require().NoError(err) + s.Equal(response, got) + + records := s.records() + s.Require().Len(records, 2, "ожидаются записи о принятом и обработанном запросе") + + accepted, handled := records[0], records[1] + + s.Equal("request accepted", accepted["msg"]) + s.Equal("info", accepted["level"]) + s.Equal("req-42", accepted["request_id"]) + s.Equal("createMessage", accepted["operation"]) + s.Equal(http.MethodPost, accepted["method"]) + s.Equal("/api/v1/chats/33333333-3333-4333-8333-333333333333/messages", accepted["path"]) + s.Equal("limit=50", accepted["query"]) + s.Equal("192.0.2.10:54321", accepted["remote_addr"]) + s.Equal("smoke/1.0", accepted["user_agent"]) + + params, ok := accepted["params"].(map[string]any) + s.Require().True(ok, "params должны быть объектом") + s.Equal("33333333-3333-4333-8333-333333333333", params["path.chat_id"]) + s.InEpsilon(float64(50), params["query.limit"], 0.0001) + + payload, ok := accepted["payload"].(map[string]any) + s.Require().True(ok, "payload должен быть объектом") + + s.False(payload["content_logged"].(bool)) + s.NotContains(s.sink.String(), "привет") + + s.Equal("request handled", handled["msg"]) + s.Equal("info", handled["level"]) + s.Equal("req-42", handled["request_id"]) + s.Equal("*oas.Message", handled["result"]) + s.NotEmpty(handled["duration"], "длительность обработки обязательна") +} + +func (s *LoggingSuite) TestLogsFailure() { + req := s.request(http.MethodGet, "/api/v1/chats", "") + + wantErr := errors.New("storage unavailable") + + _, err := loggingMiddleware(s.log)(req, func(middleware.Request) (middleware.Response, error) { + return middleware.Response{}, wantErr + }) + + s.Require().ErrorIs(err, wantErr) + + records := s.records() + s.Require().Len(records, 2) + + failed := records[1] + s.Equal("request failed", failed["msg"]) + s.Equal("error", failed["level"]) + s.Equal("storage unavailable", failed["error"]) + s.NotEmpty(failed["duration"]) +} + +func (s *LoggingSuite) TestOmitsPayloadWhenBodyIsEmpty() { + req := s.request(http.MethodGet, "/api/v1/chats", "") + + _, err := loggingMiddleware(s.log)(req, func(middleware.Request) (middleware.Response, error) { + return middleware.Response{Type: &oas.ChatPage{}}, nil + }) + s.Require().NoError(err) + + accepted := s.records()[0] + s.NotContains(accepted, "payload", "у запроса без тела не должно быть payload") +} + +func (s *LoggingSuite) TestPayloadContentIsNeverLogged() { + body := strings.Repeat("s", 4096) + req := s.request(http.MethodPost, "/api/v1/chats/33333333-3333-4333-8333-333333333333/messages", body) + + _, err := loggingMiddleware(s.log)(req, func(middleware.Request) (middleware.Response, error) { + return middleware.Response{Type: &oas.Message{}}, nil + }) + s.Require().NoError(err) + + payload, ok := s.records()[0]["payload"].(map[string]any) + s.Require().True(ok) + + s.InEpsilon(float64(len(body)), payload["size"], 0.0001) + s.False(payload["content_logged"].(bool)) + s.NotContains(s.sink.String(), body) +} + +func TestRequestIDMiddlewareSetsHeaderBeforeSecurity(t *testing.T) { + t.Parallel() + + var seen string + + handler := requestIDMiddleware(http.HandlerFunc(func(_ http.ResponseWriter, r *http.Request) { + seen = requestIDFromContext(r.Context()) + })) + + rec := httptest.NewRecorder() + handler.ServeHTTP(rec, httptest.NewRequestWithContext(t.Context(), http.MethodGet, "/health/live", nil)) + + require.NotEmpty(t, seen, "идентификатор должен попадать в контекст") + require.Equal(t, seen, rec.Header().Get("X-Request-ID")) +} + +func TestRequestIDMiddlewarePreservesIncomingID(t *testing.T) { + t.Parallel() + + handler := requestIDMiddleware(http.HandlerFunc(func(http.ResponseWriter, *http.Request) {})) + + req := httptest.NewRequestWithContext(t.Context(), http.MethodGet, "/health/live", nil) + req.Header.Set("X-Request-ID", "from-client") + + rec := httptest.NewRecorder() + handler.ServeHTTP(rec, req) + + require.Equal(t, "from-client", rec.Header().Get("X-Request-ID")) +} diff --git a/internal/transport/rest/oas/oas_cfg_gen.go b/internal/transport/rest/oas/oas_cfg_gen.go new file mode 100644 index 00000000..11231d2f --- /dev/null +++ b/internal/transport/rest/oas/oas_cfg_gen.go @@ -0,0 +1,173 @@ +// Code generated by ogen, DO NOT EDIT. + +package oas + +import ( + "net/http" + "strings" + + "github.com/ogen-go/ogen/middleware" + "github.com/ogen-go/ogen/ogenerrors" + "github.com/ogen-go/ogen/ogenregex" +) + +var regexMap = map[string]ogenregex.Regexp{ + "^[a-z0-9_]{3,32}$": ogenregex.MustCompile("^[a-z0-9_]{3,32}$"), +} + +type ( + optionFunc[C any] func(*C) +) + +// ErrorHandler is error handler. +type ErrorHandler = ogenerrors.ErrorHandler + +type serverConfig struct { + NotFound http.HandlerFunc + MethodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string) + ErrorHandler ErrorHandler + Prefix string + Middleware Middleware + MaxMultipartMemory int64 +} + +// ServerOption is server config option. +type ServerOption interface { + applyServer(*serverConfig) +} + +var _ ServerOption = (optionFunc[serverConfig])(nil) + +func (o optionFunc[C]) applyServer(c *C) { + o(c) +} + +func newServerConfig(opts ...ServerOption) serverConfig { + cfg := serverConfig{ + NotFound: http.NotFound, + MethodNotAllowed: nil, + ErrorHandler: ogenerrors.DefaultErrorHandler, + Middleware: nil, + MaxMultipartMemory: 32 << 20, // 32 MB + } + for _, opt := range opts { + opt.applyServer(&cfg) + } + return cfg +} + +type baseServer struct { + cfg serverConfig +} + +func (s baseServer) notFound(w http.ResponseWriter, r *http.Request) { + s.cfg.NotFound(w, r) +} + +type notAllowedParams struct { + allowedMethods string + allowedHeaders map[string]string + acceptPost string + acceptPatch string +} + +func (s baseServer) notAllowed(w http.ResponseWriter, r *http.Request, params notAllowedParams) { + h := w.Header() + isOptions := r.Method == "OPTIONS" + if isOptions { + h.Set("Access-Control-Allow-Methods", params.allowedMethods) + if params.allowedHeaders != nil { + m := r.Header.Get("Access-Control-Request-Method") + if m != "" { + allowedHeaders, ok := params.allowedHeaders[strings.ToUpper(m)] + if ok { + h.Set("Access-Control-Allow-Headers", allowedHeaders) + } + } + } + if params.acceptPost != "" { + h.Set("Accept-Post", params.acceptPost) + } + if params.acceptPatch != "" { + h.Set("Accept-Patch", params.acceptPatch) + } + } + if s.cfg.MethodNotAllowed != nil { + s.cfg.MethodNotAllowed(w, r, params.allowedMethods) + return + } + status := http.StatusNoContent + if !isOptions { + h.Set("Allow", params.allowedMethods) + status = http.StatusMethodNotAllowed + } + w.WriteHeader(status) +} + +func (cfg serverConfig) baseServer() (s baseServer, err error) { + s = baseServer{cfg: cfg} + return s, nil +} + +// Option is config option. +type Option interface { + ServerOption +} + +// WithNotFound specifies Not Found handler to use. +func WithNotFound(notFound http.HandlerFunc) ServerOption { + return optionFunc[serverConfig](func(cfg *serverConfig) { + if notFound != nil { + cfg.NotFound = notFound + } + }) +} + +// WithMethodNotAllowed specifies Method Not Allowed handler to use. +func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption { + return optionFunc[serverConfig](func(cfg *serverConfig) { + if methodNotAllowed != nil { + cfg.MethodNotAllowed = methodNotAllowed + } + }) +} + +// WithErrorHandler specifies error handler to use. +func WithErrorHandler(h ErrorHandler) ServerOption { + return optionFunc[serverConfig](func(cfg *serverConfig) { + if h != nil { + cfg.ErrorHandler = h + } + }) +} + +// WithPathPrefix specifies server path prefix. +func WithPathPrefix(prefix string) ServerOption { + return optionFunc[serverConfig](func(cfg *serverConfig) { + cfg.Prefix = prefix + }) +} + +// WithMiddleware specifies middlewares to use. +func WithMiddleware(m ...Middleware) ServerOption { + return optionFunc[serverConfig](func(cfg *serverConfig) { + switch len(m) { + case 0: + cfg.Middleware = nil + case 1: + cfg.Middleware = m[0] + default: + cfg.Middleware = middleware.ChainMiddlewares(m...) + } + }) +} + +// WithMaxMultipartMemory specifies limit of memory for storing file parts. +// File parts which can't be stored in memory will be stored on disk in temporary files. +func WithMaxMultipartMemory(max int64) ServerOption { + return optionFunc[serverConfig](func(cfg *serverConfig) { + if max > 0 { + cfg.MaxMultipartMemory = max + } + }) +} diff --git a/internal/transport/rest/oas/oas_handlers_gen.go b/internal/transport/rest/oas/oas_handlers_gen.go new file mode 100644 index 00000000..41753030 --- /dev/null +++ b/internal/transport/rest/oas/oas_handlers_gen.go @@ -0,0 +1,1023 @@ +// Code generated by ogen, DO NOT EDIT. + +package oas + +import ( + "context" + "net/http" + + "github.com/go-faster/errors" + ht "github.com/ogen-go/ogen/http" + "github.com/ogen-go/ogen/middleware" + "github.com/ogen-go/ogen/ogenerrors" +) + +type codeRecorder struct { + http.ResponseWriter + status int +} + +func (c *codeRecorder) WriteHeader(status int) { + c.status = status + c.ResponseWriter.WriteHeader(status) +} + +func (c *codeRecorder) Unwrap() http.ResponseWriter { + return c.ResponseWriter +} + +func recordError(string, error) {} + +// handleCreateChatRequest handles createChat operation. +// +// Создать чат; вызывающий должен входить в member_ids. +// +// POST /api/v1/chats +func (s *Server) handleCreateChatRequest(args [0]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { + statusWriter := &codeRecorder{ResponseWriter: w} + w = statusWriter + ctx := r.Context() + + var ( + err error + opErrContext = ogenerrors.OperationContext{ + Name: CreateChatOperation, + ID: "createChat", + } + ) + { + type bitset = [1]uint8 + var satisfied bitset + { + sctx, ok, err := s.securityDevUser(ctx, CreateChatOperation, r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "DevUser", + Err: err, + } + defer recordError("Security:DevUser", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 0 + ctx = sctx + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, + } + defer recordError("Security", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + } + + var rawBody []byte + request, rawBody, close, err := s.decodeCreateChatRequest(r) + if err != nil { + err = &ogenerrors.DecodeRequestError{ + OperationContext: opErrContext, + Err: err, + } + defer recordError("DecodeRequest", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + defer func() { + if err := close(); err != nil { + recordError("CloseRequest", err) + } + }() + + var response CreateChatRes + if m := s.cfg.Middleware; m != nil { + mreq := middleware.Request{ + Context: ctx, + OperationName: CreateChatOperation, + OperationSummary: "Создать чат; вызывающий должен входить в member_ids", + OperationID: "createChat", + Body: request, + RawBody: rawBody, + Params: middleware.Parameters{}, + Raw: r, + } + + type ( + Request = *CreateChat + Params = struct{} + Response = CreateChatRes + ) + response, err = middleware.HookMiddleware[ + Request, + Params, + Response, + ]( + m, + mreq, + nil, + func(ctx context.Context, request Request, params Params) (response Response, err error) { + response, err = s.h.CreateChat(ctx, request) + return response, err + }, + ) + } else { + response, err = s.h.CreateChat(ctx, request) + } + if err != nil { + defer recordError("Internal", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + if err := encodeCreateChatResponse(response, w); err != nil { + defer recordError("EncodeResponse", err) + if !errors.Is(err, ht.ErrInternalServerErrorResponse) { + s.cfg.ErrorHandler(ctx, w, r, err) + } + return + } +} + +// handleCreateMessageRequest handles createMessage operation. +// +// Отправить сообщение. +// +// POST /api/v1/chats/{chat_id}/messages +func (s *Server) handleCreateMessageRequest(args [1]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { + statusWriter := &codeRecorder{ResponseWriter: w} + w = statusWriter + ctx := r.Context() + + var ( + err error + opErrContext = ogenerrors.OperationContext{ + Name: CreateMessageOperation, + ID: "createMessage", + } + ) + { + type bitset = [1]uint8 + var satisfied bitset + { + sctx, ok, err := s.securityDevUser(ctx, CreateMessageOperation, r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "DevUser", + Err: err, + } + defer recordError("Security:DevUser", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 0 + ctx = sctx + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, + } + defer recordError("Security", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + } + params, err := decodeCreateMessageParams(args, argsEscaped, r) + if err != nil { + err = &ogenerrors.DecodeParamsError{ + OperationContext: opErrContext, + Err: err, + } + defer recordError("DecodeParams", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + var rawBody []byte + request, rawBody, close, err := s.decodeCreateMessageRequest(r) + if err != nil { + err = &ogenerrors.DecodeRequestError{ + OperationContext: opErrContext, + Err: err, + } + defer recordError("DecodeRequest", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + defer func() { + if err := close(); err != nil { + recordError("CloseRequest", err) + } + }() + + var response CreateMessageRes + if m := s.cfg.Middleware; m != nil { + mreq := middleware.Request{ + Context: ctx, + OperationName: CreateMessageOperation, + OperationSummary: "Отправить сообщение", + OperationID: "createMessage", + Body: request, + RawBody: rawBody, + Params: middleware.Parameters{ + { + Name: "chat_id", + In: "path", + }: params.ChatID, + }, + Raw: r, + } + + type ( + Request = *CreateMessage + Params = CreateMessageParams + Response = CreateMessageRes + ) + response, err = middleware.HookMiddleware[ + Request, + Params, + Response, + ]( + m, + mreq, + unpackCreateMessageParams, + func(ctx context.Context, request Request, params Params) (response Response, err error) { + response, err = s.h.CreateMessage(ctx, request, params) + return response, err + }, + ) + } else { + response, err = s.h.CreateMessage(ctx, request, params) + } + if err != nil { + defer recordError("Internal", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + if err := encodeCreateMessageResponse(response, w); err != nil { + defer recordError("EncodeResponse", err) + if !errors.Is(err, ht.ErrInternalServerErrorResponse) { + s.cfg.ErrorHandler(ctx, w, r, err) + } + return + } +} + +// handleCurrentUserRequest handles currentUser operation. +// +// Текущий пользователь. +// +// GET /api/v1/users/me +func (s *Server) handleCurrentUserRequest(args [0]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { + statusWriter := &codeRecorder{ResponseWriter: w} + w = statusWriter + ctx := r.Context() + + var ( + err error + opErrContext = ogenerrors.OperationContext{ + Name: CurrentUserOperation, + ID: "currentUser", + } + ) + { + type bitset = [1]uint8 + var satisfied bitset + { + sctx, ok, err := s.securityDevUser(ctx, CurrentUserOperation, r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "DevUser", + Err: err, + } + defer recordError("Security:DevUser", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 0 + ctx = sctx + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, + } + defer recordError("Security", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + } + + var rawBody []byte + + var response CurrentUserRes + if m := s.cfg.Middleware; m != nil { + mreq := middleware.Request{ + Context: ctx, + OperationName: CurrentUserOperation, + OperationSummary: "Текущий пользователь", + OperationID: "currentUser", + Body: nil, + RawBody: rawBody, + Params: middleware.Parameters{}, + Raw: r, + } + + type ( + Request = struct{} + Params = struct{} + Response = CurrentUserRes + ) + response, err = middleware.HookMiddleware[ + Request, + Params, + Response, + ]( + m, + mreq, + nil, + func(ctx context.Context, request Request, params Params) (response Response, err error) { + response, err = s.h.CurrentUser(ctx) + return response, err + }, + ) + } else { + response, err = s.h.CurrentUser(ctx) + } + if err != nil { + defer recordError("Internal", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + if err := encodeCurrentUserResponse(response, w); err != nil { + defer recordError("EncodeResponse", err) + if !errors.Is(err, ht.ErrInternalServerErrorResponse) { + s.cfg.ErrorHandler(ctx, w, r, err) + } + return + } +} + +// handleGetChatRequest handles getChat operation. +// +// Получить доступный чат. +// +// GET /api/v1/chats/{chat_id} +func (s *Server) handleGetChatRequest(args [1]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { + statusWriter := &codeRecorder{ResponseWriter: w} + w = statusWriter + ctx := r.Context() + + var ( + err error + opErrContext = ogenerrors.OperationContext{ + Name: GetChatOperation, + ID: "getChat", + } + ) + { + type bitset = [1]uint8 + var satisfied bitset + { + sctx, ok, err := s.securityDevUser(ctx, GetChatOperation, r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "DevUser", + Err: err, + } + defer recordError("Security:DevUser", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 0 + ctx = sctx + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, + } + defer recordError("Security", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + } + params, err := decodeGetChatParams(args, argsEscaped, r) + if err != nil { + err = &ogenerrors.DecodeParamsError{ + OperationContext: opErrContext, + Err: err, + } + defer recordError("DecodeParams", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + var rawBody []byte + + var response GetChatRes + if m := s.cfg.Middleware; m != nil { + mreq := middleware.Request{ + Context: ctx, + OperationName: GetChatOperation, + OperationSummary: "Получить доступный чат", + OperationID: "getChat", + Body: nil, + RawBody: rawBody, + Params: middleware.Parameters{ + { + Name: "chat_id", + In: "path", + }: params.ChatID, + }, + Raw: r, + } + + type ( + Request = struct{} + Params = GetChatParams + Response = GetChatRes + ) + response, err = middleware.HookMiddleware[ + Request, + Params, + Response, + ]( + m, + mreq, + unpackGetChatParams, + func(ctx context.Context, request Request, params Params) (response Response, err error) { + response, err = s.h.GetChat(ctx, params) + return response, err + }, + ) + } else { + response, err = s.h.GetChat(ctx, params) + } + if err != nil { + defer recordError("Internal", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + if err := encodeGetChatResponse(response, w); err != nil { + defer recordError("EncodeResponse", err) + if !errors.Is(err, ht.ErrInternalServerErrorResponse) { + s.cfg.ErrorHandler(ctx, w, r, err) + } + return + } +} + +// handleListChatsRequest handles listChats operation. +// +// Чаты текущего пользователя. +// +// GET /api/v1/chats +func (s *Server) handleListChatsRequest(args [0]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { + statusWriter := &codeRecorder{ResponseWriter: w} + w = statusWriter + ctx := r.Context() + + var ( + err error + opErrContext = ogenerrors.OperationContext{ + Name: ListChatsOperation, + ID: "listChats", + } + ) + { + type bitset = [1]uint8 + var satisfied bitset + { + sctx, ok, err := s.securityDevUser(ctx, ListChatsOperation, r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "DevUser", + Err: err, + } + defer recordError("Security:DevUser", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 0 + ctx = sctx + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, + } + defer recordError("Security", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + } + params, err := decodeListChatsParams(args, argsEscaped, r) + if err != nil { + err = &ogenerrors.DecodeParamsError{ + OperationContext: opErrContext, + Err: err, + } + defer recordError("DecodeParams", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + var rawBody []byte + + var response ListChatsRes + if m := s.cfg.Middleware; m != nil { + mreq := middleware.Request{ + Context: ctx, + OperationName: ListChatsOperation, + OperationSummary: "Чаты текущего пользователя", + OperationID: "listChats", + Body: nil, + RawBody: rawBody, + Params: middleware.Parameters{ + { + Name: "limit", + In: "query", + }: params.Limit, + { + Name: "cursor", + In: "query", + }: params.Cursor, + }, + Raw: r, + } + + type ( + Request = struct{} + Params = ListChatsParams + Response = ListChatsRes + ) + response, err = middleware.HookMiddleware[ + Request, + Params, + Response, + ]( + m, + mreq, + unpackListChatsParams, + func(ctx context.Context, request Request, params Params) (response Response, err error) { + response, err = s.h.ListChats(ctx, params) + return response, err + }, + ) + } else { + response, err = s.h.ListChats(ctx, params) + } + if err != nil { + defer recordError("Internal", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + if err := encodeListChatsResponse(response, w); err != nil { + defer recordError("EncodeResponse", err) + if !errors.Is(err, ht.ErrInternalServerErrorResponse) { + s.cfg.ErrorHandler(ctx, w, r, err) + } + return + } +} + +// handleListMessagesRequest handles listMessages operation. +// +// Сообщения по (created_at, id) по возрастанию. +// +// GET /api/v1/chats/{chat_id}/messages +func (s *Server) handleListMessagesRequest(args [1]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { + statusWriter := &codeRecorder{ResponseWriter: w} + w = statusWriter + ctx := r.Context() + + var ( + err error + opErrContext = ogenerrors.OperationContext{ + Name: ListMessagesOperation, + ID: "listMessages", + } + ) + { + type bitset = [1]uint8 + var satisfied bitset + { + sctx, ok, err := s.securityDevUser(ctx, ListMessagesOperation, r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "DevUser", + Err: err, + } + defer recordError("Security:DevUser", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 0 + ctx = sctx + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, + } + defer recordError("Security", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + } + params, err := decodeListMessagesParams(args, argsEscaped, r) + if err != nil { + err = &ogenerrors.DecodeParamsError{ + OperationContext: opErrContext, + Err: err, + } + defer recordError("DecodeParams", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + var rawBody []byte + + var response ListMessagesRes + if m := s.cfg.Middleware; m != nil { + mreq := middleware.Request{ + Context: ctx, + OperationName: ListMessagesOperation, + OperationSummary: "Сообщения по (created_at, id) по возрастанию", + OperationID: "listMessages", + Body: nil, + RawBody: rawBody, + Params: middleware.Parameters{ + { + Name: "chat_id", + In: "path", + }: params.ChatID, + { + Name: "limit", + In: "query", + }: params.Limit, + { + Name: "cursor", + In: "query", + }: params.Cursor, + }, + Raw: r, + } + + type ( + Request = struct{} + Params = ListMessagesParams + Response = ListMessagesRes + ) + response, err = middleware.HookMiddleware[ + Request, + Params, + Response, + ]( + m, + mreq, + unpackListMessagesParams, + func(ctx context.Context, request Request, params Params) (response Response, err error) { + response, err = s.h.ListMessages(ctx, params) + return response, err + }, + ) + } else { + response, err = s.h.ListMessages(ctx, params) + } + if err != nil { + defer recordError("Internal", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + if err := encodeListMessagesResponse(response, w); err != nil { + defer recordError("EncodeResponse", err) + if !errors.Is(err, ht.ErrInternalServerErrorResponse) { + s.cfg.ErrorHandler(ctx, w, r, err) + } + return + } +} + +// handleLivenessRequest handles liveness operation. +// +// Процесс жив. +// +// GET /health/live +func (s *Server) handleLivenessRequest(args [0]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { + statusWriter := &codeRecorder{ResponseWriter: w} + w = statusWriter + ctx := r.Context() + + var ( + err error + ) + + var rawBody []byte + + var response LivenessRes + if m := s.cfg.Middleware; m != nil { + mreq := middleware.Request{ + Context: ctx, + OperationName: LivenessOperation, + OperationSummary: "Процесс жив", + OperationID: "liveness", + Body: nil, + RawBody: rawBody, + Params: middleware.Parameters{}, + Raw: r, + } + + type ( + Request = struct{} + Params = struct{} + Response = LivenessRes + ) + response, err = middleware.HookMiddleware[ + Request, + Params, + Response, + ]( + m, + mreq, + nil, + func(ctx context.Context, request Request, params Params) (response Response, err error) { + response, err = s.h.Liveness(ctx) + return response, err + }, + ) + } else { + response, err = s.h.Liveness(ctx) + } + if err != nil { + defer recordError("Internal", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + if err := encodeLivenessResponse(response, w); err != nil { + defer recordError("EncodeResponse", err) + if !errors.Is(err, ht.ErrInternalServerErrorResponse) { + s.cfg.ErrorHandler(ctx, w, r, err) + } + return + } +} + +// handleReadinessRequest handles readiness operation. +// +// Готов принимать трафик. +// +// GET /health/ready +func (s *Server) handleReadinessRequest(args [0]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { + statusWriter := &codeRecorder{ResponseWriter: w} + w = statusWriter + ctx := r.Context() + + var ( + err error + ) + + var rawBody []byte + + var response ReadinessRes + if m := s.cfg.Middleware; m != nil { + mreq := middleware.Request{ + Context: ctx, + OperationName: ReadinessOperation, + OperationSummary: "Готов принимать трафик", + OperationID: "readiness", + Body: nil, + RawBody: rawBody, + Params: middleware.Parameters{}, + Raw: r, + } + + type ( + Request = struct{} + Params = struct{} + Response = ReadinessRes + ) + response, err = middleware.HookMiddleware[ + Request, + Params, + Response, + ]( + m, + mreq, + nil, + func(ctx context.Context, request Request, params Params) (response Response, err error) { + response, err = s.h.Readiness(ctx) + return response, err + }, + ) + } else { + response, err = s.h.Readiness(ctx) + } + if err != nil { + defer recordError("Internal", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + if err := encodeReadinessResponse(response, w); err != nil { + defer recordError("EncodeResponse", err) + if !errors.Is(err, ht.ErrInternalServerErrorResponse) { + s.cfg.ErrorHandler(ctx, w, r, err) + } + return + } +} + +// handleRegisterUserRequest handles registerUser operation. +// +// Создать пользователя. +// +// POST /api/v1/users +func (s *Server) handleRegisterUserRequest(args [0]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { + statusWriter := &codeRecorder{ResponseWriter: w} + w = statusWriter + ctx := r.Context() + + var ( + err error + opErrContext = ogenerrors.OperationContext{ + Name: RegisterUserOperation, + ID: "registerUser", + } + ) + + var rawBody []byte + request, rawBody, close, err := s.decodeRegisterUserRequest(r) + if err != nil { + err = &ogenerrors.DecodeRequestError{ + OperationContext: opErrContext, + Err: err, + } + defer recordError("DecodeRequest", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + defer func() { + if err := close(); err != nil { + recordError("CloseRequest", err) + } + }() + + var response RegisterUserRes + if m := s.cfg.Middleware; m != nil { + mreq := middleware.Request{ + Context: ctx, + OperationName: RegisterUserOperation, + OperationSummary: "Создать пользователя", + OperationID: "registerUser", + Body: request, + RawBody: rawBody, + Params: middleware.Parameters{}, + Raw: r, + } + + type ( + Request = *CreateUser + Params = struct{} + Response = RegisterUserRes + ) + response, err = middleware.HookMiddleware[ + Request, + Params, + Response, + ]( + m, + mreq, + nil, + func(ctx context.Context, request Request, params Params) (response Response, err error) { + response, err = s.h.RegisterUser(ctx, request) + return response, err + }, + ) + } else { + response, err = s.h.RegisterUser(ctx, request) + } + if err != nil { + defer recordError("Internal", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + if err := encodeRegisterUserResponse(response, w); err != nil { + defer recordError("EncodeResponse", err) + if !errors.Is(err, ht.ErrInternalServerErrorResponse) { + s.cfg.ErrorHandler(ctx, w, r, err) + } + return + } +} diff --git a/internal/transport/rest/oas/oas_interfaces_gen.go b/internal/transport/rest/oas/oas_interfaces_gen.go new file mode 100644 index 00000000..8a03eb62 --- /dev/null +++ b/internal/transport/rest/oas/oas_interfaces_gen.go @@ -0,0 +1,38 @@ +// Code generated by ogen, DO NOT EDIT. +package oas + +type CreateChatRes interface { + createChatRes() +} + +type CreateMessageRes interface { + createMessageRes() +} + +type CurrentUserRes interface { + currentUserRes() +} + +type GetChatRes interface { + getChatRes() +} + +type ListChatsRes interface { + listChatsRes() +} + +type ListMessagesRes interface { + listMessagesRes() +} + +type LivenessRes interface { + livenessRes() +} + +type ReadinessRes interface { + readinessRes() +} + +type RegisterUserRes interface { + registerUserRes() +} diff --git a/internal/transport/rest/oas/oas_json_gen.go b/internal/transport/rest/oas/oas_json_gen.go new file mode 100644 index 00000000..e4e5c546 --- /dev/null +++ b/internal/transport/rest/oas/oas_json_gen.go @@ -0,0 +1,1514 @@ +// Code generated by ogen, DO NOT EDIT. + +package oas + +import ( + "math/bits" + "strconv" + + "github.com/go-faster/errors" + "github.com/go-faster/jx" + "github.com/google/uuid" + "github.com/ogen-go/ogen/json" + "github.com/ogen-go/ogen/validate" +) + +// Encode implements json.Marshaler. +func (s *Chat) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *Chat) encodeFields(e *jx.Encoder) { + { + e.FieldStart("id") + json.EncodeUUID(e, s.ID) + } + { + e.FieldStart("title") + e.Str(s.Title) + } + { + e.FieldStart("member_ids") + e.ArrStart() + for _, elem := range s.MemberIds { + json.EncodeUUID(e, elem) + } + e.ArrEnd() + } + { + e.FieldStart("created_at") + json.EncodeDateTime(e, s.CreatedAt) + } +} + +var jsonFieldsNameOfChat = [4]string{ + 0: "id", + 1: "title", + 2: "member_ids", + 3: "created_at", +} + +// Decode decodes Chat from json. +func (s *Chat) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode Chat to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "id": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := json.DecodeUUID(d) + s.ID = v + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "title": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.Title = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"title\"") + } + case "member_ids": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + s.MemberIds = make([]uuid.UUID, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem uuid.UUID + v, err := json.DecodeUUID(d) + elem = v + if err != nil { + return err + } + s.MemberIds = append(s.MemberIds, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"member_ids\"") + } + case "created_at": + requiredBitSet[0] |= 1 << 3 + if err := func() error { + v, err := json.DecodeDateTime(d) + s.CreatedAt = v + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"created_at\"") + } + default: + return errors.Errorf("unexpected field %q", k) + } + return nil + }); err != nil { + return errors.Wrap(err, "decode Chat") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00001111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfChat) { + name = jsonFieldsNameOfChat[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *Chat) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *Chat) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ChatPage) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ChatPage) encodeFields(e *jx.Encoder) { + { + e.FieldStart("items") + e.ArrStart() + for _, elem := range s.Items { + elem.Encode(e) + } + e.ArrEnd() + } + { + e.FieldStart("next_cursor") + s.NextCursor.Encode(e) + } +} + +var jsonFieldsNameOfChatPage = [2]string{ + 0: "items", + 1: "next_cursor", +} + +// Decode decodes ChatPage from json. +func (s *ChatPage) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ChatPage to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "items": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + s.Items = make([]Chat, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem Chat + if err := elem.Decode(d); err != nil { + return err + } + s.Items = append(s.Items, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"items\"") + } + case "next_cursor": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + if err := s.NextCursor.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"next_cursor\"") + } + default: + return errors.Errorf("unexpected field %q", k) + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ChatPage") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfChatPage) { + name = jsonFieldsNameOfChatPage[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ChatPage) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ChatPage) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *CreateChat) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *CreateChat) encodeFields(e *jx.Encoder) { + { + e.FieldStart("title") + e.Str(s.Title) + } + { + e.FieldStart("member_ids") + e.ArrStart() + for _, elem := range s.MemberIds { + json.EncodeUUID(e, elem) + } + e.ArrEnd() + } +} + +var jsonFieldsNameOfCreateChat = [2]string{ + 0: "title", + 1: "member_ids", +} + +// Decode decodes CreateChat from json. +func (s *CreateChat) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode CreateChat to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "title": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.Title = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"title\"") + } + case "member_ids": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + s.MemberIds = make([]uuid.UUID, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem uuid.UUID + v, err := json.DecodeUUID(d) + elem = v + if err != nil { + return err + } + s.MemberIds = append(s.MemberIds, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"member_ids\"") + } + default: + return errors.Errorf("unexpected field %q", k) + } + return nil + }); err != nil { + return errors.Wrap(err, "decode CreateChat") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfCreateChat) { + name = jsonFieldsNameOfCreateChat[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *CreateChat) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *CreateChat) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *CreateMessage) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *CreateMessage) encodeFields(e *jx.Encoder) { + { + e.FieldStart("text") + e.Str(s.Text) + } +} + +var jsonFieldsNameOfCreateMessage = [1]string{ + 0: "text", +} + +// Decode decodes CreateMessage from json. +func (s *CreateMessage) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode CreateMessage to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "text": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.Text = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"text\"") + } + default: + return errors.Errorf("unexpected field %q", k) + } + return nil + }); err != nil { + return errors.Wrap(err, "decode CreateMessage") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000001, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfCreateMessage) { + name = jsonFieldsNameOfCreateMessage[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *CreateMessage) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *CreateMessage) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *CreateUser) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *CreateUser) encodeFields(e *jx.Encoder) { + { + e.FieldStart("username") + e.Str(s.Username) + } + { + e.FieldStart("display_name") + e.Str(s.DisplayName) + } +} + +var jsonFieldsNameOfCreateUser = [2]string{ + 0: "username", + 1: "display_name", +} + +// Decode decodes CreateUser from json. +func (s *CreateUser) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode CreateUser to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "username": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.Username = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"username\"") + } + case "display_name": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.DisplayName = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"display_name\"") + } + default: + return errors.Errorf("unexpected field %q", k) + } + return nil + }); err != nil { + return errors.Wrap(err, "decode CreateUser") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfCreateUser) { + name = jsonFieldsNameOfCreateUser[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *CreateUser) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *CreateUser) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *Error) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *Error) encodeFields(e *jx.Encoder) { + { + e.FieldStart("error") + s.Error.Encode(e) + } +} + +var jsonFieldsNameOfError = [1]string{ + 0: "error", +} + +// Decode decodes Error from json. +func (s *Error) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode Error to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "error": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Error.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"error\"") + } + default: + return errors.Errorf("unexpected field %q", k) + } + return nil + }); err != nil { + return errors.Wrap(err, "decode Error") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000001, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfError) { + name = jsonFieldsNameOfError[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *Error) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *Error) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *ErrorError) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *ErrorError) encodeFields(e *jx.Encoder) { + { + e.FieldStart("code") + s.Code.Encode(e) + } + { + e.FieldStart("message") + e.Str(s.Message) + } + { + e.FieldStart("request_id") + e.Str(s.RequestID) + } +} + +var jsonFieldsNameOfErrorError = [3]string{ + 0: "code", + 1: "message", + 2: "request_id", +} + +// Decode decodes ErrorError from json. +func (s *ErrorError) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ErrorError to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "code": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Code.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"code\"") + } + case "message": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.Message = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"message\"") + } + case "request_id": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + v, err := d.Str() + s.RequestID = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"request_id\"") + } + default: + return errors.Errorf("unexpected field %q", k) + } + return nil + }); err != nil { + return errors.Wrap(err, "decode ErrorError") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfErrorError) { + name = jsonFieldsNameOfErrorError[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *ErrorError) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ErrorError) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes ErrorErrorCode as json. +func (s ErrorErrorCode) Encode(e *jx.Encoder) { + e.Str(string(s)) +} + +// Decode decodes ErrorErrorCode from json. +func (s *ErrorErrorCode) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode ErrorErrorCode to nil") + } + v, err := d.StrBytes() + if err != nil { + return err + } + // Try to use constant string. + switch ErrorErrorCode(v) { + case ErrorErrorCodeInvalidRequest: + *s = ErrorErrorCodeInvalidRequest + case ErrorErrorCodeUnauthorized: + *s = ErrorErrorCodeUnauthorized + case ErrorErrorCodeNotFound: + *s = ErrorErrorCodeNotFound + case ErrorErrorCodeConflict: + *s = ErrorErrorCodeConflict + case ErrorErrorCodePayloadTooLarge: + *s = ErrorErrorCodePayloadTooLarge + case ErrorErrorCodeUnsupportedMediaType: + *s = ErrorErrorCodeUnsupportedMediaType + case ErrorErrorCodeRateLimited: + *s = ErrorErrorCodeRateLimited + case ErrorErrorCodeUnavailable: + *s = ErrorErrorCodeUnavailable + case ErrorErrorCodeInternalError: + *s = ErrorErrorCodeInternalError + default: + *s = ErrorErrorCode(v) + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s ErrorErrorCode) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *ErrorErrorCode) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *Health) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *Health) encodeFields(e *jx.Encoder) { + { + e.FieldStart("status") + s.Status.Encode(e) + } +} + +var jsonFieldsNameOfHealth = [1]string{ + 0: "status", +} + +// Decode decodes Health from json. +func (s *Health) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode Health to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "status": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + if err := s.Status.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"status\"") + } + default: + return errors.Errorf("unexpected field %q", k) + } + return nil + }); err != nil { + return errors.Wrap(err, "decode Health") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000001, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfHealth) { + name = jsonFieldsNameOfHealth[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *Health) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *Health) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes HealthStatus as json. +func (s HealthStatus) Encode(e *jx.Encoder) { + e.Str(string(s)) +} + +// Decode decodes HealthStatus from json. +func (s *HealthStatus) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode HealthStatus to nil") + } + v, err := d.StrBytes() + if err != nil { + return err + } + // Try to use constant string. + switch HealthStatus(v) { + case HealthStatusOk: + *s = HealthStatusOk + default: + *s = HealthStatus(v) + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s HealthStatus) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *HealthStatus) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *Message) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *Message) encodeFields(e *jx.Encoder) { + { + e.FieldStart("id") + json.EncodeUUID(e, s.ID) + } + { + e.FieldStart("chat_id") + json.EncodeUUID(e, s.ChatID) + } + { + e.FieldStart("sender_id") + json.EncodeUUID(e, s.SenderID) + } + { + e.FieldStart("text") + e.Str(s.Text) + } + { + e.FieldStart("created_at") + json.EncodeDateTime(e, s.CreatedAt) + } +} + +var jsonFieldsNameOfMessage = [5]string{ + 0: "id", + 1: "chat_id", + 2: "sender_id", + 3: "text", + 4: "created_at", +} + +// Decode decodes Message from json. +func (s *Message) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode Message to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "id": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := json.DecodeUUID(d) + s.ID = v + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "chat_id": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := json.DecodeUUID(d) + s.ChatID = v + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"chat_id\"") + } + case "sender_id": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + v, err := json.DecodeUUID(d) + s.SenderID = v + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"sender_id\"") + } + case "text": + requiredBitSet[0] |= 1 << 3 + if err := func() error { + v, err := d.Str() + s.Text = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"text\"") + } + case "created_at": + requiredBitSet[0] |= 1 << 4 + if err := func() error { + v, err := json.DecodeDateTime(d) + s.CreatedAt = v + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"created_at\"") + } + default: + return errors.Errorf("unexpected field %q", k) + } + return nil + }); err != nil { + return errors.Wrap(err, "decode Message") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00011111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfMessage) { + name = jsonFieldsNameOfMessage[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *Message) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *Message) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *MessagePage) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *MessagePage) encodeFields(e *jx.Encoder) { + { + e.FieldStart("items") + e.ArrStart() + for _, elem := range s.Items { + elem.Encode(e) + } + e.ArrEnd() + } + { + e.FieldStart("next_cursor") + s.NextCursor.Encode(e) + } +} + +var jsonFieldsNameOfMessagePage = [2]string{ + 0: "items", + 1: "next_cursor", +} + +// Decode decodes MessagePage from json. +func (s *MessagePage) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode MessagePage to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "items": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + s.Items = make([]Message, 0) + if err := d.Arr(func(d *jx.Decoder) error { + var elem Message + if err := elem.Decode(d); err != nil { + return err + } + s.Items = append(s.Items, elem) + return nil + }); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"items\"") + } + case "next_cursor": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + if err := s.NextCursor.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"next_cursor\"") + } + default: + return errors.Errorf("unexpected field %q", k) + } + return nil + }); err != nil { + return errors.Wrap(err, "decode MessagePage") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00000011, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfMessagePage) { + name = jsonFieldsNameOfMessagePage[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *MessagePage) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *MessagePage) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode encodes string as json. +func (o NilString) Encode(e *jx.Encoder) { + if o.Null { + e.Null() + return + } + e.Str(string(o.Value)) +} + +// Decode decodes string from json. +func (o *NilString) Decode(d *jx.Decoder) error { + if o == nil { + return errors.New("invalid: unable to decode NilString to nil") + } + if d.Next() == jx.Null { + if err := d.Null(); err != nil { + return err + } + + var v string + o.Value = v + o.Null = true + return nil + } + o.Null = false + v, err := d.Str() + if err != nil { + return err + } + o.Value = string(v) + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s NilString) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *NilString) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + +// Encode implements json.Marshaler. +func (s *User) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *User) encodeFields(e *jx.Encoder) { + { + e.FieldStart("id") + json.EncodeUUID(e, s.ID) + } + { + e.FieldStart("username") + e.Str(s.Username) + } + { + e.FieldStart("display_name") + e.Str(s.DisplayName) + } + { + e.FieldStart("created_at") + json.EncodeDateTime(e, s.CreatedAt) + } +} + +var jsonFieldsNameOfUser = [4]string{ + 0: "id", + 1: "username", + 2: "display_name", + 3: "created_at", +} + +// Decode decodes User from json. +func (s *User) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode User to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "id": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := json.DecodeUUID(d) + s.ID = v + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"id\"") + } + case "username": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.Username = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"username\"") + } + case "display_name": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + v, err := d.Str() + s.DisplayName = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"display_name\"") + } + case "created_at": + requiredBitSet[0] |= 1 << 3 + if err := func() error { + v, err := json.DecodeDateTime(d) + s.CreatedAt = v + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"created_at\"") + } + default: + return errors.Errorf("unexpected field %q", k) + } + return nil + }); err != nil { + return errors.Wrap(err, "decode User") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00001111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfUser) { + name = jsonFieldsNameOfUser[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *User) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *User) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} diff --git a/internal/transport/rest/oas/oas_middleware_gen.go b/internal/transport/rest/oas/oas_middleware_gen.go new file mode 100644 index 00000000..7ba299f2 --- /dev/null +++ b/internal/transport/rest/oas/oas_middleware_gen.go @@ -0,0 +1,10 @@ +// Code generated by ogen, DO NOT EDIT. + +package oas + +import ( + "github.com/ogen-go/ogen/middleware" +) + +// Middleware is middleware type. +type Middleware = middleware.Middleware diff --git a/internal/transport/rest/oas/oas_operations_gen.go b/internal/transport/rest/oas/oas_operations_gen.go new file mode 100644 index 00000000..f99a17ac --- /dev/null +++ b/internal/transport/rest/oas/oas_operations_gen.go @@ -0,0 +1,18 @@ +// Code generated by ogen, DO NOT EDIT. + +package oas + +// OperationName is the ogen operation name +type OperationName = string + +const ( + CreateChatOperation OperationName = "CreateChat" + CreateMessageOperation OperationName = "CreateMessage" + CurrentUserOperation OperationName = "CurrentUser" + GetChatOperation OperationName = "GetChat" + ListChatsOperation OperationName = "ListChats" + ListMessagesOperation OperationName = "ListMessages" + LivenessOperation OperationName = "Liveness" + ReadinessOperation OperationName = "Readiness" + RegisterUserOperation OperationName = "RegisterUser" +) diff --git a/internal/transport/rest/oas/oas_parameters_gen.go b/internal/transport/rest/oas/oas_parameters_gen.go new file mode 100644 index 00000000..42e8312d --- /dev/null +++ b/internal/transport/rest/oas/oas_parameters_gen.go @@ -0,0 +1,543 @@ +// Code generated by ogen, DO NOT EDIT. + +package oas + +import ( + "net/http" + "net/url" + + "github.com/go-faster/errors" + "github.com/google/uuid" + "github.com/ogen-go/ogen/conv" + "github.com/ogen-go/ogen/middleware" + "github.com/ogen-go/ogen/ogenerrors" + "github.com/ogen-go/ogen/uri" + "github.com/ogen-go/ogen/validate" +) + +// CreateMessageParams is parameters of createMessage operation. +type CreateMessageParams struct { + ChatID uuid.UUID +} + +func unpackCreateMessageParams(packed middleware.Parameters) (params CreateMessageParams) { + { + key := middleware.ParameterKey{ + Name: "chat_id", + In: "path", + } + params.ChatID = packed[key].(uuid.UUID) + } + return params +} + +func decodeCreateMessageParams(args [1]string, argsEscaped bool, r *http.Request) (params CreateMessageParams, _ error) { + // Decode path: chat_id. + if err := func() error { + param := args[0] + if argsEscaped { + unescaped, err := url.PathUnescape(args[0]) + if err != nil { + return errors.Wrap(err, "unescape path") + } + param = unescaped + } + if len(param) > 0 { + d := uri.NewPathDecoder(uri.PathDecoderConfig{ + Param: "chat_id", + Value: param, + Style: uri.PathStyleSimple, + Explode: false, + }) + + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToUUID(val) + if err != nil { + return err + } + + params.ChatID = c + return nil + }(); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "chat_id", + In: "path", + Err: err, + } + } + return params, nil +} + +// GetChatParams is parameters of getChat operation. +type GetChatParams struct { + ChatID uuid.UUID +} + +func unpackGetChatParams(packed middleware.Parameters) (params GetChatParams) { + { + key := middleware.ParameterKey{ + Name: "chat_id", + In: "path", + } + params.ChatID = packed[key].(uuid.UUID) + } + return params +} + +func decodeGetChatParams(args [1]string, argsEscaped bool, r *http.Request) (params GetChatParams, _ error) { + // Decode path: chat_id. + if err := func() error { + param := args[0] + if argsEscaped { + unescaped, err := url.PathUnescape(args[0]) + if err != nil { + return errors.Wrap(err, "unescape path") + } + param = unescaped + } + if len(param) > 0 { + d := uri.NewPathDecoder(uri.PathDecoderConfig{ + Param: "chat_id", + Value: param, + Style: uri.PathStyleSimple, + Explode: false, + }) + + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToUUID(val) + if err != nil { + return err + } + + params.ChatID = c + return nil + }(); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "chat_id", + In: "path", + Err: err, + } + } + return params, nil +} + +// ListChatsParams is parameters of listChats operation. +type ListChatsParams struct { + Limit OptInt `json:",omitempty,omitzero"` + Cursor OptString `json:",omitempty,omitzero"` +} + +func unpackListChatsParams(packed middleware.Parameters) (params ListChatsParams) { + { + key := middleware.ParameterKey{ + Name: "limit", + In: "query", + } + if v, ok := packed[key]; ok { + params.Limit = v.(OptInt) + } + } + { + key := middleware.ParameterKey{ + Name: "cursor", + In: "query", + } + if v, ok := packed[key]; ok { + params.Cursor = v.(OptString) + } + } + return params +} + +func decodeListChatsParams(args [0]string, argsEscaped bool, r *http.Request) (params ListChatsParams, _ error) { + q := uri.NewQueryDecoder(r.URL.Query()) + // Set default value for query: limit. + { + val := int(50) + params.Limit.SetTo(val) + } + // Decode query: limit. + if err := func() error { + cfg := uri.QueryParameterDecodingConfig{ + Name: "limit", + Style: uri.QueryStyleForm, + Explode: true, + } + + if err := q.HasParam(cfg); err == nil { + if err := q.DecodeParam(cfg, func(d uri.Decoder) error { + var paramsDotLimitVal int + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToInt(val) + if err != nil { + return err + } + + paramsDotLimitVal = c + return nil + }(); err != nil { + return err + } + params.Limit.SetTo(paramsDotLimitVal) + return nil + }); err != nil { + return err + } + if err := func() error { + if value, ok := params.Limit.Get(); ok { + if err := func() error { + if err := (validate.Int{ + MinSet: true, + Min: 1, + MaxSet: true, + Max: 100, + MinExclusive: false, + MaxExclusive: false, + MultipleOfSet: false, + MultipleOf: 0, + Pattern: nil, + }).Validate(int64(value)); err != nil { + return errors.Wrap(err, "int") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "limit", + In: "query", + Err: err, + } + } + // Decode query: cursor. + if err := func() error { + cfg := uri.QueryParameterDecodingConfig{ + Name: "cursor", + Style: uri.QueryStyleForm, + Explode: true, + } + + if err := q.HasParam(cfg); err == nil { + if err := q.DecodeParam(cfg, func(d uri.Decoder) error { + var paramsDotCursorVal string + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + paramsDotCursorVal = c + return nil + }(); err != nil { + return err + } + params.Cursor.SetTo(paramsDotCursorVal) + return nil + }); err != nil { + return err + } + if err := func() error { + if value, ok := params.Cursor.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "cursor", + In: "query", + Err: err, + } + } + return params, nil +} + +// ListMessagesParams is parameters of listMessages operation. +type ListMessagesParams struct { + ChatID uuid.UUID + Limit OptInt `json:",omitempty,omitzero"` + Cursor OptString `json:",omitempty,omitzero"` +} + +func unpackListMessagesParams(packed middleware.Parameters) (params ListMessagesParams) { + { + key := middleware.ParameterKey{ + Name: "chat_id", + In: "path", + } + params.ChatID = packed[key].(uuid.UUID) + } + { + key := middleware.ParameterKey{ + Name: "limit", + In: "query", + } + if v, ok := packed[key]; ok { + params.Limit = v.(OptInt) + } + } + { + key := middleware.ParameterKey{ + Name: "cursor", + In: "query", + } + if v, ok := packed[key]; ok { + params.Cursor = v.(OptString) + } + } + return params +} + +func decodeListMessagesParams(args [1]string, argsEscaped bool, r *http.Request) (params ListMessagesParams, _ error) { + q := uri.NewQueryDecoder(r.URL.Query()) + // Decode path: chat_id. + if err := func() error { + param := args[0] + if argsEscaped { + unescaped, err := url.PathUnescape(args[0]) + if err != nil { + return errors.Wrap(err, "unescape path") + } + param = unescaped + } + if len(param) > 0 { + d := uri.NewPathDecoder(uri.PathDecoderConfig{ + Param: "chat_id", + Value: param, + Style: uri.PathStyleSimple, + Explode: false, + }) + + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToUUID(val) + if err != nil { + return err + } + + params.ChatID = c + return nil + }(); err != nil { + return err + } + } else { + return validate.ErrFieldRequired + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "chat_id", + In: "path", + Err: err, + } + } + // Set default value for query: limit. + { + val := int(50) + params.Limit.SetTo(val) + } + // Decode query: limit. + if err := func() error { + cfg := uri.QueryParameterDecodingConfig{ + Name: "limit", + Style: uri.QueryStyleForm, + Explode: true, + } + + if err := q.HasParam(cfg); err == nil { + if err := q.DecodeParam(cfg, func(d uri.Decoder) error { + var paramsDotLimitVal int + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToInt(val) + if err != nil { + return err + } + + paramsDotLimitVal = c + return nil + }(); err != nil { + return err + } + params.Limit.SetTo(paramsDotLimitVal) + return nil + }); err != nil { + return err + } + if err := func() error { + if value, ok := params.Limit.Get(); ok { + if err := func() error { + if err := (validate.Int{ + MinSet: true, + Min: 1, + MaxSet: true, + Max: 100, + MinExclusive: false, + MaxExclusive: false, + MultipleOfSet: false, + MultipleOf: 0, + Pattern: nil, + }).Validate(int64(value)); err != nil { + return errors.Wrap(err, "int") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "limit", + In: "query", + Err: err, + } + } + // Decode query: cursor. + if err := func() error { + cfg := uri.QueryParameterDecodingConfig{ + Name: "cursor", + Style: uri.QueryStyleForm, + Explode: true, + } + + if err := q.HasParam(cfg); err == nil { + if err := q.DecodeParam(cfg, func(d uri.Decoder) error { + var paramsDotCursorVal string + if err := func() error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + paramsDotCursorVal = c + return nil + }(); err != nil { + return err + } + params.Cursor.SetTo(paramsDotCursorVal) + return nil + }); err != nil { + return err + } + if err := func() error { + if value, ok := params.Cursor.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "cursor", + In: "query", + Err: err, + } + } + return params, nil +} diff --git a/internal/transport/rest/oas/oas_request_decoders_gen.go b/internal/transport/rest/oas/oas_request_decoders_gen.go new file mode 100644 index 00000000..72c6b1bd --- /dev/null +++ b/internal/transport/rest/oas/oas_request_decoders_gen.go @@ -0,0 +1,252 @@ +// Code generated by ogen, DO NOT EDIT. + +package oas + +import ( + "bytes" + "io" + "mime" + "net/http" + + "github.com/go-faster/errors" + "github.com/go-faster/jx" + "github.com/ogen-go/ogen/ogenerrors" + "github.com/ogen-go/ogen/validate" +) + +func (s *Server) decodeCreateChatRequest(r *http.Request) ( + req *CreateChat, + rawBody []byte, + close func() error, + rerr error, +) { + var closers []func() error + close = func() error { + var merr error + // Close in reverse order, to match defer behavior. + for i := len(closers) - 1; i >= 0; i-- { + c := closers[i] + merr = errors.Join(merr, c()) + } + return merr + } + defer func() { + if rerr != nil { + rerr = errors.Join(rerr, close()) + } + }() + ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) + if err != nil { + return req, rawBody, close, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + if r.ContentLength == 0 { + return req, rawBody, close, validate.ErrBodyRequired + } + buf, err := io.ReadAll(r.Body) + defer func() { + _ = r.Body.Close() + }() + if err != nil { + return req, rawBody, close, err + } + + // Reset the body to allow for downstream reading. + r.Body = io.NopCloser(bytes.NewBuffer(buf)) + + if len(buf) == 0 { + return req, rawBody, close, validate.ErrBodyRequired + } + + rawBody = append(rawBody, buf...) + d := jx.DecodeBytes(buf) + + var request CreateChat + if err := func() error { + if err := request.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, rawBody, close, err + } + if err := func() error { + if err := request.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return req, rawBody, close, errors.Wrap(err, "validate") + } + return &request, rawBody, close, nil + default: + return req, rawBody, close, validate.InvalidContentType(ct) + } +} + +func (s *Server) decodeCreateMessageRequest(r *http.Request) ( + req *CreateMessage, + rawBody []byte, + close func() error, + rerr error, +) { + var closers []func() error + close = func() error { + var merr error + // Close in reverse order, to match defer behavior. + for i := len(closers) - 1; i >= 0; i-- { + c := closers[i] + merr = errors.Join(merr, c()) + } + return merr + } + defer func() { + if rerr != nil { + rerr = errors.Join(rerr, close()) + } + }() + ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) + if err != nil { + return req, rawBody, close, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + if r.ContentLength == 0 { + return req, rawBody, close, validate.ErrBodyRequired + } + buf, err := io.ReadAll(r.Body) + defer func() { + _ = r.Body.Close() + }() + if err != nil { + return req, rawBody, close, err + } + + // Reset the body to allow for downstream reading. + r.Body = io.NopCloser(bytes.NewBuffer(buf)) + + if len(buf) == 0 { + return req, rawBody, close, validate.ErrBodyRequired + } + + rawBody = append(rawBody, buf...) + d := jx.DecodeBytes(buf) + + var request CreateMessage + if err := func() error { + if err := request.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, rawBody, close, err + } + if err := func() error { + if err := request.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return req, rawBody, close, errors.Wrap(err, "validate") + } + return &request, rawBody, close, nil + default: + return req, rawBody, close, validate.InvalidContentType(ct) + } +} + +func (s *Server) decodeRegisterUserRequest(r *http.Request) ( + req *CreateUser, + rawBody []byte, + close func() error, + rerr error, +) { + var closers []func() error + close = func() error { + var merr error + // Close in reverse order, to match defer behavior. + for i := len(closers) - 1; i >= 0; i-- { + c := closers[i] + merr = errors.Join(merr, c()) + } + return merr + } + defer func() { + if rerr != nil { + rerr = errors.Join(rerr, close()) + } + }() + ct, _, err := mime.ParseMediaType(r.Header.Get("Content-Type")) + if err != nil { + return req, rawBody, close, errors.Wrap(err, "parse media type") + } + switch { + case ct == "application/json": + if r.ContentLength == 0 { + return req, rawBody, close, validate.ErrBodyRequired + } + buf, err := io.ReadAll(r.Body) + defer func() { + _ = r.Body.Close() + }() + if err != nil { + return req, rawBody, close, err + } + + // Reset the body to allow for downstream reading. + r.Body = io.NopCloser(bytes.NewBuffer(buf)) + + if len(buf) == 0 { + return req, rawBody, close, validate.ErrBodyRequired + } + + rawBody = append(rawBody, buf...) + d := jx.DecodeBytes(buf) + + var request CreateUser + if err := func() error { + if err := request.Decode(d); err != nil { + return err + } + if err := d.Skip(); err != io.EOF { + return errors.New("unexpected trailing data") + } + return nil + }(); err != nil { + err = &ogenerrors.DecodeBodyError{ + ContentType: ct, + Body: buf, + Err: err, + } + return req, rawBody, close, err + } + if err := func() error { + if err := request.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + return req, rawBody, close, errors.Wrap(err, "validate") + } + return &request, rawBody, close, nil + default: + return req, rawBody, close, validate.InvalidContentType(ct) + } +} diff --git a/internal/transport/rest/oas/oas_response_encoders_gen.go b/internal/transport/rest/oas/oas_response_encoders_gen.go new file mode 100644 index 00000000..95a2f78b --- /dev/null +++ b/internal/transport/rest/oas/oas_response_encoders_gen.go @@ -0,0 +1,2158 @@ +// Code generated by ogen, DO NOT EDIT. + +package oas + +import ( + "net/http" + + "github.com/go-faster/errors" + "github.com/go-faster/jx" + "github.com/ogen-go/ogen/conv" + "github.com/ogen-go/ogen/uri" +) + +func encodeCreateChatResponse(response CreateChatRes, w http.ResponseWriter) error { + switch response := response.(type) { + case *ChatHeaders: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(201) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *CreateChatBadRequest: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(400) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *ListChatsUnauthorizedHeaders: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "Www-Authenticate,X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "WWW-Authenticate" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "WWW-Authenticate", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.WWWAuthenticate.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode WWW-Authenticate header") + } + } + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(401) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *CreateChatNotFound: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(404) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *CreateChatConflict: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(409) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *ListChatsTooManyRequestsHeaders: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "Retry-After" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "Retry-After", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.RetryAfter.Get(); ok { + return e.EncodeValue(conv.IntToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode Retry-After header") + } + } + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(429) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *CreateChatInternalServerError: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(500) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *CreateChatServiceUnavailable: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(503) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + default: + return errors.Errorf("unexpected response type: %T", response) + } +} + +func encodeCreateMessageResponse(response CreateMessageRes, w http.ResponseWriter) error { + switch response := response.(type) { + case *MessageHeaders: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(201) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *CreateMessageBadRequest: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(400) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *ListChatsUnauthorizedHeaders: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "Www-Authenticate,X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "WWW-Authenticate" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "WWW-Authenticate", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.WWWAuthenticate.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode WWW-Authenticate header") + } + } + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(401) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *CreateMessageNotFound: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(404) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *CreateMessageConflict: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(409) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *ListChatsTooManyRequestsHeaders: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "Retry-After" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "Retry-After", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.RetryAfter.Get(); ok { + return e.EncodeValue(conv.IntToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode Retry-After header") + } + } + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(429) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *CreateMessageInternalServerError: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(500) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *CreateMessageServiceUnavailable: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(503) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + default: + return errors.Errorf("unexpected response type: %T", response) + } +} + +func encodeCurrentUserResponse(response CurrentUserRes, w http.ResponseWriter) error { + switch response := response.(type) { + case *UserHeaders: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(200) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *CurrentUserBadRequest: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(400) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *ListChatsUnauthorizedHeaders: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "Www-Authenticate,X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "WWW-Authenticate" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "WWW-Authenticate", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.WWWAuthenticate.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode WWW-Authenticate header") + } + } + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(401) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *CurrentUserNotFound: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(404) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *CurrentUserConflict: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(409) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *ListChatsTooManyRequestsHeaders: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "Retry-After" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "Retry-After", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.RetryAfter.Get(); ok { + return e.EncodeValue(conv.IntToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode Retry-After header") + } + } + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(429) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *CurrentUserInternalServerError: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(500) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *CurrentUserServiceUnavailable: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(503) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + default: + return errors.Errorf("unexpected response type: %T", response) + } +} + +func encodeGetChatResponse(response GetChatRes, w http.ResponseWriter) error { + switch response := response.(type) { + case *ChatHeaders: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(200) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *GetChatBadRequest: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(400) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *ListChatsUnauthorizedHeaders: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "Www-Authenticate,X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "WWW-Authenticate" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "WWW-Authenticate", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.WWWAuthenticate.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode WWW-Authenticate header") + } + } + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(401) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *GetChatNotFound: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(404) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *GetChatConflict: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(409) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *ListChatsTooManyRequestsHeaders: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "Retry-After" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "Retry-After", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.RetryAfter.Get(); ok { + return e.EncodeValue(conv.IntToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode Retry-After header") + } + } + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(429) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *GetChatInternalServerError: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(500) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *GetChatServiceUnavailable: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(503) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + default: + return errors.Errorf("unexpected response type: %T", response) + } +} + +func encodeListChatsResponse(response ListChatsRes, w http.ResponseWriter) error { + switch response := response.(type) { + case *ChatPageHeaders: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(200) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *ListChatsBadRequest: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(400) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *ListChatsUnauthorizedHeaders: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "Www-Authenticate,X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "WWW-Authenticate" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "WWW-Authenticate", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.WWWAuthenticate.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode WWW-Authenticate header") + } + } + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(401) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *ListChatsNotFound: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(404) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *ListChatsConflict: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(409) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *ListChatsTooManyRequestsHeaders: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "Retry-After" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "Retry-After", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.RetryAfter.Get(); ok { + return e.EncodeValue(conv.IntToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode Retry-After header") + } + } + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(429) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *ListChatsInternalServerError: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(500) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *ListChatsServiceUnavailable: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(503) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + default: + return errors.Errorf("unexpected response type: %T", response) + } +} + +func encodeListMessagesResponse(response ListMessagesRes, w http.ResponseWriter) error { + switch response := response.(type) { + case *MessagePageHeaders: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(200) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *ListMessagesBadRequest: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(400) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *ListChatsUnauthorizedHeaders: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "Www-Authenticate,X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "WWW-Authenticate" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "WWW-Authenticate", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.WWWAuthenticate.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode WWW-Authenticate header") + } + } + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(401) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *ListMessagesNotFound: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(404) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *ListMessagesConflict: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(409) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *ListChatsTooManyRequestsHeaders: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "Retry-After" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "Retry-After", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.RetryAfter.Get(); ok { + return e.EncodeValue(conv.IntToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode Retry-After header") + } + } + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(429) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *ListMessagesInternalServerError: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(500) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *ListMessagesServiceUnavailable: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(503) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + default: + return errors.Errorf("unexpected response type: %T", response) + } +} + +func encodeLivenessResponse(response LivenessRes, w http.ResponseWriter) error { + switch response := response.(type) { + case *HealthHeaders: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(200) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *ErrorHeaders: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(500) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + default: + return errors.Errorf("unexpected response type: %T", response) + } +} + +func encodeReadinessResponse(response ReadinessRes, w http.ResponseWriter) error { + switch response := response.(type) { + case *HealthHeaders: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(200) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *ReadinessInternalServerError: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(500) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *ReadinessServiceUnavailable: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(503) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + default: + return errors.Errorf("unexpected response type: %T", response) + } +} + +func encodeRegisterUserResponse(response RegisterUserRes, w http.ResponseWriter) error { + switch response := response.(type) { + case *UserHeaders: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(201) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *RegisterUserBadRequest: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(400) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *RegisterUserConflict: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(409) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *ListChatsTooManyRequestsHeaders: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "Retry-After" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "Retry-After", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.RetryAfter.Get(); ok { + return e.EncodeValue(conv.IntToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode Retry-After header") + } + } + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(429) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *RegisterUserInternalServerError: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(500) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *RegisterUserServiceUnavailable: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(503) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + default: + return errors.Errorf("unexpected response type: %T", response) + } +} diff --git a/internal/transport/rest/oas/oas_router_gen.go b/internal/transport/rest/oas/oas_router_gen.go new file mode 100644 index 00000000..4df54e48 --- /dev/null +++ b/internal/transport/rest/oas/oas_router_gen.go @@ -0,0 +1,647 @@ +// Code generated by ogen, DO NOT EDIT. + +package oas + +import ( + "net/http" + "net/url" + "strings" + + "github.com/ogen-go/ogen/uri" +) + +var ( + rn1AllowedHeaders = map[string]string{ + "GET": "X-User-Id", + "POST": "Content-Type,X-User-Id", + } + rn3AllowedHeaders = map[string]string{ + "GET": "X-User-Id", + } + rn4AllowedHeaders = map[string]string{ + "GET": "X-User-Id", + "POST": "Content-Type,X-User-Id", + } + rn11AllowedHeaders = map[string]string{ + "POST": "Content-Type", + } + rn6AllowedHeaders = map[string]string{ + "GET": "X-User-Id", + } +) + +func (s *Server) cutPrefix(path string) (string, bool) { + prefix := s.cfg.Prefix + if prefix == "" { + return path, true + } + if !strings.HasPrefix(path, prefix) { + // Prefix doesn't match. + return "", false + } + // Cut prefix from the path. + return strings.TrimPrefix(path, prefix), true +} + +// ServeHTTP serves http request as defined by OpenAPI v3 specification, +// calling handler that matches the path or returning not found error. +func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { + elem := r.URL.Path + elemIsEscaped := false + if rawPath := r.URL.RawPath; rawPath != "" { + if normalized, ok := uri.NormalizeEscapedPath(rawPath); ok { + elem = normalized + elemIsEscaped = strings.ContainsRune(elem, '%') + } + } + + elem, ok := s.cutPrefix(elem) + if !ok || len(elem) == 0 { + s.notFound(w, r) + return + } + args := [1]string{} + + // Static code generated router with unwrapped path search. + switch { + default: + if len(elem) == 0 { + break + } + switch elem[0] { + case '/': // Prefix: "/" + + if l := len("/"); len(elem) >= l && elem[0:l] == "/" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + break + } + switch elem[0] { + case 'a': // Prefix: "api/v1/" + + if l := len("api/v1/"); len(elem) >= l && elem[0:l] == "api/v1/" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + break + } + switch elem[0] { + case 'c': // Prefix: "chats" + + if l := len("chats"); len(elem) >= l && elem[0:l] == "chats" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + switch r.Method { + case "GET": + s.handleListChatsRequest([0]string{}, elemIsEscaped, w, r) + case "POST": + s.handleCreateChatRequest([0]string{}, elemIsEscaped, w, r) + default: + s.notAllowed(w, r, notAllowedParams{ + allowedMethods: "GET,POST", + allowedHeaders: rn1AllowedHeaders, + acceptPost: "application/json", + acceptPatch: "", + }) + } + + return + } + switch elem[0] { + case '/': // Prefix: "/" + + if l := len("/"); len(elem) >= l && elem[0:l] == "/" { + elem = elem[l:] + } else { + break + } + + // Param: "chat_id" + // Match until "/" + idx := strings.IndexByte(elem, '/') + if idx < 0 { + idx = len(elem) + } + args[0] = elem[:idx] + elem = elem[idx:] + + if len(elem) == 0 { + switch r.Method { + case "GET": + s.handleGetChatRequest([1]string{ + args[0], + }, elemIsEscaped, w, r) + default: + s.notAllowed(w, r, notAllowedParams{ + allowedMethods: "GET", + allowedHeaders: rn3AllowedHeaders, + acceptPost: "", + acceptPatch: "", + }) + } + + return + } + switch elem[0] { + case '/': // Prefix: "/messages" + + if l := len("/messages"); len(elem) >= l && elem[0:l] == "/messages" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + // Leaf node. + switch r.Method { + case "GET": + s.handleListMessagesRequest([1]string{ + args[0], + }, elemIsEscaped, w, r) + case "POST": + s.handleCreateMessageRequest([1]string{ + args[0], + }, elemIsEscaped, w, r) + default: + s.notAllowed(w, r, notAllowedParams{ + allowedMethods: "GET,POST", + allowedHeaders: rn4AllowedHeaders, + acceptPost: "application/json", + acceptPatch: "", + }) + } + + return + } + + } + + } + + case 'u': // Prefix: "users" + + if l := len("users"); len(elem) >= l && elem[0:l] == "users" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + switch r.Method { + case "POST": + s.handleRegisterUserRequest([0]string{}, elemIsEscaped, w, r) + default: + s.notAllowed(w, r, notAllowedParams{ + allowedMethods: "POST", + allowedHeaders: rn11AllowedHeaders, + acceptPost: "application/json", + acceptPatch: "", + }) + } + + return + } + switch elem[0] { + case '/': // Prefix: "/me" + + if l := len("/me"); len(elem) >= l && elem[0:l] == "/me" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + // Leaf node. + switch r.Method { + case "GET": + s.handleCurrentUserRequest([0]string{}, elemIsEscaped, w, r) + default: + s.notAllowed(w, r, notAllowedParams{ + allowedMethods: "GET", + allowedHeaders: rn6AllowedHeaders, + acceptPost: "", + acceptPatch: "", + }) + } + + return + } + + } + + } + + case 'h': // Prefix: "health/" + + if l := len("health/"); len(elem) >= l && elem[0:l] == "health/" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + break + } + switch elem[0] { + case 'l': // Prefix: "live" + + if l := len("live"); len(elem) >= l && elem[0:l] == "live" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + // Leaf node. + switch r.Method { + case "GET": + s.handleLivenessRequest([0]string{}, elemIsEscaped, w, r) + default: + s.notAllowed(w, r, notAllowedParams{ + allowedMethods: "GET", + allowedHeaders: nil, + acceptPost: "", + acceptPatch: "", + }) + } + + return + } + + case 'r': // Prefix: "ready" + + if l := len("ready"); len(elem) >= l && elem[0:l] == "ready" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + // Leaf node. + switch r.Method { + case "GET": + s.handleReadinessRequest([0]string{}, elemIsEscaped, w, r) + default: + s.notAllowed(w, r, notAllowedParams{ + allowedMethods: "GET", + allowedHeaders: nil, + acceptPost: "", + acceptPatch: "", + }) + } + + return + } + + } + + } + + } + } + s.notFound(w, r) +} + +// Route is route object. +type Route struct { + name string + summary string + operationID string + operationGroup string + pathPattern string + count int + args [1]string +} + +// Name returns ogen operation name. +// +// It is guaranteed to be unique and not empty. +func (r Route) Name() string { + return r.name +} + +// Summary returns OpenAPI summary. +func (r Route) Summary() string { + return r.summary +} + +// OperationID returns OpenAPI operationId. +func (r Route) OperationID() string { + return r.operationID +} + +// OperationGroup returns the x-ogen-operation-group value. +func (r Route) OperationGroup() string { + return r.operationGroup +} + +// PathPattern returns OpenAPI path. +func (r Route) PathPattern() string { + return r.pathPattern +} + +// Args returns parsed arguments. +func (r Route) Args() []string { + return r.args[:r.count] +} + +// FindRoute finds Route for given method and path. +// +// Note: this method does not unescape path or handle reserved characters in path properly. Use FindPath instead. +func (s *Server) FindRoute(method, path string) (Route, bool) { + return s.FindPath(method, &url.URL{Path: path}) +} + +// FindPath finds Route for given method and URL. +func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool) { + var ( + elem = u.Path + args = r.args + ) + if rawPath := u.RawPath; rawPath != "" { + if normalized, ok := uri.NormalizeEscapedPath(rawPath); ok { + elem = normalized + } + defer func() { + for i, arg := range r.args[:r.count] { + if unescaped, err := url.PathUnescape(arg); err == nil { + r.args[i] = unescaped + } + } + }() + } + + elem, ok := s.cutPrefix(elem) + if !ok { + return r, false + } + + // Static code generated router with unwrapped path search. + switch { + default: + if len(elem) == 0 { + break + } + switch elem[0] { + case '/': // Prefix: "/" + + if l := len("/"); len(elem) >= l && elem[0:l] == "/" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + break + } + switch elem[0] { + case 'a': // Prefix: "api/v1/" + + if l := len("api/v1/"); len(elem) >= l && elem[0:l] == "api/v1/" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + break + } + switch elem[0] { + case 'c': // Prefix: "chats" + + if l := len("chats"); len(elem) >= l && elem[0:l] == "chats" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + switch method { + case "GET": + r.name = ListChatsOperation + r.summary = "Чаты текущего пользователя" + r.operationID = "listChats" + r.operationGroup = "" + r.pathPattern = "/api/v1/chats" + r.args = args + r.count = 0 + return r, true + case "POST": + r.name = CreateChatOperation + r.summary = "Создать чат; вызывающий должен входить в member_ids" + r.operationID = "createChat" + r.operationGroup = "" + r.pathPattern = "/api/v1/chats" + r.args = args + r.count = 0 + return r, true + default: + return + } + } + switch elem[0] { + case '/': // Prefix: "/" + + if l := len("/"); len(elem) >= l && elem[0:l] == "/" { + elem = elem[l:] + } else { + break + } + + // Param: "chat_id" + // Match until "/" + idx := strings.IndexByte(elem, '/') + if idx < 0 { + idx = len(elem) + } + args[0] = elem[:idx] + elem = elem[idx:] + + if len(elem) == 0 { + switch method { + case "GET": + r.name = GetChatOperation + r.summary = "Получить доступный чат" + r.operationID = "getChat" + r.operationGroup = "" + r.pathPattern = "/api/v1/chats/{chat_id}" + r.args = args + r.count = 1 + return r, true + default: + return + } + } + switch elem[0] { + case '/': // Prefix: "/messages" + + if l := len("/messages"); len(elem) >= l && elem[0:l] == "/messages" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + // Leaf node. + switch method { + case "GET": + r.name = ListMessagesOperation + r.summary = "Сообщения по (created_at, id) по возрастанию" + r.operationID = "listMessages" + r.operationGroup = "" + r.pathPattern = "/api/v1/chats/{chat_id}/messages" + r.args = args + r.count = 1 + return r, true + case "POST": + r.name = CreateMessageOperation + r.summary = "Отправить сообщение" + r.operationID = "createMessage" + r.operationGroup = "" + r.pathPattern = "/api/v1/chats/{chat_id}/messages" + r.args = args + r.count = 1 + return r, true + default: + return + } + } + + } + + } + + case 'u': // Prefix: "users" + + if l := len("users"); len(elem) >= l && elem[0:l] == "users" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + switch method { + case "POST": + r.name = RegisterUserOperation + r.summary = "Создать пользователя" + r.operationID = "registerUser" + r.operationGroup = "" + r.pathPattern = "/api/v1/users" + r.args = args + r.count = 0 + return r, true + default: + return + } + } + switch elem[0] { + case '/': // Prefix: "/me" + + if l := len("/me"); len(elem) >= l && elem[0:l] == "/me" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + // Leaf node. + switch method { + case "GET": + r.name = CurrentUserOperation + r.summary = "Текущий пользователь" + r.operationID = "currentUser" + r.operationGroup = "" + r.pathPattern = "/api/v1/users/me" + r.args = args + r.count = 0 + return r, true + default: + return + } + } + + } + + } + + case 'h': // Prefix: "health/" + + if l := len("health/"); len(elem) >= l && elem[0:l] == "health/" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + break + } + switch elem[0] { + case 'l': // Prefix: "live" + + if l := len("live"); len(elem) >= l && elem[0:l] == "live" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + // Leaf node. + switch method { + case "GET": + r.name = LivenessOperation + r.summary = "Процесс жив" + r.operationID = "liveness" + r.operationGroup = "" + r.pathPattern = "/health/live" + r.args = args + r.count = 0 + return r, true + default: + return + } + } + + case 'r': // Prefix: "ready" + + if l := len("ready"); len(elem) >= l && elem[0:l] == "ready" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + // Leaf node. + switch method { + case "GET": + r.name = ReadinessOperation + r.summary = "Готов принимать трафик" + r.operationID = "readiness" + r.operationGroup = "" + r.pathPattern = "/health/ready" + r.args = args + r.count = 0 + return r, true + default: + return + } + } + + } + + } + + } + } + return r, false +} diff --git a/internal/transport/rest/oas/oas_schemas_gen.go b/internal/transport/rest/oas/oas_schemas_gen.go new file mode 100644 index 00000000..e51d1457 --- /dev/null +++ b/internal/transport/rest/oas/oas_schemas_gen.go @@ -0,0 +1,1068 @@ +// Code generated by ogen, DO NOT EDIT. + +package oas + +import ( + "time" + + "github.com/go-faster/errors" + "github.com/google/uuid" +) + +// Ref: #/components/schemas/Chat +type Chat struct { + ID uuid.UUID `json:"id"` + Title string `json:"title"` + MemberIds []uuid.UUID `json:"member_ids"` + CreatedAt time.Time `json:"created_at"` +} + +// GetID returns the value of ID. +func (s *Chat) GetID() uuid.UUID { + return s.ID +} + +// GetTitle returns the value of Title. +func (s *Chat) GetTitle() string { + return s.Title +} + +// GetMemberIds returns the value of MemberIds. +func (s *Chat) GetMemberIds() []uuid.UUID { + return s.MemberIds +} + +// GetCreatedAt returns the value of CreatedAt. +func (s *Chat) GetCreatedAt() time.Time { + return s.CreatedAt +} + +// SetID sets the value of ID. +func (s *Chat) SetID(val uuid.UUID) { + s.ID = val +} + +// SetTitle sets the value of Title. +func (s *Chat) SetTitle(val string) { + s.Title = val +} + +// SetMemberIds sets the value of MemberIds. +func (s *Chat) SetMemberIds(val []uuid.UUID) { + s.MemberIds = val +} + +// SetCreatedAt sets the value of CreatedAt. +func (s *Chat) SetCreatedAt(val time.Time) { + s.CreatedAt = val +} + +// ChatHeaders wraps Chat with response headers. +type ChatHeaders struct { + XRequestID OptString + Response Chat +} + +// GetXRequestID returns the value of XRequestID. +func (s *ChatHeaders) GetXRequestID() OptString { + return s.XRequestID +} + +// GetResponse returns the value of Response. +func (s *ChatHeaders) GetResponse() Chat { + return s.Response +} + +// SetXRequestID sets the value of XRequestID. +func (s *ChatHeaders) SetXRequestID(val OptString) { + s.XRequestID = val +} + +// SetResponse sets the value of Response. +func (s *ChatHeaders) SetResponse(val Chat) { + s.Response = val +} + +func (*ChatHeaders) createChatRes() {} +func (*ChatHeaders) getChatRes() {} + +// Ref: #/components/schemas/ChatPage +type ChatPage struct { + Items []Chat `json:"items"` + NextCursor NilString `json:"next_cursor"` +} + +// GetItems returns the value of Items. +func (s *ChatPage) GetItems() []Chat { + return s.Items +} + +// GetNextCursor returns the value of NextCursor. +func (s *ChatPage) GetNextCursor() NilString { + return s.NextCursor +} + +// SetItems sets the value of Items. +func (s *ChatPage) SetItems(val []Chat) { + s.Items = val +} + +// SetNextCursor sets the value of NextCursor. +func (s *ChatPage) SetNextCursor(val NilString) { + s.NextCursor = val +} + +// ChatPageHeaders wraps ChatPage with response headers. +type ChatPageHeaders struct { + XRequestID OptString + Response ChatPage +} + +// GetXRequestID returns the value of XRequestID. +func (s *ChatPageHeaders) GetXRequestID() OptString { + return s.XRequestID +} + +// GetResponse returns the value of Response. +func (s *ChatPageHeaders) GetResponse() ChatPage { + return s.Response +} + +// SetXRequestID sets the value of XRequestID. +func (s *ChatPageHeaders) SetXRequestID(val OptString) { + s.XRequestID = val +} + +// SetResponse sets the value of Response. +func (s *ChatPageHeaders) SetResponse(val ChatPage) { + s.Response = val +} + +func (*ChatPageHeaders) listChatsRes() {} + +// Ref: #/components/schemas/CreateChat +type CreateChat struct { + Title string `json:"title"` + MemberIds []uuid.UUID `json:"member_ids"` +} + +// GetTitle returns the value of Title. +func (s *CreateChat) GetTitle() string { + return s.Title +} + +// GetMemberIds returns the value of MemberIds. +func (s *CreateChat) GetMemberIds() []uuid.UUID { + return s.MemberIds +} + +// SetTitle sets the value of Title. +func (s *CreateChat) SetTitle(val string) { + s.Title = val +} + +// SetMemberIds sets the value of MemberIds. +func (s *CreateChat) SetMemberIds(val []uuid.UUID) { + s.MemberIds = val +} + +type CreateChatBadRequest ErrorHeaders + +func (*CreateChatBadRequest) createChatRes() {} + +type CreateChatConflict ErrorHeaders + +func (*CreateChatConflict) createChatRes() {} + +type CreateChatInternalServerError ErrorHeaders + +func (*CreateChatInternalServerError) createChatRes() {} + +type CreateChatNotFound ErrorHeaders + +func (*CreateChatNotFound) createChatRes() {} + +type CreateChatServiceUnavailable ErrorHeaders + +func (*CreateChatServiceUnavailable) createChatRes() {} + +// Ref: #/components/schemas/CreateMessage +type CreateMessage struct { + Text string `json:"text"` +} + +// GetText returns the value of Text. +func (s *CreateMessage) GetText() string { + return s.Text +} + +// SetText sets the value of Text. +func (s *CreateMessage) SetText(val string) { + s.Text = val +} + +type CreateMessageBadRequest ErrorHeaders + +func (*CreateMessageBadRequest) createMessageRes() {} + +type CreateMessageConflict ErrorHeaders + +func (*CreateMessageConflict) createMessageRes() {} + +type CreateMessageInternalServerError ErrorHeaders + +func (*CreateMessageInternalServerError) createMessageRes() {} + +type CreateMessageNotFound ErrorHeaders + +func (*CreateMessageNotFound) createMessageRes() {} + +type CreateMessageServiceUnavailable ErrorHeaders + +func (*CreateMessageServiceUnavailable) createMessageRes() {} + +// Ref: #/components/schemas/CreateUser +type CreateUser struct { + Username string `json:"username"` + DisplayName string `json:"display_name"` +} + +// GetUsername returns the value of Username. +func (s *CreateUser) GetUsername() string { + return s.Username +} + +// GetDisplayName returns the value of DisplayName. +func (s *CreateUser) GetDisplayName() string { + return s.DisplayName +} + +// SetUsername sets the value of Username. +func (s *CreateUser) SetUsername(val string) { + s.Username = val +} + +// SetDisplayName sets the value of DisplayName. +func (s *CreateUser) SetDisplayName(val string) { + s.DisplayName = val +} + +type CurrentUserBadRequest ErrorHeaders + +func (*CurrentUserBadRequest) currentUserRes() {} + +type CurrentUserConflict ErrorHeaders + +func (*CurrentUserConflict) currentUserRes() {} + +type CurrentUserInternalServerError ErrorHeaders + +func (*CurrentUserInternalServerError) currentUserRes() {} + +type CurrentUserNotFound ErrorHeaders + +func (*CurrentUserNotFound) currentUserRes() {} + +type CurrentUserServiceUnavailable ErrorHeaders + +func (*CurrentUserServiceUnavailable) currentUserRes() {} + +type DevUser struct { + APIKey string + Roles []string +} + +// GetAPIKey returns the value of APIKey. +func (s *DevUser) GetAPIKey() string { + return s.APIKey +} + +// GetRoles returns the value of Roles. +func (s *DevUser) GetRoles() []string { + return s.Roles +} + +// SetAPIKey sets the value of APIKey. +func (s *DevUser) SetAPIKey(val string) { + s.APIKey = val +} + +// SetRoles sets the value of Roles. +func (s *DevUser) SetRoles(val []string) { + s.Roles = val +} + +// Ref: #/components/schemas/Error +type Error struct { + Error ErrorError `json:"error"` +} + +// GetError returns the value of Error. +func (s *Error) GetError() ErrorError { + return s.Error +} + +// SetError sets the value of Error. +func (s *Error) SetError(val ErrorError) { + s.Error = val +} + +type ErrorError struct { + Code ErrorErrorCode `json:"code"` + Message string `json:"message"` + RequestID string `json:"request_id"` +} + +// GetCode returns the value of Code. +func (s *ErrorError) GetCode() ErrorErrorCode { + return s.Code +} + +// GetMessage returns the value of Message. +func (s *ErrorError) GetMessage() string { + return s.Message +} + +// GetRequestID returns the value of RequestID. +func (s *ErrorError) GetRequestID() string { + return s.RequestID +} + +// SetCode sets the value of Code. +func (s *ErrorError) SetCode(val ErrorErrorCode) { + s.Code = val +} + +// SetMessage sets the value of Message. +func (s *ErrorError) SetMessage(val string) { + s.Message = val +} + +// SetRequestID sets the value of RequestID. +func (s *ErrorError) SetRequestID(val string) { + s.RequestID = val +} + +type ErrorErrorCode string + +const ( + ErrorErrorCodeInvalidRequest ErrorErrorCode = "invalid_request" + ErrorErrorCodeUnauthorized ErrorErrorCode = "unauthorized" + ErrorErrorCodeNotFound ErrorErrorCode = "not_found" + ErrorErrorCodeConflict ErrorErrorCode = "conflict" + ErrorErrorCodePayloadTooLarge ErrorErrorCode = "payload_too_large" + ErrorErrorCodeUnsupportedMediaType ErrorErrorCode = "unsupported_media_type" + ErrorErrorCodeRateLimited ErrorErrorCode = "rate_limited" + ErrorErrorCodeUnavailable ErrorErrorCode = "unavailable" + ErrorErrorCodeInternalError ErrorErrorCode = "internal_error" +) + +// AllValues returns all ErrorErrorCode values. +func (ErrorErrorCode) AllValues() []ErrorErrorCode { + return []ErrorErrorCode{ + ErrorErrorCodeInvalidRequest, + ErrorErrorCodeUnauthorized, + ErrorErrorCodeNotFound, + ErrorErrorCodeConflict, + ErrorErrorCodePayloadTooLarge, + ErrorErrorCodeUnsupportedMediaType, + ErrorErrorCodeRateLimited, + ErrorErrorCodeUnavailable, + ErrorErrorCodeInternalError, + } +} + +// MarshalText implements encoding.TextMarshaler. +func (s ErrorErrorCode) MarshalText() ([]byte, error) { + switch s { + case ErrorErrorCodeInvalidRequest: + return []byte(s), nil + case ErrorErrorCodeUnauthorized: + return []byte(s), nil + case ErrorErrorCodeNotFound: + return []byte(s), nil + case ErrorErrorCodeConflict: + return []byte(s), nil + case ErrorErrorCodePayloadTooLarge: + return []byte(s), nil + case ErrorErrorCodeUnsupportedMediaType: + return []byte(s), nil + case ErrorErrorCodeRateLimited: + return []byte(s), nil + case ErrorErrorCodeUnavailable: + return []byte(s), nil + case ErrorErrorCodeInternalError: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *ErrorErrorCode) UnmarshalText(data []byte) error { + switch ErrorErrorCode(data) { + case ErrorErrorCodeInvalidRequest: + *s = ErrorErrorCodeInvalidRequest + return nil + case ErrorErrorCodeUnauthorized: + *s = ErrorErrorCodeUnauthorized + return nil + case ErrorErrorCodeNotFound: + *s = ErrorErrorCodeNotFound + return nil + case ErrorErrorCodeConflict: + *s = ErrorErrorCodeConflict + return nil + case ErrorErrorCodePayloadTooLarge: + *s = ErrorErrorCodePayloadTooLarge + return nil + case ErrorErrorCodeUnsupportedMediaType: + *s = ErrorErrorCodeUnsupportedMediaType + return nil + case ErrorErrorCodeRateLimited: + *s = ErrorErrorCodeRateLimited + return nil + case ErrorErrorCodeUnavailable: + *s = ErrorErrorCodeUnavailable + return nil + case ErrorErrorCodeInternalError: + *s = ErrorErrorCodeInternalError + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +// ErrorHeaders wraps Error with response headers. +type ErrorHeaders struct { + XRequestID OptString + Response Error +} + +// GetXRequestID returns the value of XRequestID. +func (s *ErrorHeaders) GetXRequestID() OptString { + return s.XRequestID +} + +// GetResponse returns the value of Response. +func (s *ErrorHeaders) GetResponse() Error { + return s.Response +} + +// SetXRequestID sets the value of XRequestID. +func (s *ErrorHeaders) SetXRequestID(val OptString) { + s.XRequestID = val +} + +// SetResponse sets the value of Response. +func (s *ErrorHeaders) SetResponse(val Error) { + s.Response = val +} + +func (*ErrorHeaders) livenessRes() {} + +type GetChatBadRequest ErrorHeaders + +func (*GetChatBadRequest) getChatRes() {} + +type GetChatConflict ErrorHeaders + +func (*GetChatConflict) getChatRes() {} + +type GetChatInternalServerError ErrorHeaders + +func (*GetChatInternalServerError) getChatRes() {} + +type GetChatNotFound ErrorHeaders + +func (*GetChatNotFound) getChatRes() {} + +type GetChatServiceUnavailable ErrorHeaders + +func (*GetChatServiceUnavailable) getChatRes() {} + +// Ref: #/components/schemas/Health +type Health struct { + Status HealthStatus `json:"status"` +} + +// GetStatus returns the value of Status. +func (s *Health) GetStatus() HealthStatus { + return s.Status +} + +// SetStatus sets the value of Status. +func (s *Health) SetStatus(val HealthStatus) { + s.Status = val +} + +// HealthHeaders wraps Health with response headers. +type HealthHeaders struct { + XRequestID OptString + Response Health +} + +// GetXRequestID returns the value of XRequestID. +func (s *HealthHeaders) GetXRequestID() OptString { + return s.XRequestID +} + +// GetResponse returns the value of Response. +func (s *HealthHeaders) GetResponse() Health { + return s.Response +} + +// SetXRequestID sets the value of XRequestID. +func (s *HealthHeaders) SetXRequestID(val OptString) { + s.XRequestID = val +} + +// SetResponse sets the value of Response. +func (s *HealthHeaders) SetResponse(val Health) { + s.Response = val +} + +func (*HealthHeaders) livenessRes() {} +func (*HealthHeaders) readinessRes() {} + +type HealthStatus string + +const ( + HealthStatusOk HealthStatus = "ok" +) + +// AllValues returns all HealthStatus values. +func (HealthStatus) AllValues() []HealthStatus { + return []HealthStatus{ + HealthStatusOk, + } +} + +// MarshalText implements encoding.TextMarshaler. +func (s HealthStatus) MarshalText() ([]byte, error) { + switch s { + case HealthStatusOk: + return []byte(s), nil + default: + return nil, errors.Errorf("invalid value: %q", s) + } +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (s *HealthStatus) UnmarshalText(data []byte) error { + switch HealthStatus(data) { + case HealthStatusOk: + *s = HealthStatusOk + return nil + default: + return errors.Errorf("invalid value: %q", data) + } +} + +type ListChatsBadRequest ErrorHeaders + +func (*ListChatsBadRequest) listChatsRes() {} + +type ListChatsConflict ErrorHeaders + +func (*ListChatsConflict) listChatsRes() {} + +type ListChatsInternalServerError ErrorHeaders + +func (*ListChatsInternalServerError) listChatsRes() {} + +type ListChatsNotFound ErrorHeaders + +func (*ListChatsNotFound) listChatsRes() {} + +type ListChatsServiceUnavailable ErrorHeaders + +func (*ListChatsServiceUnavailable) listChatsRes() {} + +// ListChatsTooManyRequestsHeaders wraps Error with response headers. +type ListChatsTooManyRequestsHeaders struct { + RetryAfter OptInt + XRequestID OptString + Response Error +} + +// GetRetryAfter returns the value of RetryAfter. +func (s *ListChatsTooManyRequestsHeaders) GetRetryAfter() OptInt { + return s.RetryAfter +} + +// GetXRequestID returns the value of XRequestID. +func (s *ListChatsTooManyRequestsHeaders) GetXRequestID() OptString { + return s.XRequestID +} + +// GetResponse returns the value of Response. +func (s *ListChatsTooManyRequestsHeaders) GetResponse() Error { + return s.Response +} + +// SetRetryAfter sets the value of RetryAfter. +func (s *ListChatsTooManyRequestsHeaders) SetRetryAfter(val OptInt) { + s.RetryAfter = val +} + +// SetXRequestID sets the value of XRequestID. +func (s *ListChatsTooManyRequestsHeaders) SetXRequestID(val OptString) { + s.XRequestID = val +} + +// SetResponse sets the value of Response. +func (s *ListChatsTooManyRequestsHeaders) SetResponse(val Error) { + s.Response = val +} + +func (*ListChatsTooManyRequestsHeaders) createChatRes() {} +func (*ListChatsTooManyRequestsHeaders) createMessageRes() {} +func (*ListChatsTooManyRequestsHeaders) currentUserRes() {} +func (*ListChatsTooManyRequestsHeaders) getChatRes() {} +func (*ListChatsTooManyRequestsHeaders) listChatsRes() {} +func (*ListChatsTooManyRequestsHeaders) listMessagesRes() {} +func (*ListChatsTooManyRequestsHeaders) registerUserRes() {} + +// ListChatsUnauthorizedHeaders wraps Error with response headers. +type ListChatsUnauthorizedHeaders struct { + WWWAuthenticate OptString + XRequestID OptString + Response Error +} + +// GetWWWAuthenticate returns the value of WWWAuthenticate. +func (s *ListChatsUnauthorizedHeaders) GetWWWAuthenticate() OptString { + return s.WWWAuthenticate +} + +// GetXRequestID returns the value of XRequestID. +func (s *ListChatsUnauthorizedHeaders) GetXRequestID() OptString { + return s.XRequestID +} + +// GetResponse returns the value of Response. +func (s *ListChatsUnauthorizedHeaders) GetResponse() Error { + return s.Response +} + +// SetWWWAuthenticate sets the value of WWWAuthenticate. +func (s *ListChatsUnauthorizedHeaders) SetWWWAuthenticate(val OptString) { + s.WWWAuthenticate = val +} + +// SetXRequestID sets the value of XRequestID. +func (s *ListChatsUnauthorizedHeaders) SetXRequestID(val OptString) { + s.XRequestID = val +} + +// SetResponse sets the value of Response. +func (s *ListChatsUnauthorizedHeaders) SetResponse(val Error) { + s.Response = val +} + +func (*ListChatsUnauthorizedHeaders) createChatRes() {} +func (*ListChatsUnauthorizedHeaders) createMessageRes() {} +func (*ListChatsUnauthorizedHeaders) currentUserRes() {} +func (*ListChatsUnauthorizedHeaders) getChatRes() {} +func (*ListChatsUnauthorizedHeaders) listChatsRes() {} +func (*ListChatsUnauthorizedHeaders) listMessagesRes() {} + +type ListMessagesBadRequest ErrorHeaders + +func (*ListMessagesBadRequest) listMessagesRes() {} + +type ListMessagesConflict ErrorHeaders + +func (*ListMessagesConflict) listMessagesRes() {} + +type ListMessagesInternalServerError ErrorHeaders + +func (*ListMessagesInternalServerError) listMessagesRes() {} + +type ListMessagesNotFound ErrorHeaders + +func (*ListMessagesNotFound) listMessagesRes() {} + +type ListMessagesServiceUnavailable ErrorHeaders + +func (*ListMessagesServiceUnavailable) listMessagesRes() {} + +// Ref: #/components/schemas/Message +type Message struct { + ID uuid.UUID `json:"id"` + ChatID uuid.UUID `json:"chat_id"` + SenderID uuid.UUID `json:"sender_id"` + Text string `json:"text"` + CreatedAt time.Time `json:"created_at"` +} + +// GetID returns the value of ID. +func (s *Message) GetID() uuid.UUID { + return s.ID +} + +// GetChatID returns the value of ChatID. +func (s *Message) GetChatID() uuid.UUID { + return s.ChatID +} + +// GetSenderID returns the value of SenderID. +func (s *Message) GetSenderID() uuid.UUID { + return s.SenderID +} + +// GetText returns the value of Text. +func (s *Message) GetText() string { + return s.Text +} + +// GetCreatedAt returns the value of CreatedAt. +func (s *Message) GetCreatedAt() time.Time { + return s.CreatedAt +} + +// SetID sets the value of ID. +func (s *Message) SetID(val uuid.UUID) { + s.ID = val +} + +// SetChatID sets the value of ChatID. +func (s *Message) SetChatID(val uuid.UUID) { + s.ChatID = val +} + +// SetSenderID sets the value of SenderID. +func (s *Message) SetSenderID(val uuid.UUID) { + s.SenderID = val +} + +// SetText sets the value of Text. +func (s *Message) SetText(val string) { + s.Text = val +} + +// SetCreatedAt sets the value of CreatedAt. +func (s *Message) SetCreatedAt(val time.Time) { + s.CreatedAt = val +} + +// MessageHeaders wraps Message with response headers. +type MessageHeaders struct { + XRequestID OptString + Response Message +} + +// GetXRequestID returns the value of XRequestID. +func (s *MessageHeaders) GetXRequestID() OptString { + return s.XRequestID +} + +// GetResponse returns the value of Response. +func (s *MessageHeaders) GetResponse() Message { + return s.Response +} + +// SetXRequestID sets the value of XRequestID. +func (s *MessageHeaders) SetXRequestID(val OptString) { + s.XRequestID = val +} + +// SetResponse sets the value of Response. +func (s *MessageHeaders) SetResponse(val Message) { + s.Response = val +} + +func (*MessageHeaders) createMessageRes() {} + +// Ref: #/components/schemas/MessagePage +type MessagePage struct { + Items []Message `json:"items"` + NextCursor NilString `json:"next_cursor"` +} + +// GetItems returns the value of Items. +func (s *MessagePage) GetItems() []Message { + return s.Items +} + +// GetNextCursor returns the value of NextCursor. +func (s *MessagePage) GetNextCursor() NilString { + return s.NextCursor +} + +// SetItems sets the value of Items. +func (s *MessagePage) SetItems(val []Message) { + s.Items = val +} + +// SetNextCursor sets the value of NextCursor. +func (s *MessagePage) SetNextCursor(val NilString) { + s.NextCursor = val +} + +// MessagePageHeaders wraps MessagePage with response headers. +type MessagePageHeaders struct { + XRequestID OptString + Response MessagePage +} + +// GetXRequestID returns the value of XRequestID. +func (s *MessagePageHeaders) GetXRequestID() OptString { + return s.XRequestID +} + +// GetResponse returns the value of Response. +func (s *MessagePageHeaders) GetResponse() MessagePage { + return s.Response +} + +// SetXRequestID sets the value of XRequestID. +func (s *MessagePageHeaders) SetXRequestID(val OptString) { + s.XRequestID = val +} + +// SetResponse sets the value of Response. +func (s *MessagePageHeaders) SetResponse(val MessagePage) { + s.Response = val +} + +func (*MessagePageHeaders) listMessagesRes() {} + +// NewNilString returns new NilString with value set to v. +func NewNilString(v string) NilString { + return NilString{ + Value: v, + } +} + +// NilString is nullable string. +type NilString struct { + Value string + Null bool +} + +// SetTo sets value to v. +func (o *NilString) SetTo(v string) { + o.Null = false + o.Value = v +} + +// IsNull returns true if value is Null. +func (o NilString) IsNull() bool { return o.Null } + +// SetToNull sets value to null. +func (o *NilString) SetToNull() { + o.Null = true + var v string + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o NilString) Get() (v string, ok bool) { + if o.Null { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o NilString) Or(d string) string { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptInt returns new OptInt with value set to v. +func NewOptInt(v int) OptInt { + return OptInt{ + Value: v, + Set: true, + } +} + +// OptInt is optional int. +type OptInt struct { + Value int + Set bool +} + +// IsSet returns true if OptInt was set. +func (o OptInt) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptInt) Reset() { + var v int + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptInt) SetTo(v int) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptInt) Get() (v int, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptInt) Or(d int) int { + if v, ok := o.Get(); ok { + return v + } + return d +} + +// NewOptString returns new OptString with value set to v. +func NewOptString(v string) OptString { + return OptString{ + Value: v, + Set: true, + } +} + +// OptString is optional string. +type OptString struct { + Value string + Set bool +} + +// IsSet returns true if OptString was set. +func (o OptString) IsSet() bool { return o.Set } + +// Reset unsets value. +func (o *OptString) Reset() { + var v string + o.Value = v + o.Set = false +} + +// SetTo sets value to v. +func (o *OptString) SetTo(v string) { + o.Set = true + o.Value = v +} + +// Get returns value and boolean that denotes whether value was set. +func (o OptString) Get() (v string, ok bool) { + if !o.Set { + return v, false + } + return o.Value, true +} + +// Or returns value if set, or given parameter if does not. +func (o OptString) Or(d string) string { + if v, ok := o.Get(); ok { + return v + } + return d +} + +type ReadinessInternalServerError ErrorHeaders + +func (*ReadinessInternalServerError) readinessRes() {} + +type ReadinessServiceUnavailable ErrorHeaders + +func (*ReadinessServiceUnavailable) readinessRes() {} + +type RegisterUserBadRequest ErrorHeaders + +func (*RegisterUserBadRequest) registerUserRes() {} + +type RegisterUserConflict ErrorHeaders + +func (*RegisterUserConflict) registerUserRes() {} + +type RegisterUserInternalServerError ErrorHeaders + +func (*RegisterUserInternalServerError) registerUserRes() {} + +type RegisterUserServiceUnavailable ErrorHeaders + +func (*RegisterUserServiceUnavailable) registerUserRes() {} + +// Ref: #/components/schemas/User +type User struct { + ID uuid.UUID `json:"id"` + Username string `json:"username"` + DisplayName string `json:"display_name"` + CreatedAt time.Time `json:"created_at"` +} + +// GetID returns the value of ID. +func (s *User) GetID() uuid.UUID { + return s.ID +} + +// GetUsername returns the value of Username. +func (s *User) GetUsername() string { + return s.Username +} + +// GetDisplayName returns the value of DisplayName. +func (s *User) GetDisplayName() string { + return s.DisplayName +} + +// GetCreatedAt returns the value of CreatedAt. +func (s *User) GetCreatedAt() time.Time { + return s.CreatedAt +} + +// SetID sets the value of ID. +func (s *User) SetID(val uuid.UUID) { + s.ID = val +} + +// SetUsername sets the value of Username. +func (s *User) SetUsername(val string) { + s.Username = val +} + +// SetDisplayName sets the value of DisplayName. +func (s *User) SetDisplayName(val string) { + s.DisplayName = val +} + +// SetCreatedAt sets the value of CreatedAt. +func (s *User) SetCreatedAt(val time.Time) { + s.CreatedAt = val +} + +// UserHeaders wraps User with response headers. +type UserHeaders struct { + XRequestID OptString + Response User +} + +// GetXRequestID returns the value of XRequestID. +func (s *UserHeaders) GetXRequestID() OptString { + return s.XRequestID +} + +// GetResponse returns the value of Response. +func (s *UserHeaders) GetResponse() User { + return s.Response +} + +// SetXRequestID sets the value of XRequestID. +func (s *UserHeaders) SetXRequestID(val OptString) { + s.XRequestID = val +} + +// SetResponse sets the value of Response. +func (s *UserHeaders) SetResponse(val User) { + s.Response = val +} + +func (*UserHeaders) currentUserRes() {} +func (*UserHeaders) registerUserRes() {} diff --git a/internal/transport/rest/oas/oas_security_gen.go b/internal/transport/rest/oas/oas_security_gen.go new file mode 100644 index 00000000..e00249b2 --- /dev/null +++ b/internal/transport/rest/oas/oas_security_gen.go @@ -0,0 +1,84 @@ +// Code generated by ogen, DO NOT EDIT. + +package oas + +import ( + "context" + "net/http" + "strings" + + "github.com/go-faster/errors" + "github.com/ogen-go/ogen/ogenerrors" +) + +// SecurityHandler is handler for security parameters. +type SecurityHandler interface { + // HandleDevUser handles devUser security. + // Только учебная lab1: существующий UUID. Не является + // аутентификацией. + HandleDevUser(ctx context.Context, operationName OperationName, t DevUser) (context.Context, error) +} + +func findAuthorization(h http.Header, prefix string) (string, bool) { + v, ok := h["Authorization"] + if !ok { + return "", false + } + for _, vv := range v { + scheme, value, ok := strings.Cut(vv, " ") + if !ok || !strings.EqualFold(scheme, prefix) { + continue + } + return value, true + } + return "", false +} + +// operationRolesDevUser is a private map storing roles per operation. +var operationRolesDevUser = map[string][]string{ + CreateChatOperation: []string{}, + CreateMessageOperation: []string{}, + CurrentUserOperation: []string{}, + GetChatOperation: []string{}, + ListChatsOperation: []string{}, + ListMessagesOperation: []string{}, +} + +// GetRolesForDevUser returns the required roles for the given operation. +// +// This is useful for authorization scenarios where you need to know which roles +// are required for an operation. +// +// Example: +// +// requiredRoles := GetRolesForDevUser(AddPetOperation) +// +// Returns nil if the operation has no role requirements or if the operation is unknown. +func GetRolesForDevUser(operation string) []string { + roles, ok := operationRolesDevUser[operation] + if !ok { + return nil + } + // Return a copy to prevent external modification + result := make([]string, len(roles)) + copy(result, roles) + return result +} + +func (s *Server) securityDevUser(ctx context.Context, operationName OperationName, req *http.Request) (context.Context, bool, error) { + var t DevUser + const parameterName = "X-User-Id" + value := req.Header.Get(parameterName) + if value == "" { + return ctx, false, nil + } + t.APIKey = value + t.Roles = operationRolesDevUser[operationName] + rctx, err := s.sec.HandleDevUser(ctx, operationName, t) + if errors.Is(err, ogenerrors.ErrSkipServerSecurity) { + return nil, false, nil + } else if err != nil { + return nil, false, err + } + return rctx, true, err +} diff --git a/internal/transport/rest/oas/oas_server_gen.go b/internal/transport/rest/oas/oas_server_gen.go new file mode 100644 index 00000000..2ac3bf86 --- /dev/null +++ b/internal/transport/rest/oas/oas_server_gen.go @@ -0,0 +1,86 @@ +// Code generated by ogen, DO NOT EDIT. + +package oas + +import ( + "context" +) + +// Handler handles operations described by OpenAPI v3 specification. +type Handler interface { + // CreateChat implements createChat operation. + // + // Создать чат; вызывающий должен входить в member_ids. + // + // POST /api/v1/chats + CreateChat(ctx context.Context, req *CreateChat) (CreateChatRes, error) + // CreateMessage implements createMessage operation. + // + // Отправить сообщение. + // + // POST /api/v1/chats/{chat_id}/messages + CreateMessage(ctx context.Context, req *CreateMessage, params CreateMessageParams) (CreateMessageRes, error) + // CurrentUser implements currentUser operation. + // + // Текущий пользователь. + // + // GET /api/v1/users/me + CurrentUser(ctx context.Context) (CurrentUserRes, error) + // GetChat implements getChat operation. + // + // Получить доступный чат. + // + // GET /api/v1/chats/{chat_id} + GetChat(ctx context.Context, params GetChatParams) (GetChatRes, error) + // ListChats implements listChats operation. + // + // Чаты текущего пользователя. + // + // GET /api/v1/chats + ListChats(ctx context.Context, params ListChatsParams) (ListChatsRes, error) + // ListMessages implements listMessages operation. + // + // Сообщения по (created_at, id) по возрастанию. + // + // GET /api/v1/chats/{chat_id}/messages + ListMessages(ctx context.Context, params ListMessagesParams) (ListMessagesRes, error) + // Liveness implements liveness operation. + // + // Процесс жив. + // + // GET /health/live + Liveness(ctx context.Context) (LivenessRes, error) + // Readiness implements readiness operation. + // + // Готов принимать трафик. + // + // GET /health/ready + Readiness(ctx context.Context) (ReadinessRes, error) + // RegisterUser implements registerUser operation. + // + // Создать пользователя. + // + // POST /api/v1/users + RegisterUser(ctx context.Context, req *CreateUser) (RegisterUserRes, error) +} + +// Server implements http server based on OpenAPI v3 specification and +// calls Handler to handle requests. +type Server struct { + h Handler + sec SecurityHandler + baseServer +} + +// NewServer creates new Server. +func NewServer(h Handler, sec SecurityHandler, opts ...ServerOption) (*Server, error) { + s, err := newServerConfig(opts...).baseServer() + if err != nil { + return nil, err + } + return &Server{ + h: h, + sec: sec, + baseServer: s, + }, nil +} diff --git a/internal/transport/rest/oas/oas_unimplemented_gen.go b/internal/transport/rest/oas/oas_unimplemented_gen.go new file mode 100644 index 00000000..c4903fce --- /dev/null +++ b/internal/transport/rest/oas/oas_unimplemented_gen.go @@ -0,0 +1,95 @@ +// Code generated by ogen, DO NOT EDIT. + +package oas + +import ( + "context" + + ht "github.com/ogen-go/ogen/http" +) + +// UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented. +type UnimplementedHandler struct{} + +var _ Handler = UnimplementedHandler{} + +// CreateChat implements createChat operation. +// +// Создать чат; вызывающий должен входить в member_ids. +// +// POST /api/v1/chats +func (UnimplementedHandler) CreateChat(ctx context.Context, req *CreateChat) (r CreateChatRes, _ error) { + return r, ht.ErrNotImplemented +} + +// CreateMessage implements createMessage operation. +// +// Отправить сообщение. +// +// POST /api/v1/chats/{chat_id}/messages +func (UnimplementedHandler) CreateMessage(ctx context.Context, req *CreateMessage, params CreateMessageParams) (r CreateMessageRes, _ error) { + return r, ht.ErrNotImplemented +} + +// CurrentUser implements currentUser operation. +// +// Текущий пользователь. +// +// GET /api/v1/users/me +func (UnimplementedHandler) CurrentUser(ctx context.Context) (r CurrentUserRes, _ error) { + return r, ht.ErrNotImplemented +} + +// GetChat implements getChat operation. +// +// Получить доступный чат. +// +// GET /api/v1/chats/{chat_id} +func (UnimplementedHandler) GetChat(ctx context.Context, params GetChatParams) (r GetChatRes, _ error) { + return r, ht.ErrNotImplemented +} + +// ListChats implements listChats operation. +// +// Чаты текущего пользователя. +// +// GET /api/v1/chats +func (UnimplementedHandler) ListChats(ctx context.Context, params ListChatsParams) (r ListChatsRes, _ error) { + return r, ht.ErrNotImplemented +} + +// ListMessages implements listMessages operation. +// +// Сообщения по (created_at, id) по возрастанию. +// +// GET /api/v1/chats/{chat_id}/messages +func (UnimplementedHandler) ListMessages(ctx context.Context, params ListMessagesParams) (r ListMessagesRes, _ error) { + return r, ht.ErrNotImplemented +} + +// Liveness implements liveness operation. +// +// Процесс жив. +// +// GET /health/live +func (UnimplementedHandler) Liveness(ctx context.Context) (r LivenessRes, _ error) { + return r, ht.ErrNotImplemented +} + +// Readiness implements readiness operation. +// +// Готов принимать трафик. +// +// GET /health/ready +func (UnimplementedHandler) Readiness(ctx context.Context) (r ReadinessRes, _ error) { + return r, ht.ErrNotImplemented +} + +// RegisterUser implements registerUser operation. +// +// Создать пользователя. +// +// POST /api/v1/users +func (UnimplementedHandler) RegisterUser(ctx context.Context, req *CreateUser) (r RegisterUserRes, _ error) { + return r, ht.ErrNotImplemented +} diff --git a/internal/transport/rest/oas/oas_validators_gen.go b/internal/transport/rest/oas/oas_validators_gen.go new file mode 100644 index 00000000..bc5ac737 --- /dev/null +++ b/internal/transport/rest/oas/oas_validators_gen.go @@ -0,0 +1,1332 @@ +// Code generated by ogen, DO NOT EDIT. + +package oas + +import ( + "fmt" + + "github.com/go-faster/errors" + "github.com/ogen-go/ogen/validate" +) + +func (s *Chat) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 100, + MaxLengthSet: true, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(s.Title)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "title", + Error: err, + }) + } + if err := func() error { + if s.MemberIds == nil { + return errors.New("nil is invalid value") + } + if err := (validate.Array{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 100, + MaxLengthSet: true, + }).ValidateLength(len(s.MemberIds)); err != nil { + return errors.Wrap(err, "array") + } + if err := validate.UniqueItems(s.MemberIds); err != nil { + return errors.Wrap(err, "array") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "member_ids", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s *ChatHeaders) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if value, ok := s.XRequestID.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "XRequestID", + Error: err, + }) + } + if err := func() error { + if err := s.Response.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "Response", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s *ChatPage) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if s.Items == nil { + return errors.New("nil is invalid value") + } + var failures []validate.FieldError + for i, elem := range s.Items { + if err := func() error { + if err := elem.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: fmt.Sprintf("[%d]", i), + Error: err, + }) + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "items", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s *ChatPageHeaders) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if value, ok := s.XRequestID.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "XRequestID", + Error: err, + }) + } + if err := func() error { + if err := s.Response.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "Response", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s *CreateChat) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 100, + MaxLengthSet: true, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(s.Title)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "title", + Error: err, + }) + } + if err := func() error { + if s.MemberIds == nil { + return errors.New("nil is invalid value") + } + if err := (validate.Array{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 100, + MaxLengthSet: true, + }).ValidateLength(len(s.MemberIds)); err != nil { + return errors.Wrap(err, "array") + } + if err := validate.UniqueItems(s.MemberIds); err != nil { + return errors.Wrap(err, "array") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "member_ids", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s *CreateChatBadRequest) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *CreateChatConflict) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *CreateChatInternalServerError) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *CreateChatNotFound) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *CreateChatServiceUnavailable) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *CreateMessage) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 4000, + MaxLengthSet: true, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(s.Text)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "text", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s *CreateMessageBadRequest) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *CreateMessageConflict) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *CreateMessageInternalServerError) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *CreateMessageNotFound) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *CreateMessageServiceUnavailable) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *CreateUser) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if err := (validate.String{ + MinLength: 0, + MinLengthSet: false, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: regexMap["^[a-z0-9_]{3,32}$"], + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(s.Username)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "username", + Error: err, + }) + } + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 100, + MaxLengthSet: true, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(s.DisplayName)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "display_name", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s *CurrentUserBadRequest) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *CurrentUserConflict) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *CurrentUserInternalServerError) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *CurrentUserNotFound) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *CurrentUserServiceUnavailable) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *Error) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if err := s.Error.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "error", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s *ErrorError) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if err := s.Code.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "code", + Error: err, + }) + } + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(s.Message)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "message", + Error: err, + }) + } + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(s.RequestID)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "request_id", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s ErrorErrorCode) Validate() error { + switch s { + case "invalid_request": + return nil + case "unauthorized": + return nil + case "not_found": + return nil + case "conflict": + return nil + case "payload_too_large": + return nil + case "unsupported_media_type": + return nil + case "rate_limited": + return nil + case "unavailable": + return nil + case "internal_error": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} + +func (s *ErrorHeaders) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if value, ok := s.XRequestID.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "XRequestID", + Error: err, + }) + } + if err := func() error { + if err := s.Response.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "Response", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s *GetChatBadRequest) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *GetChatConflict) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *GetChatInternalServerError) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *GetChatNotFound) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *GetChatServiceUnavailable) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *Health) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if err := s.Status.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "status", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s *HealthHeaders) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if value, ok := s.XRequestID.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "XRequestID", + Error: err, + }) + } + if err := func() error { + if err := s.Response.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "Response", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s HealthStatus) Validate() error { + switch s { + case "ok": + return nil + default: + return errors.Errorf("invalid value: %v", s) + } +} + +func (s *ListChatsBadRequest) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *ListChatsConflict) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *ListChatsInternalServerError) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *ListChatsNotFound) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *ListChatsServiceUnavailable) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *ListChatsTooManyRequestsHeaders) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if value, ok := s.RetryAfter.Get(); ok { + if err := func() error { + if err := (validate.Int{ + MinSet: true, + Min: 1, + MaxSet: false, + Max: 0, + MinExclusive: false, + MaxExclusive: false, + MultipleOfSet: false, + MultipleOf: 0, + Pattern: nil, + }).Validate(int64(value)); err != nil { + return errors.Wrap(err, "int") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "RetryAfter", + Error: err, + }) + } + if err := func() error { + if value, ok := s.XRequestID.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "XRequestID", + Error: err, + }) + } + if err := func() error { + if err := s.Response.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "Response", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s *ListChatsUnauthorizedHeaders) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if value, ok := s.XRequestID.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "XRequestID", + Error: err, + }) + } + if err := func() error { + if err := s.Response.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "Response", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s *ListMessagesBadRequest) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *ListMessagesConflict) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *ListMessagesInternalServerError) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *ListMessagesNotFound) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *ListMessagesServiceUnavailable) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *Message) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 4000, + MaxLengthSet: true, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(s.Text)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "text", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s *MessageHeaders) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if value, ok := s.XRequestID.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "XRequestID", + Error: err, + }) + } + if err := func() error { + if err := s.Response.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "Response", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s *MessagePage) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if s.Items == nil { + return errors.New("nil is invalid value") + } + var failures []validate.FieldError + for i, elem := range s.Items { + if err := func() error { + if err := elem.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: fmt.Sprintf("[%d]", i), + Error: err, + }) + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "items", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s *MessagePageHeaders) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if value, ok := s.XRequestID.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "XRequestID", + Error: err, + }) + } + if err := func() error { + if err := s.Response.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "Response", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s *ReadinessInternalServerError) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *ReadinessServiceUnavailable) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *RegisterUserBadRequest) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *RegisterUserConflict) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *RegisterUserInternalServerError) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *RegisterUserServiceUnavailable) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *User) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if err := (validate.String{ + MinLength: 0, + MinLengthSet: false, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: regexMap["^[a-z0-9_]{3,32}$"], + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(s.Username)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "username", + Error: err, + }) + } + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 100, + MaxLengthSet: true, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(s.DisplayName)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "display_name", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s *UserHeaders) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if value, ok := s.XRequestID.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "XRequestID", + Error: err, + }) + } + if err := func() error { + if err := s.Response.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "Response", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} diff --git a/internal/transport/rest/requestid.go b/internal/transport/rest/requestid.go new file mode 100644 index 00000000..05bec608 --- /dev/null +++ b/internal/transport/rest/requestid.go @@ -0,0 +1,35 @@ +package rest + +import ( + "context" + "net/http" + + "github.com/google/uuid" +) + +const requestIDHeader = "X-Request-ID" + +type requestIDKey struct{} + +func requestIDFromContext(ctx context.Context) string { + id, _ := ctx.Value(requestIDKey{}).(string) + + return id +} + +func withRequestID(ctx context.Context, id string) context.Context { + return context.WithValue(ctx, requestIDKey{}, id) +} + +func requestIDMiddleware(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + id := r.Header.Get(requestIDHeader) + if id == "" { + id = uuid.NewString() + } + + w.Header().Set(requestIDHeader, id) + + next.ServeHTTP(w, r.WithContext(withRequestID(r.Context(), id))) + }) +} diff --git a/internal/transport/rest/router.go b/internal/transport/rest/router.go new file mode 100644 index 00000000..aa58ea75 --- /dev/null +++ b/internal/transport/rest/router.go @@ -0,0 +1,28 @@ +package rest + +import ( + "log/slog" + "net/http" + + "mtusi-messenger/internal/transport/rest/oas" +) + +func NewRouter( + handler oas.Handler, + security oas.SecurityHandler, + log *slog.Logger, +) (http.Handler, error) { + server, err := oas.NewServer( + handler, + security, + oas.WithErrorHandler(newErrorHandler(log)), + oas.WithNotFound(newNotFoundHandler(log)), + oas.WithMethodNotAllowed(newMethodNotAllowedHandler(log)), + oas.WithMiddleware(loggingMiddleware(log)), + ) + if err != nil { + return nil, err + } + + return requestIDMiddleware(server), nil +} diff --git a/internal/transport/rest/router_test.go b/internal/transport/rest/router_test.go new file mode 100644 index 00000000..cb84ae86 --- /dev/null +++ b/internal/transport/rest/router_test.go @@ -0,0 +1,643 @@ +package rest + +import ( + "bytes" + "encoding/json" + "io" + "log/slog" + "net/http" + "net/http/httptest" + "net/url" + "strings" + "testing" + + "github.com/stretchr/testify/suite" + + "mtusi-messenger/internal/logger" + "mtusi-messenger/internal/service/chat" + "mtusi-messenger/internal/service/message" + "mtusi-messenger/internal/service/user" + "mtusi-messenger/internal/storage/memory" +) + +const userIDHeader = "X-User-Id" + +type response struct { + status int + header http.Header + body []byte +} + +type RouterSuite struct { + suite.Suite + + sink *strings.Builder + log *slog.Logger + server *httptest.Server +} + +func TestRouterSuite(t *testing.T) { + t.Parallel() + suite.Run(t, new(RouterSuite)) +} + +func (s *RouterSuite) SetupTest() { + s.sink = &strings.Builder{} + s.log = logger.New(logger.WithWriter(s.sink), logger.WithLevel(slog.LevelDebug)) + + store := memory.NewStore() + userService := user.NewService(store.Users()) + + router, err := NewRouter( + NewHandler( + userService, + chat.NewService(store.Chats()), + message.NewService(store.Messages()), + ), + NewSecurityHandler(userService), + s.log, + ) + s.Require().NoError(err) + + s.server = httptest.NewServer(router) +} + +func (s *RouterSuite) TearDownTest() { + s.server.Close() +} + +func (s *RouterSuite) do(method, path string, headers map[string]string) response { + s.T().Helper() + + return s.send(method, path, nil, headers) +} + +func (s *RouterSuite) send(method, path string, body any, headers map[string]string) response { + s.T().Helper() + + if body == nil { + return s.sendRaw(method, path, nil, headers) + } + + raw, err := json.Marshal(body) + s.Require().NoError(err) + + return s.sendRaw(method, path, raw, headers) +} + +func (s *RouterSuite) sendRaw(method, path string, body []byte, headers map[string]string) response { + s.T().Helper() + + var reader io.Reader + if body != nil { + reader = bytes.NewReader(body) + } + + req, err := http.NewRequestWithContext(s.T().Context(), method, s.server.URL+path, reader) + s.Require().NoError(err) + + if body != nil { + req.Header.Set("Content-Type", "application/json") + } + + for key, value := range headers { + req.Header.Set(key, value) + } + + resp, err := s.server.Client().Do(req) + s.Require().NoError(err) + + defer func() { _ = resp.Body.Close() }() + + payload, err := io.ReadAll(resp.Body) + s.Require().NoError(err) + + return response{status: resp.StatusCode, header: resp.Header, body: payload} +} + +func (s *RouterSuite) records() []map[string]any { + s.T().Helper() + + var out []map[string]any + + for line := range strings.SplitSeq(strings.TrimSpace(s.sink.String()), "\n") { + if line == "" { + continue + } + + var record map[string]any + s.Require().NoError(json.Unmarshal([]byte(line), &record)) + + out = append(out, record) + } + + return out +} + +func (s *RouterSuite) lastRecord() map[string]any { + s.T().Helper() + + records := s.records() + s.Require().NotEmpty(records) + + return records[len(records)-1] +} + +func (s *RouterSuite) decodeError(resp response) map[string]any { + s.T().Helper() + + var body struct { + Error map[string]any `json:"error"` + } + + s.Require().NoError(json.Unmarshal(resp.body, &body)) + s.Require().NotEmpty(body.Error) + + return body.Error +} + +func (s *RouterSuite) decode(resp response) map[string]any { + s.T().Helper() + + var body map[string]any + s.Require().NoError(json.Unmarshal(resp.body, &body)) + + return body +} + +func (s *RouterSuite) register(username string) map[string]any { + s.T().Helper() + + resp := s.send(http.MethodPost, "/api/v1/users", map[string]string{ + "username": username, + "display_name": "Пользователь " + username, + }, nil) + s.Require().Equal(http.StatusCreated, resp.status, string(resp.body)) + + return s.decode(resp) +} + +func (s *RouterSuite) actor(user map[string]any) map[string]string { + s.T().Helper() + + id, ok := user["id"].(string) + s.Require().True(ok) + + return map[string]string{userIDHeader: id} +} + +func (s *RouterSuite) createChat(owner map[string]any, members ...string) map[string]any { + s.T().Helper() + + resp := s.send(http.MethodPost, "/api/v1/chats", map[string]any{ + "title": "Контрактный чат", + "member_ids": members, + }, s.actor(owner)) + s.Require().Equal(http.StatusCreated, resp.status, string(resp.body)) + + return s.decode(resp) +} + +func (s *RouterSuite) id(object map[string]any) string { + s.T().Helper() + + value, ok := object["id"].(string) + s.Require().True(ok) + + return value +} + +func (s *RouterSuite) TestHealthLive() { + resp := s.do(http.MethodGet, "/health/live", nil) + + s.Equal(http.StatusOK, resp.status) + s.NotEmpty(resp.header.Get(requestIDHeader)) + s.JSONEq(`{"status":"ok"}`, string(resp.body)) +} + +func (s *RouterSuite) TestHealthReady() { + resp := s.do(http.MethodGet, "/health/ready", nil) + + s.Equal(http.StatusOK, resp.status) + s.NotEmpty(resp.header.Get(requestIDHeader)) + s.JSONEq(`{"status":"ok"}`, string(resp.body)) +} + +func (s *RouterSuite) TestRequestIDEchoedFromClient() { + resp := s.do(http.MethodGet, "/health/live", map[string]string{ + requestIDHeader: "from-client", + }) + + s.Equal("from-client", resp.header.Get(requestIDHeader)) +} + +func (s *RouterSuite) TestUnauthorizedIsLoggedWithoutStacktrace() { + resp := s.do(http.MethodGet, "/api/v1/chats", nil) + + s.Equal(http.StatusUnauthorized, resp.status) + + body := s.decodeError(resp) + s.Equal("unauthorized", body["code"]) + s.Equal(resp.header.Get(requestIDHeader), body["request_id"]) + s.NotEmpty(body["message"]) + + record := s.lastRecord() + s.Equal("request rejected", record["msg"]) + s.Equal("warn", record["level"]) + s.InEpsilon(float64(http.StatusUnauthorized), record["status"], 0.0001) + s.NotEmpty(record["request_id"]) + s.NotContains(record, "stacktrace", "ожидаемый отказ не должен печатать стек") +} + +func (s *RouterSuite) TestNotFoundReturnsContractError() { + resp := s.do(http.MethodGet, "/nope", nil) + + s.Equal(http.StatusNotFound, resp.status) + s.Equal("application/json; charset=utf-8", resp.header.Get("Content-Type")) + + body := s.decodeError(resp) + s.Equal("not_found", body["code"]) + s.Equal(resp.header.Get(requestIDHeader), body["request_id"]) + + record := s.lastRecord() + s.Equal("request rejected", record["msg"]) + s.Equal("warn", record["level"]) + s.InEpsilon(float64(http.StatusNotFound), record["status"], 0.0001) +} + +func (s *RouterSuite) TestMethodNotAllowedReturnsContractError() { + resp := s.do(http.MethodDelete, "/health/live", nil) + + s.Equal(http.StatusMethodNotAllowed, resp.status) + s.Equal(http.MethodGet, resp.header.Get("Allow")) + + body := s.decodeError(resp) + s.Equal("invalid_request", body["code"]) + + record := s.lastRecord() + s.Equal("request rejected", record["msg"]) + s.InEpsilon(float64(http.StatusMethodNotAllowed), record["status"], 0.0001) +} + +func (s *RouterSuite) TestMalformedUserIDIsRejected() { + resp := s.do(http.MethodGet, "/api/v1/chats", map[string]string{ + userIDHeader: "not-a-uuid", + }) + + s.Equal(http.StatusUnauthorized, resp.status) + s.Equal("unauthorized", s.decodeError(resp)["code"]) +} + +func (s *RouterSuite) TestUnknownUserIDIsRejected() { + resp := s.do(http.MethodGet, "/api/v1/chats", map[string]string{ + userIDHeader: "11111111-1111-4111-8111-111111111111", + }) + + s.Equal(http.StatusUnauthorized, resp.status, + "неизвестный пользователь не проходит идентификацию lab1") +} + +func (s *RouterSuite) TestRegisterUserReturnsContractShape() { + resp := s.send(http.MethodPost, "/api/v1/users", map[string]string{ + "username": "alice", + "display_name": "Алиса", + }, nil) + + s.Require().Equal(http.StatusCreated, resp.status) + + body := s.decode(resp) + s.Equal("alice", body["username"]) + s.Equal("Алиса", body["display_name"]) + s.NotEmpty(body["id"]) + s.NotEmpty(body["created_at"]) + s.Len(body, 4, "User не содержит лишних полей") +} + +func (s *RouterSuite) TestDuplicateUsernameConflicts() { + s.register("alice") + + resp := s.send(http.MethodPost, "/api/v1/users", map[string]string{ + "username": "alice", + "display_name": "Другая Алиса", + }, nil) + + s.Equal(http.StatusConflict, resp.status) + s.Equal("conflict", s.decodeError(resp)["code"]) +} + +func (s *RouterSuite) TestRegisterRejectsInvalidPayload() { + tests := map[string]map[string]string{ + "username в верхнем регистре": {"username": "Alice", "display_name": "Алиса"}, + "слишком короткий username": {"username": "ab", "display_name": "Алиса"}, + "пробельный display_name": {"username": "alice", "display_name": " "}, + } + + for name, payload := range tests { + s.Run(name, func() { + resp := s.send(http.MethodPost, "/api/v1/users", payload, nil) + + s.Equal(http.StatusBadRequest, resp.status) + s.Equal("invalid_request", s.decodeError(resp)["code"]) + }) + } +} + +// Контракт: "JSON с лишними полями или неверными типами — 400; malformed JSON также 400". +// Проверку выполняет сгенерированный слой, поэтому тест фиксирует границу, а не домен. +func (s *RouterSuite) TestRegisterRejectsMalformedBody() { + tests := map[string]string{ + "лишнее поле": `{"username":"alice","display_name":"Алиса","is_admin":true}`, + "неверный тип": `{"username":"alice","display_name":42}`, + "битый json": `{"username":"alice",`, + "не объект": `"alice"`, + "пропущено поле": `{"username":"alice"}`, + } + + for name, body := range tests { + s.Run(name, func() { + resp := s.sendRaw(http.MethodPost, "/api/v1/users", []byte(body), nil) + + s.Equal(http.StatusBadRequest, resp.status) + s.Equal("invalid_request", s.decodeError(resp)["code"]) + }) + } +} + +func (s *RouterSuite) TestCurrentUser() { + alice := s.register("alice") + + resp := s.do(http.MethodGet, "/api/v1/users/me", s.actor(alice)) + + s.Require().Equal(http.StatusOK, resp.status) + s.Equal(alice, s.decode(resp)) +} + +func (s *RouterSuite) TestCreateChatRequiresCallerAsMember() { + alice := s.register("alice") + bob := s.register("bob") + + resp := s.send(http.MethodPost, "/api/v1/chats", map[string]any{ + "title": "Без создателя", + "member_ids": []string{s.id(bob)}, + }, s.actor(alice)) + + s.Equal(http.StatusBadRequest, resp.status) + s.Equal("invalid_request", s.decodeError(resp)["code"]) +} + +func (s *RouterSuite) TestCreateChatRejectsUnknownMember() { + alice := s.register("alice") + + resp := s.send(http.MethodPost, "/api/v1/chats", map[string]any{ + "title": "Неизвестный участник", + "member_ids": []string{s.id(alice), "11111111-1111-4111-8111-111111111111"}, + }, s.actor(alice)) + + s.Equal(http.StatusBadRequest, resp.status) +} + +func (s *RouterSuite) TestCreateChatRejectsDuplicateMembers() { + alice := s.register("alice") + + resp := s.send(http.MethodPost, "/api/v1/chats", map[string]any{ + "title": "Дубликаты", + "member_ids": []string{s.id(alice), s.id(alice)}, + }, s.actor(alice)) + + s.Equal(http.StatusBadRequest, resp.status) +} + +func (s *RouterSuite) TestChatIsHiddenFromOutsider() { + alice := s.register("alice") + bob := s.register("bob") + eve := s.register("eve") + + chat := s.createChat(alice, s.id(alice), s.id(bob)) + + resp := s.do(http.MethodGet, "/api/v1/chats/"+s.id(chat), s.actor(eve)) + s.Equal(http.StatusNotFound, resp.status, "посторонний получает 404, а не 403") + + resp = s.do(http.MethodGet, "/api/v1/chats/"+s.id(chat), s.actor(bob)) + s.Equal(http.StatusOK, resp.status, "участник читает чат") +} + +func (s *RouterSuite) TestListChatsShowsOnlyVisibleChats() { + alice := s.register("alice") + bob := s.register("bob") + eve := s.register("eve") + + chat := s.createChat(alice, s.id(alice), s.id(bob)) + + resp := s.do(http.MethodGet, "/api/v1/chats", s.actor(bob)) + s.Require().Equal(http.StatusOK, resp.status) + + body := s.decode(resp) + items, ok := body["items"].([]any) + s.Require().True(ok) + s.Require().Len(items, 1) + s.Nil(body["next_cursor"]) + + first, ok := items[0].(map[string]any) + s.Require().True(ok) + s.Equal(s.id(chat), first["id"]) + + resp = s.do(http.MethodGet, "/api/v1/chats", s.actor(eve)) + s.Require().Equal(http.StatusOK, resp.status) + + body = s.decode(resp) + items, ok = body["items"].([]any) + s.Require().True(ok) + s.Empty(items, "чужой чат не попадает в список") +} + +func (s *RouterSuite) TestSenderIsDerivedFromIdentity() { + alice := s.register("alice") + bob := s.register("bob") + chat := s.createChat(alice, s.id(alice), s.id(bob)) + + resp := s.send(http.MethodPost, "/api/v1/chats/"+s.id(chat)+"/messages", map[string]any{ + "text": "Привет, мир 👋", + "sender_id": s.id(bob), + }, s.actor(alice)) + + s.Equal(http.StatusBadRequest, resp.status, "sender_id в запросе не принимается") + + resp = s.send(http.MethodPost, "/api/v1/chats/"+s.id(chat)+"/messages", map[string]any{ + "text": "Привет, мир 👋", + }, s.actor(alice)) + + s.Require().Equal(http.StatusCreated, resp.status) + + body := s.decode(resp) + s.Equal(s.id(alice), body["sender_id"]) + s.Equal(s.id(chat), body["chat_id"]) + s.Equal("Привет, мир 👋", body["text"]) +} + +func (s *RouterSuite) TestMessageTextValidation() { + alice := s.register("alice") + chat := s.createChat(alice, s.id(alice)) + path := "/api/v1/chats/" + s.id(chat) + "/messages" + + tests := map[string]string{ + "пустой текст": "", + "пробельный текст": " ", + "слишком длинный": strings.Repeat("я", 4001), + } + + for name, text := range tests { + s.Run(name, func() { + resp := s.send(http.MethodPost, path, map[string]any{"text": text}, s.actor(alice)) + + s.Equal(http.StatusBadRequest, resp.status) + s.Equal("invalid_request", s.decodeError(resp)["code"]) + }) + } +} + +func (s *RouterSuite) TestOutsiderCannotUseChat() { + alice := s.register("alice") + eve := s.register("eve") + chat := s.createChat(alice, s.id(alice)) + path := "/api/v1/chats/" + s.id(chat) + "/messages" + + resp := s.send(http.MethodPost, path, map[string]any{"text": "чужое"}, s.actor(eve)) + s.Equal(http.StatusNotFound, resp.status) + + resp = s.do(http.MethodGet, path, s.actor(eve)) + s.Equal(http.StatusNotFound, resp.status) +} + +func (s *RouterSuite) TestHistoryPaginationDoesNotRepeatItems() { + alice := s.register("alice") + chat := s.createChat(alice, s.id(alice)) + path := "/api/v1/chats/" + s.id(chat) + "/messages" + + const total = 5 + + for range total { + resp := s.send(http.MethodPost, path, map[string]any{"text": "сообщение"}, s.actor(alice)) + s.Require().Equal(http.StatusCreated, resp.status) + } + + seen := make(map[string]struct{}, total) + cursor := "" + + for { + query := path + "?limit=2" + if cursor != "" { + query += "&cursor=" + url.QueryEscape(cursor) + } + + resp := s.do(http.MethodGet, query, s.actor(alice)) + s.Require().Equal(http.StatusOK, resp.status) + + body := s.decode(resp) + items, ok := body["items"].([]any) + s.Require().True(ok) + + for _, item := range items { + message, ok := item.(map[string]any) + s.Require().True(ok) + + id, ok := message["id"].(string) + s.Require().True(ok) + + _, duplicate := seen[id] + s.Require().False(duplicate, "страницы не повторяют сообщения") + seen[id] = struct{}{} + } + + next, ok := body["next_cursor"].(string) + if !ok { + s.Nil(body["next_cursor"]) + + break + } + + cursor = next + } + + s.Len(seen, total) +} + +func (s *RouterSuite) TestCursorFromAnotherChatIsRejected() { + alice := s.register("alice") + first := s.createChat(alice, s.id(alice)) + second := s.createChat(alice, s.id(alice)) + + firstPath := "/api/v1/chats/" + s.id(first) + "/messages" + + for range 2 { + resp := s.send(http.MethodPost, firstPath, map[string]any{"text": "сообщение"}, s.actor(alice)) + s.Require().Equal(http.StatusCreated, resp.status) + } + + resp := s.do(http.MethodGet, firstPath+"?limit=1", s.actor(alice)) + s.Require().Equal(http.StatusOK, resp.status) + + cursor, ok := s.decode(resp)["next_cursor"].(string) + s.Require().True(ok) + + resp = s.do( + http.MethodGet, + "/api/v1/chats/"+s.id(second)+"/messages?cursor="+url.QueryEscape(cursor), + s.actor(alice), + ) + + s.Equal(http.StatusBadRequest, resp.status, "cursor привязан к чату") + s.Equal("invalid_request", s.decodeError(resp)["code"]) +} + +func (s *RouterSuite) TestInvalidCursorIsRejected() { + alice := s.register("alice") + chat := s.createChat(alice, s.id(alice)) + + resp := s.do( + http.MethodGet, + "/api/v1/chats/"+s.id(chat)+"/messages?cursor=not-a-cursor", + s.actor(alice), + ) + + s.Equal(http.StatusBadRequest, resp.status) +} + +func (s *RouterSuite) TestLimitOutOfRangeIsRejected() { + alice := s.register("alice") + chat := s.createChat(alice, s.id(alice)) + + for _, limit := range []string{"0", "101"} { + resp := s.do( + http.MethodGet, + "/api/v1/chats/"+s.id(chat)+"/messages?limit="+limit, + s.actor(alice), + ) + + s.Equal(http.StatusBadRequest, resp.status) + } +} + +func (s *RouterSuite) TestEmptyHistoryReturnsEmptyItems() { + alice := s.register("alice") + chat := s.createChat(alice, s.id(alice)) + + resp := s.do(http.MethodGet, "/api/v1/chats/"+s.id(chat)+"/messages", s.actor(alice)) + + s.Require().Equal(http.StatusOK, resp.status) + s.JSONEq(`{"items":[],"next_cursor":null}`, string(resp.body)) +} + +func (s *RouterSuite) TestSuccessfulRequestIsLogged() { + alice := s.register("alice") + + s.sink.Reset() + + resp := s.do(http.MethodGet, "/api/v1/users/me", s.actor(alice)) + s.Require().Equal(http.StatusOK, resp.status) + + records := s.records() + s.Require().Len(records, 2) + s.Equal("request accepted", records[0]["msg"]) + s.Equal("request handled", records[1]["msg"]) + s.NotEmpty(records[1]["duration"]) +} diff --git a/internal/transport/rest/security.go b/internal/transport/rest/security.go new file mode 100644 index 00000000..709712ec --- /dev/null +++ b/internal/transport/rest/security.go @@ -0,0 +1,56 @@ +package rest + +import ( + "context" + "errors" + + "github.com/google/uuid" + + "mtusi-messenger/internal/domain" + "mtusi-messenger/internal/transport/rest/oas" +) + +var ErrUnauthenticated = errors.New("caller is not identified") + +type callerKey struct{} + +func CallerFromContext(ctx context.Context) (uuid.UUID, bool) { + id, ok := ctx.Value(callerKey{}).(uuid.UUID) + + return id, ok +} + +func caller(ctx context.Context) uuid.UUID { + id, _ := CallerFromContext(ctx) + + return id +} + +type UserLookup interface { + GetByID(ctx context.Context, id uuid.UUID) (domain.User, error) +} + +type SecurityHandler struct { + users UserLookup +} + +func NewSecurityHandler(users UserLookup) *SecurityHandler { + return &SecurityHandler{users: users} +} + +func (h *SecurityHandler) HandleDevUser( + ctx context.Context, + _ oas.OperationName, + t oas.DevUser, +) (context.Context, error) { + id, err := uuid.Parse(t.APIKey) + if err != nil { + return ctx, ErrUnauthenticated + } + + if _, err := h.users.GetByID(ctx, id); err != nil { + return ctx, ErrUnauthenticated + } + + return context.WithValue(ctx, callerKey{}, id), nil +} diff --git a/scripts/memory_experiment.py b/scripts/memory_experiment.py new file mode 100644 index 00000000..6e370cc9 --- /dev/null +++ b/scripts/memory_experiment.py @@ -0,0 +1,271 @@ +import argparse +import json +import os +import subprocess +import threading +import time +import urllib.error +import urllib.request +import uuid + +import matplotlib + +matplotlib.use("Agg") +import matplotlib.pyplot as plt + + +def request(base_url, method, path, body=None, user_id=None): + payload = json.dumps(body, ensure_ascii=False).encode() if body is not None else None + headers = {"Content-Type": "application/json"} if payload else {} + if user_id: + headers["X-User-Id"] = user_id + request = urllib.request.Request( + base_url + path, + data=payload, + headers=headers, + method=method, + ) + with urllib.request.urlopen(request, timeout=3) as response: + return json.loads(response.read()) + + +def wait_ready(base_url): + deadline = time.monotonic() + 20 + while time.monotonic() < deadline: + try: + request(base_url, "GET", "/health/live") + return + except OSError: + time.sleep(0.1) + raise RuntimeError("container did not become ready") + + +def process_alive(container): + result = subprocess.run( + ["docker", "inspect", "--format", "{{.State.Running}}", container], + capture_output=True, + text=True, + check=False, + ) + return result.stdout.strip() == "true" + + +def sample_stats(container, samples, stop): + while not stop.is_set(): + result = subprocess.run( + ["docker", "stats", "--no-stream", "--format", "{{json .}}", container], + capture_output=True, + text=True, + check=False, + ) + if result.returncode == 0 and result.stdout.strip(): + try: + value = json.loads(result.stdout) + memory = value.get("MemUsage", "").split("/")[0].strip() + if memory == "0B" or not process_alive(container): + continue + samples.append({ + "time_seconds": time.monotonic(), + "memory": memory, + "memory_mib": parse_memory(memory), + }) + except (ValueError, IndexError): + pass + stop.wait(0.1) + + +def parse_memory(value): + units = {"B": 1 / 1024 / 1024, "KiB": 1 / 1024, "MiB": 1, "GiB": 1024} + for unit, factor in sorted(units.items(), key=lambda item: -len(item[0])): + if value.endswith(unit): + return float(value[:-len(unit)].strip()) * factor + raise ValueError(value) + + +def make_plot(data, output): + samples = [sample for sample in data["memory_samples"] if sample["memory_mib"] > 0] + start = samples[0]["time_seconds"] if samples else 0 + x = [sample["time_seconds"] - start for sample in samples] + memory = [sample["memory_mib"] for sample in samples] + + fig, memory_axis = plt.subplots(figsize=(11, 6)) + memory_axis.plot(x, memory, color="tab:red", label="RSS / container memory") + memory_axis.axhline(data["memory_limit_mib"], color="black", linestyle="--", label="memory limit") + memory_axis.set_xlabel("Time, seconds") + memory_axis.set_ylabel("Memory, MiB") + memory_axis.grid(True, alpha=0.25) + + message_axis = memory_axis.twinx() + message_axis.plot( + data["message_points_x"], + data["message_points_y"], + color="tab:blue", + label="successful messages", + ) + message_axis.set_ylabel("Successful messages") + + lines, labels = memory_axis.get_legend_handles_labels() + other_lines, other_labels = message_axis.get_legend_handles_labels() + memory_axis.legend(lines + other_lines, labels + other_labels, loc="upper left") + memory_axis.set_title("In-memory messenger: memory exhaustion point") + if data["oom_killed"] and data["failure_time_seconds"] is not None: + memory_axis.axvline( + data["failure_time_seconds"], + color="tab:purple", + linestyle=":", + label="container OOMKilled", + ) + memory_axis.annotate( + "OOMKilled", + (data["failure_time_seconds"], data["memory_limit_mib"]), + xytext=(8, -18), + textcoords="offset points", + color="tab:purple", + ) + fig.tight_layout() + fig.savefig(output, dpi=160) + plt.close(fig) + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument("--image", required=True) + parser.add_argument("--memory", default="32m") + parser.add_argument("--output", default="evidence/memory-experiment.json") + parser.add_argument("--plot", default="evidence/memory-experiment.png") + parser.add_argument("--max-messages", type=int, default=100000) + args = parser.parse_args() + + container = "mtusi-memory-experiment-" + uuid.uuid4().hex[:8] + port = 18081 + base_url = f"http://127.0.0.1:{port}" + subprocess.run( + [ + "docker", "run", "-d", "--name", container, + "--memory", args.memory, "--memory-swap", args.memory, + "-p", f"127.0.0.1:{port}:8080", args.image, + ], + check=True, + capture_output=True, + text=True, + ) + + samples = [] + stop_sampling = threading.Event() + sampler = threading.Thread(target=sample_stats, args=(container, samples, stop_sampling)) + successful = 0 + failures = 0 + fatal_error = None + started = time.monotonic() + message_points_x = [] + message_points_y = [] + failure_time = None + oom_killed = False + last_error = None + last_state = {} + logs = "" + + try: + wait_ready(base_url) + user = request(base_url, "POST", "/api/v1/users", { + "username": "memory_" + uuid.uuid4().hex[:16], + "display_name": "Memory experiment", + }) + chat = request(base_url, "POST", "/api/v1/chats", { + "title": "Memory experiment", + "member_ids": [user["id"]], + }, user["id"]) + sampler.start() + time.sleep(0.5) + + body = "x" * 4000 + for index in range(args.max_messages): + try: + request( + base_url, + "POST", + f"/api/v1/chats/{chat['id']}/messages", + {"text": body}, + user["id"], + ) + successful += 1 + message_points_x.append(time.monotonic() - started) + message_points_y.append(successful) + except (OSError, urllib.error.HTTPError, ValueError) as exc: + last_error = type(exc).__name__ + ": " + str(exc) + failures += 1 + failure_time = time.monotonic() - started + break + + time.sleep(0.5) + if not process_alive(container): + failure_time = failure_time or (time.monotonic() - started) + inspect = subprocess.run( + ["docker", "inspect", "--format", "{{json .State}}", container], + capture_output=True, + text=True, + check=False, + ) + state = json.loads(inspect.stdout) if inspect.stdout.strip() else {} + if not state: + state_result = subprocess.run( + ["docker", "inspect", "--format", "{{json .State}}", container], + capture_output=True, + text=True, + check=False, + ) + state = json.loads(state_result.stdout) if state_result.stdout.strip() else {} + last_state = state + logs_result = subprocess.run(["docker", "logs", container], capture_output=True, text=True, check=False) + logs = logs_result.stdout + logs_result.stderr + oom_killed = bool(state.get("OOMKilled")) + if failure_time is None and failures: + failure_time = time.monotonic() - started + except Exception as exc: + fatal_error = type(exc).__name__ + ": " + str(exc) + failure_time = failure_time or (time.monotonic() - started) + finally: + stop_sampling.set() + if sampler.is_alive(): + sampler.join(timeout=2) + + memory_limit_mib = float(args.memory.rstrip("mM")) if args.memory.lower().endswith("m") else 0 + if not oom_killed: + inspect = subprocess.run( + ["docker", "inspect", "--format", "{{json .State}}", container], + capture_output=True, + text=True, + check=False, + ) + state = json.loads(inspect.stdout) if inspect.stdout.strip() else {} + last_state = state + oom_killed = bool(state.get("OOMKilled")) + + result = { + "image": args.image, + "memory_limit": args.memory, + "memory_limit_mib": memory_limit_mib, + "successful_messages": successful, + "failed_requests": failures, + "oom_killed": oom_killed, + "last_error": last_error, + "fatal_error": fatal_error, + "container_state": last_state, + "container_logs_tail": logs[-20000:], + "failure_time_seconds": failure_time, + "memory_samples": samples, + "message_points_x": message_points_x, + "message_points_y": message_points_y, + "reason": "process stopped after the container memory limit was reached" if oom_killed else "request processing did not reach the memory limit", + } + with open(args.output, "w", encoding="utf-8") as output: + json.dump(result, output, ensure_ascii=False, indent=2) + make_plot(result, args.plot) + print(json.dumps({key: result[key] for key in ( + "memory_limit", "successful_messages", "failed_requests", "oom_killed", "failure_time_seconds", "reason", + )}, ensure_ascii=False, indent=2)) + subprocess.run(["docker", "rm", "-f", container], capture_output=True, check=False) + + +if __name__ == "__main__": + main() diff --git a/scripts/track1_benchmark.py b/scripts/track1_benchmark.py new file mode 100644 index 00000000..8d602979 --- /dev/null +++ b/scripts/track1_benchmark.py @@ -0,0 +1,267 @@ +import argparse +import concurrent.futures +import json +import os +from pathlib import Path +import signal +import socket +import subprocess +import tempfile +import threading +import time +import urllib.error +import urllib.request +import uuid + + +ROOT = Path(__file__).resolve().parents[1] +FAST_PATH = """\tif len(history) == 0 || compareKeyset( +\t\thistory[len(history)-1].CreatedAt, +\t\thistory[len(history)-1].ID, +\t\tmessage.CreatedAt, +\t\tmessage.ID, +\t) < 0 { +\t\ts.messagesByChat[message.ChatID] = append(history, message) + +\t\treturn message, nil +\t} + +""" + + +def request(opener, base, method, path, body=None, user=None): + data = json.dumps(body, ensure_ascii=False).encode() if body is not None else None + headers = {} + if data is not None: + headers["Content-Type"] = "application/json" + if user is not None: + headers["X-User-Id"] = user + req = urllib.request.Request(base + path, data=data, headers=headers, method=method) + with opener.open(req, timeout=10) as response: + return json.loads(response.read()) + + +def available_port(): + with socket.socket() as listener: + listener.bind(("127.0.0.1", 0)) + return listener.getsockname()[1] + + +def descendants(root_pid): + result = subprocess.run( + ["ps", "-axo", "pid=,ppid=,rss=,command="], + capture_output=True, + text=True, + check=True, + ) + entries = [] + for line in result.stdout.splitlines(): + fields = line.strip().split(None, 3) + if len(fields) == 4: + try: + entries.append((int(fields[0]), int(fields[1]), int(fields[2]), fields[3])) + except ValueError: + continue + children = {root_pid} + while True: + discovered = children | {pid for pid, ppid, _, _ in entries if ppid in children} + if discovered == children: + break + children = discovered + return [entry for entry in entries if entry[0] in children and entry[0] != root_pid] + + +def server_rss_kib(go_run_pid): + servers = [rss for _, _, rss, command in descendants(go_run_pid) if command.rstrip().endswith("/messenger")] + if not servers: + raise RuntimeError("go run server process was not found") + return max(servers) + + +def wait_ready(process, opener, base): + deadline = time.monotonic() + 60 + while time.monotonic() < deadline: + if process.poll() is not None: + raise RuntimeError(f"go run exited with code {process.returncode}") + try: + request(opener, base, "GET", "/health/live") + server_rss_kib(process.pid) + return + except (OSError, RuntimeError): + time.sleep(0.1) + raise RuntimeError("go run server did not become ready") + + +def percentile(latencies, fraction): + ordered = sorted(latencies) + index = max(0, min(len(ordered) - 1, (len(ordered) * int(fraction * 100) + 99) // 100 - 1)) + return round(ordered[index] * 1000, 3) + + +def setup(opener, base, history): + users = [] + for _ in range(10): + user = request(opener, base, "POST", "/api/v1/users", { + "username": "b" + uuid.uuid4().hex[:20], + "display_name": "Benchmark", + }) + users.append(user) + + chat = request(opener, base, "POST", "/api/v1/chats", { + "title": "Benchmark", + "member_ids": [user["id"] for user in users], + }, users[0]["id"]) + + for index in range(history): + request(opener, base, "POST", f"/api/v1/chats/{chat['id']}/messages", { + "text": f"history-{index}", + }, users[index % len(users)]["id"]) + + return chat, users + + +def launch(mode, port, overlay): + command = ["go", "run"] + if mode == "baseline": + command.extend(["-overlay", str(overlay)]) + command.append("./cmd/messenger") + process = subprocess.Popen( + command, + cwd=ROOT, + env={**os.environ, "APP_HOST": "127.0.0.1", "APP_PORT": str(port)}, + stdout=subprocess.DEVNULL, + stderr=subprocess.PIPE, + start_new_session=True, + ) + return process, command + + +def run_case(mode, history, concurrency, requests, overlay): + port = available_port() + base = f"http://127.0.0.1:{port}" + opener = urllib.request.build_opener(urllib.request.ProxyHandler({})) + process, command = launch(mode, port, overlay) + try: + wait_ready(process, opener, base) + chat, users = setup(opener, base, history) + rss = [] + stop_sampling = threading.Event() + sampling_errors = [] + + def sample(): + while not stop_sampling.is_set(): + try: + rss.append(server_rss_kib(process.pid)) + except RuntimeError as exc: + sampling_errors.append(str(exc)) + stop_sampling.wait(0.1) + + sampler = threading.Thread(target=sample) + sampler.start() + warmup = min(100, max(10, requests // 100)) + + for index in range(warmup): + request(opener, base, "POST", f"/api/v1/chats/{chat['id']}/messages", { + "text": f"warmup-{index}", + }, users[index % len(users)]["id"]) + + started = time.monotonic() + + def worker(worker_id): + latencies = [] + failures = 0 + worker_requests = requests // concurrency + (1 if worker_id < requests % concurrency else 0) + for index in range(worker_requests): + request_started = time.perf_counter() + try: + request(opener, base, "POST", f"/api/v1/chats/{chat['id']}/messages", { + "text": f"load-{worker_id}-{index}", + }, users[worker_id % len(users)]["id"]) + latencies.append(time.perf_counter() - request_started) + except (OSError, ValueError, urllib.error.HTTPError): + failures += 1 + index += 1 + return latencies, failures + + try: + with concurrent.futures.ThreadPoolExecutor(max_workers=concurrency) as pool: + results = list(pool.map(worker, range(concurrency))) + finally: + elapsed = time.monotonic() - started + stop_sampling.set() + sampler.join() + + latencies = [value for values, _ in results for value in values] + failures = sum(value for _, value in results) + if not latencies or not rss or sampling_errors: + raise RuntimeError(f"invalid sample: successes={len(latencies)} rss={len(rss)} errors={sampling_errors}") + + return { + "history": history, + "concurrency": concurrency, + "duration_seconds": round(elapsed, 3), + "requested_requests": requests, + "warmup_requests": warmup, + "successful_requests": len(latencies), + "failed_requests": failures, + "rps": round(len(latencies) / elapsed, 3), + "p50_ms": percentile(latencies, 0.50), + "p95_ms": percentile(latencies, 0.95), + "p99_ms": percentile(latencies, 0.99), + "rss_min_kib": min(rss), + "rss_max_kib": max(rss), + "rss_delta_kib": max(rss) - min(rss), + }, command + finally: + os.killpg(process.pid, signal.SIGTERM) + try: + process.wait(timeout=10) + except subprocess.TimeoutExpired: + os.killpg(process.pid, signal.SIGKILL) + process.wait() + + +def baseline_overlay(directory): + source = (ROOT / "internal/storage/memory/message_repository.go").resolve() + content = source.read_text() + if content.count(FAST_PATH) != 1: + raise RuntimeError("expected exactly one optimized append block") + replacement = directory / "message_repository_baseline.go" + replacement.write_text(content.replace(FAST_PATH, "", 1)) + overlay = directory / "overlay.json" + overlay.write_text(json.dumps({"Replace": {str(source): str(replacement)}})) + return overlay + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument("--mode", choices=("baseline", "optimized"), required=True) + parser.add_argument("--requests", type=int, default=10000) + parser.add_argument("--output", type=Path, required=True) + args = parser.parse_args() + if args.requests <= 0: + parser.error("--requests must be positive") + + with tempfile.TemporaryDirectory(prefix="messenger-track1-") as temp_dir: + overlay = baseline_overlay(Path(temp_dir)) + rows = [] + for history in (1000, 10000, 50000): + for concurrency in (1, 4, 16, 32): + row, command = run_case(args.mode, history, concurrency, args.requests, overlay) + rows.append(row) + print(json.dumps(row, ensure_ascii=False), flush=True) + result = { + "mode": args.mode, + "command": command, + "go_version": subprocess.check_output(["go", "version"], text=True).strip(), + "os_arch": subprocess.check_output(["go", "env", "GOOS", "GOARCH"], text=True).split(), + "requests_per_case": args.requests, + "rss_source": "ps RSS of go run child executable, KiB; sampled every 100 ms", + "rows": rows, + } + args.output.parent.mkdir(parents=True, exist_ok=True) + args.output.write_text(json.dumps(result, ensure_ascii=False, indent=2) + "\n") + + +if __name__ == "__main__": + main() -- 2.54.0 From 4e84354642be7684e5f9c620894b34b05f0cb833 Mon Sep 17 00:00:00 2001 From: Vladislav Kunetskiy Date: Thu, 15 Oct 2026 20:45:29 +0300 Subject: [PATCH 2/3] lab2 --- .mockery.yml | 12 + Dockerfile | 17 +- cmd/messenger/main.go | 95 ++- cmd/migrate/main.go | 89 +++ config/dev/config.yaml | 47 ++ docker-compose.local.yaml | 104 +++ evidence/cache/api-performance.txt | 11 + evidence/cache/consistency.txt | 36 + evidence/cache/latency.txt | 22 + evidence/cache/performance.txt | 26 + evidence/cache/redis-outage.txt | 8 + evidence/postgres/explain-analyze.txt | 64 ++ go.mod | 46 +- go.sum | 154 +++- internal/config/config.go | 178 ++++- internal/config/config_test.go | 433 ++++++---- internal/domain/chat.go | 15 +- internal/domain/errors.go | 13 +- internal/domain/session.go | 19 + internal/domain/user.go | 23 +- internal/domain/validation_test.go | 23 +- internal/health/checker.go | 28 + internal/health/checker_test.go | 33 + internal/platform/cache/cache.go | 31 + internal/platform/cache/cache_test.go | 31 + internal/platform/cache/distributed.go | 307 +++++++ .../cache/distributed_internal_test.go | 43 + internal/platform/cache/distributed_test.go | 374 +++++++++ internal/platform/cache/mocks/Cache.go | 346 ++++++++ internal/platform/cache/mocks/LockStore.go | 562 +++++++++++++ internal/platform/cache/redis.go | 139 ++++ internal/platform/cache/redis_client_test.go | 32 + internal/platform/password/password.go | 52 ++ internal/platform/password/password_test.go | 33 + internal/platform/token/token.go | 40 + internal/platform/token/token_test.go | 44 + internal/service/chat/service.go | 2 - internal/service/message/service.go | 2 - internal/service/session/mocks/Repository.go | 310 ++++++++ internal/service/session/mocks/Tokens.go | 168 ++++ internal/service/session/service.go | 95 +++ internal/service/session/service_test.go | 146 ++++ internal/service/user/mocks/Repository.go | 18 +- internal/service/user/service.go | 16 +- internal/service/user/service_test.go | 31 +- internal/storage/memory/chat_repository.go | 95 --- .../storage/memory/message_benchmark_test.go | 51 -- internal/storage/memory/message_repository.go | 77 -- internal/storage/memory/repository_test.go | 378 --------- internal/storage/memory/store.go | 144 ---- internal/storage/memory/store_test.go | 175 ---- internal/storage/memory/user_repository.go | 50 -- .../postgres/cache_latency_experiment_test.go | 159 ++++ .../cache_performance_experiment_test.go | 192 +++++ internal/storage/postgres/chat_repository.go | 162 ++++ .../storage/postgres/chat_repository_test.go | 239 ++++++ internal/storage/postgres/config.go | 74 ++ internal/storage/postgres/config_test.go | 49 ++ internal/storage/postgres/errors.go | 76 ++ .../postgres/internal/sqlcgen/chats.sql.go | 251 ++++++ .../storage/postgres/internal/sqlcgen/db.go | 32 + .../postgres/internal/sqlcgen/messages.sql.go | 160 ++++ .../postgres/internal/sqlcgen/models.go | 51 ++ .../postgres/internal/sqlcgen/sessions.sql.go | 83 ++ .../postgres/internal/sqlcgen/users.sql.go | 100 +++ internal/storage/postgres/main_test.go | 278 +++++++ internal/storage/postgres/mapping.go | 21 + .../storage/postgres/message_repository.go | 118 +++ .../postgres/message_repository_test.go | 157 ++++ .../postgres/migrations/00001_init.sql | 71 ++ .../storage/postgres/migrations/migrations.go | 6 + internal/storage/postgres/pagination.go | 25 + internal/storage/postgres/queries/chats.sql | 75 ++ .../storage/postgres/queries/messages.sql | 39 + .../storage/postgres/queries/sessions.sql | 16 + internal/storage/postgres/queries/users.sql | 14 + .../storage/postgres/session_repository.go | 94 +++ .../postgres/session_repository_test.go | 81 ++ internal/storage/postgres/store.go | 94 +++ internal/storage/postgres/transaction.go | 32 + internal/storage/postgres/user_repository.go | 63 ++ .../storage/postgres/user_repository_test.go | 114 +++ internal/storage/redis/chat_repository.go | 183 +++++ .../storage/redis/chat_repository_test.go | 428 ++++++++++ internal/storage/redis/main_test.go | 66 ++ internal/storage/redis/mocks/ChatSource.go | 331 ++++++++ internal/transport/rest/errors.go | 30 +- internal/transport/rest/handler.go | 74 +- .../rest/{ => internal}/oas/oas_cfg_gen.go | 0 .../{ => internal}/oas/oas_handlers_gen.go | 262 +++++- .../{ => internal}/oas/oas_interfaces_gen.go | 8 + .../rest/{ => internal}/oas/oas_json_gen.go | 166 +++- .../{ => internal}/oas/oas_middleware_gen.go | 0 .../{ => internal}/oas/oas_operations_gen.go | 2 + .../{ => internal}/oas/oas_parameters_gen.go | 0 .../oas/oas_request_decoders_gen.go | 0 .../oas/oas_response_encoders_gen.go | 445 ++++++++++- .../rest/{ => internal}/oas/oas_router_gen.go | 128 ++- .../{ => internal}/oas/oas_schemas_gen.go | 392 ++++++--- .../rest/internal/oas/oas_security_gen.go | 131 +++ .../rest/{ => internal}/oas/oas_server_gen.go | 12 + .../oas/oas_unimplemented_gen.go | 18 + .../{ => internal}/oas/oas_validators_gen.go | 472 +++++++---- internal/transport/rest/logging.go | 2 +- internal/transport/rest/logging_test.go | 2 +- internal/transport/rest/mocks/ChatService.go | 265 +++++++ .../transport/rest/mocks/HealthChecker.go | 98 +++ .../transport/rest/mocks/MessageService.go | 199 +++++ .../transport/rest/mocks/SecSessionService.go | 186 +++++ .../transport/rest/mocks/SessionActions.go | 316 ++++++++ .../transport/rest/mocks/SessionService.go | 178 +++++ internal/transport/rest/mocks/UserLookup.go | 115 +++ internal/transport/rest/mocks/UserService.go | 181 +++++ .../transport/rest/oas/oas_security_gen.go | 84 -- internal/transport/rest/router.go | 2 +- internal/transport/rest/router_test.go | 749 +++++------------- internal/transport/rest/security.go | 44 +- scripts/api_cache_performance.sh | 16 + scripts/cache_evidence.sh | 21 + scripts/cache_latency_experiment.sh | 17 + scripts/cache_performance_experiment.sh | 17 + scripts/redis_outage_check.py | 132 +++ scripts/restart.sh | 11 + sqlc.yaml | 19 + tests/cache_api_performance.py | 153 ++++ 125 files changed, 12049 insertions(+), 2120 deletions(-) create mode 100644 cmd/migrate/main.go create mode 100644 config/dev/config.yaml create mode 100644 docker-compose.local.yaml create mode 100644 evidence/cache/api-performance.txt create mode 100644 evidence/cache/consistency.txt create mode 100644 evidence/cache/latency.txt create mode 100644 evidence/cache/performance.txt create mode 100644 evidence/cache/redis-outage.txt create mode 100644 evidence/postgres/explain-analyze.txt create mode 100644 internal/domain/session.go create mode 100644 internal/health/checker.go create mode 100644 internal/health/checker_test.go create mode 100644 internal/platform/cache/cache.go create mode 100644 internal/platform/cache/cache_test.go create mode 100644 internal/platform/cache/distributed.go create mode 100644 internal/platform/cache/distributed_internal_test.go create mode 100644 internal/platform/cache/distributed_test.go create mode 100644 internal/platform/cache/mocks/Cache.go create mode 100644 internal/platform/cache/mocks/LockStore.go create mode 100644 internal/platform/cache/redis.go create mode 100644 internal/platform/cache/redis_client_test.go create mode 100644 internal/platform/password/password.go create mode 100644 internal/platform/password/password_test.go create mode 100644 internal/platform/token/token.go create mode 100644 internal/platform/token/token_test.go create mode 100644 internal/service/session/mocks/Repository.go create mode 100644 internal/service/session/mocks/Tokens.go create mode 100644 internal/service/session/service.go create mode 100644 internal/service/session/service_test.go delete mode 100644 internal/storage/memory/chat_repository.go delete mode 100644 internal/storage/memory/message_benchmark_test.go delete mode 100644 internal/storage/memory/message_repository.go delete mode 100644 internal/storage/memory/repository_test.go delete mode 100644 internal/storage/memory/store.go delete mode 100644 internal/storage/memory/store_test.go delete mode 100644 internal/storage/memory/user_repository.go create mode 100644 internal/storage/postgres/cache_latency_experiment_test.go create mode 100644 internal/storage/postgres/cache_performance_experiment_test.go create mode 100644 internal/storage/postgres/chat_repository.go create mode 100644 internal/storage/postgres/chat_repository_test.go create mode 100644 internal/storage/postgres/config.go create mode 100644 internal/storage/postgres/config_test.go create mode 100644 internal/storage/postgres/errors.go create mode 100644 internal/storage/postgres/internal/sqlcgen/chats.sql.go create mode 100644 internal/storage/postgres/internal/sqlcgen/db.go create mode 100644 internal/storage/postgres/internal/sqlcgen/messages.sql.go create mode 100644 internal/storage/postgres/internal/sqlcgen/models.go create mode 100644 internal/storage/postgres/internal/sqlcgen/sessions.sql.go create mode 100644 internal/storage/postgres/internal/sqlcgen/users.sql.go create mode 100644 internal/storage/postgres/main_test.go create mode 100644 internal/storage/postgres/mapping.go create mode 100644 internal/storage/postgres/message_repository.go create mode 100644 internal/storage/postgres/message_repository_test.go create mode 100644 internal/storage/postgres/migrations/00001_init.sql create mode 100644 internal/storage/postgres/migrations/migrations.go create mode 100644 internal/storage/postgres/pagination.go create mode 100644 internal/storage/postgres/queries/chats.sql create mode 100644 internal/storage/postgres/queries/messages.sql create mode 100644 internal/storage/postgres/queries/sessions.sql create mode 100644 internal/storage/postgres/queries/users.sql create mode 100644 internal/storage/postgres/session_repository.go create mode 100644 internal/storage/postgres/session_repository_test.go create mode 100644 internal/storage/postgres/store.go create mode 100644 internal/storage/postgres/transaction.go create mode 100644 internal/storage/postgres/user_repository.go create mode 100644 internal/storage/postgres/user_repository_test.go create mode 100644 internal/storage/redis/chat_repository.go create mode 100644 internal/storage/redis/chat_repository_test.go create mode 100644 internal/storage/redis/main_test.go create mode 100644 internal/storage/redis/mocks/ChatSource.go rename internal/transport/rest/{ => internal}/oas/oas_cfg_gen.go (100%) rename internal/transport/rest/{ => internal}/oas/oas_handlers_gen.go (78%) rename internal/transport/rest/{ => internal}/oas/oas_interfaces_gen.go (81%) rename internal/transport/rest/{ => internal}/oas/oas_json_gen.go (90%) rename internal/transport/rest/{ => internal}/oas/oas_middleware_gen.go (100%) rename internal/transport/rest/{ => internal}/oas/oas_operations_gen.go (84%) rename internal/transport/rest/{ => internal}/oas/oas_parameters_gen.go (100%) rename internal/transport/rest/{ => internal}/oas/oas_request_decoders_gen.go (100%) rename internal/transport/rest/{ => internal}/oas/oas_response_encoders_gen.go (82%) rename internal/transport/rest/{ => internal}/oas/oas_router_gen.go (82%) rename internal/transport/rest/{ => internal}/oas/oas_schemas_gen.go (78%) create mode 100644 internal/transport/rest/internal/oas/oas_security_gen.go rename internal/transport/rest/{ => internal}/oas/oas_server_gen.go (85%) rename internal/transport/rest/{ => internal}/oas/oas_unimplemented_gen.go (82%) rename internal/transport/rest/{ => internal}/oas/oas_validators_gen.go (86%) create mode 100644 internal/transport/rest/mocks/ChatService.go create mode 100644 internal/transport/rest/mocks/HealthChecker.go create mode 100644 internal/transport/rest/mocks/MessageService.go create mode 100644 internal/transport/rest/mocks/SecSessionService.go create mode 100644 internal/transport/rest/mocks/SessionActions.go create mode 100644 internal/transport/rest/mocks/SessionService.go create mode 100644 internal/transport/rest/mocks/UserLookup.go create mode 100644 internal/transport/rest/mocks/UserService.go delete mode 100644 internal/transport/rest/oas/oas_security_gen.go create mode 100644 scripts/api_cache_performance.sh create mode 100644 scripts/cache_evidence.sh create mode 100644 scripts/cache_latency_experiment.sh create mode 100644 scripts/cache_performance_experiment.sh create mode 100644 scripts/redis_outage_check.py create mode 100644 scripts/restart.sh create mode 100644 sqlc.yaml create mode 100644 tests/cache_api_performance.py diff --git a/.mockery.yml b/.mockery.yml index 6e8f23fd..eecf98a8 100644 --- a/.mockery.yml +++ b/.mockery.yml @@ -12,6 +12,12 @@ include-auto-generated: false log-level: info packages: + mtusi-messenger/internal/platform/cache: + config: + all: true + mtusi-messenger/internal/storage/redis: + config: + all: true mtusi-messenger/internal/service/user: config: all: true @@ -21,3 +27,9 @@ packages: mtusi-messenger/internal/service/message: config: all: true + mtusi-messenger/internal/service/session: + config: + all: true + mtusi-messenger/internal/transport/rest: + config: + all: true diff --git a/Dockerfile b/Dockerfile index 428d034e..c3cf8674 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,11 @@ COPY . . RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \ go build -trimpath -buildvcs=false -tags timetzdata \ -ldflags="-s -w -X main.version=${VERSION}" \ - -o /out/messenger ./cmd/messenger + -o /out/messenger ./cmd/messenger \ + && CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \ + go build -trimpath -buildvcs=false -tags timetzdata \ + -ldflags="-s -w -X main.version=${VERSION}" \ + -o /out/migrate ./cmd/migrate FROM alpine:${ALPINE_VERSION} AS runtime RUN apk add --no-cache ca-certificates wget \ @@ -25,18 +29,13 @@ RUN apk add --no-cache ca-certificates wget \ && adduser -S -D -H -u 10001 -G app app COPY --from=build --chown=10001:10001 /out/messenger /usr/local/bin/messenger - -ENV APP_HOST=0.0.0.0 \ - APP_PORT=8080 \ - APP_READ_HEADER_TIMEOUT=10s \ - APP_SHUTDOWN_TIMEOUT=10s \ - APP_LOG_LEVEL=info \ - APP_LOG_FORMAT=json +COPY --from=build --chown=10001:10001 /out/migrate /usr/local/bin/migrate +COPY --chown=10001:10001 config/dev/config.yaml /etc/messenger/dev/config.yaml USER 10001:10001 EXPOSE 8080 STOPSIGNAL SIGTERM HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=3 \ - CMD wget -q -O /dev/null "http://127.0.0.1:${APP_PORT}/health/live" || exit 1 + CMD wget -q -O /dev/null "http://127.0.0.1:${SERVER_PORT:-8080}/health/live" || exit 1 ENTRYPOINT ["/usr/local/bin/messenger"] diff --git a/cmd/messenger/main.go b/cmd/messenger/main.go index e56923c3..c01c9435 100644 --- a/cmd/messenger/main.go +++ b/cmd/messenger/main.go @@ -9,13 +9,19 @@ import ( "os" "os/signal" "syscall" + "time" "mtusi-messenger/internal/config" + "mtusi-messenger/internal/health" "mtusi-messenger/internal/logger" + "mtusi-messenger/internal/platform/cache" + "mtusi-messenger/internal/platform/token" "mtusi-messenger/internal/service/chat" "mtusi-messenger/internal/service/message" + "mtusi-messenger/internal/service/session" "mtusi-messenger/internal/service/user" - "mtusi-messenger/internal/storage/memory" + "mtusi-messenger/internal/storage/postgres" + storageredis "mtusi-messenger/internal/storage/redis" "mtusi-messenger/internal/transport/rest" ) @@ -41,16 +47,61 @@ func main() { } func run(cfg config.Config, log *slog.Logger) error { - store := memory.NewStore() - userService := user.NewService(store.Users()) + ctx, stop := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM) + defer stop() + + store, err := postgres.New(ctx, cfg.Postgres) + if err != nil { + return fmt.Errorf("connect database: %w", err) + } + + defer store.Close() + + redisCache, err := connectRedis(cfg.Redis) + if err != nil { + return err + } + + defer func() { _ = redisCache.Close() }() + + sessionRepo := session.Repository(store.Sessions()) + chatRepo := chat.Repository(store.Chats()) + + pingers := []health.Pinger{store} + + if cfg.Redis.Enabled { + if cfg.Cache.Enabled { + distributed, err := cache.NewDistributed(redisCache, cache.DistributedConfig{ + LockTTL: cfg.Cache.LockTTL, + WaitTimeout: cfg.Cache.LockWaitTimeout, + }, log) + if err != nil { + return fmt.Errorf("build distributed cache: %w", err) + } + + chatRepo = storageredis.NewChatRepository( + store.Chats(), + distributed, + cfg.Cache.ChatListTTL, + log, + ) + } + + log.Info("redis cache enabled", slog.String("host", cfg.Redis.Host), slog.Int("port", cfg.Redis.Port)) + } + + ttl := time.Duration(cfg.Session.TTLSeconds) * time.Second + sessionService := session.NewService(sessionRepo, token.New(), ttl) router, err := rest.NewRouter( rest.NewHandler( - userService, - chat.NewService(store.Chats()), + user.NewService(store.Users()), + chat.NewService(chatRepo), message.NewService(store.Messages()), + health.New(pingers...), + sessionService, ), - rest.NewSecurityHandler(userService), + rest.NewSecurityHandler(sessionService), log, ) if err != nil { @@ -60,12 +111,9 @@ func run(cfg config.Config, log *slog.Logger) error { server := &http.Server{ Addr: cfg.Addr(), Handler: router, - ReadHeaderTimeout: cfg.ReadHeaderTimeout, + ReadHeaderTimeout: cfg.Server.ReadHeaderTimeout, } - ctx, stop := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM) - defer stop() - errc := make(chan error, 1) go func() { @@ -88,9 +136,9 @@ func run(cfg config.Config, log *slog.Logger) error { case <-ctx.Done(): } - log.Info("shutdown signal received", slog.Duration("timeout", cfg.ShutdownTimeout)) + log.Info("shutdown signal received", slog.Duration("timeout", cfg.Server.ShutdownTimeout)) - shutdownCtx, cancel := context.WithTimeout(context.Background(), cfg.ShutdownTimeout) + shutdownCtx, cancel := context.WithTimeout(context.Background(), cfg.Server.ShutdownTimeout) defer cancel() if err := server.Shutdown(shutdownCtx); err != nil { @@ -101,3 +149,26 @@ func run(cfg config.Config, log *slog.Logger) error { return nil } + +func connectRedis(cfg config.Redis) (cache.LockStore, error) { + if !cfg.Enabled { + return cache.NoOpCache{}, nil + } + + client, err := cache.NewRedis(cache.RedisConfig{ + Host: cfg.Host, + Port: cfg.Port, + Password: cfg.Password, + DB: cfg.DB, + MaxRetries: cfg.MaxRetries, + DialTimeout: cfg.DialTimeout, + ReadTimeout: cfg.ReadTimeout, + WriteTimeout: cfg.WriteTimeout, + PoolSize: cfg.PoolSize, + }) + if err != nil { + return nil, fmt.Errorf("connect redis: %w", err) + } + + return client, nil +} diff --git a/cmd/migrate/main.go b/cmd/migrate/main.go new file mode 100644 index 00000000..d980b523 --- /dev/null +++ b/cmd/migrate/main.go @@ -0,0 +1,89 @@ +package main + +import ( + "context" + "database/sql" + "errors" + "fmt" + "log/slog" + "os" + + "github.com/pressly/goose/v3" + + "mtusi-messenger/internal/config" + "mtusi-messenger/internal/logger" + "mtusi-messenger/internal/storage/postgres/migrations" + + _ "github.com/jackc/pgx/v5/stdlib" +) + +func main() { + log := logger.New() + + if err := run(os.Args[1:]); err != nil { + log.Error("migrate failed", slog.Any("error", err)) + os.Exit(1) + } +} + +func run(args []string) error { + cfg, err := config.Load() + if err != nil { + return fmt.Errorf("load config: %w", err) + } + + slog.SetDefault(logger.New( + logger.WithLevel(cfg.SlogLevel()), + logger.WithFormat(cfg.LoggerFormat()), + )) + + command := "up" + if len(args) > 0 { + command = args[0] + } + + db, err := sql.Open("pgx", cfg.Postgres.DSN()) + if err != nil { + return fmt.Errorf("open database: %w", err) + } + + defer func() { _ = db.Close() }() + + pingCtx, cancel := context.WithTimeout(context.Background(), cfg.Postgres.ConnectTimeout) + defer cancel() + + if err := db.PingContext(pingCtx); err != nil { + return fmt.Errorf("ping database: %w", err) + } + + goose.SetBaseFS(migrations.FS) + + if err := goose.SetDialect("postgres"); err != nil { + return fmt.Errorf("set dialect: %w", err) + } + + if err := goCommand(db, command); err != nil { + return err + } + + return nil +} + +func goCommand(db *sql.DB, command string) error { + switch command { + case "up": + return goose.Up(db, ".") + case "up-by-one": + return goose.UpByOne(db, ".") + case "down": + return goose.Down(db, ".") + case "status": + return goose.Status(db, ".") + case "version": + return goose.Version(db, ".") + case "redo": + return goose.Redo(db, ".") + default: + return errors.New("unknown command: " + command + " (up, up-by-one, down, status, version, redo)") + } +} diff --git a/config/dev/config.yaml b/config/dev/config.yaml new file mode 100644 index 00000000..ba24063a --- /dev/null +++ b/config/dev/config.yaml @@ -0,0 +1,47 @@ +env: dev + +server: + host: 0.0.0.0 + port: 8080 + read_header_timeout: 10s + shutdown_timeout: 10s + +log: + level: info + format: json + +postgres: + host: localhost + port: 5432 + database: messenger + user: messenger + # Dev default for a local run without environment overrides; POSTGRES_PASSWORD wins. + password: messenger + ssl_mode: disable + max_conns: 10 + min_conns: 1 + max_conn_lifetime: 1h + max_conn_idle_time: 30m + connect_timeout: 5s + query_timeout: 5s + +redis: + enabled: true + host: localhost + port: 6379 + db: 0 + # -1 disables go-redis retries; 0 keeps the library default (3 retries). + max_retries: -1 + dial_timeout: 300ms + read_timeout: 200ms + write_timeout: 200ms + pool_size: 10 + +cache: + enabled: true + chat_list_ttl: 5m + lock_ttl: 10s + lock_wait_timeout: 2s + +session: + ttl_seconds: 3600 diff --git a/docker-compose.local.yaml b/docker-compose.local.yaml new file mode 100644 index 00000000..0cdc50fc --- /dev/null +++ b/docker-compose.local.yaml @@ -0,0 +1,104 @@ +name: mtusi-messenger-lab2 + +x-app: &app + build: + context: . + dockerfile: Dockerfile + image: mtusi-messenger:lab2 + +services: + postgres: + image: postgres:18-alpine@sha256:77f585114c32fbca283dc835b0596f4e52b51b4c6662d7810b2f4084f60a1873 + environment: + POSTGRES_USER: ${POSTGRES_USER:-messenger} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-messenger} + POSTGRES_DB: ${POSTGRES_DB:-messenger} + ports: + - "127.0.0.1:${POSTGRES_PORT:-5432}:5432" + volumes: + - postgres18-data:/var/lib/postgresql + healthcheck: + test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"] + interval: 5s + timeout: 5s + retries: 10 + start_period: 5s + restart: unless-stopped + redis: + image: redis:7.4-alpine + command: + - redis-server + - --appendonly + - "yes" + - --appendfsync + - everysec + - --save + - "60" + - "1" + ports: + - "127.0.0.1:${REDIS_PORT:-6379}:6379" + volumes: + - redis7-data:/data + healthcheck: + test: ["CMD", "redis-cli", "ping"] + interval: 5s + timeout: 3s + retries: 10 + start_period: 3s + restart: unless-stopped + migrate: + <<: *app + entrypoint: ["/usr/local/bin/migrate"] + command: ["up"] + environment: + APP_CONFIG: /etc/messenger/dev/config.yaml + POSTGRES_HOST: postgres + POSTGRES_PORT: "5432" + POSTGRES_DATABASE: ${POSTGRES_DB:-messenger} + POSTGRES_USER: ${POSTGRES_USER:-messenger} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-messenger} + POSTGRES_SSL_MODE: disable + depends_on: + postgres: + condition: service_healthy + restart: "no" + + api: + <<: *app + env_file: + - path: .env + required: false + environment: + APP_CONFIG: /etc/messenger/dev/config.yaml + POSTGRES_HOST: postgres + POSTGRES_PORT: "5432" + POSTGRES_DATABASE: ${POSTGRES_DB:-messenger} + POSTGRES_USER: ${POSTGRES_USER:-messenger} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-messenger} + POSTGRES_SSL_MODE: disable + REDIS_ENABLED: "${REDIS_ENABLED:-true}" + REDIS_HOST: redis + REDIS_PORT: "6379" + CACHE_ENABLED: "${CACHE_ENABLED:-true}" + ports: + - "127.0.0.1:${SERVER_PORT:-8080}:8080" + depends_on: + postgres: + condition: service_healthy + redis: + condition: service_healthy + migrate: + condition: service_completed_successfully + healthcheck: + test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://127.0.0.1:8080/health/ready"] + interval: 10s + timeout: 3s + retries: 5 + start_period: 5s + restart: unless-stopped + +volumes: + postgres18-data: + name: mtusi-messenger-lab2-postgres18-data + redis7-data: + name: mtusi-messenger-lab2-redis7-data diff --git a/evidence/cache/api-performance.txt b/evidence/cache/api-performance.txt new file mode 100644 index 00000000..eee86ccd --- /dev/null +++ b/evidence/cache/api-performance.txt @@ -0,0 +1,11 @@ +# API cache performance experiment +# generated: 2026-10-09T21:41:31Z +running trial 1, cache=False, requests=1000 +{"requests": 1000, "workers": 8, "duration_seconds": 0.455918375053443, "rps": 2193.375074831716, "p50_ms": 3.3378750667907298, "p95_ms": 5.237665958702564, "p99_ms": 7.377958972938359, "trial": 1, "cache_enabled": false} +running trial 1, cache=True, requests=1000 +{"requests": 1000, "workers": 8, "duration_seconds": 0.424924207967706, "rps": 2353.360861182094, "p50_ms": 3.075250016991049, "p95_ms": 5.355541012249887, "p99_ms": 6.619499996304512, "trial": 1, "cache_enabled": true} +running trial 2, cache=False, requests=1000 +{"requests": 1000, "workers": 8, "duration_seconds": 0.5072490000165999, "rps": 1971.4183763147382, "p50_ms": 3.680104040540755, "p95_ms": 6.2174160266295075, "p99_ms": 8.554207975976169, "trial": 2, "cache_enabled": false} +running trial 2, cache=True, requests=1000 +{"requests": 1000, "workers": 8, "duration_seconds": 0.4116047500865534, "rps": 2429.51520795063, "p50_ms": 2.9188335174694657, "p95_ms": 5.480541964061558, "p99_ms": 7.245125016197562, "trial": 2, "cache_enabled": true} +{"results": [{"requests": 1000, "workers": 8, "duration_seconds": 0.455918375053443, "rps": 2193.375074831716, "p50_ms": 3.3378750667907298, "p95_ms": 5.237665958702564, "p99_ms": 7.377958972938359, "trial": 1, "cache_enabled": false}, {"requests": 1000, "workers": 8, "duration_seconds": 0.424924207967706, "rps": 2353.360861182094, "p50_ms": 3.075250016991049, "p95_ms": 5.355541012249887, "p99_ms": 6.619499996304512, "trial": 1, "cache_enabled": true}, {"requests": 1000, "workers": 8, "duration_seconds": 0.5072490000165999, "rps": 1971.4183763147382, "p50_ms": 3.680104040540755, "p95_ms": 6.2174160266295075, "p99_ms": 8.554207975976169, "trial": 2, "cache_enabled": false}, {"requests": 1000, "workers": 8, "duration_seconds": 0.4116047500865534, "rps": 2429.51520795063, "p50_ms": 2.9188335174694657, "p95_ms": 5.480541964061558, "p99_ms": 7.245125016197562, "trial": 2, "cache_enabled": true}], "users": 4, "chats": 60, "sessions_cached_in_both_modes": true} diff --git a/evidence/cache/consistency.txt b/evidence/cache/consistency.txt new file mode 100644 index 00000000..7c1c7f61 --- /dev/null +++ b/evidence/cache/consistency.txt @@ -0,0 +1,36 @@ +# Cache consistency evidence (track 1) +# generated: 2026-10-09T21:38:43Z +# redis: localhost:6379 db=1 + +=== RUN TestChatRepositorySuite +=== RUN TestChatRepositorySuite/TestBrokenCacheEntryIsDroppedAndRepopulated +=== RUN TestChatRepositorySuite/TestCacheUnavailableFallsBackToSource +=== RUN TestChatRepositorySuite/TestConcurrentColdReadsAreDeduplicated + chat_repository_test.go:226: distributed lock: 100 concurrent cold reads -> 1 source load +=== RUN TestChatRepositorySuite/TestConcurrentColdReadsWithoutProtectionStampede + chat_repository_test.go:427: stampede demonstration: 100 concurrent reads -> 100 source loads +=== RUN TestChatRepositorySuite/TestCreateInvalidatesMemberCaches +=== RUN TestChatRepositorySuite/TestDeeperPagesBypassCache +=== RUN TestChatRepositorySuite/TestEvictedCacheEntryReloadsFromSource +=== RUN TestChatRepositorySuite/TestFirstPageIsCached +=== RUN TestChatRepositorySuite/TestLimitIsPartOfCacheKey +=== RUN TestChatRepositorySuite/TestMultipleInstancesShareDistributedLock + chat_repository_test.go:276: multi-instance distributed lock: 3 instances x 30 reads -> 1 source load +=== RUN TestChatRepositorySuite/TestSlowLoaderBeyondCacheBudgetReturnsData +=== RUN TestChatRepositorySuite/TestSourceErrorIsNotRetried +--- PASS: TestChatRepositorySuite (0.83s) + --- PASS: TestChatRepositorySuite/TestBrokenCacheEntryIsDroppedAndRepopulated (0.00s) + --- PASS: TestChatRepositorySuite/TestCacheUnavailableFallsBackToSource (0.00s) + --- PASS: TestChatRepositorySuite/TestConcurrentColdReadsAreDeduplicated (0.03s) + --- PASS: TestChatRepositorySuite/TestConcurrentColdReadsWithoutProtectionStampede (0.02s) + --- PASS: TestChatRepositorySuite/TestCreateInvalidatesMemberCaches (0.01s) + --- PASS: TestChatRepositorySuite/TestDeeperPagesBypassCache (0.00s) + --- PASS: TestChatRepositorySuite/TestEvictedCacheEntryReloadsFromSource (0.00s) + --- PASS: TestChatRepositorySuite/TestFirstPageIsCached (0.00s) + --- PASS: TestChatRepositorySuite/TestLimitIsPartOfCacheKey (0.00s) + --- PASS: TestChatRepositorySuite/TestMultipleInstancesShareDistributedLock (0.05s) + --- PASS: TestChatRepositorySuite/TestSlowLoaderBeyondCacheBudgetReturnsData (0.70s) + --- PASS: TestChatRepositorySuite/TestSourceErrorIsNotRetried (0.00s) +PASS +ok mtusi-messenger/internal/storage/redis 1.338s +? mtusi-messenger/internal/storage/redis/mocks [no test files] diff --git a/evidence/cache/latency.txt b/evidence/cache/latency.txt new file mode 100644 index 00000000..f84b1ec3 --- /dev/null +++ b/evidence/cache/latency.txt @@ -0,0 +1,22 @@ +# Cache latency experiment +# generated: 2026-10-06T15:53:09Z +go version go1.27.1 darwin/arm64 +Darwin arm64 +2026/10/06 18:53:10 OK 00001_init.sql (10.27ms) +2026/10/06 18:53:10 goose: successfully migrated database to version: 1 +=== RUN TestCacheLatencyExperiment + cache_latency_experiment_test.go:83: baseline: requests=1000 source_loads=1000 p50=317.209µs p95=343.542µs p99=377.625µs + cache_latency_experiment_test.go:84: redis cache: requests=1000 source_loads=1 p50=411.791µs p95=527.709µs p99=565.625µs +--- PASS: TestCacheLatencyExperiment (0.97s) +=== RUN TestCacheLatencyExperiment + cache_latency_experiment_test.go:83: baseline: requests=1000 source_loads=1000 p50=271.125µs p95=330.584µs p99=389.209µs + cache_latency_experiment_test.go:84: redis cache: requests=1000 source_loads=1 p50=388µs p95=453.959µs p99=512.625µs +--- PASS: TestCacheLatencyExperiment (0.86s) +=== RUN TestCacheLatencyExperiment + cache_latency_experiment_test.go:83: baseline: requests=1000 source_loads=1000 p50=268.541µs p95=318.417µs p99=367.083µs + cache_latency_experiment_test.go:84: redis cache: requests=1000 source_loads=1 p50=408.833µs p95=473.125µs p99=541.042µs +--- PASS: TestCacheLatencyExperiment (0.88s) +PASS +ok mtusi-messenger/internal/storage/postgres 3.097s +? mtusi-messenger/internal/storage/postgres/internal/sqlcgen [no test files] +? mtusi-messenger/internal/storage/postgres/migrations [no test files] diff --git a/evidence/cache/performance.txt b/evidence/cache/performance.txt new file mode 100644 index 00000000..54412f9a --- /dev/null +++ b/evidence/cache/performance.txt @@ -0,0 +1,26 @@ +# Cache performance experiment +# generated: 2026-10-09T21:41:14Z +go version go1.27.1 darwin/arm64 +Darwin arm64 +2026/10/10 00:41:15 OK 00001_init.sql (10.03ms) +2026/10/10 00:41:15 OK 00002_user_chat_versions.sql (2.17ms) +2026/10/10 00:41:15 goose: successfully migrated database to version: 2 +=== RUN TestCachePerformanceExperiment + cache_performance_experiment_test.go:115: baseline (no cache): requests=10000 concurrency=50 sql=10000 duration=1.528s rps=6542 p50=7.490875ms p95=9.302792ms p99=10.779ms + cache_performance_experiment_test.go:116: redis cache (cold): requests=10000 concurrency=50 sql=1 duration=851ms rps=11749 p50=4.192709ms p95=5.318916ms p99=5.905625ms + cache_performance_experiment_test.go:117: redis cache (hot): requests=10000 concurrency=50 sql=0 duration=751ms rps=13320 p50=3.670958ms p95=4.644958ms p99=5.21475ms +--- PASS: TestCachePerformanceExperiment (3.50s) +=== RUN TestCachePerformanceExperiment + cache_performance_experiment_test.go:115: baseline (no cache): requests=10000 concurrency=50 sql=10000 duration=1.415s rps=7066 p50=6.901958ms p95=8.697666ms p99=10.560416ms + cache_performance_experiment_test.go:116: redis cache (cold): requests=10000 concurrency=50 sql=1 duration=846ms rps=11815 p50=4.033083ms p95=6.0305ms p99=6.963417ms + cache_performance_experiment_test.go:117: redis cache (hot): requests=10000 concurrency=50 sql=0 duration=817ms rps=12234 p50=3.999959ms p95=5.060959ms p99=5.802042ms +--- PASS: TestCachePerformanceExperiment (3.39s) +=== RUN TestCachePerformanceExperiment + cache_performance_experiment_test.go:115: baseline (no cache): requests=10000 concurrency=50 sql=10000 duration=1.511s rps=6618 p50=7.302667ms p95=9.420708ms p99=12.437917ms + cache_performance_experiment_test.go:116: redis cache (cold): requests=10000 concurrency=50 sql=1 duration=827ms rps=12093 p50=3.984125ms p95=5.655167ms p99=6.8085ms + cache_performance_experiment_test.go:117: redis cache (hot): requests=10000 concurrency=50 sql=0 duration=817ms rps=12247 p50=3.946959ms p95=5.363208ms p99=6.508458ms +--- PASS: TestCachePerformanceExperiment (3.55s) +PASS +ok mtusi-messenger/internal/storage/postgres 10.978s +? mtusi-messenger/internal/storage/postgres/internal/sqlcgen [no test files] +? mtusi-messenger/internal/storage/postgres/migrations [no test files] diff --git a/evidence/cache/redis-outage.txt b/evidence/cache/redis-outage.txt new file mode 100644 index 00000000..38ea2c43 --- /dev/null +++ b/evidence/cache/redis-outage.txt @@ -0,0 +1,8 @@ +baseline: 6ms +after stop: 476ms + stop: n=1 max=476ms p95=476ms budget=2000ms + pause parallel: n=30 max=215ms p95=214ms budget=2000ms +create during pause: 201 +after recovery: new chat visible, 5ms +lock keys without TTL: 0 +PASS: redis outage handled within budget diff --git a/evidence/postgres/explain-analyze.txt b/evidence/postgres/explain-analyze.txt new file mode 100644 index 00000000..fbcb2165 --- /dev/null +++ b/evidence/postgres/explain-analyze.txt @@ -0,0 +1,64 @@ +# EXPLAIN (ANALYZE, BUFFERS) + +## history_first_page + +Limit (cost=0.29..5.40 rows=51 width=73) (actual time=0.007..0.012 rows=51.00 loops=1) + Buffers: shared hit=4 + -> Index Scan using messages_chat_id_created_at_id_idx on messages (cost=0.29..1002.85 rows=10000 width=73) (actual time=0.006..0.009 rows=51.00 loops=1) + Index Cond: (chat_id = '01a0f77e-9381-736f-9a2b-af3b1e1e87fd'::uuid) + Index Searches: 1 + Buffers: shared hit=4 +Planning: + Buffers: shared hit=44 +Planning Time: 0.147 ms +Execution Time: 0.019 ms + +## history_next_page + +Limit (cost=0.29..7.71 rows=51 width=73) (actual time=0.004..0.010 rows=51.00 loops=1) + Buffers: shared hit=4 + -> Index Scan using messages_chat_id_created_at_id_idx on messages (cost=0.29..524.01 rows=3599 width=73) (actual time=0.004..0.008 rows=51.00 loops=1) + Index Cond: ((chat_id = '01a0f77e-9381-736f-9a2b-af3b1e1e87fd'::uuid) AND (ROW(created_at, id) > ROW('2026-10-01 11:44:23.146682+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid))) + Index Searches: 1 + Buffers: shared hit=4 +Planning Time: 0.021 ms +Execution Time: 0.027 ms + +## chats_list_for_member + +Limit (cost=0.57..446.14 rows=51 width=70) (actual time=0.018..0.081 rows=51.00 loops=1) + Buffers: shared hit=309 + -> Nested Loop (cost=0.57..87375.78 rows=10001 width=70) (actual time=0.018..0.079 rows=51.00 loops=1) + Buffers: shared hit=309 + -> Index Scan using chats_created_at_id_idx on chats c (cost=0.29..554.24 rows=10001 width=38) (actual time=0.004..0.007 rows=51.00 loops=1) + Index Searches: 1 + Buffers: shared hit=3 + -> Index Only Scan using chat_members_user_id_chat_id_idx on chat_members visible (cost=0.29..0.36 rows=1 width=16) (actual time=0.001..0.001 rows=1.00 loops=51) + Index Cond: ((user_id = '01a0f77e-937a-7d1e-aacb-8909b9a65779'::uuid) AND (chat_id = c.id)) + Heap Fetches: 51 + Index Searches: 51 + Buffers: shared hit=153 + SubPlan 1 + -> Aggregate (cost=8.31..8.32 rows=1 width=32) (actual time=0.001..0.001 rows=1.00 loops=51) + Buffers: shared hit=153 + -> Index Only Scan using chat_members_pkey on chat_members m (cost=0.29..8.30 rows=1 width=16) (actual time=0.000..0.000 rows=1.00 loops=51) + Index Cond: (chat_id = c.id) + Heap Fetches: 51 + Index Searches: 51 + Buffers: shared hit=153 +Planning: + Buffers: shared hit=95 +Planning Time: 0.250 ms +Execution Time: 0.098 ms + +## user_by_username + +Index Scan using users_username_key on users (cost=0.29..8.30 rows=1 width=42) (actual time=0.005..0.005 rows=1.00 loops=1) + Index Cond: (username = 'bulk_5000'::text) + Index Searches: 1 + Buffers: shared hit=3 +Planning: + Buffers: shared hit=43 +Planning Time: 0.085 ms +Execution Time: 0.008 ms + diff --git a/go.mod b/go.mod index 89f75784..b627ea23 100644 --- a/go.mod +++ b/go.mod @@ -7,30 +7,48 @@ require ( github.com/go-faster/jx v1.2.0 github.com/go-playground/validator/v10 v10.30.5 github.com/google/uuid v1.6.0 + github.com/jackc/pgx/v5 v5.11.0 github.com/ogen-go/ogen v1.24.0 + github.com/pressly/goose/v3 v3.28.0 + github.com/redis/go-redis/v9 v9.22.0 github.com/spf13/viper v1.21.0 github.com/stretchr/testify v1.12.1 go.uber.org/zap v1.28.0 go.uber.org/zap/exp v0.3.0 + golang.org/x/crypto v0.57.0 + golang.org/x/sync v0.23.0 ) require ( + cel.dev/expr v0.25.2 // indirect + filippo.io/edwards25519 v1.2.0 // indirect + github.com/antlr4-go/antlr/v4 v4.13.1 // indirect github.com/brunoga/deep v1.3.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/clipperhouse/uax29/v2 v2.2.0 // indirect + github.com/coreos/go-semver v0.3.1 // indirect + github.com/cubicdaiya/gonp v1.0.4 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dlclark/regexp2 v1.12.0 // indirect github.com/fatih/color v1.19.0 // indirect github.com/fatih/structs v1.1.0 // indirect + github.com/fatih/structtag v1.2.0 // indirect github.com/fsnotify/fsnotify v1.9.0 // indirect github.com/gabriel-vasile/mimetype v1.4.15 // indirect github.com/ghodss/yaml v1.0.0 // indirect github.com/go-faster/yaml v0.4.6 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect + github.com/go-sql-driver/mysql v1.10.0 // indirect github.com/go-viper/mapstructure/v2 v2.5.0 // indirect - github.com/google/go-cmp v0.7.0 // indirect + github.com/google/cel-go v0.28.0 // indirect github.com/huandu/xstrings v1.5.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/jackc/pgpassfile v1.0.0 // indirect + github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect + github.com/jackc/puddle/v2 v2.2.2 // indirect github.com/jedib0t/go-pretty/v6 v6.7.8 // indirect + github.com/jinzhu/inflection v1.0.0 // indirect github.com/knadh/koanf/maps v0.1.2 // indirect github.com/knadh/koanf/parsers/yaml v1.1.0 // indirect github.com/knadh/koanf/providers/env v1.1.0 // indirect @@ -42,41 +60,61 @@ require ( github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.24 // indirect github.com/mattn/go-runewidth v0.0.19 // indirect + github.com/mfridman/interpolate v0.0.2 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/ncruces/go-sqlite3 v0.32.0 // indirect + github.com/ncruces/julianday v1.0.0 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect + github.com/pganalyze/pg_query_go/v6 v6.2.2 // indirect + github.com/pingcap/errors v0.11.5-0.20250523034308-74f78ae071ee // indirect + github.com/pingcap/failpoint v0.0.0-20240528011301-b51a646c7c86 // indirect + github.com/pingcap/log v1.1.0 // indirect + github.com/pingcap/tidb/pkg/parser v0.0.0-20260418072757-ce92298d1124 // indirect + github.com/riza-io/grpc-go v0.2.0 // indirect github.com/rs/zerolog v1.34.0 // indirect github.com/sagikazarmark/locafero v0.11.0 // indirect github.com/segmentio/asm v1.2.1 // indirect + github.com/sethvargo/go-retry v0.4.0 // indirect github.com/shopspring/decimal v1.4.0 // indirect github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect github.com/spf13/afero v1.15.0 // indirect github.com/spf13/cast v1.10.0 // indirect github.com/spf13/cobra v1.10.2 // indirect github.com/spf13/pflag v1.0.10 // indirect + github.com/sqlc-dev/doubleclick v1.0.0 // indirect + github.com/sqlc-dev/sqlc v1.31.1 // indirect github.com/stretchr/objx v0.5.3 // indirect github.com/subosito/gotenv v1.6.0 // indirect + github.com/tetratelabs/wazero v1.11.0 // indirect github.com/vektra/mockery/v3 v3.8.0 // indirect + github.com/wasilibs/go-pgquery v0.0.0-20250409022910-10ac41983c07 // indirect + github.com/wasilibs/wazero-helpers v0.0.0-20240620070341-3dff1577cd52 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect github.com/yuin/goldmark v1.8.2 // indirect + go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.yaml.in/yaml/v3 v3.0.5 // indirect - golang.org/x/crypto v0.57.0 // indirect - golang.org/x/exp v0.0.0-20260212183809-81e46e3db34a // indirect + golang.org/x/exp v0.0.0-20260824195058-e88cd73687aa // indirect golang.org/x/mod v0.41.0 // indirect golang.org/x/net v0.58.0 // indirect - golang.org/x/sync v0.23.0 // indirect golang.org/x/sys v0.48.0 // indirect golang.org/x/term v0.46.0 // indirect golang.org/x/text v0.42.0 // indirect golang.org/x/tools v0.49.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260831171406-18b4a7587f8a // indirect + google.golang.org/grpc v1.83.2 // indirect + google.golang.org/protobuf v1.36.12 // indirect + gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) tool ( github.com/ogen-go/ogen/cmd/ogen + github.com/sqlc-dev/sqlc/cmd/sqlc github.com/vektra/mockery/v3 ) diff --git a/go.sum b/go.sum index 6a42b0dd..850f17ae 100644 --- a/go.sum +++ b/go.sum @@ -1,18 +1,41 @@ +cel.dev/expr v0.25.2 h1:K6j46C81hXtZQfuX60cVWQFBJahKSE2gfRbNuvr5bFs= +cel.dev/expr v0.25.2/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= +filippo.io/edwards25519 v1.2.0 h1:crnVqOiS4jqYleHd9vaKZ+HKtHfllngJIiOpNpoJsjo= +filippo.io/edwards25519 v1.2.0/go.mod h1:xzAOLCNug/yB62zG1bQ8uziwrIqIuxhctzJT18Q77mc= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= +github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/brunoga/deep v1.3.1 h1:bSrL6FhAZa6JlVv4vsi7Hg8SLwroDb1kgDERRVipBCo= github.com/brunoga/deep v1.3.1/go.mod h1:GDV6dnXqn80ezsLSZ5Wlv1PdKAWAO4L5PnKYtv2dgaI= +github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= +github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= +github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= +github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/clipperhouse/uax29/v2 v2.2.0 h1:ChwIKnQN3kcZteTXMgb1wztSgaU+ZemkgWdohwgs8tY= github.com/clipperhouse/uax29/v2 v2.2.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM= +github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= +github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= +github.com/cubicdaiya/gonp v1.0.4 h1:ky2uIAJh81WiLcGKBVD5R7KsM/36W6IqqTy6Bo6rGws= +github.com/cubicdaiya/gonp v1.0.4/go.mod h1:iWGuP/7+JVTn02OWhRemVbMmG1DOUnmrGTYYACpOI0I= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dlclark/regexp2 v1.12.0 h1:0j4c5qQmnC6XOWNjP3PIXURXN2gWx76rd3KvgdPkCz8= github.com/dlclark/regexp2 v1.12.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/fatih/color v1.19.0 h1:Zp3PiM21/9Ld6FzSKyL5c/BULoe/ONr9KlbYVOfG8+w= github.com/fatih/color v1.19.0/go.mod h1:zNk67I0ZUT1bEGsSGyCZYZNrHuTkJJB+r6Q9VuMi0LE= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= +github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= @@ -27,6 +50,10 @@ github.com/go-faster/jx v1.2.0 h1:T2YHJPrFaYu21fJtUxC9GzmluKu8rVIFDwwGBKTDseI= github.com/go-faster/jx v1.2.0/go.mod h1:UWLOVDmMG597a5tBFPLIWJdUxz5/2emOpfsj9Neg0PE= github.com/go-faster/yaml v0.4.6 h1:lOK/EhI04gCpPgPhgt0bChS6bvw7G3WwI8xxVe0sw9I= github.com/go-faster/yaml v0.4.6/go.mod h1:390dRIvV4zbnO7qC9FGo6YYutc+wyyUSHBgbXL52eXk= +github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= +github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= @@ -35,9 +62,15 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.30.5 h1:YyCXvVShZbs2Sm3Mb53eNOlhRXctSOzW5QJAouCTZL4= github.com/go-playground/validator/v10 v10.30.5/go.mod h1:wEqiaov48pXX1kjhc3Da8y0M0Dtg/BK7gurFBLgwFrQ= +github.com/go-sql-driver/mysql v1.10.0 h1:Q+1LV8DkHJvSYAdR83XzuhDaTykuDx0l6fkXxoWCWfw= +github.com/go-sql-driver/mysql v1.10.0/go.mod h1:M+cqaI7+xxXGG9swrdeUIoPG3Y3KCkF0pZej+SK+nWk= github.com/go-viper/mapstructure/v2 v2.5.0 h1:vM5IJoUAy3d7zRSVtIwQgBj7BiWtMPfmPEgAXnvj1Ro= github.com/go-viper/mapstructure/v2 v2.5.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/google/cel-go v0.28.0 h1:KjSWstCpz/MN5t4a8gnGJNIYUsJRpdi/r97xWDphIQc= +github.com/google/cel-go v0.28.0/go.mod h1:X0bD6iVNR8pkROSOoHVdgTkzmRcosof7WQqCD6wcMc8= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -46,8 +79,20 @@ github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= +github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= +github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo= +github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= +github.com/jackc/pgx/v5 v5.11.0 h1:IzBBtyK9AHqf98cctWFifYSci2hgQR/cd56wB4p+ogg= +github.com/jackc/pgx/v5 v5.11.0/go.mod h1:mal1tBGAFfLHvZzaYh77YS/eC6IX9OWbRV1QIIM0Jn4= +github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo= +github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= github.com/jedib0t/go-pretty/v6 v6.7.8 h1:BVYrDy5DPBA3Qn9ICT+PokP9cvCv1KaHv2i+Hc8sr5o= github.com/jedib0t/go-pretty/v6 v6.7.8/go.mod h1:YwC5CE4fJ1HFUDeivSV1r//AmANFHyqczZk+U6BDALU= +github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= +github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE= +github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= github.com/knadh/koanf/maps v0.1.2 h1:RBfmAW5CnZT+PJ1CVc1QSJKf4Xu9kxfQgYVQSu8hpbo= github.com/knadh/koanf/maps v0.1.2/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/parsers/yaml v1.1.0 h1:3ltfm9ljprAHt4jxgeYLlFPmUaunuCgu1yILuTXRdM4= @@ -62,8 +107,11 @@ github.com/knadh/koanf/providers/structs v1.0.0 h1:DznjB7NQykhqCar2LvNug3MuxEQsZ github.com/knadh/koanf/providers/structs v1.0.0/go.mod h1:kjo5TFtgpaZORlpoJqcbeLowM2cINodv8kX+oFAeQ1w= github.com/knadh/koanf/v2 v2.3.2 h1:Ee6tuzQYFwcZXQpc2MiVeC6qHMandf5SMUJJNoFp/c4= github.com/knadh/koanf/v2 v2.3.2/go.mod h1:gRb40VRAbd4iJMYYD5IxZ6hfuopFcXBpc9bbQpZwo28= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leodido/go-urn v1.5.0 h1:pLqT2kq1zpHW/1D18QMjMpdtX7cekxqtJJjg5ANyWw0= @@ -77,16 +125,44 @@ github.com/mattn/go-isatty v0.0.24 h1:tGZZoVgT/KiqK1c8ocVLeDS8BSWMRd47J3Lbz7vsRe github.com/mattn/go-isatty v0.0.24/go.mod h1:nMCL3Zebbrt45jsMDgnfIwz6ydEQApk5oEI3HqDio6A= github.com/mattn/go-runewidth v0.0.19 h1:v++JhqYnZuu5jSKrk9RbgF5v4CGUjqRfBm05byFGLdw= github.com/mattn/go-runewidth v0.0.19/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs= +github.com/mfridman/interpolate v0.0.2 h1:pnuTK7MQIxxFz1Gr+rjSIx9u7qVjf5VOoM/u6BbAxPY= +github.com/mfridman/interpolate v0.0.2/go.mod h1:p+7uk6oE07mpE/Ik1b8EckO0O4ZXiGAfshKBWLUM9Xg= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/ncruces/go-sqlite3 v0.32.0 h1:hNBUXp88LrfQCsuyXLqWTbTUG35sUuktDsqhhgHvU20= +github.com/ncruces/go-sqlite3 v0.32.0/go.mod h1:MIWTK60ONDl0oVY073zYvJP21C3Dly6P9bxVpgkLwdQ= +github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w= +github.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= +github.com/ncruces/julianday v1.0.0 h1:fH0OKwa7NWvniGQtxdJRxAgkBMolni2BjDHaWTxqt7M= +github.com/ncruces/julianday v1.0.0/go.mod h1:Dusn2KvZrrovOMJuOt0TNXL6tB7U2E8kvza5fFc9G7g= github.com/ogen-go/ogen v1.24.0 h1:NehBG/8s0JeM6jYHPJeFJntBG3cE/xQgZd1q8BchPNM= github.com/ogen-go/ogen v1.24.0/go.mod h1:hcg4aTzLcu/MS1SGGahUriPBEOZB3c82RGIC6dYcdFU= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= +github.com/pganalyze/pg_query_go/v6 v6.2.2 h1:O0L6zMC226R82RF3X5n0Ki6HjytDsoAzuzp4ATVAHNo= +github.com/pganalyze/pg_query_go/v6 v6.2.2/go.mod h1:Cn6+j4870kJz3iYNsb0VsNG04vpSWgEvBwc590J4qD0= +github.com/pingcap/errors v0.11.0/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/pingcap/errors v0.11.5-0.20250523034308-74f78ae071ee h1:/IDPbpzkzA97t1/Z1+C3KlxbevjMeaI6BQYxvivu4u8= +github.com/pingcap/errors v0.11.5-0.20250523034308-74f78ae071ee/go.mod h1:X2r9ueLEUZgtx2cIogM0v4Zj5uvvzhuuiu7Pn8HzMPg= +github.com/pingcap/failpoint v0.0.0-20240528011301-b51a646c7c86 h1:tdMsjOqUR7YXHoBitzdebTvOjs/swniBTOLy5XiMtuE= +github.com/pingcap/failpoint v0.0.0-20240528011301-b51a646c7c86/go.mod h1:exzhVYca3WRtd6gclGNErRWb1qEgff3LYta0LvRmON4= +github.com/pingcap/log v1.1.0 h1:ELiPxACz7vdo1qAvvaWJg1NrYFoY6gqAh/+Uo6aXdD8= +github.com/pingcap/log v1.1.0/go.mod h1:DWQW5jICDR7UJh4HtxXSM20Churx4CQL0fwL/SoOSA4= +github.com/pingcap/tidb/pkg/parser v0.0.0-20260418072757-ce92298d1124 h1:zYmP5fBH+i2yhhU6f5uOol6zxHtR2/sD47BsJLfy0oU= +github.com/pingcap/tidb/pkg/parser v0.0.0-20260418072757-ce92298d1124/go.mod h1:zDLDsfNBU5+L6T4J9/OgWAHc/WZvMUjbpgHqQ/t3yKo= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pressly/goose/v3 v3.28.0 h1:D2M+iL31GmpZxSHOhX8mqyqAT3CXnokUmm0eKoSP+Vc= +github.com/pressly/goose/v3 v3.28.0/go.mod h1:v26MOuB8bL3kzzrt3Vqhb3R0PRVsl8hFQKdrht/L6Rk= +github.com/redis/go-redis/v9 v9.22.0 h1:laDvpYXTJtZLloinw1fA5Kqd6HAEH2XKxOkG/PDq2F0= +github.com/redis/go-redis/v9 v9.22.0/go.mod h1:y2g0Wj8rQvuK0ELM+oxSudcLtC09JScs98I/X9gRWY4= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= +github.com/riza-io/grpc-go v0.2.0 h1:2HxQKFVE7VuYstcJ8zqpN84VnAoJ4dCL6YFhJewNcHQ= +github.com/riza-io/grpc-go v0.2.0/go.mod h1:2bDvR9KkKC3KhtlSHfR3dAXjUMT86kg4UfWFyVGWqi8= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0= @@ -97,6 +173,8 @@ github.com/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDc github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik= github.com/segmentio/asm v1.2.1 h1:DTNbBqs57ioxAD4PrArqftgypG4/qNpXoJx8TVXxPR0= github.com/segmentio/asm v1.2.1/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= +github.com/sethvargo/go-retry v0.4.0 h1:9qy1OoIAxBL+gBYnkTnTnWle5wlfsXQlwRzIbbpdqPw= +github.com/sethvargo/go-retry v0.4.0/go.mod h1:tvsjdKG6xfiCx4LSiUZ06kcv38xvdVQwv8R6/VnnVWg= github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrelhe64i8F6HNlS8pkoyMv5sreGx2Ry5Rw= @@ -112,16 +190,28 @@ github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU= github.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjbTCAY= +github.com/sqlc-dev/doubleclick v1.0.0 h1:2/OApfQ2eLgcfa/Fqs8WSMA6atH0G8j9hHbQIgMfAXI= +github.com/sqlc-dev/doubleclick v1.0.0/go.mod h1:ODHRroSrk/rr5neRHlWMSRijqOak8YmNaO3VAZCNl5Y= +github.com/sqlc-dev/sqlc v1.31.1 h1:+V+BjBJfFNPX/RFfL8eiZD9jk9lVJUEGGllWvnYNqbc= +github.com/sqlc-dev/sqlc v1.31.1/go.mod h1:6ZPww/Jd3G6MzJeW6NrqizjL+52vYNaaXP9yMeJ/Nao= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4= github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= +github.com/tetratelabs/wazero v1.11.0 h1:+gKemEuKCTevU4d7ZTzlsvgd1uaToIDtlQlmNbwqYhA= +github.com/tetratelabs/wazero v1.11.0/go.mod h1:eV28rsN8Q+xwjogd7f4/Pp4xFxO7uOGbLcD/LzB1wiU= github.com/vektra/mockery/v3 v3.8.0 h1:Tklqcx844iV8GtYziqJXam1a8RdcKip4UErMa66Nxps= github.com/vektra/mockery/v3 v3.8.0/go.mod h1:K+L72OoFVizA9eWtO4L+kU65oylgreiJEJ57Gu8g9Ew= +github.com/wasilibs/go-pgquery v0.0.0-20250409022910-10ac41983c07 h1:mJdDDPblDfPe7z7go8Dvv1AJQDI3eQ/5xith3q2mFlo= +github.com/wasilibs/go-pgquery v0.0.0-20250409022910-10ac41983c07/go.mod h1:Ak17IJ037caFp4jpCw/iQQ7/W74Sqpb1YuKJU6HTKfM= +github.com/wasilibs/wazero-helpers v0.0.0-20240620070341-3dff1577cd52 h1:OvLBa8SqJnZ6P+mjlzc2K7PM22rRUPE1x32G9DTPrC4= +github.com/wasilibs/wazero-helpers v0.0.0-20240620070341-3dff1577cd52/go.mod h1:jMeV4Vpbi8osrE/pKUxRZkVaA0EX7NZN0A9/oRzgpgY= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -131,10 +221,33 @@ github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17 github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/yuin/goldmark v1.8.2 h1:kEGpgqJXdgbkhcOgBxkC0X0PmoPG1ZyoZ117rDVp4zE= github.com/yuin/goldmark v1.8.2/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg= +github.com/zeebo/xxh3 v1.1.0 h1:s7DLGDK45Dyfg7++yxI0khrfwq9661w9EN78eP/UZVs= +github.com/zeebo/xxh3 v1.1.0/go.mod h1:IisAie1LELR4xhVinxWS5+zf1lA4p0MW4T+w+W07F5s= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/otel v1.46.0 h1:FHt5/CDyVxi/8IM1CH7VE/rRgq3kLHa2mSTVMO8AWyc= +go.opentelemetry.io/otel v1.46.0/go.mod h1:Gj3SEScelsNC45tp4nSxRYlS+f5iez7W8XPMCt905kE= +go.opentelemetry.io/otel/metric v1.46.0 h1:yBnkXvgV7AXFILZc5K6IZe/CBFF3OS7BJ8ov6/lj0K8= +go.opentelemetry.io/otel/metric v1.46.0/go.mod h1:iPmdWqifKUdzziPkvvzIJXITl56fQx2mGM/DHLB3/2o= +go.opentelemetry.io/otel/sdk v1.45.0 h1:4VVSMgQ83dUgW2aoX5f6JgLvHwIvzcuLnF9lUdCSpCw= +go.opentelemetry.io/otel/sdk v1.45.0/go.mod h1:Sr40LgXV7DsKMMJMKOhUWOgMWTfAaqvm2kF0g7ilwuA= +go.opentelemetry.io/otel/sdk/metric v1.45.0 h1:oVFszMfyj1Am6s24Vtc7wBb8BKLcwepJjNEYILuiE3o= +go.opentelemetry.io/otel/sdk/metric v1.45.0/go.mod h1:vUWUxDZvu1WVRj8JA8S0AdhsPrZoDpA2DdZauIh4mDA= +go.opentelemetry.io/otel/trace v1.46.0 h1:OULy7ccdJnZtJ0UDYFOIGaCmiWzJ8Vi2G/Rsu60qs1c= +go.opentelemetry.io/otel/trace v1.46.0/go.mod h1:J7GAXweO77XSFkB/rmAqk9D6ihszhFjLU+d9WuUxDLI= +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= +go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.28.0 h1:IZzaP1Fv73/T/pBMLk4VutPl36uNC+OSUh3JLG3FIjo= go.uber.org/zap v1.28.0/go.mod h1:rDLpOi171uODNm/mxFcuYWxDsqWSAVkFdX4XojSKg/Q= go.uber.org/zap/exp v0.3.0 h1:6JYzdifzYkGmTdRR59oYH+Ng7k49H9qVpWwNSsGJj3U= @@ -142,16 +255,22 @@ go.uber.org/zap/exp v0.3.0/go.mod h1:5I384qq7XGxYyByIhHm6jg5CHkGY0nsTfbDLgDDlgJQ go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.57.0 h1:3ZVCjf8Ggz7zneR/EHRVx68Ctf+2pmIMP2UFhh9cC6M= golang.org/x/crypto v0.57.0/go.mod h1:Fdz0i5U6CoizGwLda9DttjSk6qlZo25zYNtR+ycvuZA= -golang.org/x/exp v0.0.0-20260212183809-81e46e3db34a h1:ovFr6Z0MNmU7nH8VaX5xqw+05ST2uO1exVfZPVqRC5o= -golang.org/x/exp v0.0.0-20260212183809-81e46e3db34a/go.mod h1:K79w1Vqn7PoiZn+TkNpx3BUWUQksGO3JcVX6qIjytmA= +golang.org/x/exp v0.0.0-20260824195058-e88cd73687aa h1:QSyA8ishJCyT21kER9KwNt0b7BM3iRK4x9QXhjN5Fdk= +golang.org/x/exp v0.0.0-20260824195058-e88cd73687aa/go.mod h1:zeBbvyFKDaLwa7CH/zI8KXt7gTl14SF7sO08Pl5jBCM= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.41.0 h1:qJmnOUb4YB+FsEuM3HcWucdZASCPGhsX6uljO6pog0c= golang.org/x/mod v0.41.0/go.mod h1:Ek9pY8RKWXwsWvd3rQiHYtMqkjSUV+s1Rj7j4H5Ur6o= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= golang.org/x/net v0.58.0/go.mod h1:YwCddHnFlT7eLQqVprV19OnhLGtc5xOKgE0RyqgfWAU= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.23.0 h1:KameEIfc1IkluZyXWLn39Wd4tURc6GbCiISGiZm2bQk= golang.org/x/sync v0.23.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -159,14 +278,45 @@ golang.org/x/sys v0.48.0 h1:bbX/i/6MgT9BVLM9RT1thmxL04yeTAhbEz4SyadbXoo= golang.org/x/sys v0.48.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og= golang.org/x/term v0.46.0 h1:3+OXuTbaKDgwk8jTi3aSLHRlmWqHEUDUtxnbFigO4YE= golang.org/x/term v0.46.0/go.mod h1:+K02xbkittuwc0Am4abfA3Fc+XRGXkvBXNO88NCXPoc= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.42.0 h1:JbOZXgfeCPU9gacVtYliJqOhD+zhrEqK4LfdpmlUZqI= golang.org/x/text v0.42.0/go.mod h1:ojzP1Z+2QtioaF8DTtO8K5q7JWVVYwZKenzujK0Zd0E= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4= +gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E= +google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa h1:Kjn0N0tCrDgiAFW+lGO4JZ3ck44CehvJQMAwj9QF0G8= +google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa/go.mod h1:q4lMZS6kskjT5HvCPrnnypcDPVJqT/f4nfxmkE7gryY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260831171406-18b4a7587f8a h1:3Dnd1cDaZlB68lziofO+bJXpjOy8UfRv8Unt+yH8tQ4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260831171406-18b4a7587f8a/go.mod h1:DjtHYE8FKJLivXcBEjGwndXfIC23G0VpXiXKqG179uA= +google.golang.org/grpc v1.83.2 h1:EManeRomTObA0BU7I8vXgg/78uE5MJ9M8B39EX2WscU= +google.golang.org/grpc v1.83.2/go.mod h1:YPI1hK3kDked6iHvgX3tR0y+nX/qpMFKhPgFsokw1S8= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= +gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +modernc.org/libc v1.75.6 h1:yKk8qo+Di4gkmvRboK8ocCqH22FiUCR6jRy2OwtCRus= +modernc.org/libc v1.75.6/go.mod h1:bO5o2ztHxBb2rjz0PgdHN0sSMw57CgxGFLZ3Qd/QpVQ= +modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU= +modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg= +modernc.org/memory v1.12.1 h1:nFMiWrpStgZczNl6XI9GnIk/rWhYIyHGUaR04pGbp9g= +modernc.org/memory v1.12.1/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw= +modernc.org/sqlite v1.57.0 h1:qNQP6xnx5M0ISNtlnxoOX0+cD5bJ0/gr9aMmndFczzg= +modernc.org/sqlite v1.57.0/go.mod h1:yCJ2cmAaIkHQ25oXWrF8H4O1lIfPYPR26yCEDj2P3pQ= diff --git a/internal/config/config.go b/internal/config/config.go index 38caaea0..61ddac98 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -1,9 +1,13 @@ package config import ( + "errors" "fmt" "log/slog" "net" + "net/url" + "os" + "path/filepath" "reflect" "strconv" "strings" @@ -15,35 +19,134 @@ import ( "mtusi-messenger/internal/logger" ) -const envPrefix = "APP" +const ( + configEnvKey = "APP_CONFIG" + envKey = "APP_ENV" + configName = "config" + defaultEnv = "dev" + configDir = "./config/" +) type Config struct { + Env string `mapstructure:"env" validate:"omitempty,eq=dev"` + Server Server `mapstructure:"server"` + Log Log `mapstructure:"log"` + Postgres Postgres `mapstructure:"postgres"` + Redis Redis `mapstructure:"redis"` + Cache Cache `mapstructure:"cache"` + Session Session `mapstructure:"session"` +} + +type Session struct { + TTLSeconds int `mapstructure:"ttl_seconds" validate:"required,gt=0"` +} + +type Redis struct { + Enabled bool `mapstructure:"enabled"` + Host string `mapstructure:"host" validate:"omitempty,hostname|ip"` + Port int `mapstructure:"port" validate:"omitempty,min=1,max=65535"` + Password string `mapstructure:"password"` + DB int `mapstructure:"db" validate:"omitempty,gte=0,lte=15"` + MaxRetries int `mapstructure:"max_retries" validate:"omitempty,gte=-1"` + DialTimeout time.Duration `mapstructure:"dial_timeout" validate:"omitempty,gt=0"` + ReadTimeout time.Duration `mapstructure:"read_timeout" validate:"omitempty,gt=0"` + WriteTimeout time.Duration `mapstructure:"write_timeout" validate:"omitempty,gt=0"` + PoolSize int `mapstructure:"pool_size" validate:"omitempty,gt=0"` +} + +type Cache struct { + Enabled bool `mapstructure:"enabled"` + ChatListTTL time.Duration `mapstructure:"chat_list_ttl" validate:"required,gt=0"` + LockTTL time.Duration `mapstructure:"lock_ttl" validate:"required,gt=1s"` + LockWaitTimeout time.Duration `mapstructure:"lock_wait_timeout" validate:"required,gt=0"` +} + +type Server struct { Host string `mapstructure:"host" validate:"required,hostname|ip"` Port int `mapstructure:"port" validate:"required,min=1,max=65535"` ReadHeaderTimeout time.Duration `mapstructure:"read_header_timeout" validate:"required,gt=0"` ShutdownTimeout time.Duration `mapstructure:"shutdown_timeout" validate:"required,gt=0"` - LogLevel string `mapstructure:"log_level" validate:"required,oneof=debug info warn error"` - LogFormat string `mapstructure:"log_format" validate:"required,oneof=json console"` +} + +type Log struct { + Level string `mapstructure:"level" validate:"required,oneof=debug info warn error"` + Format string `mapstructure:"format" validate:"required,oneof=json console"` +} + +type Postgres struct { + Host string `mapstructure:"host" validate:"omitempty,hostname|ip"` + Port int `mapstructure:"port" validate:"omitempty,min=1,max=65535"` + Database string `mapstructure:"database" validate:"omitempty,min=1"` + User string `mapstructure:"user" validate:"omitempty,min=1"` + Password string `mapstructure:"password"` + SSLMode string `mapstructure:"ssl_mode" validate:"omitempty,oneof=disable require verify-ca verify-full"` + MaxConns int32 `mapstructure:"max_conns" validate:"omitempty,gt=0"` + MinConns int32 `mapstructure:"min_conns" validate:"omitempty,gte=0"` + MaxConnLifetime time.Duration `mapstructure:"max_conn_lifetime" validate:"omitempty,gt=0"` + MaxConnIdleTime time.Duration `mapstructure:"max_conn_idle_time" validate:"omitempty,gt=0"` + ConnectTimeout time.Duration `mapstructure:"connect_timeout" validate:"omitempty,gt=0"` + QueryTimeout time.Duration `mapstructure:"query_timeout" validate:"omitempty,gt=0"` +} + +func (p Postgres) DSN() string { + u := &url.URL{ + Scheme: "postgres", + Host: net.JoinHostPort(p.Host, strconv.Itoa(p.Port)), + Path: "/" + p.Database, + } + + if p.Password == "" { + u.User = url.User(p.User) + } else { + u.User = url.UserPassword(p.User, p.Password) + } + + query := url.Values{} + query.Set("sslmode", p.SSLMode) + u.RawQuery = query.Encode() + + return u.String() } var defaults = map[string]any{ - "host": "0.0.0.0", - "port": 8080, - "read_header_timeout": "10s", - "shutdown_timeout": "10s", - "log_level": "info", - "log_format": "json", + "env": "dev", + "server.host": "0.0.0.0", + "server.port": 8080, + "server.read_header_timeout": "10s", + "server.shutdown_timeout": "10s", + "log.level": "info", + "log.format": "json", + "session.ttl_seconds": 3600, + "redis.enabled": false, + "redis.host": "localhost", + "redis.port": 6379, + "redis.db": 0, + "redis.max_retries": -1, + "redis.dial_timeout": "300ms", + "redis.read_timeout": "200ms", + "redis.write_timeout": "200ms", + "redis.pool_size": 10, + "cache.enabled": false, + "cache.chat_list_ttl": "5m", + "cache.lock_ttl": "10s", + "cache.lock_wait_timeout": "2s", } func Load() (Config, error) { v := viper.New() - v.SetEnvPrefix(envPrefix) + if err := configureSource(v); err != nil { + return Config{}, err + } + v.AllowEmptyEnv(true) v.AutomaticEnv() + v.SetEnvKeyReplacer(strings.NewReplacer(".", "_")) - for key, value := range defaults { - v.SetDefault(key, value) + for key := range defaults { + if err := v.BindEnv(key); err != nil { + return Config{}, fmt.Errorf("bind env %q: %w", key, err) + } } var cfg Config @@ -55,21 +158,64 @@ func Load() (Config, error) { return Config{}, fmt.Errorf("validate config: %w", err) } + if err := cfg.validateDependencies(); err != nil { + return Config{}, err + } + return cfg, nil } +func (c Config) validateDependencies() error { + if c.Cache.Enabled && !c.Redis.Enabled { + return errors.New("validate config: cache.enabled requires redis.enabled") + } + + return nil +} + +func configureSource(v *viper.Viper) error { + for key, value := range defaults { + v.SetDefault(key, value) + } + + v.SetConfigType("yaml") + + if path := os.Getenv(configEnvKey); path != "" { + v.SetConfigFile(path) + } else { + env := os.Getenv(envKey) + if env == "" { + env = defaultEnv + } + + v.SetConfigName(configName) + v.AddConfigPath(filepath.Join(configDir, env)) + } + + if err := v.ReadInConfig(); err != nil { + var notFound viper.ConfigFileNotFoundError + if errors.As(err, ¬Found) { + return nil + } + + return fmt.Errorf("read config: %w", err) + } + + return nil +} + func (c Config) Addr() string { - return net.JoinHostPort(c.Host, strconv.Itoa(c.Port)) + return net.JoinHostPort(c.Server.Host, strconv.Itoa(c.Server.Port)) } func (c Config) SlogLevel() slog.Level { - level, _ := logger.ParseLevel(c.LogLevel) + level, _ := logger.ParseLevel(c.Log.Level) return level } func (c Config) LoggerFormat() logger.Format { - format, _ := logger.ParseFormat(c.LogFormat) + format, _ := logger.ParseFormat(c.Log.Format) return format } @@ -89,5 +235,5 @@ func envName(field reflect.StructField) string { return field.Name } - return envPrefix + "_" + strings.ToUpper(key) + return strings.ToUpper(key) } diff --git a/internal/config/config_test.go b/internal/config/config_test.go index 40d9df61..ccd3abc7 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -1,178 +1,274 @@ package config_test import ( + "os" + "path/filepath" "testing" "time" "github.com/go-playground/validator/v10" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/stretchr/testify/suite" "mtusi-messenger/internal/config" "mtusi-messenger/internal/logger" ) -type ConfigSuite struct { - suite.Suite -} - -func TestConfigSuite(t *testing.T) { - suite.Run(t, new(ConfigSuite)) -} - -func (s *ConfigSuite) TestDefaults() { +func TestDefaults(t *testing.T) { cfg, err := config.Load() - s.Require().NoError(err) + require.NoError(t, err) - s.Equal("0.0.0.0", cfg.Host) - s.Equal(8080, cfg.Port) - s.Equal(10*time.Second, cfg.ReadHeaderTimeout) - s.Equal(10*time.Second, cfg.ShutdownTimeout) - s.Equal("info", cfg.LogLevel) - s.Equal("json", cfg.LogFormat) + assert.Equal(t, "0.0.0.0", cfg.Server.Host) + assert.Equal(t, 8080, cfg.Server.Port) + assert.Equal(t, 10*time.Second, cfg.Server.ReadHeaderTimeout) + assert.Equal(t, 10*time.Second, cfg.Server.ShutdownTimeout) + assert.Equal(t, "info", cfg.Log.Level) + assert.Equal(t, "json", cfg.Log.Format) + assert.Equal(t, config.Postgres{}, cfg.Postgres, "postgres defaults live in the adapter") } -func (s *ConfigSuite) TestEnvOverridesDefaults() { - s.T().Setenv("APP_HOST", "127.0.0.1") - s.T().Setenv("APP_PORT", "9090") - s.T().Setenv("APP_READ_HEADER_TIMEOUT", "3s") - s.T().Setenv("APP_SHUTDOWN_TIMEOUT", "30s") - s.T().Setenv("APP_LOG_LEVEL", "debug") - s.T().Setenv("APP_LOG_FORMAT", "console") +func TestEnvOverridesDefaults(t *testing.T) { + t.Setenv("SERVER_HOST", "127.0.0.1") + t.Setenv("SERVER_PORT", "9090") + t.Setenv("SERVER_READ_HEADER_TIMEOUT", "3s") + t.Setenv("SERVER_SHUTDOWN_TIMEOUT", "30s") + t.Setenv("LOG_LEVEL", "debug") + t.Setenv("LOG_FORMAT", "console") cfg, err := config.Load() - s.Require().NoError(err) + require.NoError(t, err) - s.Equal("127.0.0.1", cfg.Host) - s.Equal(9090, cfg.Port) - s.Equal(3*time.Second, cfg.ReadHeaderTimeout) - s.Equal(30*time.Second, cfg.ShutdownTimeout) - s.Equal("debug", cfg.LogLevel) - s.Equal("console", cfg.LogFormat) + assert.Equal(t, "127.0.0.1", cfg.Server.Host) + assert.Equal(t, 9090, cfg.Server.Port) + assert.Equal(t, 3*time.Second, cfg.Server.ReadHeaderTimeout) + assert.Equal(t, 30*time.Second, cfg.Server.ShutdownTimeout) + assert.Equal(t, "debug", cfg.Log.Level) + assert.Equal(t, "console", cfg.Log.Format) } -func (s *ConfigSuite) TestLoggerSettings() { - s.T().Setenv("APP_LOG_LEVEL", "warn") - s.T().Setenv("APP_LOG_FORMAT", "console") - - cfg, err := config.Load() - s.Require().NoError(err) - - level, err := logger.ParseLevel(cfg.LogLevel) - s.Require().NoError(err) - s.Equal(level, cfg.SlogLevel()) - - format, err := logger.ParseFormat(cfg.LogFormat) - s.Require().NoError(err) - s.Equal(format, cfg.LoggerFormat()) -} - -func (s *ConfigSuite) TestAddr() { - s.T().Setenv("APP_HOST", "0.0.0.0") - s.T().Setenv("APP_PORT", "8080") - - cfg, err := config.Load() - s.Require().NoError(err) - - s.Equal("0.0.0.0:8080", cfg.Addr()) -} - -func (s *ConfigSuite) TestAddrWithIPv6Host() { - s.T().Setenv("APP_HOST", "::1") - - cfg, err := config.Load() - s.Require().NoError(err) - - s.Equal("[::1]:8080", cfg.Addr()) -} - -func (s *ConfigSuite) TestInvalidValues() { - tests := map[string]struct { - env map[string]string - wantField string - wantTag string - }{ - "пустой host": { - env: map[string]string{"APP_HOST": ""}, - wantField: "APP_HOST", - wantTag: "required", - }, - "host не адрес и не имя": { - env: map[string]string{"APP_HOST": "не адрес"}, - wantField: "APP_HOST", - wantTag: "hostname|ip", - }, - "порт ниже диапазона": { - env: map[string]string{"APP_PORT": "0"}, - wantField: "APP_PORT", - wantTag: "required", - }, - "порт выше диапазона": { - env: map[string]string{"APP_PORT": "65536"}, - wantField: "APP_PORT", - wantTag: "max", - }, - "нулевой read header timeout": { - env: map[string]string{"APP_READ_HEADER_TIMEOUT": "0s"}, - wantField: "APP_READ_HEADER_TIMEOUT", - wantTag: "required", - }, - "отрицательный shutdown timeout": { - env: map[string]string{"APP_SHUTDOWN_TIMEOUT": "-1s"}, - wantField: "APP_SHUTDOWN_TIMEOUT", - wantTag: "gt", - }, - "неизвестный уровень логирования": { - env: map[string]string{"APP_LOG_LEVEL": "trace"}, - wantField: "APP_LOG_LEVEL", - wantTag: "oneof", - }, - "неизвестный формат логирования": { - env: map[string]string{"APP_LOG_FORMAT": "xml"}, - wantField: "APP_LOG_FORMAT", - wantTag: "oneof", - }, +func TestDsnEncodesCredentials(t *testing.T) { + cfg := config.Postgres{ + Host: "db", + Port: 5432, + Database: "app", + User: "user", + Password: "p@ss:w/rd", + SSLMode: "disable", } - for name, tt := range tests { - s.Run(name, func() { - for key, value := range tt.env { - s.T().Setenv(key, value) - } - - _, err := config.Load() - s.Require().Error(err) - - var validationErrs validator.ValidationErrors - s.Require().ErrorAs(err, &validationErrs) - s.Require().Len(validationErrs, 1) - - s.Equal(tt.wantField, validationErrs[0].Field()) - s.Equal(tt.wantTag, validationErrs[0].Tag()) - }) - } + assert.Equal(t, "postgres://user:p%40ss%3Aw%2Frd@db:5432/app?sslmode=disable", cfg.DSN()) } -func (s *ConfigSuite) TestUnparsableValues() { +func writeConfig(t *testing.T, body string) string { + t.Helper() + + path := filepath.Join(t.TempDir(), "config.yaml") + require.NoError(t, os.WriteFile(path, []byte(body), 0o600)) + + return path +} + +func TestLoadsYAMLFile(t *testing.T) { + path := writeConfig(t, ` +env: dev +server: + host: 10.0.0.1 + port: 9999 + read_header_timeout: 3s + shutdown_timeout: 7s +log: + level: debug + format: console +postgres: + host: db + port: 5433 + database: app + user: app + password: secret + ssl_mode: disable + max_conns: 7 + min_conns: 2 + max_conn_lifetime: 2h + max_conn_idle_time: 10m + connect_timeout: 2s + query_timeout: 3s +`) + + t.Setenv("APP_CONFIG", path) + + cfg, err := config.Load() + require.NoError(t, err) + + assert.Equal(t, "10.0.0.1", cfg.Server.Host) + assert.Equal(t, 9999, cfg.Server.Port) + assert.Equal(t, 3*time.Second, cfg.Server.ReadHeaderTimeout) + assert.Equal(t, "debug", cfg.Log.Level) + assert.Equal(t, "console", cfg.Log.Format) + assert.Equal(t, "db", cfg.Postgres.Host) + assert.Equal(t, 5433, cfg.Postgres.Port) + assert.Equal(t, "app", cfg.Postgres.Database) + assert.Equal(t, int32(7), cfg.Postgres.MaxConns) + assert.Equal(t, 2*time.Second, cfg.Postgres.ConnectTimeout) +} + +func TestEnvOverridesYAML(t *testing.T) { + path := writeConfig(t, ` +env: dev +server: + host: 10.0.0.1 + port: 9999 + read_header_timeout: 3s + shutdown_timeout: 7s +log: + level: debug + format: console +postgres: + host: db + port: 5433 + database: app + user: app + password: file + ssl_mode: disable +`) + + t.Setenv("APP_CONFIG", path) + t.Setenv("SERVER_HOST", "127.0.0.1") + t.Setenv("POSTGRES_PASSWORD", "env") + + cfg, err := config.Load() + require.NoError(t, err) + + assert.Equal(t, "127.0.0.1", cfg.Server.Host, "env переопределяет YAML") + assert.Equal(t, 9999, cfg.Server.Port) + assert.Equal(t, "env", cfg.Postgres.Password) +} + +func TestSessionTTLFromContractEnv(t *testing.T) { + t.Setenv("SESSION_TTL_SECONDS", "2") + + cfg, err := config.Load() + require.NoError(t, err) + + assert.Equal(t, 2, cfg.Session.TTLSeconds) +} + +func TestInvalidValues(t *testing.T) { tests := map[string]map[string]string{ - "порт не число": {"APP_PORT": "не-число"}, - "timeout не длительность": {"APP_READ_HEADER_TIMEOUT": "быстро"}, + "пустой server.host": {"SERVER_HOST": ""}, + "host не адрес и не имя": {"SERVER_HOST": "не адрес"}, + "порт ниже диапазона": {"SERVER_PORT": "0"}, + "порт выше диапазона": {"SERVER_PORT": "65536"}, + "нулевой read header timeout": {"SERVER_READ_HEADER_TIMEOUT": "0s"}, + "отрицательный shutdown": {"SERVER_SHUTDOWN_TIMEOUT": "-1s"}, + "неизвестный log level": {"LOG_LEVEL": "trace"}, + "неизвестный log format": {"LOG_FORMAT": "xml"}, } for name, env := range tests { - s.Run(name, func() { + t.Run(name, func(t *testing.T) { for key, value := range env { - s.T().Setenv(key, value) + t.Setenv(key, value) } _, err := config.Load() - s.Require().Error(err) + require.Error(t, err) + + var validationErrs validator.ValidationErrors + require.ErrorAs(t, err, &validationErrs) + require.NotEmpty(t, validationErrs) }) } } +func TestInvalidPostgresValues(t *testing.T) { + path := writeConfig(t, ` +env: dev +postgres: + host: db + port: 5432 + database: messenger + user: messenger + ssl_mode: disable + max_conns: 10 +`) + + tests := map[string]map[string]string{ + "неизвестный ssl mode": {"POSTGRES_SSL_MODE": "bogus"}, + "отрицательный max_conns": {"POSTGRES_MAX_CONNS": "-1"}, + } + + for name, env := range tests { + t.Run(name, func(t *testing.T) { + t.Setenv("APP_CONFIG", path) + for key, value := range env { + t.Setenv(key, value) + } + + _, err := config.Load() + require.Error(t, err) + + var validationErrs validator.ValidationErrors + require.ErrorAs(t, err, &validationErrs) + require.NotEmpty(t, validationErrs) + }) + } +} + +func TestUnparsableValues(t *testing.T) { + tests := map[string]map[string]string{ + "порт не число": {"SERVER_PORT": "не-число"}, + "timeout не duration": {"SERVER_READ_HEADER_TIMEOUT": "быстро"}, + } + + for name, env := range tests { + t.Run(name, func(t *testing.T) { + for key, value := range env { + t.Setenv(key, value) + } + + _, err := config.Load() + require.Error(t, err) + }) + } +} + +func TestLoggerSettings(t *testing.T) { + t.Setenv("LOG_LEVEL", "warn") + t.Setenv("LOG_FORMAT", "console") + + cfg, err := config.Load() + require.NoError(t, err) + + level, err := logger.ParseLevel(cfg.Log.Level) + require.NoError(t, err) + assert.Equal(t, level, cfg.SlogLevel()) + + format, err := logger.ParseFormat(cfg.Log.Format) + require.NoError(t, err) + assert.Equal(t, format, cfg.LoggerFormat()) +} + +func TestAddr(t *testing.T) { + t.Setenv("SERVER_HOST", "0.0.0.0") + t.Setenv("SERVER_PORT", "8080") + + cfg, err := config.Load() + require.NoError(t, err) + + assert.Equal(t, "0.0.0.0:8080", cfg.Addr()) +} + +func TestAddrWithIPv6Host(t *testing.T) { + t.Setenv("SERVER_HOST", "::1") + + cfg, err := config.Load() + require.NoError(t, err) + + assert.Equal(t, "[::1]:8080", cfg.Addr()) +} + func TestLoadIsIndependentOfProcessState(t *testing.T) { - t.Setenv("APP_PORT", "7070") + t.Setenv("SERVER_PORT", "7070") first, err := config.Load() require.NoError(t, err) @@ -180,5 +276,68 @@ func TestLoadIsIndependentOfProcessState(t *testing.T) { second, err := config.Load() require.NoError(t, err) - require.Equal(t, first, second) + assert.Equal(t, first, second) +} + +func TestRedisDefaultsDisabled(t *testing.T) { + cfg, err := config.Load() + require.NoError(t, err) + + assert.False(t, cfg.Redis.Enabled) + assert.Equal(t, "localhost", cfg.Redis.Host) + assert.Equal(t, 6379, cfg.Redis.Port) + assert.Equal(t, -1, cfg.Redis.MaxRetries) + assert.Equal(t, 300*time.Millisecond, cfg.Redis.DialTimeout) + assert.Equal(t, 200*time.Millisecond, cfg.Redis.ReadTimeout) + assert.Equal(t, 200*time.Millisecond, cfg.Redis.WriteTimeout) + assert.False(t, cfg.Cache.Enabled) + assert.Equal(t, 5*time.Minute, cfg.Cache.ChatListTTL) + assert.Equal(t, 10*time.Second, cfg.Cache.LockTTL) + assert.Equal(t, 2*time.Second, cfg.Cache.LockWaitTimeout) +} + +func TestRedisEnvOverrides(t *testing.T) { + t.Setenv("REDIS_ENABLED", "true") + t.Setenv("REDIS_HOST", "cache") + t.Setenv("REDIS_PORT", "6380") + t.Setenv("CACHE_ENABLED", "true") + t.Setenv("CACHE_CHAT_LIST_TTL", "1m") + t.Setenv("CACHE_LOCK_TTL", "7s") + t.Setenv("CACHE_LOCK_WAIT_TIMEOUT", "1500ms") + + cfg, err := config.Load() + require.NoError(t, err) + + assert.True(t, cfg.Redis.Enabled) + assert.Equal(t, "cache", cfg.Redis.Host) + assert.Equal(t, 6380, cfg.Redis.Port) + assert.True(t, cfg.Cache.Enabled) + assert.Equal(t, time.Minute, cfg.Cache.ChatListTTL) + assert.Equal(t, 7*time.Second, cfg.Cache.LockTTL) + assert.Equal(t, 1500*time.Millisecond, cfg.Cache.LockWaitTimeout) +} + +func TestInvalidCacheTTL(t *testing.T) { + for _, key := range []string{ + "CACHE_CHAT_LIST_TTL", + "CACHE_LOCK_TTL", + "CACHE_LOCK_WAIT_TIMEOUT", + } { + for _, value := range []string{"0s", "-1s"} { + t.Run(key+"/"+value, func(t *testing.T) { + t.Setenv(key, value) + _, err := config.Load() + require.Error(t, err) + var validationErrs validator.ValidationErrors + require.ErrorAs(t, err, &validationErrs) + }) + } + } +} + +func TestCacheRequiresRedis(t *testing.T) { + t.Setenv("CACHE_ENABLED", "true") + + _, err := config.Load() + require.ErrorContains(t, err, "cache.enabled requires redis.enabled") } diff --git a/internal/domain/chat.go b/internal/domain/chat.go index a97a9745..94385283 100644 --- a/internal/domain/chat.go +++ b/internal/domain/chat.go @@ -30,7 +30,20 @@ func (d ChatDraft) Validate() error { return err } - if !slices.Contains(d.MemberIDs, d.CallerID) { + if len(d.MemberIDs) == 0 { + return fmt.Errorf("member_ids must not be empty: %w", ErrValidation) + } + + seen := make(map[uuid.UUID]struct{}, len(d.MemberIDs)) + for _, id := range d.MemberIDs { + if _, ok := seen[id]; ok { + return fmt.Errorf("member_ids contains duplicates: %w", ErrValidation) + } + + seen[id] = struct{}{} + } + + if _, ok := seen[d.CallerID]; !ok { return fmt.Errorf("member_ids must contain the caller: %w", ErrValidation) } diff --git a/internal/domain/errors.go b/internal/domain/errors.go index f0c235b2..9ab9b4cc 100644 --- a/internal/domain/errors.go +++ b/internal/domain/errors.go @@ -3,9 +3,12 @@ package domain import "errors" var ( - ErrNotFound = errors.New("not found") - ErrUsernameTaken = errors.New("username already taken") - ErrUnknownMember = errors.New("member does not exist") - ErrValidation = errors.New("validation failed") - ErrInvalidCursor = errors.New("invalid cursor") + ErrNotFound = errors.New("not found") + ErrUsernameTaken = errors.New("username already taken") + ErrUnknownMember = errors.New("member does not exist") + ErrValidation = errors.New("validation failed") + ErrInvalidCursor = errors.New("invalid cursor") + ErrConflict = errors.New("conflict") + ErrUnauthenticated = errors.New("unauthenticated") + ErrUnavailable = errors.New("temporarily unavailable") ) diff --git a/internal/domain/session.go b/internal/domain/session.go new file mode 100644 index 00000000..0aea153e --- /dev/null +++ b/internal/domain/session.go @@ -0,0 +1,19 @@ +package domain + +import ( + "time" + + "github.com/google/uuid" +) + +type Session struct { + Token string + ExpiresAt time.Time + User User +} + +type NewSession struct { + TokenHash []byte + UserID uuid.UUID + ExpiresAt time.Time +} diff --git a/internal/domain/user.go b/internal/domain/user.go index fcf652d9..5bb4ffe0 100644 --- a/internal/domain/user.go +++ b/internal/domain/user.go @@ -1,6 +1,7 @@ package domain import ( + "fmt" "time" "github.com/google/uuid" @@ -16,8 +17,28 @@ type User struct { type UserDraft struct { Username string DisplayName string + Password string } func (d UserDraft) Validate() error { - return validateNotBlank("display_name", d.DisplayName) + if err := validateNotBlank("display_name", d.DisplayName); err != nil { + return err + } + + if length := len([]rune(d.Password)); length < 12 || length > 128 { + return fmt.Errorf("password length must be between 12 and 128 code points: %w", ErrValidation) + } + + return nil +} + +type NewUser struct { + Username string + DisplayName string + PasswordHash string +} + +type UserCredentials struct { + User User + PasswordHash string } diff --git a/internal/domain/validation_test.go b/internal/domain/validation_test.go index 6cd6335a..ad400e1a 100644 --- a/internal/domain/validation_test.go +++ b/internal/domain/validation_test.go @@ -26,7 +26,28 @@ func TestUserDraftRejectsBlankDisplayName(t *testing.T) { func TestUserDraftAcceptsVisibleName(t *testing.T) { t.Parallel() - draft := domain.UserDraft{Username: "alice", DisplayName: "Алиса"} + draft := domain.UserDraft{Username: "alice", DisplayName: "Алиса", Password: "very-secret-password"} + assert.NoError(t, draft.Validate()) +} + +func TestUserDraftRejectsShortPassword(t *testing.T) { + t.Parallel() + + draft := domain.UserDraft{Username: "alice", DisplayName: "Алиса", Password: "too-short"} + require.ErrorIs(t, draft.Validate(), domain.ErrValidation) +} + +func TestUserDraftRejectsTooLongPassword(t *testing.T) { + t.Parallel() + + draft := domain.UserDraft{Username: "alice", DisplayName: "Алиса", Password: strings.Repeat("a", 129)} + require.ErrorIs(t, draft.Validate(), domain.ErrValidation) +} + +func TestUserDraftAcceptsMinimalPassword(t *testing.T) { + t.Parallel() + + draft := domain.UserDraft{Username: "alice", DisplayName: "Алиса", Password: strings.Repeat("a", 12)} assert.NoError(t, draft.Validate()) } diff --git a/internal/health/checker.go b/internal/health/checker.go new file mode 100644 index 00000000..86fc3228 --- /dev/null +++ b/internal/health/checker.go @@ -0,0 +1,28 @@ +package health + +import ( + "context" + "fmt" +) + +type Pinger interface { + Ping(ctx context.Context) error +} + +type Checker struct { + pingers []Pinger +} + +func New(pingers ...Pinger) *Checker { + return &Checker{pingers: pingers} +} + +func (c *Checker) Ping(ctx context.Context) error { + for _, pinger := range c.pingers { + if err := pinger.Ping(ctx); err != nil { + return fmt.Errorf("ping %T: %w", pinger, err) + } + } + + return nil +} diff --git a/internal/health/checker_test.go b/internal/health/checker_test.go new file mode 100644 index 00000000..e379655b --- /dev/null +++ b/internal/health/checker_test.go @@ -0,0 +1,33 @@ +package health_test + +import ( + "context" + "errors" + "testing" + + "github.com/stretchr/testify/require" + + "mtusi-messenger/internal/health" +) + +type stubPinger struct { + err error +} + +func (s stubPinger) Ping(context.Context) error { return s.err } + +func TestCheckerPassesWhenAllHealthy(t *testing.T) { + t.Parallel() + + checker := health.New(stubPinger{}, stubPinger{}) + require.NoError(t, checker.Ping(context.Background())) +} + +func TestCheckerReturnsFirstFailure(t *testing.T) { + t.Parallel() + + sentinel := errors.New("dependency down") + checker := health.New(stubPinger{}, stubPinger{err: sentinel}, stubPinger{err: errors.New("later")}) + + require.ErrorIs(t, checker.Ping(context.Background()), sentinel) +} diff --git a/internal/platform/cache/cache.go b/internal/platform/cache/cache.go new file mode 100644 index 00000000..57f070d6 --- /dev/null +++ b/internal/platform/cache/cache.go @@ -0,0 +1,31 @@ +package cache + +import ( + "context" + "errors" + "time" +) + +var ErrCacheMiss = errors.New("cache miss") + +type Cache interface { + Get(ctx context.Context, key string) ([]byte, error) + Set(ctx context.Context, key string, value []byte, ttl time.Duration) error + Delete(ctx context.Context, keys ...string) error + Ping(ctx context.Context) error + Close() error +} + +type NoOpCache struct{} + +func (NoOpCache) Get(context.Context, string) ([]byte, error) { return nil, ErrCacheMiss } +func (NoOpCache) Set(context.Context, string, []byte, time.Duration) error { return nil } +func (NoOpCache) Delete(context.Context, ...string) error { return nil } +func (NoOpCache) AcquireLock(context.Context, string, string, time.Duration) (bool, error) { + return true, nil +} + +func (NoOpCache) ReleaseLock(context.Context, string, string) (bool, error) { return true, nil } +func (NoOpCache) LockHeld(context.Context, string) (bool, error) { return false, nil } +func (NoOpCache) Ping(context.Context) error { return nil } +func (NoOpCache) Close() error { return nil } diff --git a/internal/platform/cache/cache_test.go b/internal/platform/cache/cache_test.go new file mode 100644 index 00000000..757c03df --- /dev/null +++ b/internal/platform/cache/cache_test.go @@ -0,0 +1,31 @@ +package cache_test + +import ( + "testing" + "time" + + "github.com/stretchr/testify/require" + + "mtusi-messenger/internal/platform/cache" +) + +func TestNoOpCache(t *testing.T) { + t.Parallel() + ctx := t.Context() + store := cache.NoOpCache{} + require.NoError(t, store.Set(ctx, "key", []byte("value"), time.Minute)) + _, err := store.Get(ctx, "key") + require.ErrorIs(t, err, cache.ErrCacheMiss) + require.NoError(t, store.Delete(ctx, "key")) + acquired, err := store.AcquireLock(ctx, "lock", "token", time.Second) + require.NoError(t, err) + require.True(t, acquired) + held, err := store.LockHeld(ctx, "lock") + require.NoError(t, err) + require.False(t, held) + released, err := store.ReleaseLock(ctx, "lock", "token") + require.NoError(t, err) + require.True(t, released) + require.NoError(t, store.Ping(ctx)) + require.NoError(t, store.Close()) +} diff --git a/internal/platform/cache/distributed.go b/internal/platform/cache/distributed.go new file mode 100644 index 00000000..43a5ead4 --- /dev/null +++ b/internal/platform/cache/distributed.go @@ -0,0 +1,307 @@ +package cache + +import ( + "bytes" + "context" + "crypto/rand" + "encoding/hex" + "errors" + "fmt" + "log/slog" + mathrand "math/rand/v2" + "strconv" + "sync/atomic" + "time" + + "golang.org/x/sync/singleflight" +) + +const ( + DefaultLockTTL = 10 * time.Second + DefaultWaitTimeout = 2 * time.Second + minLockTTL = time.Second + redisOpTimeout = 200 * time.Millisecond + releaseTimeout = 300 * time.Millisecond +) + +type DistributedConfig struct { + LockTTL time.Duration + WaitTimeout time.Duration +} + +type LockStore interface { + Cache + AcquireLock(ctx context.Context, key, token string, ttl time.Duration) (bool, error) + ReleaseLock(ctx context.Context, key, token string) (bool, error) + LockHeld(ctx context.Context, key string) (bool, error) +} + +type DistributedCache struct { + store LockStore + lockTTL time.Duration + waitTimeout time.Duration + log *slog.Logger + group singleflight.Group +} + +var fallbackTokenCounter atomic.Uint64 + +func NewDistributed(store LockStore, cfg DistributedConfig, log *slog.Logger) (*DistributedCache, error) { + if cfg.LockTTL <= 0 { + cfg.LockTTL = DefaultLockTTL + } + + if cfg.WaitTimeout <= 0 { + cfg.WaitTimeout = DefaultWaitTimeout + } + + if cfg.LockTTL <= minLockTTL { + return nil, fmt.Errorf("cache: lock ttl %s must be greater than %s", cfg.LockTTL, minLockTTL) + } + + if cfg.WaitTimeout > cfg.LockTTL { + return nil, fmt.Errorf("cache: wait timeout %s must not exceed lock ttl %s", cfg.WaitTimeout, cfg.LockTTL) + } + + return &DistributedCache{ + store: store, + lockTTL: cfg.LockTTL, + waitTimeout: cfg.WaitTimeout, + log: log, + }, nil +} + +func (d *DistributedCache) GetOrLoad( + ctx context.Context, + key string, + ttl time.Duration, + loader func(ctx context.Context) ([]byte, error), +) ([]byte, error) { + ch := d.group.DoChan(key, func() (any, error) { + lctx, cancel := context.WithTimeout(context.WithoutCancel(ctx), d.lockTTL+d.waitTimeout) + defer cancel() + + return d.getOrLoad(lctx, key, ttl, loader) + }) + + select { + case <-ctx.Done(): + return nil, ctx.Err() + case result := <-ch: + if result.Err != nil { + return nil, result.Err + } + + value, ok := result.Val.([]byte) + if !ok { + return nil, errors.New("cache: unexpected singleflight result") + } + + return bytes.Clone(value), nil + } +} + +func (d *DistributedCache) getOrLoad( + ctx context.Context, + key string, + ttl time.Duration, + loader func(ctx context.Context) ([]byte, error), +) ([]byte, error) { + lockKey := "lock:" + key + + for { + if err := ctx.Err(); err != nil { + return nil, err + } + + if value, err := d.store.Get(ctx, key); err == nil { + return value, nil + } else if !errors.Is(err, ErrCacheMiss) { + return loader(ctx) + } + + token := randomToken() + + acquired, err := d.store.AcquireLock(ctx, lockKey, token, d.lockTTL) + if err != nil { + return loader(ctx) + } + + if acquired { + return d.fill(ctx, key, lockKey, token, ttl, loader) + } + + value, outcome, err := d.await(ctx, key, lockKey) + if err != nil { + return nil, err + } + + switch outcome { + case waitHit: + return value, nil + case waitDegraded: + return loader(ctx) + case waitTimeout: + return loader(ctx) + case waitRetry: + if ctx.Err() != nil { + return nil, ctx.Err() + } + case waitNone: + return nil, errors.New("cache: unexpected wait outcome") + } + } +} + +func (d *DistributedCache) fill( + ctx context.Context, + key, lockKey, token string, + ttl time.Duration, + loader func(ctx context.Context) ([]byte, error), +) ([]byte, error) { + base := context.WithoutCancel(ctx) + + defer func() { + rctx, cancel := context.WithTimeout(base, releaseTimeout) + defer cancel() + + held, err := d.store.ReleaseLock(rctx, lockKey, token) + switch { + case err != nil: + d.warn(base, "lock release failed", key, err) + case !held: + d.warn(base, "lock expired before release: loader slower than lock ttl", key, nil) + } + }() + + getCtx, cancelGet := context.WithTimeout(base, redisOpTimeout) + value, err := d.store.Get(getCtx, key) + cancelGet() + + if err == nil { + return value, nil + } + + loadCtx, cancel := context.WithTimeout(base, d.lockTTL-minLockTTL) + defer cancel() + + value, err = loader(loadCtx) + if err != nil { + return nil, err + } + + setCtx, cancelSet := context.WithTimeout(base, redisOpTimeout) + setErr := d.store.Set(setCtx, key, value, ttl) + cancelSet() + + if setErr != nil { + d.warn(base, "distributed cache write failed", key, setErr) + } + + return value, nil +} + +type waitOutcome int + +const ( + waitNone waitOutcome = iota + waitHit + waitRetry + waitTimeout + waitDegraded +) + +func (d *DistributedCache) await(ctx context.Context, key, lockKey string) ([]byte, waitOutcome, error) { + wctx, cancel := context.WithTimeout(ctx, d.waitTimeout) + defer cancel() + + for attempt := 1; ; attempt++ { + value, err := d.store.Get(wctx, key) + switch { + case err == nil: + return value, waitHit, nil + case ctx.Err() != nil: + return nil, waitNone, ctx.Err() + case wctx.Err() != nil: + return nil, waitTimeout, nil + case !errors.Is(err, ErrCacheMiss): + return nil, waitDegraded, nil + } + + if held, err := d.store.LockHeld(wctx, lockKey); err == nil && !held { + return nil, waitRetry, nil + } + + select { + case <-wctx.Done(): + if err := ctx.Err(); err != nil { + return nil, waitNone, err + } + + return nil, waitTimeout, nil + case <-time.After(jittered(waitBackoff(attempt))): + } + } +} + +func (d *DistributedCache) Get(ctx context.Context, key string) ([]byte, error) { + return d.store.Get(ctx, key) +} + +func (d *DistributedCache) Set(ctx context.Context, key string, value []byte, ttl time.Duration) error { + return d.store.Set(ctx, key, value, ttl) +} + +func (d *DistributedCache) Delete(ctx context.Context, keys ...string) error { + return d.store.Delete(ctx, keys...) +} + +func (d *DistributedCache) Ping(ctx context.Context) error { + return d.store.Ping(ctx) +} + +func (d *DistributedCache) Close() error { + return d.store.Close() +} + +func (d *DistributedCache) warn(ctx context.Context, msg, key string, err error) { + if d.log == nil { + return + } + + attrs := []slog.Attr{slog.String("key", key)} + if err != nil { + attrs = append(attrs, slog.Any("error", err)) + } + + d.log.LogAttrs(ctx, slog.LevelWarn, msg, attrs...) +} + +func waitBackoff(attempt int) time.Duration { + const base, maxWait = 50 * time.Millisecond, 500 * time.Millisecond + if attempt > 4 { + return maxWait + } + + return base << (attempt - 1) +} + +func jittered(d time.Duration) time.Duration { + half := d / 2 + if half <= 0 { + return d + } + + return half + mathrand.N(half) +} + +func randomToken() string { + raw := make([]byte, 16) + if _, err := rand.Read(raw); err != nil { + counter := fallbackTokenCounter.Add(1) + + return strconv.FormatInt(time.Now().UnixNano(), 10) + ":" + strconv.FormatUint(counter, 10) + } + + return hex.EncodeToString(raw) +} diff --git a/internal/platform/cache/distributed_internal_test.go b/internal/platform/cache/distributed_internal_test.go new file mode 100644 index 00000000..94c369df --- /dev/null +++ b/internal/platform/cache/distributed_internal_test.go @@ -0,0 +1,43 @@ +package cache + +import ( + "testing" + "time" + + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + + "mtusi-messenger/internal/platform/cache/mocks" +) + +func TestAwaitChecksCacheBeforePolling(t *testing.T) { + t.Parallel() + + store := mocks.NewMockLockStore(t) + store.EXPECT().Get(mock.Anything, "key").Return([]byte("ready"), nil).Once() + + d, err := NewDistributed(store, DistributedConfig{WaitTimeout: time.Second}, nil) + require.NoError(t, err) + + started := time.Now() + value, outcome, err := d.await(t.Context(), "key", "lock:key") + require.NoError(t, err) + require.Equal(t, waitHit, outcome) + require.Equal(t, "ready", string(value)) + require.Less(t, time.Since(started), 25*time.Millisecond, "cache must be checked before the first sleep") +} + +func TestAwaitReturnsTimeoutWhileLockHeld(t *testing.T) { + t.Parallel() + + store := mocks.NewMockLockStore(t) + store.EXPECT().Get(mock.Anything, "key").Return(nil, ErrCacheMiss).Maybe() + store.EXPECT().LockHeld(mock.Anything, "lock:key").Return(true, nil).Maybe() + + d, err := NewDistributed(store, DistributedConfig{WaitTimeout: 60 * time.Millisecond}, nil) + require.NoError(t, err) + + _, outcome, err := d.await(t.Context(), "key", "lock:key") + require.NoError(t, err) + require.Equal(t, waitTimeout, outcome) +} diff --git a/internal/platform/cache/distributed_test.go b/internal/platform/cache/distributed_test.go new file mode 100644 index 00000000..63aa2459 --- /dev/null +++ b/internal/platform/cache/distributed_test.go @@ -0,0 +1,374 @@ +package cache_test + +import ( + "context" + "sync" + "sync/atomic" + "testing" + "time" + + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + + "mtusi-messenger/internal/platform/cache" + "mtusi-messenger/internal/platform/cache/mocks" +) + +func newDistributed(t *testing.T, store cache.LockStore, cfg cache.DistributedConfig) *cache.DistributedCache { + t.Helper() + + dc, err := cache.NewDistributed(store, cfg, nil) + require.NoError(t, err) + + return dc +} + +func expectFill(store *mocks.MockLockStore, key string) { + store.EXPECT().Get(mock.Anything, key).Return(nil, cache.ErrCacheMiss).Once() + store.EXPECT().AcquireLock(mock.Anything, "lock:"+key, mock.AnythingOfType("string"), mock.Anything).Return(true, nil).Once() + store.EXPECT().Get(mock.Anything, key).Return(nil, cache.ErrCacheMiss).Once() + store.EXPECT().Set(mock.Anything, key, mock.Anything, mock.Anything).Return(nil).Once() + store.EXPECT().ReleaseLock(mock.Anything, "lock:"+key, mock.AnythingOfType("string")).Return(true, nil).Once() +} + +// sharedWaitTimeout bounds every wait in these tests: a stuck helper must fail +// the test instead of hanging the whole package until -timeout fires. +const sharedWaitTimeout = 5 * time.Second + +func awaitSignal(t *testing.T, ch <-chan struct{}, message string) { + t.Helper() + + select { + case <-ch: + case <-time.After(sharedWaitTimeout): + t.Fatal("timed out: " + message) + } +} + +func awaitValue[T any](t *testing.T, ch <-chan T) T { + t.Helper() + + select { + case value := <-ch: + return value + case <-time.After(sharedWaitTimeout): + var zero T + + t.Fatal("timed out waiting for the shared load to report its result") + + return zero + } +} + +func awaitWaitGroup(t *testing.T, wg *sync.WaitGroup) { + t.Helper() + + done := make(chan struct{}) + + go func() { + wg.Wait() + close(done) + }() + + awaitSignal(t, done, "goroutines did not finish") +} + +func TestDistributedCachesResult(t *testing.T) { + t.Parallel() + + store := mocks.NewMockLockStore(t) + dc := newDistributed(t, store, cache.DistributedConfig{}) + ctx := context.Background() + + var calls atomic.Int32 + + loader := func(context.Context) ([]byte, error) { + calls.Add(1) + + return []byte("payload"), nil + } + + expectFill(store, "key") + store.EXPECT().Get(mock.Anything, "key").Return([]byte("payload"), nil).Once() + + first, err := dc.GetOrLoad(ctx, "key", time.Minute, loader) + require.NoError(t, err) + require.Equal(t, []byte("payload"), first) + + second, err := dc.GetOrLoad(ctx, "key", time.Minute, loader) + require.NoError(t, err) + require.Equal(t, []byte("payload"), second) + require.Equal(t, int32(1), calls.Load()) +} + +func TestDistributedDeduplicatesConcurrentMisses(t *testing.T) { + t.Parallel() + + store := mocks.NewMockLockStore(t) + dc := newDistributed(t, store, cache.DistributedConfig{}) + ctx := context.Background() + + var calls atomic.Int32 + + loader := func(context.Context) ([]byte, error) { + calls.Add(1) + time.Sleep(30 * time.Millisecond) + + return []byte("payload"), nil + } + + store.EXPECT().Get(mock.Anything, "shared").Return(nil, cache.ErrCacheMiss).Twice() + store.EXPECT().AcquireLock(mock.Anything, "lock:shared", mock.AnythingOfType("string"), mock.Anything).Return(true, nil).Once() + store.EXPECT().Set(mock.Anything, "shared", mock.Anything, mock.Anything).Return(nil).Once() + store.EXPECT().ReleaseLock(mock.Anything, "lock:shared", mock.AnythingOfType("string")).Return(true, nil).Once() + + const workers = 50 + + var ( + wg sync.WaitGroup + failures atomic.Int32 + ) + + wg.Add(workers) + + for range workers { + go func() { + defer wg.Done() + + value, err := dc.GetOrLoad(ctx, "shared", time.Minute, loader) + if err != nil || string(value) != "payload" { + failures.Add(1) + } + }() + } + + awaitWaitGroup(t, &wg) + + require.Zero(t, failures.Load()) + require.Equal(t, int32(1), calls.Load(), "one instance must load once for concurrent misses") +} + +func TestDistributedFallsBackOnWaitTimeout(t *testing.T) { + t.Parallel() + + store := mocks.NewMockLockStore(t) + dc := newDistributed(t, store, cache.DistributedConfig{WaitTimeout: 100 * time.Millisecond}) + ctx := context.Background() + + store.EXPECT().Get(mock.Anything, "key").Return(nil, cache.ErrCacheMiss).Maybe() + store.EXPECT().AcquireLock(mock.Anything, "lock:key", mock.AnythingOfType("string"), mock.Anything).Return(false, nil).Once() + store.EXPECT().LockHeld(mock.Anything, "lock:key").Return(true, nil).Maybe() + + var calls atomic.Int32 + + value, err := dc.GetOrLoad(ctx, "key", time.Minute, func(context.Context) ([]byte, error) { + calls.Add(1) + + return []byte("fallback"), nil + }) + require.NoError(t, err) + require.Equal(t, []byte("fallback"), value) + require.Equal(t, int32(1), calls.Load(), "a wait timeout must fall back to a direct load") +} + +func TestDistributedSharedLoadSurvivesCallerCancellation(t *testing.T) { + t.Parallel() + + store := mocks.NewMockLockStore(t) + dc := newDistributed(t, store, cache.DistributedConfig{}) + leaderCtx, cancelLeader := context.WithCancel(context.Background()) + defer cancelLeader() + + var calls atomic.Int32 + + started := make(chan struct{}) + release := make(chan struct{}) + + loader := func(loadCtx context.Context) ([]byte, error) { + calls.Add(1) + close(started) + <-release + + if err := loadCtx.Err(); err != nil { + return nil, err + } + + return []byte("value"), nil + } + + store.EXPECT().Get(mock.Anything, "key").Return(nil, cache.ErrCacheMiss).Twice() + store.EXPECT().AcquireLock(mock.Anything, "lock:key", mock.AnythingOfType("string"), mock.Anything).Return(true, nil).Once() + store.EXPECT().Set(mock.Anything, "key", mock.Anything, mock.Anything).Return(nil).Once() + store.EXPECT().ReleaseLock(mock.Anything, "lock:key", mock.AnythingOfType("string")).Return(true, nil).Once() + + leaderErr := make(chan error, 1) + + go func() { + _, err := dc.GetOrLoad(leaderCtx, "key", time.Minute, loader) + leaderErr <- err + }() + + awaitSignal(t, started, "leader must reach the loader") + + // The follower starts while the leader's loader is still blocked, so the + // singleflight call cannot complete: the signal below means DoChan was + // already called, i.e. the follower joined the leader's in-flight call + // instead of starting its own load. + followerJoined := make(chan struct{}) + + var ( + wg sync.WaitGroup + followerV []byte + followerE error + ) + + wg.Add(1) + + go func() { + defer wg.Done() + + ctx := newJoiningContext(followerJoined) + followerV, followerE = dc.GetOrLoad(ctx, "key", time.Minute, loader) + }() + + awaitSignal(t, followerJoined, "follower must join the in-flight load") + + cancelLeader() + close(release) + + require.ErrorIs(t, awaitValue(t, leaderErr), context.Canceled) + awaitWaitGroup(t, &wg) + + require.NoError(t, followerE) + require.Equal(t, []byte("value"), followerV) + require.Equal(t, int32(1), calls.Load()) +} + +// joiningContext reports when GetOrLoad reaches the shared-result wait path. The +// delegate is kept as function fields so no struct holds a context.Context. +type joiningContext struct { + deadline func() (time.Time, bool) + done func() <-chan struct{} + err func() error + value func(any) any + + once *sync.Once + joined chan struct{} +} + +func newJoiningContext(joined chan struct{}) joiningContext { + base := context.Background() + + return joiningContext{ + deadline: base.Deadline, + done: base.Done, + err: base.Err, + value: base.Value, + once: new(sync.Once), + joined: joined, + } +} + +func (c joiningContext) Deadline() (time.Time, bool) { return c.deadline() } + +func (c joiningContext) Done() <-chan struct{} { + c.once.Do(func() { close(c.joined) }) + + return c.done() +} + +func (c joiningContext) Err() error { return c.err() } + +func (c joiningContext) Value(key any) any { return c.value(key) } + +func TestDistributedRetriesWhenLockVanishes(t *testing.T) { + t.Parallel() + + store := mocks.NewMockLockStore(t) + dc := newDistributed(t, store, cache.DistributedConfig{}) + ctx := context.Background() + + var released atomic.Bool + + time.AfterFunc(120*time.Millisecond, func() { released.Store(true) }) + + store.EXPECT().Get(mock.Anything, "key").Return(nil, cache.ErrCacheMiss).Maybe() + store.EXPECT().AcquireLock(mock.Anything, "lock:key", mock.AnythingOfType("string"), mock.Anything).Return(false, nil).Once() + store.EXPECT().AcquireLock(mock.Anything, "lock:key", mock.AnythingOfType("string"), mock.Anything).Return(true, nil).Once() + store.EXPECT().LockHeld(mock.Anything, "lock:key").RunAndReturn(func(context.Context, string) (bool, error) { + return !released.Load(), nil + }).Maybe() + store.EXPECT().Set(mock.Anything, "key", mock.Anything, mock.Anything).Return(nil).Once() + store.EXPECT().ReleaseLock(mock.Anything, "lock:key", mock.AnythingOfType("string")).Return(true, nil).Once() + + var calls atomic.Int32 + + value, err := dc.GetOrLoad(ctx, "key", time.Minute, func(context.Context) ([]byte, error) { + calls.Add(1) + + return []byte("recovered"), nil + }) + require.NoError(t, err) + require.Equal(t, []byte("recovered"), value) + require.Equal(t, int32(1), calls.Load()) +} + +func TestFillStoreCallsAreBoundedByDeadline(t *testing.T) { + t.Parallel() + + store := mocks.NewMockLockStore(t) + dc := newDistributed(t, store, cache.DistributedConfig{}) + + var ( + mu sync.Mutex + getBudgets []time.Duration + setBudget time.Duration + setHasDead bool + ) + + store.EXPECT().Get(mock.Anything, "key").RunAndReturn(func(ctx context.Context, _ string) ([]byte, error) { + mu.Lock() + defer mu.Unlock() + + if deadline, ok := ctx.Deadline(); ok { + getBudgets = append(getBudgets, time.Until(deadline)) + } + + return nil, cache.ErrCacheMiss + }).Twice() + store.EXPECT().AcquireLock(mock.Anything, "lock:key", mock.AnythingOfType("string"), mock.Anything).Return(true, nil).Once() + store.EXPECT().Set(mock.Anything, "key", mock.Anything, mock.Anything). + RunAndReturn(func(ctx context.Context, _ string, _ []byte, _ time.Duration) error { + mu.Lock() + defer mu.Unlock() + + deadline, ok := ctx.Deadline() + setHasDead = ok + if ok { + setBudget = time.Until(deadline) + } + + return nil + }).Once() + store.EXPECT().ReleaseLock(mock.Anything, "lock:key", mock.AnythingOfType("string")).Return(true, nil).Once() + + _, err := dc.GetOrLoad(context.Background(), "key", time.Minute, func(context.Context) ([]byte, error) { + return []byte("value"), nil + }) + require.NoError(t, err) + + mu.Lock() + defer mu.Unlock() + + require.True(t, setHasDead, "Set must receive a bounded context") + require.LessOrEqual(t, setBudget, 300*time.Millisecond) + + minGetBudget := time.Hour + for _, budget := range getBudgets { + if budget < minGetBudget { + minGetBudget = budget + } + } + + require.LessOrEqual(t, minGetBudget, 300*time.Millisecond, "fill's Get must receive a bounded context") +} diff --git a/internal/platform/cache/mocks/Cache.go b/internal/platform/cache/mocks/Cache.go new file mode 100644 index 00000000..d511bc7a --- /dev/null +++ b/internal/platform/cache/mocks/Cache.go @@ -0,0 +1,346 @@ +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify + +package mocks + +import ( + "context" + "time" + + mock "github.com/stretchr/testify/mock" +) + +// NewMockCache creates a new instance of MockCache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockCache(t interface { + mock.TestingT + Cleanup(func()) +}) *MockCache { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + + mock := &MockCache{} + mock.Mock.Test(t) + + t.Cleanup(func() { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + mock.AssertExpectations(t) + }) + + return mock +} + +// MockCache is an autogenerated mock type for the Cache type +type MockCache struct { + mock.Mock +} + +type MockCache_Expecter struct { + mock *mock.Mock +} + +func (_m *MockCache) EXPECT() *MockCache_Expecter { + return &MockCache_Expecter{mock: &_m.Mock} +} + +// Close provides a mock function for the type MockCache +func (_mock *MockCache) Close() error { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for Close") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func() error); ok { + r0 = returnFunc() + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockCache_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type MockCache_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *MockCache_Expecter) Close() *MockCache_Close_Call { + return &MockCache_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *MockCache_Close_Call) Run(run func()) *MockCache_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockCache_Close_Call) Return(err error) *MockCache_Close_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockCache_Close_Call) RunAndReturn(run func() error) *MockCache_Close_Call { + _c.Call.Return(run) + return _c +} + +// Delete provides a mock function for the type MockCache +func (_mock *MockCache) Delete(ctx context.Context, keys ...string) error { + var tmpRet mock.Arguments + if len(keys) > 0 { + tmpRet = _mock.Called(ctx, keys) + } else { + tmpRet = _mock.Called(ctx) + } + ret := tmpRet + + if len(ret) == 0 { + panic("no return value specified for Delete") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context, ...string) error); ok { + r0 = returnFunc(ctx, keys...) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockCache_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type MockCache_Delete_Call struct { + *mock.Call +} + +// Delete is a helper method to define mock.On call +// - ctx context.Context +// - keys ...string +func (_e *MockCache_Expecter) Delete(ctx any, keys ...any) *MockCache_Delete_Call { + return &MockCache_Delete_Call{Call: _e.mock.On("Delete", + append([]any{ctx}, keys...)...)} +} + +func (_c *MockCache_Delete_Call) Run(run func(ctx context.Context, keys ...string)) *MockCache_Delete_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []string + var variadicArgs []string + if len(args) > 1 { + variadicArgs = args[1].([]string) + } + arg1 = variadicArgs + run( + arg0, + arg1..., + ) + }) + return _c +} + +func (_c *MockCache_Delete_Call) Return(err error) *MockCache_Delete_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockCache_Delete_Call) RunAndReturn(run func(ctx context.Context, keys ...string) error) *MockCache_Delete_Call { + _c.Call.Return(run) + return _c +} + +// Get provides a mock function for the type MockCache +func (_mock *MockCache) Get(ctx context.Context, key string) ([]byte, error) { + ret := _mock.Called(ctx, key) + + if len(ret) == 0 { + panic("no return value specified for Get") + } + + var r0 []byte + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]byte, error)); ok { + return returnFunc(ctx, key) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string) []byte); ok { + r0 = returnFunc(ctx, key) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = returnFunc(ctx, key) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockCache_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type MockCache_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - ctx context.Context +// - key string +func (_e *MockCache_Expecter) Get(ctx any, key any) *MockCache_Get_Call { + return &MockCache_Get_Call{Call: _e.mock.On("Get", ctx, key)} +} + +func (_c *MockCache_Get_Call) Run(run func(ctx context.Context, key string)) *MockCache_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockCache_Get_Call) Return(bytes []byte, err error) *MockCache_Get_Call { + _c.Call.Return(bytes, err) + return _c +} + +func (_c *MockCache_Get_Call) RunAndReturn(run func(ctx context.Context, key string) ([]byte, error)) *MockCache_Get_Call { + _c.Call.Return(run) + return _c +} + +// Ping provides a mock function for the type MockCache +func (_mock *MockCache) Ping(ctx context.Context) error { + ret := _mock.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for Ping") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { + r0 = returnFunc(ctx) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockCache_Ping_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ping' +type MockCache_Ping_Call struct { + *mock.Call +} + +// Ping is a helper method to define mock.On call +// - ctx context.Context +func (_e *MockCache_Expecter) Ping(ctx any) *MockCache_Ping_Call { + return &MockCache_Ping_Call{Call: _e.mock.On("Ping", ctx)} +} + +func (_c *MockCache_Ping_Call) Run(run func(ctx context.Context)) *MockCache_Ping_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockCache_Ping_Call) Return(err error) *MockCache_Ping_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockCache_Ping_Call) RunAndReturn(run func(ctx context.Context) error) *MockCache_Ping_Call { + _c.Call.Return(run) + return _c +} + +// Set provides a mock function for the type MockCache +func (_mock *MockCache) Set(ctx context.Context, key string, value []byte, ttl time.Duration) error { + ret := _mock.Called(ctx, key, value, ttl) + + if len(ret) == 0 { + panic("no return value specified for Set") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, []byte, time.Duration) error); ok { + r0 = returnFunc(ctx, key, value, ttl) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockCache_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set' +type MockCache_Set_Call struct { + *mock.Call +} + +// Set is a helper method to define mock.On call +// - ctx context.Context +// - key string +// - value []byte +// - ttl time.Duration +func (_e *MockCache_Expecter) Set(ctx any, key any, value any, ttl any) *MockCache_Set_Call { + return &MockCache_Set_Call{Call: _e.mock.On("Set", ctx, key, value, ttl)} +} + +func (_c *MockCache_Set_Call) Run(run func(ctx context.Context, key string, value []byte, ttl time.Duration)) *MockCache_Set_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 []byte + if args[2] != nil { + arg2 = args[2].([]byte) + } + var arg3 time.Duration + if args[3] != nil { + arg3 = args[3].(time.Duration) + } + run( + arg0, + arg1, + arg2, + arg3, + ) + }) + return _c +} + +func (_c *MockCache_Set_Call) Return(err error) *MockCache_Set_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockCache_Set_Call) RunAndReturn(run func(ctx context.Context, key string, value []byte, ttl time.Duration) error) *MockCache_Set_Call { + _c.Call.Return(run) + return _c +} diff --git a/internal/platform/cache/mocks/LockStore.go b/internal/platform/cache/mocks/LockStore.go new file mode 100644 index 00000000..bb9903f6 --- /dev/null +++ b/internal/platform/cache/mocks/LockStore.go @@ -0,0 +1,562 @@ +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify + +package mocks + +import ( + "context" + "time" + + mock "github.com/stretchr/testify/mock" +) + +// NewMockLockStore creates a new instance of MockLockStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockLockStore(t interface { + mock.TestingT + Cleanup(func()) +}) *MockLockStore { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + + mock := &MockLockStore{} + mock.Mock.Test(t) + + t.Cleanup(func() { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + mock.AssertExpectations(t) + }) + + return mock +} + +// MockLockStore is an autogenerated mock type for the LockStore type +type MockLockStore struct { + mock.Mock +} + +type MockLockStore_Expecter struct { + mock *mock.Mock +} + +func (_m *MockLockStore) EXPECT() *MockLockStore_Expecter { + return &MockLockStore_Expecter{mock: &_m.Mock} +} + +// AcquireLock provides a mock function for the type MockLockStore +func (_mock *MockLockStore) AcquireLock(ctx context.Context, key string, token string, ttl time.Duration) (bool, error) { + ret := _mock.Called(ctx, key, token, ttl) + + if len(ret) == 0 { + panic("no return value specified for AcquireLock") + } + + var r0 bool + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, time.Duration) (bool, error)); ok { + return returnFunc(ctx, key, token, ttl) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, time.Duration) bool); ok { + r0 = returnFunc(ctx, key, token, ttl) + } else { + r0 = ret.Get(0).(bool) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, time.Duration) error); ok { + r1 = returnFunc(ctx, key, token, ttl) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockLockStore_AcquireLock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AcquireLock' +type MockLockStore_AcquireLock_Call struct { + *mock.Call +} + +// AcquireLock is a helper method to define mock.On call +// - ctx context.Context +// - key string +// - token string +// - ttl time.Duration +func (_e *MockLockStore_Expecter) AcquireLock(ctx any, key any, token any, ttl any) *MockLockStore_AcquireLock_Call { + return &MockLockStore_AcquireLock_Call{Call: _e.mock.On("AcquireLock", ctx, key, token, ttl)} +} + +func (_c *MockLockStore_AcquireLock_Call) Run(run func(ctx context.Context, key string, token string, ttl time.Duration)) *MockLockStore_AcquireLock_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + var arg3 time.Duration + if args[3] != nil { + arg3 = args[3].(time.Duration) + } + run( + arg0, + arg1, + arg2, + arg3, + ) + }) + return _c +} + +func (_c *MockLockStore_AcquireLock_Call) Return(b bool, err error) *MockLockStore_AcquireLock_Call { + _c.Call.Return(b, err) + return _c +} + +func (_c *MockLockStore_AcquireLock_Call) RunAndReturn(run func(ctx context.Context, key string, token string, ttl time.Duration) (bool, error)) *MockLockStore_AcquireLock_Call { + _c.Call.Return(run) + return _c +} + +// Close provides a mock function for the type MockLockStore +func (_mock *MockLockStore) Close() error { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for Close") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func() error); ok { + r0 = returnFunc() + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockLockStore_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type MockLockStore_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *MockLockStore_Expecter) Close() *MockLockStore_Close_Call { + return &MockLockStore_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *MockLockStore_Close_Call) Run(run func()) *MockLockStore_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockLockStore_Close_Call) Return(err error) *MockLockStore_Close_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockLockStore_Close_Call) RunAndReturn(run func() error) *MockLockStore_Close_Call { + _c.Call.Return(run) + return _c +} + +// Delete provides a mock function for the type MockLockStore +func (_mock *MockLockStore) Delete(ctx context.Context, keys ...string) error { + var tmpRet mock.Arguments + if len(keys) > 0 { + tmpRet = _mock.Called(ctx, keys) + } else { + tmpRet = _mock.Called(ctx) + } + ret := tmpRet + + if len(ret) == 0 { + panic("no return value specified for Delete") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context, ...string) error); ok { + r0 = returnFunc(ctx, keys...) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockLockStore_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type MockLockStore_Delete_Call struct { + *mock.Call +} + +// Delete is a helper method to define mock.On call +// - ctx context.Context +// - keys ...string +func (_e *MockLockStore_Expecter) Delete(ctx any, keys ...any) *MockLockStore_Delete_Call { + return &MockLockStore_Delete_Call{Call: _e.mock.On("Delete", + append([]any{ctx}, keys...)...)} +} + +func (_c *MockLockStore_Delete_Call) Run(run func(ctx context.Context, keys ...string)) *MockLockStore_Delete_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []string + var variadicArgs []string + if len(args) > 1 { + variadicArgs = args[1].([]string) + } + arg1 = variadicArgs + run( + arg0, + arg1..., + ) + }) + return _c +} + +func (_c *MockLockStore_Delete_Call) Return(err error) *MockLockStore_Delete_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockLockStore_Delete_Call) RunAndReturn(run func(ctx context.Context, keys ...string) error) *MockLockStore_Delete_Call { + _c.Call.Return(run) + return _c +} + +// Get provides a mock function for the type MockLockStore +func (_mock *MockLockStore) Get(ctx context.Context, key string) ([]byte, error) { + ret := _mock.Called(ctx, key) + + if len(ret) == 0 { + panic("no return value specified for Get") + } + + var r0 []byte + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]byte, error)); ok { + return returnFunc(ctx, key) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string) []byte); ok { + r0 = returnFunc(ctx, key) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = returnFunc(ctx, key) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockLockStore_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type MockLockStore_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - ctx context.Context +// - key string +func (_e *MockLockStore_Expecter) Get(ctx any, key any) *MockLockStore_Get_Call { + return &MockLockStore_Get_Call{Call: _e.mock.On("Get", ctx, key)} +} + +func (_c *MockLockStore_Get_Call) Run(run func(ctx context.Context, key string)) *MockLockStore_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockLockStore_Get_Call) Return(bytes []byte, err error) *MockLockStore_Get_Call { + _c.Call.Return(bytes, err) + return _c +} + +func (_c *MockLockStore_Get_Call) RunAndReturn(run func(ctx context.Context, key string) ([]byte, error)) *MockLockStore_Get_Call { + _c.Call.Return(run) + return _c +} + +// LockHeld provides a mock function for the type MockLockStore +func (_mock *MockLockStore) LockHeld(ctx context.Context, key string) (bool, error) { + ret := _mock.Called(ctx, key) + + if len(ret) == 0 { + panic("no return value specified for LockHeld") + } + + var r0 bool + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string) (bool, error)); ok { + return returnFunc(ctx, key) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string) bool); ok { + r0 = returnFunc(ctx, key) + } else { + r0 = ret.Get(0).(bool) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = returnFunc(ctx, key) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockLockStore_LockHeld_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LockHeld' +type MockLockStore_LockHeld_Call struct { + *mock.Call +} + +// LockHeld is a helper method to define mock.On call +// - ctx context.Context +// - key string +func (_e *MockLockStore_Expecter) LockHeld(ctx any, key any) *MockLockStore_LockHeld_Call { + return &MockLockStore_LockHeld_Call{Call: _e.mock.On("LockHeld", ctx, key)} +} + +func (_c *MockLockStore_LockHeld_Call) Run(run func(ctx context.Context, key string)) *MockLockStore_LockHeld_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockLockStore_LockHeld_Call) Return(b bool, err error) *MockLockStore_LockHeld_Call { + _c.Call.Return(b, err) + return _c +} + +func (_c *MockLockStore_LockHeld_Call) RunAndReturn(run func(ctx context.Context, key string) (bool, error)) *MockLockStore_LockHeld_Call { + _c.Call.Return(run) + return _c +} + +// Ping provides a mock function for the type MockLockStore +func (_mock *MockLockStore) Ping(ctx context.Context) error { + ret := _mock.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for Ping") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { + r0 = returnFunc(ctx) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockLockStore_Ping_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ping' +type MockLockStore_Ping_Call struct { + *mock.Call +} + +// Ping is a helper method to define mock.On call +// - ctx context.Context +func (_e *MockLockStore_Expecter) Ping(ctx any) *MockLockStore_Ping_Call { + return &MockLockStore_Ping_Call{Call: _e.mock.On("Ping", ctx)} +} + +func (_c *MockLockStore_Ping_Call) Run(run func(ctx context.Context)) *MockLockStore_Ping_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockLockStore_Ping_Call) Return(err error) *MockLockStore_Ping_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockLockStore_Ping_Call) RunAndReturn(run func(ctx context.Context) error) *MockLockStore_Ping_Call { + _c.Call.Return(run) + return _c +} + +// ReleaseLock provides a mock function for the type MockLockStore +func (_mock *MockLockStore) ReleaseLock(ctx context.Context, key string, token string) (bool, error) { + ret := _mock.Called(ctx, key, token) + + if len(ret) == 0 { + panic("no return value specified for ReleaseLock") + } + + var r0 bool + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (bool, error)); ok { + return returnFunc(ctx, key, token) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) bool); ok { + r0 = returnFunc(ctx, key, token) + } else { + r0 = ret.Get(0).(bool) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok { + r1 = returnFunc(ctx, key, token) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockLockStore_ReleaseLock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReleaseLock' +type MockLockStore_ReleaseLock_Call struct { + *mock.Call +} + +// ReleaseLock is a helper method to define mock.On call +// - ctx context.Context +// - key string +// - token string +func (_e *MockLockStore_Expecter) ReleaseLock(ctx any, key any, token any) *MockLockStore_ReleaseLock_Call { + return &MockLockStore_ReleaseLock_Call{Call: _e.mock.On("ReleaseLock", ctx, key, token)} +} + +func (_c *MockLockStore_ReleaseLock_Call) Run(run func(ctx context.Context, key string, token string)) *MockLockStore_ReleaseLock_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) + }) + return _c +} + +func (_c *MockLockStore_ReleaseLock_Call) Return(b bool, err error) *MockLockStore_ReleaseLock_Call { + _c.Call.Return(b, err) + return _c +} + +func (_c *MockLockStore_ReleaseLock_Call) RunAndReturn(run func(ctx context.Context, key string, token string) (bool, error)) *MockLockStore_ReleaseLock_Call { + _c.Call.Return(run) + return _c +} + +// Set provides a mock function for the type MockLockStore +func (_mock *MockLockStore) Set(ctx context.Context, key string, value []byte, ttl time.Duration) error { + ret := _mock.Called(ctx, key, value, ttl) + + if len(ret) == 0 { + panic("no return value specified for Set") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, []byte, time.Duration) error); ok { + r0 = returnFunc(ctx, key, value, ttl) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockLockStore_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set' +type MockLockStore_Set_Call struct { + *mock.Call +} + +// Set is a helper method to define mock.On call +// - ctx context.Context +// - key string +// - value []byte +// - ttl time.Duration +func (_e *MockLockStore_Expecter) Set(ctx any, key any, value any, ttl any) *MockLockStore_Set_Call { + return &MockLockStore_Set_Call{Call: _e.mock.On("Set", ctx, key, value, ttl)} +} + +func (_c *MockLockStore_Set_Call) Run(run func(ctx context.Context, key string, value []byte, ttl time.Duration)) *MockLockStore_Set_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 []byte + if args[2] != nil { + arg2 = args[2].([]byte) + } + var arg3 time.Duration + if args[3] != nil { + arg3 = args[3].(time.Duration) + } + run( + arg0, + arg1, + arg2, + arg3, + ) + }) + return _c +} + +func (_c *MockLockStore_Set_Call) Return(err error) *MockLockStore_Set_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockLockStore_Set_Call) RunAndReturn(run func(ctx context.Context, key string, value []byte, ttl time.Duration) error) *MockLockStore_Set_Call { + _c.Call.Return(run) + return _c +} diff --git a/internal/platform/cache/redis.go b/internal/platform/cache/redis.go new file mode 100644 index 00000000..5759dafc --- /dev/null +++ b/internal/platform/cache/redis.go @@ -0,0 +1,139 @@ +package cache + +import ( + "context" + "errors" + "fmt" + "net" + "strconv" + "time" + + "github.com/redis/go-redis/v9" +) + +type RedisConfig struct { + Host string + Port int + Password string + DB int + MaxRetries int + DialTimeout time.Duration + ReadTimeout time.Duration + WriteTimeout time.Duration + PoolSize int +} + +type RedisCache struct { + client *redis.Client +} + +func NewRedis(cfg RedisConfig) (*RedisCache, error) { + client := redis.NewClient(newClientOptions(cfg)) + + ctx, cancel := context.WithTimeout(context.Background(), cfg.DialTimeout) + defer cancel() + + if err := client.Ping(ctx).Err(); err != nil { + _ = client.Close() + + return nil, fmt.Errorf("ping redis: %w", err) + } + + return &RedisCache{client: client}, nil +} + +func newClientOptions(cfg RedisConfig) *redis.Options { + return &redis.Options{ + Addr: net.JoinHostPort(cfg.Host, strconv.Itoa(cfg.Port)), + Password: cfg.Password, + DB: cfg.DB, + MaxRetries: cfg.MaxRetries, + DialTimeout: cfg.DialTimeout, + ReadTimeout: cfg.ReadTimeout, + WriteTimeout: cfg.WriteTimeout, + PoolSize: cfg.PoolSize, + } +} + +func (r *RedisCache) Get(ctx context.Context, key string) ([]byte, error) { + value, err := r.client.Get(ctx, key).Bytes() + if errors.Is(err, redis.Nil) { + return nil, ErrCacheMiss + } + + if err != nil { + return nil, fmt.Errorf("redis get %q: %w", key, err) + } + + return value, nil +} + +func (r *RedisCache) Set(ctx context.Context, key string, value []byte, ttl time.Duration) error { + if err := r.client.Set(ctx, key, value, ttl).Err(); err != nil { + return fmt.Errorf("redis set %q: %w", key, err) + } + + return nil +} + +func (r *RedisCache) Delete(ctx context.Context, keys ...string) error { + if len(keys) == 0 { + return nil + } + + if err := r.client.Del(ctx, keys...).Err(); err != nil { + return fmt.Errorf("redis delete: %w", err) + } + + return nil +} + +var releaseLockScript = redis.NewScript(` +if redis.call("GET", KEYS[1]) == ARGV[1] then + return redis.call("DEL", KEYS[1]) +end +return 0 +`) + +func (r *RedisCache) AcquireLock(ctx context.Context, key, token string, ttl time.Duration) (bool, error) { + acquired, err := r.client.SetNX(ctx, key, token, ttl).Result() + if err != nil { + return false, fmt.Errorf("redis acquire lock %q: %w", key, err) + } + + return acquired, nil +} + +func (r *RedisCache) ReleaseLock(ctx context.Context, key, token string) (bool, error) { + deleted, err := releaseLockScript.Run(ctx, r.client, []string{key}, token).Int64() + if err != nil { + return false, fmt.Errorf("redis release lock %q: %w", key, err) + } + + return deleted > 0, nil +} + +func (r *RedisCache) LockHeld(ctx context.Context, key string) (bool, error) { + exists, err := r.client.Exists(ctx, key).Result() + if err != nil { + return false, fmt.Errorf("redis check lock %q: %w", key, err) + } + + return exists > 0, nil +} + +func (r *RedisCache) Ping(ctx context.Context) error { + if err := r.client.Ping(ctx).Err(); err != nil { + return fmt.Errorf("redis ping: %w", err) + } + + return nil +} + +func (r *RedisCache) Close() error { + if err := r.client.Close(); err != nil { + return fmt.Errorf("redis close: %w", err) + } + + return nil +} diff --git a/internal/platform/cache/redis_client_test.go b/internal/platform/cache/redis_client_test.go new file mode 100644 index 00000000..f33d4ba3 --- /dev/null +++ b/internal/platform/cache/redis_client_test.go @@ -0,0 +1,32 @@ +package cache + +import ( + "testing" + "time" + + "github.com/redis/go-redis/v9" + "github.com/stretchr/testify/require" +) + +func TestNewClientOptionsAppliesTimeoutsAndRetries(t *testing.T) { + t.Parallel() + + client := redis.NewClient(newClientOptions(RedisConfig{ + Host: "localhost", + Port: 6379, + MaxRetries: -1, + DialTimeout: 300 * time.Millisecond, + ReadTimeout: 200 * time.Millisecond, + WriteTimeout: 200 * time.Millisecond, + PoolSize: 5, + })) + + defer func() { _ = client.Close() }() + + opts := client.Options() + require.Equal(t, 0, opts.MaxRetries, "go-redis: -1 disables retries, 0 would restore the default of 3") + require.Equal(t, 300*time.Millisecond, opts.DialTimeout) + require.Equal(t, 200*time.Millisecond, opts.ReadTimeout) + require.Equal(t, 200*time.Millisecond, opts.WriteTimeout) + require.Equal(t, 5, opts.PoolSize) +} diff --git a/internal/platform/password/password.go b/internal/platform/password/password.go new file mode 100644 index 00000000..acc62377 --- /dev/null +++ b/internal/platform/password/password.go @@ -0,0 +1,52 @@ +package password + +import ( + "crypto/rand" + "crypto/subtle" + "encoding/base64" + "strings" + + "golang.org/x/crypto/argon2" +) + +const ( + argonTime = 1 + argonMemory = 64 * 1024 + argonThreads = 4 + argonKeyLen = 32 + argonSaltLen = 16 +) + +func Hash(plain string) (string, error) { + salt := make([]byte, argonSaltLen) + if _, err := rand.Read(salt); err != nil { + return "", err + } + + hash := argon2.IDKey([]byte(plain), salt, argonTime, argonMemory, argonThreads, argonKeyLen) + + return "argon2id$" + + base64.RawStdEncoding.EncodeToString(salt) + "$" + + base64.RawStdEncoding.EncodeToString(hash), nil +} + +func Verify(plain, encoded string) bool { + parts := strings.Split(encoded, "$") + if len(parts) != 3 || parts[0] != "argon2id" { + return false + } + + salt, err := base64.RawStdEncoding.DecodeString(parts[1]) + if err != nil { + return false + } + + expected, err := base64.RawStdEncoding.DecodeString(parts[2]) + if err != nil || len(salt) != argonSaltLen || len(expected) != argonKeyLen { + return false + } + + actual := argon2.IDKey([]byte(plain), salt, argonTime, argonMemory, argonThreads, argonKeyLen) + + return subtle.ConstantTimeCompare(actual, expected) == 1 +} diff --git a/internal/platform/password/password_test.go b/internal/platform/password/password_test.go new file mode 100644 index 00000000..1fe449b1 --- /dev/null +++ b/internal/platform/password/password_test.go @@ -0,0 +1,33 @@ +package password_test + +import ( + "strings" + "testing" + + "github.com/stretchr/testify/require" + + "mtusi-messenger/internal/platform/password" +) + +func TestHashVerifyRoundTrip(t *testing.T) { + encoded, err := password.Hash("very-secret-password") + require.NoError(t, err) + require.True(t, password.Verify("very-secret-password", encoded)) + require.False(t, password.Verify("wrong-password-value", encoded)) +} + +func TestHashIsSalted(t *testing.T) { + first, err := password.Hash("very-secret-password") + require.NoError(t, err) + + second, err := password.Hash("very-secret-password") + require.NoError(t, err) + + require.NotEqual(t, first, second) +} + +func TestVerifyRejectsMalformedHash(t *testing.T) { + require.False(t, password.Verify("very-secret-password", "")) + require.False(t, password.Verify("very-secret-password", "plain-text")) + require.False(t, password.Verify("very-secret-password", strings.Repeat("x", 64))) +} diff --git a/internal/platform/token/token.go b/internal/platform/token/token.go new file mode 100644 index 00000000..b5d2351c --- /dev/null +++ b/internal/platform/token/token.go @@ -0,0 +1,40 @@ +package token + +import ( + "crypto/rand" + "crypto/sha256" + "encoding/base64" + "errors" +) + +const size = 32 + +var ErrInvalid = errors.New("invalid token") + +type Token struct{} + +func New() Token { + return Token{} +} + +func (Token) Generate() (string, []byte, error) { + raw := make([]byte, size) + if _, err := rand.Read(raw); err != nil { + return "", nil, err + } + + sum := sha256.Sum256(raw) + + return base64.RawURLEncoding.EncodeToString(raw), sum[:], nil +} + +func (Token) Hash(raw string) ([]byte, error) { + decoded, err := base64.RawURLEncoding.DecodeString(raw) + if err != nil || len(decoded) != size { + return nil, ErrInvalid + } + + sum := sha256.Sum256(decoded) + + return sum[:], nil +} diff --git a/internal/platform/token/token_test.go b/internal/platform/token/token_test.go new file mode 100644 index 00000000..54dfc2e4 --- /dev/null +++ b/internal/platform/token/token_test.go @@ -0,0 +1,44 @@ +package token_test + +import ( + "crypto/sha256" + "testing" + + "github.com/stretchr/testify/require" + + "mtusi-messenger/internal/platform/token" +) + +func TestGenerateProducesUniqueOpaqueTokens(t *testing.T) { + tokens := token.New() + + first, firstHash, err := tokens.Generate() + require.NoError(t, err) + require.NotEmpty(t, first) + require.Len(t, firstHash, sha256.Size) + + second, secondHash, err := tokens.Generate() + require.NoError(t, err) + require.NotEqual(t, first, second) + require.NotEqual(t, firstHash, secondHash) +} + +func TestHashMatchesGeneratedHash(t *testing.T) { + tokens := token.New() + + raw, hash, err := tokens.Generate() + require.NoError(t, err) + + actual, err := tokens.Hash(raw) + require.NoError(t, err) + require.Equal(t, hash, actual) +} + +func TestHashRejectsMalformed(t *testing.T) { + tokens := token.New() + + for _, raw := range []string{"", "not-base64!", "c2hvcnQ"} { + _, err := tokens.Hash(raw) + require.ErrorIs(t, err, token.ErrInvalid, raw) + } +} diff --git a/internal/service/chat/service.go b/internal/service/chat/service.go index 59ca6f3c..f3a0d3fc 100644 --- a/internal/service/chat/service.go +++ b/internal/service/chat/service.go @@ -9,8 +9,6 @@ import ( "mtusi-messenger/internal/domain" ) -//go:generate go tool mockery - type Repository interface { Create(ctx context.Context, draft domain.ChatDraft) (domain.Chat, error) GetVisible(ctx context.Context, chatID, callerID uuid.UUID) (domain.Chat, error) diff --git a/internal/service/message/service.go b/internal/service/message/service.go index bd7ffbec..cbeb4c23 100644 --- a/internal/service/message/service.go +++ b/internal/service/message/service.go @@ -9,8 +9,6 @@ import ( "mtusi-messenger/internal/domain" ) -//go:generate go tool mockery - type Repository interface { Create(ctx context.Context, draft domain.MessageDraft) (domain.Message, error) ListVisible( diff --git a/internal/service/session/mocks/Repository.go b/internal/service/session/mocks/Repository.go new file mode 100644 index 00000000..76925a5c --- /dev/null +++ b/internal/service/session/mocks/Repository.go @@ -0,0 +1,310 @@ +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify + +package mocks + +import ( + "context" + "mtusi-messenger/internal/domain" + + "github.com/google/uuid" + mock "github.com/stretchr/testify/mock" +) + +// NewMockRepository creates a new instance of MockRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockRepository(t interface { + mock.TestingT + Cleanup(func()) +}) *MockRepository { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + + mock := &MockRepository{} + mock.Mock.Test(t) + + t.Cleanup(func() { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + mock.AssertExpectations(t) + }) + + return mock +} + +// MockRepository is an autogenerated mock type for the Repository type +type MockRepository struct { + mock.Mock +} + +type MockRepository_Expecter struct { + mock *mock.Mock +} + +func (_m *MockRepository) EXPECT() *MockRepository_Expecter { + return &MockRepository_Expecter{mock: &_m.Mock} +} + +// Create provides a mock function for the type MockRepository +func (_mock *MockRepository) Create(ctx context.Context, session domain.NewSession) (domain.Session, error) { + ret := _mock.Called(ctx, session) + + if len(ret) == 0 { + panic("no return value specified for Create") + } + + var r0 domain.Session + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, domain.NewSession) (domain.Session, error)); ok { + return returnFunc(ctx, session) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, domain.NewSession) domain.Session); ok { + r0 = returnFunc(ctx, session) + } else { + r0 = ret.Get(0).(domain.Session) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, domain.NewSession) error); ok { + r1 = returnFunc(ctx, session) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockRepository_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type MockRepository_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +// - session domain.NewSession +func (_e *MockRepository_Expecter) Create(ctx any, session any) *MockRepository_Create_Call { + return &MockRepository_Create_Call{Call: _e.mock.On("Create", ctx, session)} +} + +func (_c *MockRepository_Create_Call) Run(run func(ctx context.Context, session domain.NewSession)) *MockRepository_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 domain.NewSession + if args[1] != nil { + arg1 = args[1].(domain.NewSession) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockRepository_Create_Call) Return(session1 domain.Session, err error) *MockRepository_Create_Call { + _c.Call.Return(session1, err) + return _c +} + +func (_c *MockRepository_Create_Call) RunAndReturn(run func(ctx context.Context, session domain.NewSession) (domain.Session, error)) *MockRepository_Create_Call { + _c.Call.Return(run) + return _c +} + +// Credentials provides a mock function for the type MockRepository +func (_mock *MockRepository) Credentials(ctx context.Context, username string) (domain.UserCredentials, error) { + ret := _mock.Called(ctx, username) + + if len(ret) == 0 { + panic("no return value specified for Credentials") + } + + var r0 domain.UserCredentials + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string) (domain.UserCredentials, error)); ok { + return returnFunc(ctx, username) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string) domain.UserCredentials); ok { + r0 = returnFunc(ctx, username) + } else { + r0 = ret.Get(0).(domain.UserCredentials) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = returnFunc(ctx, username) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockRepository_Credentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Credentials' +type MockRepository_Credentials_Call struct { + *mock.Call +} + +// Credentials is a helper method to define mock.On call +// - ctx context.Context +// - username string +func (_e *MockRepository_Expecter) Credentials(ctx any, username any) *MockRepository_Credentials_Call { + return &MockRepository_Credentials_Call{Call: _e.mock.On("Credentials", ctx, username)} +} + +func (_c *MockRepository_Credentials_Call) Run(run func(ctx context.Context, username string)) *MockRepository_Credentials_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockRepository_Credentials_Call) Return(userCredentials domain.UserCredentials, err error) *MockRepository_Credentials_Call { + _c.Call.Return(userCredentials, err) + return _c +} + +func (_c *MockRepository_Credentials_Call) RunAndReturn(run func(ctx context.Context, username string) (domain.UserCredentials, error)) *MockRepository_Credentials_Call { + _c.Call.Return(run) + return _c +} + +// Resolve provides a mock function for the type MockRepository +func (_mock *MockRepository) Resolve(ctx context.Context, tokenHash []byte) (domain.Session, error) { + ret := _mock.Called(ctx, tokenHash) + + if len(ret) == 0 { + panic("no return value specified for Resolve") + } + + var r0 domain.Session + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, []byte) (domain.Session, error)); ok { + return returnFunc(ctx, tokenHash) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, []byte) domain.Session); ok { + r0 = returnFunc(ctx, tokenHash) + } else { + r0 = ret.Get(0).(domain.Session) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, []byte) error); ok { + r1 = returnFunc(ctx, tokenHash) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockRepository_Resolve_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Resolve' +type MockRepository_Resolve_Call struct { + *mock.Call +} + +// Resolve is a helper method to define mock.On call +// - ctx context.Context +// - tokenHash []byte +func (_e *MockRepository_Expecter) Resolve(ctx any, tokenHash any) *MockRepository_Resolve_Call { + return &MockRepository_Resolve_Call{Call: _e.mock.On("Resolve", ctx, tokenHash)} +} + +func (_c *MockRepository_Resolve_Call) Run(run func(ctx context.Context, tokenHash []byte)) *MockRepository_Resolve_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 []byte + if args[1] != nil { + arg1 = args[1].([]byte) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockRepository_Resolve_Call) Return(session domain.Session, err error) *MockRepository_Resolve_Call { + _c.Call.Return(session, err) + return _c +} + +func (_c *MockRepository_Resolve_Call) RunAndReturn(run func(ctx context.Context, tokenHash []byte) (domain.Session, error)) *MockRepository_Resolve_Call { + _c.Call.Return(run) + return _c +} + +// Revoke provides a mock function for the type MockRepository +func (_mock *MockRepository) Revoke(ctx context.Context, userID uuid.UUID, tokenHash []byte) error { + ret := _mock.Called(ctx, userID, tokenHash) + + if len(ret) == 0 { + panic("no return value specified for Revoke") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, []byte) error); ok { + r0 = returnFunc(ctx, userID, tokenHash) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockRepository_Revoke_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Revoke' +type MockRepository_Revoke_Call struct { + *mock.Call +} + +// Revoke is a helper method to define mock.On call +// - ctx context.Context +// - userID uuid.UUID +// - tokenHash []byte +func (_e *MockRepository_Expecter) Revoke(ctx any, userID any, tokenHash any) *MockRepository_Revoke_Call { + return &MockRepository_Revoke_Call{Call: _e.mock.On("Revoke", ctx, userID, tokenHash)} +} + +func (_c *MockRepository_Revoke_Call) Run(run func(ctx context.Context, userID uuid.UUID, tokenHash []byte)) *MockRepository_Revoke_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 uuid.UUID + if args[1] != nil { + arg1 = args[1].(uuid.UUID) + } + var arg2 []byte + if args[2] != nil { + arg2 = args[2].([]byte) + } + run( + arg0, + arg1, + arg2, + ) + }) + return _c +} + +func (_c *MockRepository_Revoke_Call) Return(err error) *MockRepository_Revoke_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockRepository_Revoke_Call) RunAndReturn(run func(ctx context.Context, userID uuid.UUID, tokenHash []byte) error) *MockRepository_Revoke_Call { + _c.Call.Return(run) + return _c +} diff --git a/internal/service/session/mocks/Tokens.go b/internal/service/session/mocks/Tokens.go new file mode 100644 index 00000000..f5724a50 --- /dev/null +++ b/internal/service/session/mocks/Tokens.go @@ -0,0 +1,168 @@ +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify + +package mocks + +import ( + mock "github.com/stretchr/testify/mock" +) + +// NewMockTokens creates a new instance of MockTokens. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockTokens(t interface { + mock.TestingT + Cleanup(func()) +}) *MockTokens { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + + mock := &MockTokens{} + mock.Mock.Test(t) + + t.Cleanup(func() { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + mock.AssertExpectations(t) + }) + + return mock +} + +// MockTokens is an autogenerated mock type for the Tokens type +type MockTokens struct { + mock.Mock +} + +type MockTokens_Expecter struct { + mock *mock.Mock +} + +func (_m *MockTokens) EXPECT() *MockTokens_Expecter { + return &MockTokens_Expecter{mock: &_m.Mock} +} + +// Generate provides a mock function for the type MockTokens +func (_mock *MockTokens) Generate() (string, []byte, error) { + ret := _mock.Called() + + if len(ret) == 0 { + panic("no return value specified for Generate") + } + + var r0 string + var r1 []byte + var r2 error + if returnFunc, ok := ret.Get(0).(func() (string, []byte, error)); ok { + return returnFunc() + } + if returnFunc, ok := ret.Get(0).(func() string); ok { + r0 = returnFunc() + } else { + r0 = ret.Get(0).(string) + } + if returnFunc, ok := ret.Get(1).(func() []byte); ok { + r1 = returnFunc() + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).([]byte) + } + } + if returnFunc, ok := ret.Get(2).(func() error); ok { + r2 = returnFunc() + } else { + r2 = ret.Error(2) + } + return r0, r1, r2 +} + +// MockTokens_Generate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Generate' +type MockTokens_Generate_Call struct { + *mock.Call +} + +// Generate is a helper method to define mock.On call +func (_e *MockTokens_Expecter) Generate() *MockTokens_Generate_Call { + return &MockTokens_Generate_Call{Call: _e.mock.On("Generate")} +} + +func (_c *MockTokens_Generate_Call) Run(run func()) *MockTokens_Generate_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockTokens_Generate_Call) Return(s string, bytes []byte, err error) *MockTokens_Generate_Call { + _c.Call.Return(s, bytes, err) + return _c +} + +func (_c *MockTokens_Generate_Call) RunAndReturn(run func() (string, []byte, error)) *MockTokens_Generate_Call { + _c.Call.Return(run) + return _c +} + +// Hash provides a mock function for the type MockTokens +func (_mock *MockTokens) Hash(raw string) ([]byte, error) { + ret := _mock.Called(raw) + + if len(ret) == 0 { + panic("no return value specified for Hash") + } + + var r0 []byte + var r1 error + if returnFunc, ok := ret.Get(0).(func(string) ([]byte, error)); ok { + return returnFunc(raw) + } + if returnFunc, ok := ret.Get(0).(func(string) []byte); ok { + r0 = returnFunc(raw) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + if returnFunc, ok := ret.Get(1).(func(string) error); ok { + r1 = returnFunc(raw) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockTokens_Hash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Hash' +type MockTokens_Hash_Call struct { + *mock.Call +} + +// Hash is a helper method to define mock.On call +// - raw string +func (_e *MockTokens_Expecter) Hash(raw any) *MockTokens_Hash_Call { + return &MockTokens_Hash_Call{Call: _e.mock.On("Hash", raw)} +} + +func (_c *MockTokens_Hash_Call) Run(run func(raw string)) *MockTokens_Hash_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 string + if args[0] != nil { + arg0 = args[0].(string) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockTokens_Hash_Call) Return(bytes []byte, err error) *MockTokens_Hash_Call { + _c.Call.Return(bytes, err) + return _c +} + +func (_c *MockTokens_Hash_Call) RunAndReturn(run func(raw string) ([]byte, error)) *MockTokens_Hash_Call { + _c.Call.Return(run) + return _c +} diff --git a/internal/service/session/service.go b/internal/service/session/service.go new file mode 100644 index 00000000..6b57aba7 --- /dev/null +++ b/internal/service/session/service.go @@ -0,0 +1,95 @@ +package session + +import ( + "context" + "fmt" + "time" + + "github.com/google/uuid" + + "mtusi-messenger/internal/domain" + "mtusi-messenger/internal/platform/password" +) + +type Repository interface { + Credentials(ctx context.Context, username string) (domain.UserCredentials, error) + Create(ctx context.Context, session domain.NewSession) (domain.Session, error) + Resolve(ctx context.Context, tokenHash []byte) (domain.Session, error) + Revoke(ctx context.Context, userID uuid.UUID, tokenHash []byte) error +} + +type Tokens interface { + Generate() (string, []byte, error) + Hash(raw string) ([]byte, error) +} + +type Service struct { + sessions Repository + tokens Tokens + ttl time.Duration +} + +func NewService(sessions Repository, tokens Tokens, ttl time.Duration) *Service { + return &Service{sessions: sessions, tokens: tokens, ttl: ttl} +} + +func (s *Service) Authenticate(ctx context.Context, username, plain string) (domain.User, error) { + credentials, err := s.sessions.Credentials(ctx, username) + if err != nil { + return domain.User{}, fmt.Errorf("authenticate: %w", err) + } + + if !password.Verify(plain, credentials.PasswordHash) { + return domain.User{}, fmt.Errorf("authenticate: %w", domain.ErrUnauthenticated) + } + + return credentials.User, nil +} + +func (s *Service) Resolve(ctx context.Context, raw string) (domain.User, error) { + hash, err := s.tokens.Hash(raw) + if err != nil { + return domain.User{}, fmt.Errorf("resolve session: %w", domain.ErrUnauthenticated) + } + + session, err := s.sessions.Resolve(ctx, hash) + if err != nil { + return domain.User{}, fmt.Errorf("resolve session: %w", err) + } + + return session.User, nil +} + +func (s *Service) Create(ctx context.Context, user domain.User) (domain.Session, error) { + raw, hash, err := s.tokens.Generate() + if err != nil { + return domain.Session{}, fmt.Errorf("generate token: %w", err) + } + + session, err := s.sessions.Create(ctx, domain.NewSession{ + TokenHash: hash, + UserID: user.ID, + ExpiresAt: time.Now().UTC().Add(s.ttl), + }) + if err != nil { + return domain.Session{}, fmt.Errorf("create session: %w", err) + } + + session.Token = raw + session.User = user + + return session, nil +} + +func (s *Service) Revoke(ctx context.Context, userID uuid.UUID, raw string) error { + hash, err := s.tokens.Hash(raw) + if err != nil { + return fmt.Errorf("revoke session: %w", domain.ErrUnauthenticated) + } + + if err := s.sessions.Revoke(ctx, userID, hash); err != nil { + return fmt.Errorf("revoke session: %w", err) + } + + return nil +} diff --git a/internal/service/session/service_test.go b/internal/service/session/service_test.go new file mode 100644 index 00000000..8d062ccf --- /dev/null +++ b/internal/service/session/service_test.go @@ -0,0 +1,146 @@ +package session_test + +import ( + "bytes" + "errors" + "testing" + "time" + + "github.com/google/uuid" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/suite" + + "mtusi-messenger/internal/domain" + "mtusi-messenger/internal/platform/password" + "mtusi-messenger/internal/service/session" + "mtusi-messenger/internal/service/session/mocks" +) + +type ServiceSuite struct { + suite.Suite + + sessions *mocks.MockRepository + tokens *mocks.MockTokens + service *session.Service + ttl time.Duration + user domain.User +} + +func TestServiceSuite(t *testing.T) { + t.Parallel() + suite.Run(t, new(ServiceSuite)) +} + +func (s *ServiceSuite) SetupTest() { + s.sessions = mocks.NewMockRepository(s.T()) + s.tokens = mocks.NewMockTokens(s.T()) + s.ttl = time.Hour + s.service = session.NewService(s.sessions, s.tokens, s.ttl) + s.user = domain.User{ + ID: uuid.New(), + Username: "alice", + DisplayName: "Алиса", + CreatedAt: time.Now().UTC(), + } +} + +func (s *ServiceSuite) TestResolveHashesTokenBeforeStorage() { + hash := []byte("hashed-token") + stored := domain.Session{ExpiresAt: time.Now().Add(time.Hour), User: s.user} + + s.tokens.EXPECT().Hash("raw-token").Return(hash, nil).Once() + s.sessions.EXPECT().Resolve(mock.Anything, hash).Return(stored, nil).Once() + + got, err := s.service.Resolve(s.T().Context(), "raw-token") + s.Require().NoError(err) + s.Equal(s.user, got) +} + +func (s *ServiceSuite) TestResolveRejectsMalformedTokenWithoutStorage() { + s.tokens.EXPECT().Hash("garbage").Return(nil, errors.New("invalid token")).Once() + + _, err := s.service.Resolve(s.T().Context(), "garbage") + s.Require().ErrorIs(err, domain.ErrUnauthenticated) +} + +func (s *ServiceSuite) TestCreateGeneratesTokenAndReturnsIt() { + hash := []byte("hashed-token") + expiresAt := time.Now().Add(s.ttl) + + s.tokens.EXPECT().Generate().Return("raw-token", hash, nil).Once() + s.sessions.EXPECT(). + Create(mock.Anything, mock.MatchedBy(func(candidate domain.NewSession) bool { + return bytes.Equal(candidate.TokenHash, hash) && + candidate.UserID == s.user.ID && + candidate.ExpiresAt.After(time.Now()) + })). + Return(domain.Session{ExpiresAt: expiresAt}, nil). + Once() + + got, err := s.service.Create(s.T().Context(), s.user) + s.Require().NoError(err) + s.Equal("raw-token", got.Token) + s.Equal(s.user, got.User) + s.Equal(expiresAt, got.ExpiresAt) +} + +func (s *ServiceSuite) TestCreatePropagatesTokenGenerationError() { + s.tokens.EXPECT().Generate().Return("", nil, errors.New("no entropy")).Once() + + _, err := s.service.Create(s.T().Context(), s.user) + s.Require().Error(err) +} + +func (s *ServiceSuite) TestRevokeHashesTokenBeforeStorage() { + hash := []byte("hashed-token") + userID := uuid.New() + + s.tokens.EXPECT().Hash("raw-token").Return(hash, nil).Once() + s.sessions.EXPECT().Revoke(mock.Anything, userID, hash).Return(nil).Once() + + s.Require().NoError(s.service.Revoke(s.T().Context(), userID, "raw-token")) +} + +func (s *ServiceSuite) TestRevokeRejectsMalformedToken() { + s.tokens.EXPECT().Hash("garbage").Return(nil, errors.New("invalid token")).Once() + + err := s.service.Revoke(s.T().Context(), uuid.New(), "garbage") + s.Require().ErrorIs(err, domain.ErrUnauthenticated) +} + +func (s *ServiceSuite) TestAuthenticateVerifiesPassword() { + hash, err := password.Hash("secret-password-123") + s.Require().NoError(err) + + s.sessions.EXPECT(). + Credentials(mock.Anything, "alice"). + Return(domain.UserCredentials{User: s.user, PasswordHash: hash}, nil). + Once() + + got, err := s.service.Authenticate(s.T().Context(), "alice", "secret-password-123") + s.Require().NoError(err) + s.Equal(s.user, got) +} + +func (s *ServiceSuite) TestAuthenticateRejectsWrongPassword() { + hash, err := password.Hash("secret-password-123") + s.Require().NoError(err) + + s.sessions.EXPECT(). + Credentials(mock.Anything, "alice"). + Return(domain.UserCredentials{User: s.user, PasswordHash: hash}, nil). + Once() + + _, err = s.service.Authenticate(s.T().Context(), "alice", "wrong-password-value") + s.Require().ErrorIs(err, domain.ErrUnauthenticated) +} + +func (s *ServiceSuite) TestAuthenticatePropagatesUnknownUser() { + s.sessions.EXPECT(). + Credentials(mock.Anything, "nobody"). + Return(domain.UserCredentials{}, domain.ErrUnauthenticated). + Once() + + _, err := s.service.Authenticate(s.T().Context(), "nobody", "secret-password-123") + s.Require().ErrorIs(err, domain.ErrUnauthenticated) +} diff --git a/internal/service/user/mocks/Repository.go b/internal/service/user/mocks/Repository.go index fe2e9e33..96978d34 100644 --- a/internal/service/user/mocks/Repository.go +++ b/internal/service/user/mocks/Repository.go @@ -49,7 +49,7 @@ func (_m *MockRepository) EXPECT() *MockRepository_Expecter { } // Create provides a mock function for the type MockRepository -func (_mock *MockRepository) Create(ctx context.Context, draft domain.UserDraft) (domain.User, error) { +func (_mock *MockRepository) Create(ctx context.Context, draft domain.NewUser) (domain.User, error) { ret := _mock.Called(ctx, draft) if len(ret) == 0 { @@ -58,15 +58,15 @@ func (_mock *MockRepository) Create(ctx context.Context, draft domain.UserDraft) var r0 domain.User var r1 error - if returnFunc, ok := ret.Get(0).(func(context.Context, domain.UserDraft) (domain.User, error)); ok { + if returnFunc, ok := ret.Get(0).(func(context.Context, domain.NewUser) (domain.User, error)); ok { return returnFunc(ctx, draft) } - if returnFunc, ok := ret.Get(0).(func(context.Context, domain.UserDraft) domain.User); ok { + if returnFunc, ok := ret.Get(0).(func(context.Context, domain.NewUser) domain.User); ok { r0 = returnFunc(ctx, draft) } else { r0 = ret.Get(0).(domain.User) } - if returnFunc, ok := ret.Get(1).(func(context.Context, domain.UserDraft) error); ok { + if returnFunc, ok := ret.Get(1).(func(context.Context, domain.NewUser) error); ok { r1 = returnFunc(ctx, draft) } else { r1 = ret.Error(1) @@ -81,20 +81,20 @@ type MockRepository_Create_Call struct { // Create is a helper method to define mock.On call // - ctx context.Context -// - draft domain.UserDraft +// - draft domain.NewUser func (_e *MockRepository_Expecter) Create(ctx any, draft any) *MockRepository_Create_Call { return &MockRepository_Create_Call{Call: _e.mock.On("Create", ctx, draft)} } -func (_c *MockRepository_Create_Call) Run(run func(ctx context.Context, draft domain.UserDraft)) *MockRepository_Create_Call { +func (_c *MockRepository_Create_Call) Run(run func(ctx context.Context, draft domain.NewUser)) *MockRepository_Create_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } - var arg1 domain.UserDraft + var arg1 domain.NewUser if args[1] != nil { - arg1 = args[1].(domain.UserDraft) + arg1 = args[1].(domain.NewUser) } run( arg0, @@ -109,7 +109,7 @@ func (_c *MockRepository_Create_Call) Return(user domain.User, err error) *MockR return _c } -func (_c *MockRepository_Create_Call) RunAndReturn(run func(ctx context.Context, draft domain.UserDraft) (domain.User, error)) *MockRepository_Create_Call { +func (_c *MockRepository_Create_Call) RunAndReturn(run func(ctx context.Context, draft domain.NewUser) (domain.User, error)) *MockRepository_Create_Call { _c.Call.Return(run) return _c } diff --git a/internal/service/user/service.go b/internal/service/user/service.go index 37add6bf..57a0eb1b 100644 --- a/internal/service/user/service.go +++ b/internal/service/user/service.go @@ -7,12 +7,11 @@ import ( "github.com/google/uuid" "mtusi-messenger/internal/domain" + "mtusi-messenger/internal/platform/password" ) -//go:generate go tool mockery - type Repository interface { - Create(ctx context.Context, draft domain.UserDraft) (domain.User, error) + Create(ctx context.Context, draft domain.NewUser) (domain.User, error) GetByID(ctx context.Context, id uuid.UUID) (domain.User, error) } @@ -29,7 +28,16 @@ func (s *Service) Register(ctx context.Context, draft domain.UserDraft) (domain. return domain.User{}, err } - user, err := s.users.Create(ctx, draft) + hash, err := password.Hash(draft.Password) + if err != nil { + return domain.User{}, fmt.Errorf("hash password: %w", err) + } + + user, err := s.users.Create(ctx, domain.NewUser{ + Username: draft.Username, + DisplayName: draft.DisplayName, + PasswordHash: hash, + }) if err != nil { return domain.User{}, fmt.Errorf("create user: %w", err) } diff --git a/internal/service/user/service_test.go b/internal/service/user/service_test.go index 919819df..f816e5b3 100644 --- a/internal/service/user/service_test.go +++ b/internal/service/user/service_test.go @@ -6,6 +6,7 @@ import ( "time" "github.com/google/uuid" + "github.com/stretchr/testify/mock" "github.com/stretchr/testify/suite" "mtusi-messenger/internal/domain" @@ -34,8 +35,8 @@ func (s *ServiceSuite) SetupTest() { s.now = time.Date(2026, 9, 1, 12, 0, 0, 0, time.UTC) } -func (s *ServiceSuite) TestRegisterReturnsStoredUser() { - draft := domain.UserDraft{Username: "alice", DisplayName: "Алиса"} +func (s *ServiceSuite) TestRegisterHashesPasswordAndReturnsStoredUser() { + draft := domain.UserDraft{Username: "alice", DisplayName: "Алиса", Password: "very-secret-password"} stored := domain.User{ ID: uuid.New(), Username: draft.Username, @@ -43,7 +44,15 @@ func (s *ServiceSuite) TestRegisterReturnsStoredUser() { CreatedAt: s.now, } - s.users.EXPECT().Create(s.T().Context(), draft).Return(stored, nil).Once() + s.users.EXPECT(). + Create(s.T().Context(), mock.MatchedBy(func(candidate domain.NewUser) bool { + return candidate.Username == draft.Username && + candidate.DisplayName == draft.DisplayName && + candidate.PasswordHash != "" && + candidate.PasswordHash != draft.Password + })). + Return(stored, nil). + Once() got, err := s.service.Register(s.T().Context(), draft) s.Require().NoError(err) @@ -51,16 +60,26 @@ func (s *ServiceSuite) TestRegisterReturnsStoredUser() { } func (s *ServiceSuite) TestRegisterRejectsBlankDisplayNameWithoutRepositoryCall() { - draft := domain.UserDraft{Username: "alice", DisplayName: " "} + draft := domain.UserDraft{Username: "alice", DisplayName: " ", Password: "very-secret-password"} + + _, err := s.service.Register(s.T().Context(), draft) + s.Require().ErrorIs(err, domain.ErrValidation) +} + +func (s *ServiceSuite) TestRegisterRejectsShortPasswordWithoutRepositoryCall() { + draft := domain.UserDraft{Username: "alice", DisplayName: "Алиса", Password: "too-short"} _, err := s.service.Register(s.T().Context(), draft) s.Require().ErrorIs(err, domain.ErrValidation) } func (s *ServiceSuite) TestRegisterPropagatesUsernameConflict() { - draft := domain.UserDraft{Username: "alice", DisplayName: "Алиса"} + draft := domain.UserDraft{Username: "alice", DisplayName: "Алиса", Password: "very-secret-password"} - s.users.EXPECT().Create(s.T().Context(), draft).Return(domain.User{}, domain.ErrUsernameTaken).Once() + s.users.EXPECT(). + Create(s.T().Context(), mock.Anything). + Return(domain.User{}, domain.ErrUsernameTaken). + Once() _, err := s.service.Register(s.T().Context(), draft) s.Require().ErrorIs(err, domain.ErrUsernameTaken) diff --git a/internal/storage/memory/chat_repository.go b/internal/storage/memory/chat_repository.go deleted file mode 100644 index c2c1ec38..00000000 --- a/internal/storage/memory/chat_repository.go +++ /dev/null @@ -1,95 +0,0 @@ -package memory - -import ( - "context" - "slices" - "time" - - "github.com/google/uuid" - - "mtusi-messenger/internal/domain" -) - -type ChatRepository struct { - store *Store -} - -func (r *ChatRepository) Create(_ context.Context, draft domain.ChatDraft) (domain.Chat, error) { - s := r.store - - s.mu.Lock() - defer s.mu.Unlock() - - for _, id := range draft.MemberIDs { - if _, ok := s.usersByID[id]; !ok { - return domain.Chat{}, domain.ErrUnknownMember - } - } - - chat := domain.Chat{ - ID: s.ids.NewID(), - Title: draft.Title, - MemberIDs: slices.Clone(draft.MemberIDs), - CreatedAt: s.clock.Now(), - } - - s.chatsByID[chat.ID] = chat - - at, _ := slices.BinarySearchFunc(s.chatsOrdered, chat, func(a, b domain.Chat) int { - return compareKeyset(a.CreatedAt, a.ID, b.CreatedAt, b.ID) - }) - s.chatsOrdered = slices.Insert(s.chatsOrdered, at, chat) - - return cloneChat(chat), nil -} - -func (r *ChatRepository) GetVisible(_ context.Context, chatID, callerID uuid.UUID) (domain.Chat, error) { - s := r.store - - s.mu.RLock() - defer s.mu.RUnlock() - - chat, ok := s.chatsByID[chatID] - if !ok || !chat.HasMember(callerID) { - return domain.Chat{}, domain.ErrNotFound - } - - return cloneChat(chat), nil -} - -func (r *ChatRepository) ListVisible( - _ context.Context, - callerID uuid.UUID, - after *domain.Cursor, - limit int, -) (domain.Page[domain.Chat], error) { - s := r.store - - s.mu.RLock() - defer s.mu.RUnlock() - - visible := make([]domain.Chat, 0, len(s.chatsOrdered)) - - for _, chat := range s.chatsOrdered { - if chat.HasMember(callerID) { - visible = append(visible, chat) - } - } - - page := paginate(visible, callerID, chatKey, after, limit) - for i, chat := range page.Items { - page.Items[i] = cloneChat(chat) - } - - return page, nil -} - -func chatKey(chat domain.Chat) (time.Time, uuid.UUID) { - return chat.CreatedAt, chat.ID -} - -func cloneChat(chat domain.Chat) domain.Chat { - chat.MemberIDs = slices.Clone(chat.MemberIDs) - - return chat -} diff --git a/internal/storage/memory/message_benchmark_test.go b/internal/storage/memory/message_benchmark_test.go deleted file mode 100644 index 12f620ac..00000000 --- a/internal/storage/memory/message_benchmark_test.go +++ /dev/null @@ -1,51 +0,0 @@ -package memory - -import ( - "context" - "fmt" - "testing" - "time" - - "github.com/google/uuid" - - "mtusi-messenger/internal/domain" -) - -type benchmarkClock struct{ now time.Time } - -func (c benchmarkClock) Now() time.Time { return c.now } - -func BenchmarkMessageCreate(b *testing.B) { - for _, size := range []int{1000, 10000, 50000} { - b.Run(fmt.Sprintf("history=%d", size), func(b *testing.B) { - base := time.Date(2026, 9, 1, 12, 0, 0, 0, time.UTC) - store := NewStore(WithClock(benchmarkClock{now: base.Add(time.Hour)})) - chatID, senderID := uuid.New(), uuid.New() - store.chatsByID[chatID] = domain.Chat{ID: chatID, MemberIDs: []uuid.UUID{senderID}} - history := make([]domain.Message, size, size+1) - for i := range history { - history[i] = domain.Message{ - ID: uuid.New(), - ChatID: chatID, - SenderID: senderID, - CreatedAt: base.Add(time.Duration(i) * time.Microsecond), - } - } - store.messagesByChat[chatID] = history - draft := domain.MessageDraft{ChatID: chatID, SenderID: senderID, Text: "benchmark"} - b.ReportAllocs() - b.ResetTimer() - for b.Loop() { - created, err := store.Messages().Create(context.Background(), draft) - if err != nil { - b.Fatal(err) - } - if len(store.messagesByChat[chatID]) != size+1 || - compareKeyset(history[size-1].CreatedAt, history[size-1].ID, created.CreatedAt, created.ID) >= 0 { - b.Fatal("message not appended in keyset order") - } - store.messagesByChat[chatID] = store.messagesByChat[chatID][:size] - } - }) - } -} diff --git a/internal/storage/memory/message_repository.go b/internal/storage/memory/message_repository.go deleted file mode 100644 index 68fa5a0d..00000000 --- a/internal/storage/memory/message_repository.go +++ /dev/null @@ -1,77 +0,0 @@ -package memory - -import ( - "context" - "slices" - "time" - - "github.com/google/uuid" - - "mtusi-messenger/internal/domain" -) - -type MessageRepository struct { - store *Store -} - -func (r *MessageRepository) Create(_ context.Context, draft domain.MessageDraft) (domain.Message, error) { - s := r.store - - s.mu.Lock() - defer s.mu.Unlock() - - chat, ok := s.chatsByID[draft.ChatID] - if !ok || !chat.HasMember(draft.SenderID) { - return domain.Message{}, domain.ErrNotFound - } - - message := domain.Message{ - ID: s.ids.NewID(), - ChatID: draft.ChatID, - SenderID: draft.SenderID, - Text: draft.Text, - CreatedAt: s.clock.Now(), - } - - history := s.messagesByChat[message.ChatID] - if len(history) == 0 || compareKeyset( - history[len(history)-1].CreatedAt, - history[len(history)-1].ID, - message.CreatedAt, - message.ID, - ) < 0 { - s.messagesByChat[message.ChatID] = append(history, message) - - return message, nil - } - - at, _ := slices.BinarySearchFunc(history, message, func(a, b domain.Message) int { - return compareKeyset(a.CreatedAt, a.ID, b.CreatedAt, b.ID) - }) - s.messagesByChat[message.ChatID] = slices.Insert(history, at, message) - - return message, nil -} - -func (r *MessageRepository) ListVisible( - _ context.Context, - chatID, callerID uuid.UUID, - after *domain.Cursor, - limit int, -) (domain.Page[domain.Message], error) { - s := r.store - - s.mu.RLock() - defer s.mu.RUnlock() - - chat, ok := s.chatsByID[chatID] - if !ok || !chat.HasMember(callerID) { - return domain.Page[domain.Message]{}, domain.ErrNotFound - } - - return paginate(s.messagesByChat[chatID], chatID, messageKey, after, limit), nil -} - -func messageKey(message domain.Message) (time.Time, uuid.UUID) { - return message.CreatedAt, message.ID -} diff --git a/internal/storage/memory/repository_test.go b/internal/storage/memory/repository_test.go deleted file mode 100644 index a145b64f..00000000 --- a/internal/storage/memory/repository_test.go +++ /dev/null @@ -1,378 +0,0 @@ -package memory_test - -import ( - "context" - "sync" - "testing" - "time" - - "github.com/google/uuid" - "github.com/stretchr/testify/require" - "github.com/stretchr/testify/suite" - - "mtusi-messenger/internal/domain" - "mtusi-messenger/internal/service/chat" - "mtusi-messenger/internal/service/message" - "mtusi-messenger/internal/service/user" - "mtusi-messenger/internal/storage/memory" -) - -type stepClock struct { - mu sync.Mutex - next time.Time -} - -func newStepClock() *stepClock { - return &stepClock{next: time.Date(2026, 9, 1, 12, 0, 0, 0, time.UTC)} -} - -func (c *stepClock) Now() time.Time { - c.mu.Lock() - defer c.mu.Unlock() - - out := c.next - c.next = c.next.Add(time.Second) - - return out -} - -type RepositorySuite struct { - suite.Suite - - store *memory.Store -} - -func (s *RepositorySuite) ctx() context.Context { return s.T().Context() } - -func TestRepositorySuite(t *testing.T) { - t.Parallel() - suite.Run(t, new(RepositorySuite)) -} - -func (s *RepositorySuite) SetupTest() { - s.store = memory.NewStore(memory.WithClock(newStepClock())) -} - -func (s *RepositorySuite) createUser(username string) domain.User { - s.T().Helper() - - created, err := s.store.Users().Create(s.ctx(), domain.UserDraft{ - Username: username, - DisplayName: "Пользователь", - }) - s.Require().NoError(err) - - return created -} - -func (s *RepositorySuite) createChat(title string, members ...uuid.UUID) domain.Chat { - s.T().Helper() - - created, err := s.store.Chats().Create(s.ctx(), domain.ChatDraft{ - Title: title, - MemberIDs: members, - CallerID: members[0], - }) - s.Require().NoError(err) - - return created -} - -func (s *RepositorySuite) TestCreateAssignsIdentityAndTime() { - created := s.createUser("alice") - - s.NotEqual(uuid.Nil, created.ID, "идентификатор назначает хранилище") - s.False(created.CreatedAt.IsZero(), "время назначает хранилище") - - got, err := s.store.Users().GetByID(s.ctx(), created.ID) - s.Require().NoError(err) - s.Equal(created, got) -} - -func (s *RepositorySuite) TestGetUnknownUser() { - _, err := s.store.Users().GetByID(s.ctx(), uuid.New()) - s.Require().ErrorIs(err, domain.ErrNotFound) -} - -func (s *RepositorySuite) TestDuplicateUsernameRejected() { - s.createUser("alice") - - _, err := s.store.Users().Create(s.ctx(), domain.UserDraft{ - Username: "alice", - DisplayName: "Другая Алиса", - }) - s.Require().ErrorIs(err, domain.ErrUsernameTaken) -} - -func (s *RepositorySuite) TestUsernameUniqueUnderConcurrency() { - const attempts = 50 - - var ( - wg sync.WaitGroup - mu sync.Mutex - succeeded int - ) - - for range attempts { - wg.Go(func() { - _, err := s.store.Users().Create(s.ctx(), domain.UserDraft{ - Username: "alice", - DisplayName: "Алиса", - }) - - mu.Lock() - defer mu.Unlock() - - if err == nil { - succeeded++ - } - }) - } - - wg.Wait() - - s.Equal(1, succeeded, "username уникален даже при гонке") -} - -func (s *RepositorySuite) TestChatRejectsUnknownMember() { - caller := s.createUser("alice") - - _, err := s.store.Chats().Create(s.ctx(), domain.ChatDraft{ - Title: "Проект", - MemberIDs: []uuid.UUID{caller.ID, uuid.New()}, - CallerID: caller.ID, - }) - s.Require().ErrorIs(err, domain.ErrUnknownMember, - "ссылочная целостность проверяется там же, где вставка") -} - -func (s *RepositorySuite) TestChatVisibleOnlyToMembers() { - member := s.createUser("alice") - outsider := s.createUser("bob") - - created := s.createChat("Проект", member.ID) - - got, err := s.store.Chats().GetVisible(s.ctx(), created.ID, member.ID) - s.Require().NoError(err) - s.Equal(created.ID, got.ID) - - _, err = s.store.Chats().GetVisible(s.ctx(), created.ID, outsider.ID) - s.Require().ErrorIs(err, domain.ErrNotFound, "чужой чат неотличим от отсутствующего") - - page, err := s.store.Chats().ListVisible(s.ctx(), outsider.ID, nil, domain.DefaultPageLimit) - s.Require().NoError(err) - s.Empty(page.Items, "чужой чат не попадает в список") -} - -func (s *RepositorySuite) TestStoredChatIsIsolated() { - member := s.createUser("alice") - members := []uuid.UUID{member.ID} - - created := s.createChat("Проект", members...) - - members[0] = uuid.New() - - got, err := s.store.Chats().GetVisible(s.ctx(), created.ID, member.ID) - s.Require().NoError(err) - s.Equal([]uuid.UUID{member.ID}, got.MemberIDs, "хранилище не делит срез с вызывающим") - - got.MemberIDs[0] = uuid.New() - - again, err := s.store.Chats().GetVisible(s.ctx(), created.ID, member.ID) - s.Require().NoError(err) - s.Equal([]uuid.UUID{member.ID}, again.MemberIDs) -} - -func (s *RepositorySuite) TestChatsSortedByKeyset() { - member := s.createUser("alice") - - for range 3 { - s.createChat("Чат", member.ID) - } - - page, err := s.store.Chats().ListVisible(s.ctx(), member.ID, nil, domain.DefaultPageLimit) - s.Require().NoError(err) - s.Require().Len(page.Items, 3) - - for i := 1; i < len(page.Items); i++ { - s.True( - page.Items[i-1].CreatedAt.Before(page.Items[i].CreatedAt), - "порядок (created_at, id) по возрастанию", - ) - } -} - -func (s *RepositorySuite) TestMessageRejectsOutsider() { - member := s.createUser("alice") - outsider := s.createUser("bob") - created := s.createChat("Проект", member.ID) - - _, err := s.store.Messages().Create(s.ctx(), domain.MessageDraft{ - ChatID: created.ID, - SenderID: outsider.ID, - Text: "привет", - }) - s.Require().ErrorIs(err, domain.ErrNotFound) - - _, err = s.store.Messages().ListVisible(s.ctx(), created.ID, outsider.ID, nil, domain.DefaultPageLimit) - s.Require().ErrorIs(err, domain.ErrNotFound) -} - -func (s *RepositorySuite) TestMessageHistoryIsolatedPerChat() { - member := s.createUser("alice") - first := s.createChat("Первый", member.ID) - second := s.createChat("Второй", member.ID) - - for _, tt := range []struct { - chatID uuid.UUID - text string - }{ - {chatID: first.ID, text: "в первом"}, - {chatID: second.ID, text: "во втором"}, - } { - _, err := s.store.Messages().Create(s.ctx(), domain.MessageDraft{ - ChatID: tt.chatID, - SenderID: member.ID, - Text: tt.text, - }) - s.Require().NoError(err) - } - - page, err := s.store.Messages().ListVisible(s.ctx(), first.ID, member.ID, nil, domain.DefaultPageLimit) - s.Require().NoError(err) - s.Require().Len(page.Items, 1) - s.Equal("в первом", page.Items[0].Text) -} - -func (s *RepositorySuite) TestEmptyHistoryReturnsEmptyPage() { - member := s.createUser("alice") - created := s.createChat("Проект", member.ID) - - page, err := s.store.Messages().ListVisible(s.ctx(), created.ID, member.ID, nil, domain.DefaultPageLimit) - s.Require().NoError(err) - s.NotNil(page.Items, `контракт требует "items": [], а не null`) - s.Empty(page.Items) - s.Nil(page.Next) -} - -func (s *RepositorySuite) TestConcurrentMessagesAllStored() { - const ( - clients = 10 - perClient = 10 - total = clients * perClient - readerIterations = 20 - ) - - member := s.createUser("alice") - created := s.createChat("Проект", member.ID) - - var wg sync.WaitGroup - - failures := make(chan error, total+readerIterations) - - for range clients { - wg.Go(func() { - for range perClient { - _, err := s.store.Messages().Create(s.ctx(), domain.MessageDraft{ - ChatID: created.ID, - SenderID: member.ID, - Text: "сообщение", - }) - if err != nil { - failures <- err - } - } - }) - } - - wg.Go(func() { - for range readerIterations { - _, err := s.store.Messages().ListVisible( - s.ctx(), created.ID, member.ID, nil, domain.DefaultPageLimit, - ) - if err != nil { - failures <- err - } - } - }) - - wg.Wait() - close(failures) - - for err := range failures { - s.Require().NoError(err) - } - - seen := make(map[uuid.UUID]struct{}, total) - - var cursor *domain.Cursor - - for { - page, err := s.store.Messages().ListVisible(s.ctx(), created.ID, member.ID, cursor, 7) - s.Require().NoError(err) - - for _, msg := range page.Items { - _, duplicate := seen[msg.ID] - s.Require().False(duplicate, "обход истории не должен повторять сообщения") - seen[msg.ID] = struct{}{} - } - - if page.Next == nil { - break - } - - cursor = page.Next - } - - s.Len(seen, total, "все подтверждённые сообщения должны быть видны следующему чтению") -} - -func (s *RepositorySuite) TestPageWalkIsStable() { - const total = 25 - - member := s.createUser("alice") - created := s.createChat("Проект", member.ID) - - for range total { - _, err := s.store.Messages().Create(s.ctx(), domain.MessageDraft{ - ChatID: created.ID, - SenderID: member.ID, - Text: "сообщение", - }) - s.Require().NoError(err) - } - - whole, err := s.store.Messages().ListVisible(s.ctx(), created.ID, member.ID, nil, 100) - s.Require().NoError(err) - s.Require().Len(whole.Items, total) - - var ( - walked []domain.Message - cursor *domain.Cursor - ) - - for { - page, err := s.store.Messages().ListVisible(s.ctx(), created.ID, member.ID, cursor, 4) - s.Require().NoError(err) - - walked = append(walked, page.Items...) - - if page.Next == nil { - break - } - - cursor = page.Next - } - - s.Equal(whole.Items, walked) -} - -func TestRepositoriesImplementContracts(t *testing.T) { - t.Parallel() - - store := memory.NewStore() - - require.Implements(t, (*user.Repository)(nil), store.Users()) - require.Implements(t, (*chat.Repository)(nil), store.Chats()) - require.Implements(t, (*message.Repository)(nil), store.Messages()) -} diff --git a/internal/storage/memory/store.go b/internal/storage/memory/store.go deleted file mode 100644 index 41bd47c2..00000000 --- a/internal/storage/memory/store.go +++ /dev/null @@ -1,144 +0,0 @@ -package memory - -import ( - "cmp" - "slices" - "sync" - "time" - - "github.com/google/uuid" - - "mtusi-messenger/internal/domain" -) - -type Clock interface { - Now() time.Time -} - -type IDGenerator interface { - NewID() uuid.UUID -} - -type systemClock struct{} - -func (systemClock) Now() time.Time { - return time.Now().UTC() -} - -type randomIDGenerator struct{} - -func (randomIDGenerator) NewID() uuid.UUID { - return uuid.New() -} - -type options struct { - clock Clock - ids IDGenerator -} - -type Option func(*options) - -func WithClock(clock Clock) Option { - return func(o *options) { - if clock != nil { - o.clock = clock - } - } -} - -func WithIDGenerator(ids IDGenerator) Option { - return func(o *options) { - if ids != nil { - o.ids = ids - } - } -} - -type Store struct { - clock Clock - ids IDGenerator - - mu sync.RWMutex - usersByID map[uuid.UUID]domain.User - usersByUsername map[string]uuid.UUID - chatsByID map[uuid.UUID]domain.Chat - chatsOrdered []domain.Chat - messagesByChat map[uuid.UUID][]domain.Message - - users *UserRepository - chats *ChatRepository - messages *MessageRepository -} - -func NewStore(opts ...Option) *Store { - cfg := options{clock: systemClock{}, ids: randomIDGenerator{}} - for _, opt := range opts { - opt(&cfg) - } - - store := &Store{ - clock: cfg.clock, - ids: cfg.ids, - usersByID: make(map[uuid.UUID]domain.User), - usersByUsername: make(map[string]uuid.UUID), - chatsByID: make(map[uuid.UUID]domain.Chat), - messagesByChat: make(map[uuid.UUID][]domain.Message), - } - - store.users = &UserRepository{store: store} - store.chats = &ChatRepository{store: store} - store.messages = &MessageRepository{store: store} - - return store -} - -func (s *Store) Users() *UserRepository { return s.users } - -func (s *Store) Chats() *ChatRepository { return s.chats } - -func (s *Store) Messages() *MessageRepository { return s.messages } - -func compareKeyset(aCreatedAt time.Time, aID uuid.UUID, bCreatedAt time.Time, bID uuid.UUID) int { - if c := aCreatedAt.Compare(bCreatedAt); c != 0 { - return c - } - - return cmp.Compare(aID.String(), bID.String()) -} - -func paginate[T any]( - items []T, - scope uuid.UUID, - key func(T) (time.Time, uuid.UUID), - after *domain.Cursor, - limit int, -) domain.Page[T] { - start := 0 - - if after != nil { - start, _ = slices.BinarySearchFunc(items, *after, func(item T, target domain.Cursor) int { - createdAt, id := key(item) - if compareKeyset(createdAt, id, target.CreatedAt, target.ID) > 0 { - return 1 - } - - return -1 - }) - } - - rest := items[start:] - - page := domain.Page[T]{Items: make([]T, 0, min(len(rest), limit))} - if len(rest) <= limit { - page.Items = append(page.Items, rest...) - - return page - } - - page.Items = append(page.Items, rest[:limit]...) - - createdAt, id := key(page.Items[limit-1]) - page.Next = &domain.Cursor{Scope: scope, CreatedAt: createdAt, ID: id} - - return page -} diff --git a/internal/storage/memory/store_test.go b/internal/storage/memory/store_test.go deleted file mode 100644 index 7c238ca0..00000000 --- a/internal/storage/memory/store_test.go +++ /dev/null @@ -1,175 +0,0 @@ -package memory - -import ( - "testing" - "time" - - "github.com/google/uuid" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "mtusi-messenger/internal/domain" -) - -type entry struct { - createdAt time.Time - id uuid.UUID -} - -func entryKey(e entry) (time.Time, uuid.UUID) { - return e.createdAt, e.id -} - -func TestCompareKeyset(t *testing.T) { - t.Parallel() - - earlier := time.Date(2026, 9, 1, 12, 0, 0, 0, time.UTC) - later := earlier.Add(time.Second) - - lowID := uuid.MustParse("11111111-1111-4111-8111-111111111111") - highID := uuid.MustParse("22222222-2222-4222-8222-222222222222") - - tests := map[string]struct { - a entry - b entry - want int - }{ - "время решает": { - a: entry{createdAt: earlier, id: highID}, - b: entry{createdAt: later, id: lowID}, - want: -1, - }, - "при равном времени решает id": { - a: entry{createdAt: earlier, id: lowID}, - b: entry{createdAt: earlier, id: highID}, - want: -1, - }, - "полное совпадение": { - a: entry{createdAt: earlier, id: lowID}, - b: entry{createdAt: earlier, id: lowID}, - want: 0, - }, - } - - for name, tt := range tests { - t.Run(name, func(t *testing.T) { - t.Parallel() - - assert.Equal(t, tt.want, compareKeyset(tt.a.createdAt, tt.a.id, tt.b.createdAt, tt.b.id)) - assert.Equal(t, -tt.want, compareKeyset(tt.b.createdAt, tt.b.id, tt.a.createdAt, tt.a.id), - "сравнение должно быть антисимметричным") - }) - } -} - -func makeEntries(n int) []entry { - base := time.Date(2026, 9, 1, 12, 0, 0, 0, time.UTC) - items := make([]entry, 0, n) - - for i := range n { - items = append(items, entry{ - createdAt: base.Add(time.Duration(i) * time.Second), - id: uuid.New(), - }) - } - - return items -} - -func TestPaginateFirstPage(t *testing.T) { - t.Parallel() - - scope := uuid.New() - items := makeEntries(5) - - page := paginate(items, scope, entryKey, nil, 2) - - require.Len(t, page.Items, 2) - assert.Equal(t, items[:2], page.Items) - require.NotNil(t, page.Next) - assert.Equal(t, items[1].id, page.Next.ID) - assert.Equal(t, scope, page.Next.Scope, "курсор должен нести привязку к последовательности") -} - -func TestPaginateLastPageHasNoCursor(t *testing.T) { - t.Parallel() - - items := makeEntries(3) - - page := paginate(items, uuid.New(), entryKey, nil, 3) - - assert.Equal(t, items, page.Items) - assert.Nil(t, page.Next, "на последней странице next_cursor равен null") -} - -func TestPaginateEmptyResultIsNotNil(t *testing.T) { - t.Parallel() - - page := paginate([]entry{}, uuid.New(), entryKey, nil, 10) - - assert.NotNil(t, page.Items, `контракт требует "items": [], а не null`) - assert.Empty(t, page.Items) - assert.Nil(t, page.Next) -} - -func TestPaginateWalkWithoutDuplicates(t *testing.T) { - t.Parallel() - - const ( - total = 10 - limit = 3 - ) - - scope := uuid.New() - items := makeEntries(total) - - var ( - seen []entry - cursor *domain.Cursor - ) - - for range total { - page := paginate(items, scope, entryKey, cursor, limit) - seen = append(seen, page.Items...) - - if page.Next == nil { - break - } - - cursor = page.Next - } - - assert.Equal(t, items, seen) -} - -func TestPaginateCursorBeyondEnd(t *testing.T) { - t.Parallel() - - scope := uuid.New() - items := makeEntries(3) - last := items[len(items)-1] - - page := paginate(items, scope, entryKey, &domain.Cursor{ - Scope: scope, - CreatedAt: last.createdAt, - ID: last.id, - }, 10) - - assert.Empty(t, page.Items) - assert.Nil(t, page.Next) -} - -func TestPaginateChangedLimitOnContinuation(t *testing.T) { - t.Parallel() - - scope := uuid.New() - items := makeEntries(6) - - first := paginate(items, scope, entryKey, nil, 2) - require.NotNil(t, first.Next) - - second := paginate(items, scope, entryKey, first.Next, 4) - - assert.Equal(t, items[2:], second.Items) - assert.Nil(t, second.Next, "изменение limit при продолжении допустимо") -} diff --git a/internal/storage/memory/user_repository.go b/internal/storage/memory/user_repository.go deleted file mode 100644 index 388decb6..00000000 --- a/internal/storage/memory/user_repository.go +++ /dev/null @@ -1,50 +0,0 @@ -package memory - -import ( - "context" - - "github.com/google/uuid" - - "mtusi-messenger/internal/domain" -) - -type UserRepository struct { - store *Store -} - -func (r *UserRepository) Create(_ context.Context, draft domain.UserDraft) (domain.User, error) { - s := r.store - - s.mu.Lock() - defer s.mu.Unlock() - - if _, taken := s.usersByUsername[draft.Username]; taken { - return domain.User{}, domain.ErrUsernameTaken - } - - user := domain.User{ - ID: s.ids.NewID(), - Username: draft.Username, - DisplayName: draft.DisplayName, - CreatedAt: s.clock.Now(), - } - - s.usersByID[user.ID] = user - s.usersByUsername[user.Username] = user.ID - - return user, nil -} - -func (r *UserRepository) GetByID(_ context.Context, id uuid.UUID) (domain.User, error) { - s := r.store - - s.mu.RLock() - defer s.mu.RUnlock() - - user, ok := s.usersByID[id] - if !ok { - return domain.User{}, domain.ErrNotFound - } - - return user, nil -} diff --git a/internal/storage/postgres/cache_latency_experiment_test.go b/internal/storage/postgres/cache_latency_experiment_test.go new file mode 100644 index 00000000..39858fd1 --- /dev/null +++ b/internal/storage/postgres/cache_latency_experiment_test.go @@ -0,0 +1,159 @@ +//go:build integration + +package postgres_test + +import ( + "context" + "fmt" + "sort" + "sync/atomic" + "testing" + "time" + + "github.com/google/uuid" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + + "mtusi-messenger/internal/domain" + "mtusi-messenger/internal/platform/cache" + storageredis "mtusi-messenger/internal/storage/redis" + "mtusi-messenger/internal/storage/redis/mocks" +) + +func TestCacheLatencyExperiment(t *testing.T) { + suite := new(BaseSuite) + suite.SetT(t) + suite.SetupTest() + defer suite.TearDownTest() + + ctx := context.Background() + redisConfig := cache.RedisConfig{ + Host: envOr("TEST_REDIS_HOST", "localhost"), + Port: envInt("TEST_REDIS_PORT", 6379), + Password: envOr("TEST_REDIS_PASSWORD", ""), + DB: envInt("TEST_REDIS_DB", 2), + DialTimeout: 5 * time.Second, + ReadTimeout: 3 * time.Second, + WriteTimeout: 3 * time.Second, + PoolSize: 5, + } + redisCache, err := cache.NewRedis(redisConfig) + require.NoError(t, err) + defer func() { _ = redisCache.Close() }() + + alice := suite.createUser("latency_alice") + for range 20 { + suite.createChat(alice) + } + + realChats := suite.store.Chats() + + var loads atomic.Int32 + + source := mocks.NewMockChatSource(t) + source.EXPECT().ListVersion(mock.Anything, mock.Anything).RunAndReturn( + func(ctx context.Context, userID uuid.UUID) (int64, error) { + return realChats.ListVersion(ctx, userID) + }).Maybe() + source.EXPECT().ListVisible(mock.Anything, mock.Anything, mock.Anything, mock.Anything). + RunAndReturn(func(ctx context.Context, callerID uuid.UUID, after *domain.Cursor, limit int) (domain.Page[domain.Chat], error) { + loads.Add(1) + + return realChats.ListVisible(ctx, callerID, after, limit) + }).Maybe() + + for range 50 { + _, err := source.ListVisible(ctx, alice.ID, nil, 50) + require.NoError(t, err) + } + loads.Store(0) + baseline := measureLatency(ctx, t, source.ListVisible, &loads, alice.ID, 1000) + + distributed, err := cache.NewDistributed(redisCache, cache.DistributedConfig{}, nil) + require.NoError(t, err) + + cached := storageredis.NewChatRepository( + source, + distributed, + time.Minute, + nil, + ) + loads.Store(0) + cachedStats := measureCachedLatency(ctx, t, cached, alice.ID, 1000) + cachedStats.Loads = int(loads.Load()) + require.Equal(t, 1000, baseline.Loads) + require.Equal(t, 1, cachedStats.Loads) + + t.Logf("baseline: %s", formatLatency(baseline)) + t.Logf("redis cache: %s", formatLatency(cachedStats)) +} + +func measureLatency( + ctx context.Context, + t *testing.T, + list func(context.Context, uuid.UUID, *domain.Cursor, int) (domain.Page[domain.Chat], error), + loads *atomic.Int32, + callerID uuid.UUID, + requests int, +) latencyStats { + t.Helper() + values := make([]time.Duration, 0, requests) + for range requests { + started := time.Now() + _, err := list(ctx, callerID, nil, 50) + require.NoError(t, err) + values = append(values, time.Since(started)) + } + + return makeLatencyStats(values, int(loads.Load())) +} + +func measureCachedLatency( + ctx context.Context, + t *testing.T, + repository *storageredis.ChatRepository, + callerID uuid.UUID, + requests int, +) latencyStats { + t.Helper() + values := make([]time.Duration, 0, requests) + for range requests { + started := time.Now() + _, err := repository.ListVisible(ctx, callerID, nil, 50) + require.NoError(t, err) + values = append(values, time.Since(started)) + } + + return makeLatencyStats(values, 0) +} + +type latencyStats struct { + Requests int + Loads int + P50 time.Duration + P95 time.Duration + P99 time.Duration +} + +func makeLatencyStats(values []time.Duration, loads int) latencyStats { + sort.Slice(values, func(i, j int) bool { return values[i] < values[j] }) + percentile := func(percent int) time.Duration { + index := (len(values)*percent + 99) / 100 + if index > 0 { + index-- + } + return values[index] + } + + return latencyStats{ + Requests: len(values), Loads: loads, + P50: percentile(50), P95: percentile(95), P99: percentile(99), + } +} + +func formatLatency(value latencyStats) string { + return fmt.Sprintf( + "requests=%d source_loads=%d p50=%s p95=%s p99=%s", + value.Requests, value.Loads, value.P50, value.P95, value.P99, + ) +} diff --git a/internal/storage/postgres/cache_performance_experiment_test.go b/internal/storage/postgres/cache_performance_experiment_test.go new file mode 100644 index 00000000..c803fdd3 --- /dev/null +++ b/internal/storage/postgres/cache_performance_experiment_test.go @@ -0,0 +1,192 @@ +//go:build integration + +package postgres_test + +import ( + "context" + "fmt" + "sort" + "sync" + "sync/atomic" + "testing" + "time" + + "github.com/google/uuid" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + + "mtusi-messenger/internal/domain" + "mtusi-messenger/internal/platform/cache" + storageredis "mtusi-messenger/internal/storage/redis" + "mtusi-messenger/internal/storage/redis/mocks" +) + +func TestCachePerformanceExperiment(t *testing.T) { + suite := new(BaseSuite) + suite.SetT(t) + suite.SetupTest() + defer suite.TearDownTest() + + ctx := context.Background() + redisConfig := cache.RedisConfig{ + Host: envOr("TEST_REDIS_HOST", "localhost"), + Port: envInt("TEST_REDIS_PORT", 6379), + Password: envOr("TEST_REDIS_PASSWORD", ""), + DB: envInt("TEST_REDIS_DB", 2), + DialTimeout: 5 * time.Second, + ReadTimeout: 3 * time.Second, + WriteTimeout: 3 * time.Second, + PoolSize: 10, + } + redisCache, err := cache.NewRedis(redisConfig) + require.NoError(t, err) + defer func() { _ = redisCache.Close() }() + + alice := suite.createUser("perf_alice") + bob := suite.createUser("perf_bob") + carol := suite.createUser("perf_carol") + + for i := range 150 { + title := fmt.Sprintf("Chat %d with Alice", i+1) + members := []uuid.UUID{alice.ID} + if i%3 == 0 { + members = append(members, bob.ID) + } + if i%5 == 0 { + members = append(members, carol.ID) + } + _, err := suite.store.Chats().Create(ctx, domain.ChatDraft{ + Title: title, + MemberIDs: members, + }) + require.NoError(t, err) + } + + realChats := suite.store.Chats() + + var loads atomic.Int32 + + source := mocks.NewMockChatSource(t) + source.EXPECT().ListVersion(mock.Anything, mock.Anything).RunAndReturn( + func(ctx context.Context, userID uuid.UUID) (int64, error) { + return realChats.ListVersion(ctx, userID) + }).Maybe() + source.EXPECT().ListVisible(mock.Anything, mock.Anything, mock.Anything, mock.Anything). + RunAndReturn(func(ctx context.Context, callerID uuid.UUID, after *domain.Cursor, limit int) (domain.Page[domain.Chat], error) { + loads.Add(1) + + return realChats.ListVisible(ctx, callerID, after, limit) + }).Maybe() + + distributed, err := cache.NewDistributed(redisCache, cache.DistributedConfig{}, nil) + require.NoError(t, err) + + cached := storageredis.NewChatRepository( + source, + distributed, + time.Minute, + nil, + ) + + baselineStats := benchmarkConcurrent(ctx, t, func(ctx context.Context) error { + _, err := source.ListVisible(ctx, alice.ID, nil, 50) + return err + }, 50, 200) + + baselineStats.SQLQueries = int(loads.Load()) + loads.Store(0) + cachedStats := benchmarkConcurrent(ctx, t, func(ctx context.Context) error { + _, err := cached.ListVisible(ctx, alice.ID, nil, 50) + return err + }, 50, 200) + + cachedStats.SQLQueries = int(loads.Load()) + loads.Store(0) + + _, err = cached.ListVisible(ctx, alice.ID, nil, 50) + require.NoError(t, err) + + cachedHotStats := benchmarkConcurrent(ctx, t, func(ctx context.Context) error { + _, err := cached.ListVisible(ctx, alice.ID, nil, 50) + return err + }, 50, 200) + cachedHotStats.SQLQueries = int(loads.Load()) + + t.Logf("baseline (no cache): %s", formatPerfStats(baselineStats)) + t.Logf("redis cache (cold): %s", formatPerfStats(cachedStats)) + t.Logf("redis cache (hot): %s", formatPerfStats(cachedHotStats)) +} + +type perfStats struct { + TotalRequests int + Concurrency int + SQLQueries int + Duration time.Duration + RPS float64 + P50 time.Duration + P95 time.Duration + P99 time.Duration +} + +func benchmarkConcurrent( + ctx context.Context, + t *testing.T, + operation func(context.Context) error, + concurrency int, + requestsPerWorker int, +) perfStats { + t.Helper() + + totalRequests := concurrency * requestsPerWorker + latencies := make([]time.Duration, totalRequests) + var wg sync.WaitGroup + var failures atomic.Int32 + started := time.Now() + + for worker := range concurrency { + wg.Add(1) + go func(workerID int) { + defer wg.Done() + offset := workerID * requestsPerWorker + for i := range requestsPerWorker { + reqStart := time.Now() + err := operation(ctx) + if err != nil { + failures.Add(1) + } + latencies[offset+i] = time.Since(reqStart) + } + }(worker) + } + + wg.Wait() + require.Zero(t, failures.Load(), "some requests failed") + duration := time.Since(started) + + sort.Slice(latencies, func(i, j int) bool { return latencies[i] < latencies[j] }) + percentile := func(p int) time.Duration { + index := (len(latencies)*p + 99) / 100 + if index > 0 { + index-- + } + return latencies[index] + } + + return perfStats{ + TotalRequests: totalRequests, + Concurrency: concurrency, + Duration: duration, + RPS: float64(totalRequests) / duration.Seconds(), + P50: percentile(50), + P95: percentile(95), + P99: percentile(99), + } +} + +func formatPerfStats(s perfStats) string { + return fmt.Sprintf( + "requests=%d concurrency=%d sql=%d duration=%s rps=%.0f p50=%s p95=%s p99=%s", + s.TotalRequests, s.Concurrency, s.SQLQueries, s.Duration.Round(time.Millisecond), + s.RPS, s.P50, s.P95, s.P99, + ) +} diff --git a/internal/storage/postgres/chat_repository.go b/internal/storage/postgres/chat_repository.go new file mode 100644 index 00000000..0cda071f --- /dev/null +++ b/internal/storage/postgres/chat_repository.go @@ -0,0 +1,162 @@ +package postgres + +import ( + "bytes" + "context" + "errors" + "fmt" + "slices" + "time" + + "github.com/google/uuid" + + "mtusi-messenger/internal/domain" + "mtusi-messenger/internal/storage/postgres/internal/sqlcgen" +) + +type ChatRepository struct { + store *Store +} + +func (r *ChatRepository) Create(ctx context.Context, draft domain.ChatDraft) (domain.Chat, error) { + ctx, cancel := r.store.timeout(ctx) + defer cancel() + + var created domain.Chat + + if err := r.store.RunInTx(ctx, func(queries *sqlcgen.Queries) error { + missing, err := queries.ListMissingUserIDs(ctx, draft.MemberIDs) + if err != nil { + return fmt.Errorf("check chat members: %w", mapError(err)) + } + + if len(missing) > 0 { + return domain.ErrUnknownMember + } + + row, err := queries.CreateChat(ctx, draft.Title) + if err != nil { + return fmt.Errorf("create chat: %w", mapError(err)) + } + + if err := queries.AddChatMembers(ctx, sqlcgen.AddChatMembersParams{ + ChatID: row.ID, + UserIds: draft.MemberIDs, + }); err != nil { + return fmt.Errorf("add chat members: %w", mapError(err)) + } + + if err := queries.BumpChatListVersions(ctx, sortedUnique(draft.MemberIDs)); err != nil { + return fmt.Errorf("bump chat list versions: %w", mapError(err)) + } + + created = mapChat(row.ID, row.Title, row.CreatedAt, draft.MemberIDs) + + return nil + }); err != nil { + return domain.Chat{}, err + } + + return created, nil +} + +func (r *ChatRepository) ListVersion(ctx context.Context, userID uuid.UUID) (int64, error) { + ctx, cancel := r.store.timeout(ctx) + defer cancel() + + version, err := r.store.queries.GetChatListVersion(ctx, userID) + if err != nil { + return 0, fmt.Errorf("get chat list version: %w", mapError(err)) + } + + return version, nil +} + +func sortedUnique(ids []uuid.UUID) []uuid.UUID { + sorted := slices.Clone(ids) + slices.SortFunc(sorted, func(a, b uuid.UUID) int { + return bytes.Compare(a[:], b[:]) + }) + + return slices.Compact(sorted) +} + +func (r *ChatRepository) GetVisible(ctx context.Context, chatID, callerID uuid.UUID) (domain.Chat, error) { + ctx, cancel := r.store.timeout(ctx) + defer cancel() + + row, err := r.store.queries.GetChatForMember(ctx, sqlcgen.GetChatForMemberParams{ + UserID: callerID, + ID: chatID, + }) + if err != nil { + mapped := mapError(err) + if errors.Is(mapped, domain.ErrNotFound) { + return domain.Chat{}, fmt.Errorf("%w: chat %s for user %s", domain.ErrNotFound, chatID, callerID) + } + + return domain.Chat{}, fmt.Errorf("get chat: %w", mapped) + } + + return mapChat(row.ID, row.Title, row.CreatedAt, row.MemberIds), nil +} + +func (r *ChatRepository) ListVisible( + ctx context.Context, + callerID uuid.UUID, + after *domain.Cursor, + limit int, +) (domain.Page[domain.Chat], error) { + ctx, cancel := r.store.timeout(ctx) + defer cancel() + + limit = clampLimit(limit) + fetch := int32(limit + 1) //nolint:gosec // limit is clamped to maxPageSize + + var rows []domain.Chat + + if after == nil { + pageRows, err := r.store.queries.ListChatsForMember(ctx, sqlcgen.ListChatsForMemberParams{ + UserID: callerID, + RowLimit: fetch, + }) + if err != nil { + return domain.Page[domain.Chat]{}, fmt.Errorf("list chats: %w", mapError(err)) + } + + rows = mapAll(pageRows, mapChatRow) + } else { + pageRows, err := r.store.queries.ListChatsForMemberAfter(ctx, sqlcgen.ListChatsForMemberAfterParams{ + UserID: callerID, + AfterCreatedAt: after.CreatedAt, + AfterID: after.ID, + RowLimit: fetch, + }) + if err != nil { + return domain.Page[domain.Chat]{}, fmt.Errorf("list chats: %w", mapError(err)) + } + + rows = mapAll(pageRows, mapChatRowAfter) + } + + return buildPage(rows, limit, func(chat domain.Chat) domain.Cursor { + return domain.Cursor{Scope: callerID, CreatedAt: chat.CreatedAt, ID: chat.ID} + }), nil +} + +func mapChatRow(row sqlcgen.ListChatsForMemberRow) domain.Chat { + return mapChat(row.ID, row.Title, row.CreatedAt, row.MemberIds) +} + +func mapChatRowAfter(row sqlcgen.ListChatsForMemberAfterRow) domain.Chat { + return mapChat(row.ID, row.Title, row.CreatedAt, row.MemberIds) +} + +func mapChat(id uuid.UUID, title string, createdAt time.Time, memberIDs []uuid.UUID) domain.Chat { + return domain.Chat{ + ID: id, + Title: title, + MemberIDs: memberIDs, + CreatedAt: toUTCTime(createdAt), + } +} diff --git a/internal/storage/postgres/chat_repository_test.go b/internal/storage/postgres/chat_repository_test.go new file mode 100644 index 00000000..3f813459 --- /dev/null +++ b/internal/storage/postgres/chat_repository_test.go @@ -0,0 +1,239 @@ +//go:build integration + +package postgres_test + +import ( + "fmt" + "slices" + "sync" + "testing" + + "github.com/google/uuid" + "github.com/stretchr/testify/suite" + + "mtusi-messenger/internal/domain" +) + +type ChatRepositorySuite struct { + BaseSuite +} + +func TestChatRepositorySuite(t *testing.T) { + suite.Run(t, new(ChatRepositorySuite)) +} + +func (s *ChatRepositorySuite) TestCreateRejectsUnknownMemberAtomically() { + alice := s.createUser("alice") + + _, err := s.store.Chats().Create(s.T().Context(), domain.ChatDraft{ + Title: "С неизвестным участником", + MemberIDs: []uuid.UUID{alice.ID, uuid.New()}, + CallerID: alice.ID, + }) + s.Require().ErrorIs(err, domain.ErrUnknownMember) + + var chats int + s.Require().NoError(s.pool.QueryRow(s.T().Context(), "SELECT count(*) FROM chats").Scan(&chats)) + s.Zero(chats, "неуспешное создание чата не оставляет строк") + + var members int + s.Require().NoError(s.pool.QueryRow(s.T().Context(), "SELECT count(*) FROM chat_members").Scan(&members)) + s.Zero(members) +} + +func (s *ChatRepositorySuite) TestCreateRejectsDuplicateMembers() { + alice := s.createUser("alice") + + _, err := s.store.Chats().Create(s.T().Context(), domain.ChatDraft{ + Title: "Дубликаты", + MemberIDs: []uuid.UUID{alice.ID, alice.ID}, + CallerID: alice.ID, + }) + s.Require().ErrorIs(err, domain.ErrConflict) +} + +func (s *ChatRepositorySuite) TestCreateBumpsMemberListVersions() { + ctx := s.T().Context() + alice := s.createUser("alice") + bob := s.createUser("bob") + carol := s.createUser("carol") + + s.createChat(alice, bob) + + aliceVersion, err := s.store.Chats().ListVersion(ctx, alice.ID) + s.Require().NoError(err) + s.Equal(int64(1), aliceVersion, "creator version must be bumped") + + bobVersion, err := s.store.Chats().ListVersion(ctx, bob.ID) + s.Require().NoError(err) + s.Equal(int64(1), bobVersion, "member version must be bumped") + + carolVersion, err := s.store.Chats().ListVersion(ctx, carol.ID) + s.Require().NoError(err) + s.Zero(carolVersion, "non-member version must stay unchanged") + + s.createChat(alice, carol) + + aliceVersion, err = s.store.Chats().ListVersion(ctx, alice.ID) + s.Require().NoError(err) + s.Equal(int64(2), aliceVersion, "version must grow monotonically") + + carolVersion, err = s.store.Chats().ListVersion(ctx, carol.ID) + s.Require().NoError(err) + s.Equal(int64(1), carolVersion) +} + +func (s *ChatRepositorySuite) TestConcurrentCreateNoDeadlock() { + ctx := s.T().Context() + + users := make([]domain.User, 0, 8) + for i := range 8 { + users = append(users, s.createUser(fmt.Sprintf("member%d", i))) + } + + const workers = 16 + + var wg sync.WaitGroup + + errs := make(chan error, workers) + + wg.Add(workers) + + for w := range workers { + go func(w int) { + defer wg.Done() + + ids := []uuid.UUID{ + users[w%len(users)].ID, + users[(w+1)%len(users)].ID, + users[(w+2)%len(users)].ID, + } + if w%2 == 1 { + slices.Reverse(ids) + } + + _, err := s.store.Chats().Create(ctx, domain.ChatDraft{ + Title: fmt.Sprintf("chat-%d", w), + MemberIDs: ids, + CallerID: ids[0], + }) + if err != nil { + errs <- err + } + }(w) + } + + wg.Wait() + close(errs) + + for err := range errs { + s.Require().NoError(err) + } +} + +func (s *ChatRepositorySuite) TestCreateStoresAllMembers() { + alice := s.createUser("alice") + bob := s.createUser("bob") + eve := s.createUser("eve") + + chat := s.createChat(alice, bob, eve) + s.Equal(uuid.Version(7), chat.ID.Version()) + s.False(chat.CreatedAt.IsZero()) + + visible, err := s.store.Chats().GetVisible(s.T().Context(), chat.ID, bob.ID) + s.Require().NoError(err) + s.ElementsMatch([]uuid.UUID{alice.ID, bob.ID, eve.ID}, visible.MemberIDs) +} + +func (s *ChatRepositorySuite) TestVisibility() { + alice := s.createUser("alice") + bob := s.createUser("bob") + eve := s.createUser("eve") + + chat := s.createChat(alice, bob) + + visible, err := s.store.Chats().GetVisible(s.T().Context(), chat.ID, bob.ID) + s.Require().NoError(err) + s.Equal(chat.ID, visible.ID) + s.ElementsMatch([]uuid.UUID{alice.ID, bob.ID}, visible.MemberIDs) + + _, err = s.store.Chats().GetVisible(s.T().Context(), chat.ID, eve.ID) + s.Require().ErrorIs(err, domain.ErrNotFound) + + page, err := s.store.Chats().ListVisible(s.T().Context(), eve.ID, nil, 50) + s.Require().NoError(err) + s.Empty(page.Items) + + page, err = s.store.Chats().ListVisible(s.T().Context(), alice.ID, nil, 50) + s.Require().NoError(err) + s.Require().Len(page.Items, 1) + s.ElementsMatch([]uuid.UUID{alice.ID, bob.ID}, page.Items[0].MemberIDs) + s.Nil(page.Next) +} + +func (s *ChatRepositorySuite) TestListPagination() { + alice := s.createUser("alice") + + const total = 5 + for range total { + s.createChat(alice) + } + + seen := make(map[uuid.UUID]struct{}, total) + + var cursor *domain.Cursor + + for { + page, err := s.store.Chats().ListVisible(s.T().Context(), alice.ID, cursor, 2) + s.Require().NoError(err) + s.Require().NotEmpty(page.Items) + + for _, chat := range page.Items { + _, duplicate := seen[chat.ID] + s.Require().False(duplicate) + seen[chat.ID] = struct{}{} + } + + if page.Next == nil { + break + } + + cursor = page.Next + } + + s.Len(seen, total) +} + +func (s *ChatRepositorySuite) TestListPaginationWithSharedTimestamp() { + alice := s.createUser("alice") + + for range 5 { + s.createChat(alice) + } + + _, err := s.pool.Exec(s.T().Context(), "UPDATE chats SET created_at = '2026-01-01 00:00:00+00'") + s.Require().NoError(err) + + seen := make(map[uuid.UUID]struct{}, 5) + + var cursor *domain.Cursor + + for { + page, err := s.store.Chats().ListVisible(s.T().Context(), alice.ID, cursor, 2) + s.Require().NoError(err) + + for _, chat := range page.Items { + _, duplicate := seen[chat.ID] + s.Require().False(duplicate) + seen[chat.ID] = struct{}{} + } + + if page.Next == nil { + break + } + + cursor = page.Next + } + + s.Len(seen, 5) +} diff --git a/internal/storage/postgres/config.go b/internal/storage/postgres/config.go new file mode 100644 index 00000000..305b212e --- /dev/null +++ b/internal/storage/postgres/config.go @@ -0,0 +1,74 @@ +package postgres + +import ( + "errors" + "time" + + "mtusi-messenger/internal/config" +) + +const ( + defaultHost = "localhost" + defaultPort = 5432 + defaultDatabase = "messenger" + defaultUser = "messenger" + defaultSSLMode = "disable" + defaultMaxConns = int32(10) + defaultMinConns = int32(1) + defaultMaxConnLifetime = time.Hour + defaultMaxConnIdleTime = 30 * time.Minute + defaultConnectTimeout = 5 * time.Second + defaultQueryTimeout = 5 * time.Second +) + +func normalize(cfg config.Postgres) (config.Postgres, error) { + if cfg.Host == "" { + cfg.Host = defaultHost + } + + if cfg.Port == 0 { + cfg.Port = defaultPort + } + + if cfg.Database == "" { + cfg.Database = defaultDatabase + } + + if cfg.User == "" { + cfg.User = defaultUser + } + + if cfg.SSLMode == "" { + cfg.SSLMode = defaultSSLMode + } + + if cfg.MaxConns == 0 { + cfg.MaxConns = defaultMaxConns + } + + if cfg.MinConns == 0 { + cfg.MinConns = defaultMinConns + } + + if cfg.MaxConnLifetime == 0 { + cfg.MaxConnLifetime = defaultMaxConnLifetime + } + + if cfg.MaxConnIdleTime == 0 { + cfg.MaxConnIdleTime = defaultMaxConnIdleTime + } + + if cfg.ConnectTimeout == 0 { + cfg.ConnectTimeout = defaultConnectTimeout + } + + if cfg.QueryTimeout == 0 { + cfg.QueryTimeout = defaultQueryTimeout + } + + if cfg.MinConns > cfg.MaxConns { + return cfg, errors.New("postgres: min_conns must not exceed max_conns") + } + + return cfg, nil +} diff --git a/internal/storage/postgres/config_test.go b/internal/storage/postgres/config_test.go new file mode 100644 index 00000000..4461dd87 --- /dev/null +++ b/internal/storage/postgres/config_test.go @@ -0,0 +1,49 @@ +package postgres + +import ( + "testing" + "time" + + "github.com/stretchr/testify/require" + + "mtusi-messenger/internal/config" +) + +func TestNormalizeAppliesDefaults(t *testing.T) { + cfg, err := normalize(config.Postgres{}) + require.NoError(t, err) + + require.Equal(t, "localhost", cfg.Host) + require.Equal(t, 5432, cfg.Port) + require.Equal(t, "messenger", cfg.Database) + require.Equal(t, "messenger", cfg.User) + require.Equal(t, "disable", cfg.SSLMode) + require.Equal(t, int32(10), cfg.MaxConns) + require.Equal(t, int32(1), cfg.MinConns) + require.Equal(t, time.Hour, cfg.MaxConnLifetime) + require.Equal(t, 5*time.Second, cfg.ConnectTimeout) +} + +func TestNormalizeKeepsProvidedValues(t *testing.T) { + cfg, err := normalize(config.Postgres{ + Host: "db", + Port: 6543, + Database: "app", + User: "app", + SSLMode: "require", + MaxConns: 7, + MinConns: 2, + }) + require.NoError(t, err) + + require.Equal(t, "db", cfg.Host) + require.Equal(t, 6543, cfg.Port) + require.Equal(t, "app", cfg.Database) + require.Equal(t, "require", cfg.SSLMode) + require.Equal(t, int32(7), cfg.MaxConns) +} + +func TestNormalizeRejectsMinGreaterThanMax(t *testing.T) { + _, err := normalize(config.Postgres{MinConns: 5, MaxConns: 2}) + require.Error(t, err) +} diff --git a/internal/storage/postgres/errors.go b/internal/storage/postgres/errors.go new file mode 100644 index 00000000..3cc9bd59 --- /dev/null +++ b/internal/storage/postgres/errors.go @@ -0,0 +1,76 @@ +package postgres + +import ( + "context" + "errors" + "fmt" + "io" + "net" + "syscall" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" + + "mtusi-messenger/internal/domain" +) + +const ( + pgUniqueViolation = "23505" + pgCheckViolation = "23514" +) + +func isUniqueViolation(err error) bool { + var pgErr *pgconn.PgError + + return errors.As(err, &pgErr) && pgErr.Code == pgUniqueViolation +} + +// isUnavailable reports whether err is a transport-level failure — the server is +// down, the connection dropped, or the pool/query deadline expired — rather than +// a statement-level error. Such failures are dependency outages, not caller errors. +func isUnavailable(err error) bool { + if err == nil { + return false + } + + var ( + connectErr *pgconn.ConnectError + netErr net.Error + ) + + return errors.As(err, &connectErr) || + errors.As(err, &netErr) || + errors.Is(err, context.DeadlineExceeded) || + errors.Is(err, syscall.ECONNREFUSED) || + errors.Is(err, syscall.ECONNRESET) || + errors.Is(err, syscall.EPIPE) || + errors.Is(err, io.EOF) || + errors.Is(err, io.ErrUnexpectedEOF) || + errors.Is(err, pgx.ErrTxClosed) || + errors.Is(err, pgx.ErrTxCommitRollback) +} + +func mapError(err error) error { + if err == nil { + return nil + } + + if errors.Is(err, pgx.ErrNoRows) { + return domain.ErrNotFound + } + + if pgErr, ok := errors.AsType[*pgconn.PgError](err); ok { + switch pgErr.Code { + case pgUniqueViolation: + return domain.ErrConflict + case pgCheckViolation: + return domain.ErrValidation + } + } + + if isUnavailable(err) { + return fmt.Errorf("%w: %w", domain.ErrUnavailable, err) + } + + return err +} diff --git a/internal/storage/postgres/internal/sqlcgen/chats.sql.go b/internal/storage/postgres/internal/sqlcgen/chats.sql.go new file mode 100644 index 00000000..cd2b5d33 --- /dev/null +++ b/internal/storage/postgres/internal/sqlcgen/chats.sql.go @@ -0,0 +1,251 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.31.1 +// source: chats.sql + +package sqlcgen + +import ( + "context" + "time" + + "github.com/google/uuid" +) + +const addChatMembers = `-- name: AddChatMembers :exec +INSERT INTO chat_members (chat_id, user_id) +SELECT $1, members.member_id +FROM unnest($2::uuid[]) AS members(member_id) +` + +type AddChatMembersParams struct { + ChatID uuid.UUID + UserIds []uuid.UUID +} + +func (q *Queries) AddChatMembers(ctx context.Context, arg AddChatMembersParams) error { + _, err := q.db.Exec(ctx, addChatMembers, arg.ChatID, arg.UserIds) + return err +} + +const bumpChatListVersions = `-- name: BumpChatListVersions :exec +INSERT INTO user_chat_versions (user_id, version) +SELECT DISTINCT m, 1 +FROM unnest($1::uuid[]) AS m +ORDER BY m +ON CONFLICT (user_id) DO UPDATE SET version = user_chat_versions.version + 1 +` + +func (q *Queries) BumpChatListVersions(ctx context.Context, userIds []uuid.UUID) error { + _, err := q.db.Exec(ctx, bumpChatListVersions, userIds) + return err +} + +const createChat = `-- name: CreateChat :one +INSERT INTO chats (title) +VALUES ($1) +RETURNING id, title, created_at +` + +func (q *Queries) CreateChat(ctx context.Context, title string) (Chat, error) { + row := q.db.QueryRow(ctx, createChat, title) + var i Chat + err := row.Scan(&i.ID, &i.Title, &i.CreatedAt) + return i, err +} + +const getChatForMember = `-- name: GetChatForMember :one +SELECT + c.id, + c.title, + c.created_at, + ( + SELECT COALESCE(array_agg(m.user_id ORDER BY m.user_id), '{}') + FROM chat_members m + WHERE m.chat_id = c.id + )::uuid[] AS member_ids +FROM chats c +JOIN chat_members visible + ON visible.chat_id = c.id AND visible.user_id = $1 +WHERE c.id = $2 +` + +type GetChatForMemberParams struct { + UserID uuid.UUID + ID uuid.UUID +} + +type GetChatForMemberRow struct { + ID uuid.UUID + Title string + CreatedAt time.Time + MemberIds []uuid.UUID +} + +func (q *Queries) GetChatForMember(ctx context.Context, arg GetChatForMemberParams) (GetChatForMemberRow, error) { + row := q.db.QueryRow(ctx, getChatForMember, arg.UserID, arg.ID) + var i GetChatForMemberRow + err := row.Scan( + &i.ID, + &i.Title, + &i.CreatedAt, + &i.MemberIds, + ) + return i, err +} + +const getChatListVersion = `-- name: GetChatListVersion :one +SELECT COALESCE(MAX(version), 0)::bigint AS version +FROM user_chat_versions +WHERE user_id = $1 +` + +func (q *Queries) GetChatListVersion(ctx context.Context, userID uuid.UUID) (int64, error) { + row := q.db.QueryRow(ctx, getChatListVersion, userID) + var version int64 + err := row.Scan(&version) + return version, err +} + +const listChatsForMember = `-- name: ListChatsForMember :many +SELECT + c.id, + c.title, + c.created_at, + ( + SELECT COALESCE(array_agg(m.user_id ORDER BY m.user_id), '{}') + FROM chat_members m + WHERE m.chat_id = c.id + )::uuid[] AS member_ids +FROM chats c +JOIN chat_members visible ON visible.chat_id = c.id +WHERE visible.user_id = $1 +ORDER BY c.created_at, c.id +LIMIT $2 +` + +type ListChatsForMemberParams struct { + UserID uuid.UUID + RowLimit int32 +} + +type ListChatsForMemberRow struct { + ID uuid.UUID + Title string + CreatedAt time.Time + MemberIds []uuid.UUID +} + +func (q *Queries) ListChatsForMember(ctx context.Context, arg ListChatsForMemberParams) ([]ListChatsForMemberRow, error) { + rows, err := q.db.Query(ctx, listChatsForMember, arg.UserID, arg.RowLimit) + if err != nil { + return nil, err + } + defer rows.Close() + items := []ListChatsForMemberRow{} + for rows.Next() { + var i ListChatsForMemberRow + if err := rows.Scan( + &i.ID, + &i.Title, + &i.CreatedAt, + &i.MemberIds, + ); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + +const listChatsForMemberAfter = `-- name: ListChatsForMemberAfter :many +SELECT + c.id, + c.title, + c.created_at, + ( + SELECT COALESCE(array_agg(m.user_id ORDER BY m.user_id), '{}') + FROM chat_members m + WHERE m.chat_id = c.id + )::uuid[] AS member_ids +FROM chats c +JOIN chat_members visible ON visible.chat_id = c.id +WHERE visible.user_id = $1 + AND (c.created_at, c.id) > ($2::timestamptz, $3::uuid) +ORDER BY c.created_at, c.id +LIMIT $4 +` + +type ListChatsForMemberAfterParams struct { + UserID uuid.UUID + AfterCreatedAt time.Time + AfterID uuid.UUID + RowLimit int32 +} + +type ListChatsForMemberAfterRow struct { + ID uuid.UUID + Title string + CreatedAt time.Time + MemberIds []uuid.UUID +} + +func (q *Queries) ListChatsForMemberAfter(ctx context.Context, arg ListChatsForMemberAfterParams) ([]ListChatsForMemberAfterRow, error) { + rows, err := q.db.Query(ctx, listChatsForMemberAfter, + arg.UserID, + arg.AfterCreatedAt, + arg.AfterID, + arg.RowLimit, + ) + if err != nil { + return nil, err + } + defer rows.Close() + items := []ListChatsForMemberAfterRow{} + for rows.Next() { + var i ListChatsForMemberAfterRow + if err := rows.Scan( + &i.ID, + &i.Title, + &i.CreatedAt, + &i.MemberIds, + ); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + +const listMissingUserIDs = `-- name: ListMissingUserIDs :many +SELECT input.id::uuid AS missing_id +FROM unnest($1::uuid[]) AS input(id) +LEFT JOIN users u ON u.id = input.id +WHERE u.id IS NULL +` + +func (q *Queries) ListMissingUserIDs(ctx context.Context, userIds []uuid.UUID) ([]uuid.UUID, error) { + rows, err := q.db.Query(ctx, listMissingUserIDs, userIds) + if err != nil { + return nil, err + } + defer rows.Close() + items := []uuid.UUID{} + for rows.Next() { + var missing_id uuid.UUID + if err := rows.Scan(&missing_id); err != nil { + return nil, err + } + items = append(items, missing_id) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/storage/postgres/internal/sqlcgen/db.go b/internal/storage/postgres/internal/sqlcgen/db.go new file mode 100644 index 00000000..38811fcc --- /dev/null +++ b/internal/storage/postgres/internal/sqlcgen/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.31.1 + +package sqlcgen + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/internal/storage/postgres/internal/sqlcgen/messages.sql.go b/internal/storage/postgres/internal/sqlcgen/messages.sql.go new file mode 100644 index 00000000..43a25100 --- /dev/null +++ b/internal/storage/postgres/internal/sqlcgen/messages.sql.go @@ -0,0 +1,160 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.31.1 +// source: messages.sql + +package sqlcgen + +import ( + "context" + "time" + + "github.com/google/uuid" +) + +const createMessage = `-- name: CreateMessage :one +INSERT INTO messages (chat_id, sender_id, text) +SELECT $1, $2, $3 +WHERE EXISTS ( + SELECT 1 + FROM chat_members + WHERE chat_id = $1 + AND user_id = $2 +) +RETURNING id, chat_id, sender_id, text, created_at +` + +type CreateMessageParams struct { + ChatID uuid.UUID + SenderID uuid.UUID + Text string +} + +func (q *Queries) CreateMessage(ctx context.Context, arg CreateMessageParams) (Message, error) { + row := q.db.QueryRow(ctx, createMessage, arg.ChatID, arg.SenderID, arg.Text) + var i Message + err := row.Scan( + &i.ID, + &i.ChatID, + &i.SenderID, + &i.Text, + &i.CreatedAt, + ) + return i, err +} + +const isChatMember = `-- name: IsChatMember :one +SELECT EXISTS ( + SELECT 1 + FROM chat_members + WHERE chat_id = $1 + AND user_id = $2 +) AS is_member +` + +type IsChatMemberParams struct { + ChatID uuid.UUID + UserID uuid.UUID +} + +func (q *Queries) IsChatMember(ctx context.Context, arg IsChatMemberParams) (bool, error) { + row := q.db.QueryRow(ctx, isChatMember, arg.ChatID, arg.UserID) + var is_member bool + err := row.Scan(&is_member) + return is_member, err +} + +const listMessagesForChat = `-- name: ListMessagesForChat :many +SELECT m.id, m.chat_id, m.sender_id, m.text, m.created_at +FROM messages m +JOIN chat_members cm + ON cm.chat_id = m.chat_id + AND cm.user_id = $1 +WHERE m.chat_id = $2 +ORDER BY m.created_at, m.id +LIMIT $3 +` + +type ListMessagesForChatParams struct { + CallerID uuid.UUID + ChatID uuid.UUID + RowLimit int32 +} + +func (q *Queries) ListMessagesForChat(ctx context.Context, arg ListMessagesForChatParams) ([]Message, error) { + rows, err := q.db.Query(ctx, listMessagesForChat, arg.CallerID, arg.ChatID, arg.RowLimit) + if err != nil { + return nil, err + } + defer rows.Close() + items := []Message{} + for rows.Next() { + var i Message + if err := rows.Scan( + &i.ID, + &i.ChatID, + &i.SenderID, + &i.Text, + &i.CreatedAt, + ); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + +const listMessagesForChatAfter = `-- name: ListMessagesForChatAfter :many +SELECT m.id, m.chat_id, m.sender_id, m.text, m.created_at +FROM messages m +JOIN chat_members cm + ON cm.chat_id = m.chat_id + AND cm.user_id = $1 +WHERE m.chat_id = $2 + AND (m.created_at, m.id) > ($3::timestamptz, $4::uuid) +ORDER BY m.created_at, m.id +LIMIT $5 +` + +type ListMessagesForChatAfterParams struct { + CallerID uuid.UUID + ChatID uuid.UUID + AfterCreatedAt time.Time + AfterID uuid.UUID + RowLimit int32 +} + +func (q *Queries) ListMessagesForChatAfter(ctx context.Context, arg ListMessagesForChatAfterParams) ([]Message, error) { + rows, err := q.db.Query(ctx, listMessagesForChatAfter, + arg.CallerID, + arg.ChatID, + arg.AfterCreatedAt, + arg.AfterID, + arg.RowLimit, + ) + if err != nil { + return nil, err + } + defer rows.Close() + items := []Message{} + for rows.Next() { + var i Message + if err := rows.Scan( + &i.ID, + &i.ChatID, + &i.SenderID, + &i.Text, + &i.CreatedAt, + ); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/storage/postgres/internal/sqlcgen/models.go b/internal/storage/postgres/internal/sqlcgen/models.go new file mode 100644 index 00000000..87811efd --- /dev/null +++ b/internal/storage/postgres/internal/sqlcgen/models.go @@ -0,0 +1,51 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.31.1 + +package sqlcgen + +import ( + "time" + + "github.com/google/uuid" +) + +type Chat struct { + ID uuid.UUID + Title string + CreatedAt time.Time +} + +type ChatMember struct { + ChatID uuid.UUID + UserID uuid.UUID + CreatedAt time.Time +} + +type Message struct { + ID uuid.UUID + ChatID uuid.UUID + SenderID uuid.UUID + Text string + CreatedAt time.Time +} + +type Session struct { + TokenHash []byte + UserID uuid.UUID + ExpiresAt time.Time + CreatedAt time.Time +} + +type User struct { + ID uuid.UUID + Username string + PasswordHash string + DisplayName string + CreatedAt time.Time +} + +type UserChatVersion struct { + UserID uuid.UUID + Version int64 +} diff --git a/internal/storage/postgres/internal/sqlcgen/sessions.sql.go b/internal/storage/postgres/internal/sqlcgen/sessions.sql.go new file mode 100644 index 00000000..fc20b002 --- /dev/null +++ b/internal/storage/postgres/internal/sqlcgen/sessions.sql.go @@ -0,0 +1,83 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.31.1 +// source: sessions.sql + +package sqlcgen + +import ( + "context" + "time" + + "github.com/google/uuid" +) + +const createSession = `-- name: CreateSession :one +INSERT INTO sessions (token_hash, user_id, expires_at) +VALUES ($1, $2, $3) +RETURNING token_hash, user_id, expires_at +` + +type CreateSessionParams struct { + TokenHash []byte + UserID uuid.UUID + ExpiresAt time.Time +} + +type CreateSessionRow struct { + TokenHash []byte + UserID uuid.UUID + ExpiresAt time.Time +} + +func (q *Queries) CreateSession(ctx context.Context, arg CreateSessionParams) (CreateSessionRow, error) { + row := q.db.QueryRow(ctx, createSession, arg.TokenHash, arg.UserID, arg.ExpiresAt) + var i CreateSessionRow + err := row.Scan(&i.TokenHash, &i.UserID, &i.ExpiresAt) + return i, err +} + +const deleteSession = `-- name: DeleteSession :exec +DELETE FROM sessions +WHERE token_hash = $1 + AND user_id = $2 +` + +type DeleteSessionParams struct { + TokenHash []byte + UserID uuid.UUID +} + +func (q *Queries) DeleteSession(ctx context.Context, arg DeleteSessionParams) error { + _, err := q.db.Exec(ctx, deleteSession, arg.TokenHash, arg.UserID) + return err +} + +const getSessionUser = `-- name: GetSessionUser :one +SELECT u.id, u.username, u.display_name, u.created_at, s.expires_at +FROM sessions s +JOIN users u ON u.id = s.user_id +WHERE s.token_hash = $1 + AND s.expires_at > now() +` + +type GetSessionUserRow struct { + ID uuid.UUID + Username string + DisplayName string + CreatedAt time.Time + ExpiresAt time.Time +} + +func (q *Queries) GetSessionUser(ctx context.Context, tokenHash []byte) (GetSessionUserRow, error) { + row := q.db.QueryRow(ctx, getSessionUser, tokenHash) + var i GetSessionUserRow + err := row.Scan( + &i.ID, + &i.Username, + &i.DisplayName, + &i.CreatedAt, + &i.ExpiresAt, + ) + return i, err +} diff --git a/internal/storage/postgres/internal/sqlcgen/users.sql.go b/internal/storage/postgres/internal/sqlcgen/users.sql.go new file mode 100644 index 00000000..fdbc1b61 --- /dev/null +++ b/internal/storage/postgres/internal/sqlcgen/users.sql.go @@ -0,0 +1,100 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.31.1 +// source: users.sql + +package sqlcgen + +import ( + "context" + "time" + + "github.com/google/uuid" +) + +const createUser = `-- name: CreateUser :one +INSERT INTO users (username, display_name, password_hash) +VALUES ($1, $2, $3) +RETURNING id, username, display_name, created_at, password_hash +` + +type CreateUserParams struct { + Username string + DisplayName string + PasswordHash string +} + +type CreateUserRow struct { + ID uuid.UUID + Username string + DisplayName string + CreatedAt time.Time + PasswordHash string +} + +func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (CreateUserRow, error) { + row := q.db.QueryRow(ctx, createUser, arg.Username, arg.DisplayName, arg.PasswordHash) + var i CreateUserRow + err := row.Scan( + &i.ID, + &i.Username, + &i.DisplayName, + &i.CreatedAt, + &i.PasswordHash, + ) + return i, err +} + +const getUserByID = `-- name: GetUserByID :one +SELECT id, username, display_name, created_at, password_hash +FROM users +WHERE id = $1 +` + +type GetUserByIDRow struct { + ID uuid.UUID + Username string + DisplayName string + CreatedAt time.Time + PasswordHash string +} + +func (q *Queries) GetUserByID(ctx context.Context, id uuid.UUID) (GetUserByIDRow, error) { + row := q.db.QueryRow(ctx, getUserByID, id) + var i GetUserByIDRow + err := row.Scan( + &i.ID, + &i.Username, + &i.DisplayName, + &i.CreatedAt, + &i.PasswordHash, + ) + return i, err +} + +const getUserByUsername = `-- name: GetUserByUsername :one +SELECT id, username, display_name, created_at, password_hash +FROM users +WHERE username = $1 +` + +type GetUserByUsernameRow struct { + ID uuid.UUID + Username string + DisplayName string + CreatedAt time.Time + PasswordHash string +} + +func (q *Queries) GetUserByUsername(ctx context.Context, username string) (GetUserByUsernameRow, error) { + row := q.db.QueryRow(ctx, getUserByUsername, username) + var i GetUserByUsernameRow + err := row.Scan( + &i.ID, + &i.Username, + &i.DisplayName, + &i.CreatedAt, + &i.PasswordHash, + ) + return i, err +} diff --git a/internal/storage/postgres/main_test.go b/internal/storage/postgres/main_test.go new file mode 100644 index 00000000..7963763f --- /dev/null +++ b/internal/storage/postgres/main_test.go @@ -0,0 +1,278 @@ +//go:build integration + +package postgres_test + +import ( + "context" + "database/sql" + "fmt" + "os" + "strconv" + "strings" + "testing" + "time" + + "github.com/google/uuid" + "github.com/jackc/pgx/v5/pgxpool" + "github.com/pressly/goose/v3" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" + + "mtusi-messenger/internal/config" + "mtusi-messenger/internal/domain" + "mtusi-messenger/internal/platform/password" + "mtusi-messenger/internal/storage/postgres" + "mtusi-messenger/internal/storage/postgres/migrations" + + _ "github.com/jackc/pgx/v5/stdlib" +) + +const templateDB = "messenger_template" + +var adminPool *pgxpool.Pool + +func envOr(key, fallback string) string { + if value := os.Getenv(key); value != "" { + return value + } + + return fallback +} + +func envInt(key string, fallback int) int { + value := os.Getenv(key) + if value == "" { + return fallback + } + + parsed, err := strconv.Atoi(value) + if err != nil { + return fallback + } + + return parsed +} + +func testConfig() config.Postgres { + return config.Postgres{ + Host: envOr("TEST_POSTGRES_HOST", "localhost"), + Port: envInt("TEST_POSTGRES_PORT", 5432), + Database: envOr("TEST_POSTGRES_DATABASE", "messenger"), + User: envOr("TEST_POSTGRES_USER", "messenger"), + Password: envOr("TEST_POSTGRES_PASSWORD", "messenger"), + SSLMode: envOr("TEST_POSTGRES_SSL_MODE", "disable"), + MaxConns: 5, + MinConns: 1, + MaxConnLifetime: time.Hour, + MaxConnIdleTime: 30 * time.Minute, + ConnectTimeout: 5 * time.Second, + QueryTimeout: 5 * time.Second, + } +} + +func dsnFor(database string) string { + cfg := testConfig() + cfg.Database = database + + return cfg.DSN() +} + +func TestMain(m *testing.M) { + ctx := context.Background() + + var err error + + adminPool, err = pgxpool.New(ctx, dsnFor(testConfig().Database)) + if err != nil { + fmt.Fprintln(os.Stderr, "admin pool:", err) + os.Exit(1) + } + + if err := waitForDatabase(ctx, adminPool); err != nil { + fmt.Fprintln(os.Stderr, "database is not ready:", err) + os.Exit(1) + } + + if err := recreateTemplate(ctx); err != nil { + fmt.Fprintln(os.Stderr, "create template:", err) + os.Exit(1) + } + + code := m.Run() + + adminPool.Close() + os.Exit(code) +} + +func waitForDatabase(ctx context.Context, pool *pgxpool.Pool) error { + var lastErr error + + for range 60 { + err := pool.Ping(ctx) + if err == nil { + return nil + } + + lastErr = err + + time.Sleep(500 * time.Millisecond) + } + + return lastErr +} + +func adminExec(ctx context.Context, query string) error { + conn, err := adminPool.Acquire(ctx) + if err != nil { + return err + } + + defer conn.Release() + + _, err = conn.Conn().PgConn().Exec(ctx, query).ReadAll() + + return err +} + +const templateLockKey int64 = 0x6d657373656e6765 + +func withAdvisoryLock(ctx context.Context, shared bool, fn func() error) error { + conn, err := adminPool.Acquire(ctx) + if err != nil { + return err + } + + defer conn.Release() + + lock, unlock := "pg_advisory_lock", "pg_advisory_unlock" + if shared { + lock, unlock = "pg_advisory_lock_shared", "pg_advisory_unlock_shared" + } + + if _, err := conn.Exec(ctx, "SELECT "+lock+"($1)", templateLockKey); err != nil { + return err + } + + defer func() { _, _ = conn.Exec(context.WithoutCancel(ctx), "SELECT "+unlock+"($1)", templateLockKey) }() + + return fn() +} + +func recreateTemplate(ctx context.Context) error { + return withAdvisoryLock(ctx, false, func() error { + if err := adminExec(ctx, "DROP DATABASE IF EXISTS "+templateDB+" WITH (FORCE)"); err != nil { + return err + } + + if err := adminExec(ctx, "CREATE DATABASE "+templateDB); err != nil { + return err + } + + db, err := sql.Open("pgx", dsnFor(templateDB)) + if err != nil { + return err + } + + defer func() { _ = db.Close() }() + + if err := db.PingContext(ctx); err != nil { + return err + } + + goose.SetBaseFS(migrations.FS) + + if err := goose.SetDialect("postgres"); err != nil { + return err + } + + return goose.Up(db, ".") + }) +} + +type BaseSuite struct { + suite.Suite + + store *postgres.Store + pool *pgxpool.Pool + db string +} + +func (s *BaseSuite) SetupTest() { + ctx := s.T().Context() + s.db = "test_" + strings.ReplaceAll(uuid.NewString(), "-", "") + + s.Require().NoError(withAdvisoryLock(ctx, true, func() error { + return adminExec(ctx, "CREATE DATABASE "+s.db+" TEMPLATE "+templateDB) + })) + + var err error + + s.pool, err = pgxpool.New(ctx, dsnFor(s.db)) + s.Require().NoError(err) + + s.store = openStore(s.T(), s.db, nil) +} + +func (s *BaseSuite) TearDownTest() { + if s.store != nil { + s.store.Close() + } + + if s.pool != nil { + s.pool.Close() + } + + if s.db != "" { + s.Require().NoError(adminExec(s.T().Context(), "DROP DATABASE "+s.db+" WITH (FORCE)")) + } +} + +func openStore(t *testing.T, database string, override func(*config.Postgres)) *postgres.Store { + t.Helper() + + cfg := testConfig() + cfg.Database = database + + if override != nil { + override(&cfg) + } + + store, err := postgres.New(t.Context(), cfg) + require.NoError(t, err) + + return store +} + +func (s *BaseSuite) createUser(username string) domain.User { + s.T().Helper() + + hash, err := password.Hash("strong-test-password") + s.Require().NoError(err) + + user, err := s.store.Users().Create(s.T().Context(), domain.NewUser{ + Username: username, + DisplayName: "Пользователь " + username, + PasswordHash: hash, + }) + s.Require().NoError(err) + + return user +} + +func (s *BaseSuite) createChat(owner domain.User, members ...domain.User) domain.Chat { + s.T().Helper() + + ids := []uuid.UUID{owner.ID} + for _, member := range members { + ids = append(ids, member.ID) + } + + chat, err := s.store.Chats().Create(s.T().Context(), domain.ChatDraft{ + Title: "Чат", + MemberIDs: ids, + CallerID: owner.ID, + }) + s.Require().NoError(err) + + return chat +} diff --git a/internal/storage/postgres/mapping.go b/internal/storage/postgres/mapping.go new file mode 100644 index 00000000..62bb7b37 --- /dev/null +++ b/internal/storage/postgres/mapping.go @@ -0,0 +1,21 @@ +package postgres + +import "time" + +func toUTCTime(t time.Time) time.Time { + if t.Location() == time.UTC { + return t + } + + return t.UTC() +} + +func mapAll[S, D any](rows []S, mapRow func(S) D) []D { + mapped := make([]D, 0, len(rows)) + + for _, row := range rows { + mapped = append(mapped, mapRow(row)) + } + + return mapped +} diff --git a/internal/storage/postgres/message_repository.go b/internal/storage/postgres/message_repository.go new file mode 100644 index 00000000..f4a742f0 --- /dev/null +++ b/internal/storage/postgres/message_repository.go @@ -0,0 +1,118 @@ +package postgres + +import ( + "context" + "fmt" + "time" + + "github.com/google/uuid" + + "mtusi-messenger/internal/domain" + "mtusi-messenger/internal/storage/postgres/internal/sqlcgen" +) + +type MessageRepository struct { + store *Store +} + +func (r *MessageRepository) Create(ctx context.Context, draft domain.MessageDraft) (domain.Message, error) { + ctx, cancel := r.store.timeout(ctx) + defer cancel() + + row, err := r.store.queries.CreateMessage(ctx, sqlcgen.CreateMessageParams{ + ChatID: draft.ChatID, + SenderID: draft.SenderID, + Text: draft.Text, + }) + if err != nil { + return domain.Message{}, fmt.Errorf("create message: %w", mapError(err)) + } + + return mapMessage(row.ID, row.ChatID, row.SenderID, row.Text, row.CreatedAt), nil +} + +func (r *MessageRepository) ListVisible( + ctx context.Context, + chatID, callerID uuid.UUID, + after *domain.Cursor, + limit int, +) (domain.Page[domain.Message], error) { + ctx, cancel := r.store.timeout(ctx) + defer cancel() + + limit = clampLimit(limit) + fetch := int32(limit + 1) //nolint:gosec // limit is clamped to maxPageSize + + messages, err := r.fetch(ctx, chatID, callerID, after, fetch) + if err != nil { + return domain.Page[domain.Message]{}, err + } + + if len(messages) == 0 { + member, err := r.store.queries.IsChatMember(ctx, sqlcgen.IsChatMemberParams{ + ChatID: chatID, + UserID: callerID, + }) + if err != nil { + return domain.Page[domain.Message]{}, fmt.Errorf("check chat membership: %w", mapError(err)) + } + + if !member { + return domain.Page[domain.Message]{}, fmt.Errorf( + "%w: chat %s for user %s", + domain.ErrNotFound, chatID, callerID, + ) + } + } + + return buildPage(messages, limit, func(message domain.Message) domain.Cursor { + return domain.Cursor{Scope: chatID, CreatedAt: message.CreatedAt, ID: message.ID} + }), nil +} + +func (r *MessageRepository) fetch( + ctx context.Context, + chatID, callerID uuid.UUID, + after *domain.Cursor, + fetch int32, +) ([]domain.Message, error) { + if after == nil { + rows, err := r.store.queries.ListMessagesForChat(ctx, sqlcgen.ListMessagesForChatParams{ + ChatID: chatID, + CallerID: callerID, + RowLimit: fetch, + }) + if err != nil { + return nil, fmt.Errorf("list messages: %w", mapError(err)) + } + + return mapAll(rows, mapMessageRow), nil + } + + rows, err := r.store.queries.ListMessagesForChatAfter(ctx, sqlcgen.ListMessagesForChatAfterParams{ + ChatID: chatID, + CallerID: callerID, + AfterCreatedAt: after.CreatedAt, + AfterID: after.ID, + RowLimit: fetch, + }) + if err != nil { + return nil, fmt.Errorf("list messages: %w", mapError(err)) + } + + return mapAll(rows, mapMessageRow), nil +} + +func mapMessageRow(row sqlcgen.Message) domain.Message { + return mapMessage(row.ID, row.ChatID, row.SenderID, row.Text, row.CreatedAt) +} + +func mapMessage(id, chatID, senderID uuid.UUID, text string, createdAt time.Time) domain.Message { + return domain.Message{ + ID: id, + ChatID: chatID, + SenderID: senderID, + Text: text, + CreatedAt: toUTCTime(createdAt), + } +} diff --git a/internal/storage/postgres/message_repository_test.go b/internal/storage/postgres/message_repository_test.go new file mode 100644 index 00000000..38bc77dd --- /dev/null +++ b/internal/storage/postgres/message_repository_test.go @@ -0,0 +1,157 @@ +//go:build integration + +package postgres_test + +import ( + "fmt" + "sync" + "testing" + + "github.com/google/uuid" + "github.com/stretchr/testify/suite" + + "mtusi-messenger/internal/domain" +) + +type MessageRepositorySuite struct { + BaseSuite +} + +func TestMessageRepositorySuite(t *testing.T) { + suite.Run(t, new(MessageRepositorySuite)) +} + +func (s *MessageRepositorySuite) TestCreateAndPagination() { + alice := s.createUser("alice") + bob := s.createUser("bob") + + chat := s.createChat(alice, bob) + + const total = 5 + for i := range total { + message, err := s.store.Messages().Create(s.T().Context(), domain.MessageDraft{ + ChatID: chat.ID, + SenderID: alice.ID, + Text: fmt.Sprintf("сообщение %d", i), + }) + s.Require().NoError(err) + s.Equal(uuid.Version(7), message.ID.Version()) + s.False(message.CreatedAt.IsZero()) + } + + seen := make(map[uuid.UUID]struct{}, total) + + var cursor *domain.Cursor + + for { + page, err := s.store.Messages().ListVisible(s.T().Context(), chat.ID, alice.ID, cursor, 2) + s.Require().NoError(err) + s.Require().NotEmpty(page.Items) + + for _, message := range page.Items { + _, duplicate := seen[message.ID] + s.Require().False(duplicate, "keyset-пагинация не повторяет сообщения") + seen[message.ID] = struct{}{} + } + + if page.Next == nil { + break + } + + cursor = page.Next + } + + s.Len(seen, total) +} + +func (s *MessageRepositorySuite) TestPaginationWithSharedTimestamp() { + alice := s.createUser("alice") + chat := s.createChat(alice) + + for range 5 { + _, err := s.store.Messages().Create(s.T().Context(), domain.MessageDraft{ + ChatID: chat.ID, SenderID: alice.ID, Text: "same timestamp", + }) + s.Require().NoError(err) + } + + _, err := s.pool.Exec(s.T().Context(), "UPDATE messages SET created_at = '2026-01-01 00:00:00+00'") + s.Require().NoError(err) + + seen := make(map[uuid.UUID]struct{}, 5) + + var cursor *domain.Cursor + + for { + page, err := s.store.Messages().ListVisible(s.T().Context(), chat.ID, alice.ID, cursor, 2) + s.Require().NoError(err) + + for _, message := range page.Items { + _, duplicate := seen[message.ID] + s.Require().False(duplicate) + seen[message.ID] = struct{}{} + } + + if page.Next == nil { + break + } + + cursor = page.Next + } + + s.Len(seen, 5) +} + +func (s *MessageRepositorySuite) TestAccessIsRestricted() { + alice := s.createUser("alice") + bob := s.createUser("bob") + + chat := s.createChat(alice) + + _, err := s.store.Messages().Create(s.T().Context(), domain.MessageDraft{ + ChatID: chat.ID, + SenderID: bob.ID, + Text: "чужое", + }) + s.Require().ErrorIs(err, domain.ErrNotFound, "не участник не может писать в чат") + + _, err = s.store.Messages().ListVisible(s.T().Context(), chat.ID, bob.ID, nil, 50) + s.Require().ErrorIs(err, domain.ErrNotFound, "не участник не может читать историю") +} + +func (s *MessageRepositorySuite) TestListingForMissingChatReturnsNotFound() { + alice := s.createUser("alice") + + _, err := s.store.Messages().ListVisible(s.T().Context(), uuid.New(), alice.ID, nil, 50) + s.Require().ErrorIs(err, domain.ErrNotFound) +} + +func (s *MessageRepositorySuite) TestFinishedMessageSurvivesConcurrentReads() { + alice := s.createUser("alice") + chat := s.createChat(alice) + + const total = 20 + + var wg sync.WaitGroup + + wg.Go(func() { + for i := range total { + _, err := s.store.Messages().Create(s.T().Context(), domain.MessageDraft{ + ChatID: chat.ID, + SenderID: alice.ID, + Text: fmt.Sprintf("message %d", i), + }) + if err != nil { + return + } + } + }) + + for range total { + page, err := s.store.Messages().ListVisible(s.T().Context(), chat.ID, alice.ID, nil, 100) + s.Require().NoError(err) + s.LessOrEqual(len(page.Items), total) + } + + wg.Wait() +} diff --git a/internal/storage/postgres/migrations/00001_init.sql b/internal/storage/postgres/migrations/00001_init.sql new file mode 100644 index 00000000..09282415 --- /dev/null +++ b/internal/storage/postgres/migrations/00001_init.sql @@ -0,0 +1,71 @@ +-- +goose Up + +CREATE TABLE users ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + username text NOT NULL, + password_hash text NOT NULL, + display_name text NOT NULL, + created_at timestamptz NOT NULL DEFAULT now(), + + CONSTRAINT users_username_key UNIQUE (username), + CONSTRAINT users_username_format CHECK (username ~ '^[a-z0-9_]{3,32}$'), + CONSTRAINT users_display_name_not_blank CHECK (btrim(display_name) <> ''), + CONSTRAINT users_display_name_length CHECK (char_length(display_name) BETWEEN 1 AND 100) +); + +CREATE TABLE chats ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + title text NOT NULL, + created_at timestamptz NOT NULL DEFAULT now(), + CONSTRAINT chats_title_not_blank CHECK (btrim(title) <> '') +); + +CREATE TABLE chat_members ( + chat_id uuid NOT NULL REFERENCES chats (id) ON DELETE CASCADE, + user_id uuid NOT NULL REFERENCES users (id) ON DELETE RESTRICT, + created_at timestamptz NOT NULL DEFAULT now(), + PRIMARY KEY (chat_id, user_id) +); + +CREATE TABLE messages ( + id uuid PRIMARY KEY DEFAULT uuidv7(), + chat_id uuid NOT NULL REFERENCES chats (id) ON DELETE CASCADE, + sender_id uuid NOT NULL REFERENCES users (id) ON DELETE RESTRICT, + text text NOT NULL, + created_at timestamptz NOT NULL DEFAULT now(), + CONSTRAINT messages_text_not_blank CHECK (btrim(text) <> ''), + CONSTRAINT messages_text_length CHECK (char_length(text) <= 4000) +); + +CREATE TABLE sessions ( + token_hash bytea PRIMARY KEY, + user_id uuid NOT NULL REFERENCES users (id) ON DELETE CASCADE, + expires_at timestamptz NOT NULL, + created_at timestamptz NOT NULL DEFAULT now() +); + +CREATE TABLE user_chat_versions ( + user_id uuid PRIMARY KEY REFERENCES users (id) ON DELETE CASCADE, + version bigint NOT NULL DEFAULT 0 +); + +CREATE INDEX messages_chat_id_created_at_id_idx + ON messages (chat_id, created_at, id); + +CREATE INDEX chat_members_user_id_chat_id_idx + ON chat_members (user_id, chat_id); + +CREATE INDEX chats_created_at_id_idx + ON chats (created_at, id); + +CREATE INDEX sessions_user_id_idx + ON sessions (user_id); + +-- +goose Down + +DROP TABLE sessions; +DROP TABLE messages; +DROP TABLE chat_members; +DROP TABLE chats; +DROP TABLE users; +DROP TABLE user_chat_versions; diff --git a/internal/storage/postgres/migrations/migrations.go b/internal/storage/postgres/migrations/migrations.go new file mode 100644 index 00000000..91cca1c3 --- /dev/null +++ b/internal/storage/postgres/migrations/migrations.go @@ -0,0 +1,6 @@ +package migrations + +import "embed" + +//go:embed *.sql +var FS embed.FS diff --git a/internal/storage/postgres/pagination.go b/internal/storage/postgres/pagination.go new file mode 100644 index 00000000..63d54df2 --- /dev/null +++ b/internal/storage/postgres/pagination.go @@ -0,0 +1,25 @@ +package postgres + +import "mtusi-messenger/internal/domain" + +const ( + minPageSize = 1 + maxPageSize = 100 +) + +func clampLimit(limit int) int { + return min(max(limit, minPageSize), maxPageSize) +} + +func buildPage[T any](items []T, limit int, cursor func(item T) domain.Cursor) domain.Page[T] { + if len(items) > limit { + next := cursor(items[limit-1]) + + return domain.Page[T]{ + Items: append([]T(nil), items[:limit]...), + Next: &next, + } + } + + return domain.Page[T]{Items: append([]T(nil), items...)} +} diff --git a/internal/storage/postgres/queries/chats.sql b/internal/storage/postgres/queries/chats.sql new file mode 100644 index 00000000..d404ef7d --- /dev/null +++ b/internal/storage/postgres/queries/chats.sql @@ -0,0 +1,75 @@ +-- name: CreateChat :one +INSERT INTO chats (title) +VALUES (sqlc.arg(title)) +RETURNING id, title, created_at; + +-- name: AddChatMembers :exec +INSERT INTO chat_members (chat_id, user_id) +SELECT sqlc.arg(chat_id), members.member_id +FROM unnest(sqlc.arg(user_ids)::uuid[]) AS members(member_id); + +-- name: ListMissingUserIDs :many +SELECT input.id::uuid AS missing_id +FROM unnest(sqlc.arg(user_ids)::uuid[]) AS input(id) +LEFT JOIN users u ON u.id = input.id +WHERE u.id IS NULL; + +-- name: BumpChatListVersions :exec +INSERT INTO user_chat_versions (user_id, version) +SELECT DISTINCT m, 1 +FROM unnest(sqlc.arg(user_ids)::uuid[]) AS m +ORDER BY m +ON CONFLICT (user_id) DO UPDATE SET version = user_chat_versions.version + 1; + +-- name: GetChatListVersion :one +SELECT COALESCE(MAX(version), 0)::bigint AS version +FROM user_chat_versions +WHERE user_id = sqlc.arg(user_id); + +-- name: GetChatForMember :one +SELECT + c.id, + c.title, + c.created_at, + ( + SELECT COALESCE(array_agg(m.user_id ORDER BY m.user_id), '{}') + FROM chat_members m + WHERE m.chat_id = c.id + )::uuid[] AS member_ids +FROM chats c +JOIN chat_members visible + ON visible.chat_id = c.id AND visible.user_id = sqlc.arg(user_id) +WHERE c.id = sqlc.arg(id); + +-- name: ListChatsForMember :many +SELECT + c.id, + c.title, + c.created_at, + ( + SELECT COALESCE(array_agg(m.user_id ORDER BY m.user_id), '{}') + FROM chat_members m + WHERE m.chat_id = c.id + )::uuid[] AS member_ids +FROM chats c +JOIN chat_members visible ON visible.chat_id = c.id +WHERE visible.user_id = sqlc.arg(user_id) +ORDER BY c.created_at, c.id +LIMIT sqlc.arg(row_limit); + +-- name: ListChatsForMemberAfter :many +SELECT + c.id, + c.title, + c.created_at, + ( + SELECT COALESCE(array_agg(m.user_id ORDER BY m.user_id), '{}') + FROM chat_members m + WHERE m.chat_id = c.id + )::uuid[] AS member_ids +FROM chats c +JOIN chat_members visible ON visible.chat_id = c.id +WHERE visible.user_id = sqlc.arg(user_id) + AND (c.created_at, c.id) > (sqlc.arg(after_created_at)::timestamptz, sqlc.arg(after_id)::uuid) +ORDER BY c.created_at, c.id +LIMIT sqlc.arg(row_limit); diff --git a/internal/storage/postgres/queries/messages.sql b/internal/storage/postgres/queries/messages.sql new file mode 100644 index 00000000..90e804dd --- /dev/null +++ b/internal/storage/postgres/queries/messages.sql @@ -0,0 +1,39 @@ +-- name: CreateMessage :one +INSERT INTO messages (chat_id, sender_id, text) +SELECT sqlc.arg(chat_id), sqlc.arg(sender_id), sqlc.arg(text) +WHERE EXISTS ( + SELECT 1 + FROM chat_members + WHERE chat_id = sqlc.arg(chat_id) + AND user_id = sqlc.arg(sender_id) +) +RETURNING id, chat_id, sender_id, text, created_at; + +-- name: IsChatMember :one +SELECT EXISTS ( + SELECT 1 + FROM chat_members + WHERE chat_id = sqlc.arg(chat_id) + AND user_id = sqlc.arg(user_id) +) AS is_member; + +-- name: ListMessagesForChat :many +SELECT m.id, m.chat_id, m.sender_id, m.text, m.created_at +FROM messages m +JOIN chat_members cm + ON cm.chat_id = m.chat_id + AND cm.user_id = sqlc.arg(caller_id) +WHERE m.chat_id = sqlc.arg(chat_id) +ORDER BY m.created_at, m.id +LIMIT sqlc.arg(row_limit); + +-- name: ListMessagesForChatAfter :many +SELECT m.id, m.chat_id, m.sender_id, m.text, m.created_at +FROM messages m +JOIN chat_members cm + ON cm.chat_id = m.chat_id + AND cm.user_id = sqlc.arg(caller_id) +WHERE m.chat_id = sqlc.arg(chat_id) + AND (m.created_at, m.id) > (sqlc.arg(after_created_at)::timestamptz, sqlc.arg(after_id)::uuid) +ORDER BY m.created_at, m.id +LIMIT sqlc.arg(row_limit); diff --git a/internal/storage/postgres/queries/sessions.sql b/internal/storage/postgres/queries/sessions.sql new file mode 100644 index 00000000..a5564ee3 --- /dev/null +++ b/internal/storage/postgres/queries/sessions.sql @@ -0,0 +1,16 @@ +-- name: CreateSession :one +INSERT INTO sessions (token_hash, user_id, expires_at) +VALUES (sqlc.arg(token_hash), sqlc.arg(user_id), sqlc.arg(expires_at)) +RETURNING token_hash, user_id, expires_at; + +-- name: GetSessionUser :one +SELECT u.id, u.username, u.display_name, u.created_at, s.expires_at +FROM sessions s +JOIN users u ON u.id = s.user_id +WHERE s.token_hash = sqlc.arg(token_hash) + AND s.expires_at > now(); + +-- name: DeleteSession :exec +DELETE FROM sessions +WHERE token_hash = sqlc.arg(token_hash) + AND user_id = sqlc.arg(user_id); diff --git a/internal/storage/postgres/queries/users.sql b/internal/storage/postgres/queries/users.sql new file mode 100644 index 00000000..24e2b507 --- /dev/null +++ b/internal/storage/postgres/queries/users.sql @@ -0,0 +1,14 @@ +-- name: CreateUser :one +INSERT INTO users (username, display_name, password_hash) +VALUES (sqlc.arg(username), sqlc.arg(display_name), sqlc.arg(password_hash)) +RETURNING id, username, display_name, created_at, password_hash; + +-- name: GetUserByID :one +SELECT id, username, display_name, created_at, password_hash +FROM users +WHERE id = sqlc.arg(id); + +-- name: GetUserByUsername :one +SELECT id, username, display_name, created_at, password_hash +FROM users +WHERE username = sqlc.arg(username); diff --git a/internal/storage/postgres/session_repository.go b/internal/storage/postgres/session_repository.go new file mode 100644 index 00000000..e695b6a0 --- /dev/null +++ b/internal/storage/postgres/session_repository.go @@ -0,0 +1,94 @@ +package postgres + +import ( + "context" + "errors" + "fmt" + + "github.com/google/uuid" + "github.com/jackc/pgx/v5" + + "mtusi-messenger/internal/domain" + "mtusi-messenger/internal/storage/postgres/internal/sqlcgen" +) + +type SessionRepository struct { + store *Store +} + +func (r *SessionRepository) Credentials(ctx context.Context, username string) (domain.UserCredentials, error) { + ctx, cancel := r.store.timeout(ctx) + defer cancel() + + row, err := r.store.queries.GetUserByUsername(ctx, username) + if err != nil { + if errors.Is(err, pgx.ErrNoRows) { + return domain.UserCredentials{}, fmt.Errorf("%w: username %q", domain.ErrUnauthenticated, username) + } + + return domain.UserCredentials{}, fmt.Errorf("load credentials: %w", mapError(err)) + } + + return domain.UserCredentials{ + User: domain.User{ + ID: row.ID, + Username: row.Username, + DisplayName: row.DisplayName, + CreatedAt: toUTCTime(row.CreatedAt), + }, + PasswordHash: row.PasswordHash, + }, nil +} + +func (r *SessionRepository) Create(ctx context.Context, session domain.NewSession) (domain.Session, error) { + ctx, cancel := r.store.timeout(ctx) + defer cancel() + + row, err := r.store.queries.CreateSession(ctx, sqlcgen.CreateSessionParams{ + TokenHash: session.TokenHash, + UserID: session.UserID, + ExpiresAt: session.ExpiresAt, + }) + if err != nil { + return domain.Session{}, fmt.Errorf("create session: %w", mapError(err)) + } + + return domain.Session{ExpiresAt: toUTCTime(row.ExpiresAt)}, nil +} + +func (r *SessionRepository) Resolve(ctx context.Context, tokenHash []byte) (domain.Session, error) { + ctx, cancel := r.store.timeout(ctx) + defer cancel() + + row, err := r.store.queries.GetSessionUser(ctx, tokenHash) + if err != nil { + if errors.Is(err, pgx.ErrNoRows) { + return domain.Session{}, fmt.Errorf("%w: session not found or expired", domain.ErrUnauthenticated) + } + + return domain.Session{}, fmt.Errorf("resolve session: %w", mapError(err)) + } + + return domain.Session{ + ExpiresAt: toUTCTime(row.ExpiresAt), + User: domain.User{ + ID: row.ID, + Username: row.Username, + DisplayName: row.DisplayName, + CreatedAt: toUTCTime(row.CreatedAt), + }, + }, nil +} + +func (r *SessionRepository) Revoke(ctx context.Context, userID uuid.UUID, tokenHash []byte) error { + ctx, cancel := r.store.timeout(ctx) + defer cancel() + + if err := r.store.queries.DeleteSession( + ctx, sqlcgen.DeleteSessionParams{TokenHash: tokenHash, UserID: userID}, + ); err != nil { + return fmt.Errorf("revoke session: %w", mapError(err)) + } + + return nil +} diff --git a/internal/storage/postgres/session_repository_test.go b/internal/storage/postgres/session_repository_test.go new file mode 100644 index 00000000..1057c69d --- /dev/null +++ b/internal/storage/postgres/session_repository_test.go @@ -0,0 +1,81 @@ +//go:build integration + +package postgres_test + +import ( + "testing" + "time" + + "github.com/stretchr/testify/suite" + + "mtusi-messenger/internal/domain" + "mtusi-messenger/internal/platform/password" + "mtusi-messenger/internal/platform/token" +) + +type SessionRepositorySuite struct { + BaseSuite +} + +func TestSessionRepositorySuite(t *testing.T) { + suite.Run(t, new(SessionRepositorySuite)) +} + +func (s *SessionRepositorySuite) TestCredentials() { + alice := s.createUser("alice") + + credentials, err := s.store.Sessions().Credentials(s.T().Context(), "alice") + s.Require().NoError(err) + s.Equal(alice.ID, credentials.User.ID) + s.True(password.Verify("strong-test-password", credentials.PasswordHash)) + s.False(password.Verify("wrong-password-value", credentials.PasswordHash)) +} + +func (s *SessionRepositorySuite) TestCredentialsUnknownUser() { + _, err := s.store.Sessions().Credentials(s.T().Context(), "nobody") + s.Require().ErrorIs(err, domain.ErrUnauthenticated) +} + +func (s *SessionRepositorySuite) TestCreateResolveRevoke() { + alice := s.createUser("alice") + + _, hash, err := token.New().Generate() + s.Require().NoError(err) + + expiresAt := time.Now().UTC().Add(time.Hour).Truncate(time.Microsecond) + + created, err := s.store.Sessions().Create(s.T().Context(), domain.NewSession{ + TokenHash: hash, + UserID: alice.ID, + ExpiresAt: expiresAt, + }) + s.Require().NoError(err) + s.Equal(expiresAt, created.ExpiresAt) + + resolved, err := s.store.Sessions().Resolve(s.T().Context(), hash) + s.Require().NoError(err) + s.Equal(alice.ID, resolved.User.ID) + s.Equal(created.ExpiresAt, resolved.ExpiresAt) + + s.Require().NoError(s.store.Sessions().Revoke(s.T().Context(), alice.ID, hash)) + + _, err = s.store.Sessions().Resolve(s.T().Context(), hash) + s.Require().ErrorIs(err, domain.ErrUnauthenticated) +} + +func (s *SessionRepositorySuite) TestResolveRejectsExpiredToken() { + alice := s.createUser("alice") + + _, hash, err := token.New().Generate() + s.Require().NoError(err) + + _, err = s.store.Sessions().Create(s.T().Context(), domain.NewSession{ + TokenHash: hash, + UserID: alice.ID, + ExpiresAt: time.Now().UTC().Add(-time.Minute), + }) + s.Require().NoError(err) + + _, err = s.store.Sessions().Resolve(s.T().Context(), hash) + s.Require().ErrorIs(err, domain.ErrUnauthenticated) +} diff --git a/internal/storage/postgres/store.go b/internal/storage/postgres/store.go new file mode 100644 index 00000000..ac61f500 --- /dev/null +++ b/internal/storage/postgres/store.go @@ -0,0 +1,94 @@ +package postgres + +import ( + "context" + "fmt" + "time" + + "github.com/jackc/pgx/v5/pgxpool" + + "mtusi-messenger/internal/config" + "mtusi-messenger/internal/storage/postgres/internal/sqlcgen" +) + +type Store struct { + pool *pgxpool.Pool + queries *sqlcgen.Queries + queryTimeout time.Duration + + users *UserRepository + chats *ChatRepository + messages *MessageRepository + sessions *SessionRepository +} + +func New(ctx context.Context, cfg config.Postgres) (*Store, error) { + cfg, err := normalize(cfg) + if err != nil { + return nil, fmt.Errorf("normalize database config: %w", err) + } + + poolCfg, err := pgxpool.ParseConfig(cfg.DSN()) + if err != nil { + return nil, fmt.Errorf("parse database dsn: %w", err) + } + + poolCfg.MaxConns = cfg.MaxConns + poolCfg.MinConns = cfg.MinConns + poolCfg.MaxConnLifetime = cfg.MaxConnLifetime + poolCfg.MaxConnIdleTime = cfg.MaxConnIdleTime + poolCfg.ConnConfig.ConnectTimeout = cfg.ConnectTimeout + + pool, err := pgxpool.NewWithConfig(ctx, poolCfg) + if err != nil { + return nil, fmt.Errorf("create pool: %w", err) + } + + pingCtx, cancel := context.WithTimeout(ctx, cfg.ConnectTimeout) + defer cancel() + + if err := pool.Ping(pingCtx); err != nil { + pool.Close() + + return nil, fmt.Errorf("ping database: %w", err) + } + + store := &Store{ + pool: pool, + queries: sqlcgen.New(pool), + queryTimeout: cfg.QueryTimeout, + } + + store.users = &UserRepository{store: store} + store.chats = &ChatRepository{store: store} + store.messages = &MessageRepository{store: store} + store.sessions = &SessionRepository{store: store} + + return store, nil +} + +func (s *Store) Users() *UserRepository { return s.users } + +func (s *Store) Chats() *ChatRepository { return s.chats } + +func (s *Store) Messages() *MessageRepository { return s.messages } + +func (s *Store) Sessions() *SessionRepository { return s.sessions } + +func (s *Store) Ping(ctx context.Context) error { + if err := s.pool.Ping(ctx); err != nil { + return fmt.Errorf("ping database: %w", err) + } + + return nil +} + +func (s *Store) Close() { s.pool.Close() } + +func (s *Store) timeout(ctx context.Context) (context.Context, context.CancelFunc) { + if s.queryTimeout <= 0 { + return context.WithCancel(ctx) + } + + return context.WithTimeout(ctx, s.queryTimeout) +} diff --git a/internal/storage/postgres/transaction.go b/internal/storage/postgres/transaction.go new file mode 100644 index 00000000..ab8fb5dc --- /dev/null +++ b/internal/storage/postgres/transaction.go @@ -0,0 +1,32 @@ +package postgres + +import ( + "context" + "fmt" + + "github.com/jackc/pgx/v5" + + "mtusi-messenger/internal/storage/postgres/internal/sqlcgen" +) + +func (s *Store) RunInTx(ctx context.Context, fn func(queries *sqlcgen.Queries) error) error { + ctx, cancel := s.timeout(ctx) + defer cancel() + + tx, err := s.pool.BeginTx(ctx, pgx.TxOptions{}) + if err != nil { + return fmt.Errorf("begin transaction: %w", err) + } + + defer func() { _ = tx.Rollback(ctx) }() + + if err := fn(s.queries.WithTx(tx)); err != nil { + return err + } + + if err := tx.Commit(ctx); err != nil { + return fmt.Errorf("commit transaction: %w", err) + } + + return nil +} diff --git a/internal/storage/postgres/user_repository.go b/internal/storage/postgres/user_repository.go new file mode 100644 index 00000000..c9e6e98b --- /dev/null +++ b/internal/storage/postgres/user_repository.go @@ -0,0 +1,63 @@ +package postgres + +import ( + "context" + "errors" + "fmt" + + "github.com/google/uuid" + + "mtusi-messenger/internal/domain" + "mtusi-messenger/internal/storage/postgres/internal/sqlcgen" +) + +type UserRepository struct { + store *Store +} + +func (r *UserRepository) Create(ctx context.Context, draft domain.NewUser) (domain.User, error) { + ctx, cancel := r.store.timeout(ctx) + defer cancel() + + row, err := r.store.queries.CreateUser(ctx, sqlcgen.CreateUserParams{ + Username: draft.Username, + DisplayName: draft.DisplayName, + PasswordHash: draft.PasswordHash, + }) + if err != nil { + if isUniqueViolation(err) { + return domain.User{}, fmt.Errorf("%w: username %q", domain.ErrUsernameTaken, draft.Username) + } + + return domain.User{}, fmt.Errorf("create user: %w", mapError(err)) + } + + return domain.User{ + ID: row.ID, + Username: row.Username, + DisplayName: row.DisplayName, + CreatedAt: toUTCTime(row.CreatedAt), + }, nil +} + +func (r *UserRepository) GetByID(ctx context.Context, id uuid.UUID) (domain.User, error) { + ctx, cancel := r.store.timeout(ctx) + defer cancel() + + row, err := r.store.queries.GetUserByID(ctx, id) + if err != nil { + mapped := mapError(err) + if errors.Is(mapped, domain.ErrNotFound) { + return domain.User{}, fmt.Errorf("%w: user %s", domain.ErrNotFound, id) + } + + return domain.User{}, fmt.Errorf("get user: %w", mapped) + } + + return domain.User{ + ID: row.ID, + Username: row.Username, + DisplayName: row.DisplayName, + CreatedAt: toUTCTime(row.CreatedAt), + }, nil +} diff --git a/internal/storage/postgres/user_repository_test.go b/internal/storage/postgres/user_repository_test.go new file mode 100644 index 00000000..4ceb276f --- /dev/null +++ b/internal/storage/postgres/user_repository_test.go @@ -0,0 +1,114 @@ +//go:build integration + +package postgres_test + +import ( + "errors" + "sync" + "testing" + "time" + + "github.com/google/uuid" + "github.com/stretchr/testify/suite" + + "mtusi-messenger/internal/config" + "mtusi-messenger/internal/domain" + "mtusi-messenger/internal/platform/password" +) + +type UserRepositorySuite struct { + BaseSuite +} + +func TestUserRepositorySuite(t *testing.T) { + suite.Run(t, new(UserRepositorySuite)) +} + +func (s *UserRepositorySuite) TestCreateAndLookup() { + created := s.createUser("alice") + s.NotEqual(uuid.Nil, created.ID) + s.Equal(uuid.Version(7), created.ID.Version()) + s.Equal("alice", created.Username) + s.False(created.CreatedAt.IsZero()) + + found, err := s.store.Users().GetByID(s.T().Context(), created.ID) + s.Require().NoError(err) + s.Equal(created, found) + + _, err = s.store.Users().GetByID(s.T().Context(), uuid.New()) + s.Require().ErrorIs(err, domain.ErrNotFound) +} + +func (s *UserRepositorySuite) TestDuplicateUsernameConflicts() { + s.createUser("alice") + + hash, err := password.Hash("strong-test-password") + s.Require().NoError(err) + + _, err = s.store.Users().Create(s.T().Context(), domain.NewUser{ + Username: "alice", + DisplayName: "Другая Алиса", + PasswordHash: hash, + }) + s.Require().ErrorIs(err, domain.ErrUsernameTaken) +} + +func (s *UserRepositorySuite) TestConcurrentRegistrationCreatesSingleUser() { + hash, err := password.Hash("strong-test-password") + s.Require().NoError(err) + + const attempts = 8 + + var ( + wg sync.WaitGroup + mu sync.Mutex + successes int + failures []error + ) + + for range attempts { + wg.Go(func() { + _, err := s.store.Users().Create(s.T().Context(), domain.NewUser{ + Username: "racer", + DisplayName: "Racer", + PasswordHash: hash, + }) + + mu.Lock() + defer mu.Unlock() + + if err == nil { + successes++ + + return + } + + failures = append(failures, err) + }) + } + + wg.Wait() + + s.Equal(1, successes, "ровно одна регистрация выигрывает гонку") + s.Len(failures, attempts-1) + + for _, failure := range failures { + ok := errors.Is(failure, domain.ErrUsernameTaken) || errors.Is(failure, domain.ErrConflict) + s.True(ok, "проигравшая регистрация должна давать конфликт, получено: %v", failure) + } + + var count int + s.Require().NoError(s.pool.QueryRow(s.T().Context(), "SELECT count(*) FROM users WHERE username = 'racer'").Scan(&count)) + s.Equal(1, count) +} + +func (s *UserRepositorySuite) TestQueryTimeoutReturnsError() { + store := openStore(s.T(), s.db, func(cfg *config.Postgres) { + cfg.QueryTimeout = time.Nanosecond + }) + defer store.Close() + + _, err := store.Users().GetByID(s.T().Context(), uuid.New()) + s.Require().Error(err) + s.NotErrorIs(err, domain.ErrNotFound) +} diff --git a/internal/storage/redis/chat_repository.go b/internal/storage/redis/chat_repository.go new file mode 100644 index 00000000..9ce0c088 --- /dev/null +++ b/internal/storage/redis/chat_repository.go @@ -0,0 +1,183 @@ +package redis + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "log/slog" + "time" + + "github.com/google/uuid" + + "mtusi-messenger/internal/domain" + "mtusi-messenger/internal/platform/cache" +) + +type ChatSource interface { + Create(ctx context.Context, draft domain.ChatDraft) (domain.Chat, error) + GetVisible(ctx context.Context, chatID, callerID uuid.UUID) (domain.Chat, error) + ListVersion(ctx context.Context, userID uuid.UUID) (int64, error) + ListVisible( + ctx context.Context, + callerID uuid.UUID, + after *domain.Cursor, + limit int, + ) (domain.Page[domain.Chat], error) +} + +type ChatRepository struct { + source ChatSource + cache *cache.DistributedCache + ttl time.Duration + log *slog.Logger +} + +func NewChatRepository( + source ChatSource, + cache *cache.DistributedCache, + ttl time.Duration, + log *slog.Logger, +) *ChatRepository { + return &ChatRepository{source: source, cache: cache, ttl: ttl, log: log} +} + +func (r *ChatRepository) Create(ctx context.Context, draft domain.ChatDraft) (domain.Chat, error) { + return r.source.Create(ctx, draft) +} + +func (r *ChatRepository) GetVisible(ctx context.Context, chatID, callerID uuid.UUID) (domain.Chat, error) { + return r.source.GetVisible(ctx, chatID, callerID) +} + +type sourceError struct{ err error } + +func (e sourceError) Error() string { return e.err.Error() } + +func (e sourceError) Unwrap() error { return e.err } + +const cacheOperationTimeout = 500 * time.Millisecond + +func (r *ChatRepository) ListVisible( + ctx context.Context, + callerID uuid.UUID, + after *domain.Cursor, + limit int, +) (domain.Page[domain.Chat], error) { + if after != nil { + return r.source.ListVisible(ctx, callerID, after, limit) + } + + version, err := r.source.ListVersion(ctx, callerID) + if err != nil { + return domain.Page[domain.Chat]{}, fmt.Errorf("chat list version: %w", err) + } + + key := chatListKey(callerID, version, limit) + + loader := func(ctx context.Context) ([]byte, error) { + page, err := r.source.ListVisible(ctx, callerID, nil, limit) + if err != nil { + return nil, sourceError{err} + } + + return json.Marshal(newChatPageDTO(page)) + } + + cctx, cancel := context.WithTimeout(ctx, cacheOperationTimeout) + defer cancel() + + encoded, err := r.cache.GetOrLoad(cctx, key, r.ttl, loader) + if err != nil { + var sourceErr sourceError + switch { + case errors.As(err, &sourceErr): + return domain.Page[domain.Chat]{}, sourceErr.err + case ctx.Err() != nil: + return domain.Page[domain.Chat]{}, ctx.Err() + } + } else { + var dto chatPageDTO + unmarshalErr := json.Unmarshal(encoded, &dto) + if unmarshalErr == nil { + return dto.toDomain(), nil + } + err = unmarshalErr + + _ = r.cache.Delete(ctx, key) + } + + if r.log != nil { + r.log.WarnContext(ctx, "chat list cache unavailable, falling back to source", slog.Any("error", err)) + } + + return r.source.ListVisible(ctx, callerID, nil, limit) +} + +func chatListKey(userID uuid.UUID, version int64, limit int) string { + return fmt.Sprintf("chat_list:%s:%d:%d", userID, version, limit) +} + +type chatPageDTO struct { + Items []chatDTO `json:"items"` + Next *cursorDTO `json:"next,omitempty"` +} + +type chatDTO struct { + ID uuid.UUID `json:"id"` + Title string `json:"title"` + MemberIDs []uuid.UUID `json:"member_ids"` + CreatedAt time.Time `json:"created_at"` +} + +type cursorDTO struct { + Scope uuid.UUID `json:"scope"` + CreatedAt time.Time `json:"created_at"` + ID uuid.UUID `json:"id"` +} + +func newChatPageDTO(page domain.Page[domain.Chat]) chatPageDTO { + items := make([]chatDTO, 0, len(page.Items)) + for _, chat := range page.Items { + items = append(items, chatDTO{ + ID: chat.ID, + Title: chat.Title, + MemberIDs: chat.MemberIDs, + CreatedAt: chat.CreatedAt, + }) + } + + var next *cursorDTO + if page.Next != nil { + next = &cursorDTO{ + Scope: page.Next.Scope, + CreatedAt: page.Next.CreatedAt, + ID: page.Next.ID, + } + } + + return chatPageDTO{Items: items, Next: next} +} + +func (d chatPageDTO) toDomain() domain.Page[domain.Chat] { + items := make([]domain.Chat, 0, len(d.Items)) + for _, chat := range d.Items { + items = append(items, domain.Chat{ + ID: chat.ID, + Title: chat.Title, + MemberIDs: chat.MemberIDs, + CreatedAt: chat.CreatedAt, + }) + } + + var next *domain.Cursor + if d.Next != nil { + next = &domain.Cursor{ + Scope: d.Next.Scope, + CreatedAt: d.Next.CreatedAt, + ID: d.Next.ID, + } + } + + return domain.Page[domain.Chat]{Items: items, Next: next} +} diff --git a/internal/storage/redis/chat_repository_test.go b/internal/storage/redis/chat_repository_test.go new file mode 100644 index 00000000..c06f10e9 --- /dev/null +++ b/internal/storage/redis/chat_repository_test.go @@ -0,0 +1,428 @@ +//go:build integration + +package redis_test + +import ( + "context" + "errors" + "sync" + "sync/atomic" + "testing" + "time" + + "github.com/google/uuid" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/suite" + + "mtusi-messenger/internal/domain" + "mtusi-messenger/internal/platform/cache" + cachemocks "mtusi-messenger/internal/platform/cache/mocks" + storageredis "mtusi-messenger/internal/storage/redis" + storagemocks "mtusi-messenger/internal/storage/redis/mocks" +) + +type ChatRepositorySuite struct { + suite.Suite + + cache *cache.RedisCache +} + +func TestChatRepositorySuite(t *testing.T) { + suite.Run(t, new(ChatRepositorySuite)) +} + +func (s *ChatRepositorySuite) SetupSuite() { + var err error + + s.cache, err = cache.NewRedis(testRedisConfig()) + s.Require().NoError(err) + + s.Require().NoError(s.cache.Ping(s.T().Context())) + s.Require().NoError(flushRedisDB(s.T().Context())) +} + +func (s *ChatRepositorySuite) TearDownSuite() { + if s.cache != nil { + s.Require().NoError(s.cache.Close()) + } +} + +func (s *ChatRepositorySuite) newDistributed() *cache.DistributedCache { + s.T().Helper() + + dc, err := cache.NewDistributed(s.cache, cache.DistributedConfig{}, nil) + s.Require().NoError(err) + + return dc +} + +func (s *ChatRepositorySuite) newRepo(source storageredis.ChatSource) *storageredis.ChatRepository { + s.T().Helper() + + return storageredis.NewChatRepository(source, s.newDistributed(), time.Minute, nil) +} + +func (s *ChatRepositorySuite) TestFirstPageIsCached() { + ctx := s.T().Context() + alice := uuid.New() + page := domain.Page[domain.Chat]{Items: []domain.Chat{}} + + source := storagemocks.NewMockChatSource(s.T()) + source.EXPECT().ListVersion(mock.Anything, alice).Return(int64(0), nil).Twice() + source.EXPECT().ListVisible(mock.Anything, alice, (*domain.Cursor)(nil), 50).Return(page, nil).Once() + + repo := s.newRepo(source) + + first, err := repo.ListVisible(ctx, alice, nil, 50) + s.Require().NoError(err) + s.Empty(first.Items) + + second, err := repo.ListVisible(ctx, alice, nil, 50) + s.Require().NoError(err) + s.Empty(second.Items) +} + +func (s *ChatRepositorySuite) TestCreateInvalidatesMemberCaches() { + ctx := s.T().Context() + alice := uuid.New() + bob := uuid.New() + empty := domain.Page[domain.Chat]{Items: []domain.Chat{}} + chat := domain.Chat{ + ID: uuid.New(), + Title: "Чат", + MemberIDs: []uuid.UUID{alice, bob}, + CreatedAt: time.Now().UTC(), + } + page := domain.Page[domain.Chat]{Items: []domain.Chat{chat}} + + source := storagemocks.NewMockChatSource(s.T()) + source.EXPECT().ListVersion(mock.Anything, alice).Return(int64(0), nil).Once() + source.EXPECT().ListVersion(mock.Anything, bob).Return(int64(0), nil).Once() + source.EXPECT().ListVisible(mock.Anything, alice, (*domain.Cursor)(nil), 50).Return(empty, nil).Once() + source.EXPECT().ListVisible(mock.Anything, bob, (*domain.Cursor)(nil), 50).Return(empty, nil).Once() + source.EXPECT().Create(mock.Anything, mock.AnythingOfType("domain.ChatDraft")).Return(chat, nil).Once() + source.EXPECT().ListVersion(mock.Anything, alice).Return(int64(1), nil).Once() + source.EXPECT().ListVersion(mock.Anything, bob).Return(int64(1), nil).Once() + source.EXPECT().ListVisible(mock.Anything, alice, (*domain.Cursor)(nil), 50).Return(page, nil).Once() + source.EXPECT().ListVisible(mock.Anything, bob, (*domain.Cursor)(nil), 50).Return(page, nil).Once() + + repo := s.newRepo(source) + + _, err := repo.ListVisible(ctx, alice, nil, 50) + s.Require().NoError(err) + _, err = repo.ListVisible(ctx, bob, nil, 50) + s.Require().NoError(err) + + _, err = repo.Create(ctx, domain.ChatDraft{ + Title: "Чат", + MemberIDs: []uuid.UUID{alice, bob}, + CallerID: alice, + }) + s.Require().NoError(err) + + alicePage, err := repo.ListVisible(ctx, alice, nil, 50) + s.Require().NoError(err) + s.Len(alicePage.Items, 1, "creator must observe the new chat immediately") + + bobPage, err := repo.ListVisible(ctx, bob, nil, 50) + s.Require().NoError(err) + s.Len(bobPage.Items, 1, "other member must observe the new chat immediately") +} + +func (s *ChatRepositorySuite) TestEvictedCacheEntryReloadsFromSource() { + ctx := s.T().Context() + alice := uuid.New() + empty := domain.Page[domain.Chat]{Items: []domain.Chat{}} + + source := storagemocks.NewMockChatSource(s.T()) + source.EXPECT().ListVersion(mock.Anything, alice).Return(int64(0), nil).Twice() + source.EXPECT().ListVisible(mock.Anything, alice, (*domain.Cursor)(nil), 50).Return(empty, nil).Twice() + + repo := s.newRepo(source) + + _, err := repo.ListVisible(ctx, alice, nil, 50) + s.Require().NoError(err) + + // Simulate a Redis flush/restart by dropping all cache entries. + s.Require().NoError(flushRedisDB(ctx)) + + _, err = repo.ListVisible(ctx, alice, nil, 50) + s.Require().NoError(err) +} + +func (s *ChatRepositorySuite) TestDeeperPagesBypassCache() { + ctx := s.T().Context() + alice := uuid.New() + cursor := &domain.Cursor{Scope: alice, CreatedAt: time.Now().UTC(), ID: uuid.New()} + empty := domain.Page[domain.Chat]{Items: []domain.Chat{}} + + source := storagemocks.NewMockChatSource(s.T()) + source.EXPECT().ListVisible(mock.Anything, alice, cursor, 50).Return(empty, nil).Twice() + + repo := s.newRepo(source) + + _, err := repo.ListVisible(ctx, alice, cursor, 50) + s.Require().NoError(err) + _, err = repo.ListVisible(ctx, alice, cursor, 50) + s.Require().NoError(err) +} + +func (s *ChatRepositorySuite) TestLimitIsPartOfCacheKey() { + ctx := s.T().Context() + alice := uuid.New() + empty := domain.Page[domain.Chat]{Items: []domain.Chat{}} + + source := storagemocks.NewMockChatSource(s.T()) + source.EXPECT().ListVersion(mock.Anything, alice).Return(int64(0), nil).Twice() + source.EXPECT().ListVisible(mock.Anything, alice, (*domain.Cursor)(nil), 10).Return(empty, nil).Once() + source.EXPECT().ListVisible(mock.Anything, alice, (*domain.Cursor)(nil), 50).Return(empty, nil).Once() + + repo := s.newRepo(source) + + _, err := repo.ListVisible(ctx, alice, nil, 10) + s.Require().NoError(err) + _, err = repo.ListVisible(ctx, alice, nil, 50) + s.Require().NoError(err) +} + +func (s *ChatRepositorySuite) TestConcurrentColdReadsAreDeduplicated() { + ctx := s.T().Context() + alice := uuid.New() + empty := domain.Page[domain.Chat]{Items: []domain.Chat{}} + + source := storagemocks.NewMockChatSource(s.T()) + source.EXPECT().ListVersion(mock.Anything, alice).Return(int64(0), nil).Maybe() + source.EXPECT().ListVisible(mock.Anything, alice, (*domain.Cursor)(nil), 50). + RunAndReturn(func(context.Context, uuid.UUID, *domain.Cursor, int) (domain.Page[domain.Chat], error) { + time.Sleep(25 * time.Millisecond) + + return empty, nil + }).Once() + + repo := s.newRepo(source) + + const workers = 100 + + var ( + wg sync.WaitGroup + failures atomic.Int32 + ) + + wg.Add(workers) + + for range workers { + go func() { + defer wg.Done() + + if _, err := repo.ListVisible(ctx, alice, nil, 50); err != nil { + failures.Add(1) + } + }() + } + + wg.Wait() + + s.Require().Zero(failures.Load()) + s.T().Logf("distributed lock: %d concurrent cold reads -> 1 source load", workers) +} + +func (s *ChatRepositorySuite) TestMultipleInstancesShareDistributedLock() { + ctx := s.T().Context() + alice := uuid.New() + empty := domain.Page[domain.Chat]{Items: []domain.Chat{}} + + source := storagemocks.NewMockChatSource(s.T()) + source.EXPECT().ListVersion(mock.Anything, alice).Return(int64(0), nil).Maybe() + source.EXPECT().ListVisible(mock.Anything, alice, (*domain.Cursor)(nil), 50). + RunAndReturn(func(context.Context, uuid.UUID, *domain.Cursor, int) (domain.Page[domain.Chat], error) { + time.Sleep(25 * time.Millisecond) + + return empty, nil + }).Once() + + const ( + instances = 3 + workersPerInstance = 30 + ) + + repos := make([]*storageredis.ChatRepository, instances) + for i := range repos { + repos[i] = s.newRepo(source) + } + + var ( + wg sync.WaitGroup + failures atomic.Int32 + ) + + wg.Add(instances * workersPerInstance) + + for i := range repos { + repo := repos[i] + for range workersPerInstance { + go func() { + defer wg.Done() + + if _, err := repo.ListVisible(ctx, alice, nil, 50); err != nil { + failures.Add(1) + } + }() + } + } + + wg.Wait() + + s.Require().Zero(failures.Load()) + s.T().Logf("multi-instance distributed lock: %d instances x %d reads -> 1 source load", + instances, workersPerInstance) +} + +func (s *ChatRepositorySuite) TestCacheUnavailableFallsBackToSource() { + ctx := s.T().Context() + alice := uuid.New() + page := domain.Page[domain.Chat]{Items: []domain.Chat{}} + + source := storagemocks.NewMockChatSource(s.T()) + source.EXPECT().ListVersion(mock.Anything, alice).Return(int64(0), nil).Once() + source.EXPECT().ListVisible(mock.Anything, alice, (*domain.Cursor)(nil), 50).Return(page, nil).Once() + + lockStore := cachemocks.NewMockLockStore(s.T()) + lockStore.EXPECT().Get(mock.Anything, mock.Anything).Return(nil, errors.New("redis down")).Maybe() + + distributed, err := cache.NewDistributed(lockStore, cache.DistributedConfig{}, nil) + s.Require().NoError(err) + + repo := storageredis.NewChatRepository(source, distributed, time.Minute, nil) + + got, err := repo.ListVisible(ctx, alice, nil, 50) + s.Require().NoError(err, "cache failure must not fail the read") + s.Empty(got.Items) +} + +func (s *ChatRepositorySuite) TestBrokenCacheEntryIsDroppedAndRepopulated() { + ctx := s.T().Context() + alice := uuid.New() + page := domain.Page[domain.Chat]{Items: []domain.Chat{}} + + source := storagemocks.NewMockChatSource(s.T()) + source.EXPECT().ListVersion(mock.Anything, alice).Return(int64(0), nil).Times(3) + source.EXPECT().ListVisible(mock.Anything, alice, (*domain.Cursor)(nil), 50).Return(page, nil).Twice() + + repo := s.newRepo(source) + + key := "chat_list:" + alice.String() + ":0:50" + s.Require().NoError(s.cache.Set(ctx, key, []byte("{not json"), time.Minute)) + + // 1st: garbage -> dropped -> source. + first, err := repo.ListVisible(ctx, alice, nil, 50) + s.Require().NoError(err, "a corrupted cache entry must not fail the read") + + // 2nd: miss -> source -> repopulate. + second, err := repo.ListVisible(ctx, alice, nil, 50) + s.Require().NoError(err) + + // 3rd: served from cache, no source call. + third, err := repo.ListVisible(ctx, alice, nil, 50) + s.Require().NoError(err) + + s.Equal(first, second) + s.Equal(second, third) +} + +func (s *ChatRepositorySuite) TestSlowLoaderBeyondCacheBudgetReturnsData() { + ctx := s.T().Context() + alice := uuid.New() + page := domain.Page[domain.Chat]{Items: []domain.Chat{}} + + release := make(chan struct{}) + var calls atomic.Int32 + + source := storagemocks.NewMockChatSource(s.T()) + source.EXPECT().ListVersion(mock.Anything, alice).Return(int64(0), nil).Once() + source.EXPECT().ListVisible(mock.Anything, alice, (*domain.Cursor)(nil), 50). + RunAndReturn(func(context.Context, uuid.UUID, *domain.Cursor, int) (domain.Page[domain.Chat], error) { + if calls.Add(1) == 1 { + <-release // the loader outlives the caller's cache budget + } + + return page, nil + }).Maybe() + + repo := s.newRepo(source) + + started := time.Now() + got, err := repo.ListVisible(ctx, alice, nil, 50) + s.Require().NoError(err, "budget expiry must fall back to the source, not fail") + s.Empty(got.Items) + s.GreaterOrEqual(time.Since(started), 450*time.Millisecond, "the caller must be bounded by the cache budget") + + // Let the background loader finish before the test (and its mock) is torn down. + close(release) + time.Sleep(200 * time.Millisecond) +} + +func (s *ChatRepositorySuite) TestSourceErrorIsNotRetried() { + ctx := s.T().Context() + alice := uuid.New() + sentinel := errors.New("postgres down") + + source := storagemocks.NewMockChatSource(s.T()) + source.EXPECT().ListVersion(mock.Anything, alice).Return(int64(0), nil).Once() + source.EXPECT().ListVisible(mock.Anything, alice, (*domain.Cursor)(nil), 50). + Return(domain.Page[domain.Chat]{}, sentinel).Once() + + repo := s.newRepo(source) + + _, err := repo.ListVisible(ctx, alice, nil, 50) + s.Require().ErrorIs(err, sentinel, "source error must propagate") +} + +func (s *ChatRepositorySuite) TestConcurrentColdReadsWithoutProtectionStampede() { + ctx := s.T().Context() + alice := uuid.New() + key := "naive:" + alice.String() + empty := domain.Page[domain.Chat]{Items: []domain.Chat{}} + + var loads atomic.Int32 + + source := storagemocks.NewMockChatSource(s.T()) + source.EXPECT().ListVisible(mock.Anything, alice, (*domain.Cursor)(nil), 50). + RunAndReturn(func(context.Context, uuid.UUID, *domain.Cursor, int) (domain.Page[domain.Chat], error) { + loads.Add(1) + time.Sleep(2 * time.Millisecond) + + return empty, nil + }).Maybe() + + const workers = 100 + + var ( + wg sync.WaitGroup + failures atomic.Int32 + ) + + wg.Add(workers) + + for range workers { + go func() { + defer wg.Done() + + // Naive cache-aside without distributed coordination: every concurrent miss loads. + if _, err := s.cache.Get(ctx, key); err != nil { + if _, loadErr := source.ListVisible(ctx, alice, nil, 50); loadErr != nil { + failures.Add(1) + + return + } + + _ = s.cache.Set(ctx, key, []byte("page"), time.Minute) + } + }() + } + + wg.Wait() + + s.Require().Zero(failures.Load()) + s.Greater(loads.Load(), int32(1), "without distributed coordination concurrent misses stampede the source") + s.T().Logf("stampede demonstration: %d concurrent reads -> %d source loads", workers, loads.Load()) +} diff --git a/internal/storage/redis/main_test.go b/internal/storage/redis/main_test.go new file mode 100644 index 00000000..fabadf25 --- /dev/null +++ b/internal/storage/redis/main_test.go @@ -0,0 +1,66 @@ +//go:build integration + +package redis_test + +import ( + "context" + "os" + "strconv" + "time" + + goredis "github.com/redis/go-redis/v9" + + "mtusi-messenger/internal/platform/cache" +) + +const testRedisDB = 1 + +func redisEnv(key, fallback string) string { + if value := os.Getenv(key); value != "" { + return value + } + + return fallback +} + +func redisEnvInt(key string, fallback int) int { + value := os.Getenv(key) + if value == "" { + return fallback + } + + parsed, err := strconv.Atoi(value) + if err != nil { + return fallback + } + + return parsed +} + +func testRedisConfig() cache.RedisConfig { + return cache.RedisConfig{ + Host: redisEnv("TEST_REDIS_HOST", "localhost"), + Port: redisEnvInt("TEST_REDIS_PORT", 6379), + Password: os.Getenv("TEST_REDIS_PASSWORD"), + DB: redisEnvInt("TEST_REDIS_DB", testRedisDB), + MaxRetries: 3, + DialTimeout: 5 * time.Second, + ReadTimeout: 3 * time.Second, + WriteTimeout: 3 * time.Second, + PoolSize: 5, + } +} + +func flushRedisDB(ctx context.Context) error { + cfg := testRedisConfig() + + client := goredis.NewClient(&goredis.Options{ + Addr: cfg.Host + ":" + strconv.Itoa(cfg.Port), + Password: cfg.Password, + DB: cfg.DB, + }) + + defer func() { _ = client.Close() }() + + return client.FlushDB(ctx).Err() +} diff --git a/internal/storage/redis/mocks/ChatSource.go b/internal/storage/redis/mocks/ChatSource.go new file mode 100644 index 00000000..5d9d3736 --- /dev/null +++ b/internal/storage/redis/mocks/ChatSource.go @@ -0,0 +1,331 @@ +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify + +package mocks + +import ( + "context" + "mtusi-messenger/internal/domain" + + "github.com/google/uuid" + mock "github.com/stretchr/testify/mock" +) + +// NewMockChatSource creates a new instance of MockChatSource. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockChatSource(t interface { + mock.TestingT + Cleanup(func()) +}) *MockChatSource { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + + mock := &MockChatSource{} + mock.Mock.Test(t) + + t.Cleanup(func() { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + mock.AssertExpectations(t) + }) + + return mock +} + +// MockChatSource is an autogenerated mock type for the ChatSource type +type MockChatSource struct { + mock.Mock +} + +type MockChatSource_Expecter struct { + mock *mock.Mock +} + +func (_m *MockChatSource) EXPECT() *MockChatSource_Expecter { + return &MockChatSource_Expecter{mock: &_m.Mock} +} + +// Create provides a mock function for the type MockChatSource +func (_mock *MockChatSource) Create(ctx context.Context, draft domain.ChatDraft) (domain.Chat, error) { + ret := _mock.Called(ctx, draft) + + if len(ret) == 0 { + panic("no return value specified for Create") + } + + var r0 domain.Chat + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, domain.ChatDraft) (domain.Chat, error)); ok { + return returnFunc(ctx, draft) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, domain.ChatDraft) domain.Chat); ok { + r0 = returnFunc(ctx, draft) + } else { + r0 = ret.Get(0).(domain.Chat) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, domain.ChatDraft) error); ok { + r1 = returnFunc(ctx, draft) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockChatSource_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type MockChatSource_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +// - draft domain.ChatDraft +func (_e *MockChatSource_Expecter) Create(ctx any, draft any) *MockChatSource_Create_Call { + return &MockChatSource_Create_Call{Call: _e.mock.On("Create", ctx, draft)} +} + +func (_c *MockChatSource_Create_Call) Run(run func(ctx context.Context, draft domain.ChatDraft)) *MockChatSource_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 domain.ChatDraft + if args[1] != nil { + arg1 = args[1].(domain.ChatDraft) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockChatSource_Create_Call) Return(chat domain.Chat, err error) *MockChatSource_Create_Call { + _c.Call.Return(chat, err) + return _c +} + +func (_c *MockChatSource_Create_Call) RunAndReturn(run func(ctx context.Context, draft domain.ChatDraft) (domain.Chat, error)) *MockChatSource_Create_Call { + _c.Call.Return(run) + return _c +} + +// GetVisible provides a mock function for the type MockChatSource +func (_mock *MockChatSource) GetVisible(ctx context.Context, chatID uuid.UUID, callerID uuid.UUID) (domain.Chat, error) { + ret := _mock.Called(ctx, chatID, callerID) + + if len(ret) == 0 { + panic("no return value specified for GetVisible") + } + + var r0 domain.Chat + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) (domain.Chat, error)); ok { + return returnFunc(ctx, chatID, callerID) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) domain.Chat); ok { + r0 = returnFunc(ctx, chatID, callerID) + } else { + r0 = ret.Get(0).(domain.Chat) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, uuid.UUID, uuid.UUID) error); ok { + r1 = returnFunc(ctx, chatID, callerID) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockChatSource_GetVisible_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetVisible' +type MockChatSource_GetVisible_Call struct { + *mock.Call +} + +// GetVisible is a helper method to define mock.On call +// - ctx context.Context +// - chatID uuid.UUID +// - callerID uuid.UUID +func (_e *MockChatSource_Expecter) GetVisible(ctx any, chatID any, callerID any) *MockChatSource_GetVisible_Call { + return &MockChatSource_GetVisible_Call{Call: _e.mock.On("GetVisible", ctx, chatID, callerID)} +} + +func (_c *MockChatSource_GetVisible_Call) Run(run func(ctx context.Context, chatID uuid.UUID, callerID uuid.UUID)) *MockChatSource_GetVisible_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 uuid.UUID + if args[1] != nil { + arg1 = args[1].(uuid.UUID) + } + var arg2 uuid.UUID + if args[2] != nil { + arg2 = args[2].(uuid.UUID) + } + run( + arg0, + arg1, + arg2, + ) + }) + return _c +} + +func (_c *MockChatSource_GetVisible_Call) Return(chat domain.Chat, err error) *MockChatSource_GetVisible_Call { + _c.Call.Return(chat, err) + return _c +} + +func (_c *MockChatSource_GetVisible_Call) RunAndReturn(run func(ctx context.Context, chatID uuid.UUID, callerID uuid.UUID) (domain.Chat, error)) *MockChatSource_GetVisible_Call { + _c.Call.Return(run) + return _c +} + +// ListVersion provides a mock function for the type MockChatSource +func (_mock *MockChatSource) ListVersion(ctx context.Context, userID uuid.UUID) (int64, error) { + ret := _mock.Called(ctx, userID) + + if len(ret) == 0 { + panic("no return value specified for ListVersion") + } + + var r0 int64 + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID) (int64, error)); ok { + return returnFunc(ctx, userID) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID) int64); ok { + r0 = returnFunc(ctx, userID) + } else { + r0 = ret.Get(0).(int64) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, uuid.UUID) error); ok { + r1 = returnFunc(ctx, userID) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockChatSource_ListVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListVersion' +type MockChatSource_ListVersion_Call struct { + *mock.Call +} + +// ListVersion is a helper method to define mock.On call +// - ctx context.Context +// - userID uuid.UUID +func (_e *MockChatSource_Expecter) ListVersion(ctx any, userID any) *MockChatSource_ListVersion_Call { + return &MockChatSource_ListVersion_Call{Call: _e.mock.On("ListVersion", ctx, userID)} +} + +func (_c *MockChatSource_ListVersion_Call) Run(run func(ctx context.Context, userID uuid.UUID)) *MockChatSource_ListVersion_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 uuid.UUID + if args[1] != nil { + arg1 = args[1].(uuid.UUID) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockChatSource_ListVersion_Call) Return(n int64, err error) *MockChatSource_ListVersion_Call { + _c.Call.Return(n, err) + return _c +} + +func (_c *MockChatSource_ListVersion_Call) RunAndReturn(run func(ctx context.Context, userID uuid.UUID) (int64, error)) *MockChatSource_ListVersion_Call { + _c.Call.Return(run) + return _c +} + +// ListVisible provides a mock function for the type MockChatSource +func (_mock *MockChatSource) ListVisible(ctx context.Context, callerID uuid.UUID, after *domain.Cursor, limit int) (domain.Page[domain.Chat], error) { + ret := _mock.Called(ctx, callerID, after, limit) + + if len(ret) == 0 { + panic("no return value specified for ListVisible") + } + + var r0 domain.Page[domain.Chat] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, *domain.Cursor, int) (domain.Page[domain.Chat], error)); ok { + return returnFunc(ctx, callerID, after, limit) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, *domain.Cursor, int) domain.Page[domain.Chat]); ok { + r0 = returnFunc(ctx, callerID, after, limit) + } else { + r0 = ret.Get(0).(domain.Page[domain.Chat]) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, uuid.UUID, *domain.Cursor, int) error); ok { + r1 = returnFunc(ctx, callerID, after, limit) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockChatSource_ListVisible_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListVisible' +type MockChatSource_ListVisible_Call struct { + *mock.Call +} + +// ListVisible is a helper method to define mock.On call +// - ctx context.Context +// - callerID uuid.UUID +// - after *domain.Cursor +// - limit int +func (_e *MockChatSource_Expecter) ListVisible(ctx any, callerID any, after any, limit any) *MockChatSource_ListVisible_Call { + return &MockChatSource_ListVisible_Call{Call: _e.mock.On("ListVisible", ctx, callerID, after, limit)} +} + +func (_c *MockChatSource_ListVisible_Call) Run(run func(ctx context.Context, callerID uuid.UUID, after *domain.Cursor, limit int)) *MockChatSource_ListVisible_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 uuid.UUID + if args[1] != nil { + arg1 = args[1].(uuid.UUID) + } + var arg2 *domain.Cursor + if args[2] != nil { + arg2 = args[2].(*domain.Cursor) + } + var arg3 int + if args[3] != nil { + arg3 = args[3].(int) + } + run( + arg0, + arg1, + arg2, + arg3, + ) + }) + return _c +} + +func (_c *MockChatSource_ListVisible_Call) Return(page domain.Page[domain.Chat], err error) *MockChatSource_ListVisible_Call { + _c.Call.Return(page, err) + return _c +} + +func (_c *MockChatSource_ListVisible_Call) RunAndReturn(run func(ctx context.Context, callerID uuid.UUID, after *domain.Cursor, limit int) (domain.Page[domain.Chat], error)) *MockChatSource_ListVisible_Call { + _c.Call.Return(run) + return _c +} diff --git a/internal/transport/rest/errors.go b/internal/transport/rest/errors.go index 7218188f..58853ab0 100644 --- a/internal/transport/rest/errors.go +++ b/internal/transport/rest/errors.go @@ -10,7 +10,7 @@ import ( "github.com/ogen-go/ogen/ogenerrors" "mtusi-messenger/internal/domain" - "mtusi-messenger/internal/transport/rest/oas" + "mtusi-messenger/internal/transport/rest/internal/oas" ) var fallbackErrorBody = []byte(`{"error":{"code":"internal_error","message":"Internal error","request_id":""}}`) @@ -28,21 +28,38 @@ func newErrorHandler(log *slog.Logger) oas.ErrorHandler { } func statusForError(err error) int { + var securityErr *ogenerrors.SecurityError + + if errors.As(err, &securityErr) { + if status := statusForDomainError(securityErr.Err); status != http.StatusInternalServerError { + return status + } + + return http.StatusUnauthorized + } + if status := ogenerrors.ErrorCode(err); status != http.StatusInternalServerError { return status } + return statusForDomainError(err) +} + +func statusForDomainError(err error) int { switch { - case errors.Is(err, ErrUnauthenticated): + case errors.Is(err, ErrUnauthenticated), errors.Is(err, domain.ErrUnauthenticated): return http.StatusUnauthorized case errors.Is(err, domain.ErrNotFound): return http.StatusNotFound - case errors.Is(err, domain.ErrUsernameTaken): + case errors.Is(err, domain.ErrUsernameTaken), + errors.Is(err, domain.ErrConflict): return http.StatusConflict case errors.Is(err, domain.ErrValidation), errors.Is(err, domain.ErrUnknownMember), errors.Is(err, domain.ErrInvalidCursor): return http.StatusBadRequest + case errors.Is(err, domain.ErrUnavailable): + return http.StatusServiceUnavailable default: return http.StatusInternalServerError } @@ -85,6 +102,13 @@ func writeError(ctx context.Context, log *slog.Logger, w http.ResponseWriter, r w.Header().Set("Content-Type", "application/json; charset=utf-8") w.Header().Set(requestIDHeader, requestID) + if status == http.StatusUnauthorized { + challenge := `Bearer realm="messenger"` + if r.URL.Path == "/api/v1/auth/sessions" { + challenge = `Basic realm="messenger", charset="UTF-8"` + } + w.Header().Set("WWW-Authenticate", challenge) + } w.WriteHeader(status) if _, err := w.Write(payload); err != nil && log != nil { diff --git a/internal/transport/rest/handler.go b/internal/transport/rest/handler.go index d8389834..90273583 100644 --- a/internal/transport/rest/handler.go +++ b/internal/transport/rest/handler.go @@ -6,12 +6,13 @@ import ( "encoding/base64" "encoding/json" "fmt" + "net/http" "time" "github.com/google/uuid" "mtusi-messenger/internal/domain" - "mtusi-messenger/internal/transport/rest/oas" + "mtusi-messenger/internal/transport/rest/internal/oas" ) type UserService interface { @@ -40,24 +41,73 @@ type MessageService interface { ) (domain.Page[domain.Message], error) } +type HealthChecker interface { + Ping(ctx context.Context) error +} + +type SessionService interface { + Create(ctx context.Context, user domain.User) (domain.Session, error) + Revoke(ctx context.Context, userID uuid.UUID, token string) error +} + type Handler struct { oas.UnimplementedHandler users UserService chats ChatService messages MessageService + health HealthChecker + sessions SessionService } var noCursor *domain.Cursor -func NewHandler(users UserService, chats ChatService, messages MessageService) *Handler { +func NewHandler( + users UserService, + chats ChatService, + messages MessageService, + health HealthChecker, + sessions SessionService, +) *Handler { return &Handler{ users: users, chats: chats, messages: messages, + health: health, + sessions: sessions, } } +func (h *Handler) CreateSession(ctx context.Context) (oas.CreateSessionRes, error) { + user, ok := ctx.Value(credentialsKey{}).(domain.User) + if !ok { + return nil, domain.ErrUnauthenticated + } + + created, err := h.sessions.Create(ctx, user) + if err != nil { + return nil, err + } + + return &oas.SessionHeaders{ + XRequestID: oas.NewOptString(requestIDFromContext(ctx)), + Response: oas.Session{ + Token: created.Token, TokenType: "Bearer", ExpiresAt: created.ExpiresAt, User: userResponse(created.User), + }, + }, nil +} + +func (h *Handler) RevokeSession(ctx context.Context) (oas.RevokeSessionRes, error) { + token, ok := ctx.Value(tokenKey{}).(string) + if !ok { + return nil, domain.ErrUnauthenticated + } + if err := h.sessions.Revoke(ctx, caller(ctx), token); err != nil { + return nil, err + } + return &oas.RevokeSessionNoContent{XRequestID: oas.NewOptString(requestIDFromContext(ctx))}, nil +} + func (h *Handler) Liveness(ctx context.Context) (oas.LivenessRes, error) { return &oas.HealthHeaders{ XRequestID: oas.NewOptString(requestIDFromContext(ctx)), @@ -66,9 +116,22 @@ func (h *Handler) Liveness(ctx context.Context) (oas.LivenessRes, error) { } func (h *Handler) Readiness(ctx context.Context) (oas.ReadinessRes, error) { - return &oas.HealthHeaders{ - XRequestID: oas.NewOptString(requestIDFromContext(ctx)), - Response: oas.Health{Status: oas.HealthStatusOk}, + if h.health == nil || h.health.Ping(ctx) == nil { + return &oas.HealthHeaders{ + XRequestID: oas.NewOptString(requestIDFromContext(ctx)), + Response: oas.Health{Status: oas.HealthStatusOk}, + }, nil + } + + requestID := requestIDFromContext(ctx) + + return &oas.ReadinessServiceUnavailable{ + XRequestID: oas.NewOptString(requestID), + Response: oas.Error{Error: oas.ErrorError{ + Code: oas.ErrorErrorCodeUnavailable, + Message: http.StatusText(http.StatusServiceUnavailable), + RequestID: requestID, + }}, }, nil } @@ -76,6 +139,7 @@ func (h *Handler) RegisterUser(ctx context.Context, req *oas.CreateUser) (oas.Re user, err := h.users.Register(ctx, domain.UserDraft{ Username: req.Username, DisplayName: req.DisplayName, + Password: req.Password, }) if err != nil { return nil, err diff --git a/internal/transport/rest/oas/oas_cfg_gen.go b/internal/transport/rest/internal/oas/oas_cfg_gen.go similarity index 100% rename from internal/transport/rest/oas/oas_cfg_gen.go rename to internal/transport/rest/internal/oas/oas_cfg_gen.go diff --git a/internal/transport/rest/oas/oas_handlers_gen.go b/internal/transport/rest/internal/oas/oas_handlers_gen.go similarity index 78% rename from internal/transport/rest/oas/oas_handlers_gen.go rename to internal/transport/rest/internal/oas/oas_handlers_gen.go index 41753030..26fdfae4 100644 --- a/internal/transport/rest/oas/oas_handlers_gen.go +++ b/internal/transport/rest/internal/oas/oas_handlers_gen.go @@ -49,14 +49,14 @@ func (s *Server) handleCreateChatRequest(args [0]string, argsEscaped bool, w htt type bitset = [1]uint8 var satisfied bitset { - sctx, ok, err := s.securityDevUser(ctx, CreateChatOperation, r) + sctx, ok, err := s.securityBearerAuth(ctx, CreateChatOperation, r) if err != nil { err = &ogenerrors.SecurityError{ OperationContext: opErrContext, - Security: "DevUser", + Security: "BearerAuth", Err: err, } - defer recordError("Security:DevUser", err) + defer recordError("Security:BearerAuth", err) s.cfg.ErrorHandler(ctx, w, r, err) return } @@ -177,14 +177,14 @@ func (s *Server) handleCreateMessageRequest(args [1]string, argsEscaped bool, w type bitset = [1]uint8 var satisfied bitset { - sctx, ok, err := s.securityDevUser(ctx, CreateMessageOperation, r) + sctx, ok, err := s.securityBearerAuth(ctx, CreateMessageOperation, r) if err != nil { err = &ogenerrors.SecurityError{ OperationContext: opErrContext, - Security: "DevUser", + Security: "BearerAuth", Err: err, } - defer recordError("Security:DevUser", err) + defer recordError("Security:BearerAuth", err) s.cfg.ErrorHandler(ctx, w, r, err) return } @@ -299,6 +299,119 @@ func (s *Server) handleCreateMessageRequest(args [1]string, argsEscaped bool, w } } +// handleCreateSessionRequest handles createSession operation. +// +// Вход: Basic username:password; выдаёт сессию. +// +// POST /api/v1/auth/sessions +func (s *Server) handleCreateSessionRequest(args [0]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { + statusWriter := &codeRecorder{ResponseWriter: w} + w = statusWriter + ctx := r.Context() + + var ( + err error + opErrContext = ogenerrors.OperationContext{ + Name: CreateSessionOperation, + ID: "createSession", + } + ) + { + type bitset = [1]uint8 + var satisfied bitset + { + sctx, ok, err := s.securityBasicAuth(ctx, CreateSessionOperation, r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "BasicAuth", + Err: err, + } + defer recordError("Security:BasicAuth", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 0 + ctx = sctx + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, + } + defer recordError("Security", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + } + + var rawBody []byte + + var response CreateSessionRes + if m := s.cfg.Middleware; m != nil { + mreq := middleware.Request{ + Context: ctx, + OperationName: CreateSessionOperation, + OperationSummary: "Вход: Basic username:password; выдаёт сессию", + OperationID: "createSession", + Body: nil, + RawBody: rawBody, + Params: middleware.Parameters{}, + Raw: r, + } + + type ( + Request = struct{} + Params = struct{} + Response = CreateSessionRes + ) + response, err = middleware.HookMiddleware[ + Request, + Params, + Response, + ]( + m, + mreq, + nil, + func(ctx context.Context, request Request, params Params) (response Response, err error) { + response, err = s.h.CreateSession(ctx) + return response, err + }, + ) + } else { + response, err = s.h.CreateSession(ctx) + } + if err != nil { + defer recordError("Internal", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + if err := encodeCreateSessionResponse(response, w); err != nil { + defer recordError("EncodeResponse", err) + if !errors.Is(err, ht.ErrInternalServerErrorResponse) { + s.cfg.ErrorHandler(ctx, w, r, err) + } + return + } +} + // handleCurrentUserRequest handles currentUser operation. // // Текущий пользователь. @@ -320,14 +433,14 @@ func (s *Server) handleCurrentUserRequest(args [0]string, argsEscaped bool, w ht type bitset = [1]uint8 var satisfied bitset { - sctx, ok, err := s.securityDevUser(ctx, CurrentUserOperation, r) + sctx, ok, err := s.securityBearerAuth(ctx, CurrentUserOperation, r) if err != nil { err = &ogenerrors.SecurityError{ OperationContext: opErrContext, - Security: "DevUser", + Security: "BearerAuth", Err: err, } - defer recordError("Security:DevUser", err) + defer recordError("Security:BearerAuth", err) s.cfg.ErrorHandler(ctx, w, r, err) return } @@ -433,14 +546,14 @@ func (s *Server) handleGetChatRequest(args [1]string, argsEscaped bool, w http.R type bitset = [1]uint8 var satisfied bitset { - sctx, ok, err := s.securityDevUser(ctx, GetChatOperation, r) + sctx, ok, err := s.securityBearerAuth(ctx, GetChatOperation, r) if err != nil { err = &ogenerrors.SecurityError{ OperationContext: opErrContext, - Security: "DevUser", + Security: "BearerAuth", Err: err, } - defer recordError("Security:DevUser", err) + defer recordError("Security:BearerAuth", err) s.cfg.ErrorHandler(ctx, w, r, err) return } @@ -561,14 +674,14 @@ func (s *Server) handleListChatsRequest(args [0]string, argsEscaped bool, w http type bitset = [1]uint8 var satisfied bitset { - sctx, ok, err := s.securityDevUser(ctx, ListChatsOperation, r) + sctx, ok, err := s.securityBearerAuth(ctx, ListChatsOperation, r) if err != nil { err = &ogenerrors.SecurityError{ OperationContext: opErrContext, - Security: "DevUser", + Security: "BearerAuth", Err: err, } - defer recordError("Security:DevUser", err) + defer recordError("Security:BearerAuth", err) s.cfg.ErrorHandler(ctx, w, r, err) return } @@ -693,14 +806,14 @@ func (s *Server) handleListMessagesRequest(args [1]string, argsEscaped bool, w h type bitset = [1]uint8 var satisfied bitset { - sctx, ok, err := s.securityDevUser(ctx, ListMessagesOperation, r) + sctx, ok, err := s.securityBearerAuth(ctx, ListMessagesOperation, r) if err != nil { err = &ogenerrors.SecurityError{ OperationContext: opErrContext, - Security: "DevUser", + Security: "BearerAuth", Err: err, } - defer recordError("Security:DevUser", err) + defer recordError("Security:BearerAuth", err) s.cfg.ErrorHandler(ctx, w, r, err) return } @@ -1021,3 +1134,116 @@ func (s *Server) handleRegisterUserRequest(args [0]string, argsEscaped bool, w h return } } + +// handleRevokeSessionRequest handles revokeSession operation. +// +// Отозвать текущую сессию. +// +// DELETE /api/v1/auth/sessions/current +func (s *Server) handleRevokeSessionRequest(args [0]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) { + statusWriter := &codeRecorder{ResponseWriter: w} + w = statusWriter + ctx := r.Context() + + var ( + err error + opErrContext = ogenerrors.OperationContext{ + Name: RevokeSessionOperation, + ID: "revokeSession", + } + ) + { + type bitset = [1]uint8 + var satisfied bitset + { + sctx, ok, err := s.securityBearerAuth(ctx, RevokeSessionOperation, r) + if err != nil { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Security: "BearerAuth", + Err: err, + } + defer recordError("Security:BearerAuth", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + if ok { + satisfied[0] |= 1 << 0 + ctx = sctx + } + } + + if ok := func() bool { + nextRequirement: + for _, requirement := range []bitset{ + {0b00000001}, + } { + for i, mask := range requirement { + if satisfied[i]&mask != mask { + continue nextRequirement + } + } + return true + } + return false + }(); !ok { + err = &ogenerrors.SecurityError{ + OperationContext: opErrContext, + Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied, + } + defer recordError("Security", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + } + + var rawBody []byte + + var response RevokeSessionRes + if m := s.cfg.Middleware; m != nil { + mreq := middleware.Request{ + Context: ctx, + OperationName: RevokeSessionOperation, + OperationSummary: "Отозвать текущую сессию", + OperationID: "revokeSession", + Body: nil, + RawBody: rawBody, + Params: middleware.Parameters{}, + Raw: r, + } + + type ( + Request = struct{} + Params = struct{} + Response = RevokeSessionRes + ) + response, err = middleware.HookMiddleware[ + Request, + Params, + Response, + ]( + m, + mreq, + nil, + func(ctx context.Context, request Request, params Params) (response Response, err error) { + response, err = s.h.RevokeSession(ctx) + return response, err + }, + ) + } else { + response, err = s.h.RevokeSession(ctx) + } + if err != nil { + defer recordError("Internal", err) + s.cfg.ErrorHandler(ctx, w, r, err) + return + } + + if err := encodeRevokeSessionResponse(response, w); err != nil { + defer recordError("EncodeResponse", err) + if !errors.Is(err, ht.ErrInternalServerErrorResponse) { + s.cfg.ErrorHandler(ctx, w, r, err) + } + return + } +} diff --git a/internal/transport/rest/oas/oas_interfaces_gen.go b/internal/transport/rest/internal/oas/oas_interfaces_gen.go similarity index 81% rename from internal/transport/rest/oas/oas_interfaces_gen.go rename to internal/transport/rest/internal/oas/oas_interfaces_gen.go index 8a03eb62..aa93e9de 100644 --- a/internal/transport/rest/oas/oas_interfaces_gen.go +++ b/internal/transport/rest/internal/oas/oas_interfaces_gen.go @@ -9,6 +9,10 @@ type CreateMessageRes interface { createMessageRes() } +type CreateSessionRes interface { + createSessionRes() +} + type CurrentUserRes interface { currentUserRes() } @@ -36,3 +40,7 @@ type ReadinessRes interface { type RegisterUserRes interface { registerUserRes() } + +type RevokeSessionRes interface { + revokeSessionRes() +} diff --git a/internal/transport/rest/oas/oas_json_gen.go b/internal/transport/rest/internal/oas/oas_json_gen.go similarity index 90% rename from internal/transport/rest/oas/oas_json_gen.go rename to internal/transport/rest/internal/oas/oas_json_gen.go index e4e5c546..7642cbf6 100644 --- a/internal/transport/rest/oas/oas_json_gen.go +++ b/internal/transport/rest/internal/oas/oas_json_gen.go @@ -531,11 +531,16 @@ func (s *CreateUser) encodeFields(e *jx.Encoder) { e.FieldStart("display_name") e.Str(s.DisplayName) } + { + e.FieldStart("password") + e.Str(s.Password) + } } -var jsonFieldsNameOfCreateUser = [2]string{ +var jsonFieldsNameOfCreateUser = [3]string{ 0: "username", 1: "display_name", + 2: "password", } // Decode decodes CreateUser from json. @@ -571,6 +576,18 @@ func (s *CreateUser) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"display_name\"") } + case "password": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + v, err := d.Str() + s.Password = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"password\"") + } default: return errors.Errorf("unexpected field %q", k) } @@ -581,7 +598,7 @@ func (s *CreateUser) Decode(d *jx.Decoder) error { // Validate required fields. var failures []validate.FieldError for i, mask := range [1]uint8{ - 0b00000011, + 0b00000111, } { if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { // Mask only required fields and check equality to mask using XOR. @@ -1366,6 +1383,151 @@ func (s *NilString) UnmarshalJSON(data []byte) error { return s.Decode(d) } +// Encode implements json.Marshaler. +func (s *Session) Encode(e *jx.Encoder) { + e.ObjStart() + s.encodeFields(e) + e.ObjEnd() +} + +// encodeFields encodes fields. +func (s *Session) encodeFields(e *jx.Encoder) { + { + e.FieldStart("token") + e.Str(s.Token) + } + { + e.FieldStart("token_type") + e.Str("Bearer") + } + { + e.FieldStart("expires_at") + json.EncodeDateTime(e, s.ExpiresAt) + } + { + e.FieldStart("user") + s.User.Encode(e) + } +} + +var jsonFieldsNameOfSession = [4]string{ + 0: "token", + 1: "token_type", + 2: "expires_at", + 3: "user", +} + +// Decode decodes Session from json. +func (s *Session) Decode(d *jx.Decoder) error { + if s == nil { + return errors.New("invalid: unable to decode Session to nil") + } + var requiredBitSet [1]uint8 + + if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { + switch string(k) { + case "token": + requiredBitSet[0] |= 1 << 0 + if err := func() error { + v, err := d.Str() + s.Token = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"token\"") + } + case "token_type": + requiredBitSet[0] |= 1 << 1 + if err := func() error { + v, err := d.Str() + s.TokenType = string(v) + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"token_type\"") + } + case "expires_at": + requiredBitSet[0] |= 1 << 2 + if err := func() error { + v, err := json.DecodeDateTime(d) + s.ExpiresAt = v + if err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"expires_at\"") + } + case "user": + requiredBitSet[0] |= 1 << 3 + if err := func() error { + if err := s.User.Decode(d); err != nil { + return err + } + return nil + }(); err != nil { + return errors.Wrap(err, "decode field \"user\"") + } + default: + return errors.Errorf("unexpected field %q", k) + } + return nil + }); err != nil { + return errors.Wrap(err, "decode Session") + } + // Validate required fields. + var failures []validate.FieldError + for i, mask := range [1]uint8{ + 0b00001111, + } { + if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { + // Mask only required fields and check equality to mask using XOR. + // + // If XOR result is not zero, result is not equal to expected, so some fields are missed. + // Bits of fields which would be set are actually bits of missed fields. + missed := bits.OnesCount8(result) + for bitN := 0; bitN < missed; bitN++ { + bitIdx := bits.TrailingZeros8(result) + fieldIdx := i*8 + bitIdx + var name string + if fieldIdx < len(jsonFieldsNameOfSession) { + name = jsonFieldsNameOfSession[fieldIdx] + } else { + name = strconv.Itoa(fieldIdx) + } + failures = append(failures, validate.FieldError{ + Name: name, + Error: validate.ErrFieldRequired, + }) + // Reset bit. + result &^= 1 << bitIdx + } + } + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + + return nil +} + +// MarshalJSON implements stdjson.Marshaler. +func (s *Session) MarshalJSON() ([]byte, error) { + e := jx.Encoder{} + s.Encode(&e) + return e.Bytes(), nil +} + +// UnmarshalJSON implements stdjson.Unmarshaler. +func (s *Session) UnmarshalJSON(data []byte) error { + d := jx.DecodeBytes(data) + return s.Decode(d) +} + // Encode implements json.Marshaler. func (s *User) Encode(e *jx.Encoder) { e.ObjStart() diff --git a/internal/transport/rest/oas/oas_middleware_gen.go b/internal/transport/rest/internal/oas/oas_middleware_gen.go similarity index 100% rename from internal/transport/rest/oas/oas_middleware_gen.go rename to internal/transport/rest/internal/oas/oas_middleware_gen.go diff --git a/internal/transport/rest/oas/oas_operations_gen.go b/internal/transport/rest/internal/oas/oas_operations_gen.go similarity index 84% rename from internal/transport/rest/oas/oas_operations_gen.go rename to internal/transport/rest/internal/oas/oas_operations_gen.go index f99a17ac..b182d0a6 100644 --- a/internal/transport/rest/oas/oas_operations_gen.go +++ b/internal/transport/rest/internal/oas/oas_operations_gen.go @@ -8,6 +8,7 @@ type OperationName = string const ( CreateChatOperation OperationName = "CreateChat" CreateMessageOperation OperationName = "CreateMessage" + CreateSessionOperation OperationName = "CreateSession" CurrentUserOperation OperationName = "CurrentUser" GetChatOperation OperationName = "GetChat" ListChatsOperation OperationName = "ListChats" @@ -15,4 +16,5 @@ const ( LivenessOperation OperationName = "Liveness" ReadinessOperation OperationName = "Readiness" RegisterUserOperation OperationName = "RegisterUser" + RevokeSessionOperation OperationName = "RevokeSession" ) diff --git a/internal/transport/rest/oas/oas_parameters_gen.go b/internal/transport/rest/internal/oas/oas_parameters_gen.go similarity index 100% rename from internal/transport/rest/oas/oas_parameters_gen.go rename to internal/transport/rest/internal/oas/oas_parameters_gen.go diff --git a/internal/transport/rest/oas/oas_request_decoders_gen.go b/internal/transport/rest/internal/oas/oas_request_decoders_gen.go similarity index 100% rename from internal/transport/rest/oas/oas_request_decoders_gen.go rename to internal/transport/rest/internal/oas/oas_request_decoders_gen.go diff --git a/internal/transport/rest/oas/oas_response_encoders_gen.go b/internal/transport/rest/internal/oas/oas_response_encoders_gen.go similarity index 82% rename from internal/transport/rest/oas/oas_response_encoders_gen.go rename to internal/transport/rest/internal/oas/oas_response_encoders_gen.go index 95a2f78b..99a96f47 100644 --- a/internal/transport/rest/oas/oas_response_encoders_gen.go +++ b/internal/transport/rest/internal/oas/oas_response_encoders_gen.go @@ -77,7 +77,7 @@ func encodeCreateChatResponse(response CreateChatRes, w http.ResponseWriter) err return nil - case *ListChatsUnauthorizedHeaders: + case *CreateSessionUnauthorizedHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") w.Header().Set("Access-Control-Expose-Headers", "Www-Authenticate,X-Request-Id") // Encoding response headers. @@ -188,7 +188,7 @@ func encodeCreateChatResponse(response CreateChatRes, w http.ResponseWriter) err return nil - case *ListChatsTooManyRequestsHeaders: + case *CreateSessionTooManyRequestsHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Request-Id") // Encoding response headers. @@ -370,7 +370,7 @@ func encodeCreateMessageResponse(response CreateMessageRes, w http.ResponseWrite return nil - case *ListChatsUnauthorizedHeaders: + case *CreateSessionUnauthorizedHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") w.Header().Set("Access-Control-Expose-Headers", "Www-Authenticate,X-Request-Id") // Encoding response headers. @@ -481,7 +481,7 @@ func encodeCreateMessageResponse(response CreateMessageRes, w http.ResponseWrite return nil - case *ListChatsTooManyRequestsHeaders: + case *CreateSessionTooManyRequestsHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Request-Id") // Encoding response headers. @@ -597,6 +597,235 @@ func encodeCreateMessageResponse(response CreateMessageRes, w http.ResponseWrite } } +func encodeCreateSessionResponse(response CreateSessionRes, w http.ResponseWriter) error { + switch response := response.(type) { + case *SessionHeaders: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(201) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *CreateSessionBadRequest: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(400) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *CreateSessionUnauthorizedHeaders: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "Www-Authenticate,X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "WWW-Authenticate" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "WWW-Authenticate", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.WWWAuthenticate.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode WWW-Authenticate header") + } + } + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(401) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *CreateSessionTooManyRequestsHeaders: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "Retry-After" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "Retry-After", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.RetryAfter.Get(); ok { + return e.EncodeValue(conv.IntToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode Retry-After header") + } + } + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(429) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *CreateSessionInternalServerError: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(500) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *CreateSessionServiceUnavailable: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(503) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + default: + return errors.Errorf("unexpected response type: %T", response) + } +} + func encodeCurrentUserResponse(response CurrentUserRes, w http.ResponseWriter) error { switch response := response.(type) { case *UserHeaders: @@ -663,7 +892,7 @@ func encodeCurrentUserResponse(response CurrentUserRes, w http.ResponseWriter) e return nil - case *ListChatsUnauthorizedHeaders: + case *CreateSessionUnauthorizedHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") w.Header().Set("Access-Control-Expose-Headers", "Www-Authenticate,X-Request-Id") // Encoding response headers. @@ -774,7 +1003,7 @@ func encodeCurrentUserResponse(response CurrentUserRes, w http.ResponseWriter) e return nil - case *ListChatsTooManyRequestsHeaders: + case *CreateSessionTooManyRequestsHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Request-Id") // Encoding response headers. @@ -956,7 +1185,7 @@ func encodeGetChatResponse(response GetChatRes, w http.ResponseWriter) error { return nil - case *ListChatsUnauthorizedHeaders: + case *CreateSessionUnauthorizedHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") w.Header().Set("Access-Control-Expose-Headers", "Www-Authenticate,X-Request-Id") // Encoding response headers. @@ -1067,7 +1296,7 @@ func encodeGetChatResponse(response GetChatRes, w http.ResponseWriter) error { return nil - case *ListChatsTooManyRequestsHeaders: + case *CreateSessionTooManyRequestsHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Request-Id") // Encoding response headers. @@ -1249,7 +1478,7 @@ func encodeListChatsResponse(response ListChatsRes, w http.ResponseWriter) error return nil - case *ListChatsUnauthorizedHeaders: + case *CreateSessionUnauthorizedHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") w.Header().Set("Access-Control-Expose-Headers", "Www-Authenticate,X-Request-Id") // Encoding response headers. @@ -1360,7 +1589,7 @@ func encodeListChatsResponse(response ListChatsRes, w http.ResponseWriter) error return nil - case *ListChatsTooManyRequestsHeaders: + case *CreateSessionTooManyRequestsHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Request-Id") // Encoding response headers. @@ -1542,7 +1771,7 @@ func encodeListMessagesResponse(response ListMessagesRes, w http.ResponseWriter) return nil - case *ListChatsUnauthorizedHeaders: + case *CreateSessionUnauthorizedHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") w.Header().Set("Access-Control-Expose-Headers", "Www-Authenticate,X-Request-Id") // Encoding response headers. @@ -1653,7 +1882,7 @@ func encodeListMessagesResponse(response ListMessagesRes, w http.ResponseWriter) return nil - case *ListChatsTooManyRequestsHeaders: + case *CreateSessionTooManyRequestsHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Request-Id") // Encoding response headers. @@ -2041,7 +2270,7 @@ func encodeRegisterUserResponse(response RegisterUserRes, w http.ResponseWriter) return nil - case *ListChatsTooManyRequestsHeaders: + case *CreateSessionTooManyRequestsHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Request-Id") // Encoding response headers. @@ -2156,3 +2385,193 @@ func encodeRegisterUserResponse(response RegisterUserRes, w http.ResponseWriter) return errors.Errorf("unexpected response type: %T", response) } } + +func encodeRevokeSessionResponse(response RevokeSessionRes, w http.ResponseWriter) error { + switch response := response.(type) { + case *RevokeSessionNoContent: + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(204) + + return nil + + case *CreateSessionUnauthorizedHeaders: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "Www-Authenticate,X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "WWW-Authenticate" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "WWW-Authenticate", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.WWWAuthenticate.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode WWW-Authenticate header") + } + } + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(401) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *CreateSessionTooManyRequestsHeaders: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "Retry-After" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "Retry-After", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.RetryAfter.Get(); ok { + return e.EncodeValue(conv.IntToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode Retry-After header") + } + } + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(429) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *RevokeSessionInternalServerError: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(500) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + case *RevokeSessionServiceUnavailable: + w.Header().Set("Content-Type", "application/json; charset=utf-8") + w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + // Encoding response headers. + { + h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Request-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Request-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XRequestID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Request-Id header") + } + } + } + w.WriteHeader(503) + + e := new(jx.Encoder) + response.Response.Encode(e) + if _, err := e.WriteTo(w); err != nil { + return errors.Wrap(err, "write") + } + + return nil + + default: + return errors.Errorf("unexpected response type: %T", response) + } +} diff --git a/internal/transport/rest/oas/oas_router_gen.go b/internal/transport/rest/internal/oas/oas_router_gen.go similarity index 82% rename from internal/transport/rest/oas/oas_router_gen.go rename to internal/transport/rest/internal/oas/oas_router_gen.go index 4df54e48..d8507fb0 100644 --- a/internal/transport/rest/oas/oas_router_gen.go +++ b/internal/transport/rest/internal/oas/oas_router_gen.go @@ -11,22 +11,28 @@ import ( ) var ( + rn6AllowedHeaders = map[string]string{ + "POST": "Authorization", + } + rn13AllowedHeaders = map[string]string{ + "DELETE": "Authorization", + } rn1AllowedHeaders = map[string]string{ - "GET": "X-User-Id", - "POST": "Content-Type,X-User-Id", + "GET": "Authorization", + "POST": "Authorization,Content-Type", } rn3AllowedHeaders = map[string]string{ - "GET": "X-User-Id", + "GET": "Authorization", } rn4AllowedHeaders = map[string]string{ - "GET": "X-User-Id", - "POST": "Content-Type,X-User-Id", + "GET": "Authorization", + "POST": "Authorization,Content-Type", } - rn11AllowedHeaders = map[string]string{ + rn12AllowedHeaders = map[string]string{ "POST": "Content-Type", } - rn6AllowedHeaders = map[string]string{ - "GET": "X-User-Id", + rn7AllowedHeaders = map[string]string{ + "GET": "Authorization", } ) @@ -93,6 +99,57 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { break } switch elem[0] { + case 'a': // Prefix: "auth/sessions" + + if l := len("auth/sessions"); len(elem) >= l && elem[0:l] == "auth/sessions" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + switch r.Method { + case "POST": + s.handleCreateSessionRequest([0]string{}, elemIsEscaped, w, r) + default: + s.notAllowed(w, r, notAllowedParams{ + allowedMethods: "POST", + allowedHeaders: rn6AllowedHeaders, + acceptPost: "", + acceptPatch: "", + }) + } + + return + } + switch elem[0] { + case '/': // Prefix: "/current" + + if l := len("/current"); len(elem) >= l && elem[0:l] == "/current" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + // Leaf node. + switch r.Method { + case "DELETE": + s.handleRevokeSessionRequest([0]string{}, elemIsEscaped, w, r) + default: + s.notAllowed(w, r, notAllowedParams{ + allowedMethods: "DELETE", + allowedHeaders: rn13AllowedHeaders, + acceptPost: "", + acceptPatch: "", + }) + } + + return + } + + } + case 'c': // Prefix: "chats" if l := len("chats"); len(elem) >= l && elem[0:l] == "chats" { @@ -204,7 +261,7 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { default: s.notAllowed(w, r, notAllowedParams{ allowedMethods: "POST", - allowedHeaders: rn11AllowedHeaders, + allowedHeaders: rn12AllowedHeaders, acceptPost: "application/json", acceptPatch: "", }) @@ -229,7 +286,7 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { default: s.notAllowed(w, r, notAllowedParams{ allowedMethods: "GET", - allowedHeaders: rn6AllowedHeaders, + allowedHeaders: rn7AllowedHeaders, acceptPost: "", acceptPatch: "", }) @@ -418,6 +475,57 @@ func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool) { break } switch elem[0] { + case 'a': // Prefix: "auth/sessions" + + if l := len("auth/sessions"); len(elem) >= l && elem[0:l] == "auth/sessions" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + switch method { + case "POST": + r.name = CreateSessionOperation + r.summary = "Вход: Basic username:password; выдаёт сессию" + r.operationID = "createSession" + r.operationGroup = "" + r.pathPattern = "/api/v1/auth/sessions" + r.args = args + r.count = 0 + return r, true + default: + return + } + } + switch elem[0] { + case '/': // Prefix: "/current" + + if l := len("/current"); len(elem) >= l && elem[0:l] == "/current" { + elem = elem[l:] + } else { + break + } + + if len(elem) == 0 { + // Leaf node. + switch method { + case "DELETE": + r.name = RevokeSessionOperation + r.summary = "Отозвать текущую сессию" + r.operationID = "revokeSession" + r.operationGroup = "" + r.pathPattern = "/api/v1/auth/sessions/current" + r.args = args + r.count = 0 + return r, true + default: + return + } + } + + } + case 'c': // Prefix: "chats" if l := len("chats"); len(elem) >= l && elem[0:l] == "chats" { diff --git a/internal/transport/rest/oas/oas_schemas_gen.go b/internal/transport/rest/internal/oas/oas_schemas_gen.go similarity index 78% rename from internal/transport/rest/oas/oas_schemas_gen.go rename to internal/transport/rest/internal/oas/oas_schemas_gen.go index e51d1457..bdc42243 100644 --- a/internal/transport/rest/oas/oas_schemas_gen.go +++ b/internal/transport/rest/internal/oas/oas_schemas_gen.go @@ -9,6 +9,67 @@ import ( "github.com/google/uuid" ) +type BasicAuth struct { + Username string + Password string + Roles []string +} + +// GetUsername returns the value of Username. +func (s *BasicAuth) GetUsername() string { + return s.Username +} + +// GetPassword returns the value of Password. +func (s *BasicAuth) GetPassword() string { + return s.Password +} + +// GetRoles returns the value of Roles. +func (s *BasicAuth) GetRoles() []string { + return s.Roles +} + +// SetUsername sets the value of Username. +func (s *BasicAuth) SetUsername(val string) { + s.Username = val +} + +// SetPassword sets the value of Password. +func (s *BasicAuth) SetPassword(val string) { + s.Password = val +} + +// SetRoles sets the value of Roles. +func (s *BasicAuth) SetRoles(val []string) { + s.Roles = val +} + +type BearerAuth struct { + Token string + Roles []string +} + +// GetToken returns the value of Token. +func (s *BearerAuth) GetToken() string { + return s.Token +} + +// GetRoles returns the value of Roles. +func (s *BearerAuth) GetRoles() []string { + return s.Roles +} + +// SetToken sets the value of Token. +func (s *BearerAuth) SetToken(val string) { + s.Token = val +} + +// SetRoles sets the value of Roles. +func (s *BearerAuth) SetRoles(val []string) { + s.Roles = val +} + // Ref: #/components/schemas/Chat type Chat struct { ID uuid.UUID `json:"id"` @@ -221,10 +282,116 @@ type CreateMessageServiceUnavailable ErrorHeaders func (*CreateMessageServiceUnavailable) createMessageRes() {} +type CreateSessionBadRequest ErrorHeaders + +func (*CreateSessionBadRequest) createSessionRes() {} + +type CreateSessionInternalServerError ErrorHeaders + +func (*CreateSessionInternalServerError) createSessionRes() {} + +type CreateSessionServiceUnavailable ErrorHeaders + +func (*CreateSessionServiceUnavailable) createSessionRes() {} + +// CreateSessionTooManyRequestsHeaders wraps Error with response headers. +type CreateSessionTooManyRequestsHeaders struct { + RetryAfter OptInt + XRequestID OptString + Response Error +} + +// GetRetryAfter returns the value of RetryAfter. +func (s *CreateSessionTooManyRequestsHeaders) GetRetryAfter() OptInt { + return s.RetryAfter +} + +// GetXRequestID returns the value of XRequestID. +func (s *CreateSessionTooManyRequestsHeaders) GetXRequestID() OptString { + return s.XRequestID +} + +// GetResponse returns the value of Response. +func (s *CreateSessionTooManyRequestsHeaders) GetResponse() Error { + return s.Response +} + +// SetRetryAfter sets the value of RetryAfter. +func (s *CreateSessionTooManyRequestsHeaders) SetRetryAfter(val OptInt) { + s.RetryAfter = val +} + +// SetXRequestID sets the value of XRequestID. +func (s *CreateSessionTooManyRequestsHeaders) SetXRequestID(val OptString) { + s.XRequestID = val +} + +// SetResponse sets the value of Response. +func (s *CreateSessionTooManyRequestsHeaders) SetResponse(val Error) { + s.Response = val +} + +func (*CreateSessionTooManyRequestsHeaders) createChatRes() {} +func (*CreateSessionTooManyRequestsHeaders) createMessageRes() {} +func (*CreateSessionTooManyRequestsHeaders) createSessionRes() {} +func (*CreateSessionTooManyRequestsHeaders) currentUserRes() {} +func (*CreateSessionTooManyRequestsHeaders) getChatRes() {} +func (*CreateSessionTooManyRequestsHeaders) listChatsRes() {} +func (*CreateSessionTooManyRequestsHeaders) listMessagesRes() {} +func (*CreateSessionTooManyRequestsHeaders) registerUserRes() {} +func (*CreateSessionTooManyRequestsHeaders) revokeSessionRes() {} + +// CreateSessionUnauthorizedHeaders wraps Error with response headers. +type CreateSessionUnauthorizedHeaders struct { + WWWAuthenticate OptString + XRequestID OptString + Response Error +} + +// GetWWWAuthenticate returns the value of WWWAuthenticate. +func (s *CreateSessionUnauthorizedHeaders) GetWWWAuthenticate() OptString { + return s.WWWAuthenticate +} + +// GetXRequestID returns the value of XRequestID. +func (s *CreateSessionUnauthorizedHeaders) GetXRequestID() OptString { + return s.XRequestID +} + +// GetResponse returns the value of Response. +func (s *CreateSessionUnauthorizedHeaders) GetResponse() Error { + return s.Response +} + +// SetWWWAuthenticate sets the value of WWWAuthenticate. +func (s *CreateSessionUnauthorizedHeaders) SetWWWAuthenticate(val OptString) { + s.WWWAuthenticate = val +} + +// SetXRequestID sets the value of XRequestID. +func (s *CreateSessionUnauthorizedHeaders) SetXRequestID(val OptString) { + s.XRequestID = val +} + +// SetResponse sets the value of Response. +func (s *CreateSessionUnauthorizedHeaders) SetResponse(val Error) { + s.Response = val +} + +func (*CreateSessionUnauthorizedHeaders) createChatRes() {} +func (*CreateSessionUnauthorizedHeaders) createMessageRes() {} +func (*CreateSessionUnauthorizedHeaders) createSessionRes() {} +func (*CreateSessionUnauthorizedHeaders) currentUserRes() {} +func (*CreateSessionUnauthorizedHeaders) getChatRes() {} +func (*CreateSessionUnauthorizedHeaders) listChatsRes() {} +func (*CreateSessionUnauthorizedHeaders) listMessagesRes() {} +func (*CreateSessionUnauthorizedHeaders) revokeSessionRes() {} + // Ref: #/components/schemas/CreateUser type CreateUser struct { Username string `json:"username"` DisplayName string `json:"display_name"` + Password string `json:"password"` } // GetUsername returns the value of Username. @@ -237,6 +404,11 @@ func (s *CreateUser) GetDisplayName() string { return s.DisplayName } +// GetPassword returns the value of Password. +func (s *CreateUser) GetPassword() string { + return s.Password +} + // SetUsername sets the value of Username. func (s *CreateUser) SetUsername(val string) { s.Username = val @@ -247,6 +419,11 @@ func (s *CreateUser) SetDisplayName(val string) { s.DisplayName = val } +// SetPassword sets the value of Password. +func (s *CreateUser) SetPassword(val string) { + s.Password = val +} + type CurrentUserBadRequest ErrorHeaders func (*CurrentUserBadRequest) currentUserRes() {} @@ -267,31 +444,6 @@ type CurrentUserServiceUnavailable ErrorHeaders func (*CurrentUserServiceUnavailable) currentUserRes() {} -type DevUser struct { - APIKey string - Roles []string -} - -// GetAPIKey returns the value of APIKey. -func (s *DevUser) GetAPIKey() string { - return s.APIKey -} - -// GetRoles returns the value of Roles. -func (s *DevUser) GetRoles() []string { - return s.Roles -} - -// SetAPIKey sets the value of APIKey. -func (s *DevUser) SetAPIKey(val string) { - s.APIKey = val -} - -// SetRoles sets the value of Roles. -func (s *DevUser) SetRoles(val []string) { - s.Roles = val -} - // Ref: #/components/schemas/Error type Error struct { Error ErrorError `json:"error"` @@ -579,95 +731,6 @@ type ListChatsServiceUnavailable ErrorHeaders func (*ListChatsServiceUnavailable) listChatsRes() {} -// ListChatsTooManyRequestsHeaders wraps Error with response headers. -type ListChatsTooManyRequestsHeaders struct { - RetryAfter OptInt - XRequestID OptString - Response Error -} - -// GetRetryAfter returns the value of RetryAfter. -func (s *ListChatsTooManyRequestsHeaders) GetRetryAfter() OptInt { - return s.RetryAfter -} - -// GetXRequestID returns the value of XRequestID. -func (s *ListChatsTooManyRequestsHeaders) GetXRequestID() OptString { - return s.XRequestID -} - -// GetResponse returns the value of Response. -func (s *ListChatsTooManyRequestsHeaders) GetResponse() Error { - return s.Response -} - -// SetRetryAfter sets the value of RetryAfter. -func (s *ListChatsTooManyRequestsHeaders) SetRetryAfter(val OptInt) { - s.RetryAfter = val -} - -// SetXRequestID sets the value of XRequestID. -func (s *ListChatsTooManyRequestsHeaders) SetXRequestID(val OptString) { - s.XRequestID = val -} - -// SetResponse sets the value of Response. -func (s *ListChatsTooManyRequestsHeaders) SetResponse(val Error) { - s.Response = val -} - -func (*ListChatsTooManyRequestsHeaders) createChatRes() {} -func (*ListChatsTooManyRequestsHeaders) createMessageRes() {} -func (*ListChatsTooManyRequestsHeaders) currentUserRes() {} -func (*ListChatsTooManyRequestsHeaders) getChatRes() {} -func (*ListChatsTooManyRequestsHeaders) listChatsRes() {} -func (*ListChatsTooManyRequestsHeaders) listMessagesRes() {} -func (*ListChatsTooManyRequestsHeaders) registerUserRes() {} - -// ListChatsUnauthorizedHeaders wraps Error with response headers. -type ListChatsUnauthorizedHeaders struct { - WWWAuthenticate OptString - XRequestID OptString - Response Error -} - -// GetWWWAuthenticate returns the value of WWWAuthenticate. -func (s *ListChatsUnauthorizedHeaders) GetWWWAuthenticate() OptString { - return s.WWWAuthenticate -} - -// GetXRequestID returns the value of XRequestID. -func (s *ListChatsUnauthorizedHeaders) GetXRequestID() OptString { - return s.XRequestID -} - -// GetResponse returns the value of Response. -func (s *ListChatsUnauthorizedHeaders) GetResponse() Error { - return s.Response -} - -// SetWWWAuthenticate sets the value of WWWAuthenticate. -func (s *ListChatsUnauthorizedHeaders) SetWWWAuthenticate(val OptString) { - s.WWWAuthenticate = val -} - -// SetXRequestID sets the value of XRequestID. -func (s *ListChatsUnauthorizedHeaders) SetXRequestID(val OptString) { - s.XRequestID = val -} - -// SetResponse sets the value of Response. -func (s *ListChatsUnauthorizedHeaders) SetResponse(val Error) { - s.Response = val -} - -func (*ListChatsUnauthorizedHeaders) createChatRes() {} -func (*ListChatsUnauthorizedHeaders) createMessageRes() {} -func (*ListChatsUnauthorizedHeaders) currentUserRes() {} -func (*ListChatsUnauthorizedHeaders) getChatRes() {} -func (*ListChatsUnauthorizedHeaders) listChatsRes() {} -func (*ListChatsUnauthorizedHeaders) listMessagesRes() {} - type ListMessagesBadRequest ErrorHeaders func (*ListMessagesBadRequest) listMessagesRes() {} @@ -990,6 +1053,107 @@ type RegisterUserServiceUnavailable ErrorHeaders func (*RegisterUserServiceUnavailable) registerUserRes() {} +type RevokeSessionInternalServerError ErrorHeaders + +func (*RevokeSessionInternalServerError) revokeSessionRes() {} + +// RevokeSessionNoContent is response for RevokeSession operation. +type RevokeSessionNoContent struct { + XRequestID OptString +} + +// GetXRequestID returns the value of XRequestID. +func (s *RevokeSessionNoContent) GetXRequestID() OptString { + return s.XRequestID +} + +// SetXRequestID sets the value of XRequestID. +func (s *RevokeSessionNoContent) SetXRequestID(val OptString) { + s.XRequestID = val +} + +func (*RevokeSessionNoContent) revokeSessionRes() {} + +type RevokeSessionServiceUnavailable ErrorHeaders + +func (*RevokeSessionServiceUnavailable) revokeSessionRes() {} + +// Ref: #/components/schemas/Session +type Session struct { + Token string `json:"token"` + TokenType string `json:"token_type"` + ExpiresAt time.Time `json:"expires_at"` + User User `json:"user"` +} + +// GetToken returns the value of Token. +func (s *Session) GetToken() string { + return s.Token +} + +// GetTokenType returns the value of TokenType. +func (s *Session) GetTokenType() string { + return s.TokenType +} + +// GetExpiresAt returns the value of ExpiresAt. +func (s *Session) GetExpiresAt() time.Time { + return s.ExpiresAt +} + +// GetUser returns the value of User. +func (s *Session) GetUser() User { + return s.User +} + +// SetToken sets the value of Token. +func (s *Session) SetToken(val string) { + s.Token = val +} + +// SetTokenType sets the value of TokenType. +func (s *Session) SetTokenType(val string) { + s.TokenType = val +} + +// SetExpiresAt sets the value of ExpiresAt. +func (s *Session) SetExpiresAt(val time.Time) { + s.ExpiresAt = val +} + +// SetUser sets the value of User. +func (s *Session) SetUser(val User) { + s.User = val +} + +// SessionHeaders wraps Session with response headers. +type SessionHeaders struct { + XRequestID OptString + Response Session +} + +// GetXRequestID returns the value of XRequestID. +func (s *SessionHeaders) GetXRequestID() OptString { + return s.XRequestID +} + +// GetResponse returns the value of Response. +func (s *SessionHeaders) GetResponse() Session { + return s.Response +} + +// SetXRequestID sets the value of XRequestID. +func (s *SessionHeaders) SetXRequestID(val OptString) { + s.XRequestID = val +} + +// SetResponse sets the value of Response. +func (s *SessionHeaders) SetResponse(val Session) { + s.Response = val +} + +func (*SessionHeaders) createSessionRes() {} + // Ref: #/components/schemas/User type User struct { ID uuid.UUID `json:"id"` diff --git a/internal/transport/rest/internal/oas/oas_security_gen.go b/internal/transport/rest/internal/oas/oas_security_gen.go new file mode 100644 index 00000000..60303072 --- /dev/null +++ b/internal/transport/rest/internal/oas/oas_security_gen.go @@ -0,0 +1,131 @@ +// Code generated by ogen, DO NOT EDIT. + +package oas + +import ( + "context" + "net/http" + "strings" + + "github.com/go-faster/errors" + "github.com/ogen-go/ogen/ogenerrors" +) + +// SecurityHandler is handler for security parameters. +type SecurityHandler interface { + // HandleBasicAuth handles basicAuth security. + HandleBasicAuth(ctx context.Context, operationName OperationName, t BasicAuth) (context.Context, error) + // HandleBearerAuth handles bearerAuth security. + HandleBearerAuth(ctx context.Context, operationName OperationName, t BearerAuth) (context.Context, error) +} + +func findAuthorization(h http.Header, prefix string) (string, bool) { + v, ok := h["Authorization"] + if !ok { + return "", false + } + for _, vv := range v { + scheme, value, ok := strings.Cut(vv, " ") + if !ok || !strings.EqualFold(scheme, prefix) { + continue + } + return value, true + } + return "", false +} + +// operationRolesBasicAuth is a private map storing roles per operation. +var operationRolesBasicAuth = map[string][]string{ + CreateSessionOperation: []string{}, +} + +// GetRolesForBasicAuth returns the required roles for the given operation. +// +// This is useful for authorization scenarios where you need to know which roles +// are required for an operation. +// +// Example: +// +// requiredRoles := GetRolesForBasicAuth(AddPetOperation) +// +// Returns nil if the operation has no role requirements or if the operation is unknown. +func GetRolesForBasicAuth(operation string) []string { + roles, ok := operationRolesBasicAuth[operation] + if !ok { + return nil + } + // Return a copy to prevent external modification + result := make([]string, len(roles)) + copy(result, roles) + return result +} + +// operationRolesBearerAuth is a private map storing roles per operation. +var operationRolesBearerAuth = map[string][]string{ + CreateChatOperation: []string{}, + CreateMessageOperation: []string{}, + CurrentUserOperation: []string{}, + GetChatOperation: []string{}, + ListChatsOperation: []string{}, + ListMessagesOperation: []string{}, + RevokeSessionOperation: []string{}, +} + +// GetRolesForBearerAuth returns the required roles for the given operation. +// +// This is useful for authorization scenarios where you need to know which roles +// are required for an operation. +// +// Example: +// +// requiredRoles := GetRolesForBearerAuth(AddPetOperation) +// +// Returns nil if the operation has no role requirements or if the operation is unknown. +func GetRolesForBearerAuth(operation string) []string { + roles, ok := operationRolesBearerAuth[operation] + if !ok { + return nil + } + // Return a copy to prevent external modification + result := make([]string, len(roles)) + copy(result, roles) + return result +} + +func (s *Server) securityBasicAuth(ctx context.Context, operationName OperationName, req *http.Request) (context.Context, bool, error) { + var t BasicAuth + if _, ok := findAuthorization(req.Header, "Basic"); !ok { + return ctx, false, nil + } + username, password, ok := req.BasicAuth() + if !ok { + return nil, false, errors.New("invalid basic auth") + } + t.Username = username + t.Password = password + t.Roles = operationRolesBasicAuth[operationName] + rctx, err := s.sec.HandleBasicAuth(ctx, operationName, t) + if errors.Is(err, ogenerrors.ErrSkipServerSecurity) { + return nil, false, nil + } else if err != nil { + return nil, false, err + } + return rctx, true, err +} + +func (s *Server) securityBearerAuth(ctx context.Context, operationName OperationName, req *http.Request) (context.Context, bool, error) { + var t BearerAuth + token, ok := findAuthorization(req.Header, "Bearer") + if !ok { + return ctx, false, nil + } + t.Token = token + t.Roles = operationRolesBearerAuth[operationName] + rctx, err := s.sec.HandleBearerAuth(ctx, operationName, t) + if errors.Is(err, ogenerrors.ErrSkipServerSecurity) { + return nil, false, nil + } else if err != nil { + return nil, false, err + } + return rctx, true, err +} diff --git a/internal/transport/rest/oas/oas_server_gen.go b/internal/transport/rest/internal/oas/oas_server_gen.go similarity index 85% rename from internal/transport/rest/oas/oas_server_gen.go rename to internal/transport/rest/internal/oas/oas_server_gen.go index 2ac3bf86..93463c13 100644 --- a/internal/transport/rest/oas/oas_server_gen.go +++ b/internal/transport/rest/internal/oas/oas_server_gen.go @@ -20,6 +20,12 @@ type Handler interface { // // POST /api/v1/chats/{chat_id}/messages CreateMessage(ctx context.Context, req *CreateMessage, params CreateMessageParams) (CreateMessageRes, error) + // CreateSession implements createSession operation. + // + // Вход: Basic username:password; выдаёт сессию. + // + // POST /api/v1/auth/sessions + CreateSession(ctx context.Context) (CreateSessionRes, error) // CurrentUser implements currentUser operation. // // Текущий пользователь. @@ -62,6 +68,12 @@ type Handler interface { // // POST /api/v1/users RegisterUser(ctx context.Context, req *CreateUser) (RegisterUserRes, error) + // RevokeSession implements revokeSession operation. + // + // Отозвать текущую сессию. + // + // DELETE /api/v1/auth/sessions/current + RevokeSession(ctx context.Context) (RevokeSessionRes, error) } // Server implements http server based on OpenAPI v3 specification and diff --git a/internal/transport/rest/oas/oas_unimplemented_gen.go b/internal/transport/rest/internal/oas/oas_unimplemented_gen.go similarity index 82% rename from internal/transport/rest/oas/oas_unimplemented_gen.go rename to internal/transport/rest/internal/oas/oas_unimplemented_gen.go index c4903fce..7d2dc7e1 100644 --- a/internal/transport/rest/oas/oas_unimplemented_gen.go +++ b/internal/transport/rest/internal/oas/oas_unimplemented_gen.go @@ -31,6 +31,15 @@ func (UnimplementedHandler) CreateMessage(ctx context.Context, req *CreateMessag return r, ht.ErrNotImplemented } +// CreateSession implements createSession operation. +// +// Вход: Basic username:password; выдаёт сессию. +// +// POST /api/v1/auth/sessions +func (UnimplementedHandler) CreateSession(ctx context.Context) (r CreateSessionRes, _ error) { + return r, ht.ErrNotImplemented +} + // CurrentUser implements currentUser operation. // // Текущий пользователь. @@ -93,3 +102,12 @@ func (UnimplementedHandler) Readiness(ctx context.Context) (r ReadinessRes, _ er func (UnimplementedHandler) RegisterUser(ctx context.Context, req *CreateUser) (r RegisterUserRes, _ error) { return r, ht.ErrNotImplemented } + +// RevokeSession implements revokeSession operation. +// +// Отозвать текущую сессию. +// +// DELETE /api/v1/auth/sessions/current +func (UnimplementedHandler) RevokeSession(ctx context.Context) (r RevokeSessionRes, _ error) { + return r, ht.ErrNotImplemented +} diff --git a/internal/transport/rest/oas/oas_validators_gen.go b/internal/transport/rest/internal/oas/oas_validators_gen.go similarity index 86% rename from internal/transport/rest/oas/oas_validators_gen.go rename to internal/transport/rest/internal/oas/oas_validators_gen.go index bc5ac737..442acf1d 100644 --- a/internal/transport/rest/oas/oas_validators_gen.go +++ b/internal/transport/rest/internal/oas/oas_validators_gen.go @@ -384,6 +384,164 @@ func (s *CreateMessageServiceUnavailable) Validate() error { return nil } +func (s *CreateSessionBadRequest) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *CreateSessionInternalServerError) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *CreateSessionServiceUnavailable) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *CreateSessionTooManyRequestsHeaders) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if value, ok := s.RetryAfter.Get(); ok { + if err := func() error { + if err := (validate.Int{ + MinSet: true, + Min: 1, + MaxSet: false, + Max: 0, + MinExclusive: false, + MaxExclusive: false, + MultipleOfSet: false, + MultipleOf: 0, + Pattern: nil, + }).Validate(int64(value)); err != nil { + return errors.Wrap(err, "int") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "RetryAfter", + Error: err, + }) + } + if err := func() error { + if value, ok := s.XRequestID.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "XRequestID", + Error: err, + }) + } + if err := func() error { + if err := s.Response.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "Response", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s *CreateSessionUnauthorizedHeaders) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if value, ok := s.XRequestID.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "XRequestID", + Error: err, + }) + } + if err := func() error { + if err := s.Response.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "Response", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + func (s *CreateUser) Validate() error { if s == nil { return validate.ErrNilPointer @@ -436,6 +594,29 @@ func (s *CreateUser) Validate() error { Error: err, }) } + if err := func() error { + if err := (validate.String{ + MinLength: 12, + MinLengthSet: true, + MaxLength: 128, + MaxLengthSet: true, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(s.Password)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "password", + Error: err, + }) + } if len(failures) > 0 { return &validate.Error{Fields: failures} } @@ -817,140 +998,6 @@ func (s *ListChatsServiceUnavailable) Validate() error { return nil } -func (s *ListChatsTooManyRequestsHeaders) Validate() error { - if s == nil { - return validate.ErrNilPointer - } - - var failures []validate.FieldError - if err := func() error { - if value, ok := s.RetryAfter.Get(); ok { - if err := func() error { - if err := (validate.Int{ - MinSet: true, - Min: 1, - MaxSet: false, - Max: 0, - MinExclusive: false, - MaxExclusive: false, - MultipleOfSet: false, - MultipleOf: 0, - Pattern: nil, - }).Validate(int64(value)); err != nil { - return errors.Wrap(err, "int") - } - return nil - }(); err != nil { - return err - } - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "RetryAfter", - Error: err, - }) - } - if err := func() error { - if value, ok := s.XRequestID.Get(); ok { - if err := func() error { - if err := (validate.String{ - MinLength: 1, - MinLengthSet: true, - MaxLength: 0, - MaxLengthSet: false, - Email: false, - Hostname: false, - Regex: nil, - MinNumeric: 0, - MinNumericSet: false, - MaxNumeric: 0, - MaxNumericSet: false, - }).Validate(string(value)); err != nil { - return errors.Wrap(err, "string") - } - return nil - }(); err != nil { - return err - } - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "XRequestID", - Error: err, - }) - } - if err := func() error { - if err := s.Response.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "Response", - Error: err, - }) - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil -} - -func (s *ListChatsUnauthorizedHeaders) Validate() error { - if s == nil { - return validate.ErrNilPointer - } - - var failures []validate.FieldError - if err := func() error { - if value, ok := s.XRequestID.Get(); ok { - if err := func() error { - if err := (validate.String{ - MinLength: 1, - MinLengthSet: true, - MaxLength: 0, - MaxLengthSet: false, - Email: false, - Hostname: false, - Regex: nil, - MinNumeric: 0, - MinNumericSet: false, - MaxNumeric: 0, - MaxNumericSet: false, - }).Validate(string(value)); err != nil { - return errors.Wrap(err, "string") - } - return nil - }(); err != nil { - return err - } - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "XRequestID", - Error: err, - }) - } - if err := func() error { - if err := s.Response.Validate(); err != nil { - return err - } - return nil - }(); err != nil { - failures = append(failures, validate.FieldError{ - Name: "Response", - Error: err, - }) - } - if len(failures) > 0 { - return &validate.Error{Fields: failures} - } - return nil -} - func (s *ListMessagesBadRequest) Validate() error { alias := (*ErrorHeaders)(s) if err := alias.Validate(); err != nil { @@ -1220,6 +1267,163 @@ func (s *RegisterUserServiceUnavailable) Validate() error { return nil } +func (s *RevokeSessionInternalServerError) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *RevokeSessionNoContent) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if value, ok := s.XRequestID.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "XRequestID", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s *RevokeSessionServiceUnavailable) Validate() error { + alias := (*ErrorHeaders)(s) + if err := alias.Validate(); err != nil { + return err + } + return nil +} + +func (s *Session) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if err := (validate.String{ + MinLength: 32, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(s.Token)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "token", + Error: err, + }) + } + if err := func() error { + if err := s.User.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "user", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + +func (s *SessionHeaders) Validate() error { + if s == nil { + return validate.ErrNilPointer + } + + var failures []validate.FieldError + if err := func() error { + if value, ok := s.XRequestID.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "XRequestID", + Error: err, + }) + } + if err := func() error { + if err := s.Response.Validate(); err != nil { + return err + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "Response", + Error: err, + }) + } + if len(failures) > 0 { + return &validate.Error{Fields: failures} + } + return nil +} + func (s *User) Validate() error { if s == nil { return validate.ErrNilPointer diff --git a/internal/transport/rest/logging.go b/internal/transport/rest/logging.go index dba9492c..ffb362b1 100644 --- a/internal/transport/rest/logging.go +++ b/internal/transport/rest/logging.go @@ -11,7 +11,7 @@ import ( "github.com/ogen-go/ogen/middleware" "github.com/ogen-go/ogen/ogenerrors" - "mtusi-messenger/internal/transport/rest/oas" + "mtusi-messenger/internal/transport/rest/internal/oas" ) func loggingMiddleware(log *slog.Logger) oas.Middleware { diff --git a/internal/transport/rest/logging_test.go b/internal/transport/rest/logging_test.go index 59e1e694..c0d8bf84 100644 --- a/internal/transport/rest/logging_test.go +++ b/internal/transport/rest/logging_test.go @@ -15,7 +15,7 @@ import ( "github.com/stretchr/testify/suite" "mtusi-messenger/internal/logger" - "mtusi-messenger/internal/transport/rest/oas" + "mtusi-messenger/internal/transport/rest/internal/oas" ) type LoggingSuite struct { diff --git a/internal/transport/rest/mocks/ChatService.go b/internal/transport/rest/mocks/ChatService.go new file mode 100644 index 00000000..09671a5e --- /dev/null +++ b/internal/transport/rest/mocks/ChatService.go @@ -0,0 +1,265 @@ +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify + +package mocks + +import ( + "context" + "mtusi-messenger/internal/domain" + + "github.com/google/uuid" + mock "github.com/stretchr/testify/mock" +) + +// NewMockChatService creates a new instance of MockChatService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockChatService(t interface { + mock.TestingT + Cleanup(func()) +}) *MockChatService { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + + mock := &MockChatService{} + mock.Mock.Test(t) + + t.Cleanup(func() { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + mock.AssertExpectations(t) + }) + + return mock +} + +// MockChatService is an autogenerated mock type for the ChatService type +type MockChatService struct { + mock.Mock +} + +type MockChatService_Expecter struct { + mock *mock.Mock +} + +func (_m *MockChatService) EXPECT() *MockChatService_Expecter { + return &MockChatService_Expecter{mock: &_m.Mock} +} + +// Create provides a mock function for the type MockChatService +func (_mock *MockChatService) Create(ctx context.Context, draft domain.ChatDraft) (domain.Chat, error) { + ret := _mock.Called(ctx, draft) + + if len(ret) == 0 { + panic("no return value specified for Create") + } + + var r0 domain.Chat + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, domain.ChatDraft) (domain.Chat, error)); ok { + return returnFunc(ctx, draft) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, domain.ChatDraft) domain.Chat); ok { + r0 = returnFunc(ctx, draft) + } else { + r0 = ret.Get(0).(domain.Chat) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, domain.ChatDraft) error); ok { + r1 = returnFunc(ctx, draft) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockChatService_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type MockChatService_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +// - draft domain.ChatDraft +func (_e *MockChatService_Expecter) Create(ctx any, draft any) *MockChatService_Create_Call { + return &MockChatService_Create_Call{Call: _e.mock.On("Create", ctx, draft)} +} + +func (_c *MockChatService_Create_Call) Run(run func(ctx context.Context, draft domain.ChatDraft)) *MockChatService_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 domain.ChatDraft + if args[1] != nil { + arg1 = args[1].(domain.ChatDraft) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockChatService_Create_Call) Return(chat domain.Chat, err error) *MockChatService_Create_Call { + _c.Call.Return(chat, err) + return _c +} + +func (_c *MockChatService_Create_Call) RunAndReturn(run func(ctx context.Context, draft domain.ChatDraft) (domain.Chat, error)) *MockChatService_Create_Call { + _c.Call.Return(run) + return _c +} + +// Get provides a mock function for the type MockChatService +func (_mock *MockChatService) Get(ctx context.Context, callerID uuid.UUID, chatID uuid.UUID) (domain.Chat, error) { + ret := _mock.Called(ctx, callerID, chatID) + + if len(ret) == 0 { + panic("no return value specified for Get") + } + + var r0 domain.Chat + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) (domain.Chat, error)); ok { + return returnFunc(ctx, callerID, chatID) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) domain.Chat); ok { + r0 = returnFunc(ctx, callerID, chatID) + } else { + r0 = ret.Get(0).(domain.Chat) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, uuid.UUID, uuid.UUID) error); ok { + r1 = returnFunc(ctx, callerID, chatID) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockChatService_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type MockChatService_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - ctx context.Context +// - callerID uuid.UUID +// - chatID uuid.UUID +func (_e *MockChatService_Expecter) Get(ctx any, callerID any, chatID any) *MockChatService_Get_Call { + return &MockChatService_Get_Call{Call: _e.mock.On("Get", ctx, callerID, chatID)} +} + +func (_c *MockChatService_Get_Call) Run(run func(ctx context.Context, callerID uuid.UUID, chatID uuid.UUID)) *MockChatService_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 uuid.UUID + if args[1] != nil { + arg1 = args[1].(uuid.UUID) + } + var arg2 uuid.UUID + if args[2] != nil { + arg2 = args[2].(uuid.UUID) + } + run( + arg0, + arg1, + arg2, + ) + }) + return _c +} + +func (_c *MockChatService_Get_Call) Return(chat domain.Chat, err error) *MockChatService_Get_Call { + _c.Call.Return(chat, err) + return _c +} + +func (_c *MockChatService_Get_Call) RunAndReturn(run func(ctx context.Context, callerID uuid.UUID, chatID uuid.UUID) (domain.Chat, error)) *MockChatService_Get_Call { + _c.Call.Return(run) + return _c +} + +// List provides a mock function for the type MockChatService +func (_mock *MockChatService) List(ctx context.Context, callerID uuid.UUID, after *domain.Cursor, limit int) (domain.Page[domain.Chat], error) { + ret := _mock.Called(ctx, callerID, after, limit) + + if len(ret) == 0 { + panic("no return value specified for List") + } + + var r0 domain.Page[domain.Chat] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, *domain.Cursor, int) (domain.Page[domain.Chat], error)); ok { + return returnFunc(ctx, callerID, after, limit) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, *domain.Cursor, int) domain.Page[domain.Chat]); ok { + r0 = returnFunc(ctx, callerID, after, limit) + } else { + r0 = ret.Get(0).(domain.Page[domain.Chat]) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, uuid.UUID, *domain.Cursor, int) error); ok { + r1 = returnFunc(ctx, callerID, after, limit) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockChatService_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' +type MockChatService_List_Call struct { + *mock.Call +} + +// List is a helper method to define mock.On call +// - ctx context.Context +// - callerID uuid.UUID +// - after *domain.Cursor +// - limit int +func (_e *MockChatService_Expecter) List(ctx any, callerID any, after any, limit any) *MockChatService_List_Call { + return &MockChatService_List_Call{Call: _e.mock.On("List", ctx, callerID, after, limit)} +} + +func (_c *MockChatService_List_Call) Run(run func(ctx context.Context, callerID uuid.UUID, after *domain.Cursor, limit int)) *MockChatService_List_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 uuid.UUID + if args[1] != nil { + arg1 = args[1].(uuid.UUID) + } + var arg2 *domain.Cursor + if args[2] != nil { + arg2 = args[2].(*domain.Cursor) + } + var arg3 int + if args[3] != nil { + arg3 = args[3].(int) + } + run( + arg0, + arg1, + arg2, + arg3, + ) + }) + return _c +} + +func (_c *MockChatService_List_Call) Return(page domain.Page[domain.Chat], err error) *MockChatService_List_Call { + _c.Call.Return(page, err) + return _c +} + +func (_c *MockChatService_List_Call) RunAndReturn(run func(ctx context.Context, callerID uuid.UUID, after *domain.Cursor, limit int) (domain.Page[domain.Chat], error)) *MockChatService_List_Call { + _c.Call.Return(run) + return _c +} diff --git a/internal/transport/rest/mocks/HealthChecker.go b/internal/transport/rest/mocks/HealthChecker.go new file mode 100644 index 00000000..a68e0f8f --- /dev/null +++ b/internal/transport/rest/mocks/HealthChecker.go @@ -0,0 +1,98 @@ +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify + +package mocks + +import ( + "context" + + mock "github.com/stretchr/testify/mock" +) + +// NewMockHealthChecker creates a new instance of MockHealthChecker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockHealthChecker(t interface { + mock.TestingT + Cleanup(func()) +}) *MockHealthChecker { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + + mock := &MockHealthChecker{} + mock.Mock.Test(t) + + t.Cleanup(func() { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + mock.AssertExpectations(t) + }) + + return mock +} + +// MockHealthChecker is an autogenerated mock type for the HealthChecker type +type MockHealthChecker struct { + mock.Mock +} + +type MockHealthChecker_Expecter struct { + mock *mock.Mock +} + +func (_m *MockHealthChecker) EXPECT() *MockHealthChecker_Expecter { + return &MockHealthChecker_Expecter{mock: &_m.Mock} +} + +// Ping provides a mock function for the type MockHealthChecker +func (_mock *MockHealthChecker) Ping(ctx context.Context) error { + ret := _mock.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for Ping") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { + r0 = returnFunc(ctx) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockHealthChecker_Ping_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ping' +type MockHealthChecker_Ping_Call struct { + *mock.Call +} + +// Ping is a helper method to define mock.On call +// - ctx context.Context +func (_e *MockHealthChecker_Expecter) Ping(ctx any) *MockHealthChecker_Ping_Call { + return &MockHealthChecker_Ping_Call{Call: _e.mock.On("Ping", ctx)} +} + +func (_c *MockHealthChecker_Ping_Call) Run(run func(ctx context.Context)) *MockHealthChecker_Ping_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + run( + arg0, + ) + }) + return _c +} + +func (_c *MockHealthChecker_Ping_Call) Return(err error) *MockHealthChecker_Ping_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockHealthChecker_Ping_Call) RunAndReturn(run func(ctx context.Context) error) *MockHealthChecker_Ping_Call { + _c.Call.Return(run) + return _c +} diff --git a/internal/transport/rest/mocks/MessageService.go b/internal/transport/rest/mocks/MessageService.go new file mode 100644 index 00000000..83fe84a8 --- /dev/null +++ b/internal/transport/rest/mocks/MessageService.go @@ -0,0 +1,199 @@ +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify + +package mocks + +import ( + "context" + "mtusi-messenger/internal/domain" + + "github.com/google/uuid" + mock "github.com/stretchr/testify/mock" +) + +// NewMockMessageService creates a new instance of MockMessageService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockMessageService(t interface { + mock.TestingT + Cleanup(func()) +}) *MockMessageService { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + + mock := &MockMessageService{} + mock.Mock.Test(t) + + t.Cleanup(func() { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + mock.AssertExpectations(t) + }) + + return mock +} + +// MockMessageService is an autogenerated mock type for the MessageService type +type MockMessageService struct { + mock.Mock +} + +type MockMessageService_Expecter struct { + mock *mock.Mock +} + +func (_m *MockMessageService) EXPECT() *MockMessageService_Expecter { + return &MockMessageService_Expecter{mock: &_m.Mock} +} + +// History provides a mock function for the type MockMessageService +func (_mock *MockMessageService) History(ctx context.Context, callerID uuid.UUID, chatID uuid.UUID, after *domain.Cursor, limit int) (domain.Page[domain.Message], error) { + ret := _mock.Called(ctx, callerID, chatID, after, limit) + + if len(ret) == 0 { + panic("no return value specified for History") + } + + var r0 domain.Page[domain.Message] + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID, *domain.Cursor, int) (domain.Page[domain.Message], error)); ok { + return returnFunc(ctx, callerID, chatID, after, limit) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID, *domain.Cursor, int) domain.Page[domain.Message]); ok { + r0 = returnFunc(ctx, callerID, chatID, after, limit) + } else { + r0 = ret.Get(0).(domain.Page[domain.Message]) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, uuid.UUID, uuid.UUID, *domain.Cursor, int) error); ok { + r1 = returnFunc(ctx, callerID, chatID, after, limit) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockMessageService_History_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'History' +type MockMessageService_History_Call struct { + *mock.Call +} + +// History is a helper method to define mock.On call +// - ctx context.Context +// - callerID uuid.UUID +// - chatID uuid.UUID +// - after *domain.Cursor +// - limit int +func (_e *MockMessageService_Expecter) History(ctx any, callerID any, chatID any, after any, limit any) *MockMessageService_History_Call { + return &MockMessageService_History_Call{Call: _e.mock.On("History", ctx, callerID, chatID, after, limit)} +} + +func (_c *MockMessageService_History_Call) Run(run func(ctx context.Context, callerID uuid.UUID, chatID uuid.UUID, after *domain.Cursor, limit int)) *MockMessageService_History_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 uuid.UUID + if args[1] != nil { + arg1 = args[1].(uuid.UUID) + } + var arg2 uuid.UUID + if args[2] != nil { + arg2 = args[2].(uuid.UUID) + } + var arg3 *domain.Cursor + if args[3] != nil { + arg3 = args[3].(*domain.Cursor) + } + var arg4 int + if args[4] != nil { + arg4 = args[4].(int) + } + run( + arg0, + arg1, + arg2, + arg3, + arg4, + ) + }) + return _c +} + +func (_c *MockMessageService_History_Call) Return(page domain.Page[domain.Message], err error) *MockMessageService_History_Call { + _c.Call.Return(page, err) + return _c +} + +func (_c *MockMessageService_History_Call) RunAndReturn(run func(ctx context.Context, callerID uuid.UUID, chatID uuid.UUID, after *domain.Cursor, limit int) (domain.Page[domain.Message], error)) *MockMessageService_History_Call { + _c.Call.Return(run) + return _c +} + +// Send provides a mock function for the type MockMessageService +func (_mock *MockMessageService) Send(ctx context.Context, draft domain.MessageDraft) (domain.Message, error) { + ret := _mock.Called(ctx, draft) + + if len(ret) == 0 { + panic("no return value specified for Send") + } + + var r0 domain.Message + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, domain.MessageDraft) (domain.Message, error)); ok { + return returnFunc(ctx, draft) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, domain.MessageDraft) domain.Message); ok { + r0 = returnFunc(ctx, draft) + } else { + r0 = ret.Get(0).(domain.Message) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, domain.MessageDraft) error); ok { + r1 = returnFunc(ctx, draft) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockMessageService_Send_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Send' +type MockMessageService_Send_Call struct { + *mock.Call +} + +// Send is a helper method to define mock.On call +// - ctx context.Context +// - draft domain.MessageDraft +func (_e *MockMessageService_Expecter) Send(ctx any, draft any) *MockMessageService_Send_Call { + return &MockMessageService_Send_Call{Call: _e.mock.On("Send", ctx, draft)} +} + +func (_c *MockMessageService_Send_Call) Run(run func(ctx context.Context, draft domain.MessageDraft)) *MockMessageService_Send_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 domain.MessageDraft + if args[1] != nil { + arg1 = args[1].(domain.MessageDraft) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockMessageService_Send_Call) Return(message domain.Message, err error) *MockMessageService_Send_Call { + _c.Call.Return(message, err) + return _c +} + +func (_c *MockMessageService_Send_Call) RunAndReturn(run func(ctx context.Context, draft domain.MessageDraft) (domain.Message, error)) *MockMessageService_Send_Call { + _c.Call.Return(run) + return _c +} diff --git a/internal/transport/rest/mocks/SecSessionService.go b/internal/transport/rest/mocks/SecSessionService.go new file mode 100644 index 00000000..ad322499 --- /dev/null +++ b/internal/transport/rest/mocks/SecSessionService.go @@ -0,0 +1,186 @@ +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify + +package mocks + +import ( + "context" + "mtusi-messenger/internal/domain" + + mock "github.com/stretchr/testify/mock" +) + +// NewMockSecSessionService creates a new instance of MockSecSessionService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockSecSessionService(t interface { + mock.TestingT + Cleanup(func()) +}) *MockSecSessionService { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + + mock := &MockSecSessionService{} + mock.Mock.Test(t) + + t.Cleanup(func() { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + mock.AssertExpectations(t) + }) + + return mock +} + +// MockSecSessionService is an autogenerated mock type for the SecSessionService type +type MockSecSessionService struct { + mock.Mock +} + +type MockSecSessionService_Expecter struct { + mock *mock.Mock +} + +func (_m *MockSecSessionService) EXPECT() *MockSecSessionService_Expecter { + return &MockSecSessionService_Expecter{mock: &_m.Mock} +} + +// Authenticate provides a mock function for the type MockSecSessionService +func (_mock *MockSecSessionService) Authenticate(ctx context.Context, username string, password string) (domain.User, error) { + ret := _mock.Called(ctx, username, password) + + if len(ret) == 0 { + panic("no return value specified for Authenticate") + } + + var r0 domain.User + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (domain.User, error)); ok { + return returnFunc(ctx, username, password) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) domain.User); ok { + r0 = returnFunc(ctx, username, password) + } else { + r0 = ret.Get(0).(domain.User) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok { + r1 = returnFunc(ctx, username, password) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSecSessionService_Authenticate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Authenticate' +type MockSecSessionService_Authenticate_Call struct { + *mock.Call +} + +// Authenticate is a helper method to define mock.On call +// - ctx context.Context +// - username string +// - password string +func (_e *MockSecSessionService_Expecter) Authenticate(ctx any, username any, password any) *MockSecSessionService_Authenticate_Call { + return &MockSecSessionService_Authenticate_Call{Call: _e.mock.On("Authenticate", ctx, username, password)} +} + +func (_c *MockSecSessionService_Authenticate_Call) Run(run func(ctx context.Context, username string, password string)) *MockSecSessionService_Authenticate_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) + }) + return _c +} + +func (_c *MockSecSessionService_Authenticate_Call) Return(user domain.User, err error) *MockSecSessionService_Authenticate_Call { + _c.Call.Return(user, err) + return _c +} + +func (_c *MockSecSessionService_Authenticate_Call) RunAndReturn(run func(ctx context.Context, username string, password string) (domain.User, error)) *MockSecSessionService_Authenticate_Call { + _c.Call.Return(run) + return _c +} + +// Resolve provides a mock function for the type MockSecSessionService +func (_mock *MockSecSessionService) Resolve(ctx context.Context, token string) (domain.User, error) { + ret := _mock.Called(ctx, token) + + if len(ret) == 0 { + panic("no return value specified for Resolve") + } + + var r0 domain.User + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string) (domain.User, error)); ok { + return returnFunc(ctx, token) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string) domain.User); ok { + r0 = returnFunc(ctx, token) + } else { + r0 = ret.Get(0).(domain.User) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = returnFunc(ctx, token) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSecSessionService_Resolve_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Resolve' +type MockSecSessionService_Resolve_Call struct { + *mock.Call +} + +// Resolve is a helper method to define mock.On call +// - ctx context.Context +// - token string +func (_e *MockSecSessionService_Expecter) Resolve(ctx any, token any) *MockSecSessionService_Resolve_Call { + return &MockSecSessionService_Resolve_Call{Call: _e.mock.On("Resolve", ctx, token)} +} + +func (_c *MockSecSessionService_Resolve_Call) Run(run func(ctx context.Context, token string)) *MockSecSessionService_Resolve_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockSecSessionService_Resolve_Call) Return(user domain.User, err error) *MockSecSessionService_Resolve_Call { + _c.Call.Return(user, err) + return _c +} + +func (_c *MockSecSessionService_Resolve_Call) RunAndReturn(run func(ctx context.Context, token string) (domain.User, error)) *MockSecSessionService_Resolve_Call { + _c.Call.Return(run) + return _c +} diff --git a/internal/transport/rest/mocks/SessionActions.go b/internal/transport/rest/mocks/SessionActions.go new file mode 100644 index 00000000..54571202 --- /dev/null +++ b/internal/transport/rest/mocks/SessionActions.go @@ -0,0 +1,316 @@ +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify + +package mocks + +import ( + "context" + "mtusi-messenger/internal/domain" + + "github.com/google/uuid" + mock "github.com/stretchr/testify/mock" +) + +// NewMockSessionActions creates a new instance of MockSessionActions. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockSessionActions(t interface { + mock.TestingT + Cleanup(func()) +}) *MockSessionActions { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + + mock := &MockSessionActions{} + mock.Mock.Test(t) + + t.Cleanup(func() { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + mock.AssertExpectations(t) + }) + + return mock +} + +// MockSessionActions is an autogenerated mock type for the SessionActions type +type MockSessionActions struct { + mock.Mock +} + +type MockSessionActions_Expecter struct { + mock *mock.Mock +} + +func (_m *MockSessionActions) EXPECT() *MockSessionActions_Expecter { + return &MockSessionActions_Expecter{mock: &_m.Mock} +} + +// Authenticate provides a mock function for the type MockSessionActions +func (_mock *MockSessionActions) Authenticate(ctx context.Context, username string, password string) (domain.User, error) { + ret := _mock.Called(ctx, username, password) + + if len(ret) == 0 { + panic("no return value specified for Authenticate") + } + + var r0 domain.User + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (domain.User, error)); ok { + return returnFunc(ctx, username, password) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) domain.User); ok { + r0 = returnFunc(ctx, username, password) + } else { + r0 = ret.Get(0).(domain.User) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok { + r1 = returnFunc(ctx, username, password) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSessionActions_Authenticate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Authenticate' +type MockSessionActions_Authenticate_Call struct { + *mock.Call +} + +// Authenticate is a helper method to define mock.On call +// - ctx context.Context +// - username string +// - password string +func (_e *MockSessionActions_Expecter) Authenticate(ctx any, username any, password any) *MockSessionActions_Authenticate_Call { + return &MockSessionActions_Authenticate_Call{Call: _e.mock.On("Authenticate", ctx, username, password)} +} + +func (_c *MockSessionActions_Authenticate_Call) Run(run func(ctx context.Context, username string, password string)) *MockSessionActions_Authenticate_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) + }) + return _c +} + +func (_c *MockSessionActions_Authenticate_Call) Return(user domain.User, err error) *MockSessionActions_Authenticate_Call { + _c.Call.Return(user, err) + return _c +} + +func (_c *MockSessionActions_Authenticate_Call) RunAndReturn(run func(ctx context.Context, username string, password string) (domain.User, error)) *MockSessionActions_Authenticate_Call { + _c.Call.Return(run) + return _c +} + +// Create provides a mock function for the type MockSessionActions +func (_mock *MockSessionActions) Create(ctx context.Context, user domain.User) (domain.Session, error) { + ret := _mock.Called(ctx, user) + + if len(ret) == 0 { + panic("no return value specified for Create") + } + + var r0 domain.Session + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, domain.User) (domain.Session, error)); ok { + return returnFunc(ctx, user) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, domain.User) domain.Session); ok { + r0 = returnFunc(ctx, user) + } else { + r0 = ret.Get(0).(domain.Session) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, domain.User) error); ok { + r1 = returnFunc(ctx, user) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSessionActions_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type MockSessionActions_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +// - user domain.User +func (_e *MockSessionActions_Expecter) Create(ctx any, user any) *MockSessionActions_Create_Call { + return &MockSessionActions_Create_Call{Call: _e.mock.On("Create", ctx, user)} +} + +func (_c *MockSessionActions_Create_Call) Run(run func(ctx context.Context, user domain.User)) *MockSessionActions_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 domain.User + if args[1] != nil { + arg1 = args[1].(domain.User) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockSessionActions_Create_Call) Return(session domain.Session, err error) *MockSessionActions_Create_Call { + _c.Call.Return(session, err) + return _c +} + +func (_c *MockSessionActions_Create_Call) RunAndReturn(run func(ctx context.Context, user domain.User) (domain.Session, error)) *MockSessionActions_Create_Call { + _c.Call.Return(run) + return _c +} + +// Resolve provides a mock function for the type MockSessionActions +func (_mock *MockSessionActions) Resolve(ctx context.Context, token string) (domain.User, error) { + ret := _mock.Called(ctx, token) + + if len(ret) == 0 { + panic("no return value specified for Resolve") + } + + var r0 domain.User + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, string) (domain.User, error)); ok { + return returnFunc(ctx, token) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, string) domain.User); ok { + r0 = returnFunc(ctx, token) + } else { + r0 = ret.Get(0).(domain.User) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = returnFunc(ctx, token) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSessionActions_Resolve_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Resolve' +type MockSessionActions_Resolve_Call struct { + *mock.Call +} + +// Resolve is a helper method to define mock.On call +// - ctx context.Context +// - token string +func (_e *MockSessionActions_Expecter) Resolve(ctx any, token any) *MockSessionActions_Resolve_Call { + return &MockSessionActions_Resolve_Call{Call: _e.mock.On("Resolve", ctx, token)} +} + +func (_c *MockSessionActions_Resolve_Call) Run(run func(ctx context.Context, token string)) *MockSessionActions_Resolve_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 string + if args[1] != nil { + arg1 = args[1].(string) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockSessionActions_Resolve_Call) Return(user domain.User, err error) *MockSessionActions_Resolve_Call { + _c.Call.Return(user, err) + return _c +} + +func (_c *MockSessionActions_Resolve_Call) RunAndReturn(run func(ctx context.Context, token string) (domain.User, error)) *MockSessionActions_Resolve_Call { + _c.Call.Return(run) + return _c +} + +// Revoke provides a mock function for the type MockSessionActions +func (_mock *MockSessionActions) Revoke(ctx context.Context, userID uuid.UUID, token string) error { + ret := _mock.Called(ctx, userID, token) + + if len(ret) == 0 { + panic("no return value specified for Revoke") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, string) error); ok { + r0 = returnFunc(ctx, userID, token) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockSessionActions_Revoke_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Revoke' +type MockSessionActions_Revoke_Call struct { + *mock.Call +} + +// Revoke is a helper method to define mock.On call +// - ctx context.Context +// - userID uuid.UUID +// - token string +func (_e *MockSessionActions_Expecter) Revoke(ctx any, userID any, token any) *MockSessionActions_Revoke_Call { + return &MockSessionActions_Revoke_Call{Call: _e.mock.On("Revoke", ctx, userID, token)} +} + +func (_c *MockSessionActions_Revoke_Call) Run(run func(ctx context.Context, userID uuid.UUID, token string)) *MockSessionActions_Revoke_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 uuid.UUID + if args[1] != nil { + arg1 = args[1].(uuid.UUID) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) + }) + return _c +} + +func (_c *MockSessionActions_Revoke_Call) Return(err error) *MockSessionActions_Revoke_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockSessionActions_Revoke_Call) RunAndReturn(run func(ctx context.Context, userID uuid.UUID, token string) error) *MockSessionActions_Revoke_Call { + _c.Call.Return(run) + return _c +} diff --git a/internal/transport/rest/mocks/SessionService.go b/internal/transport/rest/mocks/SessionService.go new file mode 100644 index 00000000..62d6d433 --- /dev/null +++ b/internal/transport/rest/mocks/SessionService.go @@ -0,0 +1,178 @@ +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify + +package mocks + +import ( + "context" + "mtusi-messenger/internal/domain" + + "github.com/google/uuid" + mock "github.com/stretchr/testify/mock" +) + +// NewMockSessionService creates a new instance of MockSessionService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockSessionService(t interface { + mock.TestingT + Cleanup(func()) +}) *MockSessionService { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + + mock := &MockSessionService{} + mock.Mock.Test(t) + + t.Cleanup(func() { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + mock.AssertExpectations(t) + }) + + return mock +} + +// MockSessionService is an autogenerated mock type for the SessionService type +type MockSessionService struct { + mock.Mock +} + +type MockSessionService_Expecter struct { + mock *mock.Mock +} + +func (_m *MockSessionService) EXPECT() *MockSessionService_Expecter { + return &MockSessionService_Expecter{mock: &_m.Mock} +} + +// Create provides a mock function for the type MockSessionService +func (_mock *MockSessionService) Create(ctx context.Context, user domain.User) (domain.Session, error) { + ret := _mock.Called(ctx, user) + + if len(ret) == 0 { + panic("no return value specified for Create") + } + + var r0 domain.Session + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, domain.User) (domain.Session, error)); ok { + return returnFunc(ctx, user) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, domain.User) domain.Session); ok { + r0 = returnFunc(ctx, user) + } else { + r0 = ret.Get(0).(domain.Session) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, domain.User) error); ok { + r1 = returnFunc(ctx, user) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockSessionService_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type MockSessionService_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +// - user domain.User +func (_e *MockSessionService_Expecter) Create(ctx any, user any) *MockSessionService_Create_Call { + return &MockSessionService_Create_Call{Call: _e.mock.On("Create", ctx, user)} +} + +func (_c *MockSessionService_Create_Call) Run(run func(ctx context.Context, user domain.User)) *MockSessionService_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 domain.User + if args[1] != nil { + arg1 = args[1].(domain.User) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockSessionService_Create_Call) Return(session domain.Session, err error) *MockSessionService_Create_Call { + _c.Call.Return(session, err) + return _c +} + +func (_c *MockSessionService_Create_Call) RunAndReturn(run func(ctx context.Context, user domain.User) (domain.Session, error)) *MockSessionService_Create_Call { + _c.Call.Return(run) + return _c +} + +// Revoke provides a mock function for the type MockSessionService +func (_mock *MockSessionService) Revoke(ctx context.Context, userID uuid.UUID, token string) error { + ret := _mock.Called(ctx, userID, token) + + if len(ret) == 0 { + panic("no return value specified for Revoke") + } + + var r0 error + if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID, string) error); ok { + r0 = returnFunc(ctx, userID, token) + } else { + r0 = ret.Error(0) + } + return r0 +} + +// MockSessionService_Revoke_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Revoke' +type MockSessionService_Revoke_Call struct { + *mock.Call +} + +// Revoke is a helper method to define mock.On call +// - ctx context.Context +// - userID uuid.UUID +// - token string +func (_e *MockSessionService_Expecter) Revoke(ctx any, userID any, token any) *MockSessionService_Revoke_Call { + return &MockSessionService_Revoke_Call{Call: _e.mock.On("Revoke", ctx, userID, token)} +} + +func (_c *MockSessionService_Revoke_Call) Run(run func(ctx context.Context, userID uuid.UUID, token string)) *MockSessionService_Revoke_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 uuid.UUID + if args[1] != nil { + arg1 = args[1].(uuid.UUID) + } + var arg2 string + if args[2] != nil { + arg2 = args[2].(string) + } + run( + arg0, + arg1, + arg2, + ) + }) + return _c +} + +func (_c *MockSessionService_Revoke_Call) Return(err error) *MockSessionService_Revoke_Call { + _c.Call.Return(err) + return _c +} + +func (_c *MockSessionService_Revoke_Call) RunAndReturn(run func(ctx context.Context, userID uuid.UUID, token string) error) *MockSessionService_Revoke_Call { + _c.Call.Return(run) + return _c +} diff --git a/internal/transport/rest/mocks/UserLookup.go b/internal/transport/rest/mocks/UserLookup.go new file mode 100644 index 00000000..8268fe44 --- /dev/null +++ b/internal/transport/rest/mocks/UserLookup.go @@ -0,0 +1,115 @@ +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify + +package mocks + +import ( + "context" + "mtusi-messenger/internal/domain" + + "github.com/google/uuid" + mock "github.com/stretchr/testify/mock" +) + +// NewMockUserLookup creates a new instance of MockUserLookup. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockUserLookup(t interface { + mock.TestingT + Cleanup(func()) +}) *MockUserLookup { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + + mock := &MockUserLookup{} + mock.Mock.Test(t) + + t.Cleanup(func() { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + mock.AssertExpectations(t) + }) + + return mock +} + +// MockUserLookup is an autogenerated mock type for the UserLookup type +type MockUserLookup struct { + mock.Mock +} + +type MockUserLookup_Expecter struct { + mock *mock.Mock +} + +func (_m *MockUserLookup) EXPECT() *MockUserLookup_Expecter { + return &MockUserLookup_Expecter{mock: &_m.Mock} +} + +// GetByID provides a mock function for the type MockUserLookup +func (_mock *MockUserLookup) GetByID(ctx context.Context, id uuid.UUID) (domain.User, error) { + ret := _mock.Called(ctx, id) + + if len(ret) == 0 { + panic("no return value specified for GetByID") + } + + var r0 domain.User + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID) (domain.User, error)); ok { + return returnFunc(ctx, id) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID) domain.User); ok { + r0 = returnFunc(ctx, id) + } else { + r0 = ret.Get(0).(domain.User) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, uuid.UUID) error); ok { + r1 = returnFunc(ctx, id) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockUserLookup_GetByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByID' +type MockUserLookup_GetByID_Call struct { + *mock.Call +} + +// GetByID is a helper method to define mock.On call +// - ctx context.Context +// - id uuid.UUID +func (_e *MockUserLookup_Expecter) GetByID(ctx any, id any) *MockUserLookup_GetByID_Call { + return &MockUserLookup_GetByID_Call{Call: _e.mock.On("GetByID", ctx, id)} +} + +func (_c *MockUserLookup_GetByID_Call) Run(run func(ctx context.Context, id uuid.UUID)) *MockUserLookup_GetByID_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 uuid.UUID + if args[1] != nil { + arg1 = args[1].(uuid.UUID) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockUserLookup_GetByID_Call) Return(user domain.User, err error) *MockUserLookup_GetByID_Call { + _c.Call.Return(user, err) + return _c +} + +func (_c *MockUserLookup_GetByID_Call) RunAndReturn(run func(ctx context.Context, id uuid.UUID) (domain.User, error)) *MockUserLookup_GetByID_Call { + _c.Call.Return(run) + return _c +} diff --git a/internal/transport/rest/mocks/UserService.go b/internal/transport/rest/mocks/UserService.go new file mode 100644 index 00000000..a2dd6c1b --- /dev/null +++ b/internal/transport/rest/mocks/UserService.go @@ -0,0 +1,181 @@ +// Code generated by mockery; DO NOT EDIT. +// github.com/vektra/mockery +// template: testify + +package mocks + +import ( + "context" + "mtusi-messenger/internal/domain" + + "github.com/google/uuid" + mock "github.com/stretchr/testify/mock" +) + +// NewMockUserService creates a new instance of MockUserService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockUserService(t interface { + mock.TestingT + Cleanup(func()) +}) *MockUserService { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + + mock := &MockUserService{} + mock.Mock.Test(t) + + t.Cleanup(func() { + if helper, ok := t.(interface{ Helper() }); ok { + helper.Helper() + } + mock.AssertExpectations(t) + }) + + return mock +} + +// MockUserService is an autogenerated mock type for the UserService type +type MockUserService struct { + mock.Mock +} + +type MockUserService_Expecter struct { + mock *mock.Mock +} + +func (_m *MockUserService) EXPECT() *MockUserService_Expecter { + return &MockUserService_Expecter{mock: &_m.Mock} +} + +// GetByID provides a mock function for the type MockUserService +func (_mock *MockUserService) GetByID(ctx context.Context, id uuid.UUID) (domain.User, error) { + ret := _mock.Called(ctx, id) + + if len(ret) == 0 { + panic("no return value specified for GetByID") + } + + var r0 domain.User + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID) (domain.User, error)); ok { + return returnFunc(ctx, id) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, uuid.UUID) domain.User); ok { + r0 = returnFunc(ctx, id) + } else { + r0 = ret.Get(0).(domain.User) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, uuid.UUID) error); ok { + r1 = returnFunc(ctx, id) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockUserService_GetByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByID' +type MockUserService_GetByID_Call struct { + *mock.Call +} + +// GetByID is a helper method to define mock.On call +// - ctx context.Context +// - id uuid.UUID +func (_e *MockUserService_Expecter) GetByID(ctx any, id any) *MockUserService_GetByID_Call { + return &MockUserService_GetByID_Call{Call: _e.mock.On("GetByID", ctx, id)} +} + +func (_c *MockUserService_GetByID_Call) Run(run func(ctx context.Context, id uuid.UUID)) *MockUserService_GetByID_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 uuid.UUID + if args[1] != nil { + arg1 = args[1].(uuid.UUID) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockUserService_GetByID_Call) Return(user domain.User, err error) *MockUserService_GetByID_Call { + _c.Call.Return(user, err) + return _c +} + +func (_c *MockUserService_GetByID_Call) RunAndReturn(run func(ctx context.Context, id uuid.UUID) (domain.User, error)) *MockUserService_GetByID_Call { + _c.Call.Return(run) + return _c +} + +// Register provides a mock function for the type MockUserService +func (_mock *MockUserService) Register(ctx context.Context, draft domain.UserDraft) (domain.User, error) { + ret := _mock.Called(ctx, draft) + + if len(ret) == 0 { + panic("no return value specified for Register") + } + + var r0 domain.User + var r1 error + if returnFunc, ok := ret.Get(0).(func(context.Context, domain.UserDraft) (domain.User, error)); ok { + return returnFunc(ctx, draft) + } + if returnFunc, ok := ret.Get(0).(func(context.Context, domain.UserDraft) domain.User); ok { + r0 = returnFunc(ctx, draft) + } else { + r0 = ret.Get(0).(domain.User) + } + if returnFunc, ok := ret.Get(1).(func(context.Context, domain.UserDraft) error); ok { + r1 = returnFunc(ctx, draft) + } else { + r1 = ret.Error(1) + } + return r0, r1 +} + +// MockUserService_Register_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Register' +type MockUserService_Register_Call struct { + *mock.Call +} + +// Register is a helper method to define mock.On call +// - ctx context.Context +// - draft domain.UserDraft +func (_e *MockUserService_Expecter) Register(ctx any, draft any) *MockUserService_Register_Call { + return &MockUserService_Register_Call{Call: _e.mock.On("Register", ctx, draft)} +} + +func (_c *MockUserService_Register_Call) Run(run func(ctx context.Context, draft domain.UserDraft)) *MockUserService_Register_Call { + _c.Call.Run(func(args mock.Arguments) { + var arg0 context.Context + if args[0] != nil { + arg0 = args[0].(context.Context) + } + var arg1 domain.UserDraft + if args[1] != nil { + arg1 = args[1].(domain.UserDraft) + } + run( + arg0, + arg1, + ) + }) + return _c +} + +func (_c *MockUserService_Register_Call) Return(user domain.User, err error) *MockUserService_Register_Call { + _c.Call.Return(user, err) + return _c +} + +func (_c *MockUserService_Register_Call) RunAndReturn(run func(ctx context.Context, draft domain.UserDraft) (domain.User, error)) *MockUserService_Register_Call { + _c.Call.Return(run) + return _c +} diff --git a/internal/transport/rest/oas/oas_security_gen.go b/internal/transport/rest/oas/oas_security_gen.go deleted file mode 100644 index e00249b2..00000000 --- a/internal/transport/rest/oas/oas_security_gen.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by ogen, DO NOT EDIT. - -package oas - -import ( - "context" - "net/http" - "strings" - - "github.com/go-faster/errors" - "github.com/ogen-go/ogen/ogenerrors" -) - -// SecurityHandler is handler for security parameters. -type SecurityHandler interface { - // HandleDevUser handles devUser security. - // Только учебная lab1: существующий UUID. Не является - // аутентификацией. - HandleDevUser(ctx context.Context, operationName OperationName, t DevUser) (context.Context, error) -} - -func findAuthorization(h http.Header, prefix string) (string, bool) { - v, ok := h["Authorization"] - if !ok { - return "", false - } - for _, vv := range v { - scheme, value, ok := strings.Cut(vv, " ") - if !ok || !strings.EqualFold(scheme, prefix) { - continue - } - return value, true - } - return "", false -} - -// operationRolesDevUser is a private map storing roles per operation. -var operationRolesDevUser = map[string][]string{ - CreateChatOperation: []string{}, - CreateMessageOperation: []string{}, - CurrentUserOperation: []string{}, - GetChatOperation: []string{}, - ListChatsOperation: []string{}, - ListMessagesOperation: []string{}, -} - -// GetRolesForDevUser returns the required roles for the given operation. -// -// This is useful for authorization scenarios where you need to know which roles -// are required for an operation. -// -// Example: -// -// requiredRoles := GetRolesForDevUser(AddPetOperation) -// -// Returns nil if the operation has no role requirements or if the operation is unknown. -func GetRolesForDevUser(operation string) []string { - roles, ok := operationRolesDevUser[operation] - if !ok { - return nil - } - // Return a copy to prevent external modification - result := make([]string, len(roles)) - copy(result, roles) - return result -} - -func (s *Server) securityDevUser(ctx context.Context, operationName OperationName, req *http.Request) (context.Context, bool, error) { - var t DevUser - const parameterName = "X-User-Id" - value := req.Header.Get(parameterName) - if value == "" { - return ctx, false, nil - } - t.APIKey = value - t.Roles = operationRolesDevUser[operationName] - rctx, err := s.sec.HandleDevUser(ctx, operationName, t) - if errors.Is(err, ogenerrors.ErrSkipServerSecurity) { - return nil, false, nil - } else if err != nil { - return nil, false, err - } - return rctx, true, err -} diff --git a/internal/transport/rest/router.go b/internal/transport/rest/router.go index aa58ea75..43fa600f 100644 --- a/internal/transport/rest/router.go +++ b/internal/transport/rest/router.go @@ -4,7 +4,7 @@ import ( "log/slog" "net/http" - "mtusi-messenger/internal/transport/rest/oas" + "mtusi-messenger/internal/transport/rest/internal/oas" ) func NewRouter( diff --git a/internal/transport/rest/router_test.go b/internal/transport/rest/router_test.go index cb84ae86..7dacb4e8 100644 --- a/internal/transport/rest/router_test.go +++ b/internal/transport/rest/router_test.go @@ -1,100 +1,87 @@ -package rest +package rest_test import ( "bytes" + "encoding/base64" "encoding/json" + "errors" "io" "log/slog" "net/http" "net/http/httptest" - "net/url" - "strings" "testing" + "time" - "github.com/stretchr/testify/suite" + "github.com/google/uuid" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + "mtusi-messenger/internal/domain" "mtusi-messenger/internal/logger" - "mtusi-messenger/internal/service/chat" - "mtusi-messenger/internal/service/message" - "mtusi-messenger/internal/service/user" - "mtusi-messenger/internal/storage/memory" + "mtusi-messenger/internal/transport/rest" + "mtusi-messenger/internal/transport/rest/mocks" ) -const userIDHeader = "X-User-Id" +const requestIDHeader = "X-Request-ID" -type response struct { +func basic(username, password string) string { + return base64.StdEncoding.EncodeToString([]byte(username + ":" + password)) +} + +func assertError(message string) error { + return errors.New(message) +} + +type httpResult struct { status int header http.Header body []byte } -type RouterSuite struct { - suite.Suite +type routerFixture struct { + users *mocks.MockUserService + chats *mocks.MockChatService + messages *mocks.MockMessageService + health *mocks.MockHealthChecker + sessions *mocks.MockSessionActions - sink *strings.Builder - log *slog.Logger server *httptest.Server } -func TestRouterSuite(t *testing.T) { - t.Parallel() - suite.Run(t, new(RouterSuite)) -} +func newRouterFixture(t *testing.T) *routerFixture { + t.Helper() -func (s *RouterSuite) SetupTest() { - s.sink = &strings.Builder{} - s.log = logger.New(logger.WithWriter(s.sink), logger.WithLevel(slog.LevelDebug)) - - store := memory.NewStore() - userService := user.NewService(store.Users()) - - router, err := NewRouter( - NewHandler( - userService, - chat.NewService(store.Chats()), - message.NewService(store.Messages()), - ), - NewSecurityHandler(userService), - s.log, - ) - s.Require().NoError(err) - - s.server = httptest.NewServer(router) -} - -func (s *RouterSuite) TearDownTest() { - s.server.Close() -} - -func (s *RouterSuite) do(method, path string, headers map[string]string) response { - s.T().Helper() - - return s.send(method, path, nil, headers) -} - -func (s *RouterSuite) send(method, path string, body any, headers map[string]string) response { - s.T().Helper() - - if body == nil { - return s.sendRaw(method, path, nil, headers) + fixture := &routerFixture{ + users: mocks.NewMockUserService(t), + chats: mocks.NewMockChatService(t), + messages: mocks.NewMockMessageService(t), + health: mocks.NewMockHealthChecker(t), + sessions: mocks.NewMockSessionActions(t), } - raw, err := json.Marshal(body) - s.Require().NoError(err) + router, err := rest.NewRouter( + rest.NewHandler(fixture.users, fixture.chats, fixture.messages, fixture.health, fixture.sessions), + rest.NewSecurityHandler(fixture.sessions), + logger.New(logger.WithLevel(slog.LevelError)), + ) + require.NoError(t, err) - return s.sendRaw(method, path, raw, headers) + fixture.server = httptest.NewServer(router) + t.Cleanup(fixture.server.Close) + + return fixture } -func (s *RouterSuite) sendRaw(method, path string, body []byte, headers map[string]string) response { - s.T().Helper() +func (f *routerFixture) do(t *testing.T, method, path string, body []byte, headers map[string]string) httpResult { + t.Helper() var reader io.Reader if body != nil { reader = bytes.NewReader(body) } - req, err := http.NewRequestWithContext(s.T().Context(), method, s.server.URL+path, reader) - s.Require().NoError(err) + req, err := http.NewRequestWithContext(t.Context(), method, f.server.URL+path, reader) + require.NoError(t, err) if body != nil { req.Header.Set("Content-Type", "application/json") @@ -104,540 +91,236 @@ func (s *RouterSuite) sendRaw(method, path string, body []byte, headers map[stri req.Header.Set(key, value) } - resp, err := s.server.Client().Do(req) - s.Require().NoError(err) + resp, err := f.server.Client().Do(req) + require.NoError(t, err) defer func() { _ = resp.Body.Close() }() payload, err := io.ReadAll(resp.Body) - s.Require().NoError(err) + require.NoError(t, err) - return response{status: resp.StatusCode, header: resp.Header, body: payload} + return httpResult{status: resp.StatusCode, header: resp.Header, body: payload} } -func (s *RouterSuite) records() []map[string]any { - s.T().Helper() +func TestHealthEndpoints(t *testing.T) { + fixture := newRouterFixture(t) + fixture.health.EXPECT().Ping(mock.Anything).Return(nil).Maybe() - var out []map[string]any + result := fixture.do(t, http.MethodGet, "/health/live", nil, nil) + require.Equal(t, http.StatusOK, result.status) + require.NotEmpty(t, result.header.Get(requestIDHeader)) + require.JSONEq(t, `{"status":"ok"}`, string(result.body)) - for line := range strings.SplitSeq(strings.TrimSpace(s.sink.String()), "\n") { - if line == "" { - continue - } - - var record map[string]any - s.Require().NoError(json.Unmarshal([]byte(line), &record)) - - out = append(out, record) - } - - return out + result = fixture.do(t, http.MethodGet, "/health/ready", nil, nil) + require.Equal(t, http.StatusOK, result.status) } -func (s *RouterSuite) lastRecord() map[string]any { - s.T().Helper() +func TestReadinessReturns503WhenDependencyDown(t *testing.T) { + fixture := newRouterFixture(t) + fixture.health.EXPECT().Ping(mock.Anything).Return(assertError("down")).Maybe() - records := s.records() - s.Require().NotEmpty(records) - - return records[len(records)-1] -} - -func (s *RouterSuite) decodeError(resp response) map[string]any { - s.T().Helper() + result := fixture.do(t, http.MethodGet, "/health/ready", nil, nil) + require.Equal(t, http.StatusServiceUnavailable, result.status) var body struct { - Error map[string]any `json:"error"` + Error struct { + Code string `json:"code"` + } `json:"error"` } - - s.Require().NoError(json.Unmarshal(resp.body, &body)) - s.Require().NotEmpty(body.Error) - - return body.Error + require.NoError(t, json.Unmarshal(result.body, &body)) + require.Equal(t, "unavailable", body.Error.Code) } -func (s *RouterSuite) decode(resp response) map[string]any { - s.T().Helper() +func TestRequestIDEchoedFromClient(t *testing.T) { + fixture := newRouterFixture(t) + + result := fixture.do(t, http.MethodGet, "/health/live", nil, map[string]string{requestIDHeader: "from-client"}) + require.Equal(t, "from-client", result.header.Get(requestIDHeader)) +} + +func TestProtectedEndpointRequiresBearer(t *testing.T) { + tests := map[string]map[string]string{ + "без заголовка": nil, + "только X-User-Id": {"X-User-Id": uuid.NewString()}, + "basic вместо bearer": {"Authorization": "Basic dXNlcjpwYXNz"}, + } + + for name, headers := range tests { + t.Run(name, func(t *testing.T) { + fixture := newRouterFixture(t) + + result := fixture.do(t, http.MethodGet, "/api/v1/users/me", nil, headers) + require.Equal(t, http.StatusUnauthorized, result.status) + require.Contains(t, result.header.Get("WWW-Authenticate"), "Bearer") + }) + } +} + +func TestBearerSessionIsResolvedToCaller(t *testing.T) { + fixture := newRouterFixture(t) + + user := domain.User{ID: uuid.New(), Username: "alice", DisplayName: "Алиса", CreatedAt: time.Now().UTC()} + fixture.sessions.EXPECT().Resolve(mock.Anything, "opaque-token").Return(user, nil).Once() + fixture.users.EXPECT().GetByID(mock.Anything, user.ID).Return(user, nil).Once() + + result := fixture.do(t, http.MethodGet, "/api/v1/users/me", nil, map[string]string{"Authorization": "Bearer opaque-token"}) + require.Equal(t, http.StatusOK, result.status) var body map[string]any - s.Require().NoError(json.Unmarshal(resp.body, &body)) - - return body + require.NoError(t, json.Unmarshal(result.body, &body)) + require.Equal(t, user.ID.String(), body["id"]) } -func (s *RouterSuite) register(username string) map[string]any { - s.T().Helper() +func TestUnknownBearerIsRejected(t *testing.T) { + fixture := newRouterFixture(t) + fixture.sessions.EXPECT().Resolve(mock.Anything, "unknown").Return(domain.User{}, domain.ErrUnauthenticated).Once() - resp := s.send(http.MethodPost, "/api/v1/users", map[string]string{ - "username": username, - "display_name": "Пользователь " + username, - }, nil) - s.Require().Equal(http.StatusCreated, resp.status, string(resp.body)) - - return s.decode(resp) + result := fixture.do(t, http.MethodGet, "/api/v1/chats", nil, map[string]string{"Authorization": "Bearer unknown"}) + require.Equal(t, http.StatusUnauthorized, result.status) + require.Contains(t, result.header.Get("WWW-Authenticate"), "Bearer") } -func (s *RouterSuite) actor(user map[string]any) map[string]string { - s.T().Helper() +func TestRegisterUserReturnsContractShape(t *testing.T) { + fixture := newRouterFixture(t) - id, ok := user["id"].(string) - s.Require().True(ok) + user := domain.User{ID: uuid.New(), Username: "alice", DisplayName: "Алиса", CreatedAt: time.Now().UTC()} + draft := domain.UserDraft{Username: "alice", DisplayName: "Алиса", Password: "very-secret-password"} + fixture.users.EXPECT().Register(mock.Anything, draft).Return(user, nil).Once() - return map[string]string{userIDHeader: id} + body, err := json.Marshal(map[string]string{"username": "alice", "display_name": "Алиса", "password": draft.Password}) + require.NoError(t, err) + + result := fixture.do(t, http.MethodPost, "/api/v1/users", body, nil) + require.Equal(t, http.StatusCreated, result.status) + require.NotContains(t, string(result.body), "password") + + var decoded map[string]any + require.NoError(t, json.Unmarshal(result.body, &decoded)) + require.Equal(t, user.ID.String(), decoded["id"]) + require.Len(t, decoded, 4) } -func (s *RouterSuite) createChat(owner map[string]any, members ...string) map[string]any { - s.T().Helper() +func TestRegisterDuplicateUsernameConflicts(t *testing.T) { + fixture := newRouterFixture(t) + fixture.users.EXPECT().Register(mock.Anything, mock.Anything).Return(domain.User{}, domain.ErrUsernameTaken).Once() - resp := s.send(http.MethodPost, "/api/v1/chats", map[string]any{ - "title": "Контрактный чат", - "member_ids": members, - }, s.actor(owner)) - s.Require().Equal(http.StatusCreated, resp.status, string(resp.body)) + body, err := json.Marshal(map[string]string{"username": "alice", "display_name": "Алиса", "password": "very-secret-password"}) + require.NoError(t, err) - return s.decode(resp) + result := fixture.do(t, http.MethodPost, "/api/v1/users", body, nil) + require.Equal(t, http.StatusConflict, result.status) } -func (s *RouterSuite) id(object map[string]any) string { - s.T().Helper() +func TestCreateSessionFromBasicAuth(t *testing.T) { + fixture := newRouterFixture(t) - value, ok := object["id"].(string) - s.Require().True(ok) + user := domain.User{ID: uuid.New(), Username: "alice", DisplayName: "Алиса", CreatedAt: time.Now().UTC()} + session := domain.Session{Token: "opaque-token", ExpiresAt: time.Now().UTC().Add(time.Hour), User: user} - return value -} + fixture.sessions.EXPECT().Authenticate(mock.Anything, "alice", "very-secret-password").Return(user, nil).Once() + fixture.sessions.EXPECT().Create(mock.Anything, user).Return(session, nil).Once() -func (s *RouterSuite) TestHealthLive() { - resp := s.do(http.MethodGet, "/health/live", nil) - - s.Equal(http.StatusOK, resp.status) - s.NotEmpty(resp.header.Get(requestIDHeader)) - s.JSONEq(`{"status":"ok"}`, string(resp.body)) -} - -func (s *RouterSuite) TestHealthReady() { - resp := s.do(http.MethodGet, "/health/ready", nil) - - s.Equal(http.StatusOK, resp.status) - s.NotEmpty(resp.header.Get(requestIDHeader)) - s.JSONEq(`{"status":"ok"}`, string(resp.body)) -} - -func (s *RouterSuite) TestRequestIDEchoedFromClient() { - resp := s.do(http.MethodGet, "/health/live", map[string]string{ - requestIDHeader: "from-client", + result := fixture.do(t, http.MethodPost, "/api/v1/auth/sessions", nil, map[string]string{ + "Authorization": "Basic " + basic("alice", "very-secret-password"), }) + require.Equal(t, http.StatusCreated, result.status) - s.Equal("from-client", resp.header.Get(requestIDHeader)) + var body struct { + Token string `json:"token"` + TokenType string `json:"token_type"` + } + require.NoError(t, json.Unmarshal(result.body, &body)) + require.Equal(t, "opaque-token", body.Token) + require.Equal(t, "Bearer", body.TokenType) } -func (s *RouterSuite) TestUnauthorizedIsLoggedWithoutStacktrace() { - resp := s.do(http.MethodGet, "/api/v1/chats", nil) +func TestCreateSessionRejectsBadCredentials(t *testing.T) { + fixture := newRouterFixture(t) + fixture.sessions.EXPECT().Authenticate(mock.Anything, mock.Anything, mock.Anything).Return(domain.User{}, domain.ErrUnauthenticated).Once() - s.Equal(http.StatusUnauthorized, resp.status) - - body := s.decodeError(resp) - s.Equal("unauthorized", body["code"]) - s.Equal(resp.header.Get(requestIDHeader), body["request_id"]) - s.NotEmpty(body["message"]) - - record := s.lastRecord() - s.Equal("request rejected", record["msg"]) - s.Equal("warn", record["level"]) - s.InEpsilon(float64(http.StatusUnauthorized), record["status"], 0.0001) - s.NotEmpty(record["request_id"]) - s.NotContains(record, "stacktrace", "ожидаемый отказ не должен печатать стек") -} - -func (s *RouterSuite) TestNotFoundReturnsContractError() { - resp := s.do(http.MethodGet, "/nope", nil) - - s.Equal(http.StatusNotFound, resp.status) - s.Equal("application/json; charset=utf-8", resp.header.Get("Content-Type")) - - body := s.decodeError(resp) - s.Equal("not_found", body["code"]) - s.Equal(resp.header.Get(requestIDHeader), body["request_id"]) - - record := s.lastRecord() - s.Equal("request rejected", record["msg"]) - s.Equal("warn", record["level"]) - s.InEpsilon(float64(http.StatusNotFound), record["status"], 0.0001) -} - -func (s *RouterSuite) TestMethodNotAllowedReturnsContractError() { - resp := s.do(http.MethodDelete, "/health/live", nil) - - s.Equal(http.StatusMethodNotAllowed, resp.status) - s.Equal(http.MethodGet, resp.header.Get("Allow")) - - body := s.decodeError(resp) - s.Equal("invalid_request", body["code"]) - - record := s.lastRecord() - s.Equal("request rejected", record["msg"]) - s.InEpsilon(float64(http.StatusMethodNotAllowed), record["status"], 0.0001) -} - -func (s *RouterSuite) TestMalformedUserIDIsRejected() { - resp := s.do(http.MethodGet, "/api/v1/chats", map[string]string{ - userIDHeader: "not-a-uuid", + result := fixture.do(t, http.MethodPost, "/api/v1/auth/sessions", nil, map[string]string{ + "Authorization": "Basic " + basic("alice", "wrong-password-value"), }) - - s.Equal(http.StatusUnauthorized, resp.status) - s.Equal("unauthorized", s.decodeError(resp)["code"]) + require.Equal(t, http.StatusUnauthorized, result.status) + require.Contains(t, result.header.Get("WWW-Authenticate"), "Basic") } -func (s *RouterSuite) TestUnknownUserIDIsRejected() { - resp := s.do(http.MethodGet, "/api/v1/chats", map[string]string{ - userIDHeader: "11111111-1111-4111-8111-111111111111", - }) +func TestRevokeSession(t *testing.T) { + fixture := newRouterFixture(t) - s.Equal(http.StatusUnauthorized, resp.status, - "неизвестный пользователь не проходит идентификацию lab1") + user := domain.User{ID: uuid.New(), Username: "alice", DisplayName: "Алиса", CreatedAt: time.Now().UTC()} + fixture.sessions.EXPECT().Resolve(mock.Anything, "opaque-token").Return(user, nil).Once() + fixture.sessions.EXPECT().Revoke(mock.Anything, user.ID, "opaque-token").Return(nil).Once() + + result := fixture.do(t, http.MethodDelete, "/api/v1/auth/sessions/current", nil, map[string]string{"Authorization": "Bearer opaque-token"}) + require.Equal(t, http.StatusNoContent, result.status) + require.Empty(t, result.body) } -func (s *RouterSuite) TestRegisterUserReturnsContractShape() { - resp := s.send(http.MethodPost, "/api/v1/users", map[string]string{ - "username": "alice", - "display_name": "Алиса", - }, nil) +func TestCursorRoundTrip(t *testing.T) { + fixture := newRouterFixture(t) - s.Require().Equal(http.StatusCreated, resp.status) + user := domain.User{ID: uuid.New(), Username: "alice", DisplayName: "Алиса", CreatedAt: time.Now().UTC()} + chatID := uuid.New() + message := domain.Message{ID: uuid.New(), ChatID: chatID, SenderID: user.ID, Text: "первое", CreatedAt: time.Now().UTC()} - body := s.decode(resp) - s.Equal("alice", body["username"]) - s.Equal("Алиса", body["display_name"]) - s.NotEmpty(body["id"]) - s.NotEmpty(body["created_at"]) - s.Len(body, 4, "User не содержит лишних полей") -} + fixture.sessions.EXPECT().Resolve(mock.Anything, "opaque-token").Return(user, nil).Maybe() + fixture.messages.EXPECT(). + History(mock.Anything, user.ID, chatID, (*domain.Cursor)(nil), 1). + Return(domain.Page[domain.Message]{ + Items: []domain.Message{message}, + Next: &domain.Cursor{Scope: chatID, CreatedAt: message.CreatedAt, ID: message.ID}, + }, nil). + Once() -func (s *RouterSuite) TestDuplicateUsernameConflicts() { - s.register("alice") + result := fixture.do(t, http.MethodGet, "/api/v1/chats/"+chatID.String()+"/messages?limit=1", nil, map[string]string{"Authorization": "Bearer opaque-token"}) + require.Equal(t, http.StatusOK, result.status) - resp := s.send(http.MethodPost, "/api/v1/users", map[string]string{ - "username": "alice", - "display_name": "Другая Алиса", - }, nil) - - s.Equal(http.StatusConflict, resp.status) - s.Equal("conflict", s.decodeError(resp)["code"]) -} - -func (s *RouterSuite) TestRegisterRejectsInvalidPayload() { - tests := map[string]map[string]string{ - "username в верхнем регистре": {"username": "Alice", "display_name": "Алиса"}, - "слишком короткий username": {"username": "ab", "display_name": "Алиса"}, - "пробельный display_name": {"username": "alice", "display_name": " "}, + var body struct { + Items []json.RawMessage `json:"items"` + NextCursor *string `json:"next_cursor"` } + require.NoError(t, json.Unmarshal(result.body, &body)) + require.Len(t, body.Items, 1) + require.NotNil(t, body.NextCursor) - for name, payload := range tests { - s.Run(name, func() { - resp := s.send(http.MethodPost, "/api/v1/users", payload, nil) + fixture.messages.EXPECT(). + History(mock.Anything, user.ID, chatID, mock.Anything, 1). + Return(domain.Page[domain.Message]{Items: []domain.Message{}}, nil). + Once() - s.Equal(http.StatusBadRequest, resp.status) - s.Equal("invalid_request", s.decodeError(resp)["code"]) - }) - } -} - -// Контракт: "JSON с лишними полями или неверными типами — 400; malformed JSON также 400". -// Проверку выполняет сгенерированный слой, поэтому тест фиксирует границу, а не домен. -func (s *RouterSuite) TestRegisterRejectsMalformedBody() { - tests := map[string]string{ - "лишнее поле": `{"username":"alice","display_name":"Алиса","is_admin":true}`, - "неверный тип": `{"username":"alice","display_name":42}`, - "битый json": `{"username":"alice",`, - "не объект": `"alice"`, - "пропущено поле": `{"username":"alice"}`, - } - - for name, body := range tests { - s.Run(name, func() { - resp := s.sendRaw(http.MethodPost, "/api/v1/users", []byte(body), nil) - - s.Equal(http.StatusBadRequest, resp.status) - s.Equal("invalid_request", s.decodeError(resp)["code"]) - }) - } -} - -func (s *RouterSuite) TestCurrentUser() { - alice := s.register("alice") - - resp := s.do(http.MethodGet, "/api/v1/users/me", s.actor(alice)) - - s.Require().Equal(http.StatusOK, resp.status) - s.Equal(alice, s.decode(resp)) -} - -func (s *RouterSuite) TestCreateChatRequiresCallerAsMember() { - alice := s.register("alice") - bob := s.register("bob") - - resp := s.send(http.MethodPost, "/api/v1/chats", map[string]any{ - "title": "Без создателя", - "member_ids": []string{s.id(bob)}, - }, s.actor(alice)) - - s.Equal(http.StatusBadRequest, resp.status) - s.Equal("invalid_request", s.decodeError(resp)["code"]) -} - -func (s *RouterSuite) TestCreateChatRejectsUnknownMember() { - alice := s.register("alice") - - resp := s.send(http.MethodPost, "/api/v1/chats", map[string]any{ - "title": "Неизвестный участник", - "member_ids": []string{s.id(alice), "11111111-1111-4111-8111-111111111111"}, - }, s.actor(alice)) - - s.Equal(http.StatusBadRequest, resp.status) -} - -func (s *RouterSuite) TestCreateChatRejectsDuplicateMembers() { - alice := s.register("alice") - - resp := s.send(http.MethodPost, "/api/v1/chats", map[string]any{ - "title": "Дубликаты", - "member_ids": []string{s.id(alice), s.id(alice)}, - }, s.actor(alice)) - - s.Equal(http.StatusBadRequest, resp.status) -} - -func (s *RouterSuite) TestChatIsHiddenFromOutsider() { - alice := s.register("alice") - bob := s.register("bob") - eve := s.register("eve") - - chat := s.createChat(alice, s.id(alice), s.id(bob)) - - resp := s.do(http.MethodGet, "/api/v1/chats/"+s.id(chat), s.actor(eve)) - s.Equal(http.StatusNotFound, resp.status, "посторонний получает 404, а не 403") - - resp = s.do(http.MethodGet, "/api/v1/chats/"+s.id(chat), s.actor(bob)) - s.Equal(http.StatusOK, resp.status, "участник читает чат") -} - -func (s *RouterSuite) TestListChatsShowsOnlyVisibleChats() { - alice := s.register("alice") - bob := s.register("bob") - eve := s.register("eve") - - chat := s.createChat(alice, s.id(alice), s.id(bob)) - - resp := s.do(http.MethodGet, "/api/v1/chats", s.actor(bob)) - s.Require().Equal(http.StatusOK, resp.status) - - body := s.decode(resp) - items, ok := body["items"].([]any) - s.Require().True(ok) - s.Require().Len(items, 1) - s.Nil(body["next_cursor"]) - - first, ok := items[0].(map[string]any) - s.Require().True(ok) - s.Equal(s.id(chat), first["id"]) - - resp = s.do(http.MethodGet, "/api/v1/chats", s.actor(eve)) - s.Require().Equal(http.StatusOK, resp.status) - - body = s.decode(resp) - items, ok = body["items"].([]any) - s.Require().True(ok) - s.Empty(items, "чужой чат не попадает в список") -} - -func (s *RouterSuite) TestSenderIsDerivedFromIdentity() { - alice := s.register("alice") - bob := s.register("bob") - chat := s.createChat(alice, s.id(alice), s.id(bob)) - - resp := s.send(http.MethodPost, "/api/v1/chats/"+s.id(chat)+"/messages", map[string]any{ - "text": "Привет, мир 👋", - "sender_id": s.id(bob), - }, s.actor(alice)) - - s.Equal(http.StatusBadRequest, resp.status, "sender_id в запросе не принимается") - - resp = s.send(http.MethodPost, "/api/v1/chats/"+s.id(chat)+"/messages", map[string]any{ - "text": "Привет, мир 👋", - }, s.actor(alice)) - - s.Require().Equal(http.StatusCreated, resp.status) - - body := s.decode(resp) - s.Equal(s.id(alice), body["sender_id"]) - s.Equal(s.id(chat), body["chat_id"]) - s.Equal("Привет, мир 👋", body["text"]) -} - -func (s *RouterSuite) TestMessageTextValidation() { - alice := s.register("alice") - chat := s.createChat(alice, s.id(alice)) - path := "/api/v1/chats/" + s.id(chat) + "/messages" - - tests := map[string]string{ - "пустой текст": "", - "пробельный текст": " ", - "слишком длинный": strings.Repeat("я", 4001), - } - - for name, text := range tests { - s.Run(name, func() { - resp := s.send(http.MethodPost, path, map[string]any{"text": text}, s.actor(alice)) - - s.Equal(http.StatusBadRequest, resp.status) - s.Equal("invalid_request", s.decodeError(resp)["code"]) - }) - } -} - -func (s *RouterSuite) TestOutsiderCannotUseChat() { - alice := s.register("alice") - eve := s.register("eve") - chat := s.createChat(alice, s.id(alice)) - path := "/api/v1/chats/" + s.id(chat) + "/messages" - - resp := s.send(http.MethodPost, path, map[string]any{"text": "чужое"}, s.actor(eve)) - s.Equal(http.StatusNotFound, resp.status) - - resp = s.do(http.MethodGet, path, s.actor(eve)) - s.Equal(http.StatusNotFound, resp.status) -} - -func (s *RouterSuite) TestHistoryPaginationDoesNotRepeatItems() { - alice := s.register("alice") - chat := s.createChat(alice, s.id(alice)) - path := "/api/v1/chats/" + s.id(chat) + "/messages" - - const total = 5 - - for range total { - resp := s.send(http.MethodPost, path, map[string]any{"text": "сообщение"}, s.actor(alice)) - s.Require().Equal(http.StatusCreated, resp.status) - } - - seen := make(map[string]struct{}, total) - cursor := "" - - for { - query := path + "?limit=2" - if cursor != "" { - query += "&cursor=" + url.QueryEscape(cursor) - } - - resp := s.do(http.MethodGet, query, s.actor(alice)) - s.Require().Equal(http.StatusOK, resp.status) - - body := s.decode(resp) - items, ok := body["items"].([]any) - s.Require().True(ok) - - for _, item := range items { - message, ok := item.(map[string]any) - s.Require().True(ok) - - id, ok := message["id"].(string) - s.Require().True(ok) - - _, duplicate := seen[id] - s.Require().False(duplicate, "страницы не повторяют сообщения") - seen[id] = struct{}{} - } - - next, ok := body["next_cursor"].(string) - if !ok { - s.Nil(body["next_cursor"]) - - break - } - - cursor = next - } - - s.Len(seen, total) -} - -func (s *RouterSuite) TestCursorFromAnotherChatIsRejected() { - alice := s.register("alice") - first := s.createChat(alice, s.id(alice)) - second := s.createChat(alice, s.id(alice)) - - firstPath := "/api/v1/chats/" + s.id(first) + "/messages" - - for range 2 { - resp := s.send(http.MethodPost, firstPath, map[string]any{"text": "сообщение"}, s.actor(alice)) - s.Require().Equal(http.StatusCreated, resp.status) - } - - resp := s.do(http.MethodGet, firstPath+"?limit=1", s.actor(alice)) - s.Require().Equal(http.StatusOK, resp.status) - - cursor, ok := s.decode(resp)["next_cursor"].(string) - s.Require().True(ok) - - resp = s.do( + result = fixture.do( + t, http.MethodGet, - "/api/v1/chats/"+s.id(second)+"/messages?cursor="+url.QueryEscape(cursor), - s.actor(alice), + "/api/v1/chats/"+chatID.String()+"/messages?limit=1&cursor="+*body.NextCursor, + nil, + map[string]string{"Authorization": "Bearer opaque-token"}, ) - - s.Equal(http.StatusBadRequest, resp.status, "cursor привязан к чату") - s.Equal("invalid_request", s.decodeError(resp)["code"]) + require.Equal(t, http.StatusOK, result.status) } -func (s *RouterSuite) TestInvalidCursorIsRejected() { - alice := s.register("alice") - chat := s.createChat(alice, s.id(alice)) +func TestInvalidCursorIsRejected(t *testing.T) { + fixture := newRouterFixture(t) - resp := s.do( + user := domain.User{ID: uuid.New(), Username: "alice", DisplayName: "Алиса", CreatedAt: time.Now().UTC()} + fixture.sessions.EXPECT().Resolve(mock.Anything, mock.Anything).Return(user, nil).Maybe() + + result := fixture.do( + t, http.MethodGet, - "/api/v1/chats/"+s.id(chat)+"/messages?cursor=not-a-cursor", - s.actor(alice), + "/api/v1/chats/"+uuid.NewString()+"/messages?cursor=not-a-cursor", + nil, + map[string]string{"Authorization": "Bearer opaque-token"}, ) - - s.Equal(http.StatusBadRequest, resp.status) + require.Equal(t, http.StatusBadRequest, result.status) } -func (s *RouterSuite) TestLimitOutOfRangeIsRejected() { - alice := s.register("alice") - chat := s.createChat(alice, s.id(alice)) +func TestNotFoundAndMethodNotAllowed(t *testing.T) { + fixture := newRouterFixture(t) - for _, limit := range []string{"0", "101"} { - resp := s.do( - http.MethodGet, - "/api/v1/chats/"+s.id(chat)+"/messages?limit="+limit, - s.actor(alice), - ) + result := fixture.do(t, http.MethodGet, "/nope", nil, nil) + require.Equal(t, http.StatusNotFound, result.status) - s.Equal(http.StatusBadRequest, resp.status) - } -} - -func (s *RouterSuite) TestEmptyHistoryReturnsEmptyItems() { - alice := s.register("alice") - chat := s.createChat(alice, s.id(alice)) - - resp := s.do(http.MethodGet, "/api/v1/chats/"+s.id(chat)+"/messages", s.actor(alice)) - - s.Require().Equal(http.StatusOK, resp.status) - s.JSONEq(`{"items":[],"next_cursor":null}`, string(resp.body)) -} - -func (s *RouterSuite) TestSuccessfulRequestIsLogged() { - alice := s.register("alice") - - s.sink.Reset() - - resp := s.do(http.MethodGet, "/api/v1/users/me", s.actor(alice)) - s.Require().Equal(http.StatusOK, resp.status) - - records := s.records() - s.Require().Len(records, 2) - s.Equal("request accepted", records[0]["msg"]) - s.Equal("request handled", records[1]["msg"]) - s.NotEmpty(records[1]["duration"]) + result = fixture.do(t, http.MethodDelete, "/health/live", nil, nil) + require.Equal(t, http.StatusMethodNotAllowed, result.status) } diff --git a/internal/transport/rest/security.go b/internal/transport/rest/security.go index 709712ec..939ff1c3 100644 --- a/internal/transport/rest/security.go +++ b/internal/transport/rest/security.go @@ -7,50 +7,54 @@ import ( "github.com/google/uuid" "mtusi-messenger/internal/domain" - "mtusi-messenger/internal/transport/rest/oas" + "mtusi-messenger/internal/transport/rest/internal/oas" ) var ErrUnauthenticated = errors.New("caller is not identified") -type callerKey struct{} +type ( + callerKey struct{} + tokenKey struct{} + credentialsKey struct{} +) func CallerFromContext(ctx context.Context) (uuid.UUID, bool) { id, ok := ctx.Value(callerKey{}).(uuid.UUID) - return id, ok } func caller(ctx context.Context) uuid.UUID { id, _ := CallerFromContext(ctx) - return id } -type UserLookup interface { - GetByID(ctx context.Context, id uuid.UUID) (domain.User, error) +type SecSessionService interface { + Authenticate(ctx context.Context, username, password string) (domain.User, error) + Resolve(ctx context.Context, token string) (domain.User, error) } type SecurityHandler struct { - users UserLookup + sessions SecSessionService } -func NewSecurityHandler(users UserLookup) *SecurityHandler { - return &SecurityHandler{users: users} +func NewSecurityHandler(sessions SecSessionService) *SecurityHandler { + return &SecurityHandler{sessions: sessions} } -func (h *SecurityHandler) HandleDevUser( - ctx context.Context, - _ oas.OperationName, - t oas.DevUser, -) (context.Context, error) { - id, err := uuid.Parse(t.APIKey) +func (h *SecurityHandler) HandleBasicAuth(ctx context.Context, _ oas.OperationName, auth oas.BasicAuth) (context.Context, error) { + user, err := h.sessions.Authenticate(ctx, auth.Username, auth.Password) if err != nil { - return ctx, ErrUnauthenticated + return ctx, err } + ctx = context.WithValue(ctx, callerKey{}, user.ID) + return context.WithValue(ctx, credentialsKey{}, user), nil +} - if _, err := h.users.GetByID(ctx, id); err != nil { - return ctx, ErrUnauthenticated +func (h *SecurityHandler) HandleBearerAuth(ctx context.Context, _ oas.OperationName, auth oas.BearerAuth) (context.Context, error) { + user, err := h.sessions.Resolve(ctx, auth.Token) + if err != nil { + return ctx, err } - - return context.WithValue(ctx, callerKey{}, id), nil + ctx = context.WithValue(ctx, callerKey{}, user.ID) + return context.WithValue(ctx, tokenKey{}, auth.Token), nil } diff --git a/scripts/api_cache_performance.sh b/scripts/api_cache_performance.sh new file mode 100644 index 00000000..447921a9 --- /dev/null +++ b/scripts/api_cache_performance.sh @@ -0,0 +1,16 @@ +#!/bin/sh +set -eu + +ROOT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) +cd "$ROOT_DIR" + +mkdir -p evidence/cache + +{ + echo "# API cache performance experiment" + echo "# generated: $(date -u +%Y-%m-%dT%H:%M:%SZ)" + env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy \ + NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 \ + python3 tests/cache_api_performance.py +} > evidence/cache/api-performance.txt 2>&1 +cat evidence/cache/api-performance.txt diff --git a/scripts/cache_evidence.sh b/scripts/cache_evidence.sh new file mode 100644 index 00000000..b3f76283 --- /dev/null +++ b/scripts/cache_evidence.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +set -euo pipefail + +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +OUT="$ROOT/evidence/cache" +GO="${GO:-go}" + +cd "$ROOT" +mkdir -p "$OUT" + +{ + echo "# Cache consistency evidence (track 1)" + echo "# generated: $(date -u +%Y-%m-%dT%H:%M:%SZ)" + echo "# redis: ${TEST_REDIS_HOST:-localhost}:${TEST_REDIS_PORT:-6379} db=${TEST_REDIS_DB:-1}" + echo + "$GO" test -tags=integration -count=1 -v -timeout=5m \ + -run 'TestChatRepositorySuite|TestSessionRepositorySuite' \ + ./internal/storage/redis/... +} | tee "$OUT/consistency.txt" + +echo "wrote $OUT/consistency.txt" diff --git a/scripts/cache_latency_experiment.sh b/scripts/cache_latency_experiment.sh new file mode 100644 index 00000000..52438a39 --- /dev/null +++ b/scripts/cache_latency_experiment.sh @@ -0,0 +1,17 @@ +#!/bin/sh +set -eu + +ROOT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) +cd "$ROOT_DIR" + +mkdir -p evidence/cache + +{ + echo "# Cache latency experiment" + echo "# generated: $(date -u +%Y-%m-%dT%H:%M:%SZ)" + go version + uname -sm + go test -tags=integration -count=3 -timeout=5m -v \ + -run '^TestCacheLatencyExperiment$' ./internal/storage/postgres/... +} > evidence/cache/latency.txt 2>&1 +cat evidence/cache/latency.txt diff --git a/scripts/cache_performance_experiment.sh b/scripts/cache_performance_experiment.sh new file mode 100644 index 00000000..b431bb66 --- /dev/null +++ b/scripts/cache_performance_experiment.sh @@ -0,0 +1,17 @@ +#!/bin/sh +set -eu + +ROOT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) +cd "$ROOT_DIR" + +mkdir -p evidence/cache + +{ + echo "# Cache performance experiment" + echo "# generated: $(date -u +%Y-%m-%dT%H:%M:%SZ)" + go version + uname -sm + go test -tags=integration -count=3 -timeout=5m -v \ + -run '^TestCachePerformanceExperiment$' ./internal/storage/postgres/... +} > evidence/cache/performance.txt 2>&1 +cat evidence/cache/performance.txt diff --git a/scripts/redis_outage_check.py b/scripts/redis_outage_check.py new file mode 100644 index 00000000..966dcc94 --- /dev/null +++ b/scripts/redis_outage_check.py @@ -0,0 +1,132 @@ +#!/usr/bin/env python3 +"""Reproducible Redis-outage check: stop and pause, latency budget, create-during-outage. + +Exit code is non-zero when any assertion fails. Always unpauses/starts Redis. +""" +import concurrent.futures +import json +import os +import statistics +import subprocess +import sys +import time +import urllib.error +import urllib.request +import uuid +import base64 + +for proxy in ('HTTP_PROXY', 'HTTPS_PROXY', 'ALL_PROXY', 'http_proxy', 'https_proxy', 'all_proxy'): + os.environ.pop(proxy, None) +os.environ['NO_PROXY'] = 'localhost,127.0.0.1,::1' +os.environ['no_proxy'] = os.environ['NO_PROXY'] + +BASE_URL = os.environ.get('BASE_URL', 'http://localhost:8080') +COMPOSE = os.environ.get('COMPOSE_BIN', 'docker-compose') +COMPOSE_FILE = 'docker-compose.local.yaml' +BUDGET_MS = int(os.environ.get('OUTAGE_BUDGET_MS', '2000')) +PARALLEL = int(os.environ.get('OUTAGE_PARALLEL', '30')) + + +def compose(*args): + subprocess.run([COMPOSE, '-f', COMPOSE_FILE, *args], check=True, + stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + + +def call(method, path, body=None, headers=None): + data = json.dumps(body).encode() if body is not None else None + h = {'Accept': 'application/json'} + if body is not None: + h['Content-Type'] = 'application/json' + h.update(headers or {}) + req = urllib.request.Request(BASE_URL + path, data=data, headers=h, method=method) + started = time.monotonic() + try: + resp = urllib.request.urlopen(req, timeout=10) + return resp.status, resp.read(), (time.monotonic() - started) * 1000 + except urllib.error.HTTPError as exc: + return exc.code, exc.read(), (time.monotonic() - started) * 1000 + + +def user(label): + username = label + '_' + uuid.uuid4().hex[:8] + password = 'T3st-' + uuid.uuid4().hex + call('POST', '/api/v1/users', {'username': username, 'display_name': label, 'password': password}) + credential = base64.b64encode((username + ':' + password).encode()).decode() + _, body, _ = call('POST', '/api/v1/auth/sessions', headers={'Authorization': 'Basic ' + credential}) + return json.loads(body) + + +def list_chats(actor): + status, body, ms = call('GET', '/api/v1/chats?limit=50', headers={'Authorization': 'Bearer ' + actor['token']}) + assert status == 200, 'GET /chats expected 200, got %d' % status + return json.loads(body)['items'], ms + + +def assert_budget(label, samples): + worst = max(samples) + p95 = sorted(samples)[max(0, (len(samples) * 95 + 99) // 100 - 1)] + print(' %s: n=%d max=%.0fms p95=%.0fms budget=%dms' % (label, len(samples), worst, p95, BUDGET_MS)) + assert worst <= BUDGET_MS, '%s exceeded budget: %.0fms > %dms' % (label, worst, BUDGET_MS) + + +def main(): + alice = user('alice') + bob = user('bob') + ah = {'Authorization': 'Bearer ' + alice['token']} + + try: + _, ms = list_chats(alice) + print('baseline: %.0fms' % ms) + + compose('stop', 'redis') + _, ms = list_chats(alice) + print('after stop: %.0fms' % ms) + assert_budget('stop', [ms]) + + compose('start', 'redis') + time.sleep(2) + compose('pause', 'redis') + + with concurrent.futures.ThreadPoolExecutor(max_workers=PARALLEL) as pool: + results = [f for f in pool.map(lambda _: list_chats(alice), range(PARALLEL))] + assert_budget('pause parallel', [ms for _, ms in results]) + + title = 'during-outage-' + uuid.uuid4().hex[:8] + status, _, _ = call('POST', '/api/v1/chats', { + 'title': title, + 'member_ids': [alice['user']['id'], bob['user']['id']], + }, headers=ah) + assert status == 201, 'chat create during pause expected 201, got %d' % status + print('create during pause: 201') + + compose('unpause', 'redis') + time.sleep(2) + + chats, ms = list_chats(alice) + assert any(c['title'] == title for c in chats), 'new chat missing after recovery (stale cache)' + print('after recovery: new chat visible, %.0fms' % ms) + + stuck = subprocess.run( + [COMPOSE, '-f', COMPOSE_FILE, 'exec', '-T', 'redis', 'redis-cli', '--scan', '--pattern', 'lock:*'], + check=True, capture_output=True, text=True, + ).stdout.split() + for key in stuck: + ttl = subprocess.run( + [COMPOSE, '-f', COMPOSE_FILE, 'exec', '-T', 'redis', 'redis-cli', 'ttl', key], + check=True, capture_output=True, text=True, + ).stdout.strip() + assert ttl != '-1', 'stuck lock without TTL: %s' % key + print('lock keys without TTL: 0') + print('PASS: redis outage handled within budget') + finally: + for action in ('unpause', 'start'): + subprocess.run([COMPOSE, '-f', COMPOSE_FILE, action, 'redis'], + stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + + +if __name__ == '__main__': + try: + main() + except AssertionError as exc: + print('FAIL: %s' % exc) + sys.exit(1) diff --git a/scripts/restart.sh b/scripts/restart.sh new file mode 100644 index 00000000..3b511d3e --- /dev/null +++ b/scripts/restart.sh @@ -0,0 +1,11 @@ +#!/bin/sh +set -eu + +ROOT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) +COMPOSE_BIN=${COMPOSE_BIN:-docker-compose} + +cd "$ROOT_DIR" + +"$COMPOSE_BIN" -f docker-compose.local.yaml restart postgres redis +"$COMPOSE_BIN" -f docker-compose.local.yaml up -d --wait postgres redis +"$COMPOSE_BIN" -f docker-compose.local.yaml up -d --force-recreate api diff --git a/sqlc.yaml b/sqlc.yaml new file mode 100644 index 00000000..23ec861a --- /dev/null +++ b/sqlc.yaml @@ -0,0 +1,19 @@ +# https://docs.sqlc.dev/en/latest/reference/config.html +version: "2" +sql: + - engine: "postgresql" + schema: "internal/storage/postgres/migrations" + queries: "internal/storage/postgres/queries" + gen: + go: + package: "sqlcgen" + out: "internal/storage/postgres/internal/sqlcgen" + sql_package: "pgx/v5" + emit_empty_slices: true + emit_json_tags: false + emit_prepared_queries: false + overrides: + - db_type: "uuid" + go_type: "github.com/google/uuid.UUID" + - db_type: "timestamptz" + go_type: "time.Time" diff --git a/tests/cache_api_performance.py b/tests/cache_api_performance.py new file mode 100644 index 00000000..f6843472 --- /dev/null +++ b/tests/cache_api_performance.py @@ -0,0 +1,153 @@ +#!/usr/bin/env python3 +import os +import json +import urllib.request +from concurrent.futures import ThreadPoolExecutor +from statistics import median +import subprocess +import time + +from client import Client, check + + +ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +COMPOSE = os.environ.get('COMPOSE_BIN', 'docker-compose') +BASE_URL = os.environ.get('BASE_URL', 'http://localhost:8080') +USERS = 4 +CHATS_PER_USER = 15 +REQUESTS_PER_USER = 250 +WORKERS = 8 + +for proxy_name in ('HTTP_PROXY', 'HTTPS_PROXY', 'ALL_PROXY', 'http_proxy', 'https_proxy', 'all_proxy'): + os.environ.pop(proxy_name, None) +os.environ['NO_PROXY'] = 'localhost,127.0.0.1,::1' +os.environ['no_proxy'] = os.environ['NO_PROXY'] + + +def restart_api(cache_enabled): + env = dict(os.environ) + env['REDIS_ENABLED'] = 'true' + env['CACHE_ENABLED'] = 'true' if cache_enabled else 'false' + subprocess.run( + [COMPOSE, '-f', 'docker-compose.local.yaml', 'up', '-d', '--force-recreate', 'api'], + cwd=ROOT, + env=env, + check=True, + stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL, + ) + + deadline = time.monotonic() + 90 + while time.monotonic() < deadline: + try: + Client(BASE_URL, timeout=2).call('GET', '/health/ready', schema='Health') + return + except Exception: + time.sleep(0.5) + raise RuntimeError('API did not become ready after restart') + + +def percentile(values, percent): + values = sorted(values) + index = max(0, (len(values) * percent + 99) // 100 - 1) + return values[index] + + +def benchmark(actors): + requests = [(actor, i) for i in range(REQUESTS_PER_USER) for actor in actors] + latencies = [] + failures = [] + started = time.monotonic() + + def request(item): + actor, _ = item + request_started = time.monotonic() + request = urllib.request.Request( + BASE_URL + '/api/v1/chats?limit=50', + headers={ + 'Accept': 'application/json', + 'Authorization': 'Bearer ' + actor['token'], + }, + ) + try: + with urllib.request.urlopen(request, timeout=10) as response: + data = response.read() + status = response.status + check(status == 200, + 'unexpected HTTP status: ' + str(status) + ' body=' + data.decode()) + result = json.loads(data) + check(len(result['items']) == 30, 'unexpected chat count') + check(all(actor['id'] in chat['member_ids'] for chat in result['items']), + 'response contains another user chat') + return time.monotonic() - request_started, None + except Exception as exc: + return 0, type(exc).__name__ + ': ' + str(exc) + + with ThreadPoolExecutor(max_workers=WORKERS) as pool: + for latency, error in pool.map(request, requests): + if error is None: + latencies.append(latency) + else: + failures.append(error) + + duration = time.monotonic() - started + if failures: + raise RuntimeError( + 'API benchmark failed: %d/%d requests; first error: %s' + % (len(failures), len(requests), failures[0]) + ) + return { + 'requests': len(latencies), + 'workers': WORKERS, + 'duration_seconds': duration, + 'rps': len(latencies) / duration, + 'p50_ms': median(latencies) * 1000, + 'p95_ms': percentile(latencies, 95) * 1000, + 'p99_ms': percentile(latencies, 99) * 1000, + } + + +def main(): + client = Client(BASE_URL, timeout=10) + actors = [client.user('perf_api_' + str(i)) for i in range(USERS)] + + for index, owner in enumerate(actors): + member = actors[(index + 1) % len(actors)] + for chat_index in range(CHATS_PER_USER): + client.call( + 'POST', + '/api/v1/chats', + expected=201, + actor=owner, + body={ + 'title': 'API performance chat ' + str(index) + '-' + str(chat_index), + 'member_ids': [owner['id'], member['id']], + }, + schema='Chat', + ) + + results = [] + try: + for trial in range(2): + for enabled in (False, True): + restart_api(enabled) + for actor in actors: + for _ in range(5): + client.call('GET', '/api/v1/chats?limit=50', actor=actor, schema='ChatPage') + print( + 'running trial %d, cache=%s, requests=%d' % + (trial + 1, enabled, len(actors) * REQUESTS_PER_USER), + flush=True, + ) + result = benchmark(actors) + result.update(trial=trial + 1, cache_enabled=enabled) + results.append(result) + print(json.dumps(result), flush=True) + finally: + restart_api(True) + print(json.dumps({'results': results, 'users': USERS, 'chats': USERS * CHATS_PER_USER, + 'sessions_cached_in_both_modes': True}), flush=True) + + +if __name__ == '__main__': + main() -- 2.54.0 From 5830eb43e85af1acb441037aaa43f14bc96fe46e Mon Sep 17 00:00:00 2001 From: Vladislav Kunetskiy Date: Thu, 15 Oct 2026 22:20:33 +0300 Subject: [PATCH 3/3] lab3 --- .dockerignore | 4 + .env.example | 91 +- .github/workflows/app.yml | 30 + .gitignore | 2 + Dockerfile | 16 +- Makefile | 127 +- REPORT.md | 231 +++- cmd/messenger/main.go | 3 +- compose.yaml | 173 +++ config/dev/config.yaml | 7 + evidence/arch.txt | 7 + evidence/body-limit.txt | 3 + evidence/db-outage.txt | 7 + evidence/failover/run1.txt | 5 + evidence/failover/run2.txt | 5 + evidence/failover/sequential.txt | 54 + evidence/idempotency.txt | 4 + evidence/lab1-2/README.md | 17 + .../{ => lab1-2}/cache/api-performance.txt | 0 evidence/{ => lab1-2}/cache/consistency.txt | 0 evidence/{ => lab1-2}/cache/latency.txt | 0 evidence/{ => lab1-2}/cache/performance.txt | 0 evidence/{ => lab1-2}/cache/redis-outage.txt | 0 evidence/{ => lab1-2}/check.txt | 0 evidence/{ => lab1-2}/concurrency.txt | 0 evidence/{ => lab1-2}/docker.txt | 0 evidence/{ => lab1-2}/health.txt | 0 evidence/{ => lab1-2}/memory-experiment.json | 0 evidence/{ => lab1-2}/memory-experiment.png | Bin evidence/{ => lab1-2}/memory-experiment.txt | 0 .../{ => lab1-2}/postgres/explain-analyze.txt | 0 evidence/lab1-2/quality.txt | 43 + evidence/{ => lab1-2}/restart.txt | 0 evidence/{ => lab1-2}/sigterm.txt | 0 .../baseline-storage-benchmark.txt | 0 .../track1-benchmark}/baseline.json | 0 .../track1-benchmark}/comparison.json | 0 .../go-baseline/results.json | 0 .../track1-benchmark}/go-comparison.json | 0 .../go-optimized/results.json | 0 .../optimized-storage-benchmark.txt | 0 .../track1-benchmark}/optimized.json | 0 evidence/lb-readiness.txt | 31 + evidence/load-32clients.json | 17 + evidence/load-32clients.txt | 18 + evidence/native-load.json | 22 + evidence/native-load.txt | 23 + evidence/path-overhead/README.md | 40 + evidence/path-overhead/inside.txt | 17 + evidence/path-overhead/load-inside.json | 17 + evidence/path-overhead/load-outside.json | 17 + evidence/path-overhead/outside.txt | 17 + evidence/path-overhead/summary.txt | 9 + evidence/persistence.txt | 4 + evidence/quality.txt | 68 +- evidence/quota-semantics.txt | 33 + evidence/rolling-update/after/load.json | 26 + evidence/rolling-update/after/load.txt | 26 + .../rolling-update/after/rolling-update.txt | 136 ++ evidence/rolling-update/emulated/load.json | 23 + evidence/rolling-update/emulated/load.txt | 23 + .../emulated/rolling-update.txt | 134 ++ evidence/smoke.txt | 5 +- evidence/stand.txt | 34 + evidence/track1/load-ctl1base.json | 17 + evidence/track1/load-ctl2pg.json | 17 + evidence/track1/load-ctl3base.json | 17 + evidence/track1/load-ctl4lb.json | 17 + evidence/track1/load-d2.json | 17 + evidence/track1/load-db1cpu.json | 17 + evidence/track1/load-g05.json | 17 + evidence/track1/load-g10.json | 17 + evidence/track1/load-g15.json | 17 + evidence/track1/load-lb1cpu.json | 17 + evidence/track1/load-pool10.json | 17 + evidence/track1/load-pool5.json | 17 + evidence/track1/load-r1.json | 17 + evidence/track1/load-r2.json | 17 + evidence/track1/load-r4.json | 17 + evidence/track1/profile-ctl1base.json | 1 + evidence/track1/profile-ctl2pg.json | 1 + evidence/track1/profile-ctl3base.json | 1 + evidence/track1/profile-ctl4lb.json | 1 + evidence/track1/profile-d2.json | 1 + evidence/track1/profile-db1cpu.json | 1 + evidence/track1/profile-g05.json | 1 + evidence/track1/profile-g10.json | 1 + evidence/track1/profile-g15.json | 1 + evidence/track1/profile-lb1cpu.json | 1 + evidence/track1/profile-pool10.json | 1 + evidence/track1/profile-pool5.json | 1 + evidence/track1/profile-r1.json | 1 + evidence/track1/profile-r2.json | 1 + evidence/track1/profile-r4.json | 1 + evidence/track1/scaling-fixed-budget.png | Bin 0 -> 55891 bytes evidence/track1/scaling-growth.png | Bin 0 -> 63171 bytes evidence/track1/stats-ctl1base.csv | 160 +++ evidence/track1/stats-ctl2pg.csv | 160 +++ evidence/track1/stats-ctl3base.csv | 161 +++ evidence/track1/stats-ctl4lb.csv | 160 +++ evidence/track1/stats-d2.csv | 160 +++ evidence/track1/stats-db1cpu.csv | 160 +++ evidence/track1/stats-g05.csv | 160 +++ evidence/track1/stats-g10.csv | 160 +++ evidence/track1/stats-g15.csv | 160 +++ evidence/track1/stats-lb1cpu.csv | 160 +++ evidence/track1/stats-pool10.csv | 200 +++ evidence/track1/stats-pool5.csv | 200 +++ evidence/track1/stats-r1.csv | 141 ++ evidence/track1/stats-r2.csv | 160 +++ evidence/track1/stats-r4.csv | 200 +++ evidence/track1/summary.md | 19 + evidence/track1/summary.txt | 411 ++++++ evidence/track1/superseded/README.md | 22 + .../run1-wrong-budgets/load-db1cpu.json | 17 + .../run1-wrong-budgets/load-g05.json | 17 + .../run1-wrong-budgets/load-g10.json | 17 + .../run1-wrong-budgets/load-g15.json | 17 + .../run1-wrong-budgets/load-pool10.json | 17 + .../run1-wrong-budgets/load-pool5.json | 17 + .../run1-wrong-budgets/load-r1.json | 17 + .../run1-wrong-budgets/load-r2.json | 17 + .../run1-wrong-budgets/load-r4.json | 17 + .../run1-wrong-budgets/profile-db1cpu.json | 1 + .../run1-wrong-budgets/profile-g05.json | 1 + .../run1-wrong-budgets/profile-g10.json | 1 + .../run1-wrong-budgets/profile-g15.json | 1 + .../run1-wrong-budgets/profile-pool10.json | 1 + .../run1-wrong-budgets/profile-pool5.json | 1 + .../run1-wrong-budgets/profile-r1.json | 1 + .../run1-wrong-budgets/profile-r2.json | 1 + .../run1-wrong-budgets/profile-r4.json | 1 + .../scaling-fixed-budget.png | Bin 0 -> 57179 bytes .../run1-wrong-budgets/scaling-growth.png | Bin 0 -> 60008 bytes .../run1-wrong-budgets/stats-db1cpu.csv | 101 ++ .../run1-wrong-budgets/stats-g05.csv | 101 ++ .../run1-wrong-budgets/stats-g10.csv | 101 ++ .../run1-wrong-budgets/stats-g15.csv | 101 ++ .../run1-wrong-budgets/stats-pool10.csv | 137 ++ .../run1-wrong-budgets/stats-pool5.csv | 141 ++ .../run1-wrong-budgets/stats-r1.csv | 81 ++ .../run1-wrong-budgets/stats-r2.csv | 101 ++ .../run1-wrong-budgets/stats-r4.csv | 141 ++ .../superseded/run1-wrong-budgets/summary.md | 13 + .../superseded/run1-wrong-budgets/summary.txt | 455 +++++++ .../run2-host-client/load-db1cpu.json | 17 + .../superseded/run2-host-client/load-g05.json | 17 + .../superseded/run2-host-client/load-g10.json | 17 + .../superseded/run2-host-client/load-g15.json | 17 + .../run2-host-client/load-lb1cpu.json | 17 + .../run2-host-client/load-pool10.json | 17 + .../run2-host-client/load-pool5.json | 17 + .../superseded/run2-host-client/load-r1.json | 17 + .../superseded/run2-host-client/load-r2.json | 17 + .../superseded/run2-host-client/load-r4.json | 17 + .../run2-host-client/profile-db1cpu.json | 1 + .../run2-host-client/profile-g05.json | 1 + .../run2-host-client/profile-g10.json | 1 + .../run2-host-client/profile-g15.json | 1 + .../run2-host-client/profile-lb1cpu.json | 1 + .../run2-host-client/profile-pool10.json | 1 + .../run2-host-client/profile-pool5.json | 1 + .../run2-host-client/profile-r1.json | 1 + .../run2-host-client/profile-r2.json | 1 + .../run2-host-client/profile-r4.json | 1 + .../run2-host-client/scaling-fixed-budget.png | Bin 0 -> 55968 bytes .../run2-host-client/scaling-growth.png | Bin 0 -> 56829 bytes .../run2-host-client/stats-db1cpu.csv | 148 ++ .../superseded/run2-host-client/stats-g05.csv | 141 ++ .../superseded/run2-host-client/stats-g10.csv | 141 ++ .../superseded/run2-host-client/stats-g15.csv | 141 ++ .../run2-host-client/stats-lb1cpu.csv | 141 ++ .../run2-host-client/stats-pool10.csv | 181 +++ .../run2-host-client/stats-pool5.csv | 181 +++ .../superseded/run2-host-client/stats-r1.csv | 121 ++ .../superseded/run2-host-client/stats-r2.csv | 141 ++ .../superseded/run2-host-client/stats-r4.csv | 181 +++ .../superseded/run2-host-client/summary.md | 14 + .../superseded/run2-host-client/summary.txt | 300 +++++ infra/lb/haproxy.cfg | 71 + internal/config/config.go | 26 +- internal/domain/errors.go | 1 + internal/domain/message.go | 27 +- internal/domain/validation_test.go | 26 +- internal/service/message/service_test.go | 7 +- internal/storage/postgres/errors.go | 10 +- internal/storage/postgres/idempotency_test.go | 183 +++ .../internal/sqlcgen/idempotency.sql.go | 128 ++ .../postgres/internal/sqlcgen/models.go | 11 + internal/storage/postgres/main_test.go | 15 +- .../storage/postgres/message_repository.go | 96 +- .../postgres/message_repository_test.go | 40 +- .../migrations/00003_message_idempotency.sql | 25 + .../storage/postgres/queries/idempotency.sql | 40 + internal/storage/postgres/store.go | 16 +- internal/transport/rest/bodylimit.go | 35 + internal/transport/rest/errors.go | 3 +- internal/transport/rest/handler.go | 24 + internal/transport/rest/instance.go | 67 + internal/transport/rest/instance_test.go | 77 ++ .../rest/internal/oas/oas_cfg_gen.go | 3 +- .../rest/internal/oas/oas_handlers_gen.go | 4 + .../rest/internal/oas/oas_parameters_gen.go | 67 + .../internal/oas/oas_response_encoders_gen.go | 1190 ++++++++++++++++- .../rest/internal/oas/oas_router_gen.go | 2 +- .../rest/internal/oas/oas_schemas_gen.go | 161 ++- .../rest/internal/oas/oas_validators_gen.go | 330 +++++ internal/transport/rest/logging.go | 20 +- internal/transport/rest/logging_test.go | 22 + internal/transport/rest/router.go | 5 +- internal/transport/rest/router_test.go | 148 +- scripts/api_cache_performance.sh | 2 +- scripts/lb_readiness_check.sh | 194 +++ scripts/path_overhead_check.sh | 68 + scripts/restart.sh | 59 +- scripts/rolling_update.sh | 231 ++++ scripts/stop-one.sh | 72 + scripts/track1_benchmark.py | 267 ---- scripts/track1_controls.sh | 48 + scripts/track1_report.py | 209 +++ scripts/track1_scaling.sh | 319 +++++ scripts/track1_series.sh | 69 + .../cache_api_performance.py | 9 +- student-tests/idempotency_parallel.py | 144 ++ student-tests/replica_failover.py | 197 +++ student-tests/rolling_update_load.py | 157 +++ student-tests/tests_helpers.py | 48 + 227 files changed, 12913 insertions(+), 499 deletions(-) create mode 100644 compose.yaml create mode 100644 evidence/arch.txt create mode 100644 evidence/body-limit.txt create mode 100644 evidence/db-outage.txt create mode 100644 evidence/failover/run1.txt create mode 100644 evidence/failover/run2.txt create mode 100644 evidence/failover/sequential.txt create mode 100644 evidence/idempotency.txt create mode 100644 evidence/lab1-2/README.md rename evidence/{ => lab1-2}/cache/api-performance.txt (100%) rename evidence/{ => lab1-2}/cache/consistency.txt (100%) rename evidence/{ => lab1-2}/cache/latency.txt (100%) rename evidence/{ => lab1-2}/cache/performance.txt (100%) rename evidence/{ => lab1-2}/cache/redis-outage.txt (100%) rename evidence/{ => lab1-2}/check.txt (100%) rename evidence/{ => lab1-2}/concurrency.txt (100%) rename evidence/{ => lab1-2}/docker.txt (100%) rename evidence/{ => lab1-2}/health.txt (100%) rename evidence/{ => lab1-2}/memory-experiment.json (100%) rename evidence/{ => lab1-2}/memory-experiment.png (100%) rename evidence/{ => lab1-2}/memory-experiment.txt (100%) rename evidence/{ => lab1-2}/postgres/explain-analyze.txt (100%) create mode 100644 evidence/lab1-2/quality.txt rename evidence/{ => lab1-2}/restart.txt (100%) rename evidence/{ => lab1-2}/sigterm.txt (100%) rename evidence/{track1 => lab1-2/track1-benchmark}/baseline-storage-benchmark.txt (100%) rename evidence/{track1 => lab1-2/track1-benchmark}/baseline.json (100%) rename evidence/{track1 => lab1-2/track1-benchmark}/comparison.json (100%) rename evidence/{track1 => lab1-2/track1-benchmark}/go-baseline/results.json (100%) rename evidence/{track1 => lab1-2/track1-benchmark}/go-comparison.json (100%) rename evidence/{track1 => lab1-2/track1-benchmark}/go-optimized/results.json (100%) rename evidence/{track1 => lab1-2/track1-benchmark}/optimized-storage-benchmark.txt (100%) rename evidence/{track1 => lab1-2/track1-benchmark}/optimized.json (100%) create mode 100644 evidence/lb-readiness.txt create mode 100644 evidence/load-32clients.json create mode 100644 evidence/load-32clients.txt create mode 100644 evidence/native-load.json create mode 100644 evidence/native-load.txt create mode 100644 evidence/path-overhead/README.md create mode 100644 evidence/path-overhead/inside.txt create mode 100644 evidence/path-overhead/load-inside.json create mode 100644 evidence/path-overhead/load-outside.json create mode 100644 evidence/path-overhead/outside.txt create mode 100644 evidence/path-overhead/summary.txt create mode 100644 evidence/persistence.txt create mode 100644 evidence/quota-semantics.txt create mode 100644 evidence/rolling-update/after/load.json create mode 100644 evidence/rolling-update/after/load.txt create mode 100644 evidence/rolling-update/after/rolling-update.txt create mode 100644 evidence/rolling-update/emulated/load.json create mode 100644 evidence/rolling-update/emulated/load.txt create mode 100644 evidence/rolling-update/emulated/rolling-update.txt create mode 100644 evidence/stand.txt create mode 100644 evidence/track1/load-ctl1base.json create mode 100644 evidence/track1/load-ctl2pg.json create mode 100644 evidence/track1/load-ctl3base.json create mode 100644 evidence/track1/load-ctl4lb.json create mode 100644 evidence/track1/load-d2.json create mode 100644 evidence/track1/load-db1cpu.json create mode 100644 evidence/track1/load-g05.json create mode 100644 evidence/track1/load-g10.json create mode 100644 evidence/track1/load-g15.json create mode 100644 evidence/track1/load-lb1cpu.json create mode 100644 evidence/track1/load-pool10.json create mode 100644 evidence/track1/load-pool5.json create mode 100644 evidence/track1/load-r1.json create mode 100644 evidence/track1/load-r2.json create mode 100644 evidence/track1/load-r4.json create mode 100644 evidence/track1/profile-ctl1base.json create mode 100644 evidence/track1/profile-ctl2pg.json create mode 100644 evidence/track1/profile-ctl3base.json create mode 100644 evidence/track1/profile-ctl4lb.json create mode 100644 evidence/track1/profile-d2.json create mode 100644 evidence/track1/profile-db1cpu.json create mode 100644 evidence/track1/profile-g05.json create mode 100644 evidence/track1/profile-g10.json create mode 100644 evidence/track1/profile-g15.json create mode 100644 evidence/track1/profile-lb1cpu.json create mode 100644 evidence/track1/profile-pool10.json create mode 100644 evidence/track1/profile-pool5.json create mode 100644 evidence/track1/profile-r1.json create mode 100644 evidence/track1/profile-r2.json create mode 100644 evidence/track1/profile-r4.json create mode 100644 evidence/track1/scaling-fixed-budget.png create mode 100644 evidence/track1/scaling-growth.png create mode 100644 evidence/track1/stats-ctl1base.csv create mode 100644 evidence/track1/stats-ctl2pg.csv create mode 100644 evidence/track1/stats-ctl3base.csv create mode 100644 evidence/track1/stats-ctl4lb.csv create mode 100644 evidence/track1/stats-d2.csv create mode 100644 evidence/track1/stats-db1cpu.csv create mode 100644 evidence/track1/stats-g05.csv create mode 100644 evidence/track1/stats-g10.csv create mode 100644 evidence/track1/stats-g15.csv create mode 100644 evidence/track1/stats-lb1cpu.csv create mode 100644 evidence/track1/stats-pool10.csv create mode 100644 evidence/track1/stats-pool5.csv create mode 100644 evidence/track1/stats-r1.csv create mode 100644 evidence/track1/stats-r2.csv create mode 100644 evidence/track1/stats-r4.csv create mode 100644 evidence/track1/summary.md create mode 100644 evidence/track1/summary.txt create mode 100644 evidence/track1/superseded/README.md create mode 100644 evidence/track1/superseded/run1-wrong-budgets/load-db1cpu.json create mode 100644 evidence/track1/superseded/run1-wrong-budgets/load-g05.json create mode 100644 evidence/track1/superseded/run1-wrong-budgets/load-g10.json create mode 100644 evidence/track1/superseded/run1-wrong-budgets/load-g15.json create mode 100644 evidence/track1/superseded/run1-wrong-budgets/load-pool10.json create mode 100644 evidence/track1/superseded/run1-wrong-budgets/load-pool5.json create mode 100644 evidence/track1/superseded/run1-wrong-budgets/load-r1.json create mode 100644 evidence/track1/superseded/run1-wrong-budgets/load-r2.json create mode 100644 evidence/track1/superseded/run1-wrong-budgets/load-r4.json create mode 100644 evidence/track1/superseded/run1-wrong-budgets/profile-db1cpu.json create mode 100644 evidence/track1/superseded/run1-wrong-budgets/profile-g05.json create mode 100644 evidence/track1/superseded/run1-wrong-budgets/profile-g10.json create mode 100644 evidence/track1/superseded/run1-wrong-budgets/profile-g15.json create mode 100644 evidence/track1/superseded/run1-wrong-budgets/profile-pool10.json create mode 100644 evidence/track1/superseded/run1-wrong-budgets/profile-pool5.json create mode 100644 evidence/track1/superseded/run1-wrong-budgets/profile-r1.json create mode 100644 evidence/track1/superseded/run1-wrong-budgets/profile-r2.json create mode 100644 evidence/track1/superseded/run1-wrong-budgets/profile-r4.json create mode 100644 evidence/track1/superseded/run1-wrong-budgets/scaling-fixed-budget.png create mode 100644 evidence/track1/superseded/run1-wrong-budgets/scaling-growth.png create mode 100644 evidence/track1/superseded/run1-wrong-budgets/stats-db1cpu.csv create mode 100644 evidence/track1/superseded/run1-wrong-budgets/stats-g05.csv create mode 100644 evidence/track1/superseded/run1-wrong-budgets/stats-g10.csv create mode 100644 evidence/track1/superseded/run1-wrong-budgets/stats-g15.csv create mode 100644 evidence/track1/superseded/run1-wrong-budgets/stats-pool10.csv create mode 100644 evidence/track1/superseded/run1-wrong-budgets/stats-pool5.csv create mode 100644 evidence/track1/superseded/run1-wrong-budgets/stats-r1.csv create mode 100644 evidence/track1/superseded/run1-wrong-budgets/stats-r2.csv create mode 100644 evidence/track1/superseded/run1-wrong-budgets/stats-r4.csv create mode 100644 evidence/track1/superseded/run1-wrong-budgets/summary.md create mode 100644 evidence/track1/superseded/run1-wrong-budgets/summary.txt create mode 100644 evidence/track1/superseded/run2-host-client/load-db1cpu.json create mode 100644 evidence/track1/superseded/run2-host-client/load-g05.json create mode 100644 evidence/track1/superseded/run2-host-client/load-g10.json create mode 100644 evidence/track1/superseded/run2-host-client/load-g15.json create mode 100644 evidence/track1/superseded/run2-host-client/load-lb1cpu.json create mode 100644 evidence/track1/superseded/run2-host-client/load-pool10.json create mode 100644 evidence/track1/superseded/run2-host-client/load-pool5.json create mode 100644 evidence/track1/superseded/run2-host-client/load-r1.json create mode 100644 evidence/track1/superseded/run2-host-client/load-r2.json create mode 100644 evidence/track1/superseded/run2-host-client/load-r4.json create mode 100644 evidence/track1/superseded/run2-host-client/profile-db1cpu.json create mode 100644 evidence/track1/superseded/run2-host-client/profile-g05.json create mode 100644 evidence/track1/superseded/run2-host-client/profile-g10.json create mode 100644 evidence/track1/superseded/run2-host-client/profile-g15.json create mode 100644 evidence/track1/superseded/run2-host-client/profile-lb1cpu.json create mode 100644 evidence/track1/superseded/run2-host-client/profile-pool10.json create mode 100644 evidence/track1/superseded/run2-host-client/profile-pool5.json create mode 100644 evidence/track1/superseded/run2-host-client/profile-r1.json create mode 100644 evidence/track1/superseded/run2-host-client/profile-r2.json create mode 100644 evidence/track1/superseded/run2-host-client/profile-r4.json create mode 100644 evidence/track1/superseded/run2-host-client/scaling-fixed-budget.png create mode 100644 evidence/track1/superseded/run2-host-client/scaling-growth.png create mode 100644 evidence/track1/superseded/run2-host-client/stats-db1cpu.csv create mode 100644 evidence/track1/superseded/run2-host-client/stats-g05.csv create mode 100644 evidence/track1/superseded/run2-host-client/stats-g10.csv create mode 100644 evidence/track1/superseded/run2-host-client/stats-g15.csv create mode 100644 evidence/track1/superseded/run2-host-client/stats-lb1cpu.csv create mode 100644 evidence/track1/superseded/run2-host-client/stats-pool10.csv create mode 100644 evidence/track1/superseded/run2-host-client/stats-pool5.csv create mode 100644 evidence/track1/superseded/run2-host-client/stats-r1.csv create mode 100644 evidence/track1/superseded/run2-host-client/stats-r2.csv create mode 100644 evidence/track1/superseded/run2-host-client/stats-r4.csv create mode 100644 evidence/track1/superseded/run2-host-client/summary.md create mode 100644 evidence/track1/superseded/run2-host-client/summary.txt create mode 100644 infra/lb/haproxy.cfg create mode 100644 internal/storage/postgres/idempotency_test.go create mode 100644 internal/storage/postgres/internal/sqlcgen/idempotency.sql.go create mode 100644 internal/storage/postgres/migrations/00003_message_idempotency.sql create mode 100644 internal/storage/postgres/queries/idempotency.sql create mode 100644 internal/transport/rest/bodylimit.go create mode 100644 internal/transport/rest/instance.go create mode 100644 internal/transport/rest/instance_test.go create mode 100755 scripts/lb_readiness_check.sh create mode 100755 scripts/path_overhead_check.sh mode change 100644 => 100755 scripts/restart.sh create mode 100755 scripts/rolling_update.sh create mode 100755 scripts/stop-one.sh delete mode 100644 scripts/track1_benchmark.py create mode 100755 scripts/track1_controls.sh create mode 100755 scripts/track1_report.py create mode 100755 scripts/track1_scaling.sh create mode 100755 scripts/track1_series.sh rename {tests => student-tests}/cache_api_performance.py (95%) create mode 100755 student-tests/idempotency_parallel.py create mode 100755 student-tests/replica_failover.py create mode 100755 student-tests/rolling_update_load.py create mode 100644 student-tests/tests_helpers.py diff --git a/.dockerignore b/.dockerignore index bc16e556..8a8cc9df 100644 --- a/.dockerignore +++ b/.dockerignore @@ -18,3 +18,7 @@ __pycache__ node_modules evidence .DS_Store +bin +coverage.out +coverage.out.tmp +*.log diff --git a/.env.example b/.env.example index d32b9be0..fa98c793 100644 --- a/.env.example +++ b/.env.example @@ -1,13 +1,84 @@ # Copy to .env for your LOCAL synthetic test environment; never commit .env. -# These are logical interface suggestions; map actual framework names in REPORT.md. -APP_HOST=0.0.0.0 -APP_PORT=8080 -APP_ENV=lab +# Values below are the variables this implementation actually reads +# (viper: section.name -> SECTION_NAME, see internal/config/config.go). +# +# Mapping to the logical names suggested by the skeleton: +# APP_HOST / APP_PORT -> SERVER_HOST / SERVER_PORT +# SESSION_STORE=postgres -> server-side sessions live in PostgreSQL (SESSION_TTL_SECONDS) +# DATABASE_URL_FILE -> unused: POSTGRES_* below pass no secret files +# CACHE_URL_FILE -> unused: REDIS_* below pass no secret files +# API_REPLICAS -> number of API replicas of the stand (compose.yaml) +# +# APP_ENV selects config//config.yaml; the implementation supports only `dev`. +APP_ENV=dev + +SERVER_HOST=0.0.0.0 +SERVER_PORT=8080 +SERVER_READ_HEADER_TIMEOUT=10s +SERVER_SHUTDOWN_TIMEOUT=10s +# Предел размера тела запроса (байт): защищает реплику от чтения огромного тела +# до валидации. Для вложений LAB4 (до 10 MiB) значение нужно поднять. +SERVER_MAX_BODY_BYTES=262144 + +LOG_LEVEL=info +LOG_FORMAT=json + +# Synthetic credentials for the local stand only; override in .env for anything else. +POSTGRES_HOST=localhost +POSTGRES_PORT=5432 +POSTGRES_DATABASE=messenger +POSTGRES_USER=messenger +POSTGRES_PASSWORD=messenger +POSTGRES_SSL_MODE=disable +POSTGRES_MAX_CONNS=10 +POSTGRES_MIN_CONNS=1 +POSTGRES_MAX_CONN_LIFETIME=1h +POSTGRES_MAX_CONN_IDLE_TIME=30m +POSTGRES_CONNECT_TIMEOUT=5s +POSTGRES_QUERY_TIMEOUT=5s + +REDIS_ENABLED=true +REDIS_HOST=localhost +REDIS_PORT=6379 +REDIS_PASSWORD= +REDIS_DB=0 +# -1 disables go-redis retries; 0 keeps the library default (3 retries). +REDIS_MAX_RETRIES=-1 +REDIS_DIAL_TIMEOUT=300ms +REDIS_READ_TIMEOUT=200ms +REDIS_WRITE_TIMEOUT=200ms +REDIS_POOL_SIZE=10 + +CACHE_ENABLED=true +CACHE_CHAT_LIST_TTL=5m +CACHE_LOCK_TTL=10s +CACHE_LOCK_WAIT_TIMEOUT=2s + SESSION_TTL_SECONDS=3600 -# Choose credentials locally. File paths contain no secret values. -DATABASE_URL_FILE=/run/secrets/database_url -# Optional on 3, required use on 4 in lab2; Redis OR Valkey: -SESSION_STORE=postgres -CACHE_URL_FILE=/run/secrets/cache_url -API_REPLICAS=2 + +# Retention of a message Idempotency-Key in the shared store; contract 1.3.0 +# requires at least 24 h. IDEMPOTENCY_TTL_SECONDS=86400 + +# Lab3 stand (compose.yaml): number of API replicas behind the LB and per-replica +# CPU/RAM limits. Track 1 varies them to compare 1/2/4 replicas at a fixed total +# budget, e.g. API_REPLICAS=4 API_CPU_LIMIT=0.25 API_MEM_LIMIT=192M. +API_REPLICAS=2 +API_CPU_LIMIT=0.50 +API_MEM_LIMIT=256M + +# Connections of ONE API replica to PostgreSQL; the total is replicas × value. +# Track 1 checks whether the shared connection budget becomes the saturation +# point: at 4 replicas the default 10 means 40 connections against one database. +POSTGRES_MAX_CONNS=10 + +# CPU quota of the shared database. Track 1 shows it is the stand's saturation +# point: the API uses a fraction of its budget while PostgreSQL sits at its own. +POSTGRES_CPU_LIMIT=0.50 + +# Memory quota of the shared database. The track 1 series r/g/pool were measured +# with 512M, the db1cpu control — with 384M (see evidence/track1/profile-*.json). +POSTGRES_MEM_LIMIT=384M + +# Loopback port of the HAProxy operator page (UP/DOWN of every replica). +LB_STATS_PORT=8404 diff --git a/.github/workflows/app.yml b/.github/workflows/app.yml index dd8c0d55..fed44ada 100644 --- a/.github/workflows/app.yml +++ b/.github/workflows/app.yml @@ -45,3 +45,33 @@ jobs: context: . push: false tags: mtusi-messenger:ci + + stand: + name: Lab3 stand scenario + needs: build + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v4 + - run: cp .env.example .env + - run: docker compose --env-file .env config --quiet + - run: docker compose --env-file .env up -d --build + - name: Wait for readiness through the load balancer + run: | + for attempt in $(seq 1 60); do + if curl -fsS -o /dev/null http://localhost:8080/health/ready; then exit 0; fi + sleep 2 + done + docker compose --env-file .env ps + exit 1 + - name: Public smoke through the LB + run: make test + - name: Parallel idempotency through the LB + run: python3 student-tests/idempotency_parallel.py --base-url http://localhost:8080 + - name: Stop one API replica and keep writing + run: make test-failover ACTION_SCRIPT=scripts/stop-one.sh + - name: Logs on failure + if: failure() + run: docker compose --env-file .env logs --tail 100 + - if: always() + run: docker compose --env-file .env down -v diff --git a/.gitignore b/.gitignore index b5a71896..35d6aca3 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,8 @@ target/ bin/ obj/ coverage/ +coverage.out +coverage.out.tmp *.log .DS_Store .idea/ diff --git a/Dockerfile b/Dockerfile index c3cf8674..b43fae52 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,8 +4,14 @@ ARG GO_VERSION=1.27.1 ARG ALPINE_VERSION=3.22 FROM golang:${GO_VERSION}-alpine AS build -ARG TARGETOS=linux -ARG TARGETARCH=amd64 +# Platform of the produced binaries. Left empty on purpose: the classic builder +# does not supply these args, and the previous hardcoded `amd64` default silently +# produced x86-64 binaries inside an arm64 image. Those ran under emulation and +# the Go runtime crashed under load (fatals like "found pointer to free object"). +# Empty means "build for the builder's own platform"; cross-compile explicitly: +# docker build --build-arg TARGETARCH=amd64 ... +ARG TARGETOS +ARG TARGETARCH ARG VERSION=dev ENV GOTOOLCHAIN=local WORKDIR /opt @@ -13,6 +19,12 @@ WORKDIR /opt COPY go.mod go.sum ./ RUN go mod download +# The Go compiler spikes well above 1 GiB per package on large dependencies, so +# an unbounded parallel build OOMs small Docker VMs and CI runners. Cap +# parallelism; override with --build-arg GOFLAGS=-p=$(nproc) on a bigger host. +ARG GOFLAGS="-p=2" +ENV GOFLAGS=$GOFLAGS + COPY . . RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \ go build -trimpath -buildvcs=false -tags timetzdata \ diff --git a/Makefile b/Makefile index 5d86d171..edc73ca9 100644 --- a/Makefile +++ b/Makefile @@ -3,11 +3,13 @@ BASE_URL ?= http://localhost:8080 CA_FILE ?= ACTION_SCRIPT ?= TLS_ARGS = $(if $(CA_FILE),--ca-file "$(CA_FILE)",) +PYTHON_LOCAL = env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 $(PYTHON) -.PHONY: help check validate test load test-persistence test-failover +.PHONY: help check validate test load test-persistence test-failover smoke-local load-local test-idempotency test-lb-readiness up down ps logs help: @echo "check: offline structure; validate: full OpenAPI (requirements-dev.txt); test: running API; load: synthetic writes" + @echo "up/down/ps/logs: lab3 stand from compose.yaml (LB + API_REPLICAS replicas + stores)" check: $(PYTHON) scripts/check_contract.py @@ -16,15 +18,130 @@ validate: $(PYTHON) scripts/validate_openapi.py test: - $(PYTHON) tests/smoke.py --base-url "$(BASE_URL)" $(TLS_ARGS) + $(PYTHON_LOCAL) tests/smoke.py --base-url "$(BASE_URL)" $(TLS_ARGS) load: - $(PYTHON) tests/load.py --base-url "$(BASE_URL)" $(TLS_ARGS) + $(PYTHON_LOCAL) tests/load.py --base-url "$(BASE_URL)" $(TLS_ARGS) test-persistence: @test -n "$(ACTION_SCRIPT)" || (echo "Set ACTION_SCRIPT to your implemented executable restart hook"; exit 2) - $(PYTHON) tests/resilience.py --mode persistence --action-script "$(ACTION_SCRIPT)" --base-url "$(BASE_URL)" $(TLS_ARGS) + $(PYTHON_LOCAL) tests/resilience.py --mode persistence --action-script "$(ACTION_SCRIPT)" --base-url "$(BASE_URL)" $(TLS_ARGS) test-failover: @test -n "$(ACTION_SCRIPT)" || (echo "Set ACTION_SCRIPT to your implemented executable stop-one hook"; exit 2) - $(PYTHON) tests/resilience.py --mode failover --action-script "$(ACTION_SCRIPT)" --base-url "$(BASE_URL)" $(TLS_ARGS) + $(PYTHON_LOCAL) tests/resilience.py --mode failover --action-script "$(ACTION_SCRIPT)" --base-url "$(BASE_URL)" $(TLS_ARGS) + +# Локальный запуск без прокси: в окружении автора HTTP(S)_PROXY ломает localhost. +smoke-local: + $(PYTHON_LOCAL) tests/smoke.py --base-url "$(BASE_URL)" $(TLS_ARGS) + +load-local: + $(PYTHON_LOCAL) tests/load.py --base-url "$(BASE_URL)" $(TLS_ARGS) + +# Собственная проверка уровня 4: параллельные повторы одного Idempotency-Key +# через LB обязаны создать ровно одно сообщение. +test-idempotency: + $(PYTHON_LOCAL) student-tests/idempotency_parallel.py --base-url "$(BASE_URL)" $(TLS_ARGS) + +# Собственная проверка уровня 4: LB обязан убрать из ротации реплику, которая +# осталась доступной, но потеряла БД (readiness 503). +test-lb-readiness: + scripts/lb_readiness_check.sh + +COMPOSE_BIN ?= docker compose +COMPOSE_FILE ?= compose.yaml +ENV_FILE ?= .env + +up: + $(COMPOSE_BIN) --env-file $(ENV_FILE) -f $(COMPOSE_FILE) up -d --build + +down: + $(COMPOSE_BIN) --env-file $(ENV_FILE) -f $(COMPOSE_FILE) down + +ps: + $(COMPOSE_BIN) --env-file $(ENV_FILE) -f $(COMPOSE_FILE) ps + +logs: + $(COMPOSE_BIN) --env-file $(ENV_FILE) -f $(COMPOSE_FILE) logs -f --tail 100 + +.DEFAULT_GOAL := help +GO ?= go +APP_NAME ?= messenger +CMD_PKG := ./cmd/$(APP_NAME) +LOCAL_BIN := $(CURDIR)/bin +GOLANGCI_LINT_VERSION ?= v2.13.2 +GOLANGCI_LINT := $(LOCAL_BIN)/golangci-lint +OPENAPI_SPEC := contracts/openapi.json +OGEN_CONFIG := .ogen.yml +OAS_DIR := internal/transport/rest/internal/oas + +-include .env +export + +# .env feeds local tooling, but its application variables must not leak into the +# Go test process: the config tests assert defaults and the dev YAML, so an +# ambient REDIS_ENABLED/CACHE_ENABLED would fail them. +ENV_KEYS := $(shell sed -n 's/^\([A-Za-z_][A-Za-z0-9_]*\)=.*/\1/p' .env 2>/dev/null) +CLEAN_ENV = env $(addprefix -u ,$(ENV_KEYS)) + +.PHONY: unit-test +unit-test: + $(CLEAN_ENV) $(GO) test -race -shuffle=on -count=1 -timeout=5m ./... + +.PHONY: integration-test +integration-test: + $(GO) test -tags=integration -p 1 -count=1 -timeout=15m ./internal/storage/postgres ./internal/storage/redis + +.PHONY: test-db-up test-db-down +test-db-up: + @docker-compose -f docker-compose.local.yaml up -d --wait postgres redis + +test-db-down: + @docker-compose -f docker-compose.local.yaml down + +# не учитываем генеренные файлы, также cmd в подсчете покрытия +COVER_EXCLUDE ?= /(mocks|oas)/|/cmd/ + +.PHONY: cover +cover: + $(CLEAN_ENV) $(GO) test -race -shuffle=on -count=1 -timeout=5m \ + -covermode=atomic -coverprofile=coverage.out.tmp ./... + @grep -Ev '$(COVER_EXCLUDE)' coverage.out.tmp > coverage.out + @rm coverage.out.tmp + $(GO) tool cover -func=coverage.out | tail -n 1 + $(GO) tool cover -html=coverage.out + +.PHONY: generate +generate: generate-api generate-mocks sqlc + +.PHONY: generate-api +generate-api: + $(GO) tool ogen --config $(OGEN_CONFIG) --target $(OAS_DIR) --package oas --clean $(OPENAPI_SPEC) + +.PHONY: generate-mocks +generate-mocks: + $(GO) tool mockery + +.PHONY: sqlc +sqlc: + $(GO) tool sqlc generate + +.PHONY: dev-up dev-down dev-reload +dev-up: + @docker-compose -f docker-compose.local.yaml up -d --build + +dev-down: + @docker-compose -f docker-compose.local.yaml down + +dev-reload: + @docker-compose -f docker-compose.local.yaml up -d --build --force-recreate + +.PHONY: migrate +migrate: + $(GO) run ./cmd/migrate up + +$(GOLANGCI_LINT): + GOBIN=$(LOCAL_BIN) $(GO) install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION) + +lint: $(GOLANGCI_LINT) + $(GOLANGCI_LINT) run -v diff --git a/REPORT.md b/REPORT.md index c2679005..90e9a32b 100644 --- a/REPORT.md +++ b/REPORT.md @@ -1,37 +1,238 @@ # Отчёт — лабораторная 3 -- Автор, группа: TODO -- Целевая оценка; выбранный трек 5, если нужен: TODO -- Commit/PR: TODO после публикации -- Использованные источники, библиотеки и помощь ИИ: TODO +- Автор, группа: Владислав Кунецкий, БВT2303 +- Целевая оценка; выбранный трек 5, если нужен: 5; трек 1 «Цена масштабирования» +- Commit/PR: solution/bvt2303-kunetsky (fork репозитория лабораторной 3) +- Использованные источники, библиотеки и помощь ИИ: ogen (HTTP-транспорт из `contracts/openapi.json`), sqlc (SQL-слой), goose (миграции), pgx/v5, go-redis/v9, viper + validator (конфигурация), mockery/v3 + testify (тесты), zap через `log/slog`. Помощь ИИ использовалась для обсуждения архитектуры, ревью и подготовки кода; решение проверено и изменено автором. База перенесена из лабораторной 2. ## Запуск из чистого clone -TODO: версии runtime/образов, prerequisites, команды создания локальных secrets/.env, build, миграций, запуска, ожидания готовности, тестов и остановки. Указать необходимые действия оператора. Не вставлять секреты. Отдельно указать безопасную остановку и команду намеренного удаления учебных данных. +Требования: Docker Engine с Compose v2 (`docker compose`), `make`; Python 3.9+ (только стандартная библиотека) для проверок; Go 1.27 — для локальной сборки и unit/integration-тестов. + +Проверено на: macOS 25.5.0, Apple M5 Pro, 48 GiB RAM, Docker Engine 29.5.2 (Colima, macOS Virtualization.framework), Docker Compose 5.5.1, Go 1.27.1. Docker VM: **2 vCPU и ≈1.9 GiB RAM** — лимиты контейнеров в `compose.yaml` подобраны под этот бюджет (API 0.5 CPU / 256 MiB на реплику, PostgreSQL 0.5 CPU / 384 MiB, Redis 0.25 / 192 MiB, LB 0.25 / 64 MiB), суммарно меньше доступного. Образы зафиксированы по версии: `haproxy:3.2-alpine`, `redis:7.4-alpine`, `postgres:18-alpine@sha256:77f585114c32fbca283dc835b0596f4e52b51b4c6662d7810b2f4084f60a1873`; приложение собирается из `Dockerfile` (`golang:1.27.1-alpine` → `alpine:3.22`), сборка ограничена `GOFLAGS=-p=2`, чтобы компилятор Go не выбил память небольшой VM. + +```sh +cp .env.example .env # синтетические креды локального стенда, реальных секретов нет +make up # docker compose --env-file .env up -d --build +make ps # контейнеры и health +curl -fsS http://localhost:8080/health/ready + +make test # публичный smoke (профиль lab3) через LB +make test-idempotency # параллельные повторы одного Idempotency-Key +make test-persistence ACTION_SCRIPT=scripts/restart.sh +make test-failover ACTION_SCRIPT=scripts/stop-one.sh +python3 student-tests/replica_failover.py --action-script scripts/stop-one.sh +make test-lb-readiness # LB и реплика, потерявшая БД (readiness 503) +scripts/rolling_update.sh # поочерёдная замена реплик под нагрузкой + +make down # остановка стенда; named volumes остаются +``` + +Намеренное удаление учебных данных (удаляет volumes и сессии): + +```sh +docker compose --env-file .env down -v +``` + +Оператору достаточно `cp .env.example .env` и `make up`: миграции выполняет отдельный сервис `migrate` (`goose up`), он завершается успешно до старта API-реплик (`depends_on: service_completed_successfully`), поэтому реплики не гоняют схему наперегонки. Приложение принимает SIGTERM и дренирует сервер в пределах `SERVER_SHUTDOWN_TIMEOUT=10s`; у контейнера API `stop_grace_period: 15s`, чтобы Docker не убил запрос в полёте. + +### Соответствие переменных `.env.example` реальной конфигурации + +| Логическое имя из задания | Реальная переменная | Смысл | +| --- | --- | --- | +| `APP_HOST` / `APP_PORT` | `SERVER_HOST` / `SERVER_PORT` | адрес и порт HTTP-сервера API | +| `APP_ENV` | `APP_ENV` | выбор `config//config.yaml`; реализован только `dev` | +| `SESSION_STORE=postgres` | — | сессии лежат в PostgreSQL (`sessions.token_hash`), параметр не нужен | +| `DATABASE_URL_FILE` | `POSTGRES_*` | параметры подключения к общей БД без файлов секретов | +| `CACHE_URL_FILE` | `REDIS_*`, `CACHE_*` | общий кэш списка чатов и его блокировки | +| `IDEMPOTENCY_TTL_SECONDS` | `IDEMPOTENCY_TTL_SECONDS` | срок хранения записи идемпотентности (по умолчанию 86400 с) | +| `API_REPLICAS` | `API_REPLICAS` | число API-реплик стенда (`deploy.replicas`) | +| — | `API_CPU_LIMIT` / `API_MEM_LIMIT` | лимиты CPU/RAM одной реплики (для профилей трека 1) | +| — | `POSTGRES_CPU_LIMIT` / `POSTGRES_MEM_LIMIT` / `POSTGRES_MAX_CONNS` | бюджет общего PostgreSQL и пул соединений одной реплики (трек 1) | +| — | `SERVER_MAX_BODY_BYTES` | предел размера тела запроса (413 при превышении) | +| — | `LB_STATS_PORT` | loopback-порт страницы оператора HAProxy | ## Архитектура и решения -TODO: схема процессов/хранилищ, источник истины, транзакционные границы, ограничения. Что перенесено из lab2, что изменено в этой работе. Соответствие переменных из .env.example реальной конфигурации. +Схема: клиент → LB (HAProxy с активными проверками `/health/ready`) → 2+ API-реплики → общие PostgreSQL и Redis. Единая точка входа — только LB: `127.0.0.1:8080`; порты API и хранилищ наружу не публикуются. + +| Роль | Сервис в compose | Образ / версия | Проверка готовности | Сеть и порт | Данные | +| --- | --- | --- | --- | --- | --- | +| Единая точка входа | `lb` | `haproxy:3.2-alpine` | активный `httpchk GET /health/ready`, период 2 с, `fall 2 rise 2` | публикует `127.0.0.1:8080`; страница оператора `127.0.0.1:8404` | — | +| API-реплики | `api`, `deploy.replicas=${API_REPLICAS:-2}` | сборка из `Dockerfile` → `mtusi-messenger:lab3` | Docker healthcheck `/health/ready`, интервал 10 с | только внутренняя сеть, alias `api-replica` | — | +| Миграции схемы | `migrate` | тот же образ, one-shot `goose up` | завершение с кодом 0 до старта реплик | только внутренняя сеть | — | +| Источник истины | `postgres` | `postgres:18-alpine@sha256:77f5…1873` | `pg_isready`, 5 с | только внутренняя сеть | volume `postgres18-data` | +| Кэш и блокировки | `redis` | `redis:7.4-alpine` (AOF everysec) | `redis-cli ping`, 5 с | только внутренняя сеть | volume `redis7-data` | +| Credentials | — | — | — | `.env` (вне git, синтетические значения для локального стенда), в контейнеры передаются явными переменными | — | + +- **Источник истины — PostgreSQL**: пользователи, чаты, участники, сообщения, серверные сессии (`sha256(token)`), записи идемпотентности. Транзакционные границы: создание чата вместе с участниками; отправка сообщения вместе с записью идемпотентности. +- **Redis/Valkey** — кэш списка чатов с распределённой блокировкой от stampede и версиями (`user_chat_versions`); не хранит ничего, что нужно для корректности ответа. +- **Общие сессии**: сессия создаётся одной репликой, любые другие её читают из БД, поэтому логин не привязан к реплике (sticky-сессии не используются). +- **`X-Instance-Id`**: значение стабильно в пределах процесса (`INSTANCE_ID` или hostname = короткий ID контейнера) и проставляется middleware на **каждый** ответ, включая ошибки 400/404/405, которые формирует транспорт, а не handler. +- **Идемпотентность отправки** (`Idempotency-Key` обязателен, `[A-Za-z0-9._:-]{1,128}`): + - таблица `message_idempotency (actor_id, chat_id, key, request_hash, message_id, expires_at)`, PK `(actor_id, chat_id, key)` — область уникальности «пользователь + чат + ключ»; + - claim — один `INSERT ... ON CONFLICT (actor_id, chat_id, key) DO UPDATE ... WHERE expires_at <= now() RETURNING`: живая запись не перезаписывается, истёкшая занимается заново; + - вставка сообщения и запись `message_id` идут в **одной транзакции с claim**, поэтому не бывает ключа без сообщения и наоборот; при откате (например, отправитель не участник) ключ не занимается; + - конкурентный повтор через разные реплики блокируется на строке и после коммита победителя возвращает его сообщение → ровно один INSERT в `messages`; + - повтор с тем же ключом и другим payload — `409`, для этого хранится `request_hash` (sha256 канонического payload `{"text":...}`; порядок ключей и пробелы в JSON не влияют). +- **LB**: HAProxy 3.2 (образ зафиксирован), `server-template api 4 api-replica:8080` + `resolvers docker` (Docker DNS 127.0.0.11, `hold valid 5s`) — адреса берутся из общего сетевого alias, выданного всем репликам, и переразрешаются каждые 5 с, поэтому масштабирование (1/2/4), замена контейнеров и смена IP не требуют правки конфига. Балансировка `leastconn`. Aктивные проверки готовности: `option httpchk GET /health/ready` + `http-check expect status 200`, `inter 2s fall 2 rise 2` — неготовая реплика исключается из ротации за ≤4 с и возвращается за ≤4 с. Это принципиально: пассивные проверки (nginx OSS, прежний вариант) не умели убирать реплику, которая остаётся доступной по сети, но теряет БД — она продолжала получать трафик и отвечать 503 (зафиксировано в ревью: 20 из 40 запросов `/health/live`). После перехода на активные проверки такая реплика получает **0 из 40** запросов, её статус `DOWN` (`evidence/lb-readiness.txt`), а запись через LB не прерывается (1 247 RPS, ноль ошибок в том же сценарии). +- **Повторы и идемпотентность**: HAProxy настроен на `retry-on conn-failure` + `retries 2` — повтор происходит только когда соединение не установилось и запрос не ушёл. Уже отправленный POST не повторяется, поэтому прозрачного дублирования создания чата нет (прежний вариант с `proxy_next_upstream ... non_idempotent` этим страдал). Неопределённый результат повтора остаётся за клиентом, а отправка сообщения защищена обязательным `Idempotency-Key`. +- **Страница оператора**: `127.0.0.1:8404/stats` (только loopback) показывает, какие реплики `UP`/`DOWN` и почему — именно по ней сняты доказательства выше. +- **Предел размера тела**: `SERVER_MAX_BODY_BYTES` (по умолчанию 256 КиБ). Тело больше лимита отклоняется с `413` до чтения и декодирования, поэтому публичный `POST /api/v1/users` не может выбить память реплики (раньше JSON-декодер читал тело целиком до любой валидации и до аутентификации). Для вложений ЛР4 (до 10 MiB) значение поднимается явно — это объявленный переход. +- **Логи**: заголовочные параметры (в том числе `Idempotency-Key`) попадают в лог как `redacted`, тела запросов — только своим размером; пароли, токены и содержимое сообщений не логируются. +- **Миграции**: одна последовательность для всего стенда (`migrate`), совместимость с работающей версией — новая таблица добавляется отдельной миграцией, старый код её не читает. Новая миграция пронумерована `00003`, а не `00002`: в базе, перенесённой из ЛР2, goose уже содержит применённую версию 2 (другая миграция того же репозитория), и совпадающий номер был бы молча пропущен при обновлении существующего стенда — это проверено на dev-базе (`goose: no migrations to run. current version: 2` при отсутствующей таблице). + +### Что перенесено из lab2 + +Перенос: ветки `lab1` + `lab2` репозитория `mtusi-messenger`, перенесены только исходники, миграции, собственные тесты, Dockerfile и конфигурации (по правилам CONTRIBUTING.md; README/COURSE/contracts/публичные tests остались от skeleton ЛР3). + +- Транспорт: HTTP-слой, сгенерированный ogen из `contracts/openapi.json`, REST-адаптер поверх него, middleware X-Request-Id и структурного логирования. +- Домен и сервисы: user / chat / message / session с валидацией и keyset-пагинацией. +- PostgreSQL — источник истины: pgx + sqlc, миграции goose, транзакции на создание чата. +- Сессии: Basic только при создании сессии, далее Bearer; в БД `sha256(token)`, TTL, переживают перезапуск процесса. +- Redis/Valkey: кэш списка чатов с распределённой блокировкой от stampede (`user_chat_versions`). +- Наблюдаемость: `/health/live`, `/health/ready`, структурированные логи (log/slog + zap). +- Инструменты: multi-stage `Dockerfile`, `docker-compose.local.yaml` для локального запуска, Makefile-таргеты, `.github/workflows/app.yml`. + +### Изменения в этой работе (лаб. 3) + +- Контракт 1.3.0: транспорт перегенерирован, `X-Instance-Id` во всех ответах, обязательный `Idempotency-Key` для отправки сообщения. +- Общая идемпотентность в PostgreSQL (миграция `00003_message_idempotency.sql`, sqlc-запросы, транзакция в `MessageRepository.Create`), 409 на конфликт payload. +- `IDEMPOTENCY_TTL_SECONDS` в конфиге (по умолчанию 24 ч), `.env.example` приведён к реальным переменным. +- Стенд ЛР3: `compose.yaml` (LB + `API_REPLICAS` реплик + PostgreSQL + Redis + одноразовый `migrate`), конфигурация LB `infra/lb/haproxy.cfg` (активные проверки готовности, ограниченные повторы, страница оператора), action-скрипты `scripts/stop-one.sh` и `scripts/restart.sh`, Makefile-таргеты `up/down/ps/logs`. +- Собственные проверки: `make test-idempotency` (параллельные повторы через LB), `student-tests/replica_failover.py` (поочерёдная остановка каждой реплики с метриками), `scripts/lb_readiness_check.sh` (неготовая реплика и LB), `scripts/rolling_update.sh`, эксперименты трека 1. +- Исправления по итогам аудита: отправка в несуществующий чат больше не даёт `500` из-за нарушения внешнего ключа от claim'а ключа идемпотентности (`23503` → `404`); добавлен предел размера тела (`413`, см. выше); заголовочные параметры не пишутся в лог; у проверок LB задан `timeout check 1s`, чтобы «залипшая» реплика исключалась за ограниченное время; у собственного сценария rolling update появился настоящий «наплыв» (новая реплика поднимается до снятия старой) и корректный счётчик 5xx (в HAProxy статус в логе печатается без кавычки, прежний шаблон молча давал нули). +- `Dockerfile`: убран жёстко заданный `TARGETARCH=amd64` — на Apple Silicon он давал x86-64 бинарник внутри arm64-образа, тот исполнялся через эмуляцию и падал по runtime-фаталам под нагрузкой (см. «Ограничения»); сборка ограничена `GOFLAGS=-p=2`, чтобы компилятор не выбил память небольшой Colima VM. +- Удалён осиротевший `scripts/track1_benchmark.py` (бенчмарк in-memory хранилища ЛР1: сам in-memory store удалён ещё в ЛР2, скрипт ссылался на несуществующий файл). ## Доказательства критериев +Артефакты ЛР1/ЛР2 перенесены в `evidence/lab1-2/` (там же пояснение, почему они не относятся к этой работе); в `evidence/` — только доказательства ЛР3. + | Критерий README | Команда/сценарий | Наблюдаемый результат | Файл доказательства | | --- | --- | --- | --- | -| Публичный smoke | make test | TODO | TODO | -| Остальные пункты уровня 3 | TODO | TODO | TODO | -| Все пункты уровня 4, если заявлен | TODO | TODO | TODO | -| Выбранный трек 5, если заявлен | TODO | TODO | TODO | +| Публичный smoke | `make test` | `PASS: lab3 public API scenario` через LB с двумя репликами | `evidence/smoke.txt` | +| Разные запросы одного пользователя обслуживают разные реплики | 40× `GET /users/me` через LB одной сессией (и 40× `/health/live`) | два разных `X-Instance-Id`, распределение видно по репликам | `evidence/failover/sequential.txt` (одна сессия), `evidence/lb-readiness.txt` (счётчики по репликам) | +| Идемпотентность: повтор, конкурентный повтор, смена реплики | `make test-idempotency` | 12 параллельных повторов одного ключа → одно сообщение; 12 разных payload → один 201 и одиннадцать 409; без ключа и с недопустимым ключом → 400 | `evidence/idempotency.txt` | +| Остановка одной реплики при работающей другой | `make test-failover ACTION_SCRIPT=scripts/stop-one.sh` (два прогона) | 127 и 100 подтверждённых записей, 0 ошибок, первое восстановление 0.21 с и 2.24 с | `evidence/failover/run1.txt`, `evidence/failover/run2.txt` | +| Последовательно остановлена каждая реплика, с измерениями (RPS, ошибки, время) | `python3 student-tests/replica_failover.py --action-script scripts/stop-one.sh` | реплика A: 91 запись (6.06 RPS), 0 ошибок, восстановление 1.66 с; реплика B: 100 записей (6.66 RPS), 0 ошибок, 1.66 с; после отказа обслуживает только вторая реплика; восстановление обеих 0.18–0.20 с; дублей нет (191 сообщение) | `evidence/failover/sequential.txt` | +| LB исключает неготовую реплику | `scripts/lb_readiness_check.sh` | реплика с потерянной БД (осталась доступной, readiness 503): **0 из 40** запросов, статус `DOWN` **через 2 с** (проверка `inter 2s fall 2 timeout check 1s`), при этом запись через LB не прервалась (1 163 RPS, 0 ошибок) | `evidence/lb-readiness.txt` | +| Предел размера тела | `python3`-проверка публичного `POST /api/v1/users` | тело 400 КиБ (сверх лимита 256 КиБ) → `413`, тело 100 КиБ → `400` (схема); реплика не выбита | `evidence/body-limit.txt` | +| Отказ БД не превращается в 500 | `python3`-проверка: `POST` сообщения напрямую в реплику (в обход LB) при остановленном PostgreSQL | напрямую к реплике — `503`, через LB — `503` с `X-Instance-Id` (ответ приложения), после возврата БД — `201` | `evidence/db-outage.txt` | +| Сохранность при перезапуске API и хранилищ | `make test-persistence ACTION_SCRIPT=scripts/restart.sh` | `PASS`: подтверждённые сообщения и прежний токен после перезапуска, volumes не удалялись | `evidence/persistence.txt` | +| Лимиты CPU/RAM, отсутствие публичных портов API, отсутствие `container_name` | `docker compose --env-file .env config`, `docker ps` | лимиты у каждого сервиса, публикуется только `127.0.0.1:8080` (LB) | `evidence/stand.txt` | +| Поочерёдная замена реплик под нагрузкой | `scripts/rolling_update.sh` (60 с, 8 клиентов; наплыв по одной реплике) | 97 359 подтверждённых записей, 3 переходные ошибки (0.003 %), **3 ответа 5xx от LB** за окно обновления, `restarts=0`; каждый шаг подтверждён сменой образа новых реплик и числом UP-слотов | `evidence/rolling-update/after/` | +| Контроль: тот же код вне Docker | `student-tests/rolling_update_load.py` против нативного процесса (90 с, 32 клиента) | 220 781 запрос, 0 ошибок, 2 452 RPS, p50 12.5 мс, p95 17.5 мс, p99 22.4 мс | `evidence/native-load.txt` | +| Проверки качества | `make check`, `make validate`, `make unit-test` (`-race`), `make integration-test` | все PASS, включая интеграционный тест «отправка в несуществующий чат → 404» | `evidence/quality.txt` | +| Трек 1: цена масштабирования | `scripts/track1_series.sh` + `scripts/track1_controls.sh` + `scripts/track1_report.py` | потолок ≈1 300–1 550 RPS: 1/2/4 реплики → −3 %/−5 %; бюджет API ×3, бюджет БД ×2 и бюджет LB ×4 не меняют RPS (перемежающий контроль: ±0.05 %), пул соединений не исчерпан; дрейф серии измерен | `evidence/track1/summary.md`, `evidence/track1/scaling-*.png` | -TODO: добавить отдельную строку для каждого заявленного критерия. PASS без команды и наблюдения не является доказательством. Проверка инфраструктурного hook требует подтверждения, какие реальные процессы/хранилища перезапущены. +`make check`, `make validate` (полная OpenAPI-валидация в venv) и `make unit-test` (`-race`) проходят; интеграционные тесты PostgreSQL (`-tags=integration`, включая конкурентный повтор одного ключа) — тоже. ## Эксперименты и отказы -TODO: гипотеза, hardware/лимиты, версии, объём данных, профиль нагрузки, concurrency/arrival rate, длительность/прогрев, повторы, успешные RPS, ошибки, p50/p95/p99, CPU/RAM. Сохранить raw summary без tokens и объяснить ограничения измерения. - | Воздействие | Что ожидаем | Что наблюдали | Время восстановления / потеря данных | | --- | --- | --- | --- | -| TODO | TODO | TODO | TODO | +| `docker stop` одной API-реплики (прогон 1) | записи продолжаются, остановленная реплика исчезает из ответов | 127 успешных записей, 0 ошибок | 0.21 с | +| `docker stop` другой API-реплики (прогон 2) | то же | 100 записей, 0 ошибок | 2.24 с | +| Поочерёдно остановлены обе реплики (свой скрипт) | после каждой остановки пишет только вторая реплика, дублей нет | 91 и 100 записей (6.06 и 6.66 RPS), 0 ошибок, повторы с тем же ключом дубля не создали | 1.66 с и 1.66 с | +| Одной реплике закрыт доступ к БД (она остаётся доступной, readiness 503) | LB исключает её из ротации | 0 из 40 запросов ей, статус `DOWN` через 2 с, запись через LB не прервалась | — | +| Поочерёдная замена каждой реплики под нагрузкой (наплыв) | потери только на время остановки, дублей нет | 97 359 записей, 3 переходные ошибки, 3 ответа 5xx от LB, `restarts=0`, смена образа подтверждена по шагам | окно замены 5–6 с на реплику | +| Перезапуск API и всех хранилищ с сохранением volumes | сессия и данные живут | `PASS`, прежний токен работает | потери нет | +| Эмуляция x86-64 бинарника в arm64-образе (`--build-arg TARGETARCH=amd64`) | реплики замедляются и падают | в контроле (45 с, 8 клиентов) падений **не воспроизведено**: 89 560 запросов, 0 ошибок, 0 ответов 5xx; crash-loop наблюдались в других условиях | эффект не измерен (`evidence/rolling-update/emulated/`) | +| Удвоенный CPU БД, четырёхкратный CPU LB, пул 5 вместо 10, 32 клиента | пропускная способность вырастет, если узкое место — БД, LB или пул | бюджеты БД и LB не меняют RPS (перемежающий контроль: +0.04 % и −0.02 % при лимитах, проверенных по `docker inspect`); меньший пул хуже (−7 %); 32 клиента снижают RPS до 1 284 и растят p95 до 52.8 мс | `evidence/track1/summary.md`, `evidence/load-32clients.txt` | + +## Трек 1. Цена масштабирования + +Методика: один и тот же профиль `tests/load.py` (closed loop, `concurrency=8`, `duration=60` с, прогрев 15 с) против стенда на 1, 2 и 4 API-репликах при **фиксированном суммарном бюджете** 1.0 CPU / 768 MiB на API; затем серия с ростом бюджета — 2 реплики и суммарно 0.5, 1.0 и 1.5 CPU. Бюджеты общих хранилищ между профилями не меняются: PostgreSQL 0.50 CPU / 384 MiB, Redis 0.25 / 192, LB 0.25 / 64. В контрольных профилях меняется ровно одна ручка: пул соединений реплики 10 → 5, бюджет CPU PostgreSQL 0.50 → 1.00, бюджет CPU балансировщика 0.25 → 1.00. + +Бюджеты хранилищ compose применяет при **создании** контейнера, поэтому скрипт пересоздаёт PostgreSQL и LB, когда бюджет профиля отличается от действующего, и проверяет применение по `docker inspect`: в `profile-*.json` и в строке `=== applied … ===` сводки попадают значения, снятые с работающих контейнеров, а не переменные запуска. Без этой проверки профиль описывал бы намерение, а измерение шло бы на прежнем лимите — на этом и провалился первый контроль удвоения CPU БД; тот прогон вместе с прогоном, где нагрузку подавал клиент хоста, лежит в `evidence/track1/superseded/`. Генератор работает **внутри VM** (`CLIENT=vm`, контейнер в сети стенда): клиент на хосте через проброс порта под шквалом новых соединений получает отказы самого проброса, не относящиеся к стенду (разбор — `evidence/path-overhead/`). Вся серия снимается одной командой `scripts/track1_series.sh` (~15 минут); профили с уже снятыми артефактами при повторном запуске пропускаются. + +Бюджеты выбраны под Colima VM (2 vCPU, ≈1.9 GiB), чтобы измерения шли в её пределах, а не за счёт хоста. Ресурсы реплик считаются суммированием по одному timestamp: в первой версии сводки несколько реплик усреднялись как одна выборка, что занижало CPU и память вдвое — исправлено, сырые CSV не менялись. Сводка учитывает только контейнеры своего проекта (`--prefix`): параллельно поднятый стенд другой лаборатории иначе попадал в те же колонки (`…-lab2-postgres-1` → `postgres`). Сырые артефакты — `evidence/track1/` (`load-*.json`, `stats-*.csv`, `profile-*.json`), сводка — `evidence/track1/summary.md`, графики — `scaling-fixed-budget.png` и `scaling-growth.png`. + +### Профили и результаты + +Серия 1 — фиксированный суммарный бюджет 1.0 CPU / 768 MiB на API (PostgreSQL 0.50 CPU / 384 MiB, Redis 0.25, LB 0.25), нагрузка `tests/load.py` (closed loop, 8 клиентов, 60 с, прогрев 15 с, клиент внутри VM): + +| реплик | CPU на реплику | успешный RPS | p50, мс | p95, мс | p99, мс | ошибки | API CPU (сумма) | PG CPU | LB CPU | строк в `messages` | +| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | +| 1 | 1.00 | 1 542.9 | 5.05 | 8.01 | 10.24 | 0 | 0.24 | 0.39 | 0.10 | 3.60 млн | +| 2 | 0.50 | 1 491.3 | 5.25 | 8.23 | 10.30 | 0 | 0.28 | 0.36 | 0.10 | 3.71 млн | +| 4 | 0.25 | 1 415.7 | 5.54 | 8.61 | 10.75 | 0 | 0.31 | 0.35 | 0.10 | 3.82 млн | + +Серия 2 — рост бюджета API при 2 репликах: + +| суммарный CPU API | CPU на реплику | успешный RPS | p95, мс | ошибки | API CPU (сумма) | PG CPU | +| --- | --- | --- | --- | --- | --- | --- | +| 0.5 | 0.25 | 1 489.9 | 8.25 | 0 | 0.28 | 0.36 | +| 1.0 | 0.50 | 1 496.3 | 8.22 | 0 | 0.27 | 0.37 | +| 1.5 | 0.75 | 1 491.3 | 8.18 | 0 | 0.27 | 0.36 | + +Трехкратный бюджет API не сдвигает пропускную способность (1 490 → 1 496 → 1 491), а лишние реплики при неизменном суммарном бюджете её снижают: каждая реплика — ещё один процесс, соединения и копия кэша, а суммарный CPU фиксирован. + +Отказов в чистой серии почти нет: 13 профилей из 15 без единого отказа, в двух профилях `pool` — по 4 обрыва в момент пересоздания реплики. Прежние прогоны показывали до 26 % отказов, но это были отказы соединений **у клиента на хосте**, а не у стенда: в контроле `evidence/path-overhead/` балансировщик отдал все запросы без 5xx, логи API не содержат ошибок, а клиент внутри VM не отказал ни разу. Подтверждённых записей не потеряно: повтор с тем же ключом дубля не создаёт (см. проверку идемпотентности). + +Контроль снят попарно с эталоном, чтобы дрейф серии не выдавался за эффект бюджета (`scripts/track1_controls.sh`; лимиты применены к контейнерам и проверены по `docker inspect`): + +| профиль | что изменено | успешный RPS | отличие от соседнего эталона | +| --- | --- | --- | --- | +| `ctl1base` / `ctl3base` | эталон (2 реплики, PostgreSQL 0.50, LB 0.25) | 1 391.1 / 1 360.1 | −2.2 % за два профиля — масштаб дрейфа | +| `ctl2pg` | бюджет CPU PostgreSQL 0.50 → 1.00 | 1 391.6 | **+0.04 %** | +| `ctl4lb` | бюджет CPU балансировщика 0.25 → 1.00 | 1 359.8 | **−0.02 %** | +| `pool10` / `pool5` | пул соединений реплики 10 → 5 (4 реплики) | 1 399.0 / 1 299.6 | −7 % (меньший пул хуже) | +| 32 клиента вместо 8 | — | 1 284 | p95 52.8 мс вместо ≈8-9 мс (`evidence/load-32clients.txt`) | + +Профили серии `db1cpu` (PostgreSQL 1.00) и `lb1cpu` (LB 1.00) показывают на 15 % и 8 % меньше, чем `r2`, но сняты позже, и разница объясняется дрейфом: тот же профиль `r2`, повторённый в конце серии (`d2`), даёт 1 389 RPS вместо 1 491 (−6.9 %). Поэтому вопрос «помогает ли бюджет БД» решают именно перемежающие профили, а не сравнение через полчаса. + +Стенд дрейфует по ходу серии: таблица `messages` растёт (≈95 тыс. строк на профиль, 3.6 → 5.1 млн за серию), и эталон `r2`, снятый в начале и в конце, даёт 1 491 и 1 389 RPS (−6.9 %, ≈0.9 % на профиль); независимая оценка дрейфа по двум эталонам перемежающего контроля — 2.2 % за два профиля. Повторы одной конфигурации внутри сессии расходятся до ~2 %. Поэтому профили сравнимы только внутри одной серии и рядом по времени, а влияние каждой ручки проверяется попарно с эталоном. Качественный вывод устойчив: **три независимые серии** дали одно и то же — рост числа реплик при фиксированном бюджете не помогает (первая: +3 % на двух, −9 % на четырёх; вторая: −7 % и −8 %; третья, чистая: −3.3 % и −5.1 %). + +### Где насыщение + +Потолок закрытого цикла на этой машине — **≈1 300–1 550 RPS подтверждённых записей**, и ни одна ручка стенда его не двигает: + +| что меняли | как проверено | результат | +| --- | --- | --- | +| число API-реплик 1 → 2 → 4 при неизменном суммарном бюджете | серия 1 | −3.3 % и −5.1 % | +| суммарный бюджет API 0.5 → 1.0 → 1.5 CPU | серия 2 | +0.1 % (плоско) | +| бюджет CPU PostgreSQL 0.50 → 1.00 | перемежающий контроль | +0.04 % | +| бюджет CPU балансировщика 0.25 → 1.00 | перемежающий контроль | −0.02 % | +| пул соединений реплики 10 → 5 | пара профилей при 4 репликах | −7 % (хуже) | +| клиент на хосте вместо клиента внутри VM | `evidence/path-overhead/` | тот же RPS (1 539 против 1 475) | +| 32 клиента вместо 8 | `evidence/load-32clients.txt` | 1 284 RPS, p95 растёт до 52.8 мс | + +Измерениями исключены: **клиент** (тот же закрытый цикл по тривиальному серверу на хосте даёт 4 469 RPS без отказов), **путь «хост → проброс порта → VM»** (клиент внутри VM даёт ту же пропускную способность), **квоты CPU PostgreSQL и LB** (перемежающий контроль: ±0.05 % при лимитах, проверенных по `docker inspect`), **размер пула** (19–22 соединения из 100; меньший пул только вредит). Сами сервисы при этом недогружены: реплики вместе берут 0.24–0.31 ядра из бюджета 1.0, PostgreSQL — 0.35–0.39 из 0.50, LB — 0.10 из 0.25 (в `docker stats` 100 % = одно ядро, проверено отдельным экспериментом: `evidence/quota-semantics.txt`). + +Значит упор не в бюджет и не в число процессов, а в стоимость одной записи: сообщение — это транзакция из трёх обращений к БД (claim ключа идемпотентности, вставка сообщения, запись `message_id`), плюс проверка участников чата и работа с кэшем списка чатов, и всё это на 2 vCPU. Гипотеза следующего шага: сократить путь записи до двух обращений (вставка сообщения и upsert ключа в одной транзакции, конфликт — откат и повторное чтение) и перемерить перемежающим контролем. Числа сняты на одной конфигурации одиночными прогонами закрытого цикла, поэтому это не «предельная ёмкость системы»: на другом Docker-host потолок будет иным (см. «Ограничения»). + +### Подтверждённое улучшение и проверенные гипотезы + +**Подтверждено (измерено до/после):** балансировщик перестал отправлять трафик неготовой реплике. `scripts/lb_readiness_check.sh` поднимает рядом с рабочими репликами третью с тем же сетевым alias, но её доступ к БД идёт через временный TCP-прокси; после остановки прокси реплика остаётся доступной по сети, её `/health/ready` отвечает 503. + +| Вариант LB | запросов неготовой реплике из 40 | статус в LB | запись через LB | +| --- | --- | --- | --- | +| пассивные проверки (nginx OSS, до правки) | 20 из 40 `/health/live` и бизнес-запросы (зафиксировано в ревью) | продолжает обслуживать | 503 и 200 вперемешку | +| активные проверки (HAProxy, `httpchk /health/ready`, `inter 2s fall 2 rise 2`, `timeout check 1s`) | **0 из 40** | `DOWN` **через 2 с** (измерено) | 1 163 RPS, 0 ошибок (`evidence/lb-readiness.txt`) | + +Вместе с этим убраны две связанные проблемы: прозрачный повтор POST (`proxy_next_upstream ... non_idempotent` мог повторить создание чата) заменён на `retry-on conn-failure`, а недоступная реплика убирается из ротации полностью, а не «на 3 секунды». Сценарий rolling update проходит под нагрузкой: 97 359 подтверждённых записей, 3 переходные ошибки (0.003 %), `restarts=0` (`evidence/rolling-update/after/`, где каждый шаг подтверждён сменой образа новой реплики и числом UP-слотов). + +**Дефект доказан, эффект его устранения — нет.** Архитектурная ошибка унаследованного `Dockerfile` (`ARG TARGETARCH=amd64`, а классический builder платформу не подставляет → x86-64 бинарник в arm64-образе) подтверждена ELF-заголовками (`evidence/arch.txt`): `e_machine=0x3e` против `0xb7`. Но контролируемое сравнение **не подтвердило**, что именно она вызывала прежние runtime-фаталы: прогон rolling update на эмулируемом образе завершился без ошибок — 89 560 успешных запросов за 45 с, 0 ошибок, 0 ответов 5xx (`evidence/rolling-update/emulated/load.json`). Падения (`fatal error: found pointer to free object`, `sync: inconsistent mutex state`, crash-loop реплик) наблюдались в других условиях и в приложенный A/B не попали. Корректная формулировка: эмуляция x86-64 на arm64 — доказанный дефект сборки, который устранён, но его вклад в те падения не измерен. + +**Проверено измерениями (перемежающий контроль, лимиты подтверждены по `docker inspect`):** ни бюджет CPU PostgreSQL (0.50 → 1.00), ни бюджет CPU балансировщика (0.25 → 1.00) не меняют пропускную способность (+0.04 % и −0.02 %), поэтому потолок закрытого цикла на этой машине задаёт не нехватка ресурсов у БД или LB. Пул соединений 10 → 5 при четырёх репликах оказался хуже на 7 % — меньший пул не улучшение, а потеря. + +**Следующий шаг для измерения:** сократить число обращений к БД на одно сообщение — сейчас их три (claim ключа, вставка сообщения, запись `message_id`), нужно два (вставка сообщения + upsert ключа в той же транзакции, конфликт — через откат и повторное чтение). Гипотеза: меньше round-trip и меньше версий строк. Эффект измеряется тем же способом, что и бюджеты, — перемежающим контролем (`scripts/track1_controls.sh`: эталон → изменение → эталон), потому что собственный дрейф серии сопоставим с ожидаемым выигрышем. ## Ограничения и следующие шаги -TODO: какие отказы выдерживаются и какие нет; что не реализовано; где учебное упрощение; какое улучшение подтверждено, а какое пока гипотеза. +- **Архитектура образа (главная находка этапа отладки).** Унаследованный `Dockerfile` содержал `ARG TARGETARCH=amd64`, а классический builder платформу не подставляет — в arm64-образ попадал x86-64 бинарник (`e_machine=0x3e` против `0xb7` у busybox базового образа; в стеке паники видно `runtime/asm_amd64.s`). Пока нагрузка была низкой, эмуляция справлялась; под нагрузкой Go runtime падал с `fatal error: found pointer to free object`, `sync: inconsistent mutex state`, `bad pointer in Go heap`, `runtime: name offset base pointer out of range` — и это выглядело как проблема приложения. Контрольный эксперимент снял подозрения с кода: тот же исходник, собранный нативно (вне Docker, против локальной БД), выдержал 90 с при 32 клиентах — 220 781 запрос, 0 ошибок, p50 12.5 мс, p95 17.5 мс, p99 22.4 мс, 2 452 успешных RPS (`evidence/native-load.txt`), тогда как контейнерный стенд через LB даёт ≈1 300–1 700 RPS. После исправления (`ARG TARGETARCH` без значения по умолчанию, кросс-сборка — явным `--build-arg`) стенд стабилен, однако строгий A/B связь с прежними падениями не подтвердил (см. «Подтверждённое улучшение»). Если вы собираете под другую платформу, задавайте `TARGETOS`/`TARGETARCH` явно. +- **Ресурсы VM.** Colima (macOS Virtualization.framework) даёт 2 vCPU и ≈1.9 GiB RAM: сборка образа была один раз убита OOM, поэтому компилятор ограничен `GOFLAGS=-p=2`, а бюджеты экспериментов трека 1 подобраны под VM (1.0 CPU суммарно на API), иначе измеряется не масштабирование, а нехватка ресурсов. +- **Измерения трека 1 не переносятся на другую машину.** Все числа получены на одной конфигурации (Docker VM: 2 vCPU, ≈1.9 GiB; хост: 18 ядер) одиночными прогонами закрытого цикла, поэтому это не «пропускная способность системы», а точки одного профиля на конкретном стенде: на другом Docker-host и потолок, и точка насыщения будут иными, а сравнивать между собой можно только профили одной серии. +- **Что означает CPU% в `docker stats`.** Проверено экспериментом: контейнер, упёртый в `--cpus 0.5` (`cpu.max = 50000 100000`), показывает 49.49 %, то есть процент считается от одного ядра и 50 % = полная квота 0.5 CPU (`evidence/quota-semantics.txt`). Прежняя оговорка отчёта о «заниженных» значениях снята: колонки читаются однозначно. +- **Проброс порта хоста не выдерживает нагрузку генератора.** `tests/load.py` ходит без keep-alive (новое TCP-соединение на запрос). Клиент на хосте получает отказы соединения от проброса порта: в контроле `evidence/path-overhead/` тот же профиль дал 26 % отказов при клиенте на хосте и 0 % при клиенте внутри VM и тот же RPS. Точечный пробник из 40 000 быстрых подключений подряд получил 38 706 `ECONNREFUSED`, а прогон на ~4 500 соединений/с оставил проброс порта (вместе с доступом к Docker-эндпоинту Colima) неработоспособным до `colima restart`. Стенд при этом не падал: в прогонах с клиентскими отказами балансировщик отдал все запросы без 5xx, а логи API не содержат ни одной ошибки (сценарии отказа, персистентности и rolling update снимались клиентом на хосте раньше и прошли с 0-3 отказами — там темп новых соединений был ниже, чем в серии трека 1). Поэтому серия трека 1 снимается клиентом внутри VM. +- **«Потолок задаёт проброс порта» — опровергнуто измерением.** Прежняя формулировка объясняла потолок ≈1 500 RPS виртуализацией и пробросом порта. Контроль с клиентом внутри VM даёт ту же пропускную способность (1 475 против 1 539 RPS, различия в пределах разброса) вообще без проброса, значит этот путь потолок не задаёт; клиент тоже не потолок — тот же закрытый цикл по тривиальному локальному серверу даёт 4 469 RPS. Нативная оценка 2 452 RPS снята другим генератором, на хосте с 18 ядрами и против локальной БД, поэтому она не изолирует причину: отличается и доступный CPU, и способ подачи нагрузки. Корректная формулировка: узкое место — внутри стенда (путь записи сообщения), а не в виртуализации. +- **Окно обнаружения отказа.** Готовность проверяется активно (`httpchk /health/ready`, период 2 с, `fall 2`, `timeout check 1s`) — измеренное время перехода реплики в `DOWN` после потери БД: **2 с** (`evidence/lb-readiness.txt`); теоретическая верхняя граница ~4 с. Между фактическим отказом и первой неудачной проверкой реплика ещё получает трафик, поэтому клиент может увидеть 503 от неё или ошибку соединения — в измеренных сценариях это единичные переходные ошибки (0–2 %), они учтены в таблицах отказа. +- **Строгая проверка «до/после» по архитектуре не удалась.** Исходный дефект сборки доказан (ELF-заголовки), но воспроизвести падения в контролируемом A/B не удалось: эмулируемый образ в коротком прогоне тоже прошёл без ошибок. Считать эффект устранения измеренным нельзя. +- **Переходные ошибки при смене состава реплик.** HAProxy не повторяет уже отправленный POST (осознанно: прозрачный повтор неидемпотентной операции запрещён контрактом), а переиспользуемые соединения к снятому контейнеру рвутся — поэтому в момент замены или масштабирования клиент может увидеть единичный 502: ≤0.25 % в сериях трека 1 и 0.003 % в rolling update. Неопределённый результат клиент повторяет сам, и для сообщений это безопасно благодаря `Idempotency-Key`. +- Один Docker-host: эксперименты показывают отказ **процесса** API, но не отказ узла. Потеря хоста, а также LB, PostgreSQL и Redis остаются единичными точками отказа; выживание узла БД не заявлено. +- PostgreSQL не реплицирована, Redis не кластеризован — при их отказе стенд недоступен, это честное учебное упрощение. +- Генератор нагрузки `tests/load.py` — closed-loop: он ограничен клиентом и страдает coordinated omission, поэтому измеренный RPS — это пропускная способность HTTP-подтверждений, а не предельная ёмкость системы. Для серьёзных выводов нужен k6/Locust или свой open-loop генератор. +- **Принятые риски (осознанно, вне объёма ЛР3).** Пароли хешируются Argon2id с 64 МиБ памяти на хеш, а ограничителя частоты нет: 4–5 одновременных регистраций на реплику с бюджетом 256 МиБ могут её выбить, а перебор паролей не throttled. Контракт делает `429` факультативным, защита вынесена в ЛР7 по карте курса; предел размера тела при этом закрыт (см. выше). Страница оператора HAProxy доступна без аутентификации, но только на loopback. `docker-compose.local.yaml` (локальная разработка из ЛР2) публикует PostgreSQL и Redis на 127.0.0.1 с синтетическим паролем — для стенда ЛР3 не используется. `X-Request-ID` принимается от клиента как есть: это нужно для сквозной корреляции, подделка значения искажает только аудит, инъекция в лог невозможна (Go запрещает переводы строк в заголовках, лог пишется JSON). `Makefile` экспортирует `-include .env` в окружение рецептов — при синтетических значениях это безопасно. +- Записи идемпотентности не удаляются фоновым процессом: истёкшие строки занимаются лениво при повторном использовании ключа, остальные ждут будущей уборки (индекс `expires_at` уже есть). diff --git a/cmd/messenger/main.go b/cmd/messenger/main.go index c01c9435..6179863a 100644 --- a/cmd/messenger/main.go +++ b/cmd/messenger/main.go @@ -50,7 +50,7 @@ func run(cfg config.Config, log *slog.Logger) error { ctx, stop := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM) defer stop() - store, err := postgres.New(ctx, cfg.Postgres) + store, err := postgres.New(ctx, cfg.Postgres, time.Duration(cfg.Idempotency.TTLSeconds)*time.Second) if err != nil { return fmt.Errorf("connect database: %w", err) } @@ -103,6 +103,7 @@ func run(cfg config.Config, log *slog.Logger) error { ), rest.NewSecurityHandler(sessionService), log, + cfg.Server.MaxBodyBytes, ) if err != nil { return fmt.Errorf("build router: %w", err) diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 00000000..03b59d92 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,173 @@ +# Lab3 stand: two API replicas behind a HAProxy load balancer. +# +# cp -n .env.example .env +# docker compose --env-file .env up -d --build +# curl http://localhost:8080/health/ready +# +# Only the load balancer is published (127.0.0.1). Stores and API replicas are +# reachable from the host via `docker compose exec` / `docker compose logs`. +# No container_name anywhere: replica hostnames stay the short container IDs, +# which the application reports back as X-Instance-Id. +name: mtusi-messenger-lab3 + +x-app: &app + build: + context: . + dockerfile: Dockerfile + image: mtusi-messenger:lab3 + +services: + postgres: + image: postgres:18-alpine@sha256:77f585114c32fbca283dc835b0596f4e52b51b4c6662d7810b2f4084f60a1873 + environment: + POSTGRES_USER: ${POSTGRES_USER:-messenger} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-messenger} + POSTGRES_DB: ${POSTGRES_DB:-messenger} + volumes: + - postgres18-data:/var/lib/postgresql + healthcheck: + test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"] + interval: 5s + timeout: 5s + retries: 10 + start_period: 5s + deploy: + resources: + limits: + # Saturation point of the stand (see REPORT.md, track 1): the database + # runs at its quota while API replicas idle. Raise this knob to give the + # shared dependency more of the host CPU. + cpus: "${POSTGRES_CPU_LIMIT:-0.50}" + memory: ${POSTGRES_MEM_LIMIT:-384M} + restart: unless-stopped + + redis: + image: redis:7.4-alpine + command: + - redis-server + - --appendonly + - "yes" + - --appendfsync + - everysec + - --save + - "60" + - "1" + volumes: + - redis7-data:/data + healthcheck: + test: ["CMD", "redis-cli", "ping"] + interval: 5s + timeout: 3s + retries: 10 + start_period: 3s + deploy: + resources: + limits: + cpus: "0.25" + memory: 192M + restart: unless-stopped + + # One-shot schema bootstrap; runs once to completion before any API replica. + migrate: + <<: *app + entrypoint: ["/usr/local/bin/migrate"] + command: ["up"] + environment: + APP_CONFIG: /etc/messenger/dev/config.yaml + POSTGRES_HOST: postgres + POSTGRES_PORT: "5432" + POSTGRES_DATABASE: ${POSTGRES_DB:-messenger} + POSTGRES_USER: ${POSTGRES_USER:-messenger} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-messenger} + POSTGRES_SSL_MODE: disable + depends_on: + postgres: + condition: service_healthy + deploy: + resources: + limits: + cpus: "0.50" + memory: 256M + # One-shot: healthcheck из образа (проверка /health/live) для него бессмыслен. + healthcheck: + disable: true + restart: "no" + + api: + <<: *app + # Общий сетевой alias: LB резолвит одно имя в адреса всех реплик, поэтому + # масштабирование и замена контейнеров не зависят от их номеров/ID. + networks: + default: + aliases: + - api-replica + env_file: + - path: .env + required: false + # Explicit values win over localhost defaults coming from .env (see .env.example). + environment: + APP_CONFIG: /etc/messenger/dev/config.yaml + POSTGRES_HOST: postgres + POSTGRES_PORT: "5432" + POSTGRES_DATABASE: ${POSTGRES_DB:-messenger} + POSTGRES_USER: ${POSTGRES_USER:-messenger} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-messenger} + POSTGRES_SSL_MODE: disable + REDIS_ENABLED: "true" + REDIS_HOST: redis + REDIS_PORT: "6379" + CACHE_ENABLED: "true" + # Размер пула соединений ОДНОЙ реплики; общий расход = реплики × значение. + # Это один из общих ресурсов, который масштабирование расходует первым. + POSTGRES_MAX_CONNS: "${POSTGRES_MAX_CONNS:-10}" + deploy: + replicas: ${API_REPLICAS:-2} + resources: + limits: + cpus: "${API_CPU_LIMIT:-0.50}" + memory: ${API_MEM_LIMIT:-256M} + # The app drains on SIGTERM within SERVER_SHUTDOWN_TIMEOUT; keep the grace + # period above it so Docker does not SIGKILL an in-flight request. + stop_grace_period: 15s + depends_on: + postgres: + condition: service_healthy + redis: + condition: service_healthy + migrate: + condition: service_completed_successfully + healthcheck: + test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://127.0.0.1:8080/health/ready"] + interval: 10s + # Готовность проверяет PostgreSQL (критичную зависимость; кэш деградирует + # безопасно): под насыщающей нагрузкой ответ может подойти к секундам, и + # слишком строгий таймаут помечает занятую, но работающую реплику как + # unhealthy. + timeout: 5s + retries: 6 + start_period: 5s + restart: unless-stopped + + # Public entry point. Active /health/ready probes remove a not-ready replica from + # rotation entirely; infra/lb/haproxy.cfg holds the upstream, checks and retries. + lb: + image: haproxy:3.2-alpine + volumes: + - ./infra/lb/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro + ports: + - "127.0.0.1:${SERVER_PORT:-8080}:80" + # Operator-only stats page on loopback: shows which replica is UP/DOWN and why. + - "127.0.0.1:${LB_STATS_PORT:-8404}:8404" + depends_on: + api: + condition: service_healthy + deploy: + resources: + limits: + cpus: "${LB_CPU_LIMIT:-0.25}" + memory: 64M + restart: unless-stopped + +volumes: + postgres18-data: + redis7-data: diff --git a/config/dev/config.yaml b/config/dev/config.yaml index ba24063a..5e6cd560 100644 --- a/config/dev/config.yaml +++ b/config/dev/config.yaml @@ -5,6 +5,9 @@ server: port: 8080 read_header_timeout: 10s shutdown_timeout: 10s + # Предел размера тела запроса; JSON API ЛР3 укладывается в сотни килобайт, + # а загрузка вложений ЛР4 (до 10 MiB) поднимает это значение явно. + max_body_bytes: 262144 log: level: info @@ -45,3 +48,7 @@ cache: session: ttl_seconds: 3600 + +# Retention of a message Idempotency-Key; contract 1.3.0 requires ≥ 24 h. +idempotency: + ttl_seconds: 86400 diff --git a/evidence/arch.txt b/evidence/arch.txt new file mode 100644 index 00000000..99650330 --- /dev/null +++ b/evidence/arch.txt @@ -0,0 +1,7 @@ +# Architecture of the app binary inside the image +# generated: 2026-10-15T19:03:01Z + +## emulated build (--build-arg TARGETARCH=amd64): e_machine 3e = x86-64 + 02 00 3e 00 +## fixed build (no TARGETARCH default): e_machine b7 = aarch64 + 02 00 b7 00 diff --git a/evidence/body-limit.txt b/evidence/body-limit.txt new file mode 100644 index 00000000..b5f56f9a --- /dev/null +++ b/evidence/body-limit.txt @@ -0,0 +1,3 @@ +# body limit check — 2026-10-16T14:02:25Z (limit 256 KiB from SERVER_MAX_BODY_BYTES) +тело 400 КиБ (сверх лимита): 413 +тело 100 КиБ (в пределах): в„– 400 diff --git a/evidence/db-outage.txt b/evidence/db-outage.txt new file mode 100644 index 00000000..7018ae66 --- /dev/null +++ b/evidence/db-outage.txt @@ -0,0 +1,7 @@ +# Отказ PostgreSQL на пути отправки сообщения — 2026-10-16T14:10:06Z +до остановки БД, через LB : 201 (instance=828f6451261b) +до остановки БД, напрямую : 201 +при остановленной БД, напрямую (ожидается 503): 503 +при остановленной БД, через LB : 503 (instance=828f6451261b) +готовность после возврата БД: True +после возврата БД, через LB : 201 (instance=828f6451261b) diff --git a/evidence/failover/run1.txt b/evidence/failover/run1.txt new file mode 100644 index 00000000..57cc4cf8 --- /dev/null +++ b/evidence/failover/run1.txt @@ -0,0 +1,5 @@ +# make test-failover (прогон 1) — 2026-10-16T13:59:43Z +env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://localhost:8080" +Executing explicit failover hook; hook output suppressed to avoid leaking secrets. +{"observed_instances_before": 2, "successful_writes": 127, "failed_attempts": 0, "first_recovery_seconds": 0.214} +PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence. diff --git a/evidence/failover/run2.txt b/evidence/failover/run2.txt new file mode 100644 index 00000000..641f781f --- /dev/null +++ b/evidence/failover/run2.txt @@ -0,0 +1,5 @@ +# make test-failover (прогон 2) — 2026-10-16T13:59:43Z +env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://localhost:8080" +Executing explicit failover hook; hook output suppressed to avoid leaking secrets. +{"observed_instances_before": 2, "successful_writes": 100, "failed_attempts": 0, "first_recovery_seconds": 2.237} +PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence. diff --git a/evidence/failover/sequential.txt b/evidence/failover/sequential.txt new file mode 100644 index 00000000..96e5f49e --- /dev/null +++ b/evidence/failover/sequential.txt @@ -0,0 +1,54 @@ +# student-tests/replica_failover.py — 2026-10-16T13:59:43Z +{ + "before": { + "instances": [ + "52861386fddb", + "8587b4251b72" + ] + }, + "replicas": [ + { + "stopped": "52861386fddb", + "stopped_container": "stop-one.sh: stopped api replica(s): mtusi-messenger-lab3-api-5", + "hook_returncode": 0, + "hook_seconds": 0.151, + "hook_error": "", + "successful_writes": 91, + "successful_rps": 6.06, + "failed_attempts": 0, + "uncertain_retries": 0, + "first_recovery_seconds": 1.659, + "instances_after_recovery": [ + "8587b4251b72" + ], + "messages_in_history": 91, + "restored_seconds": 0.201, + "instances_restored": [ + "52861386fddb", + "8587b4251b72" + ] + }, + { + "stopped": "8587b4251b72", + "stopped_container": "stop-one.sh: stopped api replica(s): mtusi-messenger-lab3-api-6", + "hook_returncode": 0, + "hook_seconds": 0.154, + "hook_error": "", + "successful_writes": 100, + "successful_rps": 6.66, + "failed_attempts": 0, + "uncertain_retries": 0, + "first_recovery_seconds": 1.656, + "instances_after_recovery": [ + "52861386fddb" + ], + "messages_in_history": 191, + "restored_seconds": 0.182, + "instances_restored": [ + "52861386fddb", + "8587b4251b72" + ] + } + ] +} +PASS: каждая реплика остановлена по очереди; записи продолжились, дублей и потерь нет diff --git a/evidence/idempotency.txt b/evidence/idempotency.txt new file mode 100644 index 00000000..d1287d32 --- /dev/null +++ b/evidence/idempotency.txt @@ -0,0 +1,4 @@ +# make test-idempotency — 2026-10-16T13:59:43Z +env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 student-tests/idempotency_parallel.py --base-url "http://localhost:8080" +{"replay": {"workers": 12, "instances": ["52861386fddb", "8587b4251b72"], "message_id": "01a14502-f747-7fa8-bbad-84fa27f0ce80"}, "conflict": {"workers": 12, "accepted": 1, "conflicts": 11}, "stable_body": {"message_id": "01a14502-f771-7ea3-a03a-4d559e466ac8"}, "key_required": {"status": 400}} +PASS: параллельный повтор с одним Idempotency-Key создаёт ровно одно сообщение diff --git a/evidence/lab1-2/README.md b/evidence/lab1-2/README.md new file mode 100644 index 00000000..052da1ed --- /dev/null +++ b/evidence/lab1-2/README.md @@ -0,0 +1,17 @@ +# Артефакты предыдущих лабораторных (ЛР1 и ЛР2) + +Файлы перенесены сюда из `evidence/`, потому что относятся к **прежним** конфигурациям +стенда и не являются доказательствами ЛР3: они сняты в ЛР1/ЛР2 в репозитории +`mtusi-messenger` и попали сюда вместе с переносом кода. Часть из них ссылается на +образ `mtusi2026lab1-messenger` и на in-memory хранилище, которое удалено ещё в ЛР2, +поэтому их нельзя читать как проверки текущего решения. + +- `check.txt`, `quality.txt`, `concurrency.txt`, `docker.txt`, `health.txt`, `restart.txt`, `sigterm.txt` — ЛР1: офлайн-проверка структуры, линт и тесты, конкурентные чтения, запуск контейнера и обработка SIGTERM. +- `memory-experiment.*` — ЛР1: сравнение in-memory хранилища и PostgreSQL. +- `track1-benchmark/` — ЛР1, трек 1: бенчмарк append-оптимизации in-memory хранилища (скрипт `scripts/track1_benchmark.py` удалён в ЛР3 как осиротевший: он ссылался на удалённый файл хранилища). +- `cache/` — ЛР2: эксперименты с кэшем списка чатов, согласованность и поведение при отказе Redis. +- `postgres/explain-analyze.txt` — ЛР2: план запроса истории сообщений. + +Доказательства ЛР3 лежат рядом, в `evidence/` (`smoke.txt`, `idempotency.txt`, +`persistence.txt`, `failover/`, `lb-readiness.txt`, `rolling-update/`, +`stand.txt`, `arch.txt`, `track1/`), и собраны в `REPORT.md`. diff --git a/evidence/cache/api-performance.txt b/evidence/lab1-2/cache/api-performance.txt similarity index 100% rename from evidence/cache/api-performance.txt rename to evidence/lab1-2/cache/api-performance.txt diff --git a/evidence/cache/consistency.txt b/evidence/lab1-2/cache/consistency.txt similarity index 100% rename from evidence/cache/consistency.txt rename to evidence/lab1-2/cache/consistency.txt diff --git a/evidence/cache/latency.txt b/evidence/lab1-2/cache/latency.txt similarity index 100% rename from evidence/cache/latency.txt rename to evidence/lab1-2/cache/latency.txt diff --git a/evidence/cache/performance.txt b/evidence/lab1-2/cache/performance.txt similarity index 100% rename from evidence/cache/performance.txt rename to evidence/lab1-2/cache/performance.txt diff --git a/evidence/cache/redis-outage.txt b/evidence/lab1-2/cache/redis-outage.txt similarity index 100% rename from evidence/cache/redis-outage.txt rename to evidence/lab1-2/cache/redis-outage.txt diff --git a/evidence/check.txt b/evidence/lab1-2/check.txt similarity index 100% rename from evidence/check.txt rename to evidence/lab1-2/check.txt diff --git a/evidence/concurrency.txt b/evidence/lab1-2/concurrency.txt similarity index 100% rename from evidence/concurrency.txt rename to evidence/lab1-2/concurrency.txt diff --git a/evidence/docker.txt b/evidence/lab1-2/docker.txt similarity index 100% rename from evidence/docker.txt rename to evidence/lab1-2/docker.txt diff --git a/evidence/health.txt b/evidence/lab1-2/health.txt similarity index 100% rename from evidence/health.txt rename to evidence/lab1-2/health.txt diff --git a/evidence/memory-experiment.json b/evidence/lab1-2/memory-experiment.json similarity index 100% rename from evidence/memory-experiment.json rename to evidence/lab1-2/memory-experiment.json diff --git a/evidence/memory-experiment.png b/evidence/lab1-2/memory-experiment.png similarity index 100% rename from evidence/memory-experiment.png rename to evidence/lab1-2/memory-experiment.png diff --git a/evidence/memory-experiment.txt b/evidence/lab1-2/memory-experiment.txt similarity index 100% rename from evidence/memory-experiment.txt rename to evidence/lab1-2/memory-experiment.txt diff --git a/evidence/postgres/explain-analyze.txt b/evidence/lab1-2/postgres/explain-analyze.txt similarity index 100% rename from evidence/postgres/explain-analyze.txt rename to evidence/lab1-2/postgres/explain-analyze.txt diff --git a/evidence/lab1-2/quality.txt b/evidence/lab1-2/quality.txt new file mode 100644 index 00000000..300529d2 --- /dev/null +++ b/evidence/lab1-2/quality.txt @@ -0,0 +1,43 @@ +$ make check +env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 scripts/check_contract.py +PASS: offline skeleton structure, local refs and Python syntax; application NOT tested. + +$ go vet ./... + +$ make lint +/Users/vladislav/Projects/mtusi2026lab1-fork/bin/golangci-lint run -v +level=info msg="golangci-lint has version 2.13.2 built with go1.27.0 from (unknown, modified: ?, mod sum: \"h1:bCyq3E4vo9qwzifjpzJqYndEt7Ncva80qkk8G2B4TXU=\") on (unknown)" +level=info msg="[config_reader] Config search paths: [./ /Users/vladislav/Projects/mtusi2026lab1-fork /Users/vladislav/Projects /Users/vladislav /Users /]" +level=info msg="[config_reader] Used config file .golangci.yml" +level=info msg="[config_reader] Module name \"mtusi-messenger\"" +level=info msg="[goenv] Read go env for 5.97475ms: map[string]string{\"GOCACHE\":\"/Users/vladislav/Library/Caches/go-build\", \"GOROOT\":\"/opt/homebrew/Cellar/go/1.27.1/libexec\"}" +level=info msg="[lintersdb] Active 50 linters: [asasalint bodyclose canonicalheader containedctx contextcheck copyloopvar depguard durationcheck errcheck errname errorlint exhaustive exptostd fatcontext forbidigo forcetypeassert gocheckcompilerdirectives gocritic gofumpt goimports gomoddirectives gosec govet ineffassign intrange makezero misspell musttag nilerr nilnil noctx nolintlint perfsprint prealloc reassign recvcheck revive rowserrcheck sloglint sqlclosecheck staticcheck testifylint thelper tparallel unconvert unparam unused usestdlibvars usetesting wastedassign]" +level=info msg="[loader] Using build tags: [integration]" +level=info msg="[loader] Go packages loading at mode 8767 (compiled_files|files|name|types_sizes|deps|exports_file|imports) took 122.006042ms" +level=info msg="[runner/filename_unadjuster] Pre-built 0 adjustments in 4.792166ms" +level=info msg="[linters_context/goanalysis] analyzers took 0s with no stages" +level=info msg="[runner/exclusion_rules] Skipped 2 issues by rules: [Path: \"_test\\\\.go\", Linters: \"gosec, prealloc, forcetypeassert, unparam\"]" +level=info msg="[runner] Issues before processing: 280, after processing: 0" +level=info msg="[runner] Processors filtering stat (in/out): exclusion_paths: 280/280, invalid_issue: 280/280, path_absoluter: 280/280, filename_unadjuster: 280/280, generated_file_filter: 280/100, exclusion_rules: 100/0, cgo: 280/280, path_relativity: 280/280" +level=info msg="[runner] processing took 607.916µs with stages: generated_file_filter: 420.959µs, exclusion_rules: 86.124µs, path_relativity: 83.917µs, sort_results: 4.458µs, invalid_issue: 4.292µs, cgo: 3.959µs, path_absoluter: 1.417µs, filename_unadjuster: 792ns, max_same_issues: 582ns, nolint_filter: 457ns, fixer: 292ns, exclusion_paths: 167ns, path_prettifier: 125ns, source_code: 125ns, path_shortener: 124ns, uniq_by_line: 42ns, severity-rules: 42ns, max_per_file_from_linter: 42ns, max_from_linter: 0s, diff: 0s" +level=info msg="[runner] linters took 422.737625ms with stages: goanalysis_metalinter: 422.101875ms" +0 issues. +level=info msg="File cache stats: 0 entries of total size 0B" +level=info msg="Memory: 7 samples, avg is 87.0MB, max is 111.2MB" +level=info msg="Execution took 555.972916ms" + +$ make unit-test +go test -race -shuffle=on -count=1 -timeout=5m ./... +? mtusi-messenger/cmd/messenger [no test files] +ok mtusi-messenger/internal/config 1.838s +ok mtusi-messenger/internal/domain 1.498s +ok mtusi-messenger/internal/logger 2.150s +ok mtusi-messenger/internal/service/chat 2.470s +? mtusi-messenger/internal/service/chat/mocks [no test files] +ok mtusi-messenger/internal/service/message 2.797s +? mtusi-messenger/internal/service/message/mocks [no test files] +ok mtusi-messenger/internal/service/user 3.474s +? mtusi-messenger/internal/service/user/mocks [no test files] +ok mtusi-messenger/internal/storage/memory 3.159s +ok mtusi-messenger/internal/transport/rest 3.863s +? mtusi-messenger/internal/transport/rest/oas [no test files] diff --git a/evidence/restart.txt b/evidence/lab1-2/restart.txt similarity index 100% rename from evidence/restart.txt rename to evidence/lab1-2/restart.txt diff --git a/evidence/sigterm.txt b/evidence/lab1-2/sigterm.txt similarity index 100% rename from evidence/sigterm.txt rename to evidence/lab1-2/sigterm.txt diff --git a/evidence/track1/baseline-storage-benchmark.txt b/evidence/lab1-2/track1-benchmark/baseline-storage-benchmark.txt similarity index 100% rename from evidence/track1/baseline-storage-benchmark.txt rename to evidence/lab1-2/track1-benchmark/baseline-storage-benchmark.txt diff --git a/evidence/track1/baseline.json b/evidence/lab1-2/track1-benchmark/baseline.json similarity index 100% rename from evidence/track1/baseline.json rename to evidence/lab1-2/track1-benchmark/baseline.json diff --git a/evidence/track1/comparison.json b/evidence/lab1-2/track1-benchmark/comparison.json similarity index 100% rename from evidence/track1/comparison.json rename to evidence/lab1-2/track1-benchmark/comparison.json diff --git a/evidence/track1/go-baseline/results.json b/evidence/lab1-2/track1-benchmark/go-baseline/results.json similarity index 100% rename from evidence/track1/go-baseline/results.json rename to evidence/lab1-2/track1-benchmark/go-baseline/results.json diff --git a/evidence/track1/go-comparison.json b/evidence/lab1-2/track1-benchmark/go-comparison.json similarity index 100% rename from evidence/track1/go-comparison.json rename to evidence/lab1-2/track1-benchmark/go-comparison.json diff --git a/evidence/track1/go-optimized/results.json b/evidence/lab1-2/track1-benchmark/go-optimized/results.json similarity index 100% rename from evidence/track1/go-optimized/results.json rename to evidence/lab1-2/track1-benchmark/go-optimized/results.json diff --git a/evidence/track1/optimized-storage-benchmark.txt b/evidence/lab1-2/track1-benchmark/optimized-storage-benchmark.txt similarity index 100% rename from evidence/track1/optimized-storage-benchmark.txt rename to evidence/lab1-2/track1-benchmark/optimized-storage-benchmark.txt diff --git a/evidence/track1/optimized.json b/evidence/lab1-2/track1-benchmark/optimized.json similarity index 100% rename from evidence/track1/optimized.json rename to evidence/lab1-2/track1-benchmark/optimized.json diff --git a/evidence/lb-readiness.txt b/evidence/lb-readiness.txt new file mode 100644 index 00000000..00056343 --- /dev/null +++ b/evidence/lb-readiness.txt @@ -0,0 +1,31 @@ +# LB excludes a not-ready but reachable replica (lab3) +# generated: 2026-10-16T14:02:26Z +# lb: haproxy:3.2-alpine + +## 1. baseline: requests through LB by replica + 18 52861386fddb + 22 8587b4251b72 + stats: api1=UP api2=UP api3=MAINT (resolution) api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP + +## 2. start a temporary TCP proxy to postgres and a candidate replica behind the same network alias + instance-id: 9e9e905440d3, readiness while its database is reachable: 200 + load balancer slot for the candidate: api3, stats: api1=UP api2=UP api3=UP api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP + +## 3. cut the candidate's database access (stop only the TCP proxy) + candidate is still running: running, readiness: 503 + waiting for the load balancer to mark api3 DOWN + api3 went DOWN 2s after its database was cut (check: inter 2s fall 2) + stats after failure: api1=UP api2=UP api3=DOWN api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP + +## 4. 40 requests through LB while the candidate is not ready + 18 52861386fddb + 22 8587b4251b72 + (the candidate must not appear above) + +## 5. business writes through LB during the exclusion + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1163.529, + +## 6. cleanup + stats after cleanup: api1=UP api2=UP api3=MAINT (resolution) api4=MAINT (resolution) api5=MAINT (resolution) api6=MAINT (resolution) api7=MAINT (resolution) api8=MAINT (resolution) BACKEND=UP diff --git a/evidence/load-32clients.json b/evidence/load-32clients.json new file mode 100644 index 00000000..5f1db3f7 --- /dev/null +++ b/evidence/load-32clients.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 30.0, + "elapsed_seconds": 30.031, + "concurrency": 32, + "successful_requests": 38549, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1283.644, + "successful_latency_ms": { + "p50": 19.177, + "p95": 52.823, + "p99": 60.246 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/load-32clients.txt b/evidence/load-32clients.txt new file mode 100644 index 00000000..abad4265 --- /dev/null +++ b/evidence/load-32clients.txt @@ -0,0 +1,18 @@ +# контейнерный стенд через LB, 32 клиента, 30 с — 2026-10-16T14:26:39Z +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 30.0, + "elapsed_seconds": 30.031, + "concurrency": 32, + "successful_requests": 38549, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1283.644, + "successful_latency_ms": { + "p50": 19.177, + "p95": 52.823, + "p99": 60.246 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/native-load.json b/evidence/native-load.json new file mode 100644 index 00000000..d7664cc7 --- /dev/null +++ b/evidence/native-load.json @@ -0,0 +1,22 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; failures counted, not raised", + "requested_duration_seconds": 90.0, + "elapsed_seconds": 90.033, + "concurrency": 32, + "successful_requests": 220781, + "failed_requests": 0, + "error_ratio": 0.0, + "errors_by_kind": {}, + "successful_rps": 2452.222, + "successful_latency_ms": { + "p50": 12.541, + "p95": 17.549, + "p99": 22.396 + }, + "instances": { + "Vladislavs-MacBook-Pro.local": 220781 + }, + "bootstrap_attempts": 1, + "note": "Percentiles cover successful writes only; transitional errors are expected during a rolling update." +} diff --git a/evidence/native-load.txt b/evidence/native-load.txt new file mode 100644 index 00000000..7d08d0b5 --- /dev/null +++ b/evidence/native-load.txt @@ -0,0 +1,23 @@ +# нативный процесс вне Docker, 32 клиента, 90 с — 2026-10-16T14:26:39Z +{ + "lab": 3, + "workload": "closed-loop POST messages; failures counted, not raised", + "requested_duration_seconds": 90.0, + "elapsed_seconds": 90.033, + "concurrency": 32, + "successful_requests": 220781, + "failed_requests": 0, + "error_ratio": 0.0, + "errors_by_kind": {}, + "successful_rps": 2452.222, + "successful_latency_ms": { + "p50": 12.541, + "p95": 17.549, + "p99": 22.396 + }, + "instances": { + "Vladislavs-MacBook-Pro.local": 220781 + }, + "bootstrap_attempts": 1, + "note": "Percentiles cover successful writes only; transitional errors are expected during a rolling update." +} diff --git a/evidence/path-overhead/README.md b/evidence/path-overhead/README.md new file mode 100644 index 00000000..b1efa16a --- /dev/null +++ b/evidence/path-overhead/README.md @@ -0,0 +1,40 @@ +# Контроль пути «хост -> Colima VM -> LB» + +Один и тот же генератор (`tests/load.py`), один и тот же профиль (закрытый цикл, +8 клиентов, 15 с прогрева, 60 с замера) и один и тот же стенд. Меняется только +место клиента: на хосте (через опубликованный порт) или в контейнере внутри VM +(напрямую в балансировщик по docker-сети). Воспроизведение: +`scripts/path_overhead_check.sh`. + +| клиент | успешных | отказов | ошибки | RPS | p50, мс | p95, мс | +| --- | --- | --- | --- | --- | --- | --- | +| на хосте, `http://127.0.0.1:8080` | 92 378 | 32 575 | 26.1 % | 1 539 | 3.79 | 7.16 | +| в VM, `http://lb` | 88 596 | **0** | 0 % | 1 475 | 5.29 | 8.42 | + +## Что это показывает + +1. **Пропускная способность одна и та же** (1 539 против 1 475, разница в пределах + разброса; клиент в VM даже немного медленнее, потому что делит с стендом те же + 2 vCPU). Значит путь «хост -> проброс порта -> VM» **не задаёт потолок**: его + исключение из маршрута ничего не прибавляет. +2. **Отказы целиком клиентские.** Тот же стенд под той же нагрузкой не отказал ни + разу для клиента внутри VM. При этом за прогон с 26 % клиентских отказов + балансировщик отдал все запросы без 5xx (`hrsp_5xx=0` в статистике HAProxy), а + в логах API нет ни одной записи уровня выше `info`. +3. Причина — сам проброс порта: генератор ходит без keep-alive (новое TCP-соединение + на запрос), и под шквалом соединений forwarder хоста начинает их отклонять. + Наблюдения: в момент замера на хосте было **19 556 сокетов в `TIME_WAIT`** при + диапазоне эфемерных портов 49 152-65 535 (16 384), а точечный пробник из 40 000 + быстрых подключений подряд получил 1 294 успеха и 38 706 `ECONNREFUSED`. +4. Предел этой хрупкости тоже измерен: прогон на ~4 500 соединений/с по тривиальному + `/health/live` дал 100 % отказов, после чего проброс порта (и доступ к Docker-эндпоинту + Colima) перестал отвечать до `colima restart`. Стенд при этом не падал — недоступным + был именно хостовый путь; серия трека 1 поэтому снимается клиентом внутри VM + (`CLIENT=vm`), где отказов нет. + +Клиент на хосте способен на большее: тот же закрытый цикл по тривиальному серверу, +поднятому на самом хосте (без Docker), дал 4 469 RPS без отказов — то есть ~1 500 RPS +не являются потолком генератора. + +Артефакты: `outside.txt`, `inside.txt`, `load-outside.json`, `load-inside.json`, +`summary.txt`. diff --git a/evidence/path-overhead/inside.txt b/evidence/path-overhead/inside.txt new file mode 100644 index 00000000..b8c7061b --- /dev/null +++ b/evidence/path-overhead/inside.txt @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.073, + "concurrency": 8, + "successful_requests": 88596, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1474.795, + "successful_latency_ms": { + "p50": 5.292, + "p95": 8.415, + "p99": 10.433 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/path-overhead/load-inside.json b/evidence/path-overhead/load-inside.json new file mode 100644 index 00000000..b8c7061b --- /dev/null +++ b/evidence/path-overhead/load-inside.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.073, + "concurrency": 8, + "successful_requests": 88596, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1474.795, + "successful_latency_ms": { + "p50": 5.292, + "p95": 8.415, + "p99": 10.433 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/path-overhead/load-outside.json b/evidence/path-overhead/load-outside.json new file mode 100644 index 00000000..20b2005f --- /dev/null +++ b/evidence/path-overhead/load-outside.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.026, + "concurrency": 8, + "successful_requests": 92378, + "failed_requests": 32575, + "error_ratio": 0.260698, + "successful_rps": 1538.959, + "successful_latency_ms": { + "p50": 3.793, + "p95": 7.159, + "p99": 21.756 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/path-overhead/outside.txt b/evidence/path-overhead/outside.txt new file mode 100644 index 00000000..20b2005f --- /dev/null +++ b/evidence/path-overhead/outside.txt @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.026, + "concurrency": 8, + "successful_requests": 92378, + "failed_requests": 32575, + "error_ratio": 0.260698, + "successful_rps": 1538.959, + "successful_latency_ms": { + "p50": 3.793, + "p95": 7.159, + "p99": 21.756 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/path-overhead/summary.txt b/evidence/path-overhead/summary.txt new file mode 100644 index 00000000..d9c322f1 --- /dev/null +++ b/evidence/path-overhead/summary.txt @@ -0,0 +1,9 @@ +# Контроль пути к балансировщику +# generated: 2026-10-16T18:17:21Z +# profile: tests/load.py duration=60 concurrency=8 warmup=15 +# docker network: mtusi-messenger-lab3_default +# клиент в VM: python:3.12-alpine + +=== извне: клиент на хосте, http://127.0.0.1:8080 === + +=== изнутри: клиент в VM, http://lb === diff --git a/evidence/persistence.txt b/evidence/persistence.txt new file mode 100644 index 00000000..0946dd7d --- /dev/null +++ b/evidence/persistence.txt @@ -0,0 +1,4 @@ +# make test-persistence — 2026-10-16T13:59:43Z +env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://localhost:8080" +Executing explicit persistence hook; hook output suppressed to avoid leaking secrets. +PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence. diff --git a/evidence/quality.txt b/evidence/quality.txt index 300529d2..917d5292 100644 --- a/evidence/quality.txt +++ b/evidence/quality.txt @@ -1,43 +1,35 @@ -$ make check -env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 scripts/check_contract.py +# quality checks — 2026-10-16T14:30:53Z +python3 scripts/check_contract.py PASS: offline skeleton structure, local refs and Python syntax; application NOT tested. - -$ go vet ./... - -$ make lint -/Users/vladislav/Projects/mtusi2026lab1-fork/bin/golangci-lint run -v -level=info msg="golangci-lint has version 2.13.2 built with go1.27.0 from (unknown, modified: ?, mod sum: \"h1:bCyq3E4vo9qwzifjpzJqYndEt7Ncva80qkk8G2B4TXU=\") on (unknown)" -level=info msg="[config_reader] Config search paths: [./ /Users/vladislav/Projects/mtusi2026lab1-fork /Users/vladislav/Projects /Users/vladislav /Users /]" -level=info msg="[config_reader] Used config file .golangci.yml" -level=info msg="[config_reader] Module name \"mtusi-messenger\"" -level=info msg="[goenv] Read go env for 5.97475ms: map[string]string{\"GOCACHE\":\"/Users/vladislav/Library/Caches/go-build\", \"GOROOT\":\"/opt/homebrew/Cellar/go/1.27.1/libexec\"}" -level=info msg="[lintersdb] Active 50 linters: [asasalint bodyclose canonicalheader containedctx contextcheck copyloopvar depguard durationcheck errcheck errname errorlint exhaustive exptostd fatcontext forbidigo forcetypeassert gocheckcompilerdirectives gocritic gofumpt goimports gomoddirectives gosec govet ineffassign intrange makezero misspell musttag nilerr nilnil noctx nolintlint perfsprint prealloc reassign recvcheck revive rowserrcheck sloglint sqlclosecheck staticcheck testifylint thelper tparallel unconvert unparam unused usestdlibvars usetesting wastedassign]" -level=info msg="[loader] Using build tags: [integration]" -level=info msg="[loader] Go packages loading at mode 8767 (compiled_files|files|name|types_sizes|deps|exports_file|imports) took 122.006042ms" -level=info msg="[runner/filename_unadjuster] Pre-built 0 adjustments in 4.792166ms" -level=info msg="[linters_context/goanalysis] analyzers took 0s with no stages" -level=info msg="[runner/exclusion_rules] Skipped 2 issues by rules: [Path: \"_test\\\\.go\", Linters: \"gosec, prealloc, forcetypeassert, unparam\"]" -level=info msg="[runner] Issues before processing: 280, after processing: 0" -level=info msg="[runner] Processors filtering stat (in/out): exclusion_paths: 280/280, invalid_issue: 280/280, path_absoluter: 280/280, filename_unadjuster: 280/280, generated_file_filter: 280/100, exclusion_rules: 100/0, cgo: 280/280, path_relativity: 280/280" -level=info msg="[runner] processing took 607.916µs with stages: generated_file_filter: 420.959µs, exclusion_rules: 86.124µs, path_relativity: 83.917µs, sort_results: 4.458µs, invalid_issue: 4.292µs, cgo: 3.959µs, path_absoluter: 1.417µs, filename_unadjuster: 792ns, max_same_issues: 582ns, nolint_filter: 457ns, fixer: 292ns, exclusion_paths: 167ns, path_prettifier: 125ns, source_code: 125ns, path_shortener: 124ns, uniq_by_line: 42ns, severity-rules: 42ns, max_per_file_from_linter: 42ns, max_from_linter: 0s, diff: 0s" -level=info msg="[runner] linters took 422.737625ms with stages: goanalysis_metalinter: 422.101875ms" -0 issues. -level=info msg="File cache stats: 0 entries of total size 0B" -level=info msg="Memory: 7 samples, avg is 87.0MB, max is 111.2MB" -level=info msg="Execution took 555.972916ms" - -$ make unit-test -go test -race -shuffle=on -count=1 -timeout=5m ./... +.venv/bin/python scripts/validate_openapi.py +PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested. +env -u APP_ENV -u SERVER_HOST -u SERVER_PORT -u SERVER_READ_HEADER_TIMEOUT -u SERVER_SHUTDOWN_TIMEOUT -u LOG_LEVEL -u LOG_FORMAT -u POSTGRES_HOST -u POSTGRES_PORT -u POSTGRES_DATABASE -u POSTGRES_USER -u POSTGRES_PASSWORD -u POSTGRES_SSL_MODE -u POSTGRES_MAX_CONNS -u POSTGRES_MIN_CONNS -u POSTGRES_MAX_CONN_LIFETIME -u POSTGRES_MAX_CONN_IDLE_TIME -u POSTGRES_CONNECT_TIMEOUT -u POSTGRES_QUERY_TIMEOUT -u REDIS_ENABLED -u REDIS_HOST -u REDIS_PORT -u REDIS_PASSWORD -u REDIS_DB -u REDIS_MAX_RETRIES -u REDIS_DIAL_TIMEOUT -u REDIS_READ_TIMEOUT -u REDIS_WRITE_TIMEOUT -u REDIS_POOL_SIZE -u CACHE_ENABLED -u CACHE_CHAT_LIST_TTL -u CACHE_LOCK_TTL -u CACHE_LOCK_WAIT_TIMEOUT -u SESSION_TTL_SECONDS -u IDEMPOTENCY_TTL_SECONDS -u API_REPLICAS -u API_CPU_LIMIT -u API_MEM_LIMIT go test -race -shuffle=on -count=1 -timeout=5m ./... ? mtusi-messenger/cmd/messenger [no test files] -ok mtusi-messenger/internal/config 1.838s -ok mtusi-messenger/internal/domain 1.498s -ok mtusi-messenger/internal/logger 2.150s -ok mtusi-messenger/internal/service/chat 2.470s +? mtusi-messenger/cmd/migrate [no test files] +ok mtusi-messenger/internal/config 1.633s +ok mtusi-messenger/internal/domain 1.222s +ok mtusi-messenger/internal/health 1.397s +ok mtusi-messenger/internal/logger 1.803s +ok mtusi-messenger/internal/platform/cache 2.104s +? mtusi-messenger/internal/platform/cache/mocks [no test files] +ok mtusi-messenger/internal/platform/password 2.659s +ok mtusi-messenger/internal/platform/token 2.147s +ok mtusi-messenger/internal/service/chat 2.733s ? mtusi-messenger/internal/service/chat/mocks [no test files] -ok mtusi-messenger/internal/service/message 2.797s +ok mtusi-messenger/internal/service/message 2.527s ? mtusi-messenger/internal/service/message/mocks [no test files] -ok mtusi-messenger/internal/service/user 3.474s +ok mtusi-messenger/internal/service/session 3.204s +? mtusi-messenger/internal/service/session/mocks [no test files] +ok mtusi-messenger/internal/service/user 3.505s ? mtusi-messenger/internal/service/user/mocks [no test files] -ok mtusi-messenger/internal/storage/memory 3.159s -ok mtusi-messenger/internal/transport/rest 3.863s -? mtusi-messenger/internal/transport/rest/oas [no test files] +ok mtusi-messenger/internal/storage/postgres 3.147s +? mtusi-messenger/internal/storage/postgres/internal/sqlcgen [no test files] +? mtusi-messenger/internal/storage/postgres/migrations [no test files] +? mtusi-messenger/internal/storage/redis [no test files] +? mtusi-messenger/internal/storage/redis/mocks [no test files] +ok mtusi-messenger/internal/transport/rest 3.609s +? mtusi-messenger/internal/transport/rest/internal/oas [no test files] +? mtusi-messenger/internal/transport/rest/mocks [no test files] +go test -tags=integration -p 1 -count=1 -timeout=15m ./internal/storage/postgres ./internal/storage/redis +ok mtusi-messenger/internal/storage/postgres 7.210s +ok mtusi-messenger/internal/storage/redis 1.192s diff --git a/evidence/quota-semantics.txt b/evidence/quota-semantics.txt new file mode 100644 index 00000000..f50c0cfd --- /dev/null +++ b/evidence/quota-semantics.txt @@ -0,0 +1,33 @@ +# Что означает CPU% в `docker stats` на этом стенде + +Колонка `cpu_percent` в `stats-*.csv` снимается через `docker stats`. Чтобы не +толковать её наугад, поведение проверено прямым экспериментом на том же Docker-host +(Colima, 2 vCPU). + +```sh +docker run -d --name lab3-quota-probe --cpus 0.5 alpine:3.20 sh -c 'while :; do :; done' +sleep 12 +docker stats --no-stream --format '{{.Name}} CPU={{.CPUPerc}}' lab3-quota-probe +docker exec lab3-quota-probe cat /sys/fs/cgroup/cpu.max +``` + +``` +lab3-quota-probe CPU=49.49% MEM=344KiB / 1.913GiB +50000 100000 +``` + +Контейнер упёрт в свою квоту (`cpu.max = 50000 100000` — это 0.5 CPU) и показывает +**49.49 %**. Значит в этом окружении `docker stats` печатает процент от **одного +ядра**: 100 % = 1 ядро, квота 0.5 CPU = ~50 %, квота 0.25 = ~25 %. + +Как это читать в артефактах: + +| сервис | квота | наблюдение в профилях | вывод | +| --- | --- | --- | --- | +| `postgres` | 0.50 | 45-50.5 % | 0.45-0.5 ядра, то есть **у самой квоты** | +| `api` (2 реплики) | 0.50 каждая | ~20 % каждая | 0.2 ядра, квота не выбрана | +| `lb` | 0.25 | 11-14 % | 0.11-0.14 ядра, квота не выбрана | + +Отсюда же следует, что разница между профилем `r2` (PostgreSQL 0.50) и `db1cpu` +(PostgreSQL 1.00) читается корректно: в `db1cpu` загрузка БД падала до ~46 %, то есть +удвоенная квота не была использована — БД не была зажата квотой. diff --git a/evidence/rolling-update/after/load.json b/evidence/rolling-update/after/load.json new file mode 100644 index 00000000..d45df8a2 --- /dev/null +++ b/evidence/rolling-update/after/load.json @@ -0,0 +1,26 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; failures counted, not raised", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.013, + "concurrency": 8, + "successful_requests": 97359, + "failed_requests": 3, + "error_ratio": 3.1e-05, + "errors_by_kind": { + "http_error": 3 + }, + "successful_rps": 1622.308, + "successful_latency_ms": { + "p50": 4.011, + "p95": 8.688, + "p99": 23.718 + }, + "instances": { + "f00a99f95855": 594, + "8782633d0431": 48162, + "4248067e3f04": 48603 + }, + "bootstrap_attempts": 1, + "note": "Percentiles cover successful writes only; transitional errors are expected during a rolling update." +} diff --git a/evidence/rolling-update/after/load.txt b/evidence/rolling-update/after/load.txt new file mode 100644 index 00000000..d45df8a2 --- /dev/null +++ b/evidence/rolling-update/after/load.txt @@ -0,0 +1,26 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; failures counted, not raised", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.013, + "concurrency": 8, + "successful_requests": 97359, + "failed_requests": 3, + "error_ratio": 3.1e-05, + "errors_by_kind": { + "http_error": 3 + }, + "successful_rps": 1622.308, + "successful_latency_ms": { + "p50": 4.011, + "p95": 8.688, + "p99": 23.718 + }, + "instances": { + "f00a99f95855": 594, + "8782633d0431": 48162, + "4248067e3f04": 48603 + }, + "bootstrap_attempts": 1, + "note": "Percentiles cover successful writes only; transitional errors are expected during a rolling update." +} diff --git a/evidence/rolling-update/after/rolling-update.txt b/evidence/rolling-update/after/rolling-update.txt new file mode 100644 index 00000000..769e63a4 --- /dev/null +++ b/evidence/rolling-update/after/rolling-update.txt @@ -0,0 +1,136 @@ +# Rolling update under load (surge, one replica at a time) +# generated: 2026-10-16T14:26:39Z +# load: tolerant loader, duration=60s concurrency=8 +# проверки готовности LB: httpchk /health/ready, inter 2s fall 2 rise 2, timeout check 1s + +time="2026-10-16T17:26:40+03:00" level=warning msg="buildx Docker CLI plugin not found: falling back to the classic builder. BuildKit-only build features (multi-arch, secrets, ssh, additional contexts, ...) will not be available" + Image mtusi-messenger:lab3 Building + Image mtusi-messenger:lab3 Building +Sending build context to Docker daemon 238kB +Step 1/25 : ARG GO_VERSION=1.27.1 +Step 2/25 : ARG ALPINE_VERSION=3.22 +Step 3/25 : FROM golang:${GO_VERSION}-alpine AS build + ---> 8a5910f31396 +Step 4/25 : ARG TARGETOS + ---> Using cache + ---> d5f2c47ea7a5 +Step 5/25 : ARG TARGETARCH + ---> Using cache + ---> 047ee34b445c +Step 6/25 : ARG VERSION=dev + ---> Using cache + ---> a529d045efeb +Step 7/25 : ENV GOTOOLCHAIN=local + ---> Using cache + ---> 428f1b16b5c5 +Step 8/25 : WORKDIR /opt + ---> Using cache + ---> f37febf8b423 +Step 9/25 : COPY go.mod go.sum ./ + ---> Using cache + ---> c4015f597b99 +Step 10/25 : RUN go mod download + ---> Using cache + ---> 34ef6a6167b0 +Step 11/25 : ARG GOFLAGS="-p=2" + ---> Using cache + ---> deb54a0ce57a +Step 12/25 : ENV GOFLAGS=$GOFLAGS + ---> Using cache + ---> 3da36569422d +Step 13/25 : COPY . . + ---> 198f052f6cce +Step 14/25 : RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -trimpath -buildvcs=false -tags timetzdata -ldflags="-s -w -X main.version=${VERSION}" -o /out/messenger ./cmd/messenger && CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -trimpath -buildvcs=false -tags timetzdata -ldflags="-s -w -X main.version=${VERSION}" -o /out/migrate ./cmd/migrate + ---> Running in 658437823eb9 + ---> Removed intermediate container 658437823eb9 + ---> 10a89d0bb592 +Step 15/25 : FROM alpine:${ALPINE_VERSION} AS runtime + ---> 5291449c3df7 +Step 16/25 : RUN apk add --no-cache ca-certificates wget && addgroup -S -g 10001 app && adduser -S -D -H -u 10001 -G app app + ---> Using cache + ---> f47b074d9bd5 +Step 17/25 : COPY --from=build --chown=10001:10001 /out/messenger /usr/local/bin/messenger + ---> Using cache + ---> 703f8f10d2cc +Step 18/25 : COPY --from=build --chown=10001:10001 /out/migrate /usr/local/bin/migrate + ---> Using cache + ---> c9121622dae2 +Step 19/25 : COPY --chown=10001:10001 config/dev/config.yaml /etc/messenger/dev/config.yaml + ---> Using cache + ---> 0379076307ea +Step 20/25 : USER 10001:10001 + ---> Using cache + ---> 2ff943b7d2e0 +Step 21/25 : EXPOSE 8080 + ---> Using cache + ---> 01674ab574a6 +Step 22/25 : STOPSIGNAL SIGTERM + ---> Using cache + ---> 6c30af2a102c +Step 23/25 : HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=3 CMD wget -q -O /dev/null "http://127.0.0.1:${SERVER_PORT:-8080}/health/live" || exit 1 + ---> Using cache + ---> 76379f8db08d +Step 24/25 : ENTRYPOINT ["/usr/local/bin/messenger"] + ---> Using cache + ---> 778babec5020 +Step 25/25 : LABEL com.docker.compose.image.builder=classic + ---> Using cache + ---> 9e7e0224c87c +Successfully built 9e7e0224c87c +Successfully tagged mtusi-messenger:lab3 + Image mtusi-messenger:lab3 Built + Image mtusi-messenger:lab3 Built +реплик до обновления: 2 +образ старых реплик: sha256:9e7e0224c87cee0ccfa05d5799ec8e2a84b836e51fbda6f1dc3d175d5c0d4640 +образ новой ревизии: sha256:9e7e0224c87cee0ccfa05d5799ec8e2a84b836e51fbda6f1dc3d175d5c0d4640 +ревизия меняется: нет (образ не изменился) +слотов UP до: 3; restarts до: mtusi-messenger-lab3-api-1=0 mtusi-messenger-lab3-api-2=0 + + step 1: lb-rollout-1 обслуживает (образ 9e7e0224c87cee0ccfa05d5799ec8e2a84b836e51fbda6f1dc3d175d5c0d4640, instance 8782633d0431), старый контейнер 2ed432da6dd1 (2ed432da6dd1) снят; UP-слотов 3; 5xx накоплено 416; старт шага 2026-10-16T14:27:22Z + step 2: lb-rollout-2 обслуживает (образ 9e7e0224c87cee0ccfa05d5799ec8e2a84b836e51fbda6f1dc3d175d5c0d4640, instance 4248067e3f04), старый контейнер f00a99f95855 (f00a99f95855) снят; UP-слотов 4; 5xx накоплено 419; старт шага 2026-10-16T14:27:22Z + +load summary (tolerant generator): +{ + "lab": 3, + "workload": "closed-loop POST messages; failures counted, not raised", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.013, + "concurrency": 8, + "successful_requests": 97359, + "failed_requests": 3, + "error_ratio": 3.1e-05, + "errors_by_kind": { + "http_error": 3 + }, + "successful_rps": 1622.308, + "successful_latency_ms": { + "p50": 4.011, + "p95": 8.688, + "p99": 23.718 + }, + "instances": { + "f00a99f95855": 594, + "8782633d0431": 48162, + "4248067e3f04": 48603 + }, + "bootstrap_attempts": 1, + "note": "Percentiles cover successful writes only; transitional errors are expected during a rolling update." +} + +5xx от LB за время обновления (hrsp_5xx frontend): 3 +restarts после: lb-rollout-2=0 lb-rollout-1=0 + +возврат стенда под управление compose: + Container mtusi-messenger-lab3-api-2 Creating + Container mtusi-messenger-lab3-api-1 Creating + Container mtusi-messenger-lab3-api-1 Created + Container mtusi-messenger-lab3-api-2 Created + Container mtusi-messenger-lab3-api-1 Starting + Container mtusi-messenger-lab3-api-1 Started + Container mtusi-messenger-lab3-api-2 Starting + Container mtusi-messenger-lab3-api-2 Started +снято временных контейнеров наплыва: проверено +UP-слотов после: 3; restarts в конце: mtusi-messenger-lab3-api-1=0 mtusi-messenger-lab3-api-2=0 +API containers после обновления: +mtusi-messenger-lab3-api-1 Up Less than a second (health: starting) +mtusi-messenger-lab3-api-2 Up Less than a second (health: starting) diff --git a/evidence/rolling-update/emulated/load.json b/evidence/rolling-update/emulated/load.json new file mode 100644 index 00000000..e46ce7be --- /dev/null +++ b/evidence/rolling-update/emulated/load.json @@ -0,0 +1,23 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; failures counted, not raised", + "requested_duration_seconds": 45.0, + "elapsed_seconds": 45.014, + "concurrency": 8, + "successful_requests": 89560, + "failed_requests": 0, + "error_ratio": 0.0, + "errors_by_kind": {}, + "successful_rps": 1989.584, + "successful_latency_ms": { + "p50": 3.905, + "p95": 6.02, + "p99": 7.984 + }, + "instances": { + "388ebcb74200": 7524, + "73d07d7d76db": 45354, + "cc6274635bd6": 36682 + }, + "note": "Percentiles cover successful writes only; transitional errors are expected during a rolling update." +} diff --git a/evidence/rolling-update/emulated/load.txt b/evidence/rolling-update/emulated/load.txt new file mode 100644 index 00000000..e46ce7be --- /dev/null +++ b/evidence/rolling-update/emulated/load.txt @@ -0,0 +1,23 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; failures counted, not raised", + "requested_duration_seconds": 45.0, + "elapsed_seconds": 45.014, + "concurrency": 8, + "successful_requests": 89560, + "failed_requests": 0, + "error_ratio": 0.0, + "errors_by_kind": {}, + "successful_rps": 1989.584, + "successful_latency_ms": { + "p50": 3.905, + "p95": 6.02, + "p99": 7.984 + }, + "instances": { + "388ebcb74200": 7524, + "73d07d7d76db": 45354, + "cc6274635bd6": 36682 + }, + "note": "Percentiles cover successful writes only; transitional errors are expected during a rolling update." +} diff --git a/evidence/rolling-update/emulated/rolling-update.txt b/evidence/rolling-update/emulated/rolling-update.txt new file mode 100644 index 00000000..c41c89d0 --- /dev/null +++ b/evidence/rolling-update/emulated/rolling-update.txt @@ -0,0 +1,134 @@ +# Rolling update under load +# generated: 2026-10-15T19:03:13Z +# load: tests/load.py duration=45s concurrency=8 (closed loop) +# steps: delete one replica, recreate it from the freshly built image, wait for health + LB + +time="2026-10-15T22:03:13+03:00" level=warning msg="buildx Docker CLI plugin not found: falling back to the classic builder. BuildKit-only build features (multi-arch, secrets, ssh, additional contexts, ...) will not be available" + Image mtusi-messenger:lab3 Building + Image mtusi-messenger:lab3 Building +Sending build context to Docker daemon 213.7kB +Step 1/25 : ARG GO_VERSION=1.27.1 +Step 2/25 : ARG ALPINE_VERSION=3.22 +Step 3/25 : FROM golang:${GO_VERSION}-alpine AS build + ---> 8a5910f31396 +Step 4/25 : ARG TARGETOS + ---> Using cache + ---> d5f2c47ea7a5 +Step 5/25 : ARG TARGETARCH + ---> Using cache + ---> 047ee34b445c +Step 6/25 : ARG VERSION=dev + ---> Using cache + ---> a529d045efeb +Step 7/25 : ENV GOTOOLCHAIN=local + ---> Using cache + ---> 428f1b16b5c5 +Step 8/25 : WORKDIR /opt + ---> Using cache + ---> f37febf8b423 +Step 9/25 : COPY go.mod go.sum ./ + ---> Using cache + ---> c4015f597b99 +Step 10/25 : RUN go mod download + ---> Using cache + ---> 34ef6a6167b0 +Step 11/25 : ARG GOFLAGS="-p=2" + ---> Using cache + ---> deb54a0ce57a +Step 12/25 : ENV GOFLAGS=$GOFLAGS + ---> Using cache + ---> 3da36569422d +Step 13/25 : COPY . . + ---> Using cache + ---> 596dc1ab02d1 +Step 14/25 : RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -trimpath -buildvcs=false -tags timetzdata -ldflags="-s -w -X main.version=${VERSION}" -o /out/messenger ./cmd/messenger && CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -trimpath -buildvcs=false -tags timetzdata -ldflags="-s -w -X main.version=${VERSION}" -o /out/migrate ./cmd/migrate + ---> Using cache + ---> 01aa8bc6200d +Step 15/25 : FROM alpine:${ALPINE_VERSION} AS runtime + ---> 5291449c3df7 +Step 16/25 : RUN apk add --no-cache ca-certificates wget && addgroup -S -g 10001 app && adduser -S -D -H -u 10001 -G app app + ---> Using cache + ---> f47b074d9bd5 +Step 17/25 : COPY --from=build --chown=10001:10001 /out/messenger /usr/local/bin/messenger + ---> Using cache + ---> 50fc6abe3b04 +Step 18/25 : COPY --from=build --chown=10001:10001 /out/migrate /usr/local/bin/migrate + ---> Using cache + ---> 9bf6afe0256d +Step 19/25 : COPY --chown=10001:10001 config/dev/config.yaml /etc/messenger/dev/config.yaml + ---> Using cache + ---> 0d1870a325ec +Step 20/25 : USER 10001:10001 + ---> Using cache + ---> 1991f2ae06cc +Step 21/25 : EXPOSE 8080 + ---> Using cache + ---> 762d1bfb7606 +Step 22/25 : STOPSIGNAL SIGTERM + ---> Using cache + ---> 8a9d8f4f7101 +Step 23/25 : HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=3 CMD wget -q -O /dev/null "http://127.0.0.1:${SERVER_PORT:-8080}/health/live" || exit 1 + ---> Using cache + ---> 65dea502a3f3 +Step 24/25 : ENTRYPOINT ["/usr/local/bin/messenger"] + ---> Using cache + ---> 83bbee72905e +Step 25/25 : LABEL com.docker.compose.image.builder=classic + ---> Using cache + ---> 037f969d5ea1 +Successfully built 037f969d5ea1 +Successfully tagged mtusi-messenger:lab3 + Image mtusi-messenger:lab3 Built + Image mtusi-messenger:lab3 Built + Container mtusi-messenger-lab3-api-13 Recreate + Container mtusi-messenger-lab3-api-14 Recreate + Container mtusi-messenger-lab3-api-13 Recreated + Container mtusi-messenger-lab3-api-14 Recreated + Container mtusi-messenger-lab3-api-14 Starting + Container mtusi-messenger-lab3-api-14 Started + Container mtusi-messenger-lab3-api-13 Starting + Container mtusi-messenger-lab3-api-13 Started +replicas before: 2; instances seen through LB: 2 + Container mtusi-messenger-lab3-api-13 Running + Container mtusi-messenger-lab3-api-14 Creating + Container mtusi-messenger-lab3-api-14 Created + Container mtusi-messenger-lab3-api-14 Starting + Container mtusi-messenger-lab3-api-14 Started + step 1: removed 54a7e7888b5f at 2026-10-15T19:03:20Z, 2 healthy replicas served again at 2026-10-15T19:03:26Z + Container mtusi-messenger-lab3-api-14 Running + Container mtusi-messenger-lab3-api-15 Creating + Container mtusi-messenger-lab3-api-15 Created + Container mtusi-messenger-lab3-api-15 Starting + Container mtusi-messenger-lab3-api-15 Started + step 2: removed 388ebcb74200 at 2026-10-15T19:03:26Z, 2 healthy replicas served again at 2026-10-15T19:03:31Z + +load summary (tolerant generator): +{ + "lab": 3, + "workload": "closed-loop POST messages; failures counted, not raised", + "requested_duration_seconds": 45.0, + "elapsed_seconds": 45.014, + "concurrency": 8, + "successful_requests": 89560, + "failed_requests": 0, + "error_ratio": 0.0, + "errors_by_kind": {}, + "successful_rps": 1989.584, + "successful_latency_ms": { + "p50": 3.905, + "p95": 6.02, + "p99": 7.984 + }, + "instances": { + "388ebcb74200": 7524, + "73d07d7d76db": 45354, + "cc6274635bd6": 36682 + }, + "note": "Percentiles cover successful writes only; transitional errors are expected during a rolling update." +} + +LB responses with 5xx during the update: 0 + +API containers after the update: +mtusi-messenger-lab3-api-15 Up 41 seconds (healthy) +mtusi-messenger-lab3-api-14 Up 46 seconds (healthy) diff --git a/evidence/smoke.txt b/evidence/smoke.txt index cc78c7ac..9ac3434e 100644 --- a/evidence/smoke.txt +++ b/evidence/smoke.txt @@ -1,2 +1,3 @@ -env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 tests/smoke.py --base-url "http://127.0.0.1:8080" -PASS: lab1 public API scenario; infrastructure and grading evidence remain separate. +# make test — 2026-10-16T14:07:37Z (final image) +env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 python3 tests/smoke.py --base-url "http://localhost:8080" +PASS: lab3 public API scenario; infrastructure and grading evidence remain separate. diff --git a/evidence/stand.txt b/evidence/stand.txt new file mode 100644 index 00000000..bc9dd061 --- /dev/null +++ b/evidence/stand.txt @@ -0,0 +1,34 @@ +# Lab3 stand evidence +# generated: 2026-10-16T13:38:19Z + +## docker ps (ports) +mtusi-messenger-lab3-api-6 | 8080/tcp +mtusi-messenger-lab3-api-5 | 8080/tcp +mtusi-messenger-lab3-lb-1 | 127.0.0.1:8404->8404/tcp, 127.0.0.1:8080->80/tcp +mtusi-messenger-lab3-postgres-1 | 5432/tcp +mtusi-messenger-lab3-redis-1 | 6379/tcp + +## compose config: limits/replicas/published + api: + replicas: 2 + cpus: 0.5 + memory: "268435456" + lb: + cpus: 0.25 + memory: "67108864" + published: "8080" + published: "8404" + migrate: + cpus: 0.5 + memory: "268435456" + postgres: + cpus: 0.5 + memory: "402653184" + redis: + cpus: 0.25 + memory: "201326592" + default: + build: + image: mtusi-messenger:lab3 + +container_name: absent diff --git a/evidence/track1/load-ctl1base.json b/evidence/track1/load-ctl1base.json new file mode 100644 index 00000000..8e0050e7 --- /dev/null +++ b/evidence/track1/load-ctl1base.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.082, + "concurrency": 8, + "successful_requests": 83581, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1391.108, + "successful_latency_ms": { + "p50": 5.571, + "p95": 9.03, + "p99": 11.692 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/load-ctl2pg.json b/evidence/track1/load-ctl2pg.json new file mode 100644 index 00000000..0d68d982 --- /dev/null +++ b/evidence/track1/load-ctl2pg.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.072, + "concurrency": 8, + "successful_requests": 83599, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1391.647, + "successful_latency_ms": { + "p50": 5.575, + "p95": 8.994, + "p99": 11.512 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/load-ctl3base.json b/evidence/track1/load-ctl3base.json new file mode 100644 index 00000000..e7ad3006 --- /dev/null +++ b/evidence/track1/load-ctl3base.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.078, + "concurrency": 8, + "successful_requests": 81711, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1360.087, + "successful_latency_ms": { + "p50": 5.664, + "p95": 9.482, + "p99": 12.322 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/load-ctl4lb.json b/evidence/track1/load-ctl4lb.json new file mode 100644 index 00000000..ed604474 --- /dev/null +++ b/evidence/track1/load-ctl4lb.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.074, + "concurrency": 8, + "successful_requests": 81688, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1359.794, + "successful_latency_ms": { + "p50": 5.688, + "p95": 9.37, + "p99": 12.032 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/load-d2.json b/evidence/track1/load-d2.json new file mode 100644 index 00000000..9590a53a --- /dev/null +++ b/evidence/track1/load-d2.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.068, + "concurrency": 8, + "successful_requests": 83445, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1389.179, + "successful_latency_ms": { + "p50": 5.585, + "p95": 9.054, + "p99": 11.711 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/load-db1cpu.json b/evidence/track1/load-db1cpu.json new file mode 100644 index 00000000..f9ae7147 --- /dev/null +++ b/evidence/track1/load-db1cpu.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.077, + "concurrency": 8, + "successful_requests": 76301, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1270.045, + "successful_latency_ms": { + "p50": 6.057, + "p95": 10.141, + "p99": 13.724 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/load-g05.json b/evidence/track1/load-g05.json new file mode 100644 index 00000000..413da3bf --- /dev/null +++ b/evidence/track1/load-g05.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.064, + "concurrency": 8, + "successful_requests": 89486, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1489.856, + "successful_latency_ms": { + "p50": 5.238, + "p95": 8.245, + "p99": 10.54 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/load-g10.json b/evidence/track1/load-g10.json new file mode 100644 index 00000000..69f2ef24 --- /dev/null +++ b/evidence/track1/load-g10.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.071, + "concurrency": 8, + "successful_requests": 89886, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1496.325, + "successful_latency_ms": { + "p50": 5.207, + "p95": 8.221, + "p99": 10.508 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/load-g15.json b/evidence/track1/load-g15.json new file mode 100644 index 00000000..d1726719 --- /dev/null +++ b/evidence/track1/load-g15.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.061, + "concurrency": 8, + "successful_requests": 89566, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1491.252, + "successful_latency_ms": { + "p50": 5.251, + "p95": 8.176, + "p99": 10.209 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/load-lb1cpu.json b/evidence/track1/load-lb1cpu.json new file mode 100644 index 00000000..91e3616f --- /dev/null +++ b/evidence/track1/load-lb1cpu.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.071, + "concurrency": 8, + "successful_requests": 82138, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1367.357, + "successful_latency_ms": { + "p50": 5.67, + "p95": 9.26, + "p99": 12.055 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/load-pool10.json b/evidence/track1/load-pool10.json new file mode 100644 index 00000000..46d7de0d --- /dev/null +++ b/evidence/track1/load-pool10.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.074, + "concurrency": 8, + "successful_requests": 84040, + "failed_requests": 4, + "error_ratio": 4.8e-05, + "successful_rps": 1398.951, + "successful_latency_ms": { + "p50": 5.556, + "p95": 8.741, + "p99": 11.048 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/load-pool5.json b/evidence/track1/load-pool5.json new file mode 100644 index 00000000..03dfbc9c --- /dev/null +++ b/evidence/track1/load-pool5.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.078, + "concurrency": 8, + "successful_requests": 78078, + "failed_requests": 4, + "error_ratio": 5.1e-05, + "successful_rps": 1299.617, + "successful_latency_ms": { + "p50": 5.957, + "p95": 9.594, + "p99": 12.386 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/load-r1.json b/evidence/track1/load-r1.json new file mode 100644 index 00000000..48015e61 --- /dev/null +++ b/evidence/track1/load-r1.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.075, + "concurrency": 8, + "successful_requests": 92690, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1542.892, + "successful_latency_ms": { + "p50": 5.047, + "p95": 8.006, + "p99": 10.239 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/load-r2.json b/evidence/track1/load-r2.json new file mode 100644 index 00000000..ee84407f --- /dev/null +++ b/evidence/track1/load-r2.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.073, + "concurrency": 8, + "successful_requests": 89588, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1491.325, + "successful_latency_ms": { + "p50": 5.245, + "p95": 8.225, + "p99": 10.303 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/load-r4.json b/evidence/track1/load-r4.json new file mode 100644 index 00000000..89fd5bb7 --- /dev/null +++ b/evidence/track1/load-r4.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.069, + "concurrency": 8, + "successful_requests": 85041, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1415.713, + "successful_latency_ms": { + "p50": 5.538, + "p95": 8.614, + "p99": 10.749 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/profile-ctl1base.json b/evidence/track1/profile-ctl1base.json new file mode 100644 index 00000000..05ce1e9c --- /dev/null +++ b/evidence/track1/profile-ctl1base.json @@ -0,0 +1 @@ +{"label":"ctl1base","replicas":2,"total_cpu":1.0,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"0.50","postgres_mem_limit":"384M","postgres_max_conns":10,"lb_cpu_limit":"0.25","client":"vm"} diff --git a/evidence/track1/profile-ctl2pg.json b/evidence/track1/profile-ctl2pg.json new file mode 100644 index 00000000..6a812b63 --- /dev/null +++ b/evidence/track1/profile-ctl2pg.json @@ -0,0 +1 @@ +{"label":"ctl2pg","replicas":2,"total_cpu":1.0,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"1.00","postgres_mem_limit":"384M","postgres_max_conns":10,"lb_cpu_limit":"0.25","client":"vm"} diff --git a/evidence/track1/profile-ctl3base.json b/evidence/track1/profile-ctl3base.json new file mode 100644 index 00000000..4f65cdcc --- /dev/null +++ b/evidence/track1/profile-ctl3base.json @@ -0,0 +1 @@ +{"label":"ctl3base","replicas":2,"total_cpu":1.0,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"0.50","postgres_mem_limit":"384M","postgres_max_conns":10,"lb_cpu_limit":"0.25","client":"vm"} diff --git a/evidence/track1/profile-ctl4lb.json b/evidence/track1/profile-ctl4lb.json new file mode 100644 index 00000000..44e58b80 --- /dev/null +++ b/evidence/track1/profile-ctl4lb.json @@ -0,0 +1 @@ +{"label":"ctl4lb","replicas":2,"total_cpu":1.0,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"0.50","postgres_mem_limit":"384M","postgres_max_conns":10,"lb_cpu_limit":"1.00","client":"vm"} diff --git a/evidence/track1/profile-d2.json b/evidence/track1/profile-d2.json new file mode 100644 index 00000000..03c21fd8 --- /dev/null +++ b/evidence/track1/profile-d2.json @@ -0,0 +1 @@ +{"label":"d2","replicas":2,"total_cpu":1.0,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"0.50","postgres_mem_limit":"384M","postgres_max_conns":10,"lb_cpu_limit":"0.25","client":"vm"} diff --git a/evidence/track1/profile-db1cpu.json b/evidence/track1/profile-db1cpu.json new file mode 100644 index 00000000..e6b0cfd7 --- /dev/null +++ b/evidence/track1/profile-db1cpu.json @@ -0,0 +1 @@ +{"label":"db1cpu","replicas":2,"total_cpu":1.0,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"1.00","postgres_mem_limit":"384M","postgres_max_conns":10,"lb_cpu_limit":"0.25","client":"vm"} diff --git a/evidence/track1/profile-g05.json b/evidence/track1/profile-g05.json new file mode 100644 index 00000000..e44efa92 --- /dev/null +++ b/evidence/track1/profile-g05.json @@ -0,0 +1 @@ +{"label":"g05","replicas":2,"total_cpu":0.5,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"0.50","postgres_mem_limit":"384M","postgres_max_conns":10,"lb_cpu_limit":"0.25","client":"vm"} diff --git a/evidence/track1/profile-g10.json b/evidence/track1/profile-g10.json new file mode 100644 index 00000000..168f6b88 --- /dev/null +++ b/evidence/track1/profile-g10.json @@ -0,0 +1 @@ +{"label":"g10","replicas":2,"total_cpu":1.0,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"0.50","postgres_mem_limit":"384M","postgres_max_conns":10,"lb_cpu_limit":"0.25","client":"vm"} diff --git a/evidence/track1/profile-g15.json b/evidence/track1/profile-g15.json new file mode 100644 index 00000000..886a5b35 --- /dev/null +++ b/evidence/track1/profile-g15.json @@ -0,0 +1 @@ +{"label":"g15","replicas":2,"total_cpu":1.5,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"0.50","postgres_mem_limit":"384M","postgres_max_conns":10,"lb_cpu_limit":"0.25","client":"vm"} diff --git a/evidence/track1/profile-lb1cpu.json b/evidence/track1/profile-lb1cpu.json new file mode 100644 index 00000000..6ade2805 --- /dev/null +++ b/evidence/track1/profile-lb1cpu.json @@ -0,0 +1 @@ +{"label":"lb1cpu","replicas":2,"total_cpu":1.0,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"0.50","postgres_mem_limit":"384M","postgres_max_conns":10,"lb_cpu_limit":"1.00","client":"vm"} diff --git a/evidence/track1/profile-pool10.json b/evidence/track1/profile-pool10.json new file mode 100644 index 00000000..02414d36 --- /dev/null +++ b/evidence/track1/profile-pool10.json @@ -0,0 +1 @@ +{"label":"pool10","replicas":4,"total_cpu":1.0,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"0.50","postgres_mem_limit":"384M","postgres_max_conns":10,"lb_cpu_limit":"0.25","client":"vm"} diff --git a/evidence/track1/profile-pool5.json b/evidence/track1/profile-pool5.json new file mode 100644 index 00000000..42c7878d --- /dev/null +++ b/evidence/track1/profile-pool5.json @@ -0,0 +1 @@ +{"label":"pool5","replicas":4,"total_cpu":1.0,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"0.50","postgres_mem_limit":"384M","postgres_max_conns":5,"lb_cpu_limit":"0.25","client":"vm"} diff --git a/evidence/track1/profile-r1.json b/evidence/track1/profile-r1.json new file mode 100644 index 00000000..79621834 --- /dev/null +++ b/evidence/track1/profile-r1.json @@ -0,0 +1 @@ +{"label":"r1","replicas":1,"total_cpu":1.0,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"0.50","postgres_mem_limit":"384M","postgres_max_conns":10,"lb_cpu_limit":"0.25","client":"vm"} diff --git a/evidence/track1/profile-r2.json b/evidence/track1/profile-r2.json new file mode 100644 index 00000000..ef370477 --- /dev/null +++ b/evidence/track1/profile-r2.json @@ -0,0 +1 @@ +{"label":"r2","replicas":2,"total_cpu":1.0,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"0.50","postgres_mem_limit":"384M","postgres_max_conns":10,"lb_cpu_limit":"0.25","client":"vm"} diff --git a/evidence/track1/profile-r4.json b/evidence/track1/profile-r4.json new file mode 100644 index 00000000..e37896ba --- /dev/null +++ b/evidence/track1/profile-r4.json @@ -0,0 +1 @@ +{"label":"r4","replicas":4,"total_cpu":1.0,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"0.50","postgres_mem_limit":"384M","postgres_max_conns":10,"lb_cpu_limit":"0.25","client":"vm"} diff --git a/evidence/track1/scaling-fixed-budget.png b/evidence/track1/scaling-fixed-budget.png new file mode 100644 index 0000000000000000000000000000000000000000..ba60ea563f4e1db00e30282daf1f827342958396 GIT binary patch literal 55891 zcmdSBWl)t{9|uY+2q+=aNNhT!rIipi-Q8@ul#m7i1(e=&OG-B=ts=2WY1v43ch_B< z^SA9ky5W3y{L!Ggr@kBwHY=cU_)bvc>n!cy2 zp+j+RPr@f`j{5$>jL&Y%>5RV4bgq6`{agL(QmqpA3cCz*Yv+XiB+>e z3IFd8BFNEorT=rmMoGWZ{rAf4L?QX_C&>7*D*yX|?n3T&GXMR=t4LIKIyxSxPK9wt zgX`)ea&o)10#$Ni0)lM+wxHnP+;PNhukd7|CM_-Pw}4x5PUGgV_RxomEB$GRQS)K< z^8-s!-?L{%nepGhzcBpv`sH;w7A9s#!|d_q#GBKdX-!880)nAX)4S(Y{DkpPR8;hL zt*wS;xgpsXl`N}A;qZ)x2BB1b`w&!gthwLWQX4}RCK7zkGlq@|rTuAwxo@|T-7&Q2 zIFDK1gMXimTfCD+y?82&dE)G~$_<5%ou$0@FOKc|GDLK){jCsi%*Slnnz!QO-bc&> ztEKvNILp0BT{YH&>UCvc%uvgMAsarZzW@P&8mo}&3a?$w_a?HmyO*{O-{;KnnO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Thq&yOWDCRb z=KA`2DdAqF_-8mds>a4oqj*GTbUB2>H?J=Ck3R2dTQSVXpNAWuGWDEW#DasHvkvNp z&R`J+6QXNOEC596v&9S?)|7%;m1|pe5_LsY>pZG5=jQJpj1LU%EP(+L^H8P{;BvAnBirTHSkVN zO&KN34VrE{n+DIks>M?~Qt1fD_N$1OwgN1reY*2yM_U{0h!%2zj)c%BvqHf%bd4Pq zDF$h*My8m}?d@5AdB#j4bHl8}I?0blEU(P^TseO3HiPW7pdc-@bht zlZ}6PGX7K$Ue7q&xb-K`sb{9I;)O6-?H!xS^KW#0#m)nQl;wIc%XE|oWWlQRVB_uZ z_}@VsBW@)RPatieZbk6#G!?23`=n!Uw7=|7{_NSoLlUlKs18ZLTb;(;s&-*xsj`& zYi2i459Gke5lYrW_95nUwozm_8*@Qr#&cxkasO0);5=Kqh+xH4%vk$Zg?w7JD5FEV z@$u@W!8RuG^dTEif!Zhg(v&Yifx+BCne* zuv6!NwztSz^>WtWr=#mL?bTh8{A9OOj_GDkT5XTtDLiIb8llE(#-9R-x- z0+agvwBmh&G@l!R)1DJ_C73;!IY0@TEtcibK-`v%AMluQj@=Oa3B<`clwwTk6pyO_ z&a5$ZQ-DjD-Dvx^%~Vs)1O@bSrU~am_Wd-EwU{eiYv<*^DUfx&Y2xFg&c_*cA3CAB zb>D~eE^O^fC?xjqj{`zm&3Y;GDfAxilx6Ca2L&|sxMN@}@IwOAUxy1dx^wIZ()*8V zhL%(R`=<8+>Hk}7o#6ggb^SMl;s0;V_V0@Sr{?{CZM^@#i@<*utikU||2Zddwjt~a RycGzdAgg*O{nq2x{|~E9w#NVf literal 0 HcmV?d00001 diff --git a/evidence/track1/scaling-growth.png b/evidence/track1/scaling-growth.png new file mode 100644 index 0000000000000000000000000000000000000000..95891c0e4f457db93ef1f5c40786a4cc35511d97 GIT binary patch literal 63171 zcmdqJWmJ{X_ce;Bl!T;$gmiaFi_+bl5=wVBsC0LCH_{y{Ez;fH%>fQ^_wo1tz4z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Ej~OCOM%?!619gdgON2w^IN0M zoE7Ph6HEL;6n6#MwmF)R8H%js1WDJ=M#LP|3bO%SjdbaZ$u)Xk{gWWK-PP(Q_hZQ9mJh99i>5{r^SQ}ilA_@pgnUWQuCZN#Xer@ zrCJe5{5vv*W3_~HHUDwd_KjK6Bi78!HB`oJD|Z#|5%7NAy2~&p1>F2}XX-p(<#xf# zR#)U<+DM`a?OfU7O~kF3s7jEJihFRABAoK?%3~WnYrGF1%sO-4=;&*Mvk^)1S6xF{my}wyTwv$Lk`!C(;Ds${A|V3j|j@Xiw=#m2pjr zM*@VI@3gH<1ps`QOo|Mn5ghFWLY6WLs|Cple 1.00/384M, пересоздаю контейнер === +=== applied label=db1cpu replicas=2 postgres=1.00/384M lb_cpu=0.25 (снято с контейнеров) +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.077, + "concurrency": 8, + "successful_requests": 76301, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1270.045, + "successful_latency_ms": { + "p50": 6.057, + "p95": 10.141, + "p99": 13.724 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=19 +postgres_max_connections=100 +messages_rows=4463395 +idempotency_rows=4463395 + +=== возвращаю PostgreSQL к бюджету 0.50/384M === +=== invocation 2026-10-16T18:35:53Z: REPLICAS="2" TOTAL_CPU=1.0 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=lb1cpu replicas=2 cpu=0.50 mem=384M postgres=0.50/384M lb_cpu=1.00 max_conns=10 client=vm === +=== LB: бюджет CPU 0.25 -> 1.00, пересоздаю контейнер === +=== applied label=lb1cpu replicas=2 postgres=0.50/384M lb_cpu=1.00 (снято с контейнеров) +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.071, + "concurrency": 8, + "successful_requests": 82138, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1367.357, + "successful_latency_ms": { + "p50": 5.67, + "p95": 9.26, + "p99": 12.055 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=19 +postgres_max_connections=100 +messages_rows=4566754 +idempotency_rows=4566754 + +=== возвращаю LB к бюджету CPU 0.25 === +=== invocation 2026-10-16T18:37:30Z: REPLICAS="2" TOTAL_CPU=1.0 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=d2 replicas=2 cpu=0.50 mem=384M postgres=0.50/384M lb_cpu=0.25 max_conns=10 client=vm === +=== applied label=d2 replicas=2 postgres=0.50/384M lb_cpu=0.25 (снято с контейнеров) +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.068, + "concurrency": 8, + "successful_requests": 83445, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1389.179, + "successful_latency_ms": { + "p50": 5.585, + "p95": 9.054, + "p99": 11.711 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=19 +postgres_max_connections=100 +messages_rows=4671368 +idempotency_rows=4671368 + +=== invocation 2026-10-16T18:38:55Z: REPLICAS="2" TOTAL_CPU=1.0 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=ctl1base replicas=2 cpu=0.50 mem=384M postgres=0.50/384M lb_cpu=0.25 max_conns=10 client=vm === +=== applied label=ctl1base replicas=2 postgres=0.50/384M lb_cpu=0.25 (снято с контейнеров) +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.082, + "concurrency": 8, + "successful_requests": 83581, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1391.108, + "successful_latency_ms": { + "p50": 5.571, + "p95": 9.03, + "p99": 11.692 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=19 +postgres_max_connections=100 +messages_rows=4776213 +idempotency_rows=4776213 + +=== invocation 2026-10-16T18:40:14Z: REPLICAS="2" TOTAL_CPU=1.0 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=ctl2pg replicas=2 cpu=0.50 mem=384M postgres=1.00/384M lb_cpu=0.25 max_conns=10 client=vm === +=== PostgreSQL: бюджет 0.50/384M -> 1.00/384M, пересоздаю контейнер === +=== applied label=ctl2pg replicas=2 postgres=1.00/384M lb_cpu=0.25 (снято с контейнеров) +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.072, + "concurrency": 8, + "successful_requests": 83599, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1391.647, + "successful_latency_ms": { + "p50": 5.575, + "p95": 8.994, + "p99": 11.512 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=19 +postgres_max_connections=100 +messages_rows=4881024 +idempotency_rows=4881024 + +=== возвращаю PostgreSQL к бюджету 0.50/384M === +=== invocation 2026-10-16T18:41:33Z: REPLICAS="2" TOTAL_CPU=1.0 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=ctl3base replicas=2 cpu=0.50 mem=384M postgres=0.50/384M lb_cpu=0.25 max_conns=10 client=vm === +=== applied label=ctl3base replicas=2 postgres=0.50/384M lb_cpu=0.25 (снято с контейнеров) +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.078, + "concurrency": 8, + "successful_requests": 81711, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1360.087, + "successful_latency_ms": { + "p50": 5.664, + "p95": 9.482, + "p99": 12.322 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=19 +postgres_max_connections=100 +messages_rows=4983558 +idempotency_rows=4983558 + +=== invocation 2026-10-16T18:42:51Z: REPLICAS="2" TOTAL_CPU=1.0 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=ctl4lb replicas=2 cpu=0.50 mem=384M postgres=0.50/384M lb_cpu=1.00 max_conns=10 client=vm === +=== LB: бюджет CPU 0.25 -> 1.00, пересоздаю контейнер === +=== applied label=ctl4lb replicas=2 postgres=0.50/384M lb_cpu=1.00 (снято с контейнеров) +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.074, + "concurrency": 8, + "successful_requests": 81688, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1359.794, + "successful_latency_ms": { + "p50": 5.688, + "p95": 9.37, + "p99": 12.032 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=19 +postgres_max_connections=100 +messages_rows=5086444 +idempotency_rows=5086444 + +=== возвращаю LB к бюджету CPU 0.25 === diff --git a/evidence/track1/superseded/README.md b/evidence/track1/superseded/README.md new file mode 100644 index 00000000..824326b1 --- /dev/null +++ b/evidence/track1/superseded/README.md @@ -0,0 +1,22 @@ +# Заменённые прогоны серии трека 1 + +Оба каталога сохранены как история: в них видны дефекты, которые нашло ревью. +Действующие артефакты лежат в `evidence/track1/` и воспроизводятся +`scripts/track1_series.sh`. + +## run1-wrong-budgets — бюджеты хранилищ записаны, но не применены + +`scripts/track1_scaling.sh` перенастраивал только API (`compose up -d --no-deps api`), +поэтому PostgreSQL продолжал работать с действующими 0.50 CPU / 384 MiB, тогда как в +`profile-*.json` попадало `512M` (серии `r`/`g`/`pool`) и `1.00` CPU (контроль +`db1cpu`). Контроль удвоения CPU БД в этом прогоне измерением не был. + +## run2-host-client — клиент на хосте терял соединения + +Бюджеты здесь уже применялись и проверялись по `docker inspect`, но генератор +работал на хосте через проброс порта. Под шквалом новых соединений forwarder хоста +отклонял их: 4 450-26 520 отказов на профиль (4-22 %), при этом в статистике HAProxy +`hrsp_5xx=0`, а в логах API нет ошибок — то есть отказы клиентские, а не от стенда +(разбор и контроль: `evidence/path-overhead/`). Из-за разного числа успешных запросов +загрузка PostgreSQL по профилям несопоставима, поэтому прогон заменён серией с +клиентом внутри VM (`CLIENT=vm`), где отказов нет. diff --git a/evidence/track1/superseded/run1-wrong-budgets/load-db1cpu.json b/evidence/track1/superseded/run1-wrong-budgets/load-db1cpu.json new file mode 100644 index 00000000..e13e6eea --- /dev/null +++ b/evidence/track1/superseded/run1-wrong-budgets/load-db1cpu.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.012, + "concurrency": 8, + "successful_requests": 98492, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1641.212, + "successful_latency_ms": { + "p50": 4.085, + "p95": 8.787, + "p99": 23.973 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/superseded/run1-wrong-budgets/load-g05.json b/evidence/track1/superseded/run1-wrong-budgets/load-g05.json new file mode 100644 index 00000000..fcc536e8 --- /dev/null +++ b/evidence/track1/superseded/run1-wrong-budgets/load-g05.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.01, + "concurrency": 8, + "successful_requests": 96941, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1615.408, + "successful_latency_ms": { + "p50": 4.348, + "p95": 8.823, + "p99": 20.46 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/superseded/run1-wrong-budgets/load-g10.json b/evidence/track1/superseded/run1-wrong-budgets/load-g10.json new file mode 100644 index 00000000..79a7ea08 --- /dev/null +++ b/evidence/track1/superseded/run1-wrong-budgets/load-g10.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.011, + "concurrency": 8, + "successful_requests": 99970, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1665.873, + "successful_latency_ms": { + "p50": 4.168, + "p95": 8.323, + "p99": 21.636 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/superseded/run1-wrong-budgets/load-g15.json b/evidence/track1/superseded/run1-wrong-budgets/load-g15.json new file mode 100644 index 00000000..27369309 --- /dev/null +++ b/evidence/track1/superseded/run1-wrong-budgets/load-g15.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.017, + "concurrency": 8, + "successful_requests": 99132, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1651.746, + "successful_latency_ms": { + "p50": 4.094, + "p95": 8.631, + "p99": 24.272 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/superseded/run1-wrong-budgets/load-pool10.json b/evidence/track1/superseded/run1-wrong-budgets/load-pool10.json new file mode 100644 index 00000000..e8af33d2 --- /dev/null +++ b/evidence/track1/superseded/run1-wrong-budgets/load-pool10.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.012, + "concurrency": 8, + "successful_requests": 97133, + "failed_requests": 222, + "error_ratio": 0.00228, + "successful_rps": 1618.552, + "successful_latency_ms": { + "p50": 4.394, + "p95": 8.205, + "p99": 20.61 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/superseded/run1-wrong-budgets/load-pool5.json b/evidence/track1/superseded/run1-wrong-budgets/load-pool5.json new file mode 100644 index 00000000..6133963f --- /dev/null +++ b/evidence/track1/superseded/run1-wrong-budgets/load-pool5.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.027, + "concurrency": 8, + "successful_requests": 93849, + "failed_requests": 2, + "error_ratio": 2.1e-05, + "successful_rps": 1563.449, + "successful_latency_ms": { + "p50": 4.464, + "p95": 8.965, + "p99": 22.758 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/superseded/run1-wrong-budgets/load-r1.json b/evidence/track1/superseded/run1-wrong-budgets/load-r1.json new file mode 100644 index 00000000..5c1fe718 --- /dev/null +++ b/evidence/track1/superseded/run1-wrong-budgets/load-r1.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.015, + "concurrency": 8, + "successful_requests": 100860, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1680.576, + "successful_latency_ms": { + "p50": 4.005, + "p95": 8.354, + "p99": 22.526 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/superseded/run1-wrong-budgets/load-r2.json b/evidence/track1/superseded/run1-wrong-budgets/load-r2.json new file mode 100644 index 00000000..1aaf6840 --- /dev/null +++ b/evidence/track1/superseded/run1-wrong-budgets/load-r2.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.011, + "concurrency": 8, + "successful_requests": 94054, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1567.279, + "successful_latency_ms": { + "p50": 4.474, + "p95": 9.495, + "p99": 20.649 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/superseded/run1-wrong-budgets/load-r4.json b/evidence/track1/superseded/run1-wrong-budgets/load-r4.json new file mode 100644 index 00000000..e6e824e0 --- /dev/null +++ b/evidence/track1/superseded/run1-wrong-budgets/load-r4.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.013, + "concurrency": 8, + "successful_requests": 92928, + "failed_requests": 178, + "error_ratio": 0.001912, + "successful_rps": 1548.476, + "successful_latency_ms": { + "p50": 4.633, + "p95": 8.8, + "p99": 18.978 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/superseded/run1-wrong-budgets/profile-db1cpu.json b/evidence/track1/superseded/run1-wrong-budgets/profile-db1cpu.json new file mode 100644 index 00000000..83ee4ba8 --- /dev/null +++ b/evidence/track1/superseded/run1-wrong-budgets/profile-db1cpu.json @@ -0,0 +1 @@ +{"label":"db1cpu","replicas":2,"total_cpu":1.0,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"1.0","postgres_mem_limit":"384M","postgres_max_conns":10} diff --git a/evidence/track1/superseded/run1-wrong-budgets/profile-g05.json b/evidence/track1/superseded/run1-wrong-budgets/profile-g05.json new file mode 100644 index 00000000..4f8b438b --- /dev/null +++ b/evidence/track1/superseded/run1-wrong-budgets/profile-g05.json @@ -0,0 +1 @@ +{"label":"g05","replicas":2,"total_cpu":0.5,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"0.50","postgres_mem_limit":"512M","postgres_max_conns":10} diff --git a/evidence/track1/superseded/run1-wrong-budgets/profile-g10.json b/evidence/track1/superseded/run1-wrong-budgets/profile-g10.json new file mode 100644 index 00000000..173884f6 --- /dev/null +++ b/evidence/track1/superseded/run1-wrong-budgets/profile-g10.json @@ -0,0 +1 @@ +{"label":"g10","replicas":2,"total_cpu":1.0,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"0.50","postgres_mem_limit":"512M","postgres_max_conns":10} diff --git a/evidence/track1/superseded/run1-wrong-budgets/profile-g15.json b/evidence/track1/superseded/run1-wrong-budgets/profile-g15.json new file mode 100644 index 00000000..33c3500a --- /dev/null +++ b/evidence/track1/superseded/run1-wrong-budgets/profile-g15.json @@ -0,0 +1 @@ +{"label":"g15","replicas":2,"total_cpu":1.5,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"0.50","postgres_mem_limit":"512M","postgres_max_conns":10} diff --git a/evidence/track1/superseded/run1-wrong-budgets/profile-pool10.json b/evidence/track1/superseded/run1-wrong-budgets/profile-pool10.json new file mode 100644 index 00000000..6e3246e2 --- /dev/null +++ b/evidence/track1/superseded/run1-wrong-budgets/profile-pool10.json @@ -0,0 +1 @@ +{"label":"pool10","replicas":4,"total_cpu":1.0,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"0.50","postgres_mem_limit":"512M","postgres_max_conns":10} diff --git a/evidence/track1/superseded/run1-wrong-budgets/profile-pool5.json b/evidence/track1/superseded/run1-wrong-budgets/profile-pool5.json new file mode 100644 index 00000000..374b1fd3 --- /dev/null +++ b/evidence/track1/superseded/run1-wrong-budgets/profile-pool5.json @@ -0,0 +1 @@ +{"label":"pool5","replicas":4,"total_cpu":1.0,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"0.50","postgres_mem_limit":"512M","postgres_max_conns":5} diff --git a/evidence/track1/superseded/run1-wrong-budgets/profile-r1.json b/evidence/track1/superseded/run1-wrong-budgets/profile-r1.json new file mode 100644 index 00000000..e46b48b5 --- /dev/null +++ b/evidence/track1/superseded/run1-wrong-budgets/profile-r1.json @@ -0,0 +1 @@ +{"label":"r1","replicas":1,"total_cpu":1.0,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"0.50","postgres_mem_limit":"512M","postgres_max_conns":10} diff --git a/evidence/track1/superseded/run1-wrong-budgets/profile-r2.json b/evidence/track1/superseded/run1-wrong-budgets/profile-r2.json new file mode 100644 index 00000000..4bb29e76 --- /dev/null +++ b/evidence/track1/superseded/run1-wrong-budgets/profile-r2.json @@ -0,0 +1 @@ +{"label":"r2","replicas":2,"total_cpu":1.0,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"0.50","postgres_mem_limit":"512M","postgres_max_conns":10} diff --git a/evidence/track1/superseded/run1-wrong-budgets/profile-r4.json b/evidence/track1/superseded/run1-wrong-budgets/profile-r4.json new file mode 100644 index 00000000..379dfd0b --- /dev/null +++ b/evidence/track1/superseded/run1-wrong-budgets/profile-r4.json @@ -0,0 +1 @@ +{"label":"r4","replicas":4,"total_cpu":1.0,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"0.50","postgres_mem_limit":"512M","postgres_max_conns":10} diff --git a/evidence/track1/superseded/run1-wrong-budgets/scaling-fixed-budget.png b/evidence/track1/superseded/run1-wrong-budgets/scaling-fixed-budget.png new file mode 100644 index 0000000000000000000000000000000000000000..10f0bfa4a8bfc3c3723a8ef6d50b904550d0ed5a GIT binary patch literal 57179 zcmd?RbySpX_cn}zD1wrLAl(g;(n@!yG!C88je?Z)P}0)fB@H6N5F#x#BhrmX5AmMk zeLv6oz2Ex2f4;TezusBPrAwG=t~t+r?tL7`KK2!-jllr5>N2)9%W!$wEw<%G*Z4gq2d4g z(vW@J{hy!ECVoXD{?8B6_%LfC{(TJ;Jbfc0{qKu0<`(;Z-oaywWA>jnBq+Q>i~7$y zl*!QbrKOXY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R^F;71{w)6PkUGMrn;x2*bV)f zr_H)k#FGyeCQHC7W$p-yfjvE~GAP2o>3@(b1(=J#O^Yw99MXr@^iaWSi<_pw!aoYU ztO^lMXO`{<&w^KLzrA&M7@bo!t^RGwzb31Zj&Bz>8(&ufGDiPXiOplNUXH~`t79GO zE+tep)^|Z7QMGWTTW-Cw?A-9@T%R0tu+bJc4H6h!!8FxlltQh)qTTHstS#Luoi}BQ z)nQx7JG*XcO70==lU~W`FHB$r;*GnuHBdT7PisKJUfJ+2)Kl8q_pxENfuWq$FaVtM zMYT<^6;!u(<;6@)1O3A=9If4bRj{*ZPSY%X{WVMCYp;i=G^iF_PX?B__y_vIK*c5gcu`G$Mf5AymRAg$DX5^;P zpey>z?mk$oaWwo=zUsd*`GzQl_^QKb2AR%{No}QTI9>&!SOi`_yTa{@td*3UQVDxG z^^;R1g(Aab2zvDb9ow%>!Z}J^GlD9@7?j`Y3=b6h_Lp0>xJ$byDnfnXg;#DXPLF09A|?KLx0y)a~R76sV!Me04XO<^^)C^9=u znOC6!7mKfB$P#aa%28-^^$15AX@tK`kc_uVpLhuy7@eRBazX*kGoeVHo9V4t1zcuJ z@sm4Dhs3_Qb7?)e4hzOC^gh16tuXOxW8@{-FW0_I0j^!miQQgu@Z+c=bH&s~vBP`_ zJ2x+xZJjoT-ef>WGE~Owq literal 0 HcmV?d00001 diff --git a/evidence/track1/superseded/run1-wrong-budgets/scaling-growth.png b/evidence/track1/superseded/run1-wrong-budgets/scaling-growth.png new file mode 100644 index 0000000000000000000000000000000000000000..e9ed6a29e74e5bf23f812a6f4a55cc5b905f9823 GIT binary patch literal 60008 zcmd?RWmJ@H7e5LHN{N7UDc#+vNO#B3CEeX25>nC#0@B@G1Bi4&@YIiC(|J?mM*%-r{VUHjVm7kf{*l7b{U3Ly#t0s^|Ul$Z(v!jnn_1jOa%NZ>bh z$qAX@fBY`uS}v;gA6(pxoXim9ja(dT>|JaujbFQ&IXPR}+i@_nu`#nVzP502ad75m zVX^(cU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WwRYjhv?m>QZN@Ae?=43_8#0qu`?&I*k^QB60vg{! zN<${dw!QX)KfZT`QkOQ=kA=)514Kw*ht+c=?9lG8-$%S%hsT1g%V)cjjR>!qnDSSYCQj1L zkLv&gUqSHLH=8w+L8&%q7bdGXa?xLEhDRmfK!%`-rNWfZHL?`uoRgo2F423qq(zQ1 zeXN2^ZsNH7X{LZNtT)2P2Ki>?<9D+AfvLWgBME3ZDf3qe-8lw{A6#P3cv5Vx8>c#! z=pvMV_Au4;`EwU4Fw`wfP4y+SY5nx)p_NgaQ!fQGoB0qeqi|L*X4XowdWVt5Y|&o! z1=mb(iG)p7;h%|$dRz&ox2j9-258NoPzNCV`&4v&oC7`L=;V+gEp`gjaVQ01tP^`ce7)_C zW2;lPI=rCD-?DcJ(J{gLTm#k{D8Cci?(TX#BtvvnDB0pUGj=2k=JS0Af2=_1wjHvj zr~bt%;t4SpHOV33FEk3=*XSj{o6cS_>tb F_iy28ix~g_ literal 0 HcmV?d00001 diff --git a/evidence/track1/superseded/run1-wrong-budgets/stats-db1cpu.csv b/evidence/track1/superseded/run1-wrong-budgets/stats-db1cpu.csv new file mode 100644 index 00000000..ae4b7d33 --- /dev/null +++ b/evidence/track1/superseded/run1-wrong-budgets/stats-db1cpu.csv @@ -0,0 +1,101 @@ +timestamp,container,cpu_percent,mem_usage +2026-10-16T14:23:04Z,mtusi-messenger-lab3-api-1,18.81%,164MiB / 384MiB +2026-10-16T14:23:04Z,mtusi-messenger-lab3-api-2,19.49%,165.3MiB / 384MiB +2026-10-16T14:23:04Z,mtusi-messenger-lab3-lb-1,14.54%,13.11MiB / 64MiB +2026-10-16T14:23:04Z,mtusi-messenger-lab3-postgres-1,50.60%,326MiB / 384MiB +2026-10-16T14:23:04Z,mtusi-messenger-lab3-redis-1,0.23%,6.289MiB / 192MiB +2026-10-16T14:23:07Z,mtusi-messenger-lab3-api-1,18.29%,197MiB / 384MiB +2026-10-16T14:23:07Z,mtusi-messenger-lab3-api-2,20.02%,11.13MiB / 384MiB +2026-10-16T14:23:07Z,mtusi-messenger-lab3-lb-1,14.47%,13.11MiB / 64MiB +2026-10-16T14:23:07Z,mtusi-messenger-lab3-postgres-1,50.84%,326MiB / 384MiB +2026-10-16T14:23:07Z,mtusi-messenger-lab3-redis-1,0.69%,6.289MiB / 192MiB +2026-10-16T14:23:10Z,mtusi-messenger-lab3-api-1,19.38%,10.8MiB / 384MiB +2026-10-16T14:23:10Z,mtusi-messenger-lab3-api-2,19.18%,11.07MiB / 384MiB +2026-10-16T14:23:10Z,mtusi-messenger-lab3-lb-1,14.39%,13.11MiB / 64MiB +2026-10-16T14:23:10Z,mtusi-messenger-lab3-postgres-1,49.50%,326MiB / 384MiB +2026-10-16T14:23:10Z,mtusi-messenger-lab3-redis-1,0.22%,6.289MiB / 192MiB +2026-10-16T14:23:13Z,mtusi-messenger-lab3-api-1,19.36%,10.93MiB / 384MiB +2026-10-16T14:23:13Z,mtusi-messenger-lab3-api-2,19.41%,10.99MiB / 384MiB +2026-10-16T14:23:13Z,mtusi-messenger-lab3-lb-1,14.65%,13.12MiB / 64MiB +2026-10-16T14:23:13Z,mtusi-messenger-lab3-postgres-1,50.39%,326MiB / 384MiB +2026-10-16T14:23:13Z,mtusi-messenger-lab3-redis-1,0.77%,6.289MiB / 192MiB +2026-10-16T14:23:16Z,mtusi-messenger-lab3-api-1,19.61%,10.75MiB / 384MiB +2026-10-16T14:23:16Z,mtusi-messenger-lab3-api-2,19.36%,11MiB / 384MiB +2026-10-16T14:23:16Z,mtusi-messenger-lab3-lb-1,14.68%,13.11MiB / 64MiB +2026-10-16T14:23:16Z,mtusi-messenger-lab3-postgres-1,50.43%,326MiB / 384MiB +2026-10-16T14:23:16Z,mtusi-messenger-lab3-redis-1,0.24%,6.289MiB / 192MiB +2026-10-16T14:23:19Z,mtusi-messenger-lab3-api-1,19.50%,10.77MiB / 384MiB +2026-10-16T14:23:19Z,mtusi-messenger-lab3-api-2,19.22%,10.9MiB / 384MiB +2026-10-16T14:23:19Z,mtusi-messenger-lab3-lb-1,14.41%,13.12MiB / 64MiB +2026-10-16T14:23:19Z,mtusi-messenger-lab3-postgres-1,49.90%,328.8MiB / 384MiB +2026-10-16T14:23:19Z,mtusi-messenger-lab3-redis-1,0.23%,6.289MiB / 192MiB +2026-10-16T14:23:22Z,mtusi-messenger-lab3-api-1,18.97%,10.8MiB / 384MiB +2026-10-16T14:23:22Z,mtusi-messenger-lab3-api-2,19.32%,10.95MiB / 384MiB +2026-10-16T14:23:22Z,mtusi-messenger-lab3-lb-1,14.53%,13.12MiB / 64MiB +2026-10-16T14:23:22Z,mtusi-messenger-lab3-postgres-1,50.35%,331.3MiB / 384MiB +2026-10-16T14:23:22Z,mtusi-messenger-lab3-redis-1,0.22%,6.289MiB / 192MiB +2026-10-16T14:23:25Z,mtusi-messenger-lab3-api-1,19.07%,10.8MiB / 384MiB +2026-10-16T14:23:25Z,mtusi-messenger-lab3-api-2,19.85%,10.91MiB / 384MiB +2026-10-16T14:23:25Z,mtusi-messenger-lab3-lb-1,14.57%,13.12MiB / 64MiB +2026-10-16T14:23:25Z,mtusi-messenger-lab3-postgres-1,50.64%,328MiB / 384MiB +2026-10-16T14:23:25Z,mtusi-messenger-lab3-redis-1,0.23%,6.289MiB / 192MiB +2026-10-16T14:23:28Z,mtusi-messenger-lab3-api-1,19.71%,10.8MiB / 384MiB +2026-10-16T14:23:28Z,mtusi-messenger-lab3-api-2,19.40%,10.82MiB / 384MiB +2026-10-16T14:23:28Z,mtusi-messenger-lab3-lb-1,14.78%,13.11MiB / 64MiB +2026-10-16T14:23:28Z,mtusi-messenger-lab3-postgres-1,50.66%,328.7MiB / 384MiB +2026-10-16T14:23:28Z,mtusi-messenger-lab3-redis-1,0.21%,6.289MiB / 192MiB +2026-10-16T14:23:31Z,mtusi-messenger-lab3-api-1,18.84%,10.82MiB / 384MiB +2026-10-16T14:23:31Z,mtusi-messenger-lab3-api-2,18.99%,10.87MiB / 384MiB +2026-10-16T14:23:31Z,mtusi-messenger-lab3-lb-1,14.23%,13.37MiB / 64MiB +2026-10-16T14:23:31Z,mtusi-messenger-lab3-postgres-1,49.69%,326.9MiB / 384MiB +2026-10-16T14:23:31Z,mtusi-messenger-lab3-redis-1,0.26%,6.289MiB / 192MiB +2026-10-16T14:23:34Z,mtusi-messenger-lab3-api-1,19.13%,10.82MiB / 384MiB +2026-10-16T14:23:34Z,mtusi-messenger-lab3-api-2,20.01%,10.86MiB / 384MiB +2026-10-16T14:23:34Z,mtusi-messenger-lab3-lb-1,15.00%,13.12MiB / 64MiB +2026-10-16T14:23:34Z,mtusi-messenger-lab3-postgres-1,50.67%,326.8MiB / 384MiB +2026-10-16T14:23:34Z,mtusi-messenger-lab3-redis-1,0.23%,6.289MiB / 192MiB +2026-10-16T14:23:37Z,mtusi-messenger-lab3-api-1,19.61%,10.93MiB / 384MiB +2026-10-16T14:23:37Z,mtusi-messenger-lab3-api-2,20.35%,10.9MiB / 384MiB +2026-10-16T14:23:37Z,mtusi-messenger-lab3-lb-1,14.03%,13.13MiB / 64MiB +2026-10-16T14:23:37Z,mtusi-messenger-lab3-postgres-1,49.51%,326.7MiB / 384MiB +2026-10-16T14:23:37Z,mtusi-messenger-lab3-redis-1,0.23%,6.289MiB / 192MiB +2026-10-16T14:23:40Z,mtusi-messenger-lab3-api-1,19.56%,10.83MiB / 384MiB +2026-10-16T14:23:40Z,mtusi-messenger-lab3-api-2,19.18%,10.86MiB / 384MiB +2026-10-16T14:23:40Z,mtusi-messenger-lab3-lb-1,14.56%,13.36MiB / 64MiB +2026-10-16T14:23:40Z,mtusi-messenger-lab3-postgres-1,51.07%,328.8MiB / 384MiB +2026-10-16T14:23:40Z,mtusi-messenger-lab3-redis-1,0.24%,6.289MiB / 192MiB +2026-10-16T14:23:44Z,mtusi-messenger-lab3-api-1,19.15%,10.86MiB / 384MiB +2026-10-16T14:23:44Z,mtusi-messenger-lab3-api-2,19.13%,10.8MiB / 384MiB +2026-10-16T14:23:44Z,mtusi-messenger-lab3-lb-1,14.26%,13.13MiB / 64MiB +2026-10-16T14:23:44Z,mtusi-messenger-lab3-postgres-1,49.93%,331.9MiB / 384MiB +2026-10-16T14:23:44Z,mtusi-messenger-lab3-redis-1,0.22%,6.289MiB / 192MiB +2026-10-16T14:23:47Z,mtusi-messenger-lab3-api-1,13.80%,10.69MiB / 384MiB +2026-10-16T14:23:47Z,mtusi-messenger-lab3-api-2,14.11%,10.84MiB / 384MiB +2026-10-16T14:23:47Z,mtusi-messenger-lab3-lb-1,9.99%,13.11MiB / 64MiB +2026-10-16T14:23:47Z,mtusi-messenger-lab3-postgres-1,50.42%,350.8MiB / 384MiB +2026-10-16T14:23:47Z,mtusi-messenger-lab3-redis-1,0.68%,6.289MiB / 192MiB +2026-10-16T14:23:50Z,mtusi-messenger-lab3-api-1,19.38%,10.73MiB / 384MiB +2026-10-16T14:23:50Z,mtusi-messenger-lab3-api-2,17.91%,10.84MiB / 384MiB +2026-10-16T14:23:50Z,mtusi-messenger-lab3-lb-1,14.14%,13.11MiB / 64MiB +2026-10-16T14:23:50Z,mtusi-messenger-lab3-postgres-1,49.93%,325.9MiB / 384MiB +2026-10-16T14:23:50Z,mtusi-messenger-lab3-redis-1,0.21%,6.289MiB / 192MiB +2026-10-16T14:23:53Z,mtusi-messenger-lab3-api-1,19.90%,10.81MiB / 384MiB +2026-10-16T14:23:53Z,mtusi-messenger-lab3-api-2,19.36%,10.84MiB / 384MiB +2026-10-16T14:23:53Z,mtusi-messenger-lab3-lb-1,14.86%,13.13MiB / 64MiB +2026-10-16T14:23:53Z,mtusi-messenger-lab3-postgres-1,51.01%,325.7MiB / 384MiB +2026-10-16T14:23:53Z,mtusi-messenger-lab3-redis-1,0.81%,6.289MiB / 192MiB +2026-10-16T14:23:56Z,mtusi-messenger-lab3-api-1,19.40%,10.82MiB / 384MiB +2026-10-16T14:23:56Z,mtusi-messenger-lab3-api-2,19.04%,10.83MiB / 384MiB +2026-10-16T14:23:56Z,mtusi-messenger-lab3-lb-1,14.42%,13.12MiB / 64MiB +2026-10-16T14:23:56Z,mtusi-messenger-lab3-postgres-1,49.73%,325.8MiB / 384MiB +2026-10-16T14:23:56Z,mtusi-messenger-lab3-redis-1,0.22%,6.289MiB / 192MiB +2026-10-16T14:23:59Z,mtusi-messenger-lab3-api-1,20.10%,10.84MiB / 384MiB +2026-10-16T14:23:59Z,mtusi-messenger-lab3-api-2,18.83%,11.03MiB / 384MiB +2026-10-16T14:23:59Z,mtusi-messenger-lab3-lb-1,14.25%,13.37MiB / 64MiB +2026-10-16T14:23:59Z,mtusi-messenger-lab3-postgres-1,50.85%,326.1MiB / 384MiB +2026-10-16T14:23:59Z,mtusi-messenger-lab3-redis-1,0.23%,6.289MiB / 192MiB +2026-10-16T14:24:02Z,mtusi-messenger-lab3-api-1,20.06%,10.83MiB / 384MiB +2026-10-16T14:24:02Z,mtusi-messenger-lab3-api-2,19.40%,10.79MiB / 384MiB +2026-10-16T14:24:02Z,mtusi-messenger-lab3-lb-1,14.37%,13.36MiB / 64MiB +2026-10-16T14:24:02Z,mtusi-messenger-lab3-postgres-1,49.78%,326.3MiB / 384MiB +2026-10-16T14:24:02Z,mtusi-messenger-lab3-redis-1,0.22%,6.289MiB / 192MiB diff --git a/evidence/track1/superseded/run1-wrong-budgets/stats-g05.csv b/evidence/track1/superseded/run1-wrong-budgets/stats-g05.csv new file mode 100644 index 00000000..0cc8981f --- /dev/null +++ b/evidence/track1/superseded/run1-wrong-budgets/stats-g05.csv @@ -0,0 +1,101 @@ +timestamp,container,cpu_percent,mem_usage +2026-10-16T14:16:30Z,mtusi-messenger-lab3-api-1,20.21%,90.41MiB / 384MiB +2026-10-16T14:16:30Z,mtusi-messenger-lab3-api-2,19.72%,153.9MiB / 384MiB +2026-10-16T14:16:30Z,mtusi-messenger-lab3-lb-1,15.56%,13.11MiB / 64MiB +2026-10-16T14:16:30Z,mtusi-messenger-lab3-postgres-1,50.96%,228.8MiB / 384MiB +2026-10-16T14:16:30Z,mtusi-messenger-lab3-redis-1,0.76%,6.289MiB / 192MiB +2026-10-16T14:16:33Z,mtusi-messenger-lab3-api-1,20.72%,14.09MiB / 384MiB +2026-10-16T14:16:33Z,mtusi-messenger-lab3-api-2,21.56%,12.55MiB / 384MiB +2026-10-16T14:16:33Z,mtusi-messenger-lab3-lb-1,15.16%,13.37MiB / 64MiB +2026-10-16T14:16:33Z,mtusi-messenger-lab3-postgres-1,50.88%,228.8MiB / 384MiB +2026-10-16T14:16:33Z,mtusi-messenger-lab3-redis-1,0.23%,6.289MiB / 192MiB +2026-10-16T14:16:36Z,mtusi-messenger-lab3-api-1,20.66%,14.26MiB / 384MiB +2026-10-16T14:16:36Z,mtusi-messenger-lab3-api-2,20.61%,11.88MiB / 384MiB +2026-10-16T14:16:36Z,mtusi-messenger-lab3-lb-1,15.51%,13.12MiB / 64MiB +2026-10-16T14:16:36Z,mtusi-messenger-lab3-postgres-1,51.15%,229.1MiB / 384MiB +2026-10-16T14:16:36Z,mtusi-messenger-lab3-redis-1,0.23%,6.289MiB / 192MiB +2026-10-16T14:16:39Z,mtusi-messenger-lab3-api-1,19.97%,14.26MiB / 384MiB +2026-10-16T14:16:39Z,mtusi-messenger-lab3-api-2,19.42%,11.7MiB / 384MiB +2026-10-16T14:16:39Z,mtusi-messenger-lab3-lb-1,15.25%,13.13MiB / 64MiB +2026-10-16T14:16:39Z,mtusi-messenger-lab3-postgres-1,50.31%,229.5MiB / 384MiB +2026-10-16T14:16:39Z,mtusi-messenger-lab3-redis-1,0.72%,6.289MiB / 192MiB +2026-10-16T14:16:42Z,mtusi-messenger-lab3-api-1,19.00%,14.26MiB / 384MiB +2026-10-16T14:16:42Z,mtusi-messenger-lab3-api-2,20.19%,11.16MiB / 384MiB +2026-10-16T14:16:42Z,mtusi-messenger-lab3-lb-1,14.57%,13.12MiB / 64MiB +2026-10-16T14:16:42Z,mtusi-messenger-lab3-postgres-1,50.26%,230.3MiB / 384MiB +2026-10-16T14:16:42Z,mtusi-messenger-lab3-redis-1,0.23%,6.289MiB / 192MiB +2026-10-16T14:16:45Z,mtusi-messenger-lab3-api-1,17.32%,14.52MiB / 384MiB +2026-10-16T14:16:45Z,mtusi-messenger-lab3-api-2,17.50%,11.19MiB / 384MiB +2026-10-16T14:16:45Z,mtusi-messenger-lab3-lb-1,13.00%,13.12MiB / 64MiB +2026-10-16T14:16:45Z,mtusi-messenger-lab3-postgres-1,50.46%,238.5MiB / 384MiB +2026-10-16T14:16:45Z,mtusi-messenger-lab3-redis-1,0.79%,6.289MiB / 192MiB +2026-10-16T14:16:49Z,mtusi-messenger-lab3-api-1,20.93%,14.16MiB / 384MiB +2026-10-16T14:16:49Z,mtusi-messenger-lab3-api-2,19.78%,11.34MiB / 384MiB +2026-10-16T14:16:49Z,mtusi-messenger-lab3-lb-1,15.39%,13.11MiB / 64MiB +2026-10-16T14:16:49Z,mtusi-messenger-lab3-postgres-1,50.65%,229.3MiB / 384MiB +2026-10-16T14:16:49Z,mtusi-messenger-lab3-redis-1,0.19%,6.289MiB / 192MiB +2026-10-16T14:16:52Z,mtusi-messenger-lab3-api-1,19.56%,13.57MiB / 384MiB +2026-10-16T14:16:52Z,mtusi-messenger-lab3-api-2,19.14%,11.27MiB / 384MiB +2026-10-16T14:16:52Z,mtusi-messenger-lab3-lb-1,14.31%,13.12MiB / 64MiB +2026-10-16T14:16:52Z,mtusi-messenger-lab3-postgres-1,50.27%,229.5MiB / 384MiB +2026-10-16T14:16:52Z,mtusi-messenger-lab3-redis-1,0.22%,6.289MiB / 192MiB +2026-10-16T14:16:55Z,mtusi-messenger-lab3-api-1,19.72%,14.32MiB / 384MiB +2026-10-16T14:16:55Z,mtusi-messenger-lab3-api-2,20.01%,11.28MiB / 384MiB +2026-10-16T14:16:55Z,mtusi-messenger-lab3-lb-1,15.03%,13.38MiB / 64MiB +2026-10-16T14:16:55Z,mtusi-messenger-lab3-postgres-1,50.64%,229.6MiB / 384MiB +2026-10-16T14:16:55Z,mtusi-messenger-lab3-redis-1,0.80%,6.289MiB / 192MiB +2026-10-16T14:16:58Z,mtusi-messenger-lab3-api-1,19.63%,13.89MiB / 384MiB +2026-10-16T14:16:58Z,mtusi-messenger-lab3-api-2,20.79%,11.27MiB / 384MiB +2026-10-16T14:16:58Z,mtusi-messenger-lab3-lb-1,15.33%,13.12MiB / 64MiB +2026-10-16T14:16:58Z,mtusi-messenger-lab3-postgres-1,50.90%,229.7MiB / 384MiB +2026-10-16T14:16:58Z,mtusi-messenger-lab3-redis-1,0.24%,6.289MiB / 192MiB +2026-10-16T14:17:01Z,mtusi-messenger-lab3-api-1,19.82%,14.15MiB / 384MiB +2026-10-16T14:17:01Z,mtusi-messenger-lab3-api-2,19.81%,11.28MiB / 384MiB +2026-10-16T14:17:01Z,mtusi-messenger-lab3-lb-1,15.12%,13.12MiB / 64MiB +2026-10-16T14:17:01Z,mtusi-messenger-lab3-postgres-1,51.04%,230MiB / 384MiB +2026-10-16T14:17:01Z,mtusi-messenger-lab3-redis-1,0.22%,6.289MiB / 192MiB +2026-10-16T14:17:04Z,mtusi-messenger-lab3-api-1,20.03%,13.73MiB / 384MiB +2026-10-16T14:17:04Z,mtusi-messenger-lab3-api-2,20.48%,11.23MiB / 384MiB +2026-10-16T14:17:04Z,mtusi-messenger-lab3-lb-1,14.84%,13.11MiB / 64MiB +2026-10-16T14:17:04Z,mtusi-messenger-lab3-postgres-1,49.99%,230.1MiB / 384MiB +2026-10-16T14:17:04Z,mtusi-messenger-lab3-redis-1,0.24%,6.289MiB / 192MiB +2026-10-16T14:17:07Z,mtusi-messenger-lab3-api-1,20.83%,13.68MiB / 384MiB +2026-10-16T14:17:07Z,mtusi-messenger-lab3-api-2,20.17%,11.3MiB / 384MiB +2026-10-16T14:17:07Z,mtusi-messenger-lab3-lb-1,15.42%,13.11MiB / 64MiB +2026-10-16T14:17:07Z,mtusi-messenger-lab3-postgres-1,50.48%,230.1MiB / 384MiB +2026-10-16T14:17:07Z,mtusi-messenger-lab3-redis-1,0.22%,6.289MiB / 192MiB +2026-10-16T14:17:10Z,mtusi-messenger-lab3-api-1,20.59%,13.52MiB / 384MiB +2026-10-16T14:17:10Z,mtusi-messenger-lab3-api-2,20.87%,11.3MiB / 384MiB +2026-10-16T14:17:10Z,mtusi-messenger-lab3-lb-1,15.42%,13.12MiB / 64MiB +2026-10-16T14:17:10Z,mtusi-messenger-lab3-postgres-1,50.57%,230.2MiB / 384MiB +2026-10-16T14:17:10Z,mtusi-messenger-lab3-redis-1,0.86%,6.289MiB / 192MiB +2026-10-16T14:17:13Z,mtusi-messenger-lab3-api-1,20.25%,14.21MiB / 384MiB +2026-10-16T14:17:13Z,mtusi-messenger-lab3-api-2,20.40%,11.3MiB / 384MiB +2026-10-16T14:17:13Z,mtusi-messenger-lab3-lb-1,15.61%,13.12MiB / 64MiB +2026-10-16T14:17:13Z,mtusi-messenger-lab3-postgres-1,49.60%,230.7MiB / 384MiB +2026-10-16T14:17:13Z,mtusi-messenger-lab3-redis-1,0.25%,6.289MiB / 192MiB +2026-10-16T14:17:16Z,mtusi-messenger-lab3-api-1,20.79%,14.28MiB / 384MiB +2026-10-16T14:17:16Z,mtusi-messenger-lab3-api-2,20.63%,11.21MiB / 384MiB +2026-10-16T14:17:16Z,mtusi-messenger-lab3-lb-1,15.57%,13.11MiB / 64MiB +2026-10-16T14:17:16Z,mtusi-messenger-lab3-postgres-1,50.94%,230.6MiB / 384MiB +2026-10-16T14:17:16Z,mtusi-messenger-lab3-redis-1,0.25%,6.289MiB / 192MiB +2026-10-16T14:17:19Z,mtusi-messenger-lab3-api-1,20.22%,14.14MiB / 384MiB +2026-10-16T14:17:19Z,mtusi-messenger-lab3-api-2,19.84%,11.18MiB / 384MiB +2026-10-16T14:17:19Z,mtusi-messenger-lab3-lb-1,15.03%,13.11MiB / 64MiB +2026-10-16T14:17:19Z,mtusi-messenger-lab3-postgres-1,49.91%,231.1MiB / 384MiB +2026-10-16T14:17:19Z,mtusi-messenger-lab3-redis-1,0.77%,6.289MiB / 192MiB +2026-10-16T14:17:22Z,mtusi-messenger-lab3-api-1,20.21%,14.02MiB / 384MiB +2026-10-16T14:17:22Z,mtusi-messenger-lab3-api-2,20.30%,11.25MiB / 384MiB +2026-10-16T14:17:22Z,mtusi-messenger-lab3-lb-1,15.50%,13.11MiB / 64MiB +2026-10-16T14:17:22Z,mtusi-messenger-lab3-postgres-1,50.05%,231.2MiB / 384MiB +2026-10-16T14:17:22Z,mtusi-messenger-lab3-redis-1,0.21%,6.289MiB / 192MiB +2026-10-16T14:17:25Z,mtusi-messenger-lab3-api-1,21.31%,14.12MiB / 384MiB +2026-10-16T14:17:25Z,mtusi-messenger-lab3-api-2,19.67%,11.2MiB / 384MiB +2026-10-16T14:17:25Z,mtusi-messenger-lab3-lb-1,14.78%,13.11MiB / 64MiB +2026-10-16T14:17:25Z,mtusi-messenger-lab3-postgres-1,49.24%,231.4MiB / 384MiB +2026-10-16T14:17:25Z,mtusi-messenger-lab3-redis-1,0.23%,6.289MiB / 192MiB +2026-10-16T14:17:28Z,mtusi-messenger-lab3-api-1,19.89%,14.02MiB / 384MiB +2026-10-16T14:17:28Z,mtusi-messenger-lab3-api-2,20.58%,11.19MiB / 384MiB +2026-10-16T14:17:28Z,mtusi-messenger-lab3-lb-1,14.93%,13.11MiB / 64MiB +2026-10-16T14:17:28Z,mtusi-messenger-lab3-postgres-1,50.55%,231.6MiB / 384MiB +2026-10-16T14:17:28Z,mtusi-messenger-lab3-redis-1,0.22%,6.289MiB / 192MiB diff --git a/evidence/track1/superseded/run1-wrong-budgets/stats-g10.csv b/evidence/track1/superseded/run1-wrong-budgets/stats-g10.csv new file mode 100644 index 00000000..d213bb02 --- /dev/null +++ b/evidence/track1/superseded/run1-wrong-budgets/stats-g10.csv @@ -0,0 +1,101 @@ +timestamp,container,cpu_percent,mem_usage +2026-10-16T14:17:48Z,mtusi-messenger-lab3-api-1,19.02%,163.2MiB / 384MiB +2026-10-16T14:17:48Z,mtusi-messenger-lab3-api-2,19.12%,162.9MiB / 384MiB +2026-10-16T14:17:48Z,mtusi-messenger-lab3-lb-1,15.00%,13.12MiB / 64MiB +2026-10-16T14:17:48Z,mtusi-messenger-lab3-postgres-1,50.80%,284.3MiB / 384MiB +2026-10-16T14:17:48Z,mtusi-messenger-lab3-redis-1,0.24%,6.289MiB / 192MiB +2026-10-16T14:17:51Z,mtusi-messenger-lab3-api-1,21.12%,13.22MiB / 384MiB +2026-10-16T14:17:51Z,mtusi-messenger-lab3-api-2,21.10%,37.39MiB / 384MiB +2026-10-16T14:17:51Z,mtusi-messenger-lab3-lb-1,14.86%,13.12MiB / 64MiB +2026-10-16T14:17:51Z,mtusi-messenger-lab3-postgres-1,49.89%,284.7MiB / 384MiB +2026-10-16T14:17:51Z,mtusi-messenger-lab3-redis-1,0.72%,6.289MiB / 192MiB +2026-10-16T14:17:54Z,mtusi-messenger-lab3-api-1,19.02%,12.97MiB / 384MiB +2026-10-16T14:17:54Z,mtusi-messenger-lab3-api-2,19.00%,11.07MiB / 384MiB +2026-10-16T14:17:54Z,mtusi-messenger-lab3-lb-1,14.34%,13.11MiB / 64MiB +2026-10-16T14:17:54Z,mtusi-messenger-lab3-postgres-1,49.20%,285.2MiB / 384MiB +2026-10-16T14:17:54Z,mtusi-messenger-lab3-redis-1,0.23%,6.289MiB / 192MiB +2026-10-16T14:17:57Z,mtusi-messenger-lab3-api-1,20.42%,13.18MiB / 384MiB +2026-10-16T14:17:57Z,mtusi-messenger-lab3-api-2,19.98%,11.2MiB / 384MiB +2026-10-16T14:17:57Z,mtusi-messenger-lab3-lb-1,15.21%,13.38MiB / 64MiB +2026-10-16T14:17:57Z,mtusi-messenger-lab3-postgres-1,51.20%,285.7MiB / 384MiB +2026-10-16T14:17:57Z,mtusi-messenger-lab3-redis-1,0.25%,6.289MiB / 192MiB +2026-10-16T14:18:00Z,mtusi-messenger-lab3-api-1,19.88%,12.91MiB / 384MiB +2026-10-16T14:18:00Z,mtusi-messenger-lab3-api-2,19.42%,11.15MiB / 384MiB +2026-10-16T14:18:00Z,mtusi-messenger-lab3-lb-1,14.57%,13.13MiB / 64MiB +2026-10-16T14:18:00Z,mtusi-messenger-lab3-postgres-1,50.93%,285.7MiB / 384MiB +2026-10-16T14:18:00Z,mtusi-messenger-lab3-redis-1,0.75%,6.289MiB / 192MiB +2026-10-16T14:18:03Z,mtusi-messenger-lab3-api-1,20.34%,12.64MiB / 384MiB +2026-10-16T14:18:03Z,mtusi-messenger-lab3-api-2,20.46%,11.13MiB / 384MiB +2026-10-16T14:18:03Z,mtusi-messenger-lab3-lb-1,15.18%,13.11MiB / 64MiB +2026-10-16T14:18:03Z,mtusi-messenger-lab3-postgres-1,51.35%,286.1MiB / 384MiB +2026-10-16T14:18:03Z,mtusi-messenger-lab3-redis-1,0.25%,6.289MiB / 192MiB +2026-10-16T14:18:06Z,mtusi-messenger-lab3-api-1,19.79%,12.71MiB / 384MiB +2026-10-16T14:18:06Z,mtusi-messenger-lab3-api-2,19.59%,11.3MiB / 384MiB +2026-10-16T14:18:06Z,mtusi-messenger-lab3-lb-1,14.29%,13.11MiB / 64MiB +2026-10-16T14:18:06Z,mtusi-messenger-lab3-postgres-1,49.24%,286.2MiB / 384MiB +2026-10-16T14:18:06Z,mtusi-messenger-lab3-redis-1,0.72%,6.289MiB / 192MiB +2026-10-16T14:18:09Z,mtusi-messenger-lab3-api-1,19.59%,12.46MiB / 384MiB +2026-10-16T14:18:09Z,mtusi-messenger-lab3-api-2,20.28%,11.04MiB / 384MiB +2026-10-16T14:18:09Z,mtusi-messenger-lab3-lb-1,14.20%,13.12MiB / 64MiB +2026-10-16T14:18:09Z,mtusi-messenger-lab3-postgres-1,49.58%,286.5MiB / 384MiB +2026-10-16T14:18:09Z,mtusi-messenger-lab3-redis-1,0.26%,6.289MiB / 192MiB +2026-10-16T14:18:12Z,mtusi-messenger-lab3-api-1,19.85%,12.8MiB / 384MiB +2026-10-16T14:18:12Z,mtusi-messenger-lab3-api-2,19.74%,11.24MiB / 384MiB +2026-10-16T14:18:12Z,mtusi-messenger-lab3-lb-1,14.95%,13.11MiB / 64MiB +2026-10-16T14:18:12Z,mtusi-messenger-lab3-postgres-1,51.16%,286.6MiB / 384MiB +2026-10-16T14:18:12Z,mtusi-messenger-lab3-redis-1,0.23%,6.289MiB / 192MiB +2026-10-16T14:18:15Z,mtusi-messenger-lab3-api-1,20.79%,12.46MiB / 384MiB +2026-10-16T14:18:15Z,mtusi-messenger-lab3-api-2,19.53%,11.12MiB / 384MiB +2026-10-16T14:18:15Z,mtusi-messenger-lab3-lb-1,14.79%,13.1MiB / 64MiB +2026-10-16T14:18:15Z,mtusi-messenger-lab3-postgres-1,49.91%,286.6MiB / 384MiB +2026-10-16T14:18:15Z,mtusi-messenger-lab3-redis-1,0.72%,6.289MiB / 192MiB +2026-10-16T14:18:18Z,mtusi-messenger-lab3-api-1,20.26%,12.9MiB / 384MiB +2026-10-16T14:18:18Z,mtusi-messenger-lab3-api-2,19.49%,11.18MiB / 384MiB +2026-10-16T14:18:18Z,mtusi-messenger-lab3-lb-1,14.65%,13.12MiB / 64MiB +2026-10-16T14:18:18Z,mtusi-messenger-lab3-postgres-1,50.53%,286.9MiB / 384MiB +2026-10-16T14:18:18Z,mtusi-messenger-lab3-redis-1,0.22%,6.289MiB / 192MiB +2026-10-16T14:18:21Z,mtusi-messenger-lab3-api-1,19.72%,12.96MiB / 384MiB +2026-10-16T14:18:21Z,mtusi-messenger-lab3-api-2,18.76%,11.21MiB / 384MiB +2026-10-16T14:18:21Z,mtusi-messenger-lab3-lb-1,14.93%,13.1MiB / 64MiB +2026-10-16T14:18:21Z,mtusi-messenger-lab3-postgres-1,49.35%,287MiB / 384MiB +2026-10-16T14:18:21Z,mtusi-messenger-lab3-redis-1,0.22%,6.289MiB / 192MiB +2026-10-16T14:18:24Z,mtusi-messenger-lab3-api-1,20.39%,12.59MiB / 384MiB +2026-10-16T14:18:24Z,mtusi-messenger-lab3-api-2,20.29%,11.21MiB / 384MiB +2026-10-16T14:18:24Z,mtusi-messenger-lab3-lb-1,15.17%,13.12MiB / 64MiB +2026-10-16T14:18:24Z,mtusi-messenger-lab3-postgres-1,49.73%,287MiB / 384MiB +2026-10-16T14:18:24Z,mtusi-messenger-lab3-redis-1,0.23%,6.289MiB / 192MiB +2026-10-16T14:18:27Z,mtusi-messenger-lab3-api-1,20.71%,12.79MiB / 384MiB +2026-10-16T14:18:27Z,mtusi-messenger-lab3-api-2,19.85%,11.21MiB / 384MiB +2026-10-16T14:18:27Z,mtusi-messenger-lab3-lb-1,14.84%,13.12MiB / 64MiB +2026-10-16T14:18:27Z,mtusi-messenger-lab3-postgres-1,50.63%,287MiB / 384MiB +2026-10-16T14:18:27Z,mtusi-messenger-lab3-redis-1,0.22%,6.289MiB / 192MiB +2026-10-16T14:18:31Z,mtusi-messenger-lab3-api-1,19.13%,12.54MiB / 384MiB +2026-10-16T14:18:31Z,mtusi-messenger-lab3-api-2,19.53%,11.22MiB / 384MiB +2026-10-16T14:18:31Z,mtusi-messenger-lab3-lb-1,14.50%,13.12MiB / 64MiB +2026-10-16T14:18:31Z,mtusi-messenger-lab3-postgres-1,50.83%,287.1MiB / 384MiB +2026-10-16T14:18:31Z,mtusi-messenger-lab3-redis-1,0.21%,6.289MiB / 192MiB +2026-10-16T14:18:34Z,mtusi-messenger-lab3-api-1,19.67%,12.66MiB / 384MiB +2026-10-16T14:18:34Z,mtusi-messenger-lab3-api-2,20.05%,11.12MiB / 384MiB +2026-10-16T14:18:34Z,mtusi-messenger-lab3-lb-1,14.70%,13.12MiB / 64MiB +2026-10-16T14:18:34Z,mtusi-messenger-lab3-postgres-1,50.17%,287.1MiB / 384MiB +2026-10-16T14:18:34Z,mtusi-messenger-lab3-redis-1,0.21%,6.289MiB / 192MiB +2026-10-16T14:18:37Z,mtusi-messenger-lab3-api-1,20.01%,12.61MiB / 384MiB +2026-10-16T14:18:37Z,mtusi-messenger-lab3-api-2,20.25%,11.04MiB / 384MiB +2026-10-16T14:18:37Z,mtusi-messenger-lab3-lb-1,15.12%,13.11MiB / 64MiB +2026-10-16T14:18:37Z,mtusi-messenger-lab3-postgres-1,50.58%,287.2MiB / 384MiB +2026-10-16T14:18:37Z,mtusi-messenger-lab3-redis-1,0.22%,6.289MiB / 192MiB +2026-10-16T14:18:40Z,mtusi-messenger-lab3-api-1,19.75%,12.68MiB / 384MiB +2026-10-16T14:18:40Z,mtusi-messenger-lab3-api-2,20.04%,11.21MiB / 384MiB +2026-10-16T14:18:40Z,mtusi-messenger-lab3-lb-1,14.71%,13.12MiB / 64MiB +2026-10-16T14:18:40Z,mtusi-messenger-lab3-postgres-1,51.15%,287.4MiB / 384MiB +2026-10-16T14:18:40Z,mtusi-messenger-lab3-redis-1,0.22%,6.289MiB / 192MiB +2026-10-16T14:18:43Z,mtusi-messenger-lab3-api-1,20.06%,12.67MiB / 384MiB +2026-10-16T14:18:43Z,mtusi-messenger-lab3-api-2,18.55%,11.22MiB / 384MiB +2026-10-16T14:18:43Z,mtusi-messenger-lab3-lb-1,14.38%,13.11MiB / 64MiB +2026-10-16T14:18:43Z,mtusi-messenger-lab3-postgres-1,49.84%,287.4MiB / 384MiB +2026-10-16T14:18:43Z,mtusi-messenger-lab3-redis-1,0.21%,6.289MiB / 192MiB +2026-10-16T14:18:46Z,mtusi-messenger-lab3-api-1,18.02%,12.73MiB / 384MiB +2026-10-16T14:18:46Z,mtusi-messenger-lab3-api-2,17.16%,11.17MiB / 384MiB +2026-10-16T14:18:46Z,mtusi-messenger-lab3-lb-1,14.63%,13.12MiB / 64MiB +2026-10-16T14:18:46Z,mtusi-messenger-lab3-postgres-1,50.43%,288.9MiB / 384MiB +2026-10-16T14:18:46Z,mtusi-messenger-lab3-redis-1,0.23%,6.289MiB / 192MiB diff --git a/evidence/track1/superseded/run1-wrong-budgets/stats-g15.csv b/evidence/track1/superseded/run1-wrong-budgets/stats-g15.csv new file mode 100644 index 00000000..bc1328c5 --- /dev/null +++ b/evidence/track1/superseded/run1-wrong-budgets/stats-g15.csv @@ -0,0 +1,101 @@ +timestamp,container,cpu_percent,mem_usage +2026-10-16T14:19:04Z,mtusi-messenger-lab3-api-2,19.13%,167.4MiB / 384MiB +2026-10-16T14:19:04Z,mtusi-messenger-lab3-api-1,18.67%,167.2MiB / 384MiB +2026-10-16T14:19:04Z,mtusi-messenger-lab3-lb-1,14.49%,13.11MiB / 64MiB +2026-10-16T14:19:04Z,mtusi-messenger-lab3-postgres-1,49.27%,300.4MiB / 384MiB +2026-10-16T14:19:04Z,mtusi-messenger-lab3-redis-1,0.23%,6.289MiB / 192MiB +2026-10-16T14:19:07Z,mtusi-messenger-lab3-api-2,19.67%,11.5MiB / 384MiB +2026-10-16T14:19:07Z,mtusi-messenger-lab3-api-1,19.73%,11.44MiB / 384MiB +2026-10-16T14:19:07Z,mtusi-messenger-lab3-lb-1,14.74%,13.12MiB / 64MiB +2026-10-16T14:19:07Z,mtusi-messenger-lab3-postgres-1,49.44%,300.6MiB / 384MiB +2026-10-16T14:19:07Z,mtusi-messenger-lab3-redis-1,0.21%,6.289MiB / 192MiB +2026-10-16T14:19:10Z,mtusi-messenger-lab3-api-2,19.06%,11.34MiB / 384MiB +2026-10-16T14:19:10Z,mtusi-messenger-lab3-api-1,20.05%,11.44MiB / 384MiB +2026-10-16T14:19:10Z,mtusi-messenger-lab3-lb-1,14.75%,13.12MiB / 64MiB +2026-10-16T14:19:10Z,mtusi-messenger-lab3-postgres-1,49.83%,300.7MiB / 384MiB +2026-10-16T14:19:10Z,mtusi-messenger-lab3-redis-1,0.71%,6.289MiB / 192MiB +2026-10-16T14:19:14Z,mtusi-messenger-lab3-api-2,20.38%,11.3MiB / 384MiB +2026-10-16T14:19:14Z,mtusi-messenger-lab3-api-1,19.71%,11.28MiB / 384MiB +2026-10-16T14:19:14Z,mtusi-messenger-lab3-lb-1,15.02%,13.12MiB / 64MiB +2026-10-16T14:19:14Z,mtusi-messenger-lab3-postgres-1,50.17%,303MiB / 384MiB +2026-10-16T14:19:14Z,mtusi-messenger-lab3-redis-1,0.22%,6.289MiB / 192MiB +2026-10-16T14:19:17Z,mtusi-messenger-lab3-api-2,19.69%,11.28MiB / 384MiB +2026-10-16T14:19:17Z,mtusi-messenger-lab3-api-1,19.95%,11.11MiB / 384MiB +2026-10-16T14:19:17Z,mtusi-messenger-lab3-lb-1,14.69%,13.12MiB / 64MiB +2026-10-16T14:19:17Z,mtusi-messenger-lab3-postgres-1,50.28%,303.6MiB / 384MiB +2026-10-16T14:19:17Z,mtusi-messenger-lab3-redis-1,0.23%,6.289MiB / 192MiB +2026-10-16T14:19:20Z,mtusi-messenger-lab3-api-2,19.06%,11.26MiB / 384MiB +2026-10-16T14:19:20Z,mtusi-messenger-lab3-api-1,19.32%,11.01MiB / 384MiB +2026-10-16T14:19:20Z,mtusi-messenger-lab3-lb-1,14.66%,13.12MiB / 64MiB +2026-10-16T14:19:20Z,mtusi-messenger-lab3-postgres-1,49.41%,300.8MiB / 384MiB +2026-10-16T14:19:20Z,mtusi-messenger-lab3-redis-1,0.23%,6.289MiB / 192MiB +2026-10-16T14:19:23Z,mtusi-messenger-lab3-api-2,19.83%,11.26MiB / 384MiB +2026-10-16T14:19:23Z,mtusi-messenger-lab3-api-1,19.78%,11.02MiB / 384MiB +2026-10-16T14:19:23Z,mtusi-messenger-lab3-lb-1,14.62%,13.11MiB / 64MiB +2026-10-16T14:19:23Z,mtusi-messenger-lab3-postgres-1,49.73%,300.9MiB / 384MiB +2026-10-16T14:19:23Z,mtusi-messenger-lab3-redis-1,0.22%,6.289MiB / 192MiB +2026-10-16T14:19:26Z,mtusi-messenger-lab3-api-2,19.05%,11.11MiB / 384MiB +2026-10-16T14:19:26Z,mtusi-messenger-lab3-api-1,20.03%,11.19MiB / 384MiB +2026-10-16T14:19:26Z,mtusi-messenger-lab3-lb-1,15.06%,13.1MiB / 64MiB +2026-10-16T14:19:26Z,mtusi-messenger-lab3-postgres-1,50.18%,301MiB / 384MiB +2026-10-16T14:19:26Z,mtusi-messenger-lab3-redis-1,1.04%,6.289MiB / 192MiB +2026-10-16T14:19:29Z,mtusi-messenger-lab3-api-2,19.15%,11.14MiB / 384MiB +2026-10-16T14:19:29Z,mtusi-messenger-lab3-api-1,18.77%,11.08MiB / 384MiB +2026-10-16T14:19:29Z,mtusi-messenger-lab3-lb-1,14.46%,13.11MiB / 64MiB +2026-10-16T14:19:29Z,mtusi-messenger-lab3-postgres-1,50.42%,300.9MiB / 384MiB +2026-10-16T14:19:29Z,mtusi-messenger-lab3-redis-1,0.23%,6.289MiB / 192MiB +2026-10-16T14:19:32Z,mtusi-messenger-lab3-api-2,19.69%,11.17MiB / 384MiB +2026-10-16T14:19:32Z,mtusi-messenger-lab3-api-1,19.42%,11.1MiB / 384MiB +2026-10-16T14:19:32Z,mtusi-messenger-lab3-lb-1,14.80%,13.11MiB / 64MiB +2026-10-16T14:19:32Z,mtusi-messenger-lab3-postgres-1,49.92%,301MiB / 384MiB +2026-10-16T14:19:32Z,mtusi-messenger-lab3-redis-1,0.23%,6.289MiB / 192MiB +2026-10-16T14:19:35Z,mtusi-messenger-lab3-api-2,19.16%,11.16MiB / 384MiB +2026-10-16T14:19:35Z,mtusi-messenger-lab3-api-1,19.73%,11.16MiB / 384MiB +2026-10-16T14:19:35Z,mtusi-messenger-lab3-lb-1,14.79%,13.1MiB / 64MiB +2026-10-16T14:19:35Z,mtusi-messenger-lab3-postgres-1,48.75%,301.8MiB / 384MiB +2026-10-16T14:19:35Z,mtusi-messenger-lab3-redis-1,0.69%,6.289MiB / 192MiB +2026-10-16T14:19:38Z,mtusi-messenger-lab3-api-2,18.98%,11.2MiB / 384MiB +2026-10-16T14:19:38Z,mtusi-messenger-lab3-api-1,20.01%,11.07MiB / 384MiB +2026-10-16T14:19:38Z,mtusi-messenger-lab3-lb-1,15.28%,13.11MiB / 64MiB +2026-10-16T14:19:38Z,mtusi-messenger-lab3-postgres-1,50.46%,305.4MiB / 384MiB +2026-10-16T14:19:38Z,mtusi-messenger-lab3-redis-1,0.22%,6.289MiB / 192MiB +2026-10-16T14:19:41Z,mtusi-messenger-lab3-api-2,19.37%,11.23MiB / 384MiB +2026-10-16T14:19:41Z,mtusi-messenger-lab3-api-1,19.27%,11.11MiB / 384MiB +2026-10-16T14:19:41Z,mtusi-messenger-lab3-lb-1,14.78%,13.11MiB / 64MiB +2026-10-16T14:19:41Z,mtusi-messenger-lab3-postgres-1,49.90%,308.3MiB / 384MiB +2026-10-16T14:19:41Z,mtusi-messenger-lab3-redis-1,0.69%,6.289MiB / 192MiB +2026-10-16T14:19:44Z,mtusi-messenger-lab3-api-2,19.79%,11.13MiB / 384MiB +2026-10-16T14:19:44Z,mtusi-messenger-lab3-api-1,19.87%,11.1MiB / 384MiB +2026-10-16T14:19:44Z,mtusi-messenger-lab3-lb-1,14.84%,13.11MiB / 64MiB +2026-10-16T14:19:44Z,mtusi-messenger-lab3-postgres-1,50.75%,301MiB / 384MiB +2026-10-16T14:19:44Z,mtusi-messenger-lab3-redis-1,0.22%,6.289MiB / 192MiB +2026-10-16T14:19:47Z,mtusi-messenger-lab3-api-2,14.59%,11.13MiB / 384MiB +2026-10-16T14:19:47Z,mtusi-messenger-lab3-api-1,16.07%,11.41MiB / 384MiB +2026-10-16T14:19:47Z,mtusi-messenger-lab3-lb-1,12.04%,13.11MiB / 64MiB +2026-10-16T14:19:47Z,mtusi-messenger-lab3-postgres-1,50.81%,311.8MiB / 384MiB +2026-10-16T14:19:47Z,mtusi-messenger-lab3-redis-1,0.24%,6.289MiB / 192MiB +2026-10-16T14:19:50Z,mtusi-messenger-lab3-api-2,19.80%,11.24MiB / 384MiB +2026-10-16T14:19:50Z,mtusi-messenger-lab3-api-1,19.73%,11.23MiB / 384MiB +2026-10-16T14:19:50Z,mtusi-messenger-lab3-lb-1,14.74%,13.1MiB / 64MiB +2026-10-16T14:19:50Z,mtusi-messenger-lab3-postgres-1,50.18%,312.1MiB / 384MiB +2026-10-16T14:19:50Z,mtusi-messenger-lab3-redis-1,0.21%,6.289MiB / 192MiB +2026-10-16T14:19:53Z,mtusi-messenger-lab3-api-2,19.81%,11.11MiB / 384MiB +2026-10-16T14:19:53Z,mtusi-messenger-lab3-api-1,19.03%,11.3MiB / 384MiB +2026-10-16T14:19:53Z,mtusi-messenger-lab3-lb-1,14.61%,13.11MiB / 64MiB +2026-10-16T14:19:53Z,mtusi-messenger-lab3-postgres-1,50.02%,312.3MiB / 384MiB +2026-10-16T14:19:53Z,mtusi-messenger-lab3-redis-1,0.23%,6.289MiB / 192MiB +2026-10-16T14:19:56Z,mtusi-messenger-lab3-api-2,18.78%,11.23MiB / 384MiB +2026-10-16T14:19:56Z,mtusi-messenger-lab3-api-1,19.33%,10.95MiB / 384MiB +2026-10-16T14:19:56Z,mtusi-messenger-lab3-lb-1,14.39%,13.11MiB / 64MiB +2026-10-16T14:19:56Z,mtusi-messenger-lab3-postgres-1,49.49%,312.7MiB / 384MiB +2026-10-16T14:19:56Z,mtusi-messenger-lab3-redis-1,0.75%,6.289MiB / 192MiB +2026-10-16T14:20:00Z,mtusi-messenger-lab3-api-2,19.53%,11.17MiB / 384MiB +2026-10-16T14:20:00Z,mtusi-messenger-lab3-api-1,19.27%,10.97MiB / 384MiB +2026-10-16T14:20:00Z,mtusi-messenger-lab3-lb-1,14.51%,13.11MiB / 64MiB +2026-10-16T14:20:00Z,mtusi-messenger-lab3-postgres-1,49.69%,308.9MiB / 384MiB +2026-10-16T14:20:00Z,mtusi-messenger-lab3-redis-1,0.22%,6.289MiB / 192MiB +2026-10-16T14:20:03Z,mtusi-messenger-lab3-api-2,18.09%,11.18MiB / 384MiB +2026-10-16T14:20:03Z,mtusi-messenger-lab3-api-1,17.68%,11.05MiB / 384MiB +2026-10-16T14:20:03Z,mtusi-messenger-lab3-lb-1,14.74%,13.1MiB / 64MiB +2026-10-16T14:20:03Z,mtusi-messenger-lab3-postgres-1,45.37%,308.8MiB / 384MiB +2026-10-16T14:20:03Z,mtusi-messenger-lab3-redis-1,0.22%,6.289MiB / 192MiB diff --git a/evidence/track1/superseded/run1-wrong-budgets/stats-pool10.csv b/evidence/track1/superseded/run1-wrong-budgets/stats-pool10.csv new file mode 100644 index 00000000..e28c3a61 --- /dev/null +++ b/evidence/track1/superseded/run1-wrong-budgets/stats-pool10.csv @@ -0,0 +1,137 @@ +timestamp,container,cpu_percent,mem_usage +2026-10-16T14:20:22Z,mtusi-messenger-lab3-api-1,11.69%,10.29MiB / 192MiB +2026-10-16T14:20:22Z,mtusi-messenger-lab3-api-4,12.38%,144.1MiB / 192MiB +2026-10-16T14:20:22Z,mtusi-messenger-lab3-api-3,11.03%,144.7MiB / 192MiB +2026-10-16T14:20:22Z,mtusi-messenger-lab3-api-2,11.07%,8.109MiB / 192MiB +2026-10-16T14:20:22Z,mtusi-messenger-lab3-lb-1,0.22%,13.07MiB / 64MiB +2026-10-16T14:20:22Z,mtusi-messenger-lab3-postgres-1,49.53%,317.8MiB / 384MiB +2026-10-16T14:20:22Z,mtusi-messenger-lab3-redis-1,0.23%,6.297MiB / 192MiB +2026-10-16T14:20:25Z,mtusi-messenger-lab3-api-1,11.18%,10.32MiB / 192MiB +2026-10-16T14:20:25Z,mtusi-messenger-lab3-api-4,11.12%,171.1MiB / 192MiB +2026-10-16T14:20:25Z,mtusi-messenger-lab3-api-3,11.35%,171.2MiB / 192MiB +2026-10-16T14:20:25Z,mtusi-messenger-lab3-api-2,11.68%,8.109MiB / 192MiB +2026-10-16T14:20:25Z,mtusi-messenger-lab3-lb-1,14.94%,13.13MiB / 64MiB +2026-10-16T14:20:25Z,mtusi-messenger-lab3-postgres-1,49.28%,318.6MiB / 384MiB +2026-10-16T14:20:25Z,mtusi-messenger-lab3-redis-1,0.23%,6.297MiB / 192MiB +2026-10-16T14:20:28Z,mtusi-messenger-lab3-api-1,12.12%,10.5MiB / 192MiB +2026-10-16T14:20:28Z,mtusi-messenger-lab3-api-2,12.46%,7.996MiB / 192MiB +2026-10-16T14:20:28Z,mtusi-messenger-lab3-lb-1,12.62%,13.12MiB / 64MiB +2026-10-16T14:20:28Z,mtusi-messenger-lab3-postgres-1,37.86%,307.3MiB / 384MiB +2026-10-16T14:20:28Z,mtusi-messenger-lab3-redis-1,0.21%,6.297MiB / 192MiB +2026-10-16T14:20:28Z,mtusi-messenger-lab3-api-3,5.07%,7.156MiB / 192MiB +2026-10-16T14:20:28Z,mtusi-messenger-lab3-api-4,4.56%,6.973MiB / 192MiB +2026-10-16T14:20:33Z,mtusi-messenger-lab3-api-1,11.23%,10.55MiB / 192MiB +2026-10-16T14:20:33Z,mtusi-messenger-lab3-api-4,11.62%,7.871MiB / 192MiB +2026-10-16T14:20:33Z,mtusi-messenger-lab3-api-3,11.03%,7.93MiB / 192MiB +2026-10-16T14:20:33Z,mtusi-messenger-lab3-api-2,11.67%,8.086MiB / 192MiB +2026-10-16T14:20:33Z,mtusi-messenger-lab3-lb-1,14.65%,13.12MiB / 64MiB +2026-10-16T14:20:33Z,mtusi-messenger-lab3-postgres-1,50.84%,321.6MiB / 384MiB +2026-10-16T14:20:33Z,mtusi-messenger-lab3-redis-1,0.22%,6.297MiB / 192MiB +2026-10-16T14:20:36Z,mtusi-messenger-lab3-api-1,11.70%,10.55MiB / 192MiB +2026-10-16T14:20:36Z,mtusi-messenger-lab3-api-4,10.65%,8.129MiB / 192MiB +2026-10-16T14:20:36Z,mtusi-messenger-lab3-api-3,11.47%,7.965MiB / 192MiB +2026-10-16T14:20:36Z,mtusi-messenger-lab3-api-2,11.14%,7.914MiB / 192MiB +2026-10-16T14:20:36Z,mtusi-messenger-lab3-lb-1,15.01%,13.13MiB / 64MiB +2026-10-16T14:20:36Z,mtusi-messenger-lab3-postgres-1,49.83%,322.5MiB / 384MiB +2026-10-16T14:20:36Z,mtusi-messenger-lab3-redis-1,0.22%,6.297MiB / 192MiB +2026-10-16T14:20:39Z,mtusi-messenger-lab3-api-1,12.07%,10.43MiB / 192MiB +2026-10-16T14:20:39Z,mtusi-messenger-lab3-api-4,11.05%,8.391MiB / 192MiB +2026-10-16T14:20:39Z,mtusi-messenger-lab3-api-3,11.02%,8.023MiB / 192MiB +2026-10-16T14:20:39Z,mtusi-messenger-lab3-api-2,10.99%,7.918MiB / 192MiB +2026-10-16T14:20:39Z,mtusi-messenger-lab3-lb-1,14.88%,13.12MiB / 64MiB +2026-10-16T14:20:39Z,mtusi-messenger-lab3-postgres-1,49.28%,322.6MiB / 384MiB +2026-10-16T14:20:39Z,mtusi-messenger-lab3-redis-1,0.24%,6.297MiB / 192MiB +2026-10-16T14:20:42Z,mtusi-messenger-lab3-api-1,11.41%,10.56MiB / 192MiB +2026-10-16T14:20:42Z,mtusi-messenger-lab3-api-4,11.05%,8.145MiB / 192MiB +2026-10-16T14:20:42Z,mtusi-messenger-lab3-api-3,11.23%,8.039MiB / 192MiB +2026-10-16T14:20:42Z,mtusi-messenger-lab3-api-2,11.45%,8.066MiB / 192MiB +2026-10-16T14:20:42Z,mtusi-messenger-lab3-lb-1,15.58%,13.14MiB / 64MiB +2026-10-16T14:20:42Z,mtusi-messenger-lab3-postgres-1,49.83%,325.2MiB / 384MiB +2026-10-16T14:20:42Z,mtusi-messenger-lab3-redis-1,0.21%,6.297MiB / 192MiB +2026-10-16T14:20:45Z,mtusi-messenger-lab3-api-1,10.95%,10.59MiB / 192MiB +2026-10-16T14:20:45Z,mtusi-messenger-lab3-api-4,11.07%,8.152MiB / 192MiB +2026-10-16T14:20:45Z,mtusi-messenger-lab3-api-3,11.31%,8.195MiB / 192MiB +2026-10-16T14:20:45Z,mtusi-messenger-lab3-api-2,11.84%,8.246MiB / 192MiB +2026-10-16T14:20:45Z,mtusi-messenger-lab3-lb-1,14.90%,13.11MiB / 64MiB +2026-10-16T14:20:45Z,mtusi-messenger-lab3-postgres-1,50.36%,337MiB / 384MiB +2026-10-16T14:20:45Z,mtusi-messenger-lab3-redis-1,0.22%,6.297MiB / 192MiB +2026-10-16T14:20:48Z,mtusi-messenger-lab3-api-1,11.59%,10.59MiB / 192MiB +2026-10-16T14:20:48Z,mtusi-messenger-lab3-api-4,11.54%,8.156MiB / 192MiB +2026-10-16T14:20:48Z,mtusi-messenger-lab3-api-3,11.87%,8.105MiB / 192MiB +2026-10-16T14:20:48Z,mtusi-messenger-lab3-api-2,11.50%,8.059MiB / 192MiB +2026-10-16T14:20:48Z,mtusi-messenger-lab3-lb-1,14.95%,13.14MiB / 64MiB +2026-10-16T14:20:48Z,mtusi-messenger-lab3-postgres-1,49.99%,337MiB / 384MiB +2026-10-16T14:20:48Z,mtusi-messenger-lab3-redis-1,0.22%,6.297MiB / 192MiB +2026-10-16T14:20:51Z,mtusi-messenger-lab3-api-1,11.46%,10.59MiB / 192MiB +2026-10-16T14:20:51Z,mtusi-messenger-lab3-api-4,10.91%,8.164MiB / 192MiB +2026-10-16T14:20:51Z,mtusi-messenger-lab3-api-3,11.63%,7.98MiB / 192MiB +2026-10-16T14:20:51Z,mtusi-messenger-lab3-api-2,11.78%,8.152MiB / 192MiB +2026-10-16T14:20:51Z,mtusi-messenger-lab3-lb-1,15.06%,13.12MiB / 64MiB +2026-10-16T14:20:51Z,mtusi-messenger-lab3-postgres-1,49.42%,337.4MiB / 384MiB +2026-10-16T14:20:51Z,mtusi-messenger-lab3-redis-1,0.23%,6.297MiB / 192MiB +2026-10-16T14:20:54Z,mtusi-messenger-lab3-api-1,11.60%,10.56MiB / 192MiB +2026-10-16T14:20:54Z,mtusi-messenger-lab3-api-4,11.98%,8.172MiB / 192MiB +2026-10-16T14:20:54Z,mtusi-messenger-lab3-api-3,10.85%,7.98MiB / 192MiB +2026-10-16T14:20:54Z,mtusi-messenger-lab3-api-2,11.20%,8.152MiB / 192MiB +2026-10-16T14:20:54Z,mtusi-messenger-lab3-lb-1,15.03%,13.14MiB / 64MiB +2026-10-16T14:20:54Z,mtusi-messenger-lab3-postgres-1,50.40%,322.9MiB / 384MiB +2026-10-16T14:20:54Z,mtusi-messenger-lab3-redis-1,0.24%,6.297MiB / 192MiB +2026-10-16T14:20:57Z,mtusi-messenger-lab3-api-1,11.62%,10.56MiB / 192MiB +2026-10-16T14:20:57Z,mtusi-messenger-lab3-api-4,11.65%,8.164MiB / 192MiB +2026-10-16T14:20:57Z,mtusi-messenger-lab3-api-3,11.68%,8.066MiB / 192MiB +2026-10-16T14:20:57Z,mtusi-messenger-lab3-api-2,11.40%,8.277MiB / 192MiB +2026-10-16T14:20:57Z,mtusi-messenger-lab3-lb-1,15.11%,13.15MiB / 64MiB +2026-10-16T14:20:57Z,mtusi-messenger-lab3-postgres-1,50.36%,322.7MiB / 384MiB +2026-10-16T14:20:57Z,mtusi-messenger-lab3-redis-1,0.24%,6.297MiB / 192MiB +2026-10-16T14:21:00Z,mtusi-messenger-lab3-api-1,11.72%,10.8MiB / 192MiB +2026-10-16T14:21:00Z,mtusi-messenger-lab3-api-4,11.67%,8.199MiB / 192MiB +2026-10-16T14:21:00Z,mtusi-messenger-lab3-api-3,11.02%,8.172MiB / 192MiB +2026-10-16T14:21:00Z,mtusi-messenger-lab3-api-2,11.06%,8.273MiB / 192MiB +2026-10-16T14:21:00Z,mtusi-messenger-lab3-lb-1,14.94%,13.14MiB / 64MiB +2026-10-16T14:21:00Z,mtusi-messenger-lab3-postgres-1,49.67%,322.9MiB / 384MiB +2026-10-16T14:21:00Z,mtusi-messenger-lab3-redis-1,0.74%,6.297MiB / 192MiB +2026-10-16T14:21:03Z,mtusi-messenger-lab3-api-1,10.97%,10.56MiB / 192MiB +2026-10-16T14:21:03Z,mtusi-messenger-lab3-api-4,10.95%,8.227MiB / 192MiB +2026-10-16T14:21:03Z,mtusi-messenger-lab3-api-3,11.52%,8.039MiB / 192MiB +2026-10-16T14:21:03Z,mtusi-messenger-lab3-api-2,11.06%,8.156MiB / 192MiB +2026-10-16T14:21:03Z,mtusi-messenger-lab3-lb-1,14.85%,13.11MiB / 64MiB +2026-10-16T14:21:03Z,mtusi-messenger-lab3-postgres-1,48.72%,323.2MiB / 384MiB +2026-10-16T14:21:03Z,mtusi-messenger-lab3-redis-1,0.22%,6.297MiB / 192MiB +2026-10-16T14:21:07Z,mtusi-messenger-lab3-api-1,11.35%,10.56MiB / 192MiB +2026-10-16T14:21:07Z,mtusi-messenger-lab3-api-4,11.26%,8.223MiB / 192MiB +2026-10-16T14:21:07Z,mtusi-messenger-lab3-api-3,11.11%,8.16MiB / 192MiB +2026-10-16T14:21:07Z,mtusi-messenger-lab3-api-2,11.82%,8.219MiB / 192MiB +2026-10-16T14:21:07Z,mtusi-messenger-lab3-lb-1,15.32%,13.13MiB / 64MiB +2026-10-16T14:21:07Z,mtusi-messenger-lab3-postgres-1,50.19%,323.6MiB / 384MiB +2026-10-16T14:21:07Z,mtusi-messenger-lab3-redis-1,0.70%,6.297MiB / 192MiB +2026-10-16T14:21:10Z,mtusi-messenger-lab3-api-1,11.44%,10.56MiB / 192MiB +2026-10-16T14:21:10Z,mtusi-messenger-lab3-api-4,11.25%,8.227MiB / 192MiB +2026-10-16T14:21:10Z,mtusi-messenger-lab3-api-3,10.86%,8.172MiB / 192MiB +2026-10-16T14:21:10Z,mtusi-messenger-lab3-api-2,11.62%,8.27MiB / 192MiB +2026-10-16T14:21:10Z,mtusi-messenger-lab3-lb-1,14.48%,13.12MiB / 64MiB +2026-10-16T14:21:10Z,mtusi-messenger-lab3-postgres-1,49.48%,323.7MiB / 384MiB +2026-10-16T14:21:10Z,mtusi-messenger-lab3-redis-1,0.22%,6.297MiB / 192MiB +2026-10-16T14:21:13Z,mtusi-messenger-lab3-api-1,11.79%,10.56MiB / 192MiB +2026-10-16T14:21:13Z,mtusi-messenger-lab3-api-4,11.36%,8.23MiB / 192MiB +2026-10-16T14:21:13Z,mtusi-messenger-lab3-api-3,10.80%,8.039MiB / 192MiB +2026-10-16T14:21:13Z,mtusi-messenger-lab3-api-2,11.34%,8.281MiB / 192MiB +2026-10-16T14:21:13Z,mtusi-messenger-lab3-lb-1,15.10%,13.12MiB / 64MiB +2026-10-16T14:21:13Z,mtusi-messenger-lab3-postgres-1,50.17%,323.8MiB / 384MiB +2026-10-16T14:21:13Z,mtusi-messenger-lab3-redis-1,0.22%,6.297MiB / 192MiB +2026-10-16T14:21:16Z,mtusi-messenger-lab3-api-1,11.06%,10.56MiB / 192MiB +2026-10-16T14:21:16Z,mtusi-messenger-lab3-api-4,11.63%,8.191MiB / 192MiB +2026-10-16T14:21:16Z,mtusi-messenger-lab3-api-3,11.32%,8.168MiB / 192MiB +2026-10-16T14:21:16Z,mtusi-messenger-lab3-api-2,11.19%,8.273MiB / 192MiB +2026-10-16T14:21:16Z,mtusi-messenger-lab3-lb-1,14.70%,13.12MiB / 64MiB +2026-10-16T14:21:16Z,mtusi-messenger-lab3-postgres-1,48.53%,323.9MiB / 384MiB +2026-10-16T14:21:16Z,mtusi-messenger-lab3-redis-1,0.69%,6.293MiB / 192MiB +2026-10-16T14:21:19Z,mtusi-messenger-lab3-api-1,11.02%,10.56MiB / 192MiB +2026-10-16T14:21:19Z,mtusi-messenger-lab3-api-4,11.65%,8.02MiB / 192MiB +2026-10-16T14:21:19Z,mtusi-messenger-lab3-api-3,11.41%,8.043MiB / 192MiB +2026-10-16T14:21:19Z,mtusi-messenger-lab3-api-2,11.47%,8.16MiB / 192MiB +2026-10-16T14:21:19Z,mtusi-messenger-lab3-lb-1,15.42%,13.12MiB / 64MiB +2026-10-16T14:21:19Z,mtusi-messenger-lab3-postgres-1,50.02%,324MiB / 384MiB +2026-10-16T14:21:19Z,mtusi-messenger-lab3-redis-1,0.24%,6.293MiB / 192MiB +2026-10-16T14:21:22Z,mtusi-messenger-lab3-lb-1,4.33%,13.03MiB / 64MiB +2026-10-16T14:21:22Z,mtusi-messenger-lab3-postgres-1,37.32%,285.3MiB / 384MiB +2026-10-16T14:21:22Z,mtusi-messenger-lab3-redis-1,0.68%,6.293MiB / 192MiB diff --git a/evidence/track1/superseded/run1-wrong-budgets/stats-pool5.csv b/evidence/track1/superseded/run1-wrong-budgets/stats-pool5.csv new file mode 100644 index 00000000..a2cb6478 --- /dev/null +++ b/evidence/track1/superseded/run1-wrong-budgets/stats-pool5.csv @@ -0,0 +1,141 @@ +timestamp,container,cpu_percent,mem_usage +2026-10-16T14:21:41Z,mtusi-messenger-lab3-api-3,8.75%,136.5MiB / 192MiB +2026-10-16T14:21:41Z,mtusi-messenger-lab3-api-2,9.53%,142.8MiB / 192MiB +2026-10-16T14:21:41Z,mtusi-messenger-lab3-api-4,9.25%,78.34MiB / 192MiB +2026-10-16T14:21:41Z,mtusi-messenger-lab3-api-1,15.85%,78.51MiB / 192MiB +2026-10-16T14:21:41Z,mtusi-messenger-lab3-lb-1,12.37%,13.12MiB / 64MiB +2026-10-16T14:21:41Z,mtusi-messenger-lab3-postgres-1,39.89%,319.3MiB / 384MiB +2026-10-16T14:21:41Z,mtusi-messenger-lab3-redis-1,0.34%,6.293MiB / 192MiB +2026-10-16T14:21:44Z,mtusi-messenger-lab3-api-3,11.46%,136.9MiB / 192MiB +2026-10-16T14:21:44Z,mtusi-messenger-lab3-api-2,11.52%,168.8MiB / 192MiB +2026-10-16T14:21:44Z,mtusi-messenger-lab3-api-4,11.69%,104.4MiB / 192MiB +2026-10-16T14:21:44Z,mtusi-messenger-lab3-api-1,10.95%,103.8MiB / 192MiB +2026-10-16T14:21:44Z,mtusi-messenger-lab3-lb-1,15.50%,13.13MiB / 64MiB +2026-10-16T14:21:44Z,mtusi-messenger-lab3-postgres-1,50.48%,319.9MiB / 384MiB +2026-10-16T14:21:44Z,mtusi-messenger-lab3-redis-1,0.23%,6.293MiB / 192MiB +2026-10-16T14:21:47Z,mtusi-messenger-lab3-api-3,9.40%,137.6MiB / 192MiB +2026-10-16T14:21:47Z,mtusi-messenger-lab3-api-2,10.02%,191.3MiB / 192MiB +2026-10-16T14:21:47Z,mtusi-messenger-lab3-api-4,10.51%,127.2MiB / 192MiB +2026-10-16T14:21:47Z,mtusi-messenger-lab3-api-1,9.98%,126MiB / 192MiB +2026-10-16T14:21:47Z,mtusi-messenger-lab3-lb-1,13.14%,13.14MiB / 64MiB +2026-10-16T14:21:47Z,mtusi-messenger-lab3-postgres-1,49.32%,321MiB / 384MiB +2026-10-16T14:21:47Z,mtusi-messenger-lab3-redis-1,0.90%,6.293MiB / 192MiB +2026-10-16T14:21:50Z,mtusi-messenger-lab3-api-3,9.62%,13.63MiB / 192MiB +2026-10-16T14:21:50Z,mtusi-messenger-lab3-api-2,8.82%,7.617MiB / 192MiB +2026-10-16T14:21:50Z,mtusi-messenger-lab3-api-4,9.77%,10.69MiB / 192MiB +2026-10-16T14:21:50Z,mtusi-messenger-lab3-api-1,10.06%,11.79MiB / 192MiB +2026-10-16T14:21:50Z,mtusi-messenger-lab3-lb-1,13.01%,13.13MiB / 64MiB +2026-10-16T14:21:50Z,mtusi-messenger-lab3-postgres-1,50.46%,327.4MiB / 384MiB +2026-10-16T14:21:50Z,mtusi-messenger-lab3-redis-1,0.23%,6.293MiB / 192MiB +2026-10-16T14:21:54Z,mtusi-messenger-lab3-api-3,8.26%,14.18MiB / 192MiB +2026-10-16T14:21:54Z,mtusi-messenger-lab3-api-2,9.00%,7.98MiB / 192MiB +2026-10-16T14:21:54Z,mtusi-messenger-lab3-api-4,7.52%,10.63MiB / 192MiB +2026-10-16T14:21:54Z,mtusi-messenger-lab3-api-1,8.35%,11.36MiB / 192MiB +2026-10-16T14:21:54Z,mtusi-messenger-lab3-lb-1,11.11%,13.13MiB / 64MiB +2026-10-16T14:21:54Z,mtusi-messenger-lab3-postgres-1,50.25%,330.1MiB / 384MiB +2026-10-16T14:21:54Z,mtusi-messenger-lab3-redis-1,0.23%,6.293MiB / 192MiB +2026-10-16T14:21:57Z,mtusi-messenger-lab3-api-3,11.09%,13.86MiB / 192MiB +2026-10-16T14:21:57Z,mtusi-messenger-lab3-api-2,11.17%,8.016MiB / 192MiB +2026-10-16T14:21:57Z,mtusi-messenger-lab3-api-4,11.23%,10.56MiB / 192MiB +2026-10-16T14:21:57Z,mtusi-messenger-lab3-api-1,10.76%,11.33MiB / 192MiB +2026-10-16T14:21:57Z,mtusi-messenger-lab3-lb-1,14.26%,13.12MiB / 64MiB +2026-10-16T14:21:57Z,mtusi-messenger-lab3-postgres-1,49.88%,332MiB / 384MiB +2026-10-16T14:21:57Z,mtusi-messenger-lab3-redis-1,0.23%,6.293MiB / 192MiB +2026-10-16T14:22:00Z,mtusi-messenger-lab3-api-3,11.48%,13.18MiB / 192MiB +2026-10-16T14:22:00Z,mtusi-messenger-lab3-api-2,10.83%,8.223MiB / 192MiB +2026-10-16T14:22:00Z,mtusi-messenger-lab3-api-4,11.31%,10.62MiB / 192MiB +2026-10-16T14:22:00Z,mtusi-messenger-lab3-api-1,11.62%,11.27MiB / 192MiB +2026-10-16T14:22:00Z,mtusi-messenger-lab3-lb-1,14.98%,13.12MiB / 64MiB +2026-10-16T14:22:00Z,mtusi-messenger-lab3-postgres-1,49.69%,335.2MiB / 384MiB +2026-10-16T14:22:00Z,mtusi-messenger-lab3-redis-1,0.23%,6.293MiB / 192MiB +2026-10-16T14:22:03Z,mtusi-messenger-lab3-api-3,11.53%,12.96MiB / 192MiB +2026-10-16T14:22:03Z,mtusi-messenger-lab3-api-2,11.62%,8.094MiB / 192MiB +2026-10-16T14:22:03Z,mtusi-messenger-lab3-api-4,11.20%,10.56MiB / 192MiB +2026-10-16T14:22:03Z,mtusi-messenger-lab3-api-1,11.88%,11.67MiB / 192MiB +2026-10-16T14:22:03Z,mtusi-messenger-lab3-lb-1,14.86%,13.13MiB / 64MiB +2026-10-16T14:22:03Z,mtusi-messenger-lab3-postgres-1,49.00%,335.7MiB / 384MiB +2026-10-16T14:22:03Z,mtusi-messenger-lab3-redis-1,0.22%,6.293MiB / 192MiB +2026-10-16T14:22:06Z,mtusi-messenger-lab3-api-3,11.21%,12.97MiB / 192MiB +2026-10-16T14:22:06Z,mtusi-messenger-lab3-api-2,10.96%,8.246MiB / 192MiB +2026-10-16T14:22:06Z,mtusi-messenger-lab3-api-4,10.52%,10.67MiB / 192MiB +2026-10-16T14:22:06Z,mtusi-messenger-lab3-api-1,10.90%,11.13MiB / 192MiB +2026-10-16T14:22:06Z,mtusi-messenger-lab3-lb-1,14.37%,13.13MiB / 64MiB +2026-10-16T14:22:06Z,mtusi-messenger-lab3-postgres-1,48.07%,330.7MiB / 384MiB +2026-10-16T14:22:06Z,mtusi-messenger-lab3-redis-1,0.25%,6.293MiB / 192MiB +2026-10-16T14:22:09Z,mtusi-messenger-lab3-api-3,11.81%,13.76MiB / 192MiB +2026-10-16T14:22:09Z,mtusi-messenger-lab3-api-2,10.98%,8.234MiB / 192MiB +2026-10-16T14:22:09Z,mtusi-messenger-lab3-api-4,11.31%,10.62MiB / 192MiB +2026-10-16T14:22:09Z,mtusi-messenger-lab3-api-1,11.25%,11.29MiB / 192MiB +2026-10-16T14:22:09Z,mtusi-messenger-lab3-lb-1,14.92%,13.12MiB / 64MiB +2026-10-16T14:22:09Z,mtusi-messenger-lab3-postgres-1,50.27%,330.7MiB / 384MiB +2026-10-16T14:22:09Z,mtusi-messenger-lab3-redis-1,0.22%,6.293MiB / 192MiB +2026-10-16T14:22:12Z,mtusi-messenger-lab3-api-3,11.67%,14.15MiB / 192MiB +2026-10-16T14:22:12Z,mtusi-messenger-lab3-api-2,11.52%,8.23MiB / 192MiB +2026-10-16T14:22:12Z,mtusi-messenger-lab3-api-4,11.05%,10.63MiB / 192MiB +2026-10-16T14:22:12Z,mtusi-messenger-lab3-api-1,11.42%,11.45MiB / 192MiB +2026-10-16T14:22:12Z,mtusi-messenger-lab3-lb-1,14.85%,13.12MiB / 64MiB +2026-10-16T14:22:12Z,mtusi-messenger-lab3-postgres-1,49.68%,330.8MiB / 384MiB +2026-10-16T14:22:12Z,mtusi-messenger-lab3-redis-1,0.67%,6.293MiB / 192MiB +2026-10-16T14:22:15Z,mtusi-messenger-lab3-api-3,10.56%,13.84MiB / 192MiB +2026-10-16T14:22:15Z,mtusi-messenger-lab3-api-2,10.53%,8.113MiB / 192MiB +2026-10-16T14:22:15Z,mtusi-messenger-lab3-api-4,11.45%,10.55MiB / 192MiB +2026-10-16T14:22:15Z,mtusi-messenger-lab3-api-1,10.96%,11.77MiB / 192MiB +2026-10-16T14:22:15Z,mtusi-messenger-lab3-lb-1,14.46%,13.12MiB / 64MiB +2026-10-16T14:22:15Z,mtusi-messenger-lab3-postgres-1,49.01%,330.8MiB / 384MiB +2026-10-16T14:22:15Z,mtusi-messenger-lab3-redis-1,0.21%,6.293MiB / 192MiB +2026-10-16T14:22:18Z,mtusi-messenger-lab3-api-3,12.23%,13.79MiB / 192MiB +2026-10-16T14:22:18Z,mtusi-messenger-lab3-api-2,11.14%,8.113MiB / 192MiB +2026-10-16T14:22:18Z,mtusi-messenger-lab3-api-4,11.57%,10.59MiB / 192MiB +2026-10-16T14:22:18Z,mtusi-messenger-lab3-api-1,11.67%,11.12MiB / 192MiB +2026-10-16T14:22:18Z,mtusi-messenger-lab3-lb-1,14.67%,13.14MiB / 64MiB +2026-10-16T14:22:18Z,mtusi-messenger-lab3-postgres-1,49.35%,330.9MiB / 384MiB +2026-10-16T14:22:18Z,mtusi-messenger-lab3-redis-1,0.25%,6.293MiB / 192MiB +2026-10-16T14:22:21Z,mtusi-messenger-lab3-api-3,11.89%,13.62MiB / 192MiB +2026-10-16T14:22:21Z,mtusi-messenger-lab3-api-2,11.52%,8.105MiB / 192MiB +2026-10-16T14:22:21Z,mtusi-messenger-lab3-api-4,11.64%,10.61MiB / 192MiB +2026-10-16T14:22:21Z,mtusi-messenger-lab3-api-1,11.27%,11.11MiB / 192MiB +2026-10-16T14:22:21Z,mtusi-messenger-lab3-lb-1,14.77%,13.09MiB / 64MiB +2026-10-16T14:22:21Z,mtusi-messenger-lab3-postgres-1,49.41%,330.9MiB / 384MiB +2026-10-16T14:22:21Z,mtusi-messenger-lab3-redis-1,0.76%,6.293MiB / 192MiB +2026-10-16T14:22:24Z,mtusi-messenger-lab3-api-3,11.08%,14.01MiB / 192MiB +2026-10-16T14:22:24Z,mtusi-messenger-lab3-api-2,10.75%,8.52MiB / 192MiB +2026-10-16T14:22:24Z,mtusi-messenger-lab3-api-4,11.17%,10.62MiB / 192MiB +2026-10-16T14:22:24Z,mtusi-messenger-lab3-api-1,12.34%,11.2MiB / 192MiB +2026-10-16T14:22:24Z,mtusi-messenger-lab3-lb-1,14.89%,13.13MiB / 64MiB +2026-10-16T14:22:24Z,mtusi-messenger-lab3-postgres-1,49.88%,330.9MiB / 384MiB +2026-10-16T14:22:24Z,mtusi-messenger-lab3-redis-1,0.22%,6.293MiB / 192MiB +2026-10-16T14:22:27Z,mtusi-messenger-lab3-api-3,11.38%,13.76MiB / 192MiB +2026-10-16T14:22:27Z,mtusi-messenger-lab3-api-2,11.53%,8.305MiB / 192MiB +2026-10-16T14:22:27Z,mtusi-messenger-lab3-api-4,11.26%,10.61MiB / 192MiB +2026-10-16T14:22:27Z,mtusi-messenger-lab3-api-1,11.58%,11.3MiB / 192MiB +2026-10-16T14:22:27Z,mtusi-messenger-lab3-lb-1,15.19%,13.12MiB / 64MiB +2026-10-16T14:22:27Z,mtusi-messenger-lab3-postgres-1,50.06%,330.9MiB / 384MiB +2026-10-16T14:22:27Z,mtusi-messenger-lab3-redis-1,0.71%,6.293MiB / 192MiB +2026-10-16T14:22:31Z,mtusi-messenger-lab3-api-3,11.66%,13.88MiB / 192MiB +2026-10-16T14:22:31Z,mtusi-messenger-lab3-api-2,11.17%,8.305MiB / 192MiB +2026-10-16T14:22:31Z,mtusi-messenger-lab3-api-4,11.37%,10.61MiB / 192MiB +2026-10-16T14:22:31Z,mtusi-messenger-lab3-api-1,11.04%,11.11MiB / 192MiB +2026-10-16T14:22:31Z,mtusi-messenger-lab3-lb-1,15.20%,13.13MiB / 64MiB +2026-10-16T14:22:31Z,mtusi-messenger-lab3-postgres-1,50.03%,330.9MiB / 384MiB +2026-10-16T14:22:31Z,mtusi-messenger-lab3-redis-1,0.27%,6.293MiB / 192MiB +2026-10-16T14:22:34Z,mtusi-messenger-lab3-api-3,11.15%,13.77MiB / 192MiB +2026-10-16T14:22:34Z,mtusi-messenger-lab3-api-2,11.95%,8.305MiB / 192MiB +2026-10-16T14:22:34Z,mtusi-messenger-lab3-api-4,11.55%,10.62MiB / 192MiB +2026-10-16T14:22:34Z,mtusi-messenger-lab3-api-1,11.35%,11.47MiB / 192MiB +2026-10-16T14:22:34Z,mtusi-messenger-lab3-lb-1,14.79%,13.13MiB / 64MiB +2026-10-16T14:22:34Z,mtusi-messenger-lab3-postgres-1,50.14%,330.9MiB / 384MiB +2026-10-16T14:22:34Z,mtusi-messenger-lab3-redis-1,0.23%,6.293MiB / 192MiB +2026-10-16T14:22:37Z,mtusi-messenger-lab3-api-3,11.38%,13.73MiB / 192MiB +2026-10-16T14:22:37Z,mtusi-messenger-lab3-api-2,11.40%,8.305MiB / 192MiB +2026-10-16T14:22:37Z,mtusi-messenger-lab3-api-4,11.56%,10.61MiB / 192MiB +2026-10-16T14:22:37Z,mtusi-messenger-lab3-api-1,11.60%,11.41MiB / 192MiB +2026-10-16T14:22:37Z,mtusi-messenger-lab3-lb-1,15.12%,13.12MiB / 64MiB +2026-10-16T14:22:37Z,mtusi-messenger-lab3-postgres-1,49.26%,330.9MiB / 384MiB +2026-10-16T14:22:37Z,mtusi-messenger-lab3-redis-1,0.74%,6.293MiB / 192MiB +2026-10-16T14:22:40Z,mtusi-messenger-lab3-api-3,11.59%,13.3MiB / 192MiB +2026-10-16T14:22:40Z,mtusi-messenger-lab3-api-2,11.41%,8.309MiB / 192MiB +2026-10-16T14:22:40Z,mtusi-messenger-lab3-api-4,11.24%,10.61MiB / 192MiB +2026-10-16T14:22:40Z,mtusi-messenger-lab3-api-1,10.87%,11.18MiB / 192MiB +2026-10-16T14:22:40Z,mtusi-messenger-lab3-lb-1,14.79%,13.12MiB / 64MiB +2026-10-16T14:22:40Z,mtusi-messenger-lab3-postgres-1,49.86%,331MiB / 384MiB +2026-10-16T14:22:40Z,mtusi-messenger-lab3-redis-1,0.22%,6.293MiB / 192MiB diff --git a/evidence/track1/superseded/run1-wrong-budgets/stats-r1.csv b/evidence/track1/superseded/run1-wrong-budgets/stats-r1.csv new file mode 100644 index 00000000..5779807e --- /dev/null +++ b/evidence/track1/superseded/run1-wrong-budgets/stats-r1.csv @@ -0,0 +1,81 @@ +timestamp,container,cpu_percent,mem_usage +2026-10-16T14:12:34Z,mtusi-messenger-lab3-api-1,32.74%,198.7MiB / 768MiB +2026-10-16T14:12:34Z,mtusi-messenger-lab3-lb-1,11.77%,11.01MiB / 64MiB +2026-10-16T14:12:34Z,mtusi-messenger-lab3-postgres-1,50.98%,106.1MiB / 384MiB +2026-10-16T14:12:34Z,mtusi-messenger-lab3-redis-1,0.76%,6.586MiB / 192MiB +2026-10-16T14:12:37Z,mtusi-messenger-lab3-api-1,33.66%,15.4MiB / 768MiB +2026-10-16T14:12:37Z,mtusi-messenger-lab3-lb-1,14.75%,11.07MiB / 64MiB +2026-10-16T14:12:37Z,mtusi-messenger-lab3-postgres-1,51.20%,109MiB / 384MiB +2026-10-16T14:12:37Z,mtusi-messenger-lab3-redis-1,0.23%,6.586MiB / 192MiB +2026-10-16T14:12:40Z,mtusi-messenger-lab3-api-1,33.08%,15.4MiB / 768MiB +2026-10-16T14:12:40Z,mtusi-messenger-lab3-lb-1,14.49%,11.07MiB / 64MiB +2026-10-16T14:12:40Z,mtusi-messenger-lab3-postgres-1,51.05%,112MiB / 384MiB +2026-10-16T14:12:40Z,mtusi-messenger-lab3-redis-1,0.23%,6.586MiB / 192MiB +2026-10-16T14:12:43Z,mtusi-messenger-lab3-api-1,32.89%,15.52MiB / 768MiB +2026-10-16T14:12:43Z,mtusi-messenger-lab3-lb-1,14.20%,11.07MiB / 64MiB +2026-10-16T14:12:43Z,mtusi-messenger-lab3-postgres-1,50.82%,115.1MiB / 384MiB +2026-10-16T14:12:43Z,mtusi-messenger-lab3-redis-1,0.72%,6.586MiB / 192MiB +2026-10-16T14:12:46Z,mtusi-messenger-lab3-api-1,22.99%,15.57MiB / 768MiB +2026-10-16T14:12:46Z,mtusi-messenger-lab3-lb-1,9.59%,11.07MiB / 64MiB +2026-10-16T14:12:46Z,mtusi-messenger-lab3-postgres-1,50.66%,126.2MiB / 384MiB +2026-10-16T14:12:46Z,mtusi-messenger-lab3-redis-1,0.23%,6.586MiB / 192MiB +2026-10-16T14:12:49Z,mtusi-messenger-lab3-api-1,33.56%,15.51MiB / 768MiB +2026-10-16T14:12:49Z,mtusi-messenger-lab3-lb-1,14.89%,11.07MiB / 64MiB +2026-10-16T14:12:49Z,mtusi-messenger-lab3-postgres-1,51.26%,122.7MiB / 384MiB +2026-10-16T14:12:49Z,mtusi-messenger-lab3-redis-1,0.79%,6.586MiB / 192MiB +2026-10-16T14:12:52Z,mtusi-messenger-lab3-api-1,32.37%,15.52MiB / 768MiB +2026-10-16T14:12:52Z,mtusi-messenger-lab3-lb-1,13.89%,11.05MiB / 64MiB +2026-10-16T14:12:52Z,mtusi-messenger-lab3-postgres-1,51.56%,125.5MiB / 384MiB +2026-10-16T14:12:52Z,mtusi-messenger-lab3-redis-1,0.25%,6.586MiB / 192MiB +2026-10-16T14:12:55Z,mtusi-messenger-lab3-api-1,32.46%,15.52MiB / 768MiB +2026-10-16T14:12:55Z,mtusi-messenger-lab3-lb-1,14.56%,11.04MiB / 64MiB +2026-10-16T14:12:55Z,mtusi-messenger-lab3-postgres-1,51.06%,128.4MiB / 384MiB +2026-10-16T14:12:55Z,mtusi-messenger-lab3-redis-1,0.22%,6.586MiB / 192MiB +2026-10-16T14:12:58Z,mtusi-messenger-lab3-api-1,33.12%,15.57MiB / 768MiB +2026-10-16T14:12:58Z,mtusi-messenger-lab3-lb-1,14.57%,11.06MiB / 64MiB +2026-10-16T14:12:58Z,mtusi-messenger-lab3-postgres-1,50.34%,139.5MiB / 384MiB +2026-10-16T14:12:58Z,mtusi-messenger-lab3-redis-1,0.25%,6.586MiB / 192MiB +2026-10-16T14:13:01Z,mtusi-messenger-lab3-api-1,32.06%,15.82MiB / 768MiB +2026-10-16T14:13:01Z,mtusi-messenger-lab3-lb-1,14.18%,11.07MiB / 64MiB +2026-10-16T14:13:01Z,mtusi-messenger-lab3-postgres-1,49.27%,142.6MiB / 384MiB +2026-10-16T14:13:01Z,mtusi-messenger-lab3-redis-1,0.23%,6.586MiB / 192MiB +2026-10-16T14:13:04Z,mtusi-messenger-lab3-api-1,33.16%,15.56MiB / 768MiB +2026-10-16T14:13:04Z,mtusi-messenger-lab3-lb-1,14.07%,11.05MiB / 64MiB +2026-10-16T14:13:04Z,mtusi-messenger-lab3-postgres-1,49.42%,144.4MiB / 384MiB +2026-10-16T14:13:04Z,mtusi-messenger-lab3-redis-1,0.25%,6.586MiB / 192MiB +2026-10-16T14:13:07Z,mtusi-messenger-lab3-api-1,33.54%,15.54MiB / 768MiB +2026-10-16T14:13:07Z,mtusi-messenger-lab3-lb-1,14.34%,11.05MiB / 64MiB +2026-10-16T14:13:07Z,mtusi-messenger-lab3-postgres-1,50.96%,148MiB / 384MiB +2026-10-16T14:13:07Z,mtusi-messenger-lab3-redis-1,0.22%,6.586MiB / 192MiB +2026-10-16T14:13:10Z,mtusi-messenger-lab3-api-1,32.24%,15.54MiB / 768MiB +2026-10-16T14:13:10Z,mtusi-messenger-lab3-lb-1,13.94%,11.05MiB / 64MiB +2026-10-16T14:13:10Z,mtusi-messenger-lab3-postgres-1,50.75%,150.5MiB / 384MiB +2026-10-16T14:13:10Z,mtusi-messenger-lab3-redis-1,0.23%,6.586MiB / 192MiB +2026-10-16T14:13:13Z,mtusi-messenger-lab3-api-1,32.62%,15.51MiB / 768MiB +2026-10-16T14:13:13Z,mtusi-messenger-lab3-lb-1,14.23%,11.07MiB / 64MiB +2026-10-16T14:13:13Z,mtusi-messenger-lab3-postgres-1,50.81%,152.6MiB / 384MiB +2026-10-16T14:13:13Z,mtusi-messenger-lab3-redis-1,0.78%,6.586MiB / 192MiB +2026-10-16T14:13:16Z,mtusi-messenger-lab3-api-1,32.42%,15.59MiB / 768MiB +2026-10-16T14:13:16Z,mtusi-messenger-lab3-lb-1,14.22%,11.08MiB / 64MiB +2026-10-16T14:13:16Z,mtusi-messenger-lab3-postgres-1,50.73%,155.7MiB / 384MiB +2026-10-16T14:13:16Z,mtusi-messenger-lab3-redis-1,0.25%,6.586MiB / 192MiB +2026-10-16T14:13:19Z,mtusi-messenger-lab3-api-1,32.57%,15.57MiB / 768MiB +2026-10-16T14:13:19Z,mtusi-messenger-lab3-lb-1,14.45%,11.06MiB / 64MiB +2026-10-16T14:13:19Z,mtusi-messenger-lab3-postgres-1,50.45%,158.4MiB / 384MiB +2026-10-16T14:13:19Z,mtusi-messenger-lab3-redis-1,0.74%,6.586MiB / 192MiB +2026-10-16T14:13:22Z,mtusi-messenger-lab3-api-1,31.82%,15.58MiB / 768MiB +2026-10-16T14:13:22Z,mtusi-messenger-lab3-lb-1,14.21%,11.07MiB / 64MiB +2026-10-16T14:13:22Z,mtusi-messenger-lab3-postgres-1,49.57%,161.1MiB / 384MiB +2026-10-16T14:13:22Z,mtusi-messenger-lab3-redis-1,0.24%,6.586MiB / 192MiB +2026-10-16T14:13:26Z,mtusi-messenger-lab3-api-1,33.40%,15.62MiB / 768MiB +2026-10-16T14:13:26Z,mtusi-messenger-lab3-lb-1,15.05%,11.05MiB / 64MiB +2026-10-16T14:13:26Z,mtusi-messenger-lab3-postgres-1,49.75%,163.3MiB / 384MiB +2026-10-16T14:13:26Z,mtusi-messenger-lab3-redis-1,0.27%,6.586MiB / 192MiB +2026-10-16T14:13:29Z,mtusi-messenger-lab3-api-1,31.80%,15.66MiB / 768MiB +2026-10-16T14:13:29Z,mtusi-messenger-lab3-lb-1,14.22%,11.07MiB / 64MiB +2026-10-16T14:13:29Z,mtusi-messenger-lab3-postgres-1,50.65%,165.9MiB / 384MiB +2026-10-16T14:13:29Z,mtusi-messenger-lab3-redis-1,0.25%,6.711MiB / 192MiB +2026-10-16T14:13:32Z,mtusi-messenger-lab3-api-1,33.93%,15.82MiB / 768MiB +2026-10-16T14:13:32Z,mtusi-messenger-lab3-lb-1,14.70%,11.07MiB / 64MiB +2026-10-16T14:13:32Z,mtusi-messenger-lab3-postgres-1,50.69%,168.6MiB / 384MiB +2026-10-16T14:13:32Z,mtusi-messenger-lab3-redis-1,0.26%,6.711MiB / 192MiB diff --git a/evidence/track1/superseded/run1-wrong-budgets/stats-r2.csv b/evidence/track1/superseded/run1-wrong-budgets/stats-r2.csv new file mode 100644 index 00000000..c2eca6f1 --- /dev/null +++ b/evidence/track1/superseded/run1-wrong-budgets/stats-r2.csv @@ -0,0 +1,101 @@ +timestamp,container,cpu_percent,mem_usage +2026-10-16T14:13:50Z,mtusi-messenger-lab3-api-2,20.08%,162.4MiB / 384MiB +2026-10-16T14:13:50Z,mtusi-messenger-lab3-api-1,19.77%,162.5MiB / 384MiB +2026-10-16T14:13:50Z,mtusi-messenger-lab3-lb-1,15.68%,11.08MiB / 64MiB +2026-10-16T14:13:50Z,mtusi-messenger-lab3-postgres-1,50.89%,230.6MiB / 384MiB +2026-10-16T14:13:50Z,mtusi-messenger-lab3-redis-1,0.23%,6.715MiB / 192MiB +2026-10-16T14:13:53Z,mtusi-messenger-lab3-api-2,20.21%,195.2MiB / 384MiB +2026-10-16T14:13:53Z,mtusi-messenger-lab3-api-1,21.25%,14.04MiB / 384MiB +2026-10-16T14:13:53Z,mtusi-messenger-lab3-lb-1,15.36%,13.09MiB / 64MiB +2026-10-16T14:13:53Z,mtusi-messenger-lab3-postgres-1,50.03%,236.4MiB / 384MiB +2026-10-16T14:13:53Z,mtusi-messenger-lab3-redis-1,0.75%,6.289MiB / 192MiB +2026-10-16T14:13:56Z,mtusi-messenger-lab3-api-2,20.33%,11.11MiB / 384MiB +2026-10-16T14:13:56Z,mtusi-messenger-lab3-api-1,20.04%,14.42MiB / 384MiB +2026-10-16T14:13:56Z,mtusi-messenger-lab3-lb-1,15.72%,13.11MiB / 64MiB +2026-10-16T14:13:56Z,mtusi-messenger-lab3-postgres-1,50.21%,240.5MiB / 384MiB +2026-10-16T14:13:56Z,mtusi-messenger-lab3-redis-1,0.24%,6.289MiB / 192MiB +2026-10-16T14:13:59Z,mtusi-messenger-lab3-api-2,20.65%,13.14MiB / 384MiB +2026-10-16T14:13:59Z,mtusi-messenger-lab3-api-1,19.74%,14.37MiB / 384MiB +2026-10-16T14:13:59Z,mtusi-messenger-lab3-lb-1,15.27%,13.09MiB / 64MiB +2026-10-16T14:13:59Z,mtusi-messenger-lab3-postgres-1,50.67%,232.9MiB / 384MiB +2026-10-16T14:13:59Z,mtusi-messenger-lab3-redis-1,0.24%,6.289MiB / 192MiB +2026-10-16T14:14:02Z,mtusi-messenger-lab3-api-2,19.46%,13.22MiB / 384MiB +2026-10-16T14:14:02Z,mtusi-messenger-lab3-api-1,20.79%,13.88MiB / 384MiB +2026-10-16T14:14:02Z,mtusi-messenger-lab3-lb-1,15.35%,13.08MiB / 64MiB +2026-10-16T14:14:02Z,mtusi-messenger-lab3-postgres-1,49.48%,235.2MiB / 384MiB +2026-10-16T14:14:02Z,mtusi-messenger-lab3-redis-1,0.24%,6.289MiB / 192MiB +2026-10-16T14:14:05Z,mtusi-messenger-lab3-api-2,19.56%,13.03MiB / 384MiB +2026-10-16T14:14:05Z,mtusi-messenger-lab3-api-1,19.84%,14.45MiB / 384MiB +2026-10-16T14:14:05Z,mtusi-messenger-lab3-lb-1,15.18%,13.33MiB / 64MiB +2026-10-16T14:14:05Z,mtusi-messenger-lab3-postgres-1,49.93%,235.3MiB / 384MiB +2026-10-16T14:14:05Z,mtusi-messenger-lab3-redis-1,0.25%,6.289MiB / 192MiB +2026-10-16T14:14:08Z,mtusi-messenger-lab3-api-2,21.44%,13MiB / 384MiB +2026-10-16T14:14:08Z,mtusi-messenger-lab3-api-1,20.61%,14.43MiB / 384MiB +2026-10-16T14:14:08Z,mtusi-messenger-lab3-lb-1,15.37%,13.08MiB / 64MiB +2026-10-16T14:14:08Z,mtusi-messenger-lab3-postgres-1,49.82%,235.9MiB / 384MiB +2026-10-16T14:14:08Z,mtusi-messenger-lab3-redis-1,0.22%,6.289MiB / 192MiB +2026-10-16T14:14:12Z,mtusi-messenger-lab3-api-2,19.38%,13.05MiB / 384MiB +2026-10-16T14:14:12Z,mtusi-messenger-lab3-api-1,20.24%,14.04MiB / 384MiB +2026-10-16T14:14:12Z,mtusi-messenger-lab3-lb-1,15.38%,13.33MiB / 64MiB +2026-10-16T14:14:12Z,mtusi-messenger-lab3-postgres-1,50.67%,236.1MiB / 384MiB +2026-10-16T14:14:12Z,mtusi-messenger-lab3-redis-1,0.22%,6.289MiB / 192MiB +2026-10-16T14:14:15Z,mtusi-messenger-lab3-api-2,20.07%,12.96MiB / 384MiB +2026-10-16T14:14:15Z,mtusi-messenger-lab3-api-1,19.67%,14.73MiB / 384MiB +2026-10-16T14:14:15Z,mtusi-messenger-lab3-lb-1,15.22%,13.09MiB / 64MiB +2026-10-16T14:14:15Z,mtusi-messenger-lab3-postgres-1,49.58%,236.2MiB / 384MiB +2026-10-16T14:14:15Z,mtusi-messenger-lab3-redis-1,0.21%,6.289MiB / 192MiB +2026-10-16T14:14:18Z,mtusi-messenger-lab3-api-2,20.92%,13.02MiB / 384MiB +2026-10-16T14:14:18Z,mtusi-messenger-lab3-api-1,20.75%,14.74MiB / 384MiB +2026-10-16T14:14:18Z,mtusi-messenger-lab3-lb-1,15.19%,13.09MiB / 64MiB +2026-10-16T14:14:18Z,mtusi-messenger-lab3-postgres-1,49.80%,236.8MiB / 384MiB +2026-10-16T14:14:18Z,mtusi-messenger-lab3-redis-1,0.22%,6.289MiB / 192MiB +2026-10-16T14:14:21Z,mtusi-messenger-lab3-api-2,20.85%,13.16MiB / 384MiB +2026-10-16T14:14:21Z,mtusi-messenger-lab3-api-1,20.08%,14.48MiB / 384MiB +2026-10-16T14:14:21Z,mtusi-messenger-lab3-lb-1,15.24%,13.1MiB / 64MiB +2026-10-16T14:14:21Z,mtusi-messenger-lab3-postgres-1,50.14%,237.3MiB / 384MiB +2026-10-16T14:14:21Z,mtusi-messenger-lab3-redis-1,0.24%,6.289MiB / 192MiB +2026-10-16T14:14:24Z,mtusi-messenger-lab3-api-2,20.58%,13.19MiB / 384MiB +2026-10-16T14:14:24Z,mtusi-messenger-lab3-api-1,19.75%,13.8MiB / 384MiB +2026-10-16T14:14:24Z,mtusi-messenger-lab3-lb-1,15.53%,13.09MiB / 64MiB +2026-10-16T14:14:24Z,mtusi-messenger-lab3-postgres-1,50.14%,237.2MiB / 384MiB +2026-10-16T14:14:24Z,mtusi-messenger-lab3-redis-1,0.22%,6.289MiB / 192MiB +2026-10-16T14:14:27Z,mtusi-messenger-lab3-api-2,20.52%,12.88MiB / 384MiB +2026-10-16T14:14:27Z,mtusi-messenger-lab3-api-1,20.06%,14.38MiB / 384MiB +2026-10-16T14:14:27Z,mtusi-messenger-lab3-lb-1,15.34%,13.09MiB / 64MiB +2026-10-16T14:14:27Z,mtusi-messenger-lab3-postgres-1,50.63%,238MiB / 384MiB +2026-10-16T14:14:27Z,mtusi-messenger-lab3-redis-1,0.23%,6.289MiB / 192MiB +2026-10-16T14:14:30Z,mtusi-messenger-lab3-api-2,20.82%,13.18MiB / 384MiB +2026-10-16T14:14:30Z,mtusi-messenger-lab3-api-1,20.80%,14.64MiB / 384MiB +2026-10-16T14:14:30Z,mtusi-messenger-lab3-lb-1,15.51%,13.11MiB / 64MiB +2026-10-16T14:14:30Z,mtusi-messenger-lab3-postgres-1,50.50%,237.8MiB / 384MiB +2026-10-16T14:14:30Z,mtusi-messenger-lab3-redis-1,0.25%,6.289MiB / 192MiB +2026-10-16T14:14:33Z,mtusi-messenger-lab3-api-2,20.03%,13.03MiB / 384MiB +2026-10-16T14:14:33Z,mtusi-messenger-lab3-api-1,20.43%,14.37MiB / 384MiB +2026-10-16T14:14:33Z,mtusi-messenger-lab3-lb-1,14.68%,13.1MiB / 64MiB +2026-10-16T14:14:33Z,mtusi-messenger-lab3-postgres-1,49.35%,237.8MiB / 384MiB +2026-10-16T14:14:33Z,mtusi-messenger-lab3-redis-1,0.22%,6.289MiB / 192MiB +2026-10-16T14:14:36Z,mtusi-messenger-lab3-api-2,20.67%,13.41MiB / 384MiB +2026-10-16T14:14:36Z,mtusi-messenger-lab3-api-1,20.32%,14.5MiB / 384MiB +2026-10-16T14:14:36Z,mtusi-messenger-lab3-lb-1,15.40%,13.09MiB / 64MiB +2026-10-16T14:14:36Z,mtusi-messenger-lab3-postgres-1,49.70%,238.2MiB / 384MiB +2026-10-16T14:14:36Z,mtusi-messenger-lab3-redis-1,0.25%,6.289MiB / 192MiB +2026-10-16T14:14:39Z,mtusi-messenger-lab3-api-2,20.33%,13.16MiB / 384MiB +2026-10-16T14:14:39Z,mtusi-messenger-lab3-api-1,19.97%,14.35MiB / 384MiB +2026-10-16T14:14:39Z,mtusi-messenger-lab3-lb-1,15.47%,13.09MiB / 64MiB +2026-10-16T14:14:39Z,mtusi-messenger-lab3-postgres-1,50.78%,238.3MiB / 384MiB +2026-10-16T14:14:39Z,mtusi-messenger-lab3-redis-1,0.25%,6.289MiB / 192MiB +2026-10-16T14:14:42Z,mtusi-messenger-lab3-api-2,19.91%,13.19MiB / 384MiB +2026-10-16T14:14:42Z,mtusi-messenger-lab3-api-1,20.24%,14.25MiB / 384MiB +2026-10-16T14:14:42Z,mtusi-messenger-lab3-lb-1,15.05%,13.09MiB / 64MiB +2026-10-16T14:14:42Z,mtusi-messenger-lab3-postgres-1,50.54%,238.7MiB / 384MiB +2026-10-16T14:14:42Z,mtusi-messenger-lab3-redis-1,0.24%,6.289MiB / 192MiB +2026-10-16T14:14:45Z,mtusi-messenger-lab3-api-2,17.04%,13.13MiB / 384MiB +2026-10-16T14:14:45Z,mtusi-messenger-lab3-api-1,16.74%,14.36MiB / 384MiB +2026-10-16T14:14:45Z,mtusi-messenger-lab3-lb-1,12.77%,13.09MiB / 64MiB +2026-10-16T14:14:45Z,mtusi-messenger-lab3-postgres-1,49.53%,247.4MiB / 384MiB +2026-10-16T14:14:45Z,mtusi-messenger-lab3-redis-1,0.24%,6.289MiB / 192MiB +2026-10-16T14:14:48Z,mtusi-messenger-lab3-api-2,19.78%,13.09MiB / 384MiB +2026-10-16T14:14:48Z,mtusi-messenger-lab3-api-1,19.66%,14.34MiB / 384MiB +2026-10-16T14:14:48Z,mtusi-messenger-lab3-lb-1,14.56%,13.04MiB / 64MiB +2026-10-16T14:14:48Z,mtusi-messenger-lab3-postgres-1,47.34%,236.9MiB / 384MiB +2026-10-16T14:14:48Z,mtusi-messenger-lab3-redis-1,0.23%,6.289MiB / 192MiB diff --git a/evidence/track1/superseded/run1-wrong-budgets/stats-r4.csv b/evidence/track1/superseded/run1-wrong-budgets/stats-r4.csv new file mode 100644 index 00000000..a94b4221 --- /dev/null +++ b/evidence/track1/superseded/run1-wrong-budgets/stats-r4.csv @@ -0,0 +1,141 @@ +timestamp,container,cpu_percent,mem_usage +2026-10-16T14:15:08Z,mtusi-messenger-lab3-api-1,10.59%,79.44MiB / 192MiB +2026-10-16T14:15:08Z,mtusi-messenger-lab3-api-2,10.88%,143.2MiB / 192MiB +2026-10-16T14:15:08Z,mtusi-messenger-lab3-api-3,11.78%,143.4MiB / 192MiB +2026-10-16T14:15:08Z,mtusi-messenger-lab3-api-4,11.04%,77.16MiB / 192MiB +2026-10-16T14:15:08Z,mtusi-messenger-lab3-lb-1,14.81%,13.11MiB / 64MiB +2026-10-16T14:15:08Z,mtusi-messenger-lab3-postgres-1,46.14%,307.7MiB / 384MiB +2026-10-16T14:15:08Z,mtusi-messenger-lab3-redis-1,0.27%,6.293MiB / 192MiB +2026-10-16T14:15:11Z,mtusi-messenger-lab3-api-1,11.90%,102.7MiB / 192MiB +2026-10-16T14:15:11Z,mtusi-messenger-lab3-api-2,11.46%,166.1MiB / 192MiB +2026-10-16T14:15:11Z,mtusi-messenger-lab3-api-3,11.71%,158.9MiB / 192MiB +2026-10-16T14:15:11Z,mtusi-messenger-lab3-api-4,11.77%,101MiB / 192MiB +2026-10-16T14:15:11Z,mtusi-messenger-lab3-lb-1,15.67%,13.11MiB / 64MiB +2026-10-16T14:15:11Z,mtusi-messenger-lab3-postgres-1,48.22%,198.6MiB / 384MiB +2026-10-16T14:15:11Z,mtusi-messenger-lab3-redis-1,0.27%,6.293MiB / 192MiB +2026-10-16T14:15:14Z,mtusi-messenger-lab3-api-1,11.72%,125.9MiB / 192MiB +2026-10-16T14:15:14Z,mtusi-messenger-lab3-api-2,12.03%,189.6MiB / 192MiB +2026-10-16T14:15:14Z,mtusi-messenger-lab3-api-3,11.46%,189.9MiB / 192MiB +2026-10-16T14:15:14Z,mtusi-messenger-lab3-api-4,12.04%,125MiB / 192MiB +2026-10-16T14:15:14Z,mtusi-messenger-lab3-lb-1,15.60%,13.11MiB / 64MiB +2026-10-16T14:15:14Z,mtusi-messenger-lab3-postgres-1,49.66%,199.1MiB / 384MiB +2026-10-16T14:15:14Z,mtusi-messenger-lab3-redis-1,0.85%,6.293MiB / 192MiB +2026-10-16T14:15:17Z,mtusi-messenger-lab3-api-1,11.56%,11.51MiB / 192MiB +2026-10-16T14:15:17Z,mtusi-messenger-lab3-api-2,11.86%,7.742MiB / 192MiB +2026-10-16T14:15:17Z,mtusi-messenger-lab3-api-3,11.37%,7.895MiB / 192MiB +2026-10-16T14:15:17Z,mtusi-messenger-lab3-api-4,11.86%,10.71MiB / 192MiB +2026-10-16T14:15:17Z,mtusi-messenger-lab3-lb-1,15.61%,13.13MiB / 64MiB +2026-10-16T14:15:17Z,mtusi-messenger-lab3-postgres-1,50.01%,197.7MiB / 384MiB +2026-10-16T14:15:17Z,mtusi-messenger-lab3-redis-1,0.24%,6.293MiB / 192MiB +2026-10-16T14:15:20Z,mtusi-messenger-lab3-api-1,11.77%,11.32MiB / 192MiB +2026-10-16T14:15:20Z,mtusi-messenger-lab3-api-2,12.63%,7.957MiB / 192MiB +2026-10-16T14:15:20Z,mtusi-messenger-lab3-api-3,12.15%,7.953MiB / 192MiB +2026-10-16T14:15:20Z,mtusi-messenger-lab3-api-4,11.76%,10.74MiB / 192MiB +2026-10-16T14:15:20Z,mtusi-messenger-lab3-lb-1,15.78%,13.12MiB / 64MiB +2026-10-16T14:15:20Z,mtusi-messenger-lab3-postgres-1,49.82%,200.2MiB / 384MiB +2026-10-16T14:15:20Z,mtusi-messenger-lab3-redis-1,0.21%,6.293MiB / 192MiB +2026-10-16T14:15:23Z,mtusi-messenger-lab3-api-1,11.99%,11MiB / 192MiB +2026-10-16T14:15:23Z,mtusi-messenger-lab3-api-2,11.25%,8.031MiB / 192MiB +2026-10-16T14:15:23Z,mtusi-messenger-lab3-api-3,11.27%,7.984MiB / 192MiB +2026-10-16T14:15:23Z,mtusi-messenger-lab3-api-4,11.73%,10.57MiB / 192MiB +2026-10-16T14:15:23Z,mtusi-messenger-lab3-lb-1,14.70%,13.14MiB / 64MiB +2026-10-16T14:15:23Z,mtusi-messenger-lab3-postgres-1,50.04%,200.4MiB / 384MiB +2026-10-16T14:15:23Z,mtusi-messenger-lab3-redis-1,0.23%,6.293MiB / 192MiB +2026-10-16T14:15:26Z,mtusi-messenger-lab3-api-1,11.74%,11.08MiB / 192MiB +2026-10-16T14:15:26Z,mtusi-messenger-lab3-api-2,11.84%,8.047MiB / 192MiB +2026-10-16T14:15:26Z,mtusi-messenger-lab3-api-3,12.02%,7.949MiB / 192MiB +2026-10-16T14:15:26Z,mtusi-messenger-lab3-api-4,11.50%,10.59MiB / 192MiB +2026-10-16T14:15:26Z,mtusi-messenger-lab3-lb-1,15.92%,13.14MiB / 64MiB +2026-10-16T14:15:26Z,mtusi-messenger-lab3-postgres-1,50.17%,201.6MiB / 384MiB +2026-10-16T14:15:26Z,mtusi-messenger-lab3-redis-1,0.25%,6.293MiB / 192MiB +2026-10-16T14:15:29Z,mtusi-messenger-lab3-api-1,11.93%,11.28MiB / 192MiB +2026-10-16T14:15:29Z,mtusi-messenger-lab3-api-2,11.71%,8.121MiB / 192MiB +2026-10-16T14:15:29Z,mtusi-messenger-lab3-api-3,12.26%,8.164MiB / 192MiB +2026-10-16T14:15:29Z,mtusi-messenger-lab3-api-4,11.98%,10.48MiB / 192MiB +2026-10-16T14:15:29Z,mtusi-messenger-lab3-lb-1,16.06%,13.14MiB / 64MiB +2026-10-16T14:15:29Z,mtusi-messenger-lab3-postgres-1,50.21%,201.6MiB / 384MiB +2026-10-16T14:15:29Z,mtusi-messenger-lab3-redis-1,0.84%,6.293MiB / 192MiB +2026-10-16T14:15:33Z,mtusi-messenger-lab3-api-1,11.12%,11.39MiB / 192MiB +2026-10-16T14:15:33Z,mtusi-messenger-lab3-api-2,11.09%,7.988MiB / 192MiB +2026-10-16T14:15:33Z,mtusi-messenger-lab3-api-3,11.34%,8.078MiB / 192MiB +2026-10-16T14:15:33Z,mtusi-messenger-lab3-api-4,12.02%,10.54MiB / 192MiB +2026-10-16T14:15:33Z,mtusi-messenger-lab3-lb-1,15.50%,13.12MiB / 64MiB +2026-10-16T14:15:33Z,mtusi-messenger-lab3-postgres-1,50.63%,202.3MiB / 384MiB +2026-10-16T14:15:33Z,mtusi-messenger-lab3-redis-1,0.24%,6.293MiB / 192MiB +2026-10-16T14:15:36Z,mtusi-messenger-lab3-api-1,12.39%,11.24MiB / 192MiB +2026-10-16T14:15:36Z,mtusi-messenger-lab3-api-2,11.14%,8.051MiB / 192MiB +2026-10-16T14:15:36Z,mtusi-messenger-lab3-api-3,11.98%,8.086MiB / 192MiB +2026-10-16T14:15:36Z,mtusi-messenger-lab3-api-4,12.42%,10.59MiB / 192MiB +2026-10-16T14:15:36Z,mtusi-messenger-lab3-lb-1,15.56%,13.14MiB / 64MiB +2026-10-16T14:15:36Z,mtusi-messenger-lab3-postgres-1,49.70%,218.3MiB / 384MiB +2026-10-16T14:15:36Z,mtusi-messenger-lab3-redis-1,0.23%,6.293MiB / 192MiB +2026-10-16T14:15:39Z,mtusi-messenger-lab3-api-1,12.05%,11.16MiB / 192MiB +2026-10-16T14:15:39Z,mtusi-messenger-lab3-api-2,12.05%,8.051MiB / 192MiB +2026-10-16T14:15:39Z,mtusi-messenger-lab3-api-3,11.55%,8.137MiB / 192MiB +2026-10-16T14:15:39Z,mtusi-messenger-lab3-api-4,11.79%,10.61MiB / 192MiB +2026-10-16T14:15:39Z,mtusi-messenger-lab3-lb-1,15.81%,13.12MiB / 64MiB +2026-10-16T14:15:39Z,mtusi-messenger-lab3-postgres-1,49.95%,218.5MiB / 384MiB +2026-10-16T14:15:39Z,mtusi-messenger-lab3-redis-1,0.85%,6.293MiB / 192MiB +2026-10-16T14:15:42Z,mtusi-messenger-lab3-api-1,11.39%,11.18MiB / 192MiB +2026-10-16T14:15:42Z,mtusi-messenger-lab3-api-2,10.89%,8.059MiB / 192MiB +2026-10-16T14:15:42Z,mtusi-messenger-lab3-api-3,12.18%,8.035MiB / 192MiB +2026-10-16T14:15:42Z,mtusi-messenger-lab3-api-4,11.71%,10.61MiB / 192MiB +2026-10-16T14:15:42Z,mtusi-messenger-lab3-lb-1,15.14%,13.12MiB / 64MiB +2026-10-16T14:15:42Z,mtusi-messenger-lab3-postgres-1,49.42%,226.3MiB / 384MiB +2026-10-16T14:15:42Z,mtusi-messenger-lab3-redis-1,0.23%,6.293MiB / 192MiB +2026-10-16T14:15:45Z,mtusi-messenger-lab3-api-1,11.37%,11.24MiB / 192MiB +2026-10-16T14:15:45Z,mtusi-messenger-lab3-api-2,11.56%,8.086MiB / 192MiB +2026-10-16T14:15:45Z,mtusi-messenger-lab3-api-3,11.54%,7.969MiB / 192MiB +2026-10-16T14:15:45Z,mtusi-messenger-lab3-api-4,12.19%,10.61MiB / 192MiB +2026-10-16T14:15:45Z,mtusi-messenger-lab3-lb-1,15.53%,13.12MiB / 64MiB +2026-10-16T14:15:45Z,mtusi-messenger-lab3-postgres-1,50.54%,227.9MiB / 384MiB +2026-10-16T14:15:45Z,mtusi-messenger-lab3-redis-1,0.22%,6.293MiB / 192MiB +2026-10-16T14:15:48Z,mtusi-messenger-lab3-api-1,9.12%,11.23MiB / 192MiB +2026-10-16T14:15:48Z,mtusi-messenger-lab3-api-2,9.00%,8.145MiB / 192MiB +2026-10-16T14:15:48Z,mtusi-messenger-lab3-api-3,9.21%,7.961MiB / 192MiB +2026-10-16T14:15:48Z,mtusi-messenger-lab3-api-4,8.99%,10.54MiB / 192MiB +2026-10-16T14:15:48Z,mtusi-messenger-lab3-lb-1,11.68%,13.12MiB / 64MiB +2026-10-16T14:15:48Z,mtusi-messenger-lab3-postgres-1,50.19%,245.5MiB / 384MiB +2026-10-16T14:15:48Z,mtusi-messenger-lab3-redis-1,0.21%,6.293MiB / 192MiB +2026-10-16T14:15:51Z,mtusi-messenger-lab3-api-1,11.23%,11.11MiB / 192MiB +2026-10-16T14:15:51Z,mtusi-messenger-lab3-api-2,12.16%,8.086MiB / 192MiB +2026-10-16T14:15:51Z,mtusi-messenger-lab3-api-3,9.18%,7.973MiB / 192MiB +2026-10-16T14:15:51Z,mtusi-messenger-lab3-api-4,11.76%,10.51MiB / 192MiB +2026-10-16T14:15:51Z,mtusi-messenger-lab3-lb-1,15.52%,13.12MiB / 64MiB +2026-10-16T14:15:51Z,mtusi-messenger-lab3-postgres-1,49.99%,235.3MiB / 384MiB +2026-10-16T14:15:51Z,mtusi-messenger-lab3-redis-1,0.23%,6.293MiB / 192MiB +2026-10-16T14:15:54Z,mtusi-messenger-lab3-api-1,12.17%,11.16MiB / 192MiB +2026-10-16T14:15:54Z,mtusi-messenger-lab3-api-2,12.05%,8.078MiB / 192MiB +2026-10-16T14:15:54Z,mtusi-messenger-lab3-api-3,11.38%,8.008MiB / 192MiB +2026-10-16T14:15:54Z,mtusi-messenger-lab3-api-4,11.61%,10.58MiB / 192MiB +2026-10-16T14:15:54Z,mtusi-messenger-lab3-lb-1,15.84%,13.13MiB / 64MiB +2026-10-16T14:15:54Z,mtusi-messenger-lab3-postgres-1,50.16%,235.8MiB / 384MiB +2026-10-16T14:15:54Z,mtusi-messenger-lab3-redis-1,0.22%,6.293MiB / 192MiB +2026-10-16T14:15:57Z,mtusi-messenger-lab3-api-1,11.28%,11.16MiB / 192MiB +2026-10-16T14:15:57Z,mtusi-messenger-lab3-api-2,10.89%,8.152MiB / 192MiB +2026-10-16T14:15:57Z,mtusi-messenger-lab3-api-3,11.65%,8.027MiB / 192MiB +2026-10-16T14:15:57Z,mtusi-messenger-lab3-api-4,11.40%,10.39MiB / 192MiB +2026-10-16T14:15:57Z,mtusi-messenger-lab3-lb-1,15.10%,13.12MiB / 64MiB +2026-10-16T14:15:57Z,mtusi-messenger-lab3-postgres-1,49.98%,235.9MiB / 384MiB +2026-10-16T14:15:57Z,mtusi-messenger-lab3-redis-1,0.23%,6.293MiB / 192MiB +2026-10-16T14:16:00Z,mtusi-messenger-lab3-api-1,12.52%,11.19MiB / 192MiB +2026-10-16T14:16:00Z,mtusi-messenger-lab3-api-2,12.01%,8.027MiB / 192MiB +2026-10-16T14:16:00Z,mtusi-messenger-lab3-api-3,11.52%,8.262MiB / 192MiB +2026-10-16T14:16:00Z,mtusi-messenger-lab3-api-4,11.23%,10.39MiB / 192MiB +2026-10-16T14:16:00Z,mtusi-messenger-lab3-lb-1,15.56%,13.12MiB / 64MiB +2026-10-16T14:16:00Z,mtusi-messenger-lab3-postgres-1,49.54%,236MiB / 384MiB +2026-10-16T14:16:00Z,mtusi-messenger-lab3-redis-1,0.72%,6.293MiB / 192MiB +2026-10-16T14:16:03Z,mtusi-messenger-lab3-api-1,11.46%,11.2MiB / 192MiB +2026-10-16T14:16:03Z,mtusi-messenger-lab3-api-2,11.21%,8.125MiB / 192MiB +2026-10-16T14:16:03Z,mtusi-messenger-lab3-api-3,11.23%,8.148MiB / 192MiB +2026-10-16T14:16:03Z,mtusi-messenger-lab3-api-4,11.61%,10.36MiB / 192MiB +2026-10-16T14:16:03Z,mtusi-messenger-lab3-lb-1,15.56%,13.13MiB / 64MiB +2026-10-16T14:16:03Z,mtusi-messenger-lab3-postgres-1,50.05%,236.9MiB / 384MiB +2026-10-16T14:16:03Z,mtusi-messenger-lab3-redis-1,0.23%,6.293MiB / 192MiB +2026-10-16T14:16:07Z,mtusi-messenger-lab3-api-1,11.62%,11.23MiB / 192MiB +2026-10-16T14:16:07Z,mtusi-messenger-lab3-api-2,11.86%,8.137MiB / 192MiB +2026-10-16T14:16:07Z,mtusi-messenger-lab3-api-3,11.52%,8.281MiB / 192MiB +2026-10-16T14:16:07Z,mtusi-messenger-lab3-api-4,11.73%,10.36MiB / 192MiB +2026-10-16T14:16:07Z,mtusi-messenger-lab3-lb-1,15.51%,13.12MiB / 64MiB +2026-10-16T14:16:07Z,mtusi-messenger-lab3-postgres-1,50.60%,236.7MiB / 384MiB +2026-10-16T14:16:07Z,mtusi-messenger-lab3-redis-1,0.23%,6.293MiB / 192MiB diff --git a/evidence/track1/superseded/run1-wrong-budgets/summary.md b/evidence/track1/superseded/run1-wrong-budgets/summary.md new file mode 100644 index 00000000..ee55c591 --- /dev/null +++ b/evidence/track1/superseded/run1-wrong-budgets/summary.md @@ -0,0 +1,13 @@ +# Трек 1: цена масштабирования + +| профиль | реплик | бюджет CPU | CPU/реплика | успешный RPS | p50 мс | p95 мс | p99 мс | ошибки | API CPU (сумма) | API RAM max (сумма, MiB) | PG CPU | LB CPU | +| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | +| db1cpu | 2 | 1.0 | 0.5 | 1641.212 | 4.085 | 8.787 | 23.973 | 0 | 38.16 | 329.3 | 50.3 | 14.26 | +| g05 | 2 | 0.5 | 0.25 | 1615.408 | 4.348 | 8.823 | 20.46 | 0 | 40.16 | 244.3 | 50.44 | 15.07 | +| g10 | 2 | 1.0 | 0.5 | 1665.873 | 4.168 | 8.323 | 21.636 | 0 | 39.49 | 326.1 | 50.33 | 14.75 | +| g15 | 2 | 1.5 | 0.75 | 1651.746 | 4.094 | 8.631 | 24.272 | 0 | 38.4 | 334.6 | 49.7 | 14.6 | +| pool10 | 4 | 1.0 | 0.25 | 1618.552 | 4.394 | 8.205 | 20.61 | 222 | 44.88 | 360.7 | 48.55 | 13.6 | +| pool5 | 4 | 1.0 | 0.25 | 1563.449 | 4.464 | 8.965 | 22.758 | 2 | 44.02 | 582.1 | 49.2 | 14.36 | +| r1 | 1 | 1.0 | 1.0 | 1680.576 | 4.005 | 8.354 | 22.526 | 0 | 32.32 | 198.7 | 50.6 | 14.02 | +| r2 | 2 | 1.0 | 0.5 | 1567.279 | 4.474 | 9.495 | 20.649 | 0 | 40.17 | 324.9 | 49.99 | 15.16 | +| r4 | 4 | 1.0 | 0.25 | 1548.476 | 4.633 | 8.8 | 18.978 | 178 | 46.05 | 630.4 | 49.75 | 15.32 | diff --git a/evidence/track1/superseded/run1-wrong-budgets/summary.txt b/evidence/track1/superseded/run1-wrong-budgets/summary.txt new file mode 100644 index 00000000..956b4bc5 --- /dev/null +++ b/evidence/track1/superseded/run1-wrong-budgets/summary.txt @@ -0,0 +1,455 @@ +# Track 1: the price of scaling +# generated: 2026-10-15T18:47:12Z +# host: Darwin arm64 +# cpu: Apple M5 Pro +# ram bytes: 51539607552 +# load: tests/load.py closed loop; postgres/redis/lb limits are fixed in compose.yaml +# each profile line below records the budget it was run with +docker engine 29.5.2 +Docker Compose version 5.5.1 + +=== invocation 2026-10-15T18:47:12Z: REPLICAS="1 2 4" TOTAL_CPU=1.0 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=r1 replicas=1 cpu=1.00 mem=768M === +=== invocation 2026-10-15T18:47:37Z: REPLICAS="1 2 4" TOTAL_CPU=1.0 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=r1 replicas=1 cpu=1.00 mem=768M === +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.02, + "concurrency": 8, + "successful_requests": 113740, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1895.027, + "successful_latency_ms": { + "p50": 4.031, + "p95": 6.507, + "p99": 8.906 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=19 +postgres_max_connections=100 +messages_rows=368298 +idempotency_rows=368298 + +=== profile label=r2 replicas=2 cpu=0.50 mem=384M === +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.023, + "concurrency": 8, + "successful_requests": 117433, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1956.481, + "successful_latency_ms": { + "p50": 3.957, + "p95": 6.18, + "p99": 8.499 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=23 +postgres_max_connections=100 +messages_rows=516197 +idempotency_rows=516197 + +=== profile label=r4 replicas=4 cpu=0.25 mem=192M === +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.014, + "concurrency": 8, + "successful_requests": 107236, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1786.838, + "successful_latency_ms": { + "p50": 4.288, + "p95": 7.051, + "p99": 10.001 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=23 +postgres_max_connections=100 +messages_rows=652759 +idempotency_rows=652759 + +=== invocation 2026-10-15T18:51:38Z: REPLICAS="2" TOTAL_CPU=0.5 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=g05 replicas=2 cpu=0.25 mem=384M === +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.02, + "concurrency": 8, + "successful_requests": 114389, + "failed_requests": 340, + "error_ratio": 0.002964, + "successful_rps": 1905.841, + "successful_latency_ms": { + "p50": 4.032, + "p95": 6.456, + "p99": 9.098 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=19 +postgres_max_connections=100 +messages_rows=797321 +idempotency_rows=797321 + +=== invocation 2026-10-15T18:53:02Z: REPLICAS="2" TOTAL_CPU=1.0 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=g10 replicas=2 cpu=0.50 mem=384M === +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.02, + "concurrency": 8, + "successful_requests": 117266, + "failed_requests": 1984, + "error_ratio": 0.016637, + "successful_rps": 1953.781, + "successful_latency_ms": { + "p50": 3.923, + "p95": 6.062, + "p99": 8.041 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=19 +postgres_max_connections=100 +messages_rows=944961 +idempotency_rows=944961 + +=== invocation 2026-10-15T18:54:19Z: REPLICAS="2" TOTAL_CPU=1.5 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=g15 replicas=2 cpu=0.75 mem=384M === +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.018, + "concurrency": 8, + "successful_requests": 111442, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1856.809, + "successful_latency_ms": { + "p50": 4.132, + "p95": 6.761, + "p99": 9.34 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=19 +postgres_max_connections=100 +messages_rows=1086579 +idempotency_rows=1086579 + +=== invocation 2026-10-15T18:55:35Z: REPLICAS="4" TOTAL_CPU=1.0 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=pool10 replicas=4 cpu=0.25 mem=192M === +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.016, + "concurrency": 8, + "successful_requests": 113438, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1890.142, + "successful_latency_ms": { + "p50": 4.133, + "p95": 6.416, + "p99": 8.487 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=23 +postgres_max_connections=100 +messages_rows=1229412 +idempotency_rows=1229412 + +=== invocation 2026-10-15T18:56:54Z: REPLICAS="4" TOTAL_CPU=1.0 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=pool5 replicas=4 cpu=0.25 mem=192M === +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.023, + "concurrency": 8, + "successful_requests": 109073, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1817.2, + "successful_latency_ms": { + "p50": 4.258, + "p95": 6.758, + "p99": 9.171 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=23 +postgres_max_connections=100 +messages_rows=1366625 +idempotency_rows=1366625 + +=== invocation 2026-10-15T19:05:27Z: REPLICAS="2" TOTAL_CPU=1.0 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=db1cpu replicas=2 cpu=0.50 mem=384M === +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.02, + "concurrency": 8, + "successful_requests": 117712, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1961.212, + "successful_latency_ms": { + "p50": 3.984, + "p95": 6.09, + "p99": 8.13 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=19 +postgres_max_connections=100 +messages_rows=1722748 +idempotency_rows=1722748 + +=== invocation 2026-10-16T14:12:13Z: REPLICAS="1 2 4" TOTAL_CPU=1.0 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=r1 replicas=1 cpu=1.00 mem=768M postgres=0.50/512M max_conns=10 === +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.015, + "concurrency": 8, + "successful_requests": 100860, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1680.576, + "successful_latency_ms": { + "p50": 4.005, + "p95": 8.354, + "p99": 22.526 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=18 +postgres_max_connections=100 +messages_rows=631570 +idempotency_rows=631570 + +=== profile label=r2 replicas=2 cpu=0.50 mem=384M postgres=0.50/512M max_conns=10 === +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.011, + "concurrency": 8, + "successful_requests": 94054, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1567.279, + "successful_latency_ms": { + "p50": 4.474, + "p95": 9.495, + "p99": 20.649 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=19 +postgres_max_connections=100 +messages_rows=747548 +idempotency_rows=747548 + +=== profile label=r4 replicas=4 cpu=0.25 mem=192M postgres=0.50/512M max_conns=10 === +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.013, + "concurrency": 8, + "successful_requests": 92928, + "failed_requests": 178, + "error_ratio": 0.001912, + "successful_rps": 1548.476, + "successful_latency_ms": { + "p50": 4.633, + "p95": 8.8, + "p99": 18.978 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=22 +postgres_max_connections=100 +messages_rows=863510 +idempotency_rows=863510 + +=== invocation 2026-10-16T14:16:09Z: REPLICAS="2" TOTAL_CPU=0.5 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=g05 replicas=2 cpu=0.25 mem=384M postgres=0.50/512M max_conns=10 === +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.01, + "concurrency": 8, + "successful_requests": 96941, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1615.408, + "successful_latency_ms": { + "p50": 4.348, + "p95": 8.823, + "p99": 20.46 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=19 +postgres_max_connections=100 +messages_rows=984900 +idempotency_rows=984900 + +=== invocation 2026-10-16T14:17:32Z: REPLICAS="2" TOTAL_CPU=1.0 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=g10 replicas=2 cpu=0.50 mem=384M postgres=0.50/512M max_conns=10 === +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.011, + "concurrency": 8, + "successful_requests": 99970, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1665.873, + "successful_latency_ms": { + "p50": 4.168, + "p95": 8.323, + "p99": 21.636 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=20 +postgres_max_connections=100 +messages_rows=1110124 +idempotency_rows=1110124 + +=== invocation 2026-10-16T14:18:48Z: REPLICAS="2" TOTAL_CPU=1.5 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=g15 replicas=2 cpu=0.75 mem=384M postgres=0.50/512M max_conns=10 === +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.017, + "concurrency": 8, + "successful_requests": 99132, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1651.746, + "successful_latency_ms": { + "p50": 4.094, + "p95": 8.631, + "p99": 24.272 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=19 +postgres_max_connections=100 +messages_rows=1233101 +idempotency_rows=1233101 + +=== invocation 2026-10-16T14:20:05Z: REPLICAS="4" TOTAL_CPU=1.0 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=pool10 replicas=4 cpu=0.25 mem=192M postgres=0.50/512M max_conns=10 === +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.012, + "concurrency": 8, + "successful_requests": 97133, + "failed_requests": 222, + "error_ratio": 0.00228, + "successful_rps": 1618.552, + "successful_latency_ms": { + "p50": 4.394, + "p95": 8.205, + "p99": 20.61 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=23 +postgres_max_connections=100 +messages_rows=1355629 +idempotency_rows=1355629 + +=== invocation 2026-10-16T14:21:24Z: REPLICAS="4" TOTAL_CPU=1.0 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=pool5 replicas=4 cpu=0.25 mem=192M postgres=0.50/512M max_conns=5 === +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.027, + "concurrency": 8, + "successful_requests": 93849, + "failed_requests": 2, + "error_ratio": 2.1e-05, + "successful_rps": 1563.449, + "successful_latency_ms": { + "p50": 4.464, + "p95": 8.965, + "p99": 22.758 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=21 +postgres_max_connections=100 +messages_rows=1474222 +idempotency_rows=1474222 + +=== invocation 2026-10-16T14:22:43Z: REPLICAS="2" TOTAL_CPU=1.0 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=db1cpu replicas=2 cpu=0.50 mem=384M postgres=1.0/384M max_conns=10 === +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.012, + "concurrency": 8, + "successful_requests": 98492, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1641.212, + "successful_latency_ms": { + "p50": 4.085, + "p95": 8.787, + "p99": 23.973 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=19 +postgres_max_connections=100 +messages_rows=1597333 +idempotency_rows=1597333 + diff --git a/evidence/track1/superseded/run2-host-client/load-db1cpu.json b/evidence/track1/superseded/run2-host-client/load-db1cpu.json new file mode 100644 index 00000000..6ca275ad --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/load-db1cpu.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.83, + "concurrency": 8, + "successful_requests": 96094, + "failed_requests": 26520, + "error_ratio": 0.216289, + "successful_rps": 1579.722, + "successful_latency_ms": { + "p50": 4.033, + "p95": 6.236, + "p99": 8.668 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/superseded/run2-host-client/load-g05.json b/evidence/track1/superseded/run2-host-client/load-g05.json new file mode 100644 index 00000000..2f58bd37 --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/load-g05.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.013, + "concurrency": 8, + "successful_requests": 95087, + "failed_requests": 2845, + "error_ratio": 0.029051, + "successful_rps": 1584.428, + "successful_latency_ms": { + "p50": 4.042, + "p95": 9.331, + "p99": 27.665 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/superseded/run2-host-client/load-g10.json b/evidence/track1/superseded/run2-host-client/load-g10.json new file mode 100644 index 00000000..985b67a2 --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/load-g10.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.012, + "concurrency": 8, + "successful_requests": 95841, + "failed_requests": 13795, + "error_ratio": 0.125825, + "successful_rps": 1597.028, + "successful_latency_ms": { + "p50": 3.927, + "p95": 7.67, + "p99": 21.91 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/superseded/run2-host-client/load-g15.json b/evidence/track1/superseded/run2-host-client/load-g15.json new file mode 100644 index 00000000..e696f35b --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/load-g15.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.011, + "concurrency": 8, + "successful_requests": 98411, + "failed_requests": 6960, + "error_ratio": 0.066052, + "successful_rps": 1639.884, + "successful_latency_ms": { + "p50": 3.963, + "p95": 7.721, + "p99": 23.6 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/superseded/run2-host-client/load-lb1cpu.json b/evidence/track1/superseded/run2-host-client/load-lb1cpu.json new file mode 100644 index 00000000..b98c3264 --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/load-lb1cpu.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.01, + "concurrency": 8, + "successful_requests": 97901, + "failed_requests": 15652, + "error_ratio": 0.137839, + "successful_rps": 1631.408, + "successful_latency_ms": { + "p50": 3.894, + "p95": 6.989, + "p99": 20.148 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/superseded/run2-host-client/load-pool10.json b/evidence/track1/superseded/run2-host-client/load-pool10.json new file mode 100644 index 00000000..33256178 --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/load-pool10.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.014, + "concurrency": 8, + "successful_requests": 94995, + "failed_requests": 11008, + "error_ratio": 0.103846, + "successful_rps": 1582.872, + "successful_latency_ms": { + "p50": 4.156, + "p95": 7.798, + "p99": 19.723 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/superseded/run2-host-client/load-pool5.json b/evidence/track1/superseded/run2-host-client/load-pool5.json new file mode 100644 index 00000000..a5a19fed --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/load-pool5.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.016, + "concurrency": 8, + "successful_requests": 93110, + "failed_requests": 13051, + "error_ratio": 0.122936, + "successful_rps": 1551.419, + "successful_latency_ms": { + "p50": 4.125, + "p95": 7.868, + "p99": 21.268 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/superseded/run2-host-client/load-r1.json b/evidence/track1/superseded/run2-host-client/load-r1.json new file mode 100644 index 00000000..788d729e --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/load-r1.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.011, + "concurrency": 8, + "successful_requests": 103077, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1717.626, + "successful_latency_ms": { + "p50": 3.85, + "p95": 7.538, + "p99": 25.045 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/superseded/run2-host-client/load-r2.json b/evidence/track1/superseded/run2-host-client/load-r2.json new file mode 100644 index 00000000..43961f61 --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/load-r2.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.012, + "concurrency": 8, + "successful_requests": 97973, + "failed_requests": 9791, + "error_ratio": 0.090856, + "successful_rps": 1632.545, + "successful_latency_ms": { + "p50": 3.959, + "p95": 7.508, + "p99": 22.12 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/superseded/run2-host-client/load-r4.json b/evidence/track1/superseded/run2-host-client/load-r4.json new file mode 100644 index 00000000..1a94233d --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/load-r4.json @@ -0,0 +1,17 @@ +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.013, + "concurrency": 8, + "successful_requests": 92161, + "failed_requests": 11454, + "error_ratio": 0.110544, + "successful_rps": 1535.673, + "successful_latency_ms": { + "p50": 4.184, + "p95": 8.208, + "p99": 22.167 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/track1/superseded/run2-host-client/profile-db1cpu.json b/evidence/track1/superseded/run2-host-client/profile-db1cpu.json new file mode 100644 index 00000000..71f95f98 --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/profile-db1cpu.json @@ -0,0 +1 @@ +{"label":"db1cpu","replicas":2,"total_cpu":1.0,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"1.00","postgres_mem_limit":"384M","postgres_max_conns":10,"lb_cpu_limit":"0.25"} diff --git a/evidence/track1/superseded/run2-host-client/profile-g05.json b/evidence/track1/superseded/run2-host-client/profile-g05.json new file mode 100644 index 00000000..8e96a6f9 --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/profile-g05.json @@ -0,0 +1 @@ +{"label":"g05","replicas":2,"total_cpu":0.5,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"0.50","postgres_mem_limit":"384M","postgres_max_conns":10,"lb_cpu_limit":"0.25"} diff --git a/evidence/track1/superseded/run2-host-client/profile-g10.json b/evidence/track1/superseded/run2-host-client/profile-g10.json new file mode 100644 index 00000000..e8223f75 --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/profile-g10.json @@ -0,0 +1 @@ +{"label":"g10","replicas":2,"total_cpu":1.0,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"0.50","postgres_mem_limit":"384M","postgres_max_conns":10,"lb_cpu_limit":"0.25"} diff --git a/evidence/track1/superseded/run2-host-client/profile-g15.json b/evidence/track1/superseded/run2-host-client/profile-g15.json new file mode 100644 index 00000000..7acdf277 --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/profile-g15.json @@ -0,0 +1 @@ +{"label":"g15","replicas":2,"total_cpu":1.5,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"0.50","postgres_mem_limit":"384M","postgres_max_conns":10,"lb_cpu_limit":"0.25"} diff --git a/evidence/track1/superseded/run2-host-client/profile-lb1cpu.json b/evidence/track1/superseded/run2-host-client/profile-lb1cpu.json new file mode 100644 index 00000000..9a24d7fb --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/profile-lb1cpu.json @@ -0,0 +1 @@ +{"label":"lb1cpu","replicas":2,"total_cpu":1.0,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"0.50","postgres_mem_limit":"384M","postgres_max_conns":10,"lb_cpu_limit":"1.00"} diff --git a/evidence/track1/superseded/run2-host-client/profile-pool10.json b/evidence/track1/superseded/run2-host-client/profile-pool10.json new file mode 100644 index 00000000..0ec200df --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/profile-pool10.json @@ -0,0 +1 @@ +{"label":"pool10","replicas":4,"total_cpu":1.0,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"0.50","postgres_mem_limit":"384M","postgres_max_conns":10,"lb_cpu_limit":"0.25"} diff --git a/evidence/track1/superseded/run2-host-client/profile-pool5.json b/evidence/track1/superseded/run2-host-client/profile-pool5.json new file mode 100644 index 00000000..032ed563 --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/profile-pool5.json @@ -0,0 +1 @@ +{"label":"pool5","replicas":4,"total_cpu":1.0,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"0.50","postgres_mem_limit":"384M","postgres_max_conns":5,"lb_cpu_limit":"0.25"} diff --git a/evidence/track1/superseded/run2-host-client/profile-r1.json b/evidence/track1/superseded/run2-host-client/profile-r1.json new file mode 100644 index 00000000..2c96e28e --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/profile-r1.json @@ -0,0 +1 @@ +{"label":"r1","replicas":1,"total_cpu":1.0,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"0.50","postgres_mem_limit":"384M","postgres_max_conns":10,"lb_cpu_limit":"0.25"} diff --git a/evidence/track1/superseded/run2-host-client/profile-r2.json b/evidence/track1/superseded/run2-host-client/profile-r2.json new file mode 100644 index 00000000..10661ad5 --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/profile-r2.json @@ -0,0 +1 @@ +{"label":"r2","replicas":2,"total_cpu":1.0,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"0.50","postgres_mem_limit":"384M","postgres_max_conns":10,"lb_cpu_limit":"0.25"} diff --git a/evidence/track1/superseded/run2-host-client/profile-r4.json b/evidence/track1/superseded/run2-host-client/profile-r4.json new file mode 100644 index 00000000..fde157cc --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/profile-r4.json @@ -0,0 +1 @@ +{"label":"r4","replicas":4,"total_cpu":1.0,"total_mem_mb":768,"duration":60,"concurrency":8,"warmup":15,"postgres_cpu_limit":"0.50","postgres_mem_limit":"384M","postgres_max_conns":10,"lb_cpu_limit":"0.25"} diff --git a/evidence/track1/superseded/run2-host-client/scaling-fixed-budget.png b/evidence/track1/superseded/run2-host-client/scaling-fixed-budget.png new file mode 100644 index 0000000000000000000000000000000000000000..8c2586503b6135ad26683dcdbbfa3ae31881dc72 GIT binary patch literal 55968 zcmdRWWmr{R*EJ%dD2jvuBHby6Zlw?1-5fe4Bo8euacGbZ>F!3P8wqJCrMvT6=YHft`K zl)M6=_x(Bdz2>upLX}yI6sJhMVo>#fNK=R#HMt%8Y$%>{RQ8&Ndn_a8Ve1oz69 zh)JYzQJ1bwcrjRbgjcw26qwhR8r$yyaPUxI?x zjox{SiiqTgpkbx*y9byICS^#*(s8+;GWe;(?Be3$%odusFON6;$i>6+r1ln?M>9pA zoTwXG&(=J3+8qDT6^5@+XJ?>Xq>g>EHPt@YcA=^L`{ySU zXRKN^R(Z<#h|9Z!gO%=b0n?kylRWthR6agFM0K%dAqPtpMS6-X;7q zloATRI&B{wX6`fE7|T&=_wl*^Fw^1h(6w|A3HV??Zihc28mA{ydMkm%o)Y^U*~t^7 zdV)o|%{=yr&CUE3CW9dZiL6-)Sz_vC`u7A`?nm9|)Y}`!GCJ?fR8u^7qmgGs<#(g_2%P? zS~G+Lzjt*}wa-TW#Ud6U3=a=aU^B;QaM}tWyFp+#HU;lwRm=Mex9yf zZ_nb3HPcN&o-3argyA+6ORx6)<;&a|QVq6I=pVl-nN;eXs)~xSt0bto+;oMpN>?H* zqt`vYO=9RP_sV<(!usHFO^S<)iv;Yr+tg@FKwQ=A^fZ3G{aOfXv?yvQ1aku%ke(FY z+Q;v@s^L5CK>}>bo2Rh87>v%47pyZ5j?M6^muI{4O4f1x-5vs$J!kKIRSw^RJ;sE< zdQhC5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M^c--IKgRshw?tDqt-7A!-(0-nvNtoCR`BEnK~y21>IT&) z9_hx5Bvl1$&m|RjpJjs+V%e7=)b3t;2P@zSWJe zG?~jD9?#OGAv0olwB4g5H{&{7*sp6gwDpz3>U+6AjGJV&p}>KT$VHAbM0+1AJ2Jji>))VgugPv*MM^Dv>C2T|YzH`>S5mU|dl zs<8(m^T8}T+icm7E=a(iwe^JmF?41W9B*Y;0Y?}C?cB75wO5b52{49=)3VlW7cF=f zetiX{;A5i1$N4qvNUU%AjFeX? zzq{vG>+*}425mo3Xb%VnV7YIJfQ+j+=GM1O0a<@`rD~xn#Z!nBDH<5Ov62nP0@j&h zP54byzluHn;Kjzm$wwY^25sS*lkusiL13E@3a9O?_daI4}EQ0a~W| zU<8r5x6)&v_9Wm~%ViCU)H?lUIHLR$!^}wQ4<)pJJdg7nwp|PJR2eXVV5_Wvl3KpU z!JhNBU#l#S(p1JZEXC{8&eGDSMjVrnnwaeK0g5h(P=OJo;s*z7p8d?ZpA(_wmpvPm~ z@Gi%*ke1_lGE#e?tv}SxVt7P2wL4`F%%4kw(pwW;h+-rdgPli*&$-Pf_?RDDSEB8) zyD2Ng#!2z`4xT(#X0G*OChwZbqDDk{AKktAfoA zIMlpdhB{cUsxgG(rh8xz^*!}sOC5h2kByfs2|>uv zhb;2&9ri@0pqhHBp22er=1H_PV_TEo0^`Ft;gRjYlP$kxQpa|}tA5WsnQ%f<8d&M_ zpHL&?pJYUvPmOSD=*lFW0!~3dX{gyCD*WCF0%V4Q9OW0_`tNW|0hC&Qu801o{wERs w{{zAO`H=tq9sW&ip!(ZC*Z)0LZ^RymXodI~50hS7L;ty?#KXHeVvnBxAN_B|G5`Po literal 0 HcmV?d00001 diff --git a/evidence/track1/superseded/run2-host-client/scaling-growth.png b/evidence/track1/superseded/run2-host-client/scaling-growth.png new file mode 100644 index 0000000000000000000000000000000000000000..4c2050401a0a11088ee2f9c5cf0d966a06a3c38e GIT binary patch literal 56829 zcmdSBbySsW_cjVj2!a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+i8M?s7cZ=+H1Kg5ysvo z0(bE*v3)8jD^*LnThwf&?MQ_mN{umfxd#Mul?Y`voN&(4!%J;kMKYCD#!{;G{%;|hFAx|B3pGM*JGmzeRndtlJDzCuzU(RoygF{nQPo-MPHtc@^o+%gx literal 0 HcmV?d00001 diff --git a/evidence/track1/superseded/run2-host-client/stats-db1cpu.csv b/evidence/track1/superseded/run2-host-client/stats-db1cpu.csv new file mode 100644 index 00000000..622f33ca --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/stats-db1cpu.csv @@ -0,0 +1,148 @@ +timestamp,container,cpu_percent,mem_usage +2026-10-16T18:09:18Z,mtusi-messenger-lab3-api-1,20.75%,170.2MiB / 384MiB +2026-10-16T18:09:18Z,mtusi-messenger-lab3-api-2,20.69%,169.8MiB / 384MiB +2026-10-16T18:09:18Z,mtusi-messenger-lab3-postgres-1,54.39%,78.59MiB / 384MiB +2026-10-16T18:09:18Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:09:18Z,mtusi-messenger-lab2-redis-1,0.64%,9.004MiB / 1.913GiB +2026-10-16T18:09:18Z,mtusi-messenger-lab3-lb-1,16.76%,11.65MiB / 64MiB +2026-10-16T18:09:18Z,mtusi-messenger-lab3-redis-1,0.22%,3.863MiB / 192MiB +2026-10-16T18:09:21Z,mtusi-messenger-lab3-api-1,21.82%,17.21MiB / 384MiB +2026-10-16T18:09:21Z,mtusi-messenger-lab3-api-2,22.12%,11.14MiB / 384MiB +2026-10-16T18:09:21Z,mtusi-messenger-lab3-postgres-1,53.73%,80.95MiB / 384MiB +2026-10-16T18:09:21Z,mtusi-messenger-lab2-postgres-1,0.68%,178.3MiB / 1.913GiB +2026-10-16T18:09:21Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:09:21Z,mtusi-messenger-lab3-lb-1,16.45%,11.64MiB / 64MiB +2026-10-16T18:09:21Z,mtusi-messenger-lab3-redis-1,0.75%,3.863MiB / 192MiB +2026-10-16T18:09:24Z,mtusi-messenger-lab3-api-1,22.20%,11.01MiB / 384MiB +2026-10-16T18:09:24Z,mtusi-messenger-lab3-api-2,21.88%,10.99MiB / 384MiB +2026-10-16T18:09:24Z,mtusi-messenger-lab3-postgres-1,56.71%,84.23MiB / 384MiB +2026-10-16T18:09:24Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:09:24Z,mtusi-messenger-lab2-redis-1,0.70%,9.004MiB / 1.913GiB +2026-10-16T18:09:24Z,mtusi-messenger-lab3-lb-1,17.04%,11.64MiB / 64MiB +2026-10-16T18:09:24Z,mtusi-messenger-lab3-redis-1,0.23%,3.863MiB / 192MiB +2026-10-16T18:09:27Z,mtusi-messenger-lab3-api-1,21.73%,10.91MiB / 384MiB +2026-10-16T18:09:27Z,mtusi-messenger-lab3-api-2,22.04%,10.89MiB / 384MiB +2026-10-16T18:09:27Z,mtusi-messenger-lab3-postgres-1,56.87%,86.43MiB / 384MiB +2026-10-16T18:09:27Z,mtusi-messenger-lab2-postgres-1,0.20%,178.3MiB / 1.913GiB +2026-10-16T18:09:27Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:09:27Z,mtusi-messenger-lab3-lb-1,16.74%,11.66MiB / 64MiB +2026-10-16T18:09:27Z,mtusi-messenger-lab3-redis-1,0.21%,3.863MiB / 192MiB +2026-10-16T18:09:30Z,mtusi-messenger-lab3-api-1,0.04%,10.88MiB / 384MiB +2026-10-16T18:09:30Z,mtusi-messenger-lab3-api-2,0.03%,10.88MiB / 384MiB +2026-10-16T18:09:30Z,mtusi-messenger-lab3-postgres-1,0.04%,88.96MiB / 384MiB +2026-10-16T18:09:30Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:09:30Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:09:30Z,mtusi-messenger-lab3-lb-1,0.05%,11.59MiB / 64MiB +2026-10-16T18:09:30Z,mtusi-messenger-lab3-redis-1,0.24%,3.863MiB / 192MiB +2026-10-16T18:09:33Z,mtusi-messenger-lab3-api-1,0.00%,10.88MiB / 384MiB +2026-10-16T18:09:33Z,mtusi-messenger-lab3-api-2,0.00%,10.87MiB / 384MiB +2026-10-16T18:09:33Z,mtusi-messenger-lab3-postgres-1,0.02%,88.96MiB / 384MiB +2026-10-16T18:09:33Z,mtusi-messenger-lab2-postgres-1,0.01%,178.3MiB / 1.913GiB +2026-10-16T18:09:33Z,mtusi-messenger-lab2-redis-1,0.71%,9.004MiB / 1.913GiB +2026-10-16T18:09:33Z,mtusi-messenger-lab3-lb-1,0.70%,11.59MiB / 64MiB +2026-10-16T18:09:33Z,mtusi-messenger-lab3-redis-1,0.20%,3.863MiB / 192MiB +2026-10-16T18:09:36Z,mtusi-messenger-lab3-api-1,21.93%,11.05MiB / 384MiB +2026-10-16T18:09:36Z,mtusi-messenger-lab3-api-2,21.72%,10.93MiB / 384MiB +2026-10-16T18:09:36Z,mtusi-messenger-lab3-postgres-1,54.56%,92MiB / 384MiB +2026-10-16T18:09:36Z,mtusi-messenger-lab2-postgres-1,0.74%,178.3MiB / 1.913GiB +2026-10-16T18:09:36Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:09:36Z,mtusi-messenger-lab3-lb-1,16.85%,11.64MiB / 64MiB +2026-10-16T18:09:36Z,mtusi-messenger-lab3-redis-1,0.65%,3.863MiB / 192MiB +2026-10-16T18:09:39Z,mtusi-messenger-lab3-api-1,20.64%,10.93MiB / 384MiB +2026-10-16T18:09:39Z,mtusi-messenger-lab3-api-2,21.08%,10.86MiB / 384MiB +2026-10-16T18:09:39Z,mtusi-messenger-lab3-postgres-1,62.54%,99.2MiB / 384MiB +2026-10-16T18:09:39Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:09:39Z,mtusi-messenger-lab2-redis-1,0.20%,9.004MiB / 1.913GiB +2026-10-16T18:09:39Z,mtusi-messenger-lab3-lb-1,15.84%,11.64MiB / 64MiB +2026-10-16T18:09:39Z,mtusi-messenger-lab3-redis-1,0.20%,3.863MiB / 192MiB +2026-10-16T18:09:42Z,mtusi-messenger-lab3-api-1,20.93%,10.97MiB / 384MiB +2026-10-16T18:09:42Z,mtusi-messenger-lab3-api-2,20.85%,10.86MiB / 384MiB +2026-10-16T18:09:42Z,mtusi-messenger-lab3-postgres-1,58.24%,105MiB / 384MiB +2026-10-16T18:09:42Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:09:42Z,mtusi-messenger-lab2-redis-1,0.20%,9.004MiB / 1.913GiB +2026-10-16T18:09:42Z,mtusi-messenger-lab3-lb-1,15.45%,11.65MiB / 64MiB +2026-10-16T18:09:42Z,mtusi-messenger-lab3-redis-1,0.68%,3.863MiB / 192MiB +2026-10-16T18:09:45Z,mtusi-messenger-lab3-api-1,19.36%,10.96MiB / 384MiB +2026-10-16T18:09:45Z,mtusi-messenger-lab3-api-2,18.97%,10.88MiB / 384MiB +2026-10-16T18:09:45Z,mtusi-messenger-lab3-postgres-1,68.62%,203.6MiB / 384MiB +2026-10-16T18:09:45Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:09:45Z,mtusi-messenger-lab2-redis-1,0.20%,9.004MiB / 1.913GiB +2026-10-16T18:09:45Z,mtusi-messenger-lab3-lb-1,14.00%,11.64MiB / 64MiB +2026-10-16T18:09:45Z,mtusi-messenger-lab3-redis-1,0.20%,3.863MiB / 192MiB +2026-10-16T18:09:48Z,mtusi-messenger-lab3-api-1,19.91%,10.95MiB / 384MiB +2026-10-16T18:09:48Z,mtusi-messenger-lab3-api-2,19.97%,10.84MiB / 384MiB +2026-10-16T18:09:48Z,mtusi-messenger-lab3-postgres-1,56.90%,204.4MiB / 384MiB +2026-10-16T18:09:48Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:09:48Z,mtusi-messenger-lab2-redis-1,0.72%,9.004MiB / 1.913GiB +2026-10-16T18:09:48Z,mtusi-messenger-lab3-lb-1,15.67%,11.65MiB / 64MiB +2026-10-16T18:09:48Z,mtusi-messenger-lab3-redis-1,0.22%,3.863MiB / 192MiB +2026-10-16T18:09:51Z,mtusi-messenger-lab3-api-1,20.80%,10.99MiB / 384MiB +2026-10-16T18:09:51Z,mtusi-messenger-lab3-api-2,19.52%,10.74MiB / 384MiB +2026-10-16T18:09:51Z,mtusi-messenger-lab3-postgres-1,55.90%,206.1MiB / 384MiB +2026-10-16T18:09:51Z,mtusi-messenger-lab2-postgres-1,1.01%,178.3MiB / 1.913GiB +2026-10-16T18:09:51Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:09:51Z,mtusi-messenger-lab3-lb-1,14.89%,11.65MiB / 64MiB +2026-10-16T18:09:51Z,mtusi-messenger-lab3-redis-1,0.75%,3.863MiB / 192MiB +2026-10-16T18:09:54Z,mtusi-messenger-lab3-api-1,20.93%,10.93MiB / 384MiB +2026-10-16T18:09:54Z,mtusi-messenger-lab3-api-2,21.59%,10.89MiB / 384MiB +2026-10-16T18:09:54Z,mtusi-messenger-lab3-postgres-1,57.25%,206.4MiB / 384MiB +2026-10-16T18:09:54Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:09:54Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:09:54Z,mtusi-messenger-lab3-lb-1,16.65%,11.64MiB / 64MiB +2026-10-16T18:09:54Z,mtusi-messenger-lab3-redis-1,0.21%,3.863MiB / 192MiB +2026-10-16T18:09:57Z,mtusi-messenger-lab3-api-1,21.66%,10.96MiB / 384MiB +2026-10-16T18:09:57Z,mtusi-messenger-lab3-api-2,21.80%,10.9MiB / 384MiB +2026-10-16T18:09:57Z,mtusi-messenger-lab3-postgres-1,55.22%,206.5MiB / 384MiB +2026-10-16T18:09:57Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:09:57Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:09:57Z,mtusi-messenger-lab3-lb-1,16.30%,11.65MiB / 64MiB +2026-10-16T18:09:57Z,mtusi-messenger-lab3-redis-1,0.21%,3.863MiB / 192MiB +2026-10-16T18:10:01Z,mtusi-messenger-lab3-api-1,21.62%,10.78MiB / 384MiB +2026-10-16T18:10:01Z,mtusi-messenger-lab3-api-2,21.19%,10.71MiB / 384MiB +2026-10-16T18:10:01Z,mtusi-messenger-lab3-postgres-1,54.76%,206.6MiB / 384MiB +2026-10-16T18:10:01Z,mtusi-messenger-lab2-postgres-1,0.68%,178.3MiB / 1.913GiB +2026-10-16T18:10:01Z,mtusi-messenger-lab2-redis-1,0.20%,9.004MiB / 1.913GiB +2026-10-16T18:10:01Z,mtusi-messenger-lab3-lb-1,16.24%,11.64MiB / 64MiB +2026-10-16T18:10:01Z,mtusi-messenger-lab3-redis-1,0.70%,3.863MiB / 192MiB +2026-10-16T18:10:04Z,mtusi-messenger-lab3-api-1,1.05%,10.79MiB / 384MiB +2026-10-16T18:10:04Z,mtusi-messenger-lab3-api-2,0.79%,10.69MiB / 384MiB +2026-10-16T18:10:04Z,mtusi-messenger-lab3-postgres-1,2.03%,206.5MiB / 384MiB +2026-10-16T18:10:04Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:10:04Z,mtusi-messenger-lab2-redis-1,0.79%,9.004MiB / 1.913GiB +2026-10-16T18:10:04Z,mtusi-messenger-lab3-lb-1,0.70%,11.59MiB / 64MiB +2026-10-16T18:10:04Z,mtusi-messenger-lab3-redis-1,0.20%,3.863MiB / 192MiB +2026-10-16T18:10:07Z,mtusi-messenger-lab3-api-1,21.30%,10.8MiB / 384MiB +2026-10-16T18:10:07Z,mtusi-messenger-lab3-api-2,20.71%,11.06MiB / 384MiB +2026-10-16T18:10:07Z,mtusi-messenger-lab3-postgres-1,55.48%,206.8MiB / 384MiB +2026-10-16T18:10:07Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:10:07Z,mtusi-messenger-lab2-redis-1,0.23%,9.004MiB / 1.913GiB +2026-10-16T18:10:07Z,mtusi-messenger-lab3-lb-1,16.17%,11.65MiB / 64MiB +2026-10-16T18:10:07Z,mtusi-messenger-lab3-redis-1,0.78%,3.863MiB / 192MiB +2026-10-16T18:10:10Z,mtusi-messenger-lab3-api-1,22.12%,10.81MiB / 384MiB +2026-10-16T18:10:10Z,mtusi-messenger-lab3-api-2,21.77%,10.84MiB / 384MiB +2026-10-16T18:10:10Z,mtusi-messenger-lab3-postgres-1,55.82%,206.7MiB / 384MiB +2026-10-16T18:10:10Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:10:10Z,mtusi-messenger-lab2-redis-1,0.23%,9.004MiB / 1.913GiB +2026-10-16T18:10:10Z,mtusi-messenger-lab3-lb-1,16.80%,11.66MiB / 64MiB +2026-10-16T18:10:10Z,mtusi-messenger-lab3-redis-1,0.21%,3.863MiB / 192MiB +2026-10-16T18:10:13Z,mtusi-messenger-lab3-api-1,21.75%,10.93MiB / 384MiB +2026-10-16T18:10:13Z,mtusi-messenger-lab3-api-2,20.98%,10.83MiB / 384MiB +2026-10-16T18:10:13Z,mtusi-messenger-lab3-postgres-1,52.41%,206.9MiB / 384MiB +2026-10-16T18:10:13Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:10:13Z,mtusi-messenger-lab2-redis-1,0.70%,9.004MiB / 1.913GiB +2026-10-16T18:10:13Z,mtusi-messenger-lab3-lb-1,16.23%,11.64MiB / 64MiB +2026-10-16T18:10:13Z,mtusi-messenger-lab3-redis-1,0.20%,3.863MiB / 192MiB +2026-10-16T18:10:16Z,mtusi-messenger-lab3-api-1,21.86%,10.93MiB / 384MiB +2026-10-16T18:10:16Z,mtusi-messenger-lab3-api-2,21.38%,10.86MiB / 384MiB +2026-10-16T18:10:16Z,mtusi-messenger-lab3-postgres-1,55.63%,206.7MiB / 384MiB +2026-10-16T18:10:16Z,mtusi-messenger-lab2-postgres-1,0.74%,178.3MiB / 1.913GiB +2026-10-16T18:10:16Z,mtusi-messenger-lab2-redis-1,0.24%,9.004MiB / 1.913GiB +2026-10-16T18:10:16Z,mtusi-messenger-lab3-lb-1,16.62%,11.65MiB / 64MiB +2026-10-16T18:10:16Z,mtusi-messenger-lab3-redis-1,0.70%,3.863MiB / 192MiB +2026-10-16T18:10:19Z,mtusi-messenger-lab3-api-1,0.16%,10.78MiB / 384MiB +2026-10-16T18:10:19Z,mtusi-messenger-lab3-api-2,0.13%,10.85MiB / 384MiB +2026-10-16T18:10:19Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:10:19Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:10:19Z,mtusi-messenger-lab3-redis-1,0.22%,3.863MiB / 192MiB +2026-10-16T18:10:19Z,mtusi-messenger-lab3-postgres-1,0.63%,27.27MiB / 384MiB +2026-10-16T18:10:19Z,mtusi-messenger-lab3-lb-1,12.40%,13.32MiB / 64MiB diff --git a/evidence/track1/superseded/run2-host-client/stats-g05.csv b/evidence/track1/superseded/run2-host-client/stats-g05.csv new file mode 100644 index 00000000..b6c31647 --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/stats-g05.csv @@ -0,0 +1,141 @@ +timestamp,container,cpu_percent,mem_usage +2026-10-16T18:02:39Z,mtusi-messenger-lab3-api-2,17.79%,81.74MiB / 384MiB +2026-10-16T18:02:39Z,mtusi-messenger-lab3-api-1,14.52%,146.2MiB / 384MiB +2026-10-16T18:02:39Z,mtusi-messenger-lab3-postgres-1,26.96%,182MiB / 384MiB +2026-10-16T18:02:39Z,mtusi-messenger-lab2-postgres-1,0.83%,240.6MiB / 1.913GiB +2026-10-16T18:02:39Z,mtusi-messenger-lab2-redis-1,0.30%,9.004MiB / 1.913GiB +2026-10-16T18:02:39Z,mtusi-messenger-lab3-lb-1,7.91%,11.58MiB / 64MiB +2026-10-16T18:02:39Z,mtusi-messenger-lab3-redis-1,0.43%,3.863MiB / 192MiB +2026-10-16T18:02:42Z,mtusi-messenger-lab3-api-2,19.58%,133.9MiB / 384MiB +2026-10-16T18:02:42Z,mtusi-messenger-lab3-api-1,18.81%,130.7MiB / 384MiB +2026-10-16T18:02:42Z,mtusi-messenger-lab3-postgres-1,50.34%,182.1MiB / 384MiB +2026-10-16T18:02:42Z,mtusi-messenger-lab2-postgres-1,0.00%,240.6MiB / 1.913GiB +2026-10-16T18:02:42Z,mtusi-messenger-lab2-redis-1,0.23%,9.004MiB / 1.913GiB +2026-10-16T18:02:42Z,mtusi-messenger-lab3-lb-1,14.39%,11.58MiB / 64MiB +2026-10-16T18:02:42Z,mtusi-messenger-lab3-redis-1,0.20%,3.863MiB / 192MiB +2026-10-16T18:02:45Z,mtusi-messenger-lab3-api-2,18.45%,13.5MiB / 384MiB +2026-10-16T18:02:45Z,mtusi-messenger-lab3-api-1,17.91%,11.21MiB / 384MiB +2026-10-16T18:02:45Z,mtusi-messenger-lab3-postgres-1,49.64%,182.3MiB / 384MiB +2026-10-16T18:02:45Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:02:45Z,mtusi-messenger-lab2-redis-1,0.20%,9.004MiB / 1.913GiB +2026-10-16T18:02:45Z,mtusi-messenger-lab3-lb-1,14.37%,11.57MiB / 64MiB +2026-10-16T18:02:45Z,mtusi-messenger-lab3-redis-1,0.66%,3.863MiB / 192MiB +2026-10-16T18:02:48Z,mtusi-messenger-lab3-api-2,17.88%,13.57MiB / 384MiB +2026-10-16T18:02:48Z,mtusi-messenger-lab3-api-1,17.90%,11.23MiB / 384MiB +2026-10-16T18:02:48Z,mtusi-messenger-lab3-postgres-1,50.01%,184.2MiB / 384MiB +2026-10-16T18:02:48Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:02:48Z,mtusi-messenger-lab2-redis-1,0.20%,9.004MiB / 1.913GiB +2026-10-16T18:02:48Z,mtusi-messenger-lab3-lb-1,14.38%,11.54MiB / 64MiB +2026-10-16T18:02:48Z,mtusi-messenger-lab3-redis-1,0.64%,3.863MiB / 192MiB +2026-10-16T18:02:51Z,mtusi-messenger-lab3-api-2,16.80%,13.45MiB / 384MiB +2026-10-16T18:02:51Z,mtusi-messenger-lab3-api-1,15.83%,11.26MiB / 384MiB +2026-10-16T18:02:51Z,mtusi-messenger-lab3-postgres-1,49.20%,185.6MiB / 384MiB +2026-10-16T18:02:51Z,mtusi-messenger-lab2-postgres-1,0.22%,240.5MiB / 1.913GiB +2026-10-16T18:02:51Z,mtusi-messenger-lab2-redis-1,0.23%,9.004MiB / 1.913GiB +2026-10-16T18:02:51Z,mtusi-messenger-lab3-lb-1,12.11%,11.57MiB / 64MiB +2026-10-16T18:02:51Z,mtusi-messenger-lab3-redis-1,0.22%,3.863MiB / 192MiB +2026-10-16T18:02:54Z,mtusi-messenger-lab3-api-2,15.10%,13.66MiB / 384MiB +2026-10-16T18:02:54Z,mtusi-messenger-lab3-api-1,15.35%,11.18MiB / 384MiB +2026-10-16T18:02:54Z,mtusi-messenger-lab3-postgres-1,49.94%,195.8MiB / 384MiB +2026-10-16T18:02:54Z,mtusi-messenger-lab2-postgres-1,0.74%,240.5MiB / 1.913GiB +2026-10-16T18:02:54Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:02:54Z,mtusi-messenger-lab3-lb-1,11.04%,11.57MiB / 64MiB +2026-10-16T18:02:54Z,mtusi-messenger-lab3-redis-1,0.19%,3.863MiB / 192MiB +2026-10-16T18:02:57Z,mtusi-messenger-lab3-api-2,16.69%,13.17MiB / 384MiB +2026-10-16T18:02:57Z,mtusi-messenger-lab3-api-1,16.46%,11.18MiB / 384MiB +2026-10-16T18:02:57Z,mtusi-messenger-lab3-postgres-1,50.32%,187.2MiB / 384MiB +2026-10-16T18:02:57Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:02:57Z,mtusi-messenger-lab2-redis-1,0.23%,9.004MiB / 1.913GiB +2026-10-16T18:02:57Z,mtusi-messenger-lab3-lb-1,12.14%,11.57MiB / 64MiB +2026-10-16T18:02:57Z,mtusi-messenger-lab3-redis-1,0.19%,3.863MiB / 192MiB +2026-10-16T18:03:00Z,mtusi-messenger-lab3-api-2,14.82%,13.5MiB / 384MiB +2026-10-16T18:03:00Z,mtusi-messenger-lab3-api-1,13.04%,11.27MiB / 384MiB +2026-10-16T18:03:00Z,mtusi-messenger-lab3-postgres-1,49.80%,195.5MiB / 384MiB +2026-10-16T18:03:00Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:03:00Z,mtusi-messenger-lab2-redis-1,0.24%,9.004MiB / 1.913GiB +2026-10-16T18:03:00Z,mtusi-messenger-lab3-lb-1,9.39%,11.57MiB / 64MiB +2026-10-16T18:03:00Z,mtusi-messenger-lab3-redis-1,0.24%,3.863MiB / 192MiB +2026-10-16T18:03:04Z,mtusi-messenger-lab3-api-2,17.88%,13.25MiB / 384MiB +2026-10-16T18:03:04Z,mtusi-messenger-lab3-api-1,17.71%,11.2MiB / 384MiB +2026-10-16T18:03:04Z,mtusi-messenger-lab3-postgres-1,48.96%,186.1MiB / 384MiB +2026-10-16T18:03:04Z,mtusi-messenger-lab2-postgres-1,0.70%,240.5MiB / 1.913GiB +2026-10-16T18:03:04Z,mtusi-messenger-lab2-redis-1,0.23%,9.004MiB / 1.913GiB +2026-10-16T18:03:04Z,mtusi-messenger-lab3-lb-1,13.68%,11.57MiB / 64MiB +2026-10-16T18:03:04Z,mtusi-messenger-lab3-redis-1,0.71%,3.863MiB / 192MiB +2026-10-16T18:03:07Z,mtusi-messenger-lab3-api-2,17.74%,13.3MiB / 384MiB +2026-10-16T18:03:07Z,mtusi-messenger-lab3-api-1,18.10%,11.32MiB / 384MiB +2026-10-16T18:03:07Z,mtusi-messenger-lab3-postgres-1,49.83%,186.6MiB / 384MiB +2026-10-16T18:03:07Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:03:07Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:03:07Z,mtusi-messenger-lab3-lb-1,13.22%,11.56MiB / 64MiB +2026-10-16T18:03:07Z,mtusi-messenger-lab3-redis-1,0.23%,3.863MiB / 192MiB +2026-10-16T18:03:10Z,mtusi-messenger-lab3-api-2,19.22%,13.18MiB / 384MiB +2026-10-16T18:03:10Z,mtusi-messenger-lab3-api-1,18.91%,10.92MiB / 384MiB +2026-10-16T18:03:10Z,mtusi-messenger-lab3-postgres-1,50.71%,187.1MiB / 384MiB +2026-10-16T18:03:10Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:03:10Z,mtusi-messenger-lab2-redis-1,0.20%,9.004MiB / 1.913GiB +2026-10-16T18:03:10Z,mtusi-messenger-lab3-lb-1,14.24%,11.57MiB / 64MiB +2026-10-16T18:03:10Z,mtusi-messenger-lab3-redis-1,0.73%,3.863MiB / 192MiB +2026-10-16T18:03:13Z,mtusi-messenger-lab3-api-2,17.91%,13.36MiB / 384MiB +2026-10-16T18:03:13Z,mtusi-messenger-lab3-api-1,18.45%,11.18MiB / 384MiB +2026-10-16T18:03:13Z,mtusi-messenger-lab3-postgres-1,49.05%,187.4MiB / 384MiB +2026-10-16T18:03:13Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:03:13Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:03:13Z,mtusi-messenger-lab3-lb-1,13.90%,11.57MiB / 64MiB +2026-10-16T18:03:13Z,mtusi-messenger-lab3-redis-1,0.24%,3.863MiB / 192MiB +2026-10-16T18:03:16Z,mtusi-messenger-lab3-api-2,18.09%,13.3MiB / 384MiB +2026-10-16T18:03:16Z,mtusi-messenger-lab3-api-1,18.66%,11.28MiB / 384MiB +2026-10-16T18:03:16Z,mtusi-messenger-lab3-postgres-1,48.96%,187.9MiB / 384MiB +2026-10-16T18:03:16Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:03:16Z,mtusi-messenger-lab2-redis-1,0.72%,9.004MiB / 1.913GiB +2026-10-16T18:03:16Z,mtusi-messenger-lab3-lb-1,13.32%,11.8MiB / 64MiB +2026-10-16T18:03:16Z,mtusi-messenger-lab3-redis-1,0.21%,3.863MiB / 192MiB +2026-10-16T18:03:19Z,mtusi-messenger-lab3-api-2,18.19%,13.39MiB / 384MiB +2026-10-16T18:03:19Z,mtusi-messenger-lab3-api-1,18.10%,11.25MiB / 384MiB +2026-10-16T18:03:19Z,mtusi-messenger-lab3-postgres-1,49.45%,188MiB / 384MiB +2026-10-16T18:03:19Z,mtusi-messenger-lab2-postgres-1,0.73%,240.5MiB / 1.913GiB +2026-10-16T18:03:19Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:03:19Z,mtusi-messenger-lab3-lb-1,13.70%,11.57MiB / 64MiB +2026-10-16T18:03:19Z,mtusi-messenger-lab3-redis-1,0.21%,3.863MiB / 192MiB +2026-10-16T18:03:22Z,mtusi-messenger-lab3-api-2,18.66%,13.22MiB / 384MiB +2026-10-16T18:03:22Z,mtusi-messenger-lab3-api-1,19.62%,11.25MiB / 384MiB +2026-10-16T18:03:22Z,mtusi-messenger-lab3-postgres-1,49.69%,188.3MiB / 384MiB +2026-10-16T18:03:22Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:03:22Z,mtusi-messenger-lab2-redis-1,0.76%,9.004MiB / 1.913GiB +2026-10-16T18:03:22Z,mtusi-messenger-lab3-lb-1,14.28%,11.56MiB / 64MiB +2026-10-16T18:03:22Z,mtusi-messenger-lab3-redis-1,0.23%,3.863MiB / 192MiB +2026-10-16T18:03:25Z,mtusi-messenger-lab3-api-2,18.62%,13.34MiB / 384MiB +2026-10-16T18:03:25Z,mtusi-messenger-lab3-api-1,18.39%,11.25MiB / 384MiB +2026-10-16T18:03:25Z,mtusi-messenger-lab3-postgres-1,50.11%,188.4MiB / 384MiB +2026-10-16T18:03:25Z,mtusi-messenger-lab2-postgres-1,0.00%,240.6MiB / 1.913GiB +2026-10-16T18:03:25Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:03:25Z,mtusi-messenger-lab3-lb-1,14.14%,11.57MiB / 64MiB +2026-10-16T18:03:25Z,mtusi-messenger-lab3-redis-1,0.21%,3.863MiB / 192MiB +2026-10-16T18:03:28Z,mtusi-messenger-lab3-api-2,16.59%,13.24MiB / 384MiB +2026-10-16T18:03:28Z,mtusi-messenger-lab3-api-1,15.98%,11.23MiB / 384MiB +2026-10-16T18:03:28Z,mtusi-messenger-lab3-postgres-1,43.46%,188.6MiB / 384MiB +2026-10-16T18:03:28Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:03:28Z,mtusi-messenger-lab2-redis-1,0.23%,9.004MiB / 1.913GiB +2026-10-16T18:03:28Z,mtusi-messenger-lab3-lb-1,12.25%,11.57MiB / 64MiB +2026-10-16T18:03:28Z,mtusi-messenger-lab3-redis-1,0.23%,3.863MiB / 192MiB +2026-10-16T18:03:31Z,mtusi-messenger-lab3-api-2,18.66%,13.45MiB / 384MiB +2026-10-16T18:03:31Z,mtusi-messenger-lab3-api-1,19.18%,13.6MiB / 384MiB +2026-10-16T18:03:31Z,mtusi-messenger-lab3-postgres-1,49.64%,188.8MiB / 384MiB +2026-10-16T18:03:31Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:03:31Z,mtusi-messenger-lab2-redis-1,0.66%,9.004MiB / 1.913GiB +2026-10-16T18:03:31Z,mtusi-messenger-lab3-lb-1,14.05%,11.58MiB / 64MiB +2026-10-16T18:03:31Z,mtusi-messenger-lab3-redis-1,0.23%,3.863MiB / 192MiB +2026-10-16T18:03:34Z,mtusi-messenger-lab3-api-2,19.13%,13.44MiB / 384MiB +2026-10-16T18:03:34Z,mtusi-messenger-lab3-api-1,18.16%,11.23MiB / 384MiB +2026-10-16T18:03:34Z,mtusi-messenger-lab3-postgres-1,48.37%,188.8MiB / 384MiB +2026-10-16T18:03:34Z,mtusi-messenger-lab2-postgres-1,0.79%,240.5MiB / 1.913GiB +2026-10-16T18:03:34Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:03:34Z,mtusi-messenger-lab3-lb-1,13.94%,11.57MiB / 64MiB +2026-10-16T18:03:34Z,mtusi-messenger-lab3-redis-1,0.70%,3.863MiB / 192MiB +2026-10-16T18:03:37Z,mtusi-messenger-lab3-api-2,17.44%,13.33MiB / 384MiB +2026-10-16T18:03:37Z,mtusi-messenger-lab3-api-1,18.33%,11.23MiB / 384MiB +2026-10-16T18:03:37Z,mtusi-messenger-lab3-postgres-1,47.73%,189.2MiB / 384MiB +2026-10-16T18:03:37Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:03:37Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:03:37Z,mtusi-messenger-lab3-lb-1,13.68%,11.57MiB / 64MiB +2026-10-16T18:03:37Z,mtusi-messenger-lab3-redis-1,0.21%,3.863MiB / 192MiB diff --git a/evidence/track1/superseded/run2-host-client/stats-g10.csv b/evidence/track1/superseded/run2-host-client/stats-g10.csv new file mode 100644 index 00000000..aa406191 --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/stats-g10.csv @@ -0,0 +1,141 @@ +timestamp,container,cpu_percent,mem_usage +2026-10-16T18:03:58Z,mtusi-messenger-lab3-api-2,18.80%,168.3MiB / 384MiB +2026-10-16T18:03:58Z,mtusi-messenger-lab3-api-1,19.24%,168.4MiB / 384MiB +2026-10-16T18:03:58Z,mtusi-messenger-lab3-postgres-1,50.84%,197.8MiB / 384MiB +2026-10-16T18:03:58Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:03:58Z,mtusi-messenger-lab2-redis-1,0.23%,9.004MiB / 1.913GiB +2026-10-16T18:03:58Z,mtusi-messenger-lab3-lb-1,10.95%,11.57MiB / 64MiB +2026-10-16T18:03:58Z,mtusi-messenger-lab3-redis-1,0.81%,3.863MiB / 192MiB +2026-10-16T18:04:02Z,mtusi-messenger-lab3-api-2,19.42%,11.03MiB / 384MiB +2026-10-16T18:04:02Z,mtusi-messenger-lab3-api-1,19.30%,11.29MiB / 384MiB +2026-10-16T18:04:02Z,mtusi-messenger-lab3-postgres-1,50.68%,192.2MiB / 384MiB +2026-10-16T18:04:02Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:04:02Z,mtusi-messenger-lab2-redis-1,0.24%,9.004MiB / 1.913GiB +2026-10-16T18:04:02Z,mtusi-messenger-lab3-lb-1,14.56%,11.57MiB / 64MiB +2026-10-16T18:04:02Z,mtusi-messenger-lab3-redis-1,0.21%,3.863MiB / 192MiB +2026-10-16T18:04:05Z,mtusi-messenger-lab3-api-2,19.04%,10.98MiB / 384MiB +2026-10-16T18:04:05Z,mtusi-messenger-lab3-api-1,19.86%,11.09MiB / 384MiB +2026-10-16T18:04:05Z,mtusi-messenger-lab3-postgres-1,50.45%,192.2MiB / 384MiB +2026-10-16T18:04:05Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:04:05Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:04:05Z,mtusi-messenger-lab3-lb-1,14.70%,11.58MiB / 64MiB +2026-10-16T18:04:05Z,mtusi-messenger-lab3-redis-1,0.20%,3.863MiB / 192MiB +2026-10-16T18:04:08Z,mtusi-messenger-lab3-api-2,19.61%,11.22MiB / 384MiB +2026-10-16T18:04:08Z,mtusi-messenger-lab3-api-1,19.10%,11.06MiB / 384MiB +2026-10-16T18:04:08Z,mtusi-messenger-lab3-postgres-1,49.85%,192.4MiB / 384MiB +2026-10-16T18:04:08Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:04:08Z,mtusi-messenger-lab2-redis-1,0.23%,9.004MiB / 1.913GiB +2026-10-16T18:04:08Z,mtusi-messenger-lab3-lb-1,14.61%,11.57MiB / 64MiB +2026-10-16T18:04:08Z,mtusi-messenger-lab3-redis-1,0.23%,3.863MiB / 192MiB +2026-10-16T18:04:11Z,mtusi-messenger-lab3-api-2,19.50%,11.04MiB / 384MiB +2026-10-16T18:04:11Z,mtusi-messenger-lab3-api-1,19.18%,11MiB / 384MiB +2026-10-16T18:04:11Z,mtusi-messenger-lab3-postgres-1,50.13%,192.8MiB / 384MiB +2026-10-16T18:04:11Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:04:11Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:04:11Z,mtusi-messenger-lab3-lb-1,14.52%,11.57MiB / 64MiB +2026-10-16T18:04:11Z,mtusi-messenger-lab3-redis-1,0.22%,3.863MiB / 192MiB +2026-10-16T18:04:14Z,mtusi-messenger-lab3-api-2,14.52%,11.29MiB / 384MiB +2026-10-16T18:04:14Z,mtusi-messenger-lab3-api-1,15.10%,11MiB / 384MiB +2026-10-16T18:04:14Z,mtusi-messenger-lab3-postgres-1,37.84%,193MiB / 384MiB +2026-10-16T18:04:14Z,mtusi-messenger-lab2-postgres-1,0.80%,240.5MiB / 1.913GiB +2026-10-16T18:04:14Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:04:14Z,mtusi-messenger-lab3-lb-1,11.29%,11.57MiB / 64MiB +2026-10-16T18:04:14Z,mtusi-messenger-lab3-redis-1,0.24%,3.863MiB / 192MiB +2026-10-16T18:04:17Z,mtusi-messenger-lab3-api-2,20.19%,11.09MiB / 384MiB +2026-10-16T18:04:17Z,mtusi-messenger-lab3-api-1,19.71%,11MiB / 384MiB +2026-10-16T18:04:17Z,mtusi-messenger-lab3-postgres-1,50.46%,193.5MiB / 384MiB +2026-10-16T18:04:17Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:04:17Z,mtusi-messenger-lab2-redis-1,0.71%,9.004MiB / 1.913GiB +2026-10-16T18:04:17Z,mtusi-messenger-lab3-lb-1,14.72%,11.58MiB / 64MiB +2026-10-16T18:04:17Z,mtusi-messenger-lab3-redis-1,0.21%,3.863MiB / 192MiB +2026-10-16T18:04:20Z,mtusi-messenger-lab3-api-2,19.00%,11.19MiB / 384MiB +2026-10-16T18:04:20Z,mtusi-messenger-lab3-api-1,18.60%,11.09MiB / 384MiB +2026-10-16T18:04:20Z,mtusi-messenger-lab3-postgres-1,48.99%,193.5MiB / 384MiB +2026-10-16T18:04:20Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:04:20Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:04:20Z,mtusi-messenger-lab3-lb-1,14.50%,11.57MiB / 64MiB +2026-10-16T18:04:20Z,mtusi-messenger-lab3-redis-1,0.74%,3.863MiB / 192MiB +2026-10-16T18:04:23Z,mtusi-messenger-lab3-api-2,17.52%,11.46MiB / 384MiB +2026-10-16T18:04:23Z,mtusi-messenger-lab3-api-1,19.76%,11.11MiB / 384MiB +2026-10-16T18:04:23Z,mtusi-messenger-lab3-postgres-1,43.80%,193.8MiB / 384MiB +2026-10-16T18:04:23Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:04:23Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:04:23Z,mtusi-messenger-lab3-lb-1,13.19%,11.52MiB / 64MiB +2026-10-16T18:04:23Z,mtusi-messenger-lab3-redis-1,0.22%,3.863MiB / 192MiB +2026-10-16T18:04:26Z,mtusi-messenger-lab3-api-2,19.86%,10.97MiB / 384MiB +2026-10-16T18:04:26Z,mtusi-messenger-lab3-api-1,19.28%,11.01MiB / 384MiB +2026-10-16T18:04:26Z,mtusi-messenger-lab3-postgres-1,50.53%,194MiB / 384MiB +2026-10-16T18:04:26Z,mtusi-messenger-lab2-postgres-1,0.24%,240.5MiB / 1.913GiB +2026-10-16T18:04:26Z,mtusi-messenger-lab2-redis-1,0.68%,9.004MiB / 1.913GiB +2026-10-16T18:04:26Z,mtusi-messenger-lab3-lb-1,14.46%,11.57MiB / 64MiB +2026-10-16T18:04:26Z,mtusi-messenger-lab3-redis-1,0.21%,3.863MiB / 192MiB +2026-10-16T18:04:29Z,mtusi-messenger-lab3-api-2,18.86%,11.22MiB / 384MiB +2026-10-16T18:04:29Z,mtusi-messenger-lab3-api-1,19.31%,11.09MiB / 384MiB +2026-10-16T18:04:29Z,mtusi-messenger-lab3-postgres-1,49.22%,194.2MiB / 384MiB +2026-10-16T18:04:29Z,mtusi-messenger-lab2-postgres-1,0.73%,240.5MiB / 1.913GiB +2026-10-16T18:04:29Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:04:29Z,mtusi-messenger-lab3-lb-1,14.58%,11.57MiB / 64MiB +2026-10-16T18:04:29Z,mtusi-messenger-lab3-redis-1,0.22%,3.863MiB / 192MiB +2026-10-16T18:04:32Z,mtusi-messenger-lab3-api-2,17.91%,11.14MiB / 384MiB +2026-10-16T18:04:32Z,mtusi-messenger-lab3-api-1,14.49%,11.06MiB / 384MiB +2026-10-16T18:04:32Z,mtusi-messenger-lab3-postgres-1,36.01%,194.8MiB / 384MiB +2026-10-16T18:04:32Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:04:32Z,mtusi-messenger-lab2-redis-1,0.20%,9.004MiB / 1.913GiB +2026-10-16T18:04:32Z,mtusi-messenger-lab3-lb-1,10.69%,11.58MiB / 64MiB +2026-10-16T18:04:32Z,mtusi-messenger-lab3-redis-1,0.22%,3.863MiB / 192MiB +2026-10-16T18:04:35Z,mtusi-messenger-lab3-api-2,19.32%,11.29MiB / 384MiB +2026-10-16T18:04:35Z,mtusi-messenger-lab3-api-1,19.87%,11.05MiB / 384MiB +2026-10-16T18:04:35Z,mtusi-messenger-lab3-postgres-1,49.86%,194.8MiB / 384MiB +2026-10-16T18:04:35Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:04:35Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:04:35Z,mtusi-messenger-lab3-lb-1,14.82%,11.58MiB / 64MiB +2026-10-16T18:04:35Z,mtusi-messenger-lab3-redis-1,0.69%,3.863MiB / 192MiB +2026-10-16T18:04:38Z,mtusi-messenger-lab3-api-2,19.18%,11.07MiB / 384MiB +2026-10-16T18:04:38Z,mtusi-messenger-lab3-api-1,19.71%,11.13MiB / 384MiB +2026-10-16T18:04:38Z,mtusi-messenger-lab3-postgres-1,49.73%,195.1MiB / 384MiB +2026-10-16T18:04:38Z,mtusi-messenger-lab2-postgres-1,0.21%,240.5MiB / 1.913GiB +2026-10-16T18:04:38Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:04:38Z,mtusi-messenger-lab3-lb-1,14.71%,11.57MiB / 64MiB +2026-10-16T18:04:38Z,mtusi-messenger-lab3-redis-1,0.20%,3.863MiB / 192MiB +2026-10-16T18:04:42Z,mtusi-messenger-lab3-api-2,19.16%,11.25MiB / 384MiB +2026-10-16T18:04:42Z,mtusi-messenger-lab3-api-1,18.94%,11.12MiB / 384MiB +2026-10-16T18:04:42Z,mtusi-messenger-lab3-postgres-1,50.58%,195.7MiB / 384MiB +2026-10-16T18:04:42Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:04:42Z,mtusi-messenger-lab2-redis-1,0.70%,9.004MiB / 1.913GiB +2026-10-16T18:04:42Z,mtusi-messenger-lab3-lb-1,14.56%,11.57MiB / 64MiB +2026-10-16T18:04:42Z,mtusi-messenger-lab3-redis-1,0.21%,3.863MiB / 192MiB +2026-10-16T18:04:45Z,mtusi-messenger-lab3-api-2,15.05%,11.41MiB / 384MiB +2026-10-16T18:04:45Z,mtusi-messenger-lab3-api-1,14.81%,11.14MiB / 384MiB +2026-10-16T18:04:45Z,mtusi-messenger-lab3-postgres-1,38.51%,195.9MiB / 384MiB +2026-10-16T18:04:45Z,mtusi-messenger-lab2-postgres-1,0.78%,240.5MiB / 1.913GiB +2026-10-16T18:04:45Z,mtusi-messenger-lab2-redis-1,0.24%,9.004MiB / 1.913GiB +2026-10-16T18:04:45Z,mtusi-messenger-lab3-lb-1,2.96%,11.52MiB / 64MiB +2026-10-16T18:04:45Z,mtusi-messenger-lab3-redis-1,0.23%,3.863MiB / 192MiB +2026-10-16T18:04:48Z,mtusi-messenger-lab3-api-2,19.00%,11.06MiB / 384MiB +2026-10-16T18:04:48Z,mtusi-messenger-lab3-api-1,18.90%,11.26MiB / 384MiB +2026-10-16T18:04:48Z,mtusi-messenger-lab3-postgres-1,49.71%,196MiB / 384MiB +2026-10-16T18:04:48Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:04:48Z,mtusi-messenger-lab2-redis-1,0.24%,9.004MiB / 1.913GiB +2026-10-16T18:04:48Z,mtusi-messenger-lab3-lb-1,14.63%,11.57MiB / 64MiB +2026-10-16T18:04:48Z,mtusi-messenger-lab3-redis-1,0.23%,3.863MiB / 192MiB +2026-10-16T18:04:51Z,mtusi-messenger-lab3-api-2,0.69%,11.42MiB / 384MiB +2026-10-16T18:04:51Z,mtusi-messenger-lab3-api-1,0.60%,10.98MiB / 384MiB +2026-10-16T18:04:51Z,mtusi-messenger-lab3-postgres-1,50.55%,196.3MiB / 384MiB +2026-10-16T18:04:51Z,mtusi-messenger-lab2-postgres-1,0.23%,240.5MiB / 1.913GiB +2026-10-16T18:04:51Z,mtusi-messenger-lab2-redis-1,0.20%,9.004MiB / 1.913GiB +2026-10-16T18:04:51Z,mtusi-messenger-lab3-lb-1,0.47%,11.52MiB / 64MiB +2026-10-16T18:04:51Z,mtusi-messenger-lab3-redis-1,0.22%,3.863MiB / 192MiB +2026-10-16T18:04:54Z,mtusi-messenger-lab3-api-2,19.30%,11.42MiB / 384MiB +2026-10-16T18:04:54Z,mtusi-messenger-lab3-api-1,19.42%,11.04MiB / 384MiB +2026-10-16T18:04:54Z,mtusi-messenger-lab3-postgres-1,50.00%,196.3MiB / 384MiB +2026-10-16T18:04:54Z,mtusi-messenger-lab2-postgres-1,0.68%,240.5MiB / 1.913GiB +2026-10-16T18:04:54Z,mtusi-messenger-lab2-redis-1,0.20%,9.004MiB / 1.913GiB +2026-10-16T18:04:54Z,mtusi-messenger-lab3-lb-1,14.52%,11.57MiB / 64MiB +2026-10-16T18:04:54Z,mtusi-messenger-lab3-redis-1,0.71%,3.863MiB / 192MiB +2026-10-16T18:04:57Z,mtusi-messenger-lab3-api-2,11.32%,11MiB / 384MiB +2026-10-16T18:04:57Z,mtusi-messenger-lab3-api-1,11.02%,11.1MiB / 384MiB +2026-10-16T18:04:57Z,mtusi-messenger-lab3-postgres-1,39.14%,207.5MiB / 384MiB +2026-10-16T18:04:57Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:04:57Z,mtusi-messenger-lab2-redis-1,0.70%,9.004MiB / 1.913GiB +2026-10-16T18:04:57Z,mtusi-messenger-lab3-lb-1,8.16%,11.52MiB / 64MiB +2026-10-16T18:04:57Z,mtusi-messenger-lab3-redis-1,0.20%,3.863MiB / 192MiB diff --git a/evidence/track1/superseded/run2-host-client/stats-g15.csv b/evidence/track1/superseded/run2-host-client/stats-g15.csv new file mode 100644 index 00000000..2bd6d5fb --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/stats-g15.csv @@ -0,0 +1,141 @@ +timestamp,container,cpu_percent,mem_usage +2026-10-16T18:05:16Z,mtusi-messenger-lab3-api-2,18.49%,168MiB / 384MiB +2026-10-16T18:05:16Z,mtusi-messenger-lab3-api-1,18.28%,103.5MiB / 384MiB +2026-10-16T18:05:16Z,mtusi-messenger-lab3-postgres-1,49.31%,191.3MiB / 384MiB +2026-10-16T18:05:16Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:05:16Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:05:16Z,mtusi-messenger-lab3-lb-1,14.57%,11.57MiB / 64MiB +2026-10-16T18:05:16Z,mtusi-messenger-lab3-redis-1,0.22%,3.863MiB / 192MiB +2026-10-16T18:05:19Z,mtusi-messenger-lab3-api-2,19.49%,11.12MiB / 384MiB +2026-10-16T18:05:19Z,mtusi-messenger-lab3-api-1,19.62%,10.96MiB / 384MiB +2026-10-16T18:05:19Z,mtusi-messenger-lab3-postgres-1,49.52%,192.3MiB / 384MiB +2026-10-16T18:05:19Z,mtusi-messenger-lab2-postgres-1,0.79%,240.5MiB / 1.913GiB +2026-10-16T18:05:19Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:05:19Z,mtusi-messenger-lab3-lb-1,13.96%,11.59MiB / 64MiB +2026-10-16T18:05:19Z,mtusi-messenger-lab3-redis-1,0.24%,3.863MiB / 192MiB +2026-10-16T18:05:22Z,mtusi-messenger-lab3-api-2,19.25%,11.14MiB / 384MiB +2026-10-16T18:05:22Z,mtusi-messenger-lab3-api-1,18.85%,11MiB / 384MiB +2026-10-16T18:05:22Z,mtusi-messenger-lab3-postgres-1,50.12%,192.2MiB / 384MiB +2026-10-16T18:05:22Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:05:22Z,mtusi-messenger-lab2-redis-1,0.68%,9.004MiB / 1.913GiB +2026-10-16T18:05:22Z,mtusi-messenger-lab3-lb-1,14.28%,11.59MiB / 64MiB +2026-10-16T18:05:22Z,mtusi-messenger-lab3-redis-1,0.23%,3.863MiB / 192MiB +2026-10-16T18:05:25Z,mtusi-messenger-lab3-api-2,19.31%,10.96MiB / 384MiB +2026-10-16T18:05:25Z,mtusi-messenger-lab3-api-1,19.62%,10.82MiB / 384MiB +2026-10-16T18:05:25Z,mtusi-messenger-lab3-postgres-1,50.26%,192.5MiB / 384MiB +2026-10-16T18:05:25Z,mtusi-messenger-lab2-postgres-1,0.71%,240.5MiB / 1.913GiB +2026-10-16T18:05:25Z,mtusi-messenger-lab2-redis-1,0.24%,9.004MiB / 1.913GiB +2026-10-16T18:05:25Z,mtusi-messenger-lab3-lb-1,14.36%,11.57MiB / 64MiB +2026-10-16T18:05:25Z,mtusi-messenger-lab3-redis-1,0.19%,3.863MiB / 192MiB +2026-10-16T18:05:28Z,mtusi-messenger-lab3-api-2,15.99%,11.09MiB / 384MiB +2026-10-16T18:05:28Z,mtusi-messenger-lab3-api-1,16.11%,10.94MiB / 384MiB +2026-10-16T18:05:28Z,mtusi-messenger-lab3-postgres-1,40.57%,192.7MiB / 384MiB +2026-10-16T18:05:28Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:05:28Z,mtusi-messenger-lab2-redis-1,0.24%,9.004MiB / 1.913GiB +2026-10-16T18:05:28Z,mtusi-messenger-lab3-lb-1,12.21%,11.52MiB / 64MiB +2026-10-16T18:05:28Z,mtusi-messenger-lab3-redis-1,0.21%,3.863MiB / 192MiB +2026-10-16T18:05:31Z,mtusi-messenger-lab3-api-2,19.42%,11.04MiB / 384MiB +2026-10-16T18:05:31Z,mtusi-messenger-lab3-api-1,19.63%,10.88MiB / 384MiB +2026-10-16T18:05:31Z,mtusi-messenger-lab3-postgres-1,49.72%,193MiB / 384MiB +2026-10-16T18:05:31Z,mtusi-messenger-lab2-postgres-1,0.00%,240.6MiB / 1.913GiB +2026-10-16T18:05:31Z,mtusi-messenger-lab2-redis-1,0.20%,9.004MiB / 1.913GiB +2026-10-16T18:05:31Z,mtusi-messenger-lab3-lb-1,15.01%,11.57MiB / 64MiB +2026-10-16T18:05:31Z,mtusi-messenger-lab3-redis-1,0.23%,3.863MiB / 192MiB +2026-10-16T18:05:34Z,mtusi-messenger-lab3-api-2,19.30%,11.1MiB / 384MiB +2026-10-16T18:05:34Z,mtusi-messenger-lab3-api-1,20.91%,11.06MiB / 384MiB +2026-10-16T18:05:34Z,mtusi-messenger-lab3-postgres-1,50.90%,193.3MiB / 384MiB +2026-10-16T18:05:34Z,mtusi-messenger-lab2-postgres-1,0.74%,240.5MiB / 1.913GiB +2026-10-16T18:05:34Z,mtusi-messenger-lab2-redis-1,0.20%,9.004MiB / 1.913GiB +2026-10-16T18:05:34Z,mtusi-messenger-lab3-lb-1,15.15%,11.55MiB / 64MiB +2026-10-16T18:05:34Z,mtusi-messenger-lab3-redis-1,0.22%,3.863MiB / 192MiB +2026-10-16T18:05:38Z,mtusi-messenger-lab3-api-2,19.89%,11.09MiB / 384MiB +2026-10-16T18:05:38Z,mtusi-messenger-lab3-api-1,19.51%,11.32MiB / 384MiB +2026-10-16T18:05:38Z,mtusi-messenger-lab3-postgres-1,49.76%,193.5MiB / 384MiB +2026-10-16T18:05:38Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:05:38Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:05:38Z,mtusi-messenger-lab3-lb-1,15.10%,11.57MiB / 64MiB +2026-10-16T18:05:38Z,mtusi-messenger-lab3-redis-1,0.23%,3.863MiB / 192MiB +2026-10-16T18:05:41Z,mtusi-messenger-lab3-api-2,19.05%,11.04MiB / 384MiB +2026-10-16T18:05:41Z,mtusi-messenger-lab3-api-1,18.38%,10.95MiB / 384MiB +2026-10-16T18:05:41Z,mtusi-messenger-lab3-postgres-1,49.61%,193.9MiB / 384MiB +2026-10-16T18:05:41Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:05:41Z,mtusi-messenger-lab2-redis-1,0.20%,9.004MiB / 1.913GiB +2026-10-16T18:05:41Z,mtusi-messenger-lab3-lb-1,14.29%,11.58MiB / 64MiB +2026-10-16T18:05:41Z,mtusi-messenger-lab3-redis-1,0.21%,3.863MiB / 192MiB +2026-10-16T18:05:44Z,mtusi-messenger-lab3-api-2,13.40%,11.05MiB / 384MiB +2026-10-16T18:05:44Z,mtusi-messenger-lab3-api-1,13.86%,11.02MiB / 384MiB +2026-10-16T18:05:44Z,mtusi-messenger-lab3-postgres-1,33.98%,194.2MiB / 384MiB +2026-10-16T18:05:44Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:05:44Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:05:44Z,mtusi-messenger-lab3-lb-1,9.91%,11.56MiB / 64MiB +2026-10-16T18:05:44Z,mtusi-messenger-lab3-redis-1,0.21%,3.863MiB / 192MiB +2026-10-16T18:05:47Z,mtusi-messenger-lab3-api-2,19.23%,11MiB / 384MiB +2026-10-16T18:05:47Z,mtusi-messenger-lab3-api-1,19.00%,10.95MiB / 384MiB +2026-10-16T18:05:47Z,mtusi-messenger-lab3-postgres-1,50.21%,194.5MiB / 384MiB +2026-10-16T18:05:47Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:05:47Z,mtusi-messenger-lab2-redis-1,0.69%,9.004MiB / 1.913GiB +2026-10-16T18:05:47Z,mtusi-messenger-lab3-lb-1,14.64%,11.57MiB / 64MiB +2026-10-16T18:05:47Z,mtusi-messenger-lab3-redis-1,0.23%,3.863MiB / 192MiB +2026-10-16T18:05:50Z,mtusi-messenger-lab3-api-2,14.06%,10.88MiB / 384MiB +2026-10-16T18:05:50Z,mtusi-messenger-lab3-api-1,13.96%,10.86MiB / 384MiB +2026-10-16T18:05:50Z,mtusi-messenger-lab3-postgres-1,49.22%,202.6MiB / 384MiB +2026-10-16T18:05:50Z,mtusi-messenger-lab2-postgres-1,0.84%,240.5MiB / 1.913GiB +2026-10-16T18:05:50Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:05:50Z,mtusi-messenger-lab3-lb-1,10.07%,11.57MiB / 64MiB +2026-10-16T18:05:50Z,mtusi-messenger-lab3-redis-1,0.85%,3.863MiB / 192MiB +2026-10-16T18:05:53Z,mtusi-messenger-lab3-api-2,18.04%,10.99MiB / 384MiB +2026-10-16T18:05:53Z,mtusi-messenger-lab3-api-1,18.24%,10.95MiB / 384MiB +2026-10-16T18:05:53Z,mtusi-messenger-lab3-postgres-1,48.45%,195.2MiB / 384MiB +2026-10-16T18:05:53Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:05:53Z,mtusi-messenger-lab2-redis-1,0.19%,9.004MiB / 1.913GiB +2026-10-16T18:05:53Z,mtusi-messenger-lab3-lb-1,13.54%,11.56MiB / 64MiB +2026-10-16T18:05:53Z,mtusi-messenger-lab3-redis-1,0.22%,3.863MiB / 192MiB +2026-10-16T18:05:56Z,mtusi-messenger-lab3-api-2,19.10%,10.99MiB / 384MiB +2026-10-16T18:05:56Z,mtusi-messenger-lab3-api-1,19.42%,10.86MiB / 384MiB +2026-10-16T18:05:56Z,mtusi-messenger-lab3-postgres-1,49.58%,195.9MiB / 384MiB +2026-10-16T18:05:56Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:05:56Z,mtusi-messenger-lab2-redis-1,0.20%,9.004MiB / 1.913GiB +2026-10-16T18:05:56Z,mtusi-messenger-lab3-lb-1,14.43%,11.58MiB / 64MiB +2026-10-16T18:05:56Z,mtusi-messenger-lab3-redis-1,0.22%,3.863MiB / 192MiB +2026-10-16T18:05:59Z,mtusi-messenger-lab3-api-2,19.82%,10.98MiB / 384MiB +2026-10-16T18:05:59Z,mtusi-messenger-lab3-api-1,19.00%,10.85MiB / 384MiB +2026-10-16T18:05:59Z,mtusi-messenger-lab3-postgres-1,50.02%,195.8MiB / 384MiB +2026-10-16T18:05:59Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:05:59Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:05:59Z,mtusi-messenger-lab3-lb-1,14.60%,11.82MiB / 64MiB +2026-10-16T18:05:59Z,mtusi-messenger-lab3-redis-1,0.64%,3.863MiB / 192MiB +2026-10-16T18:06:02Z,mtusi-messenger-lab3-api-2,19.59%,11MiB / 384MiB +2026-10-16T18:06:02Z,mtusi-messenger-lab3-api-1,19.24%,10.87MiB / 384MiB +2026-10-16T18:06:02Z,mtusi-messenger-lab3-postgres-1,50.63%,196.2MiB / 384MiB +2026-10-16T18:06:02Z,mtusi-messenger-lab2-postgres-1,0.22%,240.6MiB / 1.913GiB +2026-10-16T18:06:02Z,mtusi-messenger-lab2-redis-1,0.65%,9.004MiB / 1.913GiB +2026-10-16T18:06:02Z,mtusi-messenger-lab3-lb-1,14.53%,11.57MiB / 64MiB +2026-10-16T18:06:02Z,mtusi-messenger-lab3-redis-1,0.19%,3.863MiB / 192MiB +2026-10-16T18:06:05Z,mtusi-messenger-lab3-api-2,19.83%,11.03MiB / 384MiB +2026-10-16T18:06:05Z,mtusi-messenger-lab3-api-1,19.97%,10.84MiB / 384MiB +2026-10-16T18:06:05Z,mtusi-messenger-lab3-postgres-1,52.01%,196.7MiB / 384MiB +2026-10-16T18:06:05Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:06:05Z,mtusi-messenger-lab2-redis-1,0.24%,9.004MiB / 1.913GiB +2026-10-16T18:06:05Z,mtusi-messenger-lab3-lb-1,15.34%,11.57MiB / 64MiB +2026-10-16T18:06:05Z,mtusi-messenger-lab3-redis-1,0.66%,3.863MiB / 192MiB +2026-10-16T18:06:08Z,mtusi-messenger-lab3-api-2,19.37%,11.02MiB / 384MiB +2026-10-16T18:06:08Z,mtusi-messenger-lab3-api-1,19.61%,11.07MiB / 384MiB +2026-10-16T18:06:08Z,mtusi-messenger-lab3-postgres-1,50.26%,193.7MiB / 384MiB +2026-10-16T18:06:08Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:06:08Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:06:08Z,mtusi-messenger-lab3-lb-1,14.62%,11.58MiB / 64MiB +2026-10-16T18:06:08Z,mtusi-messenger-lab3-redis-1,0.22%,3.863MiB / 192MiB +2026-10-16T18:06:11Z,mtusi-messenger-lab3-api-2,19.75%,10.96MiB / 384MiB +2026-10-16T18:06:11Z,mtusi-messenger-lab3-api-1,19.44%,10.75MiB / 384MiB +2026-10-16T18:06:11Z,mtusi-messenger-lab3-postgres-1,51.10%,194MiB / 384MiB +2026-10-16T18:06:11Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:06:11Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:06:11Z,mtusi-messenger-lab3-lb-1,15.00%,11.82MiB / 64MiB +2026-10-16T18:06:11Z,mtusi-messenger-lab3-redis-1,0.21%,3.863MiB / 192MiB +2026-10-16T18:06:15Z,mtusi-messenger-lab3-api-2,14.85%,11.04MiB / 384MiB +2026-10-16T18:06:15Z,mtusi-messenger-lab3-api-1,14.65%,10.85MiB / 384MiB +2026-10-16T18:06:15Z,mtusi-messenger-lab3-postgres-1,52.78%,205.6MiB / 384MiB +2026-10-16T18:06:15Z,mtusi-messenger-lab2-postgres-1,0.94%,240.5MiB / 1.913GiB +2026-10-16T18:06:15Z,mtusi-messenger-lab2-redis-1,0.20%,9.004MiB / 1.913GiB +2026-10-16T18:06:15Z,mtusi-messenger-lab3-lb-1,10.93%,11.52MiB / 64MiB +2026-10-16T18:06:15Z,mtusi-messenger-lab3-redis-1,0.21%,3.863MiB / 192MiB diff --git a/evidence/track1/superseded/run2-host-client/stats-lb1cpu.csv b/evidence/track1/superseded/run2-host-client/stats-lb1cpu.csv new file mode 100644 index 00000000..14875f01 --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/stats-lb1cpu.csv @@ -0,0 +1,141 @@ +timestamp,container,cpu_percent,mem_usage +2026-10-16T18:10:38Z,mtusi-messenger-lab3-lb-1,15.35%,13.64MiB / 64MiB +2026-10-16T18:10:38Z,mtusi-messenger-lab3-postgres-1,50.53%,66.22MiB / 384MiB +2026-10-16T18:10:38Z,mtusi-messenger-lab3-api-1,19.61%,168.2MiB / 384MiB +2026-10-16T18:10:38Z,mtusi-messenger-lab3-api-2,19.66%,168MiB / 384MiB +2026-10-16T18:10:38Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:10:38Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:10:38Z,mtusi-messenger-lab3-redis-1,0.24%,3.863MiB / 192MiB +2026-10-16T18:10:41Z,mtusi-messenger-lab3-lb-1,15.06%,13.86MiB / 64MiB +2026-10-16T18:10:41Z,mtusi-messenger-lab3-postgres-1,49.35%,70.21MiB / 384MiB +2026-10-16T18:10:41Z,mtusi-messenger-lab3-api-1,20.32%,11.48MiB / 384MiB +2026-10-16T18:10:41Z,mtusi-messenger-lab3-api-2,20.48%,11.02MiB / 384MiB +2026-10-16T18:10:41Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:10:41Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:10:41Z,mtusi-messenger-lab3-redis-1,0.24%,3.863MiB / 192MiB +2026-10-16T18:10:44Z,mtusi-messenger-lab3-lb-1,14.88%,13.63MiB / 64MiB +2026-10-16T18:10:44Z,mtusi-messenger-lab3-postgres-1,49.88%,73.32MiB / 384MiB +2026-10-16T18:10:44Z,mtusi-messenger-lab3-api-1,20.41%,11.41MiB / 384MiB +2026-10-16T18:10:44Z,mtusi-messenger-lab3-api-2,20.09%,10.93MiB / 384MiB +2026-10-16T18:10:44Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:10:44Z,mtusi-messenger-lab2-redis-1,0.71%,9.004MiB / 1.913GiB +2026-10-16T18:10:44Z,mtusi-messenger-lab3-redis-1,0.23%,3.863MiB / 192MiB +2026-10-16T18:10:47Z,mtusi-messenger-lab3-lb-1,15.15%,13.6MiB / 64MiB +2026-10-16T18:10:47Z,mtusi-messenger-lab3-postgres-1,51.17%,76.41MiB / 384MiB +2026-10-16T18:10:47Z,mtusi-messenger-lab3-api-1,20.41%,11.36MiB / 384MiB +2026-10-16T18:10:47Z,mtusi-messenger-lab3-api-2,20.17%,10.95MiB / 384MiB +2026-10-16T18:10:47Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:10:47Z,mtusi-messenger-lab2-redis-1,0.23%,9.004MiB / 1.913GiB +2026-10-16T18:10:47Z,mtusi-messenger-lab3-redis-1,0.76%,3.863MiB / 192MiB +2026-10-16T18:10:50Z,mtusi-messenger-lab3-lb-1,2.68%,13.57MiB / 64MiB +2026-10-16T18:10:50Z,mtusi-messenger-lab3-postgres-1,9.63%,78.66MiB / 384MiB +2026-10-16T18:10:50Z,mtusi-messenger-lab3-api-1,3.77%,10.86MiB / 384MiB +2026-10-16T18:10:50Z,mtusi-messenger-lab3-api-2,19.88%,10.99MiB / 384MiB +2026-10-16T18:10:50Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:10:50Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:10:50Z,mtusi-messenger-lab3-redis-1,0.24%,3.863MiB / 192MiB +2026-10-16T18:10:53Z,mtusi-messenger-lab3-lb-1,4.85%,13.61MiB / 64MiB +2026-10-16T18:10:53Z,mtusi-messenger-lab3-postgres-1,16.27%,79.33MiB / 384MiB +2026-10-16T18:10:53Z,mtusi-messenger-lab3-api-1,6.22%,10.78MiB / 384MiB +2026-10-16T18:10:53Z,mtusi-messenger-lab3-api-2,6.51%,11MiB / 384MiB +2026-10-16T18:10:53Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:10:53Z,mtusi-messenger-lab2-redis-1,0.20%,9.004MiB / 1.913GiB +2026-10-16T18:10:53Z,mtusi-messenger-lab3-redis-1,0.24%,3.863MiB / 192MiB +2026-10-16T18:10:56Z,mtusi-messenger-lab3-lb-1,14.37%,13.61MiB / 64MiB +2026-10-16T18:10:56Z,mtusi-messenger-lab3-postgres-1,48.63%,82.38MiB / 384MiB +2026-10-16T18:10:56Z,mtusi-messenger-lab3-api-1,19.18%,10.95MiB / 384MiB +2026-10-16T18:10:56Z,mtusi-messenger-lab3-api-2,19.41%,10.99MiB / 384MiB +2026-10-16T18:10:56Z,mtusi-messenger-lab2-postgres-1,0.78%,178.3MiB / 1.913GiB +2026-10-16T18:10:56Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:10:56Z,mtusi-messenger-lab3-redis-1,0.23%,3.863MiB / 192MiB +2026-10-16T18:10:59Z,mtusi-messenger-lab3-lb-1,15.17%,13.61MiB / 64MiB +2026-10-16T18:10:59Z,mtusi-messenger-lab3-postgres-1,51.39%,85.64MiB / 384MiB +2026-10-16T18:10:59Z,mtusi-messenger-lab3-api-1,19.70%,10.92MiB / 384MiB +2026-10-16T18:10:59Z,mtusi-messenger-lab3-api-2,20.50%,11.01MiB / 384MiB +2026-10-16T18:10:59Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:10:59Z,mtusi-messenger-lab2-redis-1,0.68%,9.004MiB / 1.913GiB +2026-10-16T18:10:59Z,mtusi-messenger-lab3-redis-1,0.21%,3.863MiB / 192MiB +2026-10-16T18:11:02Z,mtusi-messenger-lab3-lb-1,14.52%,13.6MiB / 64MiB +2026-10-16T18:11:02Z,mtusi-messenger-lab3-postgres-1,49.76%,88.94MiB / 384MiB +2026-10-16T18:11:02Z,mtusi-messenger-lab3-api-1,20.07%,10.92MiB / 384MiB +2026-10-16T18:11:02Z,mtusi-messenger-lab3-api-2,20.40%,10.93MiB / 384MiB +2026-10-16T18:11:02Z,mtusi-messenger-lab2-postgres-1,0.25%,178.3MiB / 1.913GiB +2026-10-16T18:11:02Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:11:02Z,mtusi-messenger-lab3-redis-1,0.90%,3.863MiB / 192MiB +2026-10-16T18:11:05Z,mtusi-messenger-lab3-lb-1,14.73%,13.59MiB / 64MiB +2026-10-16T18:11:05Z,mtusi-messenger-lab3-postgres-1,49.78%,91.99MiB / 384MiB +2026-10-16T18:11:05Z,mtusi-messenger-lab3-api-1,19.20%,10.96MiB / 384MiB +2026-10-16T18:11:05Z,mtusi-messenger-lab3-api-2,19.93%,10.95MiB / 384MiB +2026-10-16T18:11:05Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:11:05Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:11:05Z,mtusi-messenger-lab3-redis-1,0.24%,3.863MiB / 192MiB +2026-10-16T18:11:08Z,mtusi-messenger-lab3-lb-1,14.36%,13.61MiB / 64MiB +2026-10-16T18:11:08Z,mtusi-messenger-lab3-postgres-1,49.09%,94.57MiB / 384MiB +2026-10-16T18:11:08Z,mtusi-messenger-lab3-api-1,19.05%,10.96MiB / 384MiB +2026-10-16T18:11:08Z,mtusi-messenger-lab3-api-2,18.56%,10.93MiB / 384MiB +2026-10-16T18:11:08Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:11:08Z,mtusi-messenger-lab2-redis-1,0.66%,9.004MiB / 1.913GiB +2026-10-16T18:11:08Z,mtusi-messenger-lab3-redis-1,0.23%,3.863MiB / 192MiB +2026-10-16T18:11:11Z,mtusi-messenger-lab3-lb-1,14.11%,13.6MiB / 64MiB +2026-10-16T18:11:11Z,mtusi-messenger-lab3-postgres-1,49.63%,97.64MiB / 384MiB +2026-10-16T18:11:11Z,mtusi-messenger-lab3-api-1,19.19%,10.96MiB / 384MiB +2026-10-16T18:11:11Z,mtusi-messenger-lab3-api-2,19.29%,10.78MiB / 384MiB +2026-10-16T18:11:11Z,mtusi-messenger-lab2-postgres-1,0.82%,178.3MiB / 1.913GiB +2026-10-16T18:11:11Z,mtusi-messenger-lab2-redis-1,0.23%,9.004MiB / 1.913GiB +2026-10-16T18:11:11Z,mtusi-messenger-lab3-redis-1,0.22%,3.863MiB / 192MiB +2026-10-16T18:11:14Z,mtusi-messenger-lab3-lb-1,14.69%,13.61MiB / 64MiB +2026-10-16T18:11:14Z,mtusi-messenger-lab3-postgres-1,50.77%,99.91MiB / 384MiB +2026-10-16T18:11:14Z,mtusi-messenger-lab3-api-1,18.81%,10.9MiB / 384MiB +2026-10-16T18:11:14Z,mtusi-messenger-lab3-api-2,19.43%,10.91MiB / 384MiB +2026-10-16T18:11:14Z,mtusi-messenger-lab2-postgres-1,0.26%,178.3MiB / 1.913GiB +2026-10-16T18:11:14Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:11:14Z,mtusi-messenger-lab3-redis-1,0.24%,3.863MiB / 192MiB +2026-10-16T18:11:18Z,mtusi-messenger-lab3-lb-1,15.49%,13.61MiB / 64MiB +2026-10-16T18:11:18Z,mtusi-messenger-lab3-postgres-1,50.30%,103.9MiB / 384MiB +2026-10-16T18:11:18Z,mtusi-messenger-lab3-api-1,19.87%,10.9MiB / 384MiB +2026-10-16T18:11:18Z,mtusi-messenger-lab3-api-2,20.26%,10.93MiB / 384MiB +2026-10-16T18:11:18Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:11:18Z,mtusi-messenger-lab2-redis-1,0.23%,9.004MiB / 1.913GiB +2026-10-16T18:11:18Z,mtusi-messenger-lab3-redis-1,0.24%,3.863MiB / 192MiB +2026-10-16T18:11:21Z,mtusi-messenger-lab3-lb-1,15.27%,13.6MiB / 64MiB +2026-10-16T18:11:21Z,mtusi-messenger-lab3-postgres-1,50.49%,108.1MiB / 384MiB +2026-10-16T18:11:21Z,mtusi-messenger-lab3-api-1,20.18%,10.84MiB / 384MiB +2026-10-16T18:11:21Z,mtusi-messenger-lab3-api-2,19.75%,11.02MiB / 384MiB +2026-10-16T18:11:21Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:11:21Z,mtusi-messenger-lab2-redis-1,0.20%,9.004MiB / 1.913GiB +2026-10-16T18:11:21Z,mtusi-messenger-lab3-redis-1,0.70%,3.863MiB / 192MiB +2026-10-16T18:11:24Z,mtusi-messenger-lab3-lb-1,7.36%,13.62MiB / 64MiB +2026-10-16T18:11:24Z,mtusi-messenger-lab3-postgres-1,24.14%,109.7MiB / 384MiB +2026-10-16T18:11:24Z,mtusi-messenger-lab3-api-1,9.76%,10.86MiB / 384MiB +2026-10-16T18:11:24Z,mtusi-messenger-lab3-api-2,9.91%,11.16MiB / 384MiB +2026-10-16T18:11:24Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:11:24Z,mtusi-messenger-lab2-redis-1,0.70%,9.004MiB / 1.913GiB +2026-10-16T18:11:24Z,mtusi-messenger-lab3-redis-1,0.23%,3.863MiB / 192MiB +2026-10-16T18:11:27Z,mtusi-messenger-lab3-lb-1,15.08%,13.6MiB / 64MiB +2026-10-16T18:11:27Z,mtusi-messenger-lab3-postgres-1,50.21%,111.3MiB / 384MiB +2026-10-16T18:11:27Z,mtusi-messenger-lab3-api-1,20.56%,10.86MiB / 384MiB +2026-10-16T18:11:27Z,mtusi-messenger-lab3-api-2,19.86%,11.02MiB / 384MiB +2026-10-16T18:11:27Z,mtusi-messenger-lab2-postgres-1,0.93%,178.3MiB / 1.913GiB +2026-10-16T18:11:27Z,mtusi-messenger-lab2-redis-1,0.23%,9.004MiB / 1.913GiB +2026-10-16T18:11:27Z,mtusi-messenger-lab3-redis-1,0.68%,3.863MiB / 192MiB +2026-10-16T18:11:30Z,mtusi-messenger-lab3-lb-1,12.01%,13.87MiB / 64MiB +2026-10-16T18:11:30Z,mtusi-messenger-lab3-postgres-1,39.96%,114MiB / 384MiB +2026-10-16T18:11:30Z,mtusi-messenger-lab3-api-1,16.60%,10.86MiB / 384MiB +2026-10-16T18:11:30Z,mtusi-messenger-lab3-api-2,15.80%,11.3MiB / 384MiB +2026-10-16T18:11:30Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:11:30Z,mtusi-messenger-lab2-redis-1,0.67%,9.004MiB / 1.913GiB +2026-10-16T18:11:30Z,mtusi-messenger-lab3-redis-1,0.22%,3.863MiB / 192MiB +2026-10-16T18:11:33Z,mtusi-messenger-lab3-lb-1,15.18%,13.61MiB / 64MiB +2026-10-16T18:11:33Z,mtusi-messenger-lab3-postgres-1,50.47%,117.3MiB / 384MiB +2026-10-16T18:11:33Z,mtusi-messenger-lab3-api-1,20.23%,10.86MiB / 384MiB +2026-10-16T18:11:33Z,mtusi-messenger-lab3-api-2,19.97%,11.04MiB / 384MiB +2026-10-16T18:11:33Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:11:33Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:11:33Z,mtusi-messenger-lab3-redis-1,0.22%,3.863MiB / 192MiB +2026-10-16T18:11:36Z,mtusi-messenger-lab3-lb-1,12.36%,13.56MiB / 64MiB +2026-10-16T18:11:36Z,mtusi-messenger-lab3-postgres-1,51.73%,128MiB / 384MiB +2026-10-16T18:11:36Z,mtusi-messenger-lab3-api-1,16.83%,10.84MiB / 384MiB +2026-10-16T18:11:36Z,mtusi-messenger-lab3-api-2,16.52%,11.18MiB / 384MiB +2026-10-16T18:11:36Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:11:36Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:11:36Z,mtusi-messenger-lab3-redis-1,0.69%,3.863MiB / 192MiB diff --git a/evidence/track1/superseded/run2-host-client/stats-pool10.csv b/evidence/track1/superseded/run2-host-client/stats-pool10.csv new file mode 100644 index 00000000..69c9aa83 --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/stats-pool10.csv @@ -0,0 +1,181 @@ +timestamp,container,cpu_percent,mem_usage +2026-10-16T18:06:34Z,mtusi-messenger-lab3-api-2,7.60%,77.38MiB / 192MiB +2026-10-16T18:06:34Z,mtusi-messenger-lab3-api-1,6.91%,141.8MiB / 192MiB +2026-10-16T18:06:34Z,mtusi-messenger-lab3-api-4,13.44%,141.3MiB / 192MiB +2026-10-16T18:06:34Z,mtusi-messenger-lab3-api-3,14.02%,75.73MiB / 192MiB +2026-10-16T18:06:34Z,mtusi-messenger-lab3-postgres-1,0.51%,197.8MiB / 384MiB +2026-10-16T18:06:34Z,mtusi-messenger-lab2-postgres-1,0.81%,241.2MiB / 1.913GiB +2026-10-16T18:06:34Z,mtusi-messenger-lab2-redis-1,0.23%,9.004MiB / 1.913GiB +2026-10-16T18:06:34Z,mtusi-messenger-lab3-lb-1,9.46%,11.58MiB / 64MiB +2026-10-16T18:06:34Z,mtusi-messenger-lab3-redis-1,0.77%,3.867MiB / 192MiB +2026-10-16T18:06:38Z,mtusi-messenger-lab3-api-2,11.20%,104.1MiB / 192MiB +2026-10-16T18:06:38Z,mtusi-messenger-lab3-api-1,10.90%,169.1MiB / 192MiB +2026-10-16T18:06:38Z,mtusi-messenger-lab3-api-4,10.90%,168.1MiB / 192MiB +2026-10-16T18:06:38Z,mtusi-messenger-lab3-api-3,10.75%,94.62MiB / 192MiB +2026-10-16T18:06:38Z,mtusi-messenger-lab3-postgres-1,50.28%,199.5MiB / 384MiB +2026-10-16T18:06:38Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:06:38Z,mtusi-messenger-lab2-redis-1,0.66%,9.004MiB / 1.913GiB +2026-10-16T18:06:38Z,mtusi-messenger-lab3-lb-1,14.75%,11.59MiB / 64MiB +2026-10-16T18:06:38Z,mtusi-messenger-lab3-redis-1,0.20%,3.867MiB / 192MiB +2026-10-16T18:06:41Z,mtusi-messenger-lab3-api-2,11.70%,132.6MiB / 192MiB +2026-10-16T18:06:41Z,mtusi-messenger-lab3-api-3,11.24%,132.3MiB / 192MiB +2026-10-16T18:06:41Z,mtusi-messenger-lab3-postgres-1,38.75%,194.8MiB / 384MiB +2026-10-16T18:06:41Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:06:41Z,mtusi-messenger-lab2-redis-1,0.19%,9.004MiB / 1.913GiB +2026-10-16T18:06:41Z,mtusi-messenger-lab3-lb-1,11.96%,11.64MiB / 64MiB +2026-10-16T18:06:41Z,mtusi-messenger-lab3-redis-1,0.69%,3.867MiB / 192MiB +2026-10-16T18:06:41Z,mtusi-messenger-lab3-api-1,5.99%,7.691MiB / 192MiB +2026-10-16T18:06:41Z,mtusi-messenger-lab3-api-4,3.47%,6.445MiB / 192MiB +2026-10-16T18:06:45Z,mtusi-messenger-lab3-api-2,12.06%,10.94MiB / 192MiB +2026-10-16T18:06:45Z,mtusi-messenger-lab3-api-1,10.93%,8.141MiB / 192MiB +2026-10-16T18:06:45Z,mtusi-messenger-lab3-api-4,11.89%,7.922MiB / 192MiB +2026-10-16T18:06:45Z,mtusi-messenger-lab3-api-3,11.44%,10.61MiB / 192MiB +2026-10-16T18:06:45Z,mtusi-messenger-lab3-postgres-1,50.14%,204.5MiB / 384MiB +2026-10-16T18:06:45Z,mtusi-messenger-lab2-postgres-1,0.71%,178.3MiB / 1.913GiB +2026-10-16T18:06:45Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:06:45Z,mtusi-messenger-lab3-lb-1,15.37%,11.66MiB / 64MiB +2026-10-16T18:06:45Z,mtusi-messenger-lab3-redis-1,0.23%,3.867MiB / 192MiB +2026-10-16T18:06:48Z,mtusi-messenger-lab3-api-2,1.48%,10.88MiB / 192MiB +2026-10-16T18:06:48Z,mtusi-messenger-lab3-api-1,1.49%,8.031MiB / 192MiB +2026-10-16T18:06:48Z,mtusi-messenger-lab3-api-4,1.27%,8.121MiB / 192MiB +2026-10-16T18:06:48Z,mtusi-messenger-lab3-api-3,11.29%,10.56MiB / 192MiB +2026-10-16T18:06:48Z,mtusi-messenger-lab3-postgres-1,6.89%,204.6MiB / 384MiB +2026-10-16T18:06:48Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:06:48Z,mtusi-messenger-lab2-redis-1,0.23%,9.004MiB / 1.913GiB +2026-10-16T18:06:48Z,mtusi-messenger-lab3-lb-1,1.97%,11.61MiB / 64MiB +2026-10-16T18:06:48Z,mtusi-messenger-lab3-redis-1,0.21%,3.867MiB / 192MiB +2026-10-16T18:06:51Z,mtusi-messenger-lab3-api-2,12.24%,10.84MiB / 192MiB +2026-10-16T18:06:51Z,mtusi-messenger-lab3-api-1,11.27%,8.055MiB / 192MiB +2026-10-16T18:06:51Z,mtusi-messenger-lab3-api-4,11.09%,8.086MiB / 192MiB +2026-10-16T18:06:51Z,mtusi-messenger-lab3-api-3,11.05%,10.48MiB / 192MiB +2026-10-16T18:06:51Z,mtusi-messenger-lab3-postgres-1,49.63%,204.9MiB / 384MiB +2026-10-16T18:06:51Z,mtusi-messenger-lab2-postgres-1,0.20%,178.3MiB / 1.913GiB +2026-10-16T18:06:51Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:06:51Z,mtusi-messenger-lab3-lb-1,14.89%,11.64MiB / 64MiB +2026-10-16T18:06:51Z,mtusi-messenger-lab3-redis-1,0.74%,3.867MiB / 192MiB +2026-10-16T18:06:54Z,mtusi-messenger-lab3-api-2,11.02%,10.82MiB / 192MiB +2026-10-16T18:06:54Z,mtusi-messenger-lab3-api-1,11.03%,7.945MiB / 192MiB +2026-10-16T18:06:54Z,mtusi-messenger-lab3-api-4,10.92%,8.086MiB / 192MiB +2026-10-16T18:06:54Z,mtusi-messenger-lab3-api-3,11.53%,10.39MiB / 192MiB +2026-10-16T18:06:54Z,mtusi-messenger-lab3-postgres-1,49.96%,205.3MiB / 384MiB +2026-10-16T18:06:54Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:06:54Z,mtusi-messenger-lab2-redis-1,0.23%,9.004MiB / 1.913GiB +2026-10-16T18:06:54Z,mtusi-messenger-lab3-lb-1,14.46%,11.64MiB / 64MiB +2026-10-16T18:06:54Z,mtusi-messenger-lab3-redis-1,0.20%,3.867MiB / 192MiB +2026-10-16T18:06:57Z,mtusi-messenger-lab3-api-2,11.75%,10.88MiB / 192MiB +2026-10-16T18:06:57Z,mtusi-messenger-lab3-api-1,11.03%,7.949MiB / 192MiB +2026-10-16T18:06:57Z,mtusi-messenger-lab3-api-4,11.09%,8.094MiB / 192MiB +2026-10-16T18:06:57Z,mtusi-messenger-lab3-api-3,10.89%,10.47MiB / 192MiB +2026-10-16T18:06:57Z,mtusi-messenger-lab3-postgres-1,50.91%,205.7MiB / 384MiB +2026-10-16T18:06:57Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:06:57Z,mtusi-messenger-lab2-redis-1,0.65%,9.004MiB / 1.913GiB +2026-10-16T18:06:57Z,mtusi-messenger-lab3-lb-1,14.81%,11.64MiB / 64MiB +2026-10-16T18:06:57Z,mtusi-messenger-lab3-redis-1,0.22%,3.867MiB / 192MiB +2026-10-16T18:07:00Z,mtusi-messenger-lab3-api-2,11.69%,10.75MiB / 192MiB +2026-10-16T18:07:00Z,mtusi-messenger-lab3-api-1,11.00%,8.066MiB / 192MiB +2026-10-16T18:07:00Z,mtusi-messenger-lab3-api-4,11.17%,8.188MiB / 192MiB +2026-10-16T18:07:00Z,mtusi-messenger-lab3-api-3,11.12%,10.43MiB / 192MiB +2026-10-16T18:07:00Z,mtusi-messenger-lab3-postgres-1,49.69%,206.3MiB / 384MiB +2026-10-16T18:07:00Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:07:00Z,mtusi-messenger-lab2-redis-1,0.20%,9.004MiB / 1.913GiB +2026-10-16T18:07:00Z,mtusi-messenger-lab3-lb-1,15.04%,11.63MiB / 64MiB +2026-10-16T18:07:00Z,mtusi-messenger-lab3-redis-1,0.22%,3.867MiB / 192MiB +2026-10-16T18:07:03Z,mtusi-messenger-lab3-api-2,11.12%,10.82MiB / 192MiB +2026-10-16T18:07:03Z,mtusi-messenger-lab3-api-1,11.11%,8.074MiB / 192MiB +2026-10-16T18:07:03Z,mtusi-messenger-lab3-api-4,10.90%,8.18MiB / 192MiB +2026-10-16T18:07:03Z,mtusi-messenger-lab3-api-3,10.77%,10.41MiB / 192MiB +2026-10-16T18:07:03Z,mtusi-messenger-lab3-postgres-1,49.10%,206.3MiB / 384MiB +2026-10-16T18:07:03Z,mtusi-messenger-lab2-postgres-1,0.18%,178.3MiB / 1.913GiB +2026-10-16T18:07:03Z,mtusi-messenger-lab2-redis-1,0.19%,9.004MiB / 1.913GiB +2026-10-16T18:07:03Z,mtusi-messenger-lab3-lb-1,14.88%,11.89MiB / 64MiB +2026-10-16T18:07:03Z,mtusi-messenger-lab3-redis-1,0.21%,3.867MiB / 192MiB +2026-10-16T18:07:07Z,mtusi-messenger-lab3-api-2,8.72%,10.83MiB / 192MiB +2026-10-16T18:07:07Z,mtusi-messenger-lab3-api-1,9.99%,8.07MiB / 192MiB +2026-10-16T18:07:07Z,mtusi-messenger-lab3-api-4,9.48%,8.125MiB / 192MiB +2026-10-16T18:07:07Z,mtusi-messenger-lab3-api-3,9.36%,10.41MiB / 192MiB +2026-10-16T18:07:07Z,mtusi-messenger-lab3-postgres-1,41.13%,206.4MiB / 384MiB +2026-10-16T18:07:07Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:07:07Z,mtusi-messenger-lab2-redis-1,0.25%,9.004MiB / 1.913GiB +2026-10-16T18:07:07Z,mtusi-messenger-lab3-lb-1,12.41%,11.64MiB / 64MiB +2026-10-16T18:07:07Z,mtusi-messenger-lab3-redis-1,0.21%,3.867MiB / 192MiB +2026-10-16T18:07:10Z,mtusi-messenger-lab3-api-2,11.21%,10.83MiB / 192MiB +2026-10-16T18:07:10Z,mtusi-messenger-lab3-api-1,10.80%,8.086MiB / 192MiB +2026-10-16T18:07:10Z,mtusi-messenger-lab3-api-4,10.83%,8.121MiB / 192MiB +2026-10-16T18:07:10Z,mtusi-messenger-lab3-api-3,11.23%,10.46MiB / 192MiB +2026-10-16T18:07:10Z,mtusi-messenger-lab3-postgres-1,49.24%,206.4MiB / 384MiB +2026-10-16T18:07:10Z,mtusi-messenger-lab2-postgres-1,0.65%,178.3MiB / 1.913GiB +2026-10-16T18:07:10Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:07:10Z,mtusi-messenger-lab3-lb-1,14.54%,11.66MiB / 64MiB +2026-10-16T18:07:10Z,mtusi-messenger-lab3-redis-1,0.75%,3.867MiB / 192MiB +2026-10-16T18:07:13Z,mtusi-messenger-lab3-api-2,11.79%,10.78MiB / 192MiB +2026-10-16T18:07:13Z,mtusi-messenger-lab3-api-1,11.27%,8.02MiB / 192MiB +2026-10-16T18:07:13Z,mtusi-messenger-lab3-api-4,10.55%,8.184MiB / 192MiB +2026-10-16T18:07:13Z,mtusi-messenger-lab3-api-3,11.22%,10.56MiB / 192MiB +2026-10-16T18:07:13Z,mtusi-messenger-lab3-postgres-1,50.42%,206.4MiB / 384MiB +2026-10-16T18:07:13Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:07:13Z,mtusi-messenger-lab2-redis-1,0.82%,9.004MiB / 1.913GiB +2026-10-16T18:07:13Z,mtusi-messenger-lab3-lb-1,15.18%,11.63MiB / 64MiB +2026-10-16T18:07:13Z,mtusi-messenger-lab3-redis-1,0.22%,3.867MiB / 192MiB +2026-10-16T18:07:16Z,mtusi-messenger-lab3-api-2,11.48%,10.74MiB / 192MiB +2026-10-16T18:07:16Z,mtusi-messenger-lab3-api-1,11.02%,8.086MiB / 192MiB +2026-10-16T18:07:16Z,mtusi-messenger-lab3-api-4,10.68%,8.195MiB / 192MiB +2026-10-16T18:07:16Z,mtusi-messenger-lab3-api-3,11.19%,10.37MiB / 192MiB +2026-10-16T18:07:16Z,mtusi-messenger-lab3-postgres-1,48.93%,206.5MiB / 384MiB +2026-10-16T18:07:16Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:07:16Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:07:16Z,mtusi-messenger-lab3-lb-1,14.74%,11.65MiB / 64MiB +2026-10-16T18:07:16Z,mtusi-messenger-lab3-redis-1,0.75%,3.867MiB / 192MiB +2026-10-16T18:07:19Z,mtusi-messenger-lab3-api-2,11.21%,10.6MiB / 192MiB +2026-10-16T18:07:19Z,mtusi-messenger-lab3-api-1,11.45%,8.082MiB / 192MiB +2026-10-16T18:07:19Z,mtusi-messenger-lab3-api-4,11.86%,8.18MiB / 192MiB +2026-10-16T18:07:19Z,mtusi-messenger-lab3-api-3,11.08%,10.41MiB / 192MiB +2026-10-16T18:07:19Z,mtusi-messenger-lab3-postgres-1,51.21%,206.6MiB / 384MiB +2026-10-16T18:07:19Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:07:19Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:07:19Z,mtusi-messenger-lab3-lb-1,15.33%,11.62MiB / 64MiB +2026-10-16T18:07:19Z,mtusi-messenger-lab3-redis-1,0.22%,3.867MiB / 192MiB +2026-10-16T18:07:22Z,mtusi-messenger-lab3-api-2,12.08%,10.61MiB / 192MiB +2026-10-16T18:07:22Z,mtusi-messenger-lab3-api-1,11.88%,8.148MiB / 192MiB +2026-10-16T18:07:22Z,mtusi-messenger-lab3-api-4,10.72%,8.109MiB / 192MiB +2026-10-16T18:07:22Z,mtusi-messenger-lab3-api-3,12.01%,10.41MiB / 192MiB +2026-10-16T18:07:22Z,mtusi-messenger-lab3-postgres-1,50.29%,206.9MiB / 384MiB +2026-10-16T18:07:22Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:07:22Z,mtusi-messenger-lab2-redis-1,0.23%,9.004MiB / 1.913GiB +2026-10-16T18:07:22Z,mtusi-messenger-lab3-lb-1,15.36%,11.62MiB / 64MiB +2026-10-16T18:07:22Z,mtusi-messenger-lab3-redis-1,0.23%,3.867MiB / 192MiB +2026-10-16T18:07:25Z,mtusi-messenger-lab3-api-2,11.15%,10.6MiB / 192MiB +2026-10-16T18:07:25Z,mtusi-messenger-lab3-api-1,10.99%,8.023MiB / 192MiB +2026-10-16T18:07:25Z,mtusi-messenger-lab3-api-4,11.57%,8.184MiB / 192MiB +2026-10-16T18:07:25Z,mtusi-messenger-lab3-api-3,11.08%,10.41MiB / 192MiB +2026-10-16T18:07:25Z,mtusi-messenger-lab3-postgres-1,50.30%,206.9MiB / 384MiB +2026-10-16T18:07:25Z,mtusi-messenger-lab2-postgres-1,0.73%,178.3MiB / 1.913GiB +2026-10-16T18:07:25Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:07:25Z,mtusi-messenger-lab3-lb-1,15.18%,11.67MiB / 64MiB +2026-10-16T18:07:25Z,mtusi-messenger-lab3-redis-1,0.22%,3.867MiB / 192MiB +2026-10-16T18:07:28Z,mtusi-messenger-lab3-api-2,9.99%,10.61MiB / 192MiB +2026-10-16T18:07:28Z,mtusi-messenger-lab3-api-1,10.96%,8.02MiB / 192MiB +2026-10-16T18:07:28Z,mtusi-messenger-lab3-api-4,10.04%,8.133MiB / 192MiB +2026-10-16T18:07:28Z,mtusi-messenger-lab3-api-3,10.38%,10.36MiB / 192MiB +2026-10-16T18:07:28Z,mtusi-messenger-lab3-postgres-1,46.74%,206.9MiB / 384MiB +2026-10-16T18:07:28Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:07:28Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:07:28Z,mtusi-messenger-lab3-lb-1,15.22%,11.66MiB / 64MiB +2026-10-16T18:07:28Z,mtusi-messenger-lab3-redis-1,0.21%,3.867MiB / 192MiB +2026-10-16T18:07:31Z,mtusi-messenger-lab3-api-2,12.08%,10.64MiB / 192MiB +2026-10-16T18:07:31Z,mtusi-messenger-lab3-api-1,11.55%,8.023MiB / 192MiB +2026-10-16T18:07:31Z,mtusi-messenger-lab3-api-4,11.41%,8.195MiB / 192MiB +2026-10-16T18:07:31Z,mtusi-messenger-lab3-api-3,11.05%,10.29MiB / 192MiB +2026-10-16T18:07:31Z,mtusi-messenger-lab3-postgres-1,50.41%,206.7MiB / 384MiB +2026-10-16T18:07:31Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:07:31Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:07:31Z,mtusi-messenger-lab3-lb-1,15.24%,11.63MiB / 64MiB +2026-10-16T18:07:31Z,mtusi-messenger-lab3-redis-1,0.21%,3.867MiB / 192MiB +2026-10-16T18:07:34Z,mtusi-messenger-lab3-api-2,4.62%,10.62MiB / 192MiB +2026-10-16T18:07:34Z,mtusi-messenger-lab3-api-1,11.06%,8.047MiB / 192MiB +2026-10-16T18:07:34Z,mtusi-messenger-lab3-api-4,4.84%,8.121MiB / 192MiB +2026-10-16T18:07:34Z,mtusi-messenger-lab3-api-3,4.64%,10.28MiB / 192MiB +2026-10-16T18:07:34Z,mtusi-messenger-lab3-postgres-1,46.24%,216.8MiB / 384MiB +2026-10-16T18:07:34Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:07:34Z,mtusi-messenger-lab2-redis-1,0.26%,9.004MiB / 1.913GiB +2026-10-16T18:07:34Z,mtusi-messenger-lab3-lb-1,6.42%,11.59MiB / 64MiB +2026-10-16T18:07:34Z,mtusi-messenger-lab3-redis-1,0.27%,3.867MiB / 192MiB diff --git a/evidence/track1/superseded/run2-host-client/stats-pool5.csv b/evidence/track1/superseded/run2-host-client/stats-pool5.csv new file mode 100644 index 00000000..89f4caf6 --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/stats-pool5.csv @@ -0,0 +1,181 @@ +timestamp,container,cpu_percent,mem_usage +2026-10-16T18:07:55Z,mtusi-messenger-lab3-api-2,14.91%,141.5MiB / 192MiB +2026-10-16T18:07:55Z,mtusi-messenger-lab3-api-1,10.62%,141.6MiB / 192MiB +2026-10-16T18:07:55Z,mtusi-messenger-lab3-api-4,7.08%,77.1MiB / 192MiB +2026-10-16T18:07:55Z,mtusi-messenger-lab3-api-3,7.65%,10.7MiB / 192MiB +2026-10-16T18:07:55Z,mtusi-messenger-lab3-postgres-1,32.81%,198MiB / 384MiB +2026-10-16T18:07:55Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:07:55Z,mtusi-messenger-lab2-redis-1,0.27%,9.004MiB / 1.913GiB +2026-10-16T18:07:55Z,mtusi-messenger-lab3-lb-1,9.88%,11.65MiB / 64MiB +2026-10-16T18:07:55Z,mtusi-messenger-lab3-redis-1,0.39%,3.867MiB / 192MiB +2026-10-16T18:07:58Z,mtusi-messenger-lab3-api-2,10.66%,168MiB / 192MiB +2026-10-16T18:07:58Z,mtusi-messenger-lab3-api-1,11.16%,168.7MiB / 192MiB +2026-10-16T18:07:58Z,mtusi-messenger-lab3-api-4,10.28%,103.8MiB / 192MiB +2026-10-16T18:07:58Z,mtusi-messenger-lab3-api-3,10.99%,10.77MiB / 192MiB +2026-10-16T18:07:58Z,mtusi-messenger-lab3-postgres-1,49.15%,199MiB / 384MiB +2026-10-16T18:07:58Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:07:58Z,mtusi-messenger-lab2-redis-1,0.68%,9.004MiB / 1.913GiB +2026-10-16T18:07:58Z,mtusi-messenger-lab3-lb-1,14.80%,11.66MiB / 64MiB +2026-10-16T18:07:58Z,mtusi-messenger-lab3-redis-1,0.20%,3.867MiB / 192MiB +2026-10-16T18:08:01Z,mtusi-messenger-lab3-api-4,10.66%,133.2MiB / 192MiB +2026-10-16T18:08:01Z,mtusi-messenger-lab3-api-3,10.68%,10.55MiB / 192MiB +2026-10-16T18:08:01Z,mtusi-messenger-lab3-postgres-1,38.21%,185.5MiB / 384MiB +2026-10-16T18:08:01Z,mtusi-messenger-lab2-postgres-1,0.70%,178.3MiB / 1.913GiB +2026-10-16T18:08:01Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:08:01Z,mtusi-messenger-lab3-lb-1,12.01%,11.66MiB / 64MiB +2026-10-16T18:08:01Z,mtusi-messenger-lab3-redis-1,0.69%,3.867MiB / 192MiB +2026-10-16T18:08:01Z,mtusi-messenger-lab3-api-1,3.28%,6.367MiB / 192MiB +2026-10-16T18:08:01Z,mtusi-messenger-lab3-api-2,5.83%,7.684MiB / 192MiB +2026-10-16T18:08:05Z,mtusi-messenger-lab3-api-2,11.16%,7.949MiB / 192MiB +2026-10-16T18:08:05Z,mtusi-messenger-lab3-api-1,10.74%,7.957MiB / 192MiB +2026-10-16T18:08:05Z,mtusi-messenger-lab3-api-4,11.76%,11.31MiB / 192MiB +2026-10-16T18:08:05Z,mtusi-messenger-lab3-api-3,11.29%,10.51MiB / 192MiB +2026-10-16T18:08:05Z,mtusi-messenger-lab3-postgres-1,50.95%,200.8MiB / 384MiB +2026-10-16T18:08:05Z,mtusi-messenger-lab2-postgres-1,0.78%,178.3MiB / 1.913GiB +2026-10-16T18:08:05Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:08:05Z,mtusi-messenger-lab3-lb-1,14.65%,11.64MiB / 64MiB +2026-10-16T18:08:05Z,mtusi-messenger-lab3-redis-1,0.68%,3.867MiB / 192MiB +2026-10-16T18:08:08Z,mtusi-messenger-lab3-api-2,10.87%,8.117MiB / 192MiB +2026-10-16T18:08:08Z,mtusi-messenger-lab3-api-1,11.68%,7.918MiB / 192MiB +2026-10-16T18:08:08Z,mtusi-messenger-lab3-api-4,11.18%,11.12MiB / 192MiB +2026-10-16T18:08:08Z,mtusi-messenger-lab3-api-3,10.31%,10.44MiB / 192MiB +2026-10-16T18:08:08Z,mtusi-messenger-lab3-postgres-1,50.09%,202.4MiB / 384MiB +2026-10-16T18:08:08Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:08:08Z,mtusi-messenger-lab2-redis-1,0.73%,9.004MiB / 1.913GiB +2026-10-16T18:08:08Z,mtusi-messenger-lab3-lb-1,15.09%,11.65MiB / 64MiB +2026-10-16T18:08:08Z,mtusi-messenger-lab3-redis-1,0.21%,3.867MiB / 192MiB +2026-10-16T18:08:11Z,mtusi-messenger-lab3-api-2,10.80%,8.125MiB / 192MiB +2026-10-16T18:08:11Z,mtusi-messenger-lab3-api-1,11.04%,8.07MiB / 192MiB +2026-10-16T18:08:11Z,mtusi-messenger-lab3-api-4,12.08%,11.03MiB / 192MiB +2026-10-16T18:08:11Z,mtusi-messenger-lab3-api-3,11.93%,10.5MiB / 192MiB +2026-10-16T18:08:11Z,mtusi-messenger-lab3-postgres-1,49.92%,202.6MiB / 384MiB +2026-10-16T18:08:11Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:08:11Z,mtusi-messenger-lab2-redis-1,0.20%,9.004MiB / 1.913GiB +2026-10-16T18:08:11Z,mtusi-messenger-lab3-lb-1,15.22%,11.65MiB / 64MiB +2026-10-16T18:08:11Z,mtusi-messenger-lab3-redis-1,0.79%,3.867MiB / 192MiB +2026-10-16T18:08:14Z,mtusi-messenger-lab3-api-2,10.96%,8.141MiB / 192MiB +2026-10-16T18:08:14Z,mtusi-messenger-lab3-api-1,10.62%,8.195MiB / 192MiB +2026-10-16T18:08:14Z,mtusi-messenger-lab3-api-4,11.01%,11.14MiB / 192MiB +2026-10-16T18:08:14Z,mtusi-messenger-lab3-api-3,11.27%,10.46MiB / 192MiB +2026-10-16T18:08:14Z,mtusi-messenger-lab3-postgres-1,49.26%,202.9MiB / 384MiB +2026-10-16T18:08:14Z,mtusi-messenger-lab2-postgres-1,0.24%,178.3MiB / 1.913GiB +2026-10-16T18:08:14Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:08:14Z,mtusi-messenger-lab3-lb-1,15.17%,11.63MiB / 64MiB +2026-10-16T18:08:14Z,mtusi-messenger-lab3-redis-1,0.22%,3.867MiB / 192MiB +2026-10-16T18:08:17Z,mtusi-messenger-lab3-api-2,11.39%,7.898MiB / 192MiB +2026-10-16T18:08:17Z,mtusi-messenger-lab3-api-1,11.25%,8.141MiB / 192MiB +2026-10-16T18:08:17Z,mtusi-messenger-lab3-api-4,11.62%,11.34MiB / 192MiB +2026-10-16T18:08:17Z,mtusi-messenger-lab3-api-3,11.38%,10.5MiB / 192MiB +2026-10-16T18:08:17Z,mtusi-messenger-lab3-postgres-1,50.33%,203.3MiB / 384MiB +2026-10-16T18:08:17Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:08:17Z,mtusi-messenger-lab2-redis-1,0.75%,9.004MiB / 1.913GiB +2026-10-16T18:08:17Z,mtusi-messenger-lab3-lb-1,14.83%,11.65MiB / 64MiB +2026-10-16T18:08:17Z,mtusi-messenger-lab3-redis-1,0.22%,3.867MiB / 192MiB +2026-10-16T18:08:21Z,mtusi-messenger-lab3-api-2,11.86%,7.961MiB / 192MiB +2026-10-16T18:08:21Z,mtusi-messenger-lab3-api-1,11.40%,8.129MiB / 192MiB +2026-10-16T18:08:21Z,mtusi-messenger-lab3-api-4,10.84%,11.09MiB / 192MiB +2026-10-16T18:08:21Z,mtusi-messenger-lab3-api-3,11.03%,10.49MiB / 192MiB +2026-10-16T18:08:21Z,mtusi-messenger-lab3-postgres-1,50.72%,203.7MiB / 384MiB +2026-10-16T18:08:21Z,mtusi-messenger-lab2-postgres-1,0.73%,178.3MiB / 1.913GiB +2026-10-16T18:08:21Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:08:21Z,mtusi-messenger-lab3-lb-1,15.10%,11.66MiB / 64MiB +2026-10-16T18:08:21Z,mtusi-messenger-lab3-redis-1,0.69%,3.867MiB / 192MiB +2026-10-16T18:08:24Z,mtusi-messenger-lab3-api-2,10.53%,8.027MiB / 192MiB +2026-10-16T18:08:24Z,mtusi-messenger-lab3-api-1,10.90%,8.141MiB / 192MiB +2026-10-16T18:08:24Z,mtusi-messenger-lab3-api-4,10.28%,11.14MiB / 192MiB +2026-10-16T18:08:24Z,mtusi-messenger-lab3-api-3,11.17%,10.49MiB / 192MiB +2026-10-16T18:08:24Z,mtusi-messenger-lab3-postgres-1,49.23%,204.3MiB / 384MiB +2026-10-16T18:08:24Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:08:24Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:08:24Z,mtusi-messenger-lab3-lb-1,14.51%,11.65MiB / 64MiB +2026-10-16T18:08:24Z,mtusi-messenger-lab3-redis-1,0.20%,3.867MiB / 192MiB +2026-10-16T18:08:27Z,mtusi-messenger-lab3-api-2,9.35%,7.973MiB / 192MiB +2026-10-16T18:08:27Z,mtusi-messenger-lab3-api-1,9.88%,8.133MiB / 192MiB +2026-10-16T18:08:27Z,mtusi-messenger-lab3-api-4,9.36%,11.11MiB / 192MiB +2026-10-16T18:08:27Z,mtusi-messenger-lab3-api-3,8.77%,10.5MiB / 192MiB +2026-10-16T18:08:27Z,mtusi-messenger-lab3-postgres-1,40.77%,204.3MiB / 384MiB +2026-10-16T18:08:27Z,mtusi-messenger-lab2-postgres-1,0.20%,178.3MiB / 1.913GiB +2026-10-16T18:08:27Z,mtusi-messenger-lab2-redis-1,0.23%,9.004MiB / 1.913GiB +2026-10-16T18:08:27Z,mtusi-messenger-lab3-lb-1,12.20%,11.67MiB / 64MiB +2026-10-16T18:08:27Z,mtusi-messenger-lab3-redis-1,0.22%,3.867MiB / 192MiB +2026-10-16T18:08:30Z,mtusi-messenger-lab3-api-2,9.13%,8.023MiB / 192MiB +2026-10-16T18:08:30Z,mtusi-messenger-lab3-api-1,9.52%,8.129MiB / 192MiB +2026-10-16T18:08:30Z,mtusi-messenger-lab3-api-4,8.93%,11.04MiB / 192MiB +2026-10-16T18:08:30Z,mtusi-messenger-lab3-api-3,9.47%,10.59MiB / 192MiB +2026-10-16T18:08:30Z,mtusi-messenger-lab3-postgres-1,41.32%,204.3MiB / 384MiB +2026-10-16T18:08:30Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:08:30Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:08:30Z,mtusi-messenger-lab3-lb-1,12.68%,11.62MiB / 64MiB +2026-10-16T18:08:30Z,mtusi-messenger-lab3-redis-1,0.73%,3.867MiB / 192MiB +2026-10-16T18:08:33Z,mtusi-messenger-lab3-api-2,10.80%,8.035MiB / 192MiB +2026-10-16T18:08:33Z,mtusi-messenger-lab3-api-1,11.71%,8.145MiB / 192MiB +2026-10-16T18:08:33Z,mtusi-messenger-lab3-api-4,10.90%,11.05MiB / 192MiB +2026-10-16T18:08:33Z,mtusi-messenger-lab3-api-3,11.65%,10.61MiB / 192MiB +2026-10-16T18:08:33Z,mtusi-messenger-lab3-postgres-1,50.25%,204.3MiB / 384MiB +2026-10-16T18:08:33Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:08:33Z,mtusi-messenger-lab2-redis-1,0.76%,9.004MiB / 1.913GiB +2026-10-16T18:08:33Z,mtusi-messenger-lab3-lb-1,14.80%,11.68MiB / 64MiB +2026-10-16T18:08:33Z,mtusi-messenger-lab3-redis-1,0.21%,3.867MiB / 192MiB +2026-10-16T18:08:36Z,mtusi-messenger-lab3-api-2,10.88%,8.035MiB / 192MiB +2026-10-16T18:08:36Z,mtusi-messenger-lab3-api-1,10.69%,8.156MiB / 192MiB +2026-10-16T18:08:36Z,mtusi-messenger-lab3-api-4,11.22%,11.05MiB / 192MiB +2026-10-16T18:08:36Z,mtusi-messenger-lab3-api-3,10.68%,10.54MiB / 192MiB +2026-10-16T18:08:36Z,mtusi-messenger-lab3-postgres-1,48.84%,204.4MiB / 384MiB +2026-10-16T18:08:36Z,mtusi-messenger-lab2-postgres-1,0.71%,178.3MiB / 1.913GiB +2026-10-16T18:08:36Z,mtusi-messenger-lab2-redis-1,0.23%,9.004MiB / 1.913GiB +2026-10-16T18:08:36Z,mtusi-messenger-lab3-lb-1,14.51%,11.66MiB / 64MiB +2026-10-16T18:08:36Z,mtusi-messenger-lab3-redis-1,0.20%,3.867MiB / 192MiB +2026-10-16T18:08:39Z,mtusi-messenger-lab3-api-2,11.02%,8.164MiB / 192MiB +2026-10-16T18:08:39Z,mtusi-messenger-lab3-api-1,11.15%,8.207MiB / 192MiB +2026-10-16T18:08:39Z,mtusi-messenger-lab3-api-4,11.03%,10.81MiB / 192MiB +2026-10-16T18:08:39Z,mtusi-messenger-lab3-api-3,11.59%,10.59MiB / 192MiB +2026-10-16T18:08:39Z,mtusi-messenger-lab3-postgres-1,49.74%,204.4MiB / 384MiB +2026-10-16T18:08:39Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:08:39Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:08:39Z,mtusi-messenger-lab3-lb-1,15.01%,11.65MiB / 64MiB +2026-10-16T18:08:39Z,mtusi-messenger-lab3-redis-1,0.21%,3.867MiB / 192MiB +2026-10-16T18:08:42Z,mtusi-messenger-lab3-api-2,0.41%,8.148MiB / 192MiB +2026-10-16T18:08:42Z,mtusi-messenger-lab3-api-1,0.41%,8.117MiB / 192MiB +2026-10-16T18:08:42Z,mtusi-messenger-lab3-api-4,0.30%,10.6MiB / 192MiB +2026-10-16T18:08:42Z,mtusi-messenger-lab3-api-3,0.40%,10.52MiB / 192MiB +2026-10-16T18:08:42Z,mtusi-messenger-lab3-postgres-1,1.30%,204.4MiB / 384MiB +2026-10-16T18:08:42Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:08:42Z,mtusi-messenger-lab2-redis-1,0.23%,9.004MiB / 1.913GiB +2026-10-16T18:08:42Z,mtusi-messenger-lab3-lb-1,0.49%,11.6MiB / 64MiB +2026-10-16T18:08:42Z,mtusi-messenger-lab3-redis-1,0.22%,3.867MiB / 192MiB +2026-10-16T18:08:45Z,mtusi-messenger-lab3-api-2,10.56%,8.156MiB / 192MiB +2026-10-16T18:08:45Z,mtusi-messenger-lab3-api-1,11.52%,8.148MiB / 192MiB +2026-10-16T18:08:45Z,mtusi-messenger-lab3-api-4,10.93%,10.85MiB / 192MiB +2026-10-16T18:08:45Z,mtusi-messenger-lab3-api-3,11.28%,10.53MiB / 192MiB +2026-10-16T18:08:45Z,mtusi-messenger-lab3-postgres-1,48.72%,204.7MiB / 384MiB +2026-10-16T18:08:45Z,mtusi-messenger-lab2-postgres-1,0.71%,178.3MiB / 1.913GiB +2026-10-16T18:08:45Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:08:45Z,mtusi-messenger-lab3-lb-1,15.05%,11.65MiB / 64MiB +2026-10-16T18:08:45Z,mtusi-messenger-lab3-redis-1,0.21%,3.867MiB / 192MiB +2026-10-16T18:08:48Z,mtusi-messenger-lab3-api-2,10.40%,8.191MiB / 192MiB +2026-10-16T18:08:48Z,mtusi-messenger-lab3-api-1,10.26%,8.078MiB / 192MiB +2026-10-16T18:08:48Z,mtusi-messenger-lab3-api-4,10.25%,10.78MiB / 192MiB +2026-10-16T18:08:48Z,mtusi-messenger-lab3-api-3,10.48%,10.59MiB / 192MiB +2026-10-16T18:08:48Z,mtusi-messenger-lab3-postgres-1,51.50%,205.4MiB / 384MiB +2026-10-16T18:08:48Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:08:48Z,mtusi-messenger-lab2-redis-1,0.71%,9.004MiB / 1.913GiB +2026-10-16T18:08:48Z,mtusi-messenger-lab3-lb-1,14.02%,11.64MiB / 64MiB +2026-10-16T18:08:48Z,mtusi-messenger-lab3-redis-1,0.21%,3.867MiB / 192MiB +2026-10-16T18:08:52Z,mtusi-messenger-lab3-api-2,9.83%,8.121MiB / 192MiB +2026-10-16T18:08:52Z,mtusi-messenger-lab3-api-1,9.89%,8.266MiB / 192MiB +2026-10-16T18:08:52Z,mtusi-messenger-lab3-api-4,10.60%,10.84MiB / 192MiB +2026-10-16T18:08:52Z,mtusi-messenger-lab3-api-3,10.31%,10.59MiB / 192MiB +2026-10-16T18:08:52Z,mtusi-messenger-lab3-postgres-1,50.52%,205.1MiB / 384MiB +2026-10-16T18:08:52Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:08:52Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:08:52Z,mtusi-messenger-lab3-lb-1,13.49%,11.65MiB / 64MiB +2026-10-16T18:08:52Z,mtusi-messenger-lab3-redis-1,0.65%,3.867MiB / 192MiB +2026-10-16T18:08:55Z,mtusi-messenger-lab3-api-2,3.17%,8.18MiB / 192MiB +2026-10-16T18:08:55Z,mtusi-messenger-lab3-api-1,3.50%,8.074MiB / 192MiB +2026-10-16T18:08:55Z,mtusi-messenger-lab3-api-4,3.35%,10.83MiB / 192MiB +2026-10-16T18:08:55Z,mtusi-messenger-lab3-api-3,3.19%,10.57MiB / 192MiB +2026-10-16T18:08:55Z,mtusi-messenger-lab3-postgres-1,50.88%,205.7MiB / 384MiB +2026-10-16T18:08:55Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:08:55Z,mtusi-messenger-lab2-redis-1,0.26%,9.004MiB / 1.913GiB +2026-10-16T18:08:55Z,mtusi-messenger-lab3-lb-1,4.53%,11.61MiB / 64MiB +2026-10-16T18:08:55Z,mtusi-messenger-lab3-redis-1,0.27%,3.867MiB / 192MiB diff --git a/evidence/track1/superseded/run2-host-client/stats-r1.csv b/evidence/track1/superseded/run2-host-client/stats-r1.csv new file mode 100644 index 00000000..397ce0be --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/stats-r1.csv @@ -0,0 +1,121 @@ +timestamp,container,cpu_percent,mem_usage +2026-10-16T17:58:39Z,mtusi-messenger-lab3-api-1,29.66%,197.9MiB / 768MiB +2026-10-16T17:58:39Z,mtusi-messenger-lab3-postgres-1,50.18%,61.14MiB / 384MiB +2026-10-16T17:58:39Z,mtusi-messenger-lab2-postgres-1,0.00%,166.1MiB / 1.913GiB +2026-10-16T17:58:39Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T17:58:39Z,mtusi-messenger-lab3-lb-1,13.20%,11.56MiB / 64MiB +2026-10-16T17:58:39Z,mtusi-messenger-lab3-redis-1,0.70%,3.863MiB / 192MiB +2026-10-16T17:58:42Z,mtusi-messenger-lab3-api-1,31.33%,12.33MiB / 768MiB +2026-10-16T17:58:42Z,mtusi-messenger-lab3-postgres-1,50.69%,63.97MiB / 384MiB +2026-10-16T17:58:42Z,mtusi-messenger-lab2-postgres-1,0.65%,167.4MiB / 1.913GiB +2026-10-16T17:58:42Z,mtusi-messenger-lab2-redis-1,0.25%,9.004MiB / 1.913GiB +2026-10-16T17:58:42Z,mtusi-messenger-lab3-lb-1,13.46%,11.54MiB / 64MiB +2026-10-16T17:58:42Z,mtusi-messenger-lab3-redis-1,0.74%,3.887MiB / 192MiB +2026-10-16T17:58:45Z,mtusi-messenger-lab3-api-1,30.06%,12.39MiB / 768MiB +2026-10-16T17:58:45Z,mtusi-messenger-lab3-postgres-1,49.51%,66.85MiB / 384MiB +2026-10-16T17:58:45Z,mtusi-messenger-lab2-postgres-1,0.00%,166.1MiB / 1.913GiB +2026-10-16T17:58:45Z,mtusi-messenger-lab2-redis-1,0.78%,9.004MiB / 1.913GiB +2026-10-16T17:58:45Z,mtusi-messenger-lab3-lb-1,13.24%,11.56MiB / 64MiB +2026-10-16T17:58:45Z,mtusi-messenger-lab3-redis-1,0.20%,3.863MiB / 192MiB +2026-10-16T17:58:48Z,mtusi-messenger-lab3-api-1,31.54%,12.25MiB / 768MiB +2026-10-16T17:58:48Z,mtusi-messenger-lab3-postgres-1,49.51%,72.35MiB / 384MiB +2026-10-16T17:58:48Z,mtusi-messenger-lab2-postgres-1,0.00%,166.1MiB / 1.913GiB +2026-10-16T17:58:48Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T17:58:48Z,mtusi-messenger-lab3-lb-1,13.41%,11.57MiB / 64MiB +2026-10-16T17:58:48Z,mtusi-messenger-lab3-redis-1,0.23%,3.863MiB / 192MiB +2026-10-16T17:58:51Z,mtusi-messenger-lab3-api-1,31.17%,12.2MiB / 768MiB +2026-10-16T17:58:51Z,mtusi-messenger-lab3-postgres-1,51.27%,76.55MiB / 384MiB +2026-10-16T17:58:51Z,mtusi-messenger-lab2-postgres-1,0.29%,166.1MiB / 1.913GiB +2026-10-16T17:58:51Z,mtusi-messenger-lab2-redis-1,0.23%,9.004MiB / 1.913GiB +2026-10-16T17:58:51Z,mtusi-messenger-lab3-lb-1,13.83%,11.58MiB / 64MiB +2026-10-16T17:58:51Z,mtusi-messenger-lab3-redis-1,0.22%,3.863MiB / 192MiB +2026-10-16T17:58:54Z,mtusi-messenger-lab3-api-1,31.27%,12.54MiB / 768MiB +2026-10-16T17:58:54Z,mtusi-messenger-lab3-postgres-1,50.28%,82.17MiB / 384MiB +2026-10-16T17:58:54Z,mtusi-messenger-lab2-postgres-1,0.00%,166.1MiB / 1.913GiB +2026-10-16T17:58:54Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T17:58:54Z,mtusi-messenger-lab3-lb-1,13.23%,11.58MiB / 64MiB +2026-10-16T17:58:54Z,mtusi-messenger-lab3-redis-1,0.20%,3.863MiB / 192MiB +2026-10-16T17:58:57Z,mtusi-messenger-lab3-api-1,30.65%,12.57MiB / 768MiB +2026-10-16T17:58:57Z,mtusi-messenger-lab3-postgres-1,50.20%,85.07MiB / 384MiB +2026-10-16T17:58:57Z,mtusi-messenger-lab2-postgres-1,0.76%,166.1MiB / 1.913GiB +2026-10-16T17:58:57Z,mtusi-messenger-lab2-redis-1,0.24%,9.004MiB / 1.913GiB +2026-10-16T17:58:57Z,mtusi-messenger-lab3-lb-1,13.46%,11.57MiB / 64MiB +2026-10-16T17:58:57Z,mtusi-messenger-lab3-redis-1,0.75%,3.863MiB / 192MiB +2026-10-16T17:59:00Z,mtusi-messenger-lab3-api-1,29.86%,12.33MiB / 768MiB +2026-10-16T17:59:00Z,mtusi-messenger-lab3-postgres-1,50.29%,87.65MiB / 384MiB +2026-10-16T17:59:00Z,mtusi-messenger-lab2-postgres-1,0.00%,166.1MiB / 1.913GiB +2026-10-16T17:59:00Z,mtusi-messenger-lab2-redis-1,0.67%,9.004MiB / 1.913GiB +2026-10-16T17:59:00Z,mtusi-messenger-lab3-lb-1,12.62%,11.57MiB / 64MiB +2026-10-16T17:59:00Z,mtusi-messenger-lab3-redis-1,0.18%,3.863MiB / 192MiB +2026-10-16T17:59:03Z,mtusi-messenger-lab3-api-1,30.59%,12.54MiB / 768MiB +2026-10-16T17:59:03Z,mtusi-messenger-lab3-postgres-1,50.38%,90.58MiB / 384MiB +2026-10-16T17:59:03Z,mtusi-messenger-lab2-postgres-1,0.00%,166.1MiB / 1.913GiB +2026-10-16T17:59:03Z,mtusi-messenger-lab2-redis-1,0.24%,9.004MiB / 1.913GiB +2026-10-16T17:59:03Z,mtusi-messenger-lab3-lb-1,14.15%,11.56MiB / 64MiB +2026-10-16T17:59:03Z,mtusi-messenger-lab3-redis-1,0.23%,3.863MiB / 192MiB +2026-10-16T17:59:06Z,mtusi-messenger-lab3-api-1,32.47%,12.66MiB / 768MiB +2026-10-16T17:59:06Z,mtusi-messenger-lab3-postgres-1,49.93%,92.53MiB / 384MiB +2026-10-16T17:59:06Z,mtusi-messenger-lab2-postgres-1,0.00%,166.1MiB / 1.913GiB +2026-10-16T17:59:06Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T17:59:06Z,mtusi-messenger-lab3-lb-1,14.85%,11.56MiB / 64MiB +2026-10-16T17:59:06Z,mtusi-messenger-lab3-redis-1,0.19%,3.863MiB / 192MiB +2026-10-16T17:59:09Z,mtusi-messenger-lab3-api-1,30.75%,12.21MiB / 768MiB +2026-10-16T17:59:09Z,mtusi-messenger-lab3-postgres-1,51.03%,97.3MiB / 384MiB +2026-10-16T17:59:09Z,mtusi-messenger-lab2-postgres-1,0.00%,166.1MiB / 1.913GiB +2026-10-16T17:59:09Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T17:59:09Z,mtusi-messenger-lab3-lb-1,13.27%,11.55MiB / 64MiB +2026-10-16T17:59:09Z,mtusi-messenger-lab3-redis-1,0.21%,3.863MiB / 192MiB +2026-10-16T17:59:13Z,mtusi-messenger-lab3-api-1,30.72%,12.3MiB / 768MiB +2026-10-16T17:59:13Z,mtusi-messenger-lab3-postgres-1,50.00%,100.3MiB / 384MiB +2026-10-16T17:59:13Z,mtusi-messenger-lab2-postgres-1,0.80%,166.1MiB / 1.913GiB +2026-10-16T17:59:13Z,mtusi-messenger-lab2-redis-1,0.24%,9.004MiB / 1.913GiB +2026-10-16T17:59:13Z,mtusi-messenger-lab3-lb-1,13.42%,11.56MiB / 64MiB +2026-10-16T17:59:13Z,mtusi-messenger-lab3-redis-1,0.21%,3.863MiB / 192MiB +2026-10-16T17:59:16Z,mtusi-messenger-lab3-api-1,31.41%,12.27MiB / 768MiB +2026-10-16T17:59:16Z,mtusi-messenger-lab3-postgres-1,50.85%,103.1MiB / 384MiB +2026-10-16T17:59:16Z,mtusi-messenger-lab2-postgres-1,0.00%,166.1MiB / 1.913GiB +2026-10-16T17:59:16Z,mtusi-messenger-lab2-redis-1,0.20%,9.004MiB / 1.913GiB +2026-10-16T17:59:16Z,mtusi-messenger-lab3-lb-1,13.48%,11.58MiB / 64MiB +2026-10-16T17:59:16Z,mtusi-messenger-lab3-redis-1,0.22%,3.863MiB / 192MiB +2026-10-16T17:59:19Z,mtusi-messenger-lab3-api-1,30.55%,12.33MiB / 768MiB +2026-10-16T17:59:19Z,mtusi-messenger-lab3-postgres-1,50.99%,106MiB / 384MiB +2026-10-16T17:59:19Z,mtusi-messenger-lab2-postgres-1,0.00%,165.9MiB / 1.913GiB +2026-10-16T17:59:19Z,mtusi-messenger-lab2-redis-1,0.20%,9.004MiB / 1.913GiB +2026-10-16T17:59:19Z,mtusi-messenger-lab3-lb-1,13.36%,11.57MiB / 64MiB +2026-10-16T17:59:19Z,mtusi-messenger-lab3-redis-1,0.21%,3.863MiB / 192MiB +2026-10-16T17:59:22Z,mtusi-messenger-lab3-api-1,31.55%,12.49MiB / 768MiB +2026-10-16T17:59:22Z,mtusi-messenger-lab3-postgres-1,50.55%,108.7MiB / 384MiB +2026-10-16T17:59:22Z,mtusi-messenger-lab2-postgres-1,0.00%,165.9MiB / 1.913GiB +2026-10-16T17:59:22Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T17:59:22Z,mtusi-messenger-lab3-lb-1,13.60%,11.57MiB / 64MiB +2026-10-16T17:59:22Z,mtusi-messenger-lab3-redis-1,0.21%,3.863MiB / 192MiB +2026-10-16T17:59:25Z,mtusi-messenger-lab3-api-1,31.15%,12.47MiB / 768MiB +2026-10-16T17:59:25Z,mtusi-messenger-lab3-postgres-1,49.63%,111.7MiB / 384MiB +2026-10-16T17:59:25Z,mtusi-messenger-lab2-postgres-1,0.00%,165.9MiB / 1.913GiB +2026-10-16T17:59:25Z,mtusi-messenger-lab2-redis-1,0.65%,9.004MiB / 1.913GiB +2026-10-16T17:59:25Z,mtusi-messenger-lab3-lb-1,13.45%,11.57MiB / 64MiB +2026-10-16T17:59:25Z,mtusi-messenger-lab3-redis-1,0.21%,3.863MiB / 192MiB +2026-10-16T17:59:28Z,mtusi-messenger-lab3-api-1,31.17%,12.38MiB / 768MiB +2026-10-16T17:59:28Z,mtusi-messenger-lab3-postgres-1,50.44%,114.9MiB / 384MiB +2026-10-16T17:59:28Z,mtusi-messenger-lab2-postgres-1,0.81%,165.9MiB / 1.913GiB +2026-10-16T17:59:28Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T17:59:28Z,mtusi-messenger-lab3-lb-1,13.48%,11.55MiB / 64MiB +2026-10-16T17:59:28Z,mtusi-messenger-lab3-redis-1,0.19%,3.863MiB / 192MiB +2026-10-16T17:59:31Z,mtusi-messenger-lab3-api-1,29.99%,12.48MiB / 768MiB +2026-10-16T17:59:31Z,mtusi-messenger-lab3-postgres-1,50.19%,117.4MiB / 384MiB +2026-10-16T17:59:31Z,mtusi-messenger-lab2-postgres-1,0.00%,165.9MiB / 1.913GiB +2026-10-16T17:59:31Z,mtusi-messenger-lab2-redis-1,0.72%,9.004MiB / 1.913GiB +2026-10-16T17:59:31Z,mtusi-messenger-lab3-lb-1,13.26%,11.57MiB / 64MiB +2026-10-16T17:59:31Z,mtusi-messenger-lab3-redis-1,0.21%,3.863MiB / 192MiB +2026-10-16T17:59:34Z,mtusi-messenger-lab3-api-1,30.03%,12.28MiB / 768MiB +2026-10-16T17:59:34Z,mtusi-messenger-lab3-postgres-1,50.77%,120.6MiB / 384MiB +2026-10-16T17:59:34Z,mtusi-messenger-lab2-postgres-1,0.00%,165.7MiB / 1.913GiB +2026-10-16T17:59:34Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T17:59:34Z,mtusi-messenger-lab3-lb-1,13.42%,11.57MiB / 64MiB +2026-10-16T17:59:34Z,mtusi-messenger-lab3-redis-1,0.23%,3.863MiB / 192MiB +2026-10-16T17:59:37Z,mtusi-messenger-lab3-api-1,21.59%,12.02MiB / 768MiB +2026-10-16T17:59:37Z,mtusi-messenger-lab3-postgres-1,46.38%,129MiB / 384MiB +2026-10-16T17:59:37Z,mtusi-messenger-lab2-postgres-1,0.77%,165.7MiB / 1.913GiB +2026-10-16T17:59:37Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T17:59:37Z,mtusi-messenger-lab3-lb-1,9.70%,11.51MiB / 64MiB +2026-10-16T17:59:37Z,mtusi-messenger-lab3-redis-1,0.23%,3.863MiB / 192MiB diff --git a/evidence/track1/superseded/run2-host-client/stats-r2.csv b/evidence/track1/superseded/run2-host-client/stats-r2.csv new file mode 100644 index 00000000..1ff5b5fa --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/stats-r2.csv @@ -0,0 +1,141 @@ +timestamp,container,cpu_percent,mem_usage +2026-10-16T18:14:53Z,mtusi-messenger-lab3-lb-1,15.34%,11.02MiB / 64MiB +2026-10-16T18:14:53Z,mtusi-messenger-lab3-postgres-1,50.15%,187MiB / 384MiB +2026-10-16T18:14:53Z,mtusi-messenger-lab3-api-1,20.18%,167.2MiB / 384MiB +2026-10-16T18:14:53Z,mtusi-messenger-lab3-api-2,19.97%,166.8MiB / 384MiB +2026-10-16T18:14:53Z,mtusi-messenger-lab2-postgres-1,0.71%,178.3MiB / 1.913GiB +2026-10-16T18:14:53Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:14:53Z,mtusi-messenger-lab3-redis-1,0.73%,3.863MiB / 192MiB +2026-10-16T18:14:56Z,mtusi-messenger-lab3-lb-1,14.34%,11.05MiB / 64MiB +2026-10-16T18:14:56Z,mtusi-messenger-lab3-postgres-1,49.69%,187.1MiB / 384MiB +2026-10-16T18:14:56Z,mtusi-messenger-lab3-api-1,19.64%,11.77MiB / 384MiB +2026-10-16T18:14:56Z,mtusi-messenger-lab3-api-2,19.52%,13.13MiB / 384MiB +2026-10-16T18:14:56Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:14:56Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:14:56Z,mtusi-messenger-lab3-redis-1,0.24%,3.863MiB / 192MiB +2026-10-16T18:14:59Z,mtusi-messenger-lab3-lb-1,14.74%,11.04MiB / 64MiB +2026-10-16T18:14:59Z,mtusi-messenger-lab3-postgres-1,49.98%,187.1MiB / 384MiB +2026-10-16T18:14:59Z,mtusi-messenger-lab3-api-1,19.44%,11.2MiB / 384MiB +2026-10-16T18:14:59Z,mtusi-messenger-lab3-api-2,19.74%,13.06MiB / 384MiB +2026-10-16T18:14:59Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:14:59Z,mtusi-messenger-lab2-redis-1,0.20%,9.004MiB / 1.913GiB +2026-10-16T18:14:59Z,mtusi-messenger-lab3-redis-1,0.21%,3.863MiB / 192MiB +2026-10-16T18:15:02Z,mtusi-messenger-lab3-lb-1,10.70%,11.04MiB / 64MiB +2026-10-16T18:15:02Z,mtusi-messenger-lab3-postgres-1,49.47%,199.8MiB / 384MiB +2026-10-16T18:15:02Z,mtusi-messenger-lab3-api-1,15.59%,11.29MiB / 384MiB +2026-10-16T18:15:02Z,mtusi-messenger-lab3-api-2,14.42%,13.13MiB / 384MiB +2026-10-16T18:15:02Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:15:02Z,mtusi-messenger-lab2-redis-1,0.23%,9.004MiB / 1.913GiB +2026-10-16T18:15:02Z,mtusi-messenger-lab3-redis-1,0.62%,3.863MiB / 192MiB +2026-10-16T18:15:05Z,mtusi-messenger-lab3-lb-1,14.45%,11.06MiB / 64MiB +2026-10-16T18:15:05Z,mtusi-messenger-lab3-postgres-1,50.28%,194.1MiB / 384MiB +2026-10-16T18:15:05Z,mtusi-messenger-lab3-api-1,19.73%,11.27MiB / 384MiB +2026-10-16T18:15:05Z,mtusi-messenger-lab3-api-2,19.31%,13.33MiB / 384MiB +2026-10-16T18:15:05Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:15:05Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:15:05Z,mtusi-messenger-lab3-redis-1,0.23%,3.863MiB / 192MiB +2026-10-16T18:15:08Z,mtusi-messenger-lab3-lb-1,1.87%,11.04MiB / 64MiB +2026-10-16T18:15:08Z,mtusi-messenger-lab3-postgres-1,49.37%,191.4MiB / 384MiB +2026-10-16T18:15:08Z,mtusi-messenger-lab3-api-1,19.85%,11.29MiB / 384MiB +2026-10-16T18:15:08Z,mtusi-messenger-lab3-api-2,19.50%,13.06MiB / 384MiB +2026-10-16T18:15:08Z,mtusi-messenger-lab2-postgres-1,0.77%,178.3MiB / 1.913GiB +2026-10-16T18:15:08Z,mtusi-messenger-lab2-redis-1,0.23%,9.004MiB / 1.913GiB +2026-10-16T18:15:08Z,mtusi-messenger-lab3-redis-1,0.22%,3.863MiB / 192MiB +2026-10-16T18:15:11Z,mtusi-messenger-lab3-lb-1,14.88%,11.05MiB / 64MiB +2026-10-16T18:15:11Z,mtusi-messenger-lab3-postgres-1,50.51%,191.6MiB / 384MiB +2026-10-16T18:15:11Z,mtusi-messenger-lab3-api-1,19.27%,11.11MiB / 384MiB +2026-10-16T18:15:11Z,mtusi-messenger-lab3-api-2,19.41%,12.97MiB / 384MiB +2026-10-16T18:15:11Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:15:11Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:15:11Z,mtusi-messenger-lab3-redis-1,0.24%,3.863MiB / 192MiB +2026-10-16T18:15:14Z,mtusi-messenger-lab3-lb-1,15.13%,11.05MiB / 64MiB +2026-10-16T18:15:14Z,mtusi-messenger-lab3-postgres-1,50.48%,192.2MiB / 384MiB +2026-10-16T18:15:14Z,mtusi-messenger-lab3-api-1,19.74%,11.11MiB / 384MiB +2026-10-16T18:15:14Z,mtusi-messenger-lab3-api-2,20.09%,12.87MiB / 384MiB +2026-10-16T18:15:14Z,mtusi-messenger-lab2-postgres-1,0.23%,178.3MiB / 1.913GiB +2026-10-16T18:15:14Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:15:14Z,mtusi-messenger-lab3-redis-1,0.22%,3.863MiB / 192MiB +2026-10-16T18:15:18Z,mtusi-messenger-lab3-lb-1,14.84%,11.06MiB / 64MiB +2026-10-16T18:15:18Z,mtusi-messenger-lab3-postgres-1,50.26%,192.2MiB / 384MiB +2026-10-16T18:15:18Z,mtusi-messenger-lab3-api-1,19.38%,11.13MiB / 384MiB +2026-10-16T18:15:18Z,mtusi-messenger-lab3-api-2,19.95%,13.72MiB / 384MiB +2026-10-16T18:15:18Z,mtusi-messenger-lab2-postgres-1,0.68%,178.3MiB / 1.913GiB +2026-10-16T18:15:18Z,mtusi-messenger-lab2-redis-1,0.23%,9.004MiB / 1.913GiB +2026-10-16T18:15:18Z,mtusi-messenger-lab3-redis-1,0.68%,3.863MiB / 192MiB +2026-10-16T18:15:21Z,mtusi-messenger-lab3-lb-1,14.40%,11.05MiB / 64MiB +2026-10-16T18:15:21Z,mtusi-messenger-lab3-postgres-1,49.06%,193.1MiB / 384MiB +2026-10-16T18:15:21Z,mtusi-messenger-lab3-api-1,18.81%,11.14MiB / 384MiB +2026-10-16T18:15:21Z,mtusi-messenger-lab3-api-2,19.02%,13.4MiB / 384MiB +2026-10-16T18:15:21Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:15:21Z,mtusi-messenger-lab2-redis-1,0.23%,9.004MiB / 1.913GiB +2026-10-16T18:15:21Z,mtusi-messenger-lab3-redis-1,0.23%,3.863MiB / 192MiB +2026-10-16T18:15:24Z,mtusi-messenger-lab3-lb-1,2.75%,11.04MiB / 64MiB +2026-10-16T18:15:24Z,mtusi-messenger-lab3-postgres-1,9.40%,193.6MiB / 384MiB +2026-10-16T18:15:24Z,mtusi-messenger-lab3-api-1,3.79%,11.26MiB / 384MiB +2026-10-16T18:15:24Z,mtusi-messenger-lab3-api-2,3.82%,13.12MiB / 384MiB +2026-10-16T18:15:24Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:15:24Z,mtusi-messenger-lab2-redis-1,0.23%,9.004MiB / 1.913GiB +2026-10-16T18:15:24Z,mtusi-messenger-lab3-redis-1,0.73%,3.863MiB / 192MiB +2026-10-16T18:15:27Z,mtusi-messenger-lab3-lb-1,14.63%,11.05MiB / 64MiB +2026-10-16T18:15:27Z,mtusi-messenger-lab3-postgres-1,49.93%,193.5MiB / 384MiB +2026-10-16T18:15:27Z,mtusi-messenger-lab3-api-1,19.81%,11.27MiB / 384MiB +2026-10-16T18:15:27Z,mtusi-messenger-lab3-api-2,19.40%,13.69MiB / 384MiB +2026-10-16T18:15:27Z,mtusi-messenger-lab2-postgres-1,0.20%,178.3MiB / 1.913GiB +2026-10-16T18:15:27Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:15:27Z,mtusi-messenger-lab3-redis-1,0.20%,3.863MiB / 192MiB +2026-10-16T18:15:30Z,mtusi-messenger-lab3-lb-1,15.02%,11.04MiB / 64MiB +2026-10-16T18:15:30Z,mtusi-messenger-lab3-postgres-1,49.49%,193.9MiB / 384MiB +2026-10-16T18:15:30Z,mtusi-messenger-lab3-api-1,20.42%,11.34MiB / 384MiB +2026-10-16T18:15:30Z,mtusi-messenger-lab3-api-2,19.72%,13MiB / 384MiB +2026-10-16T18:15:30Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:15:30Z,mtusi-messenger-lab2-redis-1,0.62%,9.004MiB / 1.913GiB +2026-10-16T18:15:30Z,mtusi-messenger-lab3-redis-1,0.21%,3.863MiB / 192MiB +2026-10-16T18:15:33Z,mtusi-messenger-lab3-lb-1,14.59%,11.04MiB / 64MiB +2026-10-16T18:15:33Z,mtusi-messenger-lab3-postgres-1,48.99%,194.5MiB / 384MiB +2026-10-16T18:15:33Z,mtusi-messenger-lab3-api-1,19.65%,11.25MiB / 384MiB +2026-10-16T18:15:33Z,mtusi-messenger-lab3-api-2,20.03%,13.14MiB / 384MiB +2026-10-16T18:15:33Z,mtusi-messenger-lab2-postgres-1,0.78%,178.3MiB / 1.913GiB +2026-10-16T18:15:33Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:15:33Z,mtusi-messenger-lab3-redis-1,0.23%,3.863MiB / 192MiB +2026-10-16T18:15:36Z,mtusi-messenger-lab3-lb-1,14.51%,11.05MiB / 64MiB +2026-10-16T18:15:36Z,mtusi-messenger-lab3-postgres-1,49.82%,194.5MiB / 384MiB +2026-10-16T18:15:36Z,mtusi-messenger-lab3-api-1,19.17%,11.26MiB / 384MiB +2026-10-16T18:15:36Z,mtusi-messenger-lab3-api-2,19.28%,12.89MiB / 384MiB +2026-10-16T18:15:36Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:15:36Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:15:36Z,mtusi-messenger-lab3-redis-1,0.24%,3.863MiB / 192MiB +2026-10-16T18:15:39Z,mtusi-messenger-lab3-lb-1,6.21%,11.05MiB / 64MiB +2026-10-16T18:15:39Z,mtusi-messenger-lab3-postgres-1,21.29%,194.8MiB / 384MiB +2026-10-16T18:15:39Z,mtusi-messenger-lab3-api-1,8.16%,11.25MiB / 384MiB +2026-10-16T18:15:39Z,mtusi-messenger-lab3-api-2,8.24%,13.44MiB / 384MiB +2026-10-16T18:15:39Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:15:39Z,mtusi-messenger-lab2-redis-1,0.23%,9.004MiB / 1.913GiB +2026-10-16T18:15:39Z,mtusi-messenger-lab3-redis-1,0.22%,4.113MiB / 192MiB +2026-10-16T18:15:42Z,mtusi-messenger-lab3-lb-1,14.47%,11.04MiB / 64MiB +2026-10-16T18:15:42Z,mtusi-messenger-lab3-postgres-1,49.21%,195.4MiB / 384MiB +2026-10-16T18:15:42Z,mtusi-messenger-lab3-api-1,19.71%,11.07MiB / 384MiB +2026-10-16T18:15:42Z,mtusi-messenger-lab3-api-2,19.16%,13.6MiB / 384MiB +2026-10-16T18:15:42Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:15:42Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:15:42Z,mtusi-messenger-lab3-redis-1,0.82%,3.863MiB / 192MiB +2026-10-16T18:15:45Z,mtusi-messenger-lab3-lb-1,14.63%,11.04MiB / 64MiB +2026-10-16T18:15:45Z,mtusi-messenger-lab3-postgres-1,49.09%,195.6MiB / 384MiB +2026-10-16T18:15:45Z,mtusi-messenger-lab3-api-1,19.35%,11.11MiB / 384MiB +2026-10-16T18:15:45Z,mtusi-messenger-lab3-api-2,19.18%,13.43MiB / 384MiB +2026-10-16T18:15:45Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:15:45Z,mtusi-messenger-lab2-redis-1,0.72%,9.004MiB / 1.913GiB +2026-10-16T18:15:45Z,mtusi-messenger-lab3-redis-1,0.22%,3.863MiB / 192MiB +2026-10-16T18:15:48Z,mtusi-messenger-lab3-lb-1,15.08%,11.05MiB / 64MiB +2026-10-16T18:15:48Z,mtusi-messenger-lab3-postgres-1,50.44%,196.2MiB / 384MiB +2026-10-16T18:15:48Z,mtusi-messenger-lab3-api-1,19.72%,11.1MiB / 384MiB +2026-10-16T18:15:48Z,mtusi-messenger-lab3-api-2,20.21%,13.05MiB / 384MiB +2026-10-16T18:15:48Z,mtusi-messenger-lab2-postgres-1,0.75%,178.3MiB / 1.913GiB +2026-10-16T18:15:48Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:15:48Z,mtusi-messenger-lab3-redis-1,0.21%,3.863MiB / 192MiB +2026-10-16T18:15:51Z,mtusi-messenger-lab3-lb-1,10.25%,10.99MiB / 64MiB +2026-10-16T18:15:51Z,mtusi-messenger-lab3-postgres-1,49.45%,206.2MiB / 384MiB +2026-10-16T18:15:51Z,mtusi-messenger-lab3-api-1,13.33%,11.08MiB / 384MiB +2026-10-16T18:15:51Z,mtusi-messenger-lab3-api-2,13.26%,13.6MiB / 384MiB +2026-10-16T18:15:51Z,mtusi-messenger-lab2-postgres-1,0.00%,178.3MiB / 1.913GiB +2026-10-16T18:15:51Z,mtusi-messenger-lab2-redis-1,0.70%,9.004MiB / 1.913GiB +2026-10-16T18:15:51Z,mtusi-messenger-lab3-redis-1,0.22%,3.863MiB / 192MiB diff --git a/evidence/track1/superseded/run2-host-client/stats-r4.csv b/evidence/track1/superseded/run2-host-client/stats-r4.csv new file mode 100644 index 00000000..e951b0a7 --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/stats-r4.csv @@ -0,0 +1,181 @@ +timestamp,container,cpu_percent,mem_usage +2026-10-16T18:01:15Z,mtusi-messenger-lab3-api-1,8.59%,142.6MiB / 192MiB +2026-10-16T18:01:15Z,mtusi-messenger-lab3-api-2,9.49%,78.38MiB / 192MiB +2026-10-16T18:01:15Z,mtusi-messenger-lab3-api-4,14.30%,142.2MiB / 192MiB +2026-10-16T18:01:15Z,mtusi-messenger-lab3-api-3,8.42%,10.41MiB / 192MiB +2026-10-16T18:01:15Z,mtusi-messenger-lab3-postgres-1,39.44%,186.3MiB / 384MiB +2026-10-16T18:01:15Z,mtusi-messenger-lab2-postgres-1,0.23%,233.4MiB / 1.913GiB +2026-10-16T18:01:15Z,mtusi-messenger-lab2-redis-1,0.24%,9.004MiB / 1.913GiB +2026-10-16T18:01:15Z,mtusi-messenger-lab3-lb-1,0.33%,11.52MiB / 64MiB +2026-10-16T18:01:15Z,mtusi-messenger-lab3-redis-1,0.22%,3.867MiB / 192MiB +2026-10-16T18:01:18Z,mtusi-messenger-lab3-api-1,10.92%,168.6MiB / 192MiB +2026-10-16T18:01:18Z,mtusi-messenger-lab3-api-2,11.44%,104.8MiB / 192MiB +2026-10-16T18:01:18Z,mtusi-messenger-lab3-api-4,11.17%,169.7MiB / 192MiB +2026-10-16T18:01:18Z,mtusi-messenger-lab3-api-3,11.77%,10.46MiB / 192MiB +2026-10-16T18:01:18Z,mtusi-messenger-lab3-postgres-1,50.77%,186.8MiB / 384MiB +2026-10-16T18:01:18Z,mtusi-messenger-lab2-postgres-1,0.75%,233.4MiB / 1.913GiB +2026-10-16T18:01:18Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:01:18Z,mtusi-messenger-lab3-lb-1,14.42%,11.57MiB / 64MiB +2026-10-16T18:01:18Z,mtusi-messenger-lab3-redis-1,0.73%,3.867MiB / 192MiB +2026-10-16T18:01:21Z,mtusi-messenger-lab3-api-2,11.18%,133.9MiB / 192MiB +2026-10-16T18:01:21Z,mtusi-messenger-lab3-api-3,11.25%,10.43MiB / 192MiB +2026-10-16T18:01:21Z,mtusi-messenger-lab3-postgres-1,38.92%,173.8MiB / 384MiB +2026-10-16T18:01:21Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:01:21Z,mtusi-messenger-lab2-redis-1,0.61%,9.004MiB / 1.913GiB +2026-10-16T18:01:21Z,mtusi-messenger-lab3-lb-1,11.97%,11.58MiB / 64MiB +2026-10-16T18:01:21Z,mtusi-messenger-lab3-redis-1,0.22%,3.867MiB / 192MiB +2026-10-16T18:01:21Z,mtusi-messenger-lab3-api-4,6.30%,7.473MiB / 192MiB +2026-10-16T18:01:21Z,mtusi-messenger-lab3-api-1,4.41%,7.18MiB / 192MiB +2026-10-16T18:01:26Z,mtusi-messenger-lab3-api-1,11.11%,7.996MiB / 192MiB +2026-10-16T18:01:26Z,mtusi-messenger-lab3-api-2,10.49%,13.34MiB / 192MiB +2026-10-16T18:01:26Z,mtusi-messenger-lab3-api-4,10.87%,7.949MiB / 192MiB +2026-10-16T18:01:26Z,mtusi-messenger-lab3-api-3,11.10%,10.44MiB / 192MiB +2026-10-16T18:01:26Z,mtusi-messenger-lab3-postgres-1,49.61%,187.1MiB / 384MiB +2026-10-16T18:01:26Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:01:26Z,mtusi-messenger-lab2-redis-1,0.72%,9.004MiB / 1.913GiB +2026-10-16T18:01:26Z,mtusi-messenger-lab3-lb-1,14.64%,11.59MiB / 64MiB +2026-10-16T18:01:26Z,mtusi-messenger-lab3-redis-1,0.22%,3.867MiB / 192MiB +2026-10-16T18:01:29Z,mtusi-messenger-lab3-api-1,11.71%,7.973MiB / 192MiB +2026-10-16T18:01:29Z,mtusi-messenger-lab3-api-2,10.67%,12.75MiB / 192MiB +2026-10-16T18:01:29Z,mtusi-messenger-lab3-api-4,10.03%,7.973MiB / 192MiB +2026-10-16T18:01:29Z,mtusi-messenger-lab3-api-3,10.04%,10.43MiB / 192MiB +2026-10-16T18:01:29Z,mtusi-messenger-lab3-postgres-1,46.61%,187.5MiB / 384MiB +2026-10-16T18:01:29Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:01:29Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:01:29Z,mtusi-messenger-lab3-lb-1,13.82%,11.54MiB / 64MiB +2026-10-16T18:01:29Z,mtusi-messenger-lab3-redis-1,0.22%,3.867MiB / 192MiB +2026-10-16T18:01:32Z,mtusi-messenger-lab3-api-1,10.60%,8.043MiB / 192MiB +2026-10-16T18:01:32Z,mtusi-messenger-lab3-api-2,11.20%,12.65MiB / 192MiB +2026-10-16T18:01:32Z,mtusi-messenger-lab3-api-4,9.94%,8.008MiB / 192MiB +2026-10-16T18:01:32Z,mtusi-messenger-lab3-api-3,11.32%,10.49MiB / 192MiB +2026-10-16T18:01:32Z,mtusi-messenger-lab3-postgres-1,47.90%,187.9MiB / 384MiB +2026-10-16T18:01:32Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:01:32Z,mtusi-messenger-lab2-redis-1,0.20%,9.004MiB / 1.913GiB +2026-10-16T18:01:32Z,mtusi-messenger-lab3-lb-1,13.77%,11.86MiB / 64MiB +2026-10-16T18:01:32Z,mtusi-messenger-lab3-redis-1,0.24%,3.867MiB / 192MiB +2026-10-16T18:01:35Z,mtusi-messenger-lab3-api-1,11.04%,7.977MiB / 192MiB +2026-10-16T18:01:35Z,mtusi-messenger-lab3-api-2,10.70%,12.65MiB / 192MiB +2026-10-16T18:01:35Z,mtusi-messenger-lab3-api-4,10.97%,8.133MiB / 192MiB +2026-10-16T18:01:35Z,mtusi-messenger-lab3-api-3,10.40%,10.41MiB / 192MiB +2026-10-16T18:01:35Z,mtusi-messenger-lab3-postgres-1,50.06%,188.4MiB / 384MiB +2026-10-16T18:01:35Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:01:35Z,mtusi-messenger-lab2-redis-1,0.23%,9.004MiB / 1.913GiB +2026-10-16T18:01:35Z,mtusi-messenger-lab3-lb-1,14.22%,11.59MiB / 64MiB +2026-10-16T18:01:35Z,mtusi-messenger-lab3-redis-1,0.20%,3.867MiB / 192MiB +2026-10-16T18:01:38Z,mtusi-messenger-lab3-api-1,11.45%,8.223MiB / 192MiB +2026-10-16T18:01:38Z,mtusi-messenger-lab3-api-2,11.55%,12.65MiB / 192MiB +2026-10-16T18:01:38Z,mtusi-messenger-lab3-api-4,10.71%,8.141MiB / 192MiB +2026-10-16T18:01:38Z,mtusi-messenger-lab3-api-3,10.56%,10.43MiB / 192MiB +2026-10-16T18:01:38Z,mtusi-messenger-lab3-postgres-1,50.07%,188.8MiB / 384MiB +2026-10-16T18:01:38Z,mtusi-messenger-lab2-postgres-1,1.01%,240.5MiB / 1.913GiB +2026-10-16T18:01:38Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:01:38Z,mtusi-messenger-lab3-lb-1,14.72%,11.61MiB / 64MiB +2026-10-16T18:01:38Z,mtusi-messenger-lab3-redis-1,0.69%,3.867MiB / 192MiB +2026-10-16T18:01:41Z,mtusi-messenger-lab3-api-1,10.85%,8.055MiB / 192MiB +2026-10-16T18:01:41Z,mtusi-messenger-lab3-api-2,11.10%,13.17MiB / 192MiB +2026-10-16T18:01:41Z,mtusi-messenger-lab3-api-4,10.41%,8.133MiB / 192MiB +2026-10-16T18:01:41Z,mtusi-messenger-lab3-api-3,11.10%,10.42MiB / 192MiB +2026-10-16T18:01:41Z,mtusi-messenger-lab3-postgres-1,49.62%,189.4MiB / 384MiB +2026-10-16T18:01:41Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:01:41Z,mtusi-messenger-lab2-redis-1,0.65%,9.004MiB / 1.913GiB +2026-10-16T18:01:41Z,mtusi-messenger-lab3-lb-1,14.56%,11.59MiB / 64MiB +2026-10-16T18:01:41Z,mtusi-messenger-lab3-redis-1,0.24%,3.867MiB / 192MiB +2026-10-16T18:01:44Z,mtusi-messenger-lab3-api-1,10.98%,8.109MiB / 192MiB +2026-10-16T18:01:44Z,mtusi-messenger-lab3-api-2,11.32%,12.77MiB / 192MiB +2026-10-16T18:01:44Z,mtusi-messenger-lab3-api-4,10.48%,8.141MiB / 192MiB +2026-10-16T18:01:44Z,mtusi-messenger-lab3-api-3,10.98%,10.36MiB / 192MiB +2026-10-16T18:01:44Z,mtusi-messenger-lab3-postgres-1,50.41%,189.9MiB / 384MiB +2026-10-16T18:01:44Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:01:44Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:01:44Z,mtusi-messenger-lab3-lb-1,14.84%,11.61MiB / 64MiB +2026-10-16T18:01:44Z,mtusi-messenger-lab3-redis-1,0.77%,3.867MiB / 192MiB +2026-10-16T18:01:47Z,mtusi-messenger-lab3-api-1,8.62%,8.059MiB / 192MiB +2026-10-16T18:01:47Z,mtusi-messenger-lab3-api-2,8.69%,12.91MiB / 192MiB +2026-10-16T18:01:47Z,mtusi-messenger-lab3-api-4,9.10%,8.148MiB / 192MiB +2026-10-16T18:01:47Z,mtusi-messenger-lab3-api-3,8.16%,10.37MiB / 192MiB +2026-10-16T18:01:47Z,mtusi-messenger-lab3-postgres-1,37.94%,190.1MiB / 384MiB +2026-10-16T18:01:47Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:01:47Z,mtusi-messenger-lab2-redis-1,0.22%,9.004MiB / 1.913GiB +2026-10-16T18:01:47Z,mtusi-messenger-lab3-lb-1,0.06%,11.54MiB / 64MiB +2026-10-16T18:01:47Z,mtusi-messenger-lab3-redis-1,0.22%,3.867MiB / 192MiB +2026-10-16T18:01:50Z,mtusi-messenger-lab3-api-1,8.06%,7.984MiB / 192MiB +2026-10-16T18:01:50Z,mtusi-messenger-lab3-api-2,7.97%,12.93MiB / 192MiB +2026-10-16T18:01:50Z,mtusi-messenger-lab3-api-4,8.10%,8.09MiB / 192MiB +2026-10-16T18:01:50Z,mtusi-messenger-lab3-api-3,8.09%,10.37MiB / 192MiB +2026-10-16T18:01:50Z,mtusi-messenger-lab3-postgres-1,49.15%,187.2MiB / 384MiB +2026-10-16T18:01:50Z,mtusi-messenger-lab2-postgres-1,0.20%,240.5MiB / 1.913GiB +2026-10-16T18:01:50Z,mtusi-messenger-lab2-redis-1,0.21%,9.004MiB / 1.913GiB +2026-10-16T18:01:50Z,mtusi-messenger-lab3-lb-1,10.58%,11.58MiB / 64MiB +2026-10-16T18:01:50Z,mtusi-messenger-lab3-redis-1,0.23%,3.867MiB / 192MiB +2026-10-16T18:01:53Z,mtusi-messenger-lab3-api-1,10.57%,7.996MiB / 192MiB +2026-10-16T18:01:53Z,mtusi-messenger-lab3-api-2,11.56%,13.09MiB / 192MiB +2026-10-16T18:01:53Z,mtusi-messenger-lab3-api-4,10.78%,8.094MiB / 192MiB +2026-10-16T18:01:53Z,mtusi-messenger-lab3-api-3,10.48%,10.48MiB / 192MiB +2026-10-16T18:01:53Z,mtusi-messenger-lab3-postgres-1,49.61%,187.7MiB / 384MiB +2026-10-16T18:01:53Z,mtusi-messenger-lab2-postgres-1,0.80%,240.5MiB / 1.913GiB +2026-10-16T18:01:53Z,mtusi-messenger-lab2-redis-1,0.20%,9.004MiB / 1.913GiB +2026-10-16T18:01:53Z,mtusi-messenger-lab3-lb-1,14.58%,11.59MiB / 64MiB +2026-10-16T18:01:53Z,mtusi-messenger-lab3-redis-1,0.72%,3.867MiB / 192MiB +2026-10-16T18:01:57Z,mtusi-messenger-lab3-api-1,10.65%,8.094MiB / 192MiB +2026-10-16T18:01:57Z,mtusi-messenger-lab3-api-2,11.02%,12.71MiB / 192MiB +2026-10-16T18:01:57Z,mtusi-messenger-lab3-api-4,11.74%,8.098MiB / 192MiB +2026-10-16T18:01:57Z,mtusi-messenger-lab3-api-3,11.15%,10.45MiB / 192MiB +2026-10-16T18:01:57Z,mtusi-messenger-lab3-postgres-1,50.24%,188.3MiB / 384MiB +2026-10-16T18:01:57Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:01:57Z,mtusi-messenger-lab2-redis-1,0.20%,9.004MiB / 1.913GiB +2026-10-16T18:01:57Z,mtusi-messenger-lab3-lb-1,14.89%,11.6MiB / 64MiB +2026-10-16T18:01:57Z,mtusi-messenger-lab3-redis-1,0.21%,3.867MiB / 192MiB +2026-10-16T18:02:00Z,mtusi-messenger-lab3-api-1,10.51%,8.383MiB / 192MiB +2026-10-16T18:02:00Z,mtusi-messenger-lab3-api-2,10.71%,12.96MiB / 192MiB +2026-10-16T18:02:00Z,mtusi-messenger-lab3-api-4,10.41%,8.156MiB / 192MiB +2026-10-16T18:02:00Z,mtusi-messenger-lab3-api-3,11.11%,10.45MiB / 192MiB +2026-10-16T18:02:00Z,mtusi-messenger-lab3-postgres-1,48.78%,188.8MiB / 384MiB +2026-10-16T18:02:00Z,mtusi-messenger-lab2-postgres-1,0.87%,240.5MiB / 1.913GiB +2026-10-16T18:02:00Z,mtusi-messenger-lab2-redis-1,0.20%,9.004MiB / 1.913GiB +2026-10-16T18:02:00Z,mtusi-messenger-lab3-lb-1,14.51%,11.59MiB / 64MiB +2026-10-16T18:02:00Z,mtusi-messenger-lab3-redis-1,0.20%,3.867MiB / 192MiB +2026-10-16T18:02:03Z,mtusi-messenger-lab3-api-1,0.04%,8.051MiB / 192MiB +2026-10-16T18:02:03Z,mtusi-messenger-lab3-api-2,0.04%,12.73MiB / 192MiB +2026-10-16T18:02:03Z,mtusi-messenger-lab3-api-4,0.03%,8.086MiB / 192MiB +2026-10-16T18:02:03Z,mtusi-messenger-lab3-api-3,0.03%,10.44MiB / 192MiB +2026-10-16T18:02:03Z,mtusi-messenger-lab3-postgres-1,0.18%,189.1MiB / 384MiB +2026-10-16T18:02:03Z,mtusi-messenger-lab2-postgres-1,0.23%,240.5MiB / 1.913GiB +2026-10-16T18:02:03Z,mtusi-messenger-lab2-redis-1,0.24%,9.004MiB / 1.913GiB +2026-10-16T18:02:03Z,mtusi-messenger-lab3-lb-1,0.12%,11.54MiB / 64MiB +2026-10-16T18:02:03Z,mtusi-messenger-lab3-redis-1,0.23%,3.867MiB / 192MiB +2026-10-16T18:02:06Z,mtusi-messenger-lab3-api-1,10.71%,8.109MiB / 192MiB +2026-10-16T18:02:06Z,mtusi-messenger-lab3-api-2,10.63%,12.71MiB / 192MiB +2026-10-16T18:02:06Z,mtusi-messenger-lab3-api-4,11.29%,8.098MiB / 192MiB +2026-10-16T18:02:06Z,mtusi-messenger-lab3-api-3,10.92%,10.38MiB / 192MiB +2026-10-16T18:02:06Z,mtusi-messenger-lab3-postgres-1,49.82%,189.7MiB / 384MiB +2026-10-16T18:02:06Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:02:06Z,mtusi-messenger-lab2-redis-1,0.76%,9.004MiB / 1.913GiB +2026-10-16T18:02:06Z,mtusi-messenger-lab3-lb-1,14.79%,11.59MiB / 64MiB +2026-10-16T18:02:06Z,mtusi-messenger-lab3-redis-1,0.19%,3.867MiB / 192MiB +2026-10-16T18:02:09Z,mtusi-messenger-lab3-api-1,11.20%,8.121MiB / 192MiB +2026-10-16T18:02:09Z,mtusi-messenger-lab3-api-2,11.05%,12.85MiB / 192MiB +2026-10-16T18:02:09Z,mtusi-messenger-lab3-api-4,10.98%,8.102MiB / 192MiB +2026-10-16T18:02:09Z,mtusi-messenger-lab3-api-3,10.48%,10.38MiB / 192MiB +2026-10-16T18:02:09Z,mtusi-messenger-lab3-postgres-1,50.74%,190.2MiB / 384MiB +2026-10-16T18:02:09Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:02:09Z,mtusi-messenger-lab2-redis-1,0.20%,9.004MiB / 1.913GiB +2026-10-16T18:02:09Z,mtusi-messenger-lab3-lb-1,14.65%,11.59MiB / 64MiB +2026-10-16T18:02:09Z,mtusi-messenger-lab3-redis-1,0.23%,3.867MiB / 192MiB +2026-10-16T18:02:12Z,mtusi-messenger-lab3-api-1,10.56%,8.129MiB / 192MiB +2026-10-16T18:02:12Z,mtusi-messenger-lab3-api-2,11.70%,12.79MiB / 192MiB +2026-10-16T18:02:12Z,mtusi-messenger-lab3-api-4,10.40%,8.102MiB / 192MiB +2026-10-16T18:02:12Z,mtusi-messenger-lab3-api-3,11.18%,10.39MiB / 192MiB +2026-10-16T18:02:12Z,mtusi-messenger-lab3-postgres-1,48.26%,188.2MiB / 384MiB +2026-10-16T18:02:12Z,mtusi-messenger-lab2-postgres-1,0.00%,240.5MiB / 1.913GiB +2026-10-16T18:02:12Z,mtusi-messenger-lab2-redis-1,0.20%,9.004MiB / 1.913GiB +2026-10-16T18:02:12Z,mtusi-messenger-lab3-lb-1,14.18%,11.58MiB / 64MiB +2026-10-16T18:02:12Z,mtusi-messenger-lab3-redis-1,0.21%,3.867MiB / 192MiB +2026-10-16T18:02:15Z,mtusi-messenger-lab3-api-1,1.25%,8.117MiB / 192MiB +2026-10-16T18:02:15Z,mtusi-messenger-lab3-api-2,1.35%,12.95MiB / 192MiB +2026-10-16T18:02:15Z,mtusi-messenger-lab3-api-4,1.28%,8.113MiB / 192MiB +2026-10-16T18:02:15Z,mtusi-messenger-lab3-api-3,1.22%,10.38MiB / 192MiB +2026-10-16T18:02:15Z,mtusi-messenger-lab3-postgres-1,47.75%,190.8MiB / 384MiB +2026-10-16T18:02:15Z,mtusi-messenger-lab2-postgres-1,0.23%,240.5MiB / 1.913GiB +2026-10-16T18:02:15Z,mtusi-messenger-lab2-redis-1,0.28%,9.004MiB / 1.913GiB +2026-10-16T18:02:15Z,mtusi-messenger-lab3-lb-1,1.74%,11.54MiB / 64MiB +2026-10-16T18:02:15Z,mtusi-messenger-lab3-redis-1,0.29%,3.867MiB / 192MiB diff --git a/evidence/track1/superseded/run2-host-client/summary.md b/evidence/track1/superseded/run2-host-client/summary.md new file mode 100644 index 00000000..5bb33ea0 --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/summary.md @@ -0,0 +1,14 @@ +# Трек 1: цена масштабирования + +| профиль | реплик | бюджет CPU API | CPU/реплика | бюджет PG CPU/RAM | пул | LB CPU (лимит) | успешный RPS | p50 мс | p95 мс | p99 мс | ошибки | API CPU (сумма) | API RAM max (сумма, MiB) | PG CPU | LB CPU | +| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | +| db1cpu | 2 | 1.0 | 0.5 | 1.00/384M | 10 | 0.25 | 1579.722 | 4.033 | 6.236 | 8.668 | 26520 | 34.37 | 340.0 | 46.08 | 13.74 | +| g05 | 2 | 0.5 | 0.25 | 0.50/384M | 10 | 0.25 | 1584.428 | 4.042 | 9.331 | 27.665 | 2845 | 35.23 | 264.6 | 48.11 | 13.01 | +| g10 | 2 | 1.0 | 0.5 | 0.50/384M | 10 | 0.25 | 1597.028 | 3.927 | 7.67 | 21.91 | 13795 | 34.67 | 336.7 | 47.34 | 12.38 | +| g15 | 2 | 1.5 | 0.75 | 0.50/384M | 10 | 0.25 | 1639.884 | 3.963 | 7.721 | 23.6 | 6960 | 36.73 | 271.5 | 48.9 | 13.83 | +| lb1cpu | 2 | 1.0 | 0.5 | 0.50/384M | 10 | 1.00 | 1631.408 | 3.894 | 6.989 | 20.148 | 15652 | 35.82 | 336.2 | 44.66 | 13.13 | +| pool10 | 4 | 1.0 | 0.25 | 0.50/384M | 10 | 0.25 | 1582.872 | 4.156 | 7.798 | 19.723 | 11008 | 41.21 | 535.9 | 44.04 | 13.36 | +| pool5 | 4 | 1.0 | 0.25 | 0.50/384M | 5 | 0.25 | 1551.419 | 4.125 | 7.868 | 21.268 | 13051 | 38.75 | 451.3 | 45.23 | 12.9 | +| r1 | 1 | 1.0 | 1.0 | 0.50/384M | 10 | 0.25 | 1717.626 | 3.85 | 7.538 | 25.045 | 0 | 30.38 | 197.9 | 50.15 | 13.29 | +| r2 | 2 | 1.0 | 0.5 | 0.50/384M | 10 | 0.25 | 1632.545 | 3.959 | 7.508 | 22.12 | 9791 | 35.4 | 334.0 | 46.32 | 12.64 | +| r4 | 4 | 1.0 | 0.25 | 0.50/384M | 10 | 0.25 | 1535.673 | 4.184 | 8.208 | 22.167 | 11454 | 37.84 | 453.6 | 45.29 | 11.37 | diff --git a/evidence/track1/superseded/run2-host-client/summary.txt b/evidence/track1/superseded/run2-host-client/summary.txt new file mode 100644 index 00000000..54f13497 --- /dev/null +++ b/evidence/track1/superseded/run2-host-client/summary.txt @@ -0,0 +1,300 @@ +# Track 1: the price of scaling +# generated: 2026-10-16T17:58:18Z +# host: Darwin arm64 +# cpu: Apple M5 Pro +# ram bytes: 51539607552 +# load: tests/load.py closed loop; postgres/lb budgets are recreated and verified per profile +# each profile line below records the budget it was run with +docker engine 29.5.2 +Docker Compose version 5.5.1 + +=== invocation 2026-10-16T17:58:18Z: REPLICAS="1" TOTAL_CPU=1.0 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=r1 replicas=1 cpu=1.00 mem=768M postgres=0.50/384M lb_cpu=0.25 max_conns=10 === +=== applied label=r1 replicas=1 postgres=0.50/384M lb_cpu=0.25 (снято с контейнеров) +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.011, + "concurrency": 8, + "successful_requests": 103077, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1717.626, + "successful_latency_ms": { + "p50": 3.85, + "p95": 7.538, + "p99": 25.045 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=18 +postgres_max_connections=100 +messages_rows=1919638 +idempotency_rows=1919638 + +=== invocation 2026-10-16T17:59:40Z: REPLICAS="2" TOTAL_CPU=1.0 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=r2 replicas=2 cpu=0.50 mem=384M postgres=0.50/384M lb_cpu=0.25 max_conns=10 === +=== applied label=r2 replicas=2 postgres=0.50/384M lb_cpu=0.25 (снято с контейнеров) +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.014, + "concurrency": 8, + "successful_requests": 100215, + "failed_requests": 4450, + "error_ratio": 0.042517, + "successful_rps": 1669.874, + "successful_latency_ms": { + "p50": 4.01, + "p95": 7.699, + "p99": 22.735 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=19 +postgres_max_connections=100 +messages_rows=2044175 +idempotency_rows=2044175 + +=== invocation 2026-10-16T18:00:57Z: REPLICAS="4" TOTAL_CPU=1.0 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=r4 replicas=4 cpu=0.25 mem=192M postgres=0.50/384M lb_cpu=0.25 max_conns=10 === +=== applied label=r4 replicas=4 postgres=0.50/384M lb_cpu=0.25 (снято с контейнеров) +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.013, + "concurrency": 8, + "successful_requests": 92161, + "failed_requests": 11454, + "error_ratio": 0.110544, + "successful_rps": 1535.673, + "successful_latency_ms": { + "p50": 4.184, + "p95": 8.208, + "p99": 22.167 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=21 +postgres_max_connections=100 +messages_rows=2161959 +idempotency_rows=2161959 + +=== invocation 2026-10-16T18:02:17Z: REPLICAS="2" TOTAL_CPU=0.5 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=g05 replicas=2 cpu=0.25 mem=384M postgres=0.50/384M lb_cpu=0.25 max_conns=10 === +=== applied label=g05 replicas=2 postgres=0.50/384M lb_cpu=0.25 (снято с контейнеров) +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.013, + "concurrency": 8, + "successful_requests": 95087, + "failed_requests": 2845, + "error_ratio": 0.029051, + "successful_rps": 1584.428, + "successful_latency_ms": { + "p50": 4.042, + "p95": 9.331, + "p99": 27.665 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=19 +postgres_max_connections=100 +messages_rows=2282714 +idempotency_rows=2282714 + +=== invocation 2026-10-16T18:03:42Z: REPLICAS="2" TOTAL_CPU=1.0 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=g10 replicas=2 cpu=0.50 mem=384M postgres=0.50/384M lb_cpu=0.25 max_conns=10 === +=== applied label=g10 replicas=2 postgres=0.50/384M lb_cpu=0.25 (снято с контейнеров) +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.012, + "concurrency": 8, + "successful_requests": 95841, + "failed_requests": 13795, + "error_ratio": 0.125825, + "successful_rps": 1597.028, + "successful_latency_ms": { + "p50": 3.927, + "p95": 7.67, + "p99": 21.91 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=19 +postgres_max_connections=100 +messages_rows=2404027 +idempotency_rows=2404027 + +=== invocation 2026-10-16T18:05:00Z: REPLICAS="2" TOTAL_CPU=1.5 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=g15 replicas=2 cpu=0.75 mem=384M postgres=0.50/384M lb_cpu=0.25 max_conns=10 === +=== applied label=g15 replicas=2 postgres=0.50/384M lb_cpu=0.25 (снято с контейнеров) +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.011, + "concurrency": 8, + "successful_requests": 98411, + "failed_requests": 6960, + "error_ratio": 0.066052, + "successful_rps": 1639.884, + "successful_latency_ms": { + "p50": 3.963, + "p95": 7.721, + "p99": 23.6 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=19 +postgres_max_connections=100 +messages_rows=2528963 +idempotency_rows=2528963 + +=== invocation 2026-10-16T18:06:17Z: REPLICAS="4" TOTAL_CPU=1.0 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=pool10 replicas=4 cpu=0.25 mem=192M postgres=0.50/384M lb_cpu=0.25 max_conns=10 === +=== applied label=pool10 replicas=4 postgres=0.50/384M lb_cpu=0.25 (снято с контейнеров) +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.014, + "concurrency": 8, + "successful_requests": 94995, + "failed_requests": 11008, + "error_ratio": 0.103846, + "successful_rps": 1582.872, + "successful_latency_ms": { + "p50": 4.156, + "p95": 7.798, + "p99": 19.723 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=23 +postgres_max_connections=100 +messages_rows=2649923 +idempotency_rows=2649923 + +=== invocation 2026-10-16T18:07:37Z: REPLICAS="4" TOTAL_CPU=1.0 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=pool5 replicas=4 cpu=0.25 mem=192M postgres=0.50/384M lb_cpu=0.25 max_conns=5 === +=== applied label=pool5 replicas=4 postgres=0.50/384M lb_cpu=0.25 (снято с контейнеров) +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.016, + "concurrency": 8, + "successful_requests": 93110, + "failed_requests": 13051, + "error_ratio": 0.122936, + "successful_rps": 1551.419, + "successful_latency_ms": { + "p50": 4.125, + "p95": 7.868, + "p99": 21.268 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=23 +postgres_max_connections=100 +messages_rows=2767792 +idempotency_rows=2767792 + +=== invocation 2026-10-16T18:08:57Z: REPLICAS="2" TOTAL_CPU=1.0 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=db1cpu replicas=2 cpu=0.50 mem=384M postgres=1.00/384M lb_cpu=0.25 max_conns=10 === +=== PostgreSQL: бюджет 0.50/384M -> 1.00/384M, пересоздаю контейнер === +=== applied label=db1cpu replicas=2 postgres=1.00/384M lb_cpu=0.25 (снято с контейнеров) +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.83, + "concurrency": 8, + "successful_requests": 96094, + "failed_requests": 26520, + "error_ratio": 0.216289, + "successful_rps": 1579.722, + "successful_latency_ms": { + "p50": 4.033, + "p95": 6.236, + "p99": 8.668 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=19 +postgres_max_connections=100 +messages_rows=2894016 +idempotency_rows=2894016 + +=== возвращаю PostgreSQL к бюджету 0.50/384M === +=== invocation 2026-10-16T18:10:21Z: REPLICAS="2" TOTAL_CPU=1.0 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=lb1cpu replicas=2 cpu=0.50 mem=384M postgres=0.50/384M lb_cpu=1.00 max_conns=10 === +=== LB: бюджет CPU 0.25 -> 1.00, пересоздаю контейнер === +=== applied label=lb1cpu replicas=2 postgres=0.50/384M lb_cpu=1.00 (снято с контейнеров) +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.01, + "concurrency": 8, + "successful_requests": 97901, + "failed_requests": 15652, + "error_ratio": 0.137839, + "successful_rps": 1631.408, + "successful_latency_ms": { + "p50": 3.894, + "p95": 6.989, + "p99": 20.148 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=19 +postgres_max_connections=100 +messages_rows=3019112 +idempotency_rows=3019112 + +=== возвращаю LB к бюджету CPU 0.25 === +=== invocation 2026-10-16T18:14:37Z: REPLICAS="2" TOTAL_CPU=1.0 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 === + +=== profile label=r2 replicas=2 cpu=0.50 mem=384M postgres=0.50/384M lb_cpu=0.25 max_conns=10 === +=== applied label=r2 replicas=2 postgres=0.50/384M lb_cpu=0.25 (снято с контейнеров) +{ + "lab": 3, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 60.0, + "elapsed_seconds": 60.012, + "concurrency": 8, + "successful_requests": 97973, + "failed_requests": 9791, + "error_ratio": 0.090856, + "successful_rps": 1632.545, + "successful_latency_ms": { + "p50": 3.959, + "p95": 7.508, + "p99": 22.12 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +postgres_connections=19 +postgres_max_connections=100 +messages_rows=3252832 +idempotency_rows=3252832 + diff --git a/infra/lb/haproxy.cfg b/infra/lb/haproxy.cfg new file mode 100644 index 00000000..4521326e --- /dev/null +++ b/infra/lb/haproxy.cfg @@ -0,0 +1,71 @@ +# Load balancer for the lab3 stand (HAProxy, container `lb`). +# +# Почему активные проверки, а не пассивные: nginx OSS умел только пассивные, и +# реплика, которая осталась доступной по сети, но потеряла БД, продолжала получать +# трафик и отвечала 503 (измерено: 20 из 40 запросов /health/live). HAProxy сам +# опрашивает /health/ready и полностью убирает неготовую реплику из ротации. +# +# Почему повторы безопасны: `retry-on conn-failure` — повтор только когда +# соединение не установилось и запрос НЕ ушёл. Если запрос уже передан серверу, +# повтора нет, поэтому прозрачного дублирования POST (создание чата, сообщения) +# балансировщик не делает. Неопределённый результат повторяет клиент, а сообщение +# защищено обязательным Idempotency-Key (контракт 1.3.0). + +global + log stdout format raw local0 + maxconn 2048 + +defaults + mode http + log global + option httplog + option dontlognull + timeout connect 1s + timeout client 30s + timeout server 5s + # Проверка готовности: одна проба не может висеть дольше 1 с, поэтому при + # inter 2s fall 2 реплика уходит из ротации максимум за ~4 с, даже если она + # держит соединение открытым и не отвечает. + timeout check 1s + retry-on conn-failure + retries 2 + option redispatch + +resolvers docker + nameserver dns 127.0.0.11:53 + resolve_retries 3 + timeout resolve 1s + timeout retry 1s + hold valid 5s + hold nx 2s + hold timeout 1s + hold refused 1s + hold obsolete 5s + +backend api_backend + balance leastconn + # Период проверки 2 с; реплика исключается после 2 неудач (<=4 с) и + # возвращается в ротацию после 2 успехов (<=4 с). + option httpchk + http-check send meth GET uri /health/ready + http-check expect status 200 + # Одно имя -> все адреса реплик (общий network alias в compose.yaml), + # адреса переразрешаются каждые 5 с: масштабирование и замена контейнеров + # не зависят от их номеров и IP. + default-server check inter 2s fall 2 rise 2 resolvers docker resolve-prefer ipv4 init-addr none + # Слотов больше, чем типовых реплик (1/2/4 в треке 1): свободный слот нужен + # ещё и сценарию scripts/lb_readiness_check.sh, который поднимает рядом + # «неготовую» реплику. + server-template api 8 api-replica:8080 + +frontend http_front + bind *:80 + default_backend api_backend + +frontend stats_front + # Только для оператора и доказательств: видно, какие реплики UP/DOWN и почему. + bind *:8404 + stats enable + stats uri /stats + stats refresh 2s + monitor-uri /healthz diff --git a/internal/config/config.go b/internal/config/config.go index 61ddac98..e3729707 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -28,19 +28,26 @@ const ( ) type Config struct { - Env string `mapstructure:"env" validate:"omitempty,eq=dev"` - Server Server `mapstructure:"server"` - Log Log `mapstructure:"log"` - Postgres Postgres `mapstructure:"postgres"` - Redis Redis `mapstructure:"redis"` - Cache Cache `mapstructure:"cache"` - Session Session `mapstructure:"session"` + Env string `mapstructure:"env" validate:"omitempty,eq=dev"` + Server Server `mapstructure:"server"` + Log Log `mapstructure:"log"` + Postgres Postgres `mapstructure:"postgres"` + Redis Redis `mapstructure:"redis"` + Cache Cache `mapstructure:"cache"` + Session Session `mapstructure:"session"` + Idempotency Idempotency `mapstructure:"idempotency"` } type Session struct { TTLSeconds int `mapstructure:"ttl_seconds" validate:"required,gt=0"` } +// Idempotency holds the retention window of a message Idempotency-Key (contract +// 1.3.0 requires at least 24 hours). +type Idempotency struct { + TTLSeconds int `mapstructure:"ttl_seconds" validate:"required,gt=0"` +} + type Redis struct { Enabled bool `mapstructure:"enabled"` Host string `mapstructure:"host" validate:"omitempty,hostname|ip"` @@ -66,6 +73,9 @@ type Server struct { Port int `mapstructure:"port" validate:"required,min=1,max=65535"` ReadHeaderTimeout time.Duration `mapstructure:"read_header_timeout" validate:"required,gt=0"` ShutdownTimeout time.Duration `mapstructure:"shutdown_timeout" validate:"required,gt=0"` + // MaxBodyBytes bounds a request body before the transport decodes it; uploads + // of a later lab raise it explicitly (contract 4: 10 MiB attachments). + MaxBodyBytes int64 `mapstructure:"max_body_bytes" validate:"required,gt=0"` } type Log struct { @@ -114,9 +124,11 @@ var defaults = map[string]any{ "server.port": 8080, "server.read_header_timeout": "10s", "server.shutdown_timeout": "10s", + "server.max_body_bytes": 262144, "log.level": "info", "log.format": "json", "session.ttl_seconds": 3600, + "idempotency.ttl_seconds": 86400, "redis.enabled": false, "redis.host": "localhost", "redis.port": 6379, diff --git a/internal/domain/errors.go b/internal/domain/errors.go index 9ab9b4cc..a8314c69 100644 --- a/internal/domain/errors.go +++ b/internal/domain/errors.go @@ -9,6 +9,7 @@ var ( ErrValidation = errors.New("validation failed") ErrInvalidCursor = errors.New("invalid cursor") ErrConflict = errors.New("conflict") + ErrIdempotency = errors.New("idempotency key already used with another payload") ErrUnauthenticated = errors.New("unauthenticated") ErrUnavailable = errors.New("temporarily unavailable") ) diff --git a/internal/domain/message.go b/internal/domain/message.go index e39c76cb..1ac8fba6 100644 --- a/internal/domain/message.go +++ b/internal/domain/message.go @@ -1,6 +1,8 @@ package domain import ( + "crypto/sha256" + "fmt" "time" "github.com/google/uuid" @@ -14,12 +16,29 @@ type Message struct { CreatedAt time.Time } +// MessageIdempotency is the client Idempotency-Key together with the fingerprint +// of the payload it was first used with. The same key and fingerprint replay the +// stored message; the same key with another payload is a conflict. +type MessageIdempotency struct { + Key string + RequestHash [sha256.Size]byte +} + type MessageDraft struct { - ChatID uuid.UUID - SenderID uuid.UUID - Text string + ChatID uuid.UUID + SenderID uuid.UUID + Text string + Idempotency MessageIdempotency } func (d MessageDraft) Validate() error { - return validateNotBlank("text", d.Text) + if err := validateNotBlank("text", d.Text); err != nil { + return err + } + + if d.Idempotency.Key == "" { + return fmt.Errorf("idempotency key is missing: %w", ErrValidation) + } + + return nil } diff --git a/internal/domain/validation_test.go b/internal/domain/validation_test.go index ad400e1a..adff519f 100644 --- a/internal/domain/validation_test.go +++ b/internal/domain/validation_test.go @@ -88,20 +88,34 @@ func TestMessageDraftRejectsBlankText(t *testing.T) { t.Parallel() draft := domain.MessageDraft{ - ChatID: uuid.New(), - SenderID: uuid.New(), - Text: strings.Repeat(" ", 10), + ChatID: uuid.New(), + SenderID: uuid.New(), + Text: strings.Repeat(" ", 10), + Idempotency: domain.MessageIdempotency{Key: "key-1"}, } require.ErrorIs(t, draft.Validate(), domain.ErrValidation) } +func TestMessageDraftRejectsMissingIdempotencyKey(t *testing.T) { + t.Parallel() + + draft := domain.MessageDraft{ + ChatID: uuid.New(), + SenderID: uuid.New(), + Text: "привет", + } + require.ErrorIs(t, draft.Validate(), domain.ErrValidation, + "с lab3 отправка сообщения невозможна без Idempotency-Key") +} + func TestMessageDraftAcceptsTextWithSurroundingSpaces(t *testing.T) { t.Parallel() draft := domain.MessageDraft{ - ChatID: uuid.New(), - SenderID: uuid.New(), - Text: " привет ", + ChatID: uuid.New(), + SenderID: uuid.New(), + Text: " привет ", + Idempotency: domain.MessageIdempotency{Key: "key-1"}, } assert.NoError(t, draft.Validate(), "контракт запрещает только полностью пробельный текст") } diff --git a/internal/service/message/service_test.go b/internal/service/message/service_test.go index 62517dc1..8051799d 100644 --- a/internal/service/message/service_test.go +++ b/internal/service/message/service_test.go @@ -40,9 +40,10 @@ func (s *ServiceSuite) SetupTest() { func (s *ServiceSuite) draft() domain.MessageDraft { return domain.MessageDraft{ - ChatID: s.chatID, - SenderID: s.caller, - Text: "Привет, Боб!", + ChatID: s.chatID, + SenderID: s.caller, + Text: "Привет, Боб!", + Idempotency: domain.MessageIdempotency{Key: "service-suite-key"}, } } diff --git a/internal/storage/postgres/errors.go b/internal/storage/postgres/errors.go index 3cc9bd59..788e9293 100644 --- a/internal/storage/postgres/errors.go +++ b/internal/storage/postgres/errors.go @@ -15,8 +15,9 @@ import ( ) const ( - pgUniqueViolation = "23505" - pgCheckViolation = "23514" + pgUniqueViolation = "23505" + pgForeignKeyViolation = "23503" + pgCheckViolation = "23514" ) func isUniqueViolation(err error) bool { @@ -63,6 +64,11 @@ func mapError(err error) error { switch pgErr.Code { case pgUniqueViolation: return domain.ErrConflict + case pgForeignKeyViolation: + // Нарушение внешнего ключа означает ссылку на отсутствующую сущность: + // например, отправка сообщения в несуществующий чат или в чат, где + // отправителя нет. Для клиента это 404, а не 500. + return domain.ErrNotFound case pgCheckViolation: return domain.ErrValidation } diff --git a/internal/storage/postgres/idempotency_test.go b/internal/storage/postgres/idempotency_test.go new file mode 100644 index 00000000..29ae9ada --- /dev/null +++ b/internal/storage/postgres/idempotency_test.go @@ -0,0 +1,183 @@ +//go:build integration + +package postgres_test + +import ( + "crypto/sha256" + "sync" + "testing" + "time" + + "github.com/google/uuid" + "github.com/stretchr/testify/suite" + + "mtusi-messenger/internal/domain" +) + +type IdempotencySuite struct { + BaseSuite +} + +func TestIdempotencySuite(t *testing.T) { + suite.Run(t, new(IdempotencySuite)) +} + +func messageDraft(chat domain.Chat, sender domain.User, key, text string) domain.MessageDraft { + return domain.MessageDraft{ + ChatID: chat.ID, + SenderID: sender.ID, + Text: text, + Idempotency: domain.MessageIdempotency{ + Key: key, + RequestHash: sha256.Sum256([]byte(text)), + }, + } +} + +func (s *IdempotencySuite) history(chat domain.Chat, actor domain.User) []domain.Message { + s.T().Helper() + + page, err := s.store.Messages().ListVisible(s.T().Context(), chat.ID, actor.ID, nil, 100) + s.Require().NoError(err) + + return page.Items +} + +func (s *IdempotencySuite) TestReplayReturnsStoredMessage() { + alice := s.createUser("alice") + bob := s.createUser("bob") + chat := s.createChat(alice, bob) + draft := messageDraft(chat, alice, "key-1", "привет") + + created, err := s.store.Messages().Create(s.T().Context(), draft) + s.Require().NoError(err) + + replayed, err := s.store.Messages().Create(s.T().Context(), draft) + s.Require().NoError(err) + + s.Equal(created, replayed, "повтор с тем же ключом и payload возвращает исходное сообщение") + s.Len(s.history(chat, bob), 1, "повтор не создаёт дубль") +} + +func (s *IdempotencySuite) TestSameKeyWithAnotherPayloadConflicts() { + alice := s.createUser("alice") + bob := s.createUser("bob") + chat := s.createChat(alice, bob) + + created, err := s.store.Messages().Create(s.T().Context(), messageDraft(chat, alice, "key-1", "привет")) + s.Require().NoError(err) + + _, err = s.store.Messages().Create(s.T().Context(), messageDraft(chat, alice, "key-1", "другое")) + s.Require().ErrorIs(err, domain.ErrIdempotency) + + history := s.history(chat, bob) + s.Require().Len(history, 1, "конфликт не создаёт сообщение") + s.Equal(created.ID, history[0].ID, "исходное сообщение не изменено") +} + +func (s *IdempotencySuite) TestConcurrentReplaysCreateOneMessage() { + const callers = 8 + + alice := s.createUser("alice") + bob := s.createUser("bob") + chat := s.createChat(alice, bob) + draft := messageDraft(chat, alice, "key-concurrent", "конкурентный повтор") + + ctx := s.T().Context() + results := make([]domain.Message, callers) + errs := make([]error, callers) + + start := make(chan struct{}) + + var wg sync.WaitGroup + + for i := range callers { + wg.Add(1) + + go func() { + defer wg.Done() + + <-start + + results[i], errs[i] = s.store.Messages().Create(ctx, draft) + }() + } + + close(start) + wg.Wait() + + for i := range callers { + s.Require().NoError(errs[i], "caller %d", i) + s.Equal(results[0].ID, results[i].ID, "все одновременные повторы получают одно сообщение") + } + + s.Len(s.history(chat, bob), 1, "конкурентный повтор создаёт ровно одно сообщение") +} + +func (s *IdempotencySuite) TestKeyIsScopedToActorAndChat() { + alice := s.createUser("alice") + bob := s.createUser("bob") + carol := s.createUser("carol") + + first := s.createChat(alice, bob) + second := s.createChat(alice, carol) + + mine, err := s.store.Messages().Create(s.T().Context(), messageDraft(first, alice, "shared-key", "от Алисы")) + s.Require().NoError(err) + + byBob, err := s.store.Messages().Create(s.T().Context(), messageDraft(first, bob, "shared-key", "от Боба")) + s.Require().NoError(err) + + s.NotEqual(mine.ID, byBob.ID, "одинаковый ключ разных пользователей независим") + + another, err := s.store.Messages().Create(s.T().Context(), messageDraft(second, alice, "shared-key", "в другом чате")) + s.Require().NoError(err) + + s.NotEqual(mine.ID, another.ID, "одинаковый ключ в другом чате независим") +} + +func (s *IdempotencySuite) TestExpiredKeyIsReplaced() { + alice := s.createUser("alice") + bob := s.createUser("bob") + chat := s.createChat(alice, bob) + draft := messageDraft(chat, alice, "key-expiring", "первое") + + // Отрицательный TTL: записи идемпотентности истекают сразу. + expiring := openStoreWithTTL(s.T(), s.db, -time.Second, nil) + s.T().Cleanup(expiring.Close) + + created, err := expiring.Messages().Create(s.T().Context(), draft) + s.Require().NoError(err) + + replaced, err := expiring.Messages().Create(s.T().Context(), messageDraft(chat, alice, "key-expiring", "второе")) + s.Require().NoError(err, "истёкший ключ можно использовать с другим payload") + s.NotEqual(created.ID, replaced.ID) +} + +func (s *IdempotencySuite) TestClaimForMissingChatIsNotFound() { + alice := s.createUser("alice") + + // Чат не существует: claim ключа ссылается на chats(id), поэтому наружу + // должен уйти 404, а не 500 из-за нарушения внешнего ключа. + _, err := s.store.Messages().Create( + s.T().Context(), + messageDraft(domain.Chat{ID: uuid.New()}, alice, "key-1", "привет"), + ) + s.Require().ErrorIs(err, domain.ErrNotFound) +} + +func (s *IdempotencySuite) TestFailedAttemptLeavesNoClaim() { + alice := s.createUser("alice") + outsider := s.createUser("outsider") + chat := s.createChat(alice) + + _, err := s.store.Messages().Create(s.T().Context(), messageDraft(chat, outsider, "key-1", "привет")) + s.Require().ErrorIs(err, domain.ErrNotFound) + + var claims int + + s.Require().NoError( + s.pool.QueryRow(s.T().Context(), "SELECT count(*) FROM message_idempotency").Scan(&claims), + ) + s.Zero(claims, "отклонённая попытка не оставляет claim: транзакция откатывается целиком") +} diff --git a/internal/storage/postgres/internal/sqlcgen/idempotency.sql.go b/internal/storage/postgres/internal/sqlcgen/idempotency.sql.go new file mode 100644 index 00000000..3aecb901 --- /dev/null +++ b/internal/storage/postgres/internal/sqlcgen/idempotency.sql.go @@ -0,0 +1,128 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.31.1 +// source: idempotency.sql + +package sqlcgen + +import ( + "context" + "time" + + "github.com/google/uuid" + "github.com/jackc/pgx/v5/pgtype" +) + +const claimMessageIdempotency = `-- name: ClaimMessageIdempotency :one +INSERT INTO message_idempotency (actor_id, chat_id, key, request_hash, expires_at) +VALUES ( + $1, + $2, + $3, + $4, + $5 +) +ON CONFLICT (actor_id, chat_id, key) DO UPDATE + SET request_hash = EXCLUDED.request_hash, + expires_at = EXCLUDED.expires_at, + message_id = NULL + WHERE message_idempotency.expires_at <= now() +RETURNING key +` + +type ClaimMessageIdempotencyParams struct { + ActorID uuid.UUID + ChatID uuid.UUID + Key string + RequestHash []byte + ExpiresAt time.Time +} + +// Claims the key for this actor/chat and returns whether this request owns it. +// A live record wins: the statement returns nothing and the caller replays the +// stored message. An expired record is replaced in place. +func (q *Queries) ClaimMessageIdempotency(ctx context.Context, arg ClaimMessageIdempotencyParams) (string, error) { + row := q.db.QueryRow(ctx, claimMessageIdempotency, + arg.ActorID, + arg.ChatID, + arg.Key, + arg.RequestHash, + arg.ExpiresAt, + ) + var key string + err := row.Scan(&key) + return key, err +} + +const completeMessageIdempotency = `-- name: CompleteMessageIdempotency :exec +UPDATE message_idempotency +SET message_id = $1 +WHERE actor_id = $2 + AND chat_id = $3 + AND key = $4 +` + +type CompleteMessageIdempotencyParams struct { + MessageID pgtype.UUID + ActorID uuid.UUID + ChatID uuid.UUID + Key string +} + +func (q *Queries) CompleteMessageIdempotency(ctx context.Context, arg CompleteMessageIdempotencyParams) error { + _, err := q.db.Exec(ctx, completeMessageIdempotency, + arg.MessageID, + arg.ActorID, + arg.ChatID, + arg.Key, + ) + return err +} + +const getMessageByID = `-- name: GetMessageByID :one +SELECT id, chat_id, sender_id, text, created_at +FROM messages +WHERE id = $1 +` + +func (q *Queries) GetMessageByID(ctx context.Context, id uuid.UUID) (Message, error) { + row := q.db.QueryRow(ctx, getMessageByID, id) + var i Message + err := row.Scan( + &i.ID, + &i.ChatID, + &i.SenderID, + &i.Text, + &i.CreatedAt, + ) + return i, err +} + +const getMessageIdempotency = `-- name: GetMessageIdempotency :one +SELECT message_id, request_hash +FROM message_idempotency +WHERE actor_id = $1 + AND chat_id = $2 + AND key = $3 +FOR UPDATE +` + +type GetMessageIdempotencyParams struct { + ActorID uuid.UUID + ChatID uuid.UUID + Key string +} + +type GetMessageIdempotencyRow struct { + MessageID pgtype.UUID + RequestHash []byte +} + +// Concurrent duplicates block here until the owner commits, then read the +// result it stored in the same transaction. +func (q *Queries) GetMessageIdempotency(ctx context.Context, arg GetMessageIdempotencyParams) (GetMessageIdempotencyRow, error) { + row := q.db.QueryRow(ctx, getMessageIdempotency, arg.ActorID, arg.ChatID, arg.Key) + var i GetMessageIdempotencyRow + err := row.Scan(&i.MessageID, &i.RequestHash) + return i, err +} diff --git a/internal/storage/postgres/internal/sqlcgen/models.go b/internal/storage/postgres/internal/sqlcgen/models.go index 87811efd..d9f11089 100644 --- a/internal/storage/postgres/internal/sqlcgen/models.go +++ b/internal/storage/postgres/internal/sqlcgen/models.go @@ -8,6 +8,7 @@ import ( "time" "github.com/google/uuid" + "github.com/jackc/pgx/v5/pgtype" ) type Chat struct { @@ -30,6 +31,16 @@ type Message struct { CreatedAt time.Time } +type MessageIdempotency struct { + ActorID uuid.UUID + ChatID uuid.UUID + Key string + RequestHash []byte + MessageID pgtype.UUID + CreatedAt time.Time + ExpiresAt time.Time +} + type Session struct { TokenHash []byte UserID uuid.UUID diff --git a/internal/storage/postgres/main_test.go b/internal/storage/postgres/main_test.go index 7963763f..324975cf 100644 --- a/internal/storage/postgres/main_test.go +++ b/internal/storage/postgres/main_test.go @@ -227,9 +227,22 @@ func (s *BaseSuite) TearDownTest() { } } +const testIdempotencyTTL = 24 * time.Hour + func openStore(t *testing.T, database string, override func(*config.Postgres)) *postgres.Store { t.Helper() + return openStoreWithTTL(t, database, testIdempotencyTTL, override) +} + +func openStoreWithTTL( + t *testing.T, + database string, + idempotencyTTL time.Duration, + override func(*config.Postgres), +) *postgres.Store { + t.Helper() + cfg := testConfig() cfg.Database = database @@ -237,7 +250,7 @@ func openStore(t *testing.T, database string, override func(*config.Postgres)) * override(&cfg) } - store, err := postgres.New(t.Context(), cfg) + store, err := postgres.New(t.Context(), cfg, idempotencyTTL) require.NoError(t, err) return store diff --git a/internal/storage/postgres/message_repository.go b/internal/storage/postgres/message_repository.go index f4a742f0..c2744823 100644 --- a/internal/storage/postgres/message_repository.go +++ b/internal/storage/postgres/message_repository.go @@ -1,11 +1,15 @@ package postgres import ( + "bytes" "context" + "errors" "fmt" "time" "github.com/google/uuid" + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgtype" "mtusi-messenger/internal/domain" "mtusi-messenger/internal/storage/postgres/internal/sqlcgen" @@ -16,16 +20,100 @@ type MessageRepository struct { } func (r *MessageRepository) Create(ctx context.Context, draft domain.MessageDraft) (domain.Message, error) { - ctx, cancel := r.store.timeout(ctx) - defer cancel() + var created domain.Message - row, err := r.store.queries.CreateMessage(ctx, sqlcgen.CreateMessageParams{ + err := r.store.RunInTx(ctx, func(queries *sqlcgen.Queries) error { + message, err := createIdempotent(ctx, queries, draft, r.store.idempotencyTTL) + if err != nil { + return err + } + + created = message + + return nil + }) + if err != nil { + // mapError нужен и здесь: отказ BEGIN/COMMIT (недоступная БД, исчерпанный + // пул, истёкший контекст) обязан давать 503, а не 500. + return domain.Message{}, fmt.Errorf("create message: %w", mapError(err)) + } + + return created, nil +} + +// createIdempotent stores the message and its Idempotency-Key in one +// transaction: either both are committed or neither, so a replay never observes +// a claimed key whose message is missing. Claiming is a single statement, so +// concurrent duplicates with the same key wait for the winner and then replay +// the message it stored. +func createIdempotent( + ctx context.Context, + queries *sqlcgen.Queries, + draft domain.MessageDraft, + ttl time.Duration, +) (domain.Message, error) { + _, err := queries.ClaimMessageIdempotency(ctx, sqlcgen.ClaimMessageIdempotencyParams{ + ActorID: draft.SenderID, + ChatID: draft.ChatID, + Key: draft.Idempotency.Key, + RequestHash: draft.Idempotency.RequestHash[:], + ExpiresAt: time.Now().Add(ttl), + }) + + switch { + case errors.Is(err, pgx.ErrNoRows): // the key is still live: replay it + return replayIdempotent(ctx, queries, draft) + case err != nil: + return domain.Message{}, mapError(err) + default: + return createClaimed(ctx, queries, draft) + } +} + +func createClaimed(ctx context.Context, queries *sqlcgen.Queries, draft domain.MessageDraft) (domain.Message, error) { + row, err := queries.CreateMessage(ctx, sqlcgen.CreateMessageParams{ ChatID: draft.ChatID, SenderID: draft.SenderID, Text: draft.Text, }) if err != nil { - return domain.Message{}, fmt.Errorf("create message: %w", mapError(err)) + return domain.Message{}, mapError(err) + } + + err = queries.CompleteMessageIdempotency(ctx, sqlcgen.CompleteMessageIdempotencyParams{ + MessageID: pgtype.UUID{Bytes: row.ID, Valid: true}, + ActorID: draft.SenderID, + ChatID: draft.ChatID, + Key: draft.Idempotency.Key, + }) + if err != nil { + return domain.Message{}, mapError(err) + } + + return mapMessage(row.ID, row.ChatID, row.SenderID, row.Text, row.CreatedAt), nil +} + +func replayIdempotent(ctx context.Context, queries *sqlcgen.Queries, draft domain.MessageDraft) (domain.Message, error) { + stored, err := queries.GetMessageIdempotency(ctx, sqlcgen.GetMessageIdempotencyParams{ + ActorID: draft.SenderID, + ChatID: draft.ChatID, + Key: draft.Idempotency.Key, + }) + if err != nil { + return domain.Message{}, mapError(err) + } + + if !bytes.Equal(stored.RequestHash, draft.Idempotency.RequestHash[:]) { + return domain.Message{}, domain.ErrIdempotency + } + + if !stored.MessageID.Valid { + return domain.Message{}, errors.New("idempotency record without a message") + } + + row, err := queries.GetMessageByID(ctx, uuid.UUID(stored.MessageID.Bytes)) + if err != nil { + return domain.Message{}, mapError(err) } return mapMessage(row.ID, row.ChatID, row.SenderID, row.Text, row.CreatedAt), nil diff --git a/internal/storage/postgres/message_repository_test.go b/internal/storage/postgres/message_repository_test.go index 38bc77dd..73f4c288 100644 --- a/internal/storage/postgres/message_repository_test.go +++ b/internal/storage/postgres/message_repository_test.go @@ -3,6 +3,7 @@ package postgres_test import ( + "crypto/sha256" "fmt" "sync" "testing" @@ -21,6 +22,23 @@ func TestMessageRepositorySuite(t *testing.T) { suite.Run(t, new(MessageRepositorySuite)) } +// draft builds a message draft with a fresh Idempotency-Key (lab3 contract). +func (s *MessageRepositorySuite) draft(chatID, senderID uuid.UUID, text string) domain.MessageDraft { + s.T().Helper() + + key := uuid.NewString() + + return domain.MessageDraft{ + ChatID: chatID, + SenderID: senderID, + Text: text, + Idempotency: domain.MessageIdempotency{ + Key: key, + RequestHash: sha256.Sum256([]byte(key + text)), + }, + } +} + func (s *MessageRepositorySuite) TestCreateAndPagination() { alice := s.createUser("alice") bob := s.createUser("bob") @@ -29,11 +47,7 @@ func (s *MessageRepositorySuite) TestCreateAndPagination() { const total = 5 for i := range total { - message, err := s.store.Messages().Create(s.T().Context(), domain.MessageDraft{ - ChatID: chat.ID, - SenderID: alice.ID, - Text: fmt.Sprintf("сообщение %d", i), - }) + message, err := s.store.Messages().Create(s.T().Context(), s.draft(chat.ID, alice.ID, fmt.Sprintf("сообщение %d", i))) s.Require().NoError(err) s.Equal(uuid.Version(7), message.ID.Version()) s.False(message.CreatedAt.IsZero()) @@ -69,9 +83,7 @@ func (s *MessageRepositorySuite) TestPaginationWithSharedTimestamp() { chat := s.createChat(alice) for range 5 { - _, err := s.store.Messages().Create(s.T().Context(), domain.MessageDraft{ - ChatID: chat.ID, SenderID: alice.ID, Text: "same timestamp", - }) + _, err := s.store.Messages().Create(s.T().Context(), s.draft(chat.ID, alice.ID, "same timestamp")) s.Require().NoError(err) } @@ -108,11 +120,7 @@ func (s *MessageRepositorySuite) TestAccessIsRestricted() { chat := s.createChat(alice) - _, err := s.store.Messages().Create(s.T().Context(), domain.MessageDraft{ - ChatID: chat.ID, - SenderID: bob.ID, - Text: "чужое", - }) + _, err := s.store.Messages().Create(s.T().Context(), s.draft(chat.ID, bob.ID, "чужое")) s.Require().ErrorIs(err, domain.ErrNotFound, "не участник не может писать в чат") _, err = s.store.Messages().ListVisible(s.T().Context(), chat.ID, bob.ID, nil, 50) @@ -136,11 +144,7 @@ func (s *MessageRepositorySuite) TestFinishedMessageSurvivesConcurrentReads() { wg.Go(func() { for i := range total { - _, err := s.store.Messages().Create(s.T().Context(), domain.MessageDraft{ - ChatID: chat.ID, - SenderID: alice.ID, - Text: fmt.Sprintf("message %d", i), - }) + _, err := s.store.Messages().Create(s.T().Context(), s.draft(chat.ID, alice.ID, fmt.Sprintf("message %d", i))) if err != nil { return } diff --git a/internal/storage/postgres/migrations/00003_message_idempotency.sql b/internal/storage/postgres/migrations/00003_message_idempotency.sql new file mode 100644 index 00000000..b1facb51 --- /dev/null +++ b/internal/storage/postgres/migrations/00003_message_idempotency.sql @@ -0,0 +1,25 @@ +-- +goose Up +-- Версия 3, а не 2: в базе, перенесённой из лабораторной 2, goose уже содержит +-- запись версии 2 (другая миграция того же репозитория), и одноимённый номер был +-- бы молча пропущен при обновлении существующего стенда до ЛР3. + +CREATE TABLE message_idempotency ( + actor_id uuid NOT NULL REFERENCES users (id) ON DELETE CASCADE, + chat_id uuid NOT NULL REFERENCES chats (id) ON DELETE CASCADE, + key text NOT NULL, + request_hash bytea NOT NULL, + message_id uuid REFERENCES messages (id) ON DELETE CASCADE, + created_at timestamptz NOT NULL DEFAULT now(), + expires_at timestamptz NOT NULL, + + PRIMARY KEY (actor_id, chat_id, key), + CONSTRAINT message_idempotency_key_length CHECK (char_length(key) BETWEEN 1 AND 128) +); + +-- Expired records are replaced lazily by a new claim, the index keeps that +-- lookup and a future sweep cheap. +CREATE INDEX message_idempotency_expires_at_idx ON message_idempotency (expires_at); + +-- +goose Down + +DROP TABLE message_idempotency; diff --git a/internal/storage/postgres/queries/idempotency.sql b/internal/storage/postgres/queries/idempotency.sql new file mode 100644 index 00000000..14f911e7 --- /dev/null +++ b/internal/storage/postgres/queries/idempotency.sql @@ -0,0 +1,40 @@ +-- Claims the key for this actor/chat and returns whether this request owns it. +-- A live record wins: the statement returns nothing and the caller replays the +-- stored message. An expired record is replaced in place. +-- name: ClaimMessageIdempotency :one +INSERT INTO message_idempotency (actor_id, chat_id, key, request_hash, expires_at) +VALUES ( + sqlc.arg(actor_id), + sqlc.arg(chat_id), + sqlc.arg(key), + sqlc.arg(request_hash), + sqlc.arg(expires_at) +) +ON CONFLICT (actor_id, chat_id, key) DO UPDATE + SET request_hash = EXCLUDED.request_hash, + expires_at = EXCLUDED.expires_at, + message_id = NULL + WHERE message_idempotency.expires_at <= now() +RETURNING key; + +-- Concurrent duplicates block here until the owner commits, then read the +-- result it stored in the same transaction. +-- name: GetMessageIdempotency :one +SELECT message_id, request_hash +FROM message_idempotency +WHERE actor_id = sqlc.arg(actor_id) + AND chat_id = sqlc.arg(chat_id) + AND key = sqlc.arg(key) +FOR UPDATE; + +-- name: CompleteMessageIdempotency :exec +UPDATE message_idempotency +SET message_id = sqlc.arg(message_id) +WHERE actor_id = sqlc.arg(actor_id) + AND chat_id = sqlc.arg(chat_id) + AND key = sqlc.arg(key); + +-- name: GetMessageByID :one +SELECT id, chat_id, sender_id, text, created_at +FROM messages +WHERE id = sqlc.arg(id); diff --git a/internal/storage/postgres/store.go b/internal/storage/postgres/store.go index ac61f500..35aff1ea 100644 --- a/internal/storage/postgres/store.go +++ b/internal/storage/postgres/store.go @@ -12,9 +12,10 @@ import ( ) type Store struct { - pool *pgxpool.Pool - queries *sqlcgen.Queries - queryTimeout time.Duration + pool *pgxpool.Pool + queries *sqlcgen.Queries + queryTimeout time.Duration + idempotencyTTL time.Duration users *UserRepository chats *ChatRepository @@ -22,7 +23,7 @@ type Store struct { sessions *SessionRepository } -func New(ctx context.Context, cfg config.Postgres) (*Store, error) { +func New(ctx context.Context, cfg config.Postgres, idempotencyTTL time.Duration) (*Store, error) { cfg, err := normalize(cfg) if err != nil { return nil, fmt.Errorf("normalize database config: %w", err) @@ -54,9 +55,10 @@ func New(ctx context.Context, cfg config.Postgres) (*Store, error) { } store := &Store{ - pool: pool, - queries: sqlcgen.New(pool), - queryTimeout: cfg.QueryTimeout, + pool: pool, + queries: sqlcgen.New(pool), + queryTimeout: cfg.QueryTimeout, + idempotencyTTL: idempotencyTTL, } store.users = &UserRepository{store: store} diff --git a/internal/transport/rest/bodylimit.go b/internal/transport/rest/bodylimit.go new file mode 100644 index 00000000..660feefc --- /dev/null +++ b/internal/transport/rest/bodylimit.go @@ -0,0 +1,35 @@ +package rest + +import ( + "log/slog" + "net/http" +) + +// bodyLimitMiddleware bounds the request body before it reaches the generated +// transport. Without it the JSON decoders read the whole body into memory before +// any schema check or authentication happens, so an oversized request to a public +// endpoint (for example POST /api/v1/users) could exhaust the replica's memory. +// +// The declared length is rejected early with 413; a client that lies about +// Content-Length is cut off by http.MaxBytesReader, which also makes the server +// close the connection instead of reading the rest. +func bodyLimitMiddleware(limit int64, log *slog.Logger, next http.Handler) http.Handler { + if limit <= 0 { + return next + } + + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.ContentLength > limit { + logRejected(r.Context(), log, r, http.StatusRequestEntityTooLarge, nil) + writeError(r.Context(), log, w, r, http.StatusRequestEntityTooLarge) + + return + } + + if r.Body != nil { + r.Body = http.MaxBytesReader(w, r.Body, limit) + } + + next.ServeHTTP(w, r) + }) +} diff --git a/internal/transport/rest/errors.go b/internal/transport/rest/errors.go index 58853ab0..0f5c2033 100644 --- a/internal/transport/rest/errors.go +++ b/internal/transport/rest/errors.go @@ -52,7 +52,8 @@ func statusForDomainError(err error) int { case errors.Is(err, domain.ErrNotFound): return http.StatusNotFound case errors.Is(err, domain.ErrUsernameTaken), - errors.Is(err, domain.ErrConflict): + errors.Is(err, domain.ErrConflict), + errors.Is(err, domain.ErrIdempotency): return http.StatusConflict case errors.Is(err, domain.ErrValidation), errors.Is(err, domain.ErrUnknownMember), diff --git a/internal/transport/rest/handler.go b/internal/transport/rest/handler.go index 90273583..f437f306 100644 --- a/internal/transport/rest/handler.go +++ b/internal/transport/rest/handler.go @@ -3,6 +3,7 @@ package rest import ( "bytes" "context" + "crypto/sha256" "encoding/base64" "encoding/json" "fmt" @@ -231,10 +232,19 @@ func (h *Handler) CreateMessage( ) (oas.CreateMessageRes, error) { callerID := caller(ctx) + fingerprint, err := messageFingerprint(req) + if err != nil { + return nil, err + } + message, err := h.messages.Send(ctx, domain.MessageDraft{ ChatID: params.ChatID, SenderID: callerID, Text: req.Text, + Idempotency: domain.MessageIdempotency{ + Key: params.IdempotencyKey, + RequestHash: fingerprint, + }, }) if err != nil { return nil, err @@ -246,6 +256,20 @@ func (h *Handler) CreateMessage( }, nil } +// messageFingerprint canonicalises the create-message payload so that the key +// order of the client JSON cannot change the fingerprint, while a different +// payload with the same Idempotency-Key can (contract 1.3.0). +func messageFingerprint(req *oas.CreateMessage) ([sha256.Size]byte, error) { + payload, err := json.Marshal(struct { + Text string `json:"text"` + }{Text: req.Text}) + if err != nil { + return [sha256.Size]byte{}, fmt.Errorf("encode message payload: %w", err) + } + + return sha256.Sum256(payload), nil +} + func (h *Handler) ListMessages(ctx context.Context, params oas.ListMessagesParams) (oas.ListMessagesRes, error) { callerID := caller(ctx) diff --git a/internal/transport/rest/instance.go b/internal/transport/rest/instance.go new file mode 100644 index 00000000..5c105103 --- /dev/null +++ b/internal/transport/rest/instance.go @@ -0,0 +1,67 @@ +package rest + +import ( + "net/http" + "os" +) + +const ( + instanceIDEnv = "INSTANCE_ID" + instanceIDHeader = "X-Instance-Id" +) + +// InstanceID is the alias of this API process reported in the X-Instance-Id +// response header (contract 1.3.0). INSTANCE_ID wins when set; otherwise the +// hostname is used, which inside a container is the short container id the +// stand maps back to the replica that served the request. +func InstanceID() string { + if id := os.Getenv(instanceIDEnv); id != "" { + return id + } + + if host, err := os.Hostname(); err == nil && host != "" { + return host + } + + return "unknown" +} + +// instanceIDWriter injects the header on the first write of the response, so +// every API-generated response carries it — including errors produced by the +// router, the security handler and the error handler rather than by a handler. +// A value already set by the transport is never overwritten. +type instanceIDWriter struct { + http.ResponseWriter + + id string + sealed bool +} + +func (w *instanceIDWriter) inject() { + if w.sealed { + return + } + + w.sealed = true + + if w.Header().Get(instanceIDHeader) == "" { + w.Header().Set(instanceIDHeader, w.id) + } +} + +func (w *instanceIDWriter) WriteHeader(status int) { + w.inject() + w.ResponseWriter.WriteHeader(status) +} + +func (w *instanceIDWriter) Write(body []byte) (int, error) { + w.inject() + + return w.ResponseWriter.Write(body) +} + +func instanceIDMiddleware(id string, next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + next.ServeHTTP(&instanceIDWriter{ResponseWriter: w, id: id}, r) + }) +} diff --git a/internal/transport/rest/instance_test.go b/internal/transport/rest/instance_test.go new file mode 100644 index 00000000..edd5f196 --- /dev/null +++ b/internal/transport/rest/instance_test.go @@ -0,0 +1,77 @@ +package rest + +import ( + "net/http" + "net/http/httptest" + "os" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestInstanceIDPrefersEnvironment(t *testing.T) { + t.Setenv(instanceIDEnv, "api-7") + + assert.Equal(t, "api-7", InstanceID()) +} + +func TestInstanceIDFallsBackToHostname(t *testing.T) { + t.Setenv(instanceIDEnv, "") + + host, err := os.Hostname() + require.NoError(t, err) + + assert.Equal(t, host, InstanceID()) +} + +func TestInstanceIDMiddleware(t *testing.T) { + tests := []struct { + name string + handler http.HandlerFunc + wantID string + wantCode int + }{ + { + name: "handler response", + handler: func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusCreated) }, + wantID: "api-1", + wantCode: http.StatusCreated, + }, + { + name: "response without explicit status", + handler: func(w http.ResponseWriter, _ *http.Request) { _, _ = w.Write([]byte("ok")) }, + wantID: "api-1", + wantCode: http.StatusOK, + }, + { + name: "error produced outside a handler", + handler: func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(http.StatusMethodNotAllowed) }, + wantID: "api-1", + wantCode: http.StatusMethodNotAllowed, + }, + { + name: "header set by the transport is not overwritten", + handler: func(w http.ResponseWriter, _ *http.Request) { + w.Header().Set(instanceIDHeader, "explicit") + w.WriteHeader(http.StatusOK) + }, + wantID: "explicit", + wantCode: http.StatusOK, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + recorder := httptest.NewRecorder() + + instanceIDMiddleware("api-1", test.handler).ServeHTTP( + recorder, + httptest.NewRequest(http.MethodGet, "/api/v1/users/me", nil), + ) + + assert.Equal(t, test.wantID, recorder.Header().Get(instanceIDHeader)) + assert.Equal(t, test.wantCode, recorder.Code) + }) + } +} diff --git a/internal/transport/rest/internal/oas/oas_cfg_gen.go b/internal/transport/rest/internal/oas/oas_cfg_gen.go index 11231d2f..2c4ff69f 100644 --- a/internal/transport/rest/internal/oas/oas_cfg_gen.go +++ b/internal/transport/rest/internal/oas/oas_cfg_gen.go @@ -12,7 +12,8 @@ import ( ) var regexMap = map[string]ogenregex.Regexp{ - "^[a-z0-9_]{3,32}$": ogenregex.MustCompile("^[a-z0-9_]{3,32}$"), + "^[A-Za-z0-9._:-]+$": ogenregex.MustCompile("^[A-Za-z0-9._:-]+$"), + "^[a-z0-9_]{3,32}$": ogenregex.MustCompile("^[a-z0-9_]{3,32}$"), } type ( diff --git a/internal/transport/rest/internal/oas/oas_handlers_gen.go b/internal/transport/rest/internal/oas/oas_handlers_gen.go index 26fdfae4..aee7b144 100644 --- a/internal/transport/rest/internal/oas/oas_handlers_gen.go +++ b/internal/transport/rest/internal/oas/oas_handlers_gen.go @@ -259,6 +259,10 @@ func (s *Server) handleCreateMessageRequest(args [1]string, argsEscaped bool, w Name: "chat_id", In: "path", }: params.ChatID, + { + Name: "Idempotency-Key", + In: "header", + }: params.IdempotencyKey, }, Raw: r, } diff --git a/internal/transport/rest/internal/oas/oas_parameters_gen.go b/internal/transport/rest/internal/oas/oas_parameters_gen.go index 42e8312d..814390eb 100644 --- a/internal/transport/rest/internal/oas/oas_parameters_gen.go +++ b/internal/transport/rest/internal/oas/oas_parameters_gen.go @@ -18,6 +18,11 @@ import ( // CreateMessageParams is parameters of createMessage operation. type CreateMessageParams struct { ChatID uuid.UUID + // Обязателен с lab3. Область: пользователь + метод + путь + + // ключ; хранить результат не менее 24 ч. Повтор того же JSON + // возвращает исходный 201 и то же сообщение, другой JSON — + // 409. + IdempotencyKey string } func unpackCreateMessageParams(packed middleware.Parameters) (params CreateMessageParams) { @@ -28,10 +33,18 @@ func unpackCreateMessageParams(packed middleware.Parameters) (params CreateMessa } params.ChatID = packed[key].(uuid.UUID) } + { + key := middleware.ParameterKey{ + Name: "Idempotency-Key", + In: "header", + } + params.IdempotencyKey = packed[key].(string) + } return params } func decodeCreateMessageParams(args [1]string, argsEscaped bool, r *http.Request) (params CreateMessageParams, _ error) { + h := uri.NewHeaderDecoder(r.Header) // Decode path: chat_id. if err := func() error { param := args[0] @@ -77,6 +90,60 @@ func decodeCreateMessageParams(args [1]string, argsEscaped bool, r *http.Request Err: err, } } + // Decode header: Idempotency-Key. + if err := func() error { + cfg := uri.HeaderParameterDecodingConfig{ + Name: "Idempotency-Key", + Explode: false, + } + if err := h.HasParam(cfg); err == nil { + if err := h.DecodeParam(cfg, func(d uri.Decoder) error { + val, err := d.DecodeValue() + if err != nil { + return err + } + + c, err := conv.ToString(val) + if err != nil { + return err + } + + params.IdempotencyKey = c + return nil + }); err != nil { + return err + } + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 128, + MaxLengthSet: true, + Email: false, + Hostname: false, + Regex: regexMap["^[A-Za-z0-9._:-]+$"], + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(params.IdempotencyKey)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } else { + return err + } + return nil + }(); err != nil { + return params, &ogenerrors.DecodeParamError{ + Name: "Idempotency-Key", + In: "header", + Err: err, + } + } return params, nil } diff --git a/internal/transport/rest/internal/oas/oas_response_encoders_gen.go b/internal/transport/rest/internal/oas/oas_response_encoders_gen.go index 99a96f47..3ffd6b6d 100644 --- a/internal/transport/rest/internal/oas/oas_response_encoders_gen.go +++ b/internal/transport/rest/internal/oas/oas_response_encoders_gen.go @@ -15,10 +15,25 @@ func encodeCreateChatResponse(response CreateChatRes, w http.ResponseWriter) err switch response := response.(type) { case *ChatHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -47,10 +62,25 @@ func encodeCreateChatResponse(response CreateChatRes, w http.ResponseWriter) err case *CreateChatBadRequest: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -79,7 +109,7 @@ func encodeCreateChatResponse(response CreateChatRes, w http.ResponseWriter) err case *CreateSessionUnauthorizedHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "Www-Authenticate,X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "Www-Authenticate,X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) @@ -98,6 +128,21 @@ func encodeCreateChatResponse(response CreateChatRes, w http.ResponseWriter) err return errors.Wrap(err, "encode WWW-Authenticate header") } } + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -126,10 +171,25 @@ func encodeCreateChatResponse(response CreateChatRes, w http.ResponseWriter) err case *CreateChatNotFound: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -158,10 +218,25 @@ func encodeCreateChatResponse(response CreateChatRes, w http.ResponseWriter) err case *CreateChatConflict: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -190,7 +265,7 @@ func encodeCreateChatResponse(response CreateChatRes, w http.ResponseWriter) err case *CreateSessionTooManyRequestsHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) @@ -209,6 +284,21 @@ func encodeCreateChatResponse(response CreateChatRes, w http.ResponseWriter) err return errors.Wrap(err, "encode Retry-After header") } } + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -237,10 +327,25 @@ func encodeCreateChatResponse(response CreateChatRes, w http.ResponseWriter) err case *CreateChatInternalServerError: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -269,10 +374,25 @@ func encodeCreateChatResponse(response CreateChatRes, w http.ResponseWriter) err case *CreateChatServiceUnavailable: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -308,10 +428,25 @@ func encodeCreateMessageResponse(response CreateMessageRes, w http.ResponseWrite switch response := response.(type) { case *MessageHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -340,10 +475,25 @@ func encodeCreateMessageResponse(response CreateMessageRes, w http.ResponseWrite case *CreateMessageBadRequest: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -372,7 +522,7 @@ func encodeCreateMessageResponse(response CreateMessageRes, w http.ResponseWrite case *CreateSessionUnauthorizedHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "Www-Authenticate,X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "Www-Authenticate,X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) @@ -391,6 +541,21 @@ func encodeCreateMessageResponse(response CreateMessageRes, w http.ResponseWrite return errors.Wrap(err, "encode WWW-Authenticate header") } } + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -419,10 +584,25 @@ func encodeCreateMessageResponse(response CreateMessageRes, w http.ResponseWrite case *CreateMessageNotFound: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -451,10 +631,25 @@ func encodeCreateMessageResponse(response CreateMessageRes, w http.ResponseWrite case *CreateMessageConflict: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -483,7 +678,7 @@ func encodeCreateMessageResponse(response CreateMessageRes, w http.ResponseWrite case *CreateSessionTooManyRequestsHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) @@ -502,6 +697,21 @@ func encodeCreateMessageResponse(response CreateMessageRes, w http.ResponseWrite return errors.Wrap(err, "encode Retry-After header") } } + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -530,10 +740,25 @@ func encodeCreateMessageResponse(response CreateMessageRes, w http.ResponseWrite case *CreateMessageInternalServerError: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -562,10 +787,25 @@ func encodeCreateMessageResponse(response CreateMessageRes, w http.ResponseWrite case *CreateMessageServiceUnavailable: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -601,10 +841,25 @@ func encodeCreateSessionResponse(response CreateSessionRes, w http.ResponseWrite switch response := response.(type) { case *SessionHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -633,10 +888,25 @@ func encodeCreateSessionResponse(response CreateSessionRes, w http.ResponseWrite case *CreateSessionBadRequest: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -665,7 +935,7 @@ func encodeCreateSessionResponse(response CreateSessionRes, w http.ResponseWrite case *CreateSessionUnauthorizedHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "Www-Authenticate,X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "Www-Authenticate,X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) @@ -684,6 +954,21 @@ func encodeCreateSessionResponse(response CreateSessionRes, w http.ResponseWrite return errors.Wrap(err, "encode WWW-Authenticate header") } } + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -712,7 +997,7 @@ func encodeCreateSessionResponse(response CreateSessionRes, w http.ResponseWrite case *CreateSessionTooManyRequestsHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) @@ -731,6 +1016,21 @@ func encodeCreateSessionResponse(response CreateSessionRes, w http.ResponseWrite return errors.Wrap(err, "encode Retry-After header") } } + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -759,10 +1059,25 @@ func encodeCreateSessionResponse(response CreateSessionRes, w http.ResponseWrite case *CreateSessionInternalServerError: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -791,10 +1106,25 @@ func encodeCreateSessionResponse(response CreateSessionRes, w http.ResponseWrite case *CreateSessionServiceUnavailable: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -830,10 +1160,25 @@ func encodeCurrentUserResponse(response CurrentUserRes, w http.ResponseWriter) e switch response := response.(type) { case *UserHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -862,10 +1207,25 @@ func encodeCurrentUserResponse(response CurrentUserRes, w http.ResponseWriter) e case *CurrentUserBadRequest: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -894,7 +1254,7 @@ func encodeCurrentUserResponse(response CurrentUserRes, w http.ResponseWriter) e case *CreateSessionUnauthorizedHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "Www-Authenticate,X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "Www-Authenticate,X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) @@ -913,6 +1273,21 @@ func encodeCurrentUserResponse(response CurrentUserRes, w http.ResponseWriter) e return errors.Wrap(err, "encode WWW-Authenticate header") } } + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -941,10 +1316,25 @@ func encodeCurrentUserResponse(response CurrentUserRes, w http.ResponseWriter) e case *CurrentUserNotFound: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -973,10 +1363,25 @@ func encodeCurrentUserResponse(response CurrentUserRes, w http.ResponseWriter) e case *CurrentUserConflict: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -1005,7 +1410,7 @@ func encodeCurrentUserResponse(response CurrentUserRes, w http.ResponseWriter) e case *CreateSessionTooManyRequestsHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) @@ -1024,6 +1429,21 @@ func encodeCurrentUserResponse(response CurrentUserRes, w http.ResponseWriter) e return errors.Wrap(err, "encode Retry-After header") } } + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -1052,10 +1472,25 @@ func encodeCurrentUserResponse(response CurrentUserRes, w http.ResponseWriter) e case *CurrentUserInternalServerError: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -1084,10 +1519,25 @@ func encodeCurrentUserResponse(response CurrentUserRes, w http.ResponseWriter) e case *CurrentUserServiceUnavailable: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -1123,10 +1573,25 @@ func encodeGetChatResponse(response GetChatRes, w http.ResponseWriter) error { switch response := response.(type) { case *ChatHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -1155,10 +1620,25 @@ func encodeGetChatResponse(response GetChatRes, w http.ResponseWriter) error { case *GetChatBadRequest: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -1187,7 +1667,7 @@ func encodeGetChatResponse(response GetChatRes, w http.ResponseWriter) error { case *CreateSessionUnauthorizedHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "Www-Authenticate,X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "Www-Authenticate,X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) @@ -1206,6 +1686,21 @@ func encodeGetChatResponse(response GetChatRes, w http.ResponseWriter) error { return errors.Wrap(err, "encode WWW-Authenticate header") } } + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -1234,10 +1729,25 @@ func encodeGetChatResponse(response GetChatRes, w http.ResponseWriter) error { case *GetChatNotFound: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -1266,10 +1776,25 @@ func encodeGetChatResponse(response GetChatRes, w http.ResponseWriter) error { case *GetChatConflict: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -1298,7 +1823,7 @@ func encodeGetChatResponse(response GetChatRes, w http.ResponseWriter) error { case *CreateSessionTooManyRequestsHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) @@ -1317,6 +1842,21 @@ func encodeGetChatResponse(response GetChatRes, w http.ResponseWriter) error { return errors.Wrap(err, "encode Retry-After header") } } + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -1345,10 +1885,25 @@ func encodeGetChatResponse(response GetChatRes, w http.ResponseWriter) error { case *GetChatInternalServerError: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -1377,10 +1932,25 @@ func encodeGetChatResponse(response GetChatRes, w http.ResponseWriter) error { case *GetChatServiceUnavailable: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -1416,10 +1986,25 @@ func encodeListChatsResponse(response ListChatsRes, w http.ResponseWriter) error switch response := response.(type) { case *ChatPageHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -1448,10 +2033,25 @@ func encodeListChatsResponse(response ListChatsRes, w http.ResponseWriter) error case *ListChatsBadRequest: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -1480,7 +2080,7 @@ func encodeListChatsResponse(response ListChatsRes, w http.ResponseWriter) error case *CreateSessionUnauthorizedHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "Www-Authenticate,X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "Www-Authenticate,X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) @@ -1499,6 +2099,21 @@ func encodeListChatsResponse(response ListChatsRes, w http.ResponseWriter) error return errors.Wrap(err, "encode WWW-Authenticate header") } } + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -1527,10 +2142,25 @@ func encodeListChatsResponse(response ListChatsRes, w http.ResponseWriter) error case *ListChatsNotFound: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -1559,10 +2189,25 @@ func encodeListChatsResponse(response ListChatsRes, w http.ResponseWriter) error case *ListChatsConflict: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -1591,7 +2236,7 @@ func encodeListChatsResponse(response ListChatsRes, w http.ResponseWriter) error case *CreateSessionTooManyRequestsHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) @@ -1610,6 +2255,21 @@ func encodeListChatsResponse(response ListChatsRes, w http.ResponseWriter) error return errors.Wrap(err, "encode Retry-After header") } } + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -1638,10 +2298,25 @@ func encodeListChatsResponse(response ListChatsRes, w http.ResponseWriter) error case *ListChatsInternalServerError: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -1670,10 +2345,25 @@ func encodeListChatsResponse(response ListChatsRes, w http.ResponseWriter) error case *ListChatsServiceUnavailable: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -1709,10 +2399,25 @@ func encodeListMessagesResponse(response ListMessagesRes, w http.ResponseWriter) switch response := response.(type) { case *MessagePageHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -1741,10 +2446,25 @@ func encodeListMessagesResponse(response ListMessagesRes, w http.ResponseWriter) case *ListMessagesBadRequest: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -1773,7 +2493,7 @@ func encodeListMessagesResponse(response ListMessagesRes, w http.ResponseWriter) case *CreateSessionUnauthorizedHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "Www-Authenticate,X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "Www-Authenticate,X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) @@ -1792,6 +2512,21 @@ func encodeListMessagesResponse(response ListMessagesRes, w http.ResponseWriter) return errors.Wrap(err, "encode WWW-Authenticate header") } } + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -1820,10 +2555,25 @@ func encodeListMessagesResponse(response ListMessagesRes, w http.ResponseWriter) case *ListMessagesNotFound: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -1852,10 +2602,25 @@ func encodeListMessagesResponse(response ListMessagesRes, w http.ResponseWriter) case *ListMessagesConflict: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -1884,7 +2649,7 @@ func encodeListMessagesResponse(response ListMessagesRes, w http.ResponseWriter) case *CreateSessionTooManyRequestsHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) @@ -1903,6 +2668,21 @@ func encodeListMessagesResponse(response ListMessagesRes, w http.ResponseWriter) return errors.Wrap(err, "encode Retry-After header") } } + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -1931,10 +2711,25 @@ func encodeListMessagesResponse(response ListMessagesRes, w http.ResponseWriter) case *ListMessagesInternalServerError: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -1963,10 +2758,25 @@ func encodeListMessagesResponse(response ListMessagesRes, w http.ResponseWriter) case *ListMessagesServiceUnavailable: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -2002,10 +2812,25 @@ func encodeLivenessResponse(response LivenessRes, w http.ResponseWriter) error { switch response := response.(type) { case *HealthHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -2034,10 +2859,25 @@ func encodeLivenessResponse(response LivenessRes, w http.ResponseWriter) error { case *ErrorHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -2073,10 +2913,25 @@ func encodeReadinessResponse(response ReadinessRes, w http.ResponseWriter) error switch response := response.(type) { case *HealthHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -2105,10 +2960,25 @@ func encodeReadinessResponse(response ReadinessRes, w http.ResponseWriter) error case *ReadinessInternalServerError: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -2137,10 +3007,25 @@ func encodeReadinessResponse(response ReadinessRes, w http.ResponseWriter) error case *ReadinessServiceUnavailable: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -2176,10 +3061,25 @@ func encodeRegisterUserResponse(response RegisterUserRes, w http.ResponseWriter) switch response := response.(type) { case *UserHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -2208,10 +3108,25 @@ func encodeRegisterUserResponse(response RegisterUserRes, w http.ResponseWriter) case *RegisterUserBadRequest: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -2240,10 +3155,25 @@ func encodeRegisterUserResponse(response RegisterUserRes, w http.ResponseWriter) case *RegisterUserConflict: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -2272,7 +3202,7 @@ func encodeRegisterUserResponse(response RegisterUserRes, w http.ResponseWriter) case *CreateSessionTooManyRequestsHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) @@ -2291,6 +3221,21 @@ func encodeRegisterUserResponse(response RegisterUserRes, w http.ResponseWriter) return errors.Wrap(err, "encode Retry-After header") } } + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -2319,10 +3264,25 @@ func encodeRegisterUserResponse(response RegisterUserRes, w http.ResponseWriter) case *RegisterUserInternalServerError: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -2351,10 +3311,25 @@ func encodeRegisterUserResponse(response RegisterUserRes, w http.ResponseWriter) case *RegisterUserServiceUnavailable: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -2389,10 +3364,25 @@ func encodeRegisterUserResponse(response RegisterUserRes, w http.ResponseWriter) func encodeRevokeSessionResponse(response RevokeSessionRes, w http.ResponseWriter) error { switch response := response.(type) { case *RevokeSessionNoContent: - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -2415,7 +3405,7 @@ func encodeRevokeSessionResponse(response RevokeSessionRes, w http.ResponseWrite case *CreateSessionUnauthorizedHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "Www-Authenticate,X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "Www-Authenticate,X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) @@ -2434,6 +3424,21 @@ func encodeRevokeSessionResponse(response RevokeSessionRes, w http.ResponseWrite return errors.Wrap(err, "encode WWW-Authenticate header") } } + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -2462,7 +3467,7 @@ func encodeRevokeSessionResponse(response RevokeSessionRes, w http.ResponseWrite case *CreateSessionTooManyRequestsHeaders: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "Retry-After,X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) @@ -2481,6 +3486,21 @@ func encodeRevokeSessionResponse(response RevokeSessionRes, w http.ResponseWrite return errors.Wrap(err, "encode Retry-After header") } } + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -2509,10 +3529,25 @@ func encodeRevokeSessionResponse(response RevokeSessionRes, w http.ResponseWrite case *RevokeSessionInternalServerError: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ @@ -2541,10 +3576,25 @@ func encodeRevokeSessionResponse(response RevokeSessionRes, w http.ResponseWrite case *RevokeSessionServiceUnavailable: w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.Header().Set("Access-Control-Expose-Headers", "X-Request-Id") + w.Header().Set("Access-Control-Expose-Headers", "X-Instance-Id,X-Request-Id") // Encoding response headers. { h := uri.NewHeaderEncoder(w.Header()) + // Encode "X-Instance-Id" header. + { + cfg := uri.HeaderParameterEncodingConfig{ + Name: "X-Instance-Id", + Explode: false, + } + if err := h.EncodeParam(cfg, func(e uri.Encoder) error { + if val, ok := response.XInstanceID.Get(); ok { + return e.EncodeValue(conv.StringToString(val)) + } + return nil + }); err != nil { + return errors.Wrap(err, "encode X-Instance-Id header") + } + } // Encode "X-Request-Id" header. { cfg := uri.HeaderParameterEncodingConfig{ diff --git a/internal/transport/rest/internal/oas/oas_router_gen.go b/internal/transport/rest/internal/oas/oas_router_gen.go index d8507fb0..a14efa17 100644 --- a/internal/transport/rest/internal/oas/oas_router_gen.go +++ b/internal/transport/rest/internal/oas/oas_router_gen.go @@ -26,7 +26,7 @@ var ( } rn4AllowedHeaders = map[string]string{ "GET": "Authorization", - "POST": "Authorization,Content-Type", + "POST": "Authorization,Content-Type,Idempotency-Key", } rn12AllowedHeaders = map[string]string{ "POST": "Content-Type", diff --git a/internal/transport/rest/internal/oas/oas_schemas_gen.go b/internal/transport/rest/internal/oas/oas_schemas_gen.go index bdc42243..75f4a280 100644 --- a/internal/transport/rest/internal/oas/oas_schemas_gen.go +++ b/internal/transport/rest/internal/oas/oas_schemas_gen.go @@ -120,8 +120,14 @@ func (s *Chat) SetCreatedAt(val time.Time) { // ChatHeaders wraps Chat with response headers. type ChatHeaders struct { - XRequestID OptString - Response Chat + XInstanceID OptString + XRequestID OptString + Response Chat +} + +// GetXInstanceID returns the value of XInstanceID. +func (s *ChatHeaders) GetXInstanceID() OptString { + return s.XInstanceID } // GetXRequestID returns the value of XRequestID. @@ -134,6 +140,11 @@ func (s *ChatHeaders) GetResponse() Chat { return s.Response } +// SetXInstanceID sets the value of XInstanceID. +func (s *ChatHeaders) SetXInstanceID(val OptString) { + s.XInstanceID = val +} + // SetXRequestID sets the value of XRequestID. func (s *ChatHeaders) SetXRequestID(val OptString) { s.XRequestID = val @@ -175,8 +186,14 @@ func (s *ChatPage) SetNextCursor(val NilString) { // ChatPageHeaders wraps ChatPage with response headers. type ChatPageHeaders struct { - XRequestID OptString - Response ChatPage + XInstanceID OptString + XRequestID OptString + Response ChatPage +} + +// GetXInstanceID returns the value of XInstanceID. +func (s *ChatPageHeaders) GetXInstanceID() OptString { + return s.XInstanceID } // GetXRequestID returns the value of XRequestID. @@ -189,6 +206,11 @@ func (s *ChatPageHeaders) GetResponse() ChatPage { return s.Response } +// SetXInstanceID sets the value of XInstanceID. +func (s *ChatPageHeaders) SetXInstanceID(val OptString) { + s.XInstanceID = val +} + // SetXRequestID sets the value of XRequestID. func (s *ChatPageHeaders) SetXRequestID(val OptString) { s.XRequestID = val @@ -296,9 +318,10 @@ func (*CreateSessionServiceUnavailable) createSessionRes() {} // CreateSessionTooManyRequestsHeaders wraps Error with response headers. type CreateSessionTooManyRequestsHeaders struct { - RetryAfter OptInt - XRequestID OptString - Response Error + RetryAfter OptInt + XInstanceID OptString + XRequestID OptString + Response Error } // GetRetryAfter returns the value of RetryAfter. @@ -306,6 +329,11 @@ func (s *CreateSessionTooManyRequestsHeaders) GetRetryAfter() OptInt { return s.RetryAfter } +// GetXInstanceID returns the value of XInstanceID. +func (s *CreateSessionTooManyRequestsHeaders) GetXInstanceID() OptString { + return s.XInstanceID +} + // GetXRequestID returns the value of XRequestID. func (s *CreateSessionTooManyRequestsHeaders) GetXRequestID() OptString { return s.XRequestID @@ -321,6 +349,11 @@ func (s *CreateSessionTooManyRequestsHeaders) SetRetryAfter(val OptInt) { s.RetryAfter = val } +// SetXInstanceID sets the value of XInstanceID. +func (s *CreateSessionTooManyRequestsHeaders) SetXInstanceID(val OptString) { + s.XInstanceID = val +} + // SetXRequestID sets the value of XRequestID. func (s *CreateSessionTooManyRequestsHeaders) SetXRequestID(val OptString) { s.XRequestID = val @@ -344,6 +377,7 @@ func (*CreateSessionTooManyRequestsHeaders) revokeSessionRes() {} // CreateSessionUnauthorizedHeaders wraps Error with response headers. type CreateSessionUnauthorizedHeaders struct { WWWAuthenticate OptString + XInstanceID OptString XRequestID OptString Response Error } @@ -353,6 +387,11 @@ func (s *CreateSessionUnauthorizedHeaders) GetWWWAuthenticate() OptString { return s.WWWAuthenticate } +// GetXInstanceID returns the value of XInstanceID. +func (s *CreateSessionUnauthorizedHeaders) GetXInstanceID() OptString { + return s.XInstanceID +} + // GetXRequestID returns the value of XRequestID. func (s *CreateSessionUnauthorizedHeaders) GetXRequestID() OptString { return s.XRequestID @@ -368,6 +407,11 @@ func (s *CreateSessionUnauthorizedHeaders) SetWWWAuthenticate(val OptString) { s.WWWAuthenticate = val } +// SetXInstanceID sets the value of XInstanceID. +func (s *CreateSessionUnauthorizedHeaders) SetXInstanceID(val OptString) { + s.XInstanceID = val +} + // SetXRequestID sets the value of XRequestID. func (s *CreateSessionUnauthorizedHeaders) SetXRequestID(val OptString) { s.XRequestID = val @@ -587,8 +631,14 @@ func (s *ErrorErrorCode) UnmarshalText(data []byte) error { // ErrorHeaders wraps Error with response headers. type ErrorHeaders struct { - XRequestID OptString - Response Error + XInstanceID OptString + XRequestID OptString + Response Error +} + +// GetXInstanceID returns the value of XInstanceID. +func (s *ErrorHeaders) GetXInstanceID() OptString { + return s.XInstanceID } // GetXRequestID returns the value of XRequestID. @@ -601,6 +651,11 @@ func (s *ErrorHeaders) GetResponse() Error { return s.Response } +// SetXInstanceID sets the value of XInstanceID. +func (s *ErrorHeaders) SetXInstanceID(val OptString) { + s.XInstanceID = val +} + // SetXRequestID sets the value of XRequestID. func (s *ErrorHeaders) SetXRequestID(val OptString) { s.XRequestID = val @@ -650,8 +705,14 @@ func (s *Health) SetStatus(val HealthStatus) { // HealthHeaders wraps Health with response headers. type HealthHeaders struct { - XRequestID OptString - Response Health + XInstanceID OptString + XRequestID OptString + Response Health +} + +// GetXInstanceID returns the value of XInstanceID. +func (s *HealthHeaders) GetXInstanceID() OptString { + return s.XInstanceID } // GetXRequestID returns the value of XRequestID. @@ -664,6 +725,11 @@ func (s *HealthHeaders) GetResponse() Health { return s.Response } +// SetXInstanceID sets the value of XInstanceID. +func (s *HealthHeaders) SetXInstanceID(val OptString) { + s.XInstanceID = val +} + // SetXRequestID sets the value of XRequestID. func (s *HealthHeaders) SetXRequestID(val OptString) { s.XRequestID = val @@ -812,8 +878,14 @@ func (s *Message) SetCreatedAt(val time.Time) { // MessageHeaders wraps Message with response headers. type MessageHeaders struct { - XRequestID OptString - Response Message + XInstanceID OptString + XRequestID OptString + Response Message +} + +// GetXInstanceID returns the value of XInstanceID. +func (s *MessageHeaders) GetXInstanceID() OptString { + return s.XInstanceID } // GetXRequestID returns the value of XRequestID. @@ -826,6 +898,11 @@ func (s *MessageHeaders) GetResponse() Message { return s.Response } +// SetXInstanceID sets the value of XInstanceID. +func (s *MessageHeaders) SetXInstanceID(val OptString) { + s.XInstanceID = val +} + // SetXRequestID sets the value of XRequestID. func (s *MessageHeaders) SetXRequestID(val OptString) { s.XRequestID = val @@ -866,8 +943,14 @@ func (s *MessagePage) SetNextCursor(val NilString) { // MessagePageHeaders wraps MessagePage with response headers. type MessagePageHeaders struct { - XRequestID OptString - Response MessagePage + XInstanceID OptString + XRequestID OptString + Response MessagePage +} + +// GetXInstanceID returns the value of XInstanceID. +func (s *MessagePageHeaders) GetXInstanceID() OptString { + return s.XInstanceID } // GetXRequestID returns the value of XRequestID. @@ -880,6 +963,11 @@ func (s *MessagePageHeaders) GetResponse() MessagePage { return s.Response } +// SetXInstanceID sets the value of XInstanceID. +func (s *MessagePageHeaders) SetXInstanceID(val OptString) { + s.XInstanceID = val +} + // SetXRequestID sets the value of XRequestID. func (s *MessagePageHeaders) SetXRequestID(val OptString) { s.XRequestID = val @@ -1059,7 +1147,13 @@ func (*RevokeSessionInternalServerError) revokeSessionRes() {} // RevokeSessionNoContent is response for RevokeSession operation. type RevokeSessionNoContent struct { - XRequestID OptString + XInstanceID OptString + XRequestID OptString +} + +// GetXInstanceID returns the value of XInstanceID. +func (s *RevokeSessionNoContent) GetXInstanceID() OptString { + return s.XInstanceID } // GetXRequestID returns the value of XRequestID. @@ -1067,6 +1161,11 @@ func (s *RevokeSessionNoContent) GetXRequestID() OptString { return s.XRequestID } +// SetXInstanceID sets the value of XInstanceID. +func (s *RevokeSessionNoContent) SetXInstanceID(val OptString) { + s.XInstanceID = val +} + // SetXRequestID sets the value of XRequestID. func (s *RevokeSessionNoContent) SetXRequestID(val OptString) { s.XRequestID = val @@ -1128,8 +1227,14 @@ func (s *Session) SetUser(val User) { // SessionHeaders wraps Session with response headers. type SessionHeaders struct { - XRequestID OptString - Response Session + XInstanceID OptString + XRequestID OptString + Response Session +} + +// GetXInstanceID returns the value of XInstanceID. +func (s *SessionHeaders) GetXInstanceID() OptString { + return s.XInstanceID } // GetXRequestID returns the value of XRequestID. @@ -1142,6 +1247,11 @@ func (s *SessionHeaders) GetResponse() Session { return s.Response } +// SetXInstanceID sets the value of XInstanceID. +func (s *SessionHeaders) SetXInstanceID(val OptString) { + s.XInstanceID = val +} + // SetXRequestID sets the value of XRequestID. func (s *SessionHeaders) SetXRequestID(val OptString) { s.XRequestID = val @@ -1204,8 +1314,14 @@ func (s *User) SetCreatedAt(val time.Time) { // UserHeaders wraps User with response headers. type UserHeaders struct { - XRequestID OptString - Response User + XInstanceID OptString + XRequestID OptString + Response User +} + +// GetXInstanceID returns the value of XInstanceID. +func (s *UserHeaders) GetXInstanceID() OptString { + return s.XInstanceID } // GetXRequestID returns the value of XRequestID. @@ -1218,6 +1334,11 @@ func (s *UserHeaders) GetResponse() User { return s.Response } +// SetXInstanceID sets the value of XInstanceID. +func (s *UserHeaders) SetXInstanceID(val OptString) { + s.XInstanceID = val +} + // SetXRequestID sets the value of XRequestID. func (s *UserHeaders) SetXRequestID(val OptString) { s.XRequestID = val diff --git a/internal/transport/rest/internal/oas/oas_validators_gen.go b/internal/transport/rest/internal/oas/oas_validators_gen.go index 442acf1d..bad56ad4 100644 --- a/internal/transport/rest/internal/oas/oas_validators_gen.go +++ b/internal/transport/rest/internal/oas/oas_validators_gen.go @@ -72,6 +72,36 @@ func (s *ChatHeaders) Validate() error { } var failures []validate.FieldError + if err := func() error { + if value, ok := s.XInstanceID.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "XInstanceID", + Error: err, + }) + } if err := func() error { if value, ok := s.XRequestID.Get(); ok { if err := func() error { @@ -165,6 +195,36 @@ func (s *ChatPageHeaders) Validate() error { } var failures []validate.FieldError + if err := func() error { + if value, ok := s.XInstanceID.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "XInstanceID", + Error: err, + }) + } if err := func() error { if value, ok := s.XRequestID.Get(); ok { if err := func() error { @@ -442,6 +502,36 @@ func (s *CreateSessionTooManyRequestsHeaders) Validate() error { Error: err, }) } + if err := func() error { + if value, ok := s.XInstanceID.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "XInstanceID", + Error: err, + }) + } if err := func() error { if value, ok := s.XRequestID.Get(); ok { if err := func() error { @@ -495,6 +585,36 @@ func (s *CreateSessionUnauthorizedHeaders) Validate() error { } var failures []validate.FieldError + if err := func() error { + if value, ok := s.XInstanceID.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "XInstanceID", + Error: err, + }) + } if err := func() error { if value, ok := s.XRequestID.Get(); ok { if err := func() error { @@ -786,6 +906,36 @@ func (s *ErrorHeaders) Validate() error { } var failures []validate.FieldError + if err := func() error { + if value, ok := s.XInstanceID.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "XInstanceID", + Error: err, + }) + } if err := func() error { if value, ok := s.XRequestID.Get(); ok { if err := func() error { @@ -902,6 +1052,36 @@ func (s *HealthHeaders) Validate() error { } var failures []validate.FieldError + if err := func() error { + if value, ok := s.XInstanceID.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "XInstanceID", + Error: err, + }) + } if err := func() error { if value, ok := s.XRequestID.Get(); ok { if err := func() error { @@ -1079,6 +1259,36 @@ func (s *MessageHeaders) Validate() error { } var failures []validate.FieldError + if err := func() error { + if value, ok := s.XInstanceID.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "XInstanceID", + Error: err, + }) + } if err := func() error { if value, ok := s.XRequestID.Get(); ok { if err := func() error { @@ -1172,6 +1382,36 @@ func (s *MessagePageHeaders) Validate() error { } var failures []validate.FieldError + if err := func() error { + if value, ok := s.XInstanceID.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "XInstanceID", + Error: err, + }) + } if err := func() error { if value, ok := s.XRequestID.Get(); ok { if err := func() error { @@ -1281,6 +1521,36 @@ func (s *RevokeSessionNoContent) Validate() error { } var failures []validate.FieldError + if err := func() error { + if value, ok := s.XInstanceID.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "XInstanceID", + Error: err, + }) + } if err := func() error { if value, ok := s.XRequestID.Get(); ok { if err := func() error { @@ -1377,6 +1647,36 @@ func (s *SessionHeaders) Validate() error { } var failures []validate.FieldError + if err := func() error { + if value, ok := s.XInstanceID.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "XInstanceID", + Error: err, + }) + } if err := func() error { if value, ok := s.XRequestID.Get(); ok { if err := func() error { @@ -1488,6 +1788,36 @@ func (s *UserHeaders) Validate() error { } var failures []validate.FieldError + if err := func() error { + if value, ok := s.XInstanceID.Get(); ok { + if err := func() error { + if err := (validate.String{ + MinLength: 1, + MinLengthSet: true, + MaxLength: 0, + MaxLengthSet: false, + Email: false, + Hostname: false, + Regex: nil, + MinNumeric: 0, + MinNumericSet: false, + MaxNumeric: 0, + MaxNumericSet: false, + }).Validate(string(value)); err != nil { + return errors.Wrap(err, "string") + } + return nil + }(); err != nil { + return err + } + } + return nil + }(); err != nil { + failures = append(failures, validate.FieldError{ + Name: "XInstanceID", + Error: err, + }) + } if err := func() error { if value, ok := s.XRequestID.Get(); ok { if err := func() error { diff --git a/internal/transport/rest/logging.go b/internal/transport/rest/logging.go index ffb362b1..cf40069a 100644 --- a/internal/transport/rest/logging.go +++ b/internal/transport/rest/logging.go @@ -10,6 +10,7 @@ import ( "github.com/ogen-go/ogen/middleware" "github.com/ogen-go/ogen/ogenerrors" + "github.com/ogen-go/ogen/openapi" "mtusi-messenger/internal/transport/rest/internal/oas" ) @@ -45,7 +46,10 @@ func loggingMiddleware(log *slog.Logger) oas.Middleware { handled = append(handled, slog.Duration("duration", time.Since(started))) if err != nil { - status := ogenerrors.ErrorCode(err) + // Статус в логе должен совпадать с ответом клиенту: ogenerrors.ErrorCode + // возвращает 500 для доменных ошибок, поэтому используем ту же функцию, + // что и обработчик ошибок транспорта. + status := statusForError(err) handled = append(handled, slog.Int("status", status), @@ -102,8 +106,20 @@ func loggedParams(params middleware.Parameters) map[string]any { } out := make(map[string]any, len(params)) + for key, value := range params { - out[string(key.In)+"."+key.Name] = value + name := string(key.In) + "." + key.Name + + if key.In == openapi.LocationHeader { + // Значения заголовков не попадают в лог: Idempotency-Key и подобные + // параметры — это долгоживущий след конкретного запроса, а для отладки + // достаточно факта наличия. + out[name] = "redacted" + + continue + } + + out[name] = value } return out diff --git a/internal/transport/rest/logging_test.go b/internal/transport/rest/logging_test.go index c0d8bf84..2ff16455 100644 --- a/internal/transport/rest/logging_test.go +++ b/internal/transport/rest/logging_test.go @@ -80,6 +80,28 @@ func (s *LoggingSuite) request(method, target, body string) middleware.Request { } } +func (s *LoggingSuite) TestHeaderParamsAreRedacted() { + req := s.request(http.MethodPost, "/api/v1/chats/33333333-3333-4333-8333-333333333333/messages", `{"text":"привет"}`) + req.Params = middleware.Parameters{ + {Name: "chat_id", In: openapi.LocationPath}: "33333333-3333-4333-8333-333333333333", + {Name: "Idempotency-Key", In: openapi.LocationHeader}: "secret-key-value", + } + + _, err := loggingMiddleware(s.log)(req, func(middleware.Request) (middleware.Response, error) { + return middleware.Response{}, nil + }) + s.Require().NoError(err) + + records := s.records() + s.Require().NotEmpty(records) + + params, ok := records[0]["params"].(map[string]any) + s.Require().True(ok, "params должны быть объектом") + s.Equal("redacted", params["header.Idempotency-Key"], "значение заголовка не логируется") + s.Equal("33333333-3333-4333-8333-333333333333", params["path.chat_id"]) + s.NotContains(s.sink.String(), "secret-key-value") +} + func (s *LoggingSuite) TestLogsAcceptedAndHandled() { req := s.request(http.MethodPost, "/api/v1/chats/33333333-3333-4333-8333-333333333333/messages?limit=50", `{"text":"привет"}`) diff --git a/internal/transport/rest/router.go b/internal/transport/rest/router.go index 43fa600f..cfa2833a 100644 --- a/internal/transport/rest/router.go +++ b/internal/transport/rest/router.go @@ -11,6 +11,7 @@ func NewRouter( handler oas.Handler, security oas.SecurityHandler, log *slog.Logger, + maxBodyBytes int64, ) (http.Handler, error) { server, err := oas.NewServer( handler, @@ -24,5 +25,7 @@ func NewRouter( return nil, err } - return requestIDMiddleware(server), nil + return requestIDMiddleware( + instanceIDMiddleware(InstanceID(), bodyLimitMiddleware(maxBodyBytes, log, server)), + ), nil } diff --git a/internal/transport/rest/router_test.go b/internal/transport/rest/router_test.go index 7dacb4e8..4419ada4 100644 --- a/internal/transport/rest/router_test.go +++ b/internal/transport/rest/router_test.go @@ -2,6 +2,7 @@ package rest_test import ( "bytes" + "crypto/sha256" "encoding/base64" "encoding/json" "errors" @@ -9,6 +10,7 @@ import ( "log/slog" "net/http" "net/http/httptest" + "strings" "testing" "time" @@ -22,7 +24,10 @@ import ( "mtusi-messenger/internal/transport/rest/mocks" ) -const requestIDHeader = "X-Request-ID" +const ( + requestIDHeader = "X-Request-ID" + instanceIDHeader = "X-Instance-Id" +) func basic(username, password string) string { return base64.StdEncoding.EncodeToString([]byte(username + ":" + password)) @@ -48,6 +53,9 @@ type routerFixture struct { server *httptest.Server } +// testMaxBodyBytes is small on purpose: the limit test does not need a 256 KiB body. +const testMaxBodyBytes = 64 << 10 + func newRouterFixture(t *testing.T) *routerFixture { t.Helper() @@ -63,6 +71,7 @@ func newRouterFixture(t *testing.T) *routerFixture { rest.NewHandler(fixture.users, fixture.chats, fixture.messages, fixture.health, fixture.sessions), rest.NewSecurityHandler(fixture.sessions), logger.New(logger.WithLevel(slog.LevelError)), + testMaxBodyBytes, ) require.NoError(t, err) @@ -324,3 +333,140 @@ func TestNotFoundAndMethodNotAllowed(t *testing.T) { result = fixture.do(t, http.MethodDelete, "/health/live", nil, nil) require.Equal(t, http.StatusMethodNotAllowed, result.status) } + +func TestOversizedBodyIsRejectedWithPayloadTooLarge(t *testing.T) { + fixture := newRouterFixture(t) + + // Тело больше лимита не читается и не декодируется: отказ приходит сразу, + // до обращения к сервисам. + body, err := json.Marshal(map[string]string{ + "username": "alice", + "display_name": "Алиса", + "password": strings.Repeat("x", testMaxBodyBytes+1), + }) + require.NoError(t, err) + + result := fixture.do(t, http.MethodPost, "/api/v1/users", body, nil) + require.Equal(t, http.StatusRequestEntityTooLarge, result.status) + require.NotEmpty(t, result.header.Get(instanceIDHeader), "ответ об ошибке тоже помечен репликой") + require.NotEmpty(t, result.header.Get(requestIDHeader)) + + var decoded struct { + Error struct { + Code string `json:"code"` + } `json:"error"` + } + require.NoError(t, json.Unmarshal(result.body, &decoded)) + require.Equal(t, "payload_too_large", decoded.Error.Code) +} + +func TestCreateMessageRequiresIdempotencyKey(t *testing.T) { + fixture := newRouterFixture(t) + + user := domain.User{ID: uuid.New(), Username: "alice", DisplayName: "Алиса", CreatedAt: time.Now().UTC()} + fixture.sessions.EXPECT().Resolve(mock.Anything, "opaque-token").Return(user, nil).Maybe() + + result := fixture.do( + t, + http.MethodPost, + "/api/v1/chats/"+uuid.NewString()+"/messages", + []byte(`{"text":"привет"}`), + map[string]string{"Authorization": "Bearer opaque-token"}, + ) + require.Equal(t, http.StatusBadRequest, result.status) + require.NotEmpty(t, result.header.Get(instanceIDHeader), "ответ об ошибке тоже помечен репликой") +} + +func TestCreateMessageFingerprintIgnoresJSONFormatting(t *testing.T) { + fixture := newRouterFixture(t) + + user := domain.User{ID: uuid.New(), Username: "alice", DisplayName: "Алиса", CreatedAt: time.Now().UTC()} + chatID := uuid.New() + message := domain.Message{ID: uuid.New(), ChatID: chatID, SenderID: user.ID, Text: "привет", CreatedAt: time.Now().UTC()} + fixture.sessions.EXPECT().Resolve(mock.Anything, "opaque-token").Return(user, nil).Maybe() + + var fingerprints [][sha256.Size]byte + + fixture.messages.EXPECT(). + Send(mock.Anything, mock.MatchedBy(func(draft domain.MessageDraft) bool { + if draft.ChatID != chatID || draft.SenderID != user.ID || draft.Idempotency.Key != "key-1" { + return false + } + + fingerprints = append(fingerprints, draft.Idempotency.RequestHash) + + return true + })). + Return(message, nil) + + headers := map[string]string{"Authorization": "Bearer opaque-token", "Idempotency-Key": "key-1"} + path := "/api/v1/chats/" + chatID.String() + "/messages" + + first := fixture.do(t, http.MethodPost, path, []byte(`{"text":"привет"}`), headers) + replay := fixture.do(t, http.MethodPost, path, []byte(`{ "text" : "привет" }`), headers) + other := fixture.do(t, http.MethodPost, path, []byte(`{"text":"другое"}`), headers) + + require.Equal(t, http.StatusCreated, first.status) + require.Equal(t, http.StatusCreated, replay.status) + require.Equal(t, http.StatusCreated, other.status) + require.NotEmpty(t, first.header.Get(instanceIDHeader)) + require.Len(t, fingerprints, 3) + require.Equal(t, fingerprints[0], fingerprints[1], + "порядок ключей и пробелы в JSON не меняют отпечаток payload") + require.NotEqual(t, fingerprints[0], fingerprints[2], + "другой payload с тем же ключом — это конфликт, отпечатки обязаны различаться") +} + +func TestCreateMessageReplayConflictIsReportedAsConflict(t *testing.T) { + fixture := newRouterFixture(t) + + user := domain.User{ID: uuid.New(), Username: "alice", DisplayName: "Алиса", CreatedAt: time.Now().UTC()} + fixture.sessions.EXPECT().Resolve(mock.Anything, "opaque-token").Return(user, nil).Maybe() + fixture.messages.EXPECT(). + Send(mock.Anything, mock.Anything). + Return(domain.Message{}, domain.ErrIdempotency). + Once() + + result := fixture.do( + t, + http.MethodPost, + "/api/v1/chats/"+uuid.NewString()+"/messages", + []byte(`{"text":"другой"}`), + map[string]string{"Authorization": "Bearer opaque-token", "Idempotency-Key": "key-1"}, + ) + require.Equal(t, http.StatusConflict, result.status) + + var body struct { + Error struct { + Code string `json:"code"` + } `json:"error"` + } + require.NoError(t, json.Unmarshal(result.body, &body)) + require.Equal(t, "conflict", body.Error.Code) +} + +func TestEveryResponseCarriesInstanceID(t *testing.T) { + fixture := newRouterFixture(t) + + user := domain.User{ID: uuid.New(), Username: "alice", DisplayName: "Алиса", CreatedAt: time.Now().UTC()} + fixture.sessions.EXPECT().Resolve(mock.Anything, "opaque-token").Return(user, nil).Maybe() + + tests := map[string]httpResult{ + "успешный ответ": fixture.do(t, http.MethodGet, "/health/live", nil, nil), + "неизвестный маршрут": fixture.do(t, http.MethodGet, "/nope", nil, nil), + "неподдерживаемый метод": fixture.do(t, http.MethodDelete, "/health/live", nil, nil), + "ошибка валидации схемы": fixture.do( + t, + http.MethodPost, + "/api/v1/chats/"+uuid.NewString()+"/messages", + []byte(`{"text":"привет"}`), + map[string]string{"Authorization": "Bearer opaque-token"}, + ), + } + + for name, result := range tests { + t.Run(name, func(t *testing.T) { + require.NotEmpty(t, result.header.Get(instanceIDHeader)) + }) + } +} diff --git a/scripts/api_cache_performance.sh b/scripts/api_cache_performance.sh index 447921a9..10c03544 100644 --- a/scripts/api_cache_performance.sh +++ b/scripts/api_cache_performance.sh @@ -11,6 +11,6 @@ mkdir -p evidence/cache echo "# generated: $(date -u +%Y-%m-%dT%H:%M:%SZ)" env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy \ NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1 \ - python3 tests/cache_api_performance.py + python3 student-tests/cache_api_performance.py } > evidence/cache/api-performance.txt 2>&1 cat evidence/cache/api-performance.txt diff --git a/scripts/lb_readiness_check.sh b/scripts/lb_readiness_check.sh new file mode 100755 index 00000000..23628a8c --- /dev/null +++ b/scripts/lb_readiness_check.sh @@ -0,0 +1,194 @@ +#!/bin/sh +# Проверка критерия «LB исключает неготовую реплику» (lab3). +# +# Рядом с рабочими репликами поднимается третья с тем же сетевым alias, но её +# доступ к БД идёт через временный TCP-прокси. Пока прокси жив, реплика готова и +# получает трафик через LB. После остановки прокси реплика остаётся доступной по +# сети (процесс жив, порт открыт), но /health/ready отвечает 503 — и балансировщик +# обязан убрать её из ротации и не отправлять ей ни одного запроса. +# +# scripts/lb_readiness_check.sh # стенд поднят (make up) +# OUT=evidence/lb-readiness.txt scripts/lb_readiness_check.sh +set -eu + +ROOT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) +cd "$ROOT_DIR" + +# .env определяет, на каком порту публикуется LB (compose.yaml) и какие креды у +# хранилищ, поэтому значения берём оттуда же, а не из окружения вызывающего. +if [ -f .env ]; then + set -a + # shellcheck disable=SC1091 + . ./.env + set +a +fi + +OUT=${OUT:-evidence/lb-readiness.txt} +PROJECT=${COMPOSE_PROJECT_NAME:-mtusi-messenger-lab3} +NET=${PROJECT}_default +IMAGE=${IMAGE:-mtusi-messenger:lab3} +STATS=${STATS:-http://127.0.0.1:8404/stats;csv} +BASE_URL=${BASE_URL:-http://localhost:8080} +CANDIDATE=lb-readiness-candidate +PROXY=lb-readiness-pgproxy +REQUESTS=${REQUESTS:-40} + +NO_PROXY_ENV="env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy" +NO_PROXY_ENV="$NO_PROXY_ENV NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1" + +cleanup() { + docker rm -f "$CANDIDATE" "$PROXY" >/dev/null 2>&1 || true +} + +trap cleanup EXIT INT TERM +cleanup + +instances() { + tries=${1:-$REQUESTS} + i=0 + + while [ "$i" -lt "$tries" ]; do + curl -fsS --noproxy '*' -D - -o /dev/null "$BASE_URL/health/live" 2>/dev/null \ + | awk 'tolower($1) == "x-instance-id:" { print $2 }' + i=$((i + 1)) + done | sort | uniq -c +} + +stats() { + curl -s --noproxy '*' "$STATS" | awk -F, '$1 ~ /^api/ { printf "%s=%s ", $2, $18 }' +} + +readiness() { + docker exec "$CANDIDATE" wget -qO- -S -T 3 http://127.0.0.1:8080/health/ready 2>&1 \ + | awk '/^ HTTP\//{print $2; exit}' +} + +wait_readiness() { + want=$1 + attempt=0 + + while [ "$attempt" -lt 30 ]; do + [ "$(readiness)" = "$want" ] && return 0 + attempt=$((attempt + 1)) + sleep 1 + done + + return 1 +} + +up_slots() { + curl -s --noproxy '*' "$STATS" | awk -F, '$1 ~ /^api/ && $18 == "UP" && $2 != "BACKEND" { printf "%s ", $2 }' +} + +wait_new_up_slot() { + before=$1 + attempt=0 + + while [ "$attempt" -lt 30 ]; do + for slot in $(up_slots); do + case " $before " in + *" $slot "*) ;; + *) echo "$slot"; return 0 ;; + esac + done + + attempt=$((attempt + 1)) + sleep 1 + done + + return 1 +} + +wait_slot_status() { + slot=$1 + want=$2 + attempt=0 + + while [ "$attempt" -lt 60 ]; do + status=$(curl -s --noproxy '*' "$STATS" | awk -F, -v s="$slot" '$1 ~ /^api/ && $2 == s { print $18; exit }') + + if [ "$status" = "$want" ]; then + SWAIT_SECONDS=$((attempt / 2)) + return 0 + fi + + attempt=$((attempt + 1)) + sleep 0.5 + done + + return 1 +} + +{ + echo "# LB excludes a not-ready but reachable replica (lab3)" + echo "# generated: $(date -u +%Y-%m-%dT%H:%M:%SZ)" + echo "# lb: $(docker inspect -f '{{.Config.Image}}' "$(docker ps -q --filter label=com.docker.compose.service=lb)" 2>/dev/null)" + echo + echo "## 1. baseline: requests through LB by replica" + instances + baseline_slots=$(up_slots) + echo " stats: $(stats)" + echo + echo "## 2. start a temporary TCP proxy to postgres and a candidate replica behind the same network alias" + docker run -d --name "$PROXY" --network "$NET" alpine/socat@sha256:fb3862c949af7c79996d0e514ee96128644d840835ed5368eeecb14a869de361 \ + tcp-listen:5432,fork,reuseaddr tcp-connect:postgres:5432 >/dev/null + docker run -d --name "$CANDIDATE" --network "$NET" --network-alias api-replica \ + -e APP_CONFIG=/etc/messenger/dev/config.yaml \ + -e POSTGRES_HOST="$PROXY" -e POSTGRES_PORT=5432 \ + -e POSTGRES_DATABASE="${POSTGRES_DATABASE:-messenger}" \ + -e POSTGRES_USER="${POSTGRES_USER:-messenger}" \ + -e POSTGRES_PASSWORD="${POSTGRES_PASSWORD:-messenger}" -e POSTGRES_SSL_MODE=disable \ + -e REDIS_ENABLED=true -e REDIS_HOST=redis -e CACHE_ENABLED=true \ + "$IMAGE" >/dev/null + + if ! wait_readiness 200; then + echo " candidate did not become ready" >&2 + exit 1 + fi + + echo " instance-id: $(docker inspect -f '{{.Config.Hostname}}' "$CANDIDATE"), readiness while its database is reachable: 200" + + slot=$(wait_new_up_slot "$baseline_slots" || true) + if [ -z "$slot" ]; then + echo " candidate did not appear UP in the load balancer" >&2 + exit 1 + fi + + echo " load balancer slot for the candidate: $slot, stats: $(stats)" + echo + echo "## 3. cut the candidate's database access (stop only the TCP proxy)" + docker stop "$PROXY" >/dev/null + + if ! wait_readiness 503; then + echo " candidate readiness did not become 503" >&2 + exit 1 + fi + + echo " candidate is still running: $(docker inspect -f '{{.State.Status}}' "$CANDIDATE"), readiness: 503" + echo " waiting for the load balancer to mark $slot DOWN" + + if wait_slot_status "$slot" DOWN; then + echo " $slot went DOWN ${SWAIT_SECONDS}s after its database was cut (check: inter 2s fall 2)" + else + echo " WARNING: $slot is still not DOWN" >&2 + fi + + echo " stats after failure: $(stats)" + echo + echo "## 4. ${REQUESTS} requests through LB while the candidate is not ready" + instances + echo " (the candidate must not appear above)" + echo + echo "## 5. business writes through LB during the exclusion" + # shellcheck disable=SC2086 + $NO_PROXY_ENV python3 tests/load.py --base-url "$BASE_URL" --duration 5 --concurrency 2 \ + | grep -E '"successful_rps"|"failed_requests"|"error_ratio"' + echo + echo "## 6. cleanup" + cleanup + sleep 5 + echo " stats after cleanup: $(stats)" +} > "$OUT" 2>&1 + +cat "$OUT" +printf 'lb_readiness_check.sh: evidence in %s\n' "$OUT" diff --git a/scripts/path_overhead_check.sh b/scripts/path_overhead_check.sh new file mode 100755 index 00000000..a9538c4f --- /dev/null +++ b/scripts/path_overhead_check.sh @@ -0,0 +1,68 @@ +#!/bin/sh +# Контроль пути «хост -> Colima VM -> LB»: тот же генератор и тот же профиль +# запускаются дважды — с хоста через опубликованный порт и изнутри VM, где +# клиент говорит с балансировщиком напрямую по docker-сети. Разница показывает +# вклад этого пути в потолок closed-loop профиля, а не приписывает его по +# догадке. Стенд должен быть поднят (`make up`). +# +# scripts/path_overhead_check.sh +# +# Артефакт: evidence/path-overhead/{inside,outside}.txt + summary.txt +set -eu + +ROOT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) +cd "$ROOT_DIR" + +COMPOSE_BIN=${COMPOSE_BIN:-docker compose} +OUT=${OUT:-evidence/path-overhead} +DURATION=${DURATION:-60} +CONCURRENCY=${CONCURRENCY:-8} +WARMUP=${WARMUP:-15} +CLIENT_IMAGE=${CLIENT_IMAGE:-python:3.12-alpine} + +compose() { + # shellcheck disable=SC2086 + $COMPOSE_BIN --env-file .env -f compose.yaml "$@" +} + +NO_PROXY_ENV="env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy" +NO_PROXY_ENV="$NO_PROXY_ENV NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1" + +mkdir -p "$OUT" + +network=$(docker inspect "$(compose ps -q api | head -1)" \ + --format '{{range $name, $network := .NetworkSettings.Networks}}{{$name}}{{end}}') + +printf '# Контроль пути к балансировщику\n' > "$OUT/summary.txt" +{ + printf '# generated: %s\n' "$(date -u +%Y-%m-%dT%H:%M:%SZ)" + printf '# profile: tests/load.py duration=%s concurrency=%s warmup=%s\n' "$DURATION" "$CONCURRENCY" "$WARMUP" + printf '# docker network: %s\n' "$network" + printf '# клиент в VM: %s\n\n' "$CLIENT_IMAGE" +} >> "$OUT/summary.txt" + +# Клиент с хоста: путь «хост -> проброс порта -> VM -> LB». +printf '=== извне: клиент на хосте, http://127.0.0.1:8080 ===\n' | tee -a "$OUT/summary.txt" +# shellcheck disable=SC2086 +$NO_PROXY_ENV python3 tests/load.py --base-url http://127.0.0.1:8080 \ + --duration "$WARMUP" --concurrency "$CONCURRENCY" >/dev/null +# shellcheck disable=SC2086 +$NO_PROXY_ENV python3 tests/load.py --base-url http://127.0.0.1:8080 \ + --duration "$DURATION" --concurrency "$CONCURRENCY" \ + --output "$OUT/load-outside.json" | tee "$OUT/outside.txt" | tail -12 + +# Клиент внутри VM: тот же генератор и профиль, но без проброса порта и без +# сетевого стека хоста. Генератор делит 2 vCPU VM со стендом, поэтому его +# результат — нижняя оценка, а не потолок. +printf '\n=== изнутри: клиент в VM, http://lb ===\n' | tee -a "$OUT/summary.txt" +docker run --rm -i --network "$network" -v "$ROOT_DIR:/repo:ro" -v "$ROOT_DIR/$OUT:/out" \ + -e NO_PROXY='lb,localhost,127.0.0.1' -e no_proxy='lb,localhost,127.0.0.1' \ + "$CLIENT_IMAGE" python /repo/tests/load.py --base-url http://lb \ + --duration "$WARMUP" --concurrency "$CONCURRENCY" >/dev/null +docker run --rm -i --network "$network" -v "$ROOT_DIR:/repo:ro" -v "$ROOT_DIR/$OUT:/out" \ + -e NO_PROXY='lb,localhost,127.0.0.1' -e no_proxy='lb,localhost,127.0.0.1' \ + "$CLIENT_IMAGE" python /repo/tests/load.py --base-url http://lb \ + --duration "$DURATION" --concurrency "$CONCURRENCY" \ + --output /out/load-inside.json | tee "$OUT/inside.txt" | tail -12 + +printf 'path_overhead_check.sh: артефакты в %s\n' "$OUT" diff --git a/scripts/restart.sh b/scripts/restart.sh old mode 100644 new mode 100755 index 3b511d3e..c8ce6dc6 --- a/scripts/restart.sh +++ b/scripts/restart.sh @@ -1,11 +1,58 @@ #!/bin/sh set -eu - +# Restart hook: bounce API replicas and every state store of the lab3 stand. +# +# scripts/restart.sh +# +# Persistent volumes are kept: no `down -v`, no flush, no re-seed. The one-shot +# `migrate` service is not re-run (schema stays as it is, data and sessions +# survive). The script exits 0 only after /health/ready answers through the LB. +# No credentials are printed. ROOT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) -COMPOSE_BIN=${COMPOSE_BIN:-docker-compose} - cd "$ROOT_DIR" -"$COMPOSE_BIN" -f docker-compose.local.yaml restart postgres redis -"$COMPOSE_BIN" -f docker-compose.local.yaml up -d --wait postgres redis -"$COMPOSE_BIN" -f docker-compose.local.yaml up -d --force-recreate api +# .env определяет, на каком порту публикуется LB (compose.yaml) и какие креды у +# хранилищ, поэтому значения берём оттуда же, а не из окружения вызывающего. +if [ -f .env ]; then + set -a + # shellcheck disable=SC1091 + . ./.env + set +a +fi + +COMPOSE_BIN=${COMPOSE_BIN:-docker compose} +PORT=${SERVER_PORT:-8080} + +# shellcheck disable=SC2086 +compose() { + # shellcheck disable=SC2086 + $COMPOSE_BIN --env-file .env -f compose.yaml "$@" +} + +# 1. State stores: restart the running ones, then make sure they are healthy. +# Volumes are attached as before, nothing is dropped or re-seeded. +compose up -d --wait postgres redis +compose restart postgres redis +compose up -d --wait postgres redis + +# 2. API replicas: restart in place (same containers, same addresses) and bring +# back any replica that was stopped by the fault-injection hook. +compose restart api +compose up -d --wait --no-deps api + +# 3. Load balancer keeps its upstream; re-resolve in case addresses changed. +compose restart lb + +# 4. Wait for readiness through the public entry point. +attempt=0 +while [ "$attempt" -lt 60 ]; do + if curl -fsS --noproxy '*' -o /dev/null "http://127.0.0.1:${PORT}/health/ready"; then + printf 'restart.sh: stack restarted, http://127.0.0.1:%s/health/ready is ready\n' "$PORT" + exit 0 + fi + attempt=$((attempt + 1)) + sleep 1 +done + +printf 'restart.sh: /health/ready did not become ready through the LB\n' >&2 +exit 1 diff --git a/scripts/rolling_update.sh b/scripts/rolling_update.sh new file mode 100755 index 00000000..6d664a83 --- /dev/null +++ b/scripts/rolling_update.sh @@ -0,0 +1,231 @@ +#!/bin/sh +# Rolling update of the API replicas under load (lab3, level 4). +# +# Замена идёт «наплывом» и строго по одной реплике: сначала рядом поднимается +# контейнер новой ревизии с тем же сетевым alias, затем снимается ОДИН старый. +# Каждый шаг гейтится состоянием балансировщика: новый слот должен стать UP +# (активная проверка /health/ready), снятый — перестать быть UP. Гейт по +# статистике LB, а не по наблюдению X-Instance-Id в ответах, потому что HAProxy +# переиспользует keepalive-соединения к уже работающим репликам и свежая реплика +# может какое-то время не получать трафик, оставаясь при этом готовой. +# +# В конце стенд возвращается под управление compose: поднимаются штатные реплики +# из новой ревизии, затем по одной снимаются временные контейнеры наплыва. +# +# scripts/rolling_update.sh # профиль лимитов берётся из .env/compose.yaml +# DURATION=60 CONCURRENCY=8 scripts/rolling_update.sh +set -eu + +ROOT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) +cd "$ROOT_DIR" + +COMPOSE_BIN=${COMPOSE_BIN:-docker compose} +PYTHON=${PYTHON:-python3} +DURATION=${DURATION:-60} +CONCURRENCY=${CONCURRENCY:-8} +BASE_URL=${BASE_URL:-http://localhost:8080} +OUT=${OUT:-evidence/rolling-update} +IMAGE=${IMAGE:-mtusi-messenger:lab3} +PROJECT=${COMPOSE_PROJECT_NAME:-mtusi-messenger-lab3} +NET=${PROJECT}_default +STATS=${STATS:-http://127.0.0.1:8404/stats;csv} +PREFIX=lb-rollout + +NO_PROXY_ENV="env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy" +NO_PROXY_ENV="$NO_PROXY_ENV NO_PROXY=localhost,127.0.0.1,::1 no_proxy=localhost,127.0.0.1,::1" + +mkdir -p "$OUT" +rm -f "$OUT/load.json" "$OUT/load.txt" + +compose() { + # shellcheck disable=SC2086 + $COMPOSE_BIN --env-file .env -f compose.yaml "$@" +} + +api_containers() { + docker ps -q \ + --filter "label=com.docker.compose.project=$PROJECT" \ + --filter 'label=com.docker.compose.service=api' +} + +rollout_containers() { + docker ps -q --filter "name=^$PREFIX" +} + +restarts() { + for container in $(api_containers) $(rollout_containers); do + printf '%s=%s ' "$(docker inspect --format '{{.Name}}' "$container" | sed 's|^/||')" \ + "$(docker inspect --format '{{.RestartCount}}' "$container")" + done +} + +stats_rows() { + curl -s --noproxy '*' "$STATS" +} + +# В CSV-выгрузке HAProxy колонка addr приходит пустой, поэтому привязка слота к +# конкретному контейнеру идёт по двум наблюдаемым фактам: контейнер отвечает на +# /health/ready, а число UP-слотов соответствует ожидаемому. +container_ready() { + docker exec "$1" wget -qO- -T 3 http://127.0.0.1:8080/health/ready 2>/dev/null | grep -q '"status":"ok"' +} + +wait_container_ready() { + name=$1 + attempt=0 + + while [ "$attempt" -lt 45 ]; do + container_ready "$name" && return 0 + attempt=$((attempt + 1)) + sleep 1 + done + + return 1 +} + +up_slots() { + stats_rows | awk -F, ' + NR == 1 { for (i = 1; i <= NF; i++) if ($i == "status") s = i; next } + $1 ~ /^api/ && $s == "UP" { count++ } END { print count + 0 }' +} + +wait_up_slots() { + want=$1 + attempt=0 + + while [ "$attempt" -lt 45 ]; do + [ "$(up_slots)" -ge "$want" ] && return 0 + attempt=$((attempt + 1)) + sleep 1 + done + + return 1 +} + +lb_5xx() { + stats_rows | awk -F, ' + NR == 1 { for (i = 1; i <= NF; i++) if ($i == "hrsp_5xx") column = i; next } + $1 == "http_front" && $2 == "FRONTEND" && column { print $column; exit }' +} + +{ + echo "# Rolling update under load (surge, one replica at a time)" + echo "# generated: $(date -u +%Y-%m-%dT%H:%M:%SZ)" + echo "# load: tolerant loader, duration=${DURATION}s concurrency=${CONCURRENCY}" + echo "# проверки готовности LB: httpchk /health/ready, inter 2s fall 2 rise 2, timeout check 1s" + echo + + # Сборка пишет много строк; в артефакт они не нужны. + compose build api >/dev/null 2>&1 || compose build api + + before_containers=$(api_containers) + replicas=$(printf '%s\n' "$before_containers" | wc -l | tr -d ' ') + [ "$replicas" -ge 2 ] || { echo "нужно не менее двух API-реплик" >&2; exit 1; } + + old_image=$(docker inspect --format '{{.Image}}' "$(printf '%s\n' "$before_containers" | head -1)") + new_image=$(docker image inspect --format '{{.Id}}' "$IMAGE") + echo "реплик до обновления: ${replicas}" + echo "образ старых реплик: ${old_image}" + echo "образ новой ревизии: ${new_image}" + echo "ревизия меняется: $([ "$old_image" = "$new_image" ] && echo 'нет (образ не изменился)' || echo 'да')" + echo "слотов UP до: $(up_slots); restarts до: $(restarts)" + echo + + envfile=$(mktemp) + trap 'rm -f "$envfile"; docker rm -f $(rollout_containers) >/dev/null 2>&1 || true' EXIT INT TERM + docker inspect --format '{{range .Config.Env}}{{println .}}{{end}}' \ + "$(printf '%s\n' "$before_containers" | head -1)" > "$envfile" + + # Перед измерением убеждаемся, что все ожидаемые реплики видит сам LB: после + # экспериментов с отказом хранилищ слоты могут быть в переходном состоянии. + if ! wait_up_slots "$replicas"; then + echo "перед обновлением LB видит меньше ${replicas} реплик" >&2 + exit 1 + fi + + five_before=$(lb_5xx) + # shellcheck disable=SC2086 + $NO_PROXY_ENV $PYTHON student-tests/rolling_update_load.py --base-url "$BASE_URL" \ + --duration "$DURATION" --concurrency "$CONCURRENCY" \ + --output "$OUT/load.json" > "$OUT/load.txt" 2>&1 & + load_pid=$! + + step=0 + for container in $before_containers; do + step=$((step + 1)) + name="$PREFIX-$step" + old_instance=$(docker inspect --format '{{.Config.Hostname}}' "$container") + started=$(date -u +%Y-%m-%dT%H:%M:%SZ) + + # 1. поднять реплику новой ревизии рядом со старыми; дождаться, что она + # сама готова и что LB видит на один слот больше + docker run -d --name "$name" --network "$NET" --network-alias api-replica \ + --env-file "$envfile" "$IMAGE" >/dev/null + new_instance=$(docker inspect --format '{{.Config.Hostname}}' "$name") + new_container_image=$(docker inspect --format '{{.Image}}' "$name") + + if ! wait_container_ready "$name"; then + echo " step ${step}: реплика ${name} не стала готова" >&2 + echo " diagnostics: status=$(docker inspect --format '{{.State.Status}}' "$name" 2>&1); stats: $(stats_rows | awk -F, '$1 ~ /^api/ { printf "%s=%s ", $2, $18 }')" >&2 + docker logs --tail 20 "$name" >&2 2>&1 || true + + exit 1 + fi + + if ! wait_up_slots "$((replicas + step))"; then + echo " step ${step}: UP-слотов меньше ожидаемого ($(up_slots) вместо $((replicas + step)))" >&2 + exit 1 + fi + + # 2. снять одну старую реплику и дождаться, что UP-слотов снова ровно + # столько, сколько реплик должно остаться + docker rm -f "$container" >/dev/null + + if ! wait_up_slots "$((replicas + step - 1))"; then + echo " step ${step}: после снятия UP-слотов больше ожидаемого" >&2 + exit 1 + fi + + printf ' step %s: %s обслуживает (образ %s, instance %s), старый контейнер %s (%s) снят; UP-слотов %s; 5xx накоплено %s; старт шага %s\n' \ + "$step" "$name" "${new_container_image#sha256:}" "$new_instance" \ + "${container:0:12}" "$old_instance" "$(up_slots)" "$(lb_5xx)" "$started" + done + + wait "$load_pid" || true + + five_after=$(lb_5xx) + echo + echo "load summary (tolerant generator):" + cat "$OUT/load.txt" + echo + echo "5xx от LB за время обновления (hrsp_5xx frontend): $((${five_after:-0} - ${five_before:-0}))" + echo "restarts после: $(restarts)" + + # 3. вернуть стенд под управление compose и убрать временные контейнеры + echo + echo "возврат стенда под управление compose:" + compose up -d --no-deps api + wait_up_slots "$replicas" || true + + remaining=$(printf '%s\n' $(rollout_containers) | wc -l | tr -d ' ') + for container in $(rollout_containers); do + docker rm -f "$container" >/dev/null + remaining=$((remaining - 1)) + + if ! wait_up_slots "$((replicas + remaining))"; then + echo " после снятия ${container} UP-слотов больше ожидаемого" >&2 + exit 1 + fi + done + + echo "снято временных контейнеров наплыва: проверено" + + echo "UP-слотов после: $(up_slots); restarts в конце: $(restarts)" + echo "API containers после обновления:" + docker ps --format '{{.Names}} {{.Status}}' \ + --filter "label=com.docker.compose.project=$PROJECT" \ + --filter 'label=com.docker.compose.service=api' +} > "$OUT/rolling-update.txt" 2>&1 + +cat "$OUT/rolling-update.txt" +printf 'rolling_update.sh: evidence in %s\n' "$OUT" diff --git a/scripts/stop-one.sh b/scripts/stop-one.sh new file mode 100755 index 00000000..3d7ff430 --- /dev/null +++ b/scripts/stop-one.sh @@ -0,0 +1,72 @@ +#!/bin/sh +set -eu +# Fault-injection hook: stop exactly ONE api replica of the lab3 stand. +# +# TARGET_INSTANCE_ID= scripts/stop-one.sh +# +# The task value is the instance alias the API reports in X-Instance-Id, i.e. +# the container hostname (docker's default = short container id). Container +# names of the api service are matched too. The container is only stopped +# (docker stop); databases, the load balancer and volumes are left untouched, +# and the replica stays down until it is started again explicitly, e.g. +# docker compose --env-file .env up -d --no-deps api +# No credentials are printed. +: "${TARGET_INSTANCE_ID:?test provides target API instance alias}" + +PROJECT=${COMPOSE_PROJECT_NAME:-mtusi-messenger-lab3} + +candidates=$(docker ps -q \ + --filter "label=com.docker.compose.project=${PROJECT}" \ + --filter "label=com.docker.compose.service=api") + +if [ -z "$candidates" ]; then + printf 'stop-one.sh: no api containers of project %s are running\n' "$PROJECT" >&2 + exit 1 +fi + +# Matches the requested alias against every reasonable identifier of a replica: +# container hostname (= X-Instance-Id), full/short container id, full container +# name (mtusi-messenger-lab3-api-1) and the service-local suffix (api-1). +match_replica() { + target=$1 + full_id=$2 + short_id=$3 + name=$4 + hostname=$5 + suffix=${name#${PROJECT}-} + + [ "$target" = "$hostname" ] && return 0 + [ "$target" = "$full_id" ] && return 0 + [ "$target" = "$short_id" ] && return 0 + [ "$target" = "$name" ] && return 0 + [ "$target" = "$suffix" ] && return 0 + return 1 +} + +matched="" +matched_names="" +for id in $candidates; do + info=$(docker inspect --format '{{.Id}} {{.Name}} {{.Config.Hostname}}' "$id") + full_id=$(printf '%s' "$info" | cut -d' ' -f1) + name=$(printf '%s' "$info" | cut -d' ' -f2 | sed 's|^/||') + hostname=$(printf '%s' "$info" | cut -d' ' -f3) + short_id=$(printf '%s' "$full_id" | cut -c1-12) + + if match_replica "$TARGET_INSTANCE_ID" "$full_id" "$short_id" "$name" "$hostname"; then + matched="$matched $id" + matched_names="$matched_names $name" + fi +done + +if [ -z "$matched" ]; then + printf 'stop-one.sh: no api replica matches TARGET_INSTANCE_ID=%s\n' "$TARGET_INSTANCE_ID" >&2 + exit 1 +fi + +# Shut down cleanly (SIGTERM) but never hang the caller for long. +for id in $matched; do + docker stop --time 5 "$id" >/dev/null +done + +printf 'stop-one.sh: stopped api replica(s):%s\n' "$matched_names" +exit 0 diff --git a/scripts/track1_benchmark.py b/scripts/track1_benchmark.py deleted file mode 100644 index 8d602979..00000000 --- a/scripts/track1_benchmark.py +++ /dev/null @@ -1,267 +0,0 @@ -import argparse -import concurrent.futures -import json -import os -from pathlib import Path -import signal -import socket -import subprocess -import tempfile -import threading -import time -import urllib.error -import urllib.request -import uuid - - -ROOT = Path(__file__).resolve().parents[1] -FAST_PATH = """\tif len(history) == 0 || compareKeyset( -\t\thistory[len(history)-1].CreatedAt, -\t\thistory[len(history)-1].ID, -\t\tmessage.CreatedAt, -\t\tmessage.ID, -\t) < 0 { -\t\ts.messagesByChat[message.ChatID] = append(history, message) - -\t\treturn message, nil -\t} - -""" - - -def request(opener, base, method, path, body=None, user=None): - data = json.dumps(body, ensure_ascii=False).encode() if body is not None else None - headers = {} - if data is not None: - headers["Content-Type"] = "application/json" - if user is not None: - headers["X-User-Id"] = user - req = urllib.request.Request(base + path, data=data, headers=headers, method=method) - with opener.open(req, timeout=10) as response: - return json.loads(response.read()) - - -def available_port(): - with socket.socket() as listener: - listener.bind(("127.0.0.1", 0)) - return listener.getsockname()[1] - - -def descendants(root_pid): - result = subprocess.run( - ["ps", "-axo", "pid=,ppid=,rss=,command="], - capture_output=True, - text=True, - check=True, - ) - entries = [] - for line in result.stdout.splitlines(): - fields = line.strip().split(None, 3) - if len(fields) == 4: - try: - entries.append((int(fields[0]), int(fields[1]), int(fields[2]), fields[3])) - except ValueError: - continue - children = {root_pid} - while True: - discovered = children | {pid for pid, ppid, _, _ in entries if ppid in children} - if discovered == children: - break - children = discovered - return [entry for entry in entries if entry[0] in children and entry[0] != root_pid] - - -def server_rss_kib(go_run_pid): - servers = [rss for _, _, rss, command in descendants(go_run_pid) if command.rstrip().endswith("/messenger")] - if not servers: - raise RuntimeError("go run server process was not found") - return max(servers) - - -def wait_ready(process, opener, base): - deadline = time.monotonic() + 60 - while time.monotonic() < deadline: - if process.poll() is not None: - raise RuntimeError(f"go run exited with code {process.returncode}") - try: - request(opener, base, "GET", "/health/live") - server_rss_kib(process.pid) - return - except (OSError, RuntimeError): - time.sleep(0.1) - raise RuntimeError("go run server did not become ready") - - -def percentile(latencies, fraction): - ordered = sorted(latencies) - index = max(0, min(len(ordered) - 1, (len(ordered) * int(fraction * 100) + 99) // 100 - 1)) - return round(ordered[index] * 1000, 3) - - -def setup(opener, base, history): - users = [] - for _ in range(10): - user = request(opener, base, "POST", "/api/v1/users", { - "username": "b" + uuid.uuid4().hex[:20], - "display_name": "Benchmark", - }) - users.append(user) - - chat = request(opener, base, "POST", "/api/v1/chats", { - "title": "Benchmark", - "member_ids": [user["id"] for user in users], - }, users[0]["id"]) - - for index in range(history): - request(opener, base, "POST", f"/api/v1/chats/{chat['id']}/messages", { - "text": f"history-{index}", - }, users[index % len(users)]["id"]) - - return chat, users - - -def launch(mode, port, overlay): - command = ["go", "run"] - if mode == "baseline": - command.extend(["-overlay", str(overlay)]) - command.append("./cmd/messenger") - process = subprocess.Popen( - command, - cwd=ROOT, - env={**os.environ, "APP_HOST": "127.0.0.1", "APP_PORT": str(port)}, - stdout=subprocess.DEVNULL, - stderr=subprocess.PIPE, - start_new_session=True, - ) - return process, command - - -def run_case(mode, history, concurrency, requests, overlay): - port = available_port() - base = f"http://127.0.0.1:{port}" - opener = urllib.request.build_opener(urllib.request.ProxyHandler({})) - process, command = launch(mode, port, overlay) - try: - wait_ready(process, opener, base) - chat, users = setup(opener, base, history) - rss = [] - stop_sampling = threading.Event() - sampling_errors = [] - - def sample(): - while not stop_sampling.is_set(): - try: - rss.append(server_rss_kib(process.pid)) - except RuntimeError as exc: - sampling_errors.append(str(exc)) - stop_sampling.wait(0.1) - - sampler = threading.Thread(target=sample) - sampler.start() - warmup = min(100, max(10, requests // 100)) - - for index in range(warmup): - request(opener, base, "POST", f"/api/v1/chats/{chat['id']}/messages", { - "text": f"warmup-{index}", - }, users[index % len(users)]["id"]) - - started = time.monotonic() - - def worker(worker_id): - latencies = [] - failures = 0 - worker_requests = requests // concurrency + (1 if worker_id < requests % concurrency else 0) - for index in range(worker_requests): - request_started = time.perf_counter() - try: - request(opener, base, "POST", f"/api/v1/chats/{chat['id']}/messages", { - "text": f"load-{worker_id}-{index}", - }, users[worker_id % len(users)]["id"]) - latencies.append(time.perf_counter() - request_started) - except (OSError, ValueError, urllib.error.HTTPError): - failures += 1 - index += 1 - return latencies, failures - - try: - with concurrent.futures.ThreadPoolExecutor(max_workers=concurrency) as pool: - results = list(pool.map(worker, range(concurrency))) - finally: - elapsed = time.monotonic() - started - stop_sampling.set() - sampler.join() - - latencies = [value for values, _ in results for value in values] - failures = sum(value for _, value in results) - if not latencies or not rss or sampling_errors: - raise RuntimeError(f"invalid sample: successes={len(latencies)} rss={len(rss)} errors={sampling_errors}") - - return { - "history": history, - "concurrency": concurrency, - "duration_seconds": round(elapsed, 3), - "requested_requests": requests, - "warmup_requests": warmup, - "successful_requests": len(latencies), - "failed_requests": failures, - "rps": round(len(latencies) / elapsed, 3), - "p50_ms": percentile(latencies, 0.50), - "p95_ms": percentile(latencies, 0.95), - "p99_ms": percentile(latencies, 0.99), - "rss_min_kib": min(rss), - "rss_max_kib": max(rss), - "rss_delta_kib": max(rss) - min(rss), - }, command - finally: - os.killpg(process.pid, signal.SIGTERM) - try: - process.wait(timeout=10) - except subprocess.TimeoutExpired: - os.killpg(process.pid, signal.SIGKILL) - process.wait() - - -def baseline_overlay(directory): - source = (ROOT / "internal/storage/memory/message_repository.go").resolve() - content = source.read_text() - if content.count(FAST_PATH) != 1: - raise RuntimeError("expected exactly one optimized append block") - replacement = directory / "message_repository_baseline.go" - replacement.write_text(content.replace(FAST_PATH, "", 1)) - overlay = directory / "overlay.json" - overlay.write_text(json.dumps({"Replace": {str(source): str(replacement)}})) - return overlay - - -def main(): - parser = argparse.ArgumentParser() - parser.add_argument("--mode", choices=("baseline", "optimized"), required=True) - parser.add_argument("--requests", type=int, default=10000) - parser.add_argument("--output", type=Path, required=True) - args = parser.parse_args() - if args.requests <= 0: - parser.error("--requests must be positive") - - with tempfile.TemporaryDirectory(prefix="messenger-track1-") as temp_dir: - overlay = baseline_overlay(Path(temp_dir)) - rows = [] - for history in (1000, 10000, 50000): - for concurrency in (1, 4, 16, 32): - row, command = run_case(args.mode, history, concurrency, args.requests, overlay) - rows.append(row) - print(json.dumps(row, ensure_ascii=False), flush=True) - result = { - "mode": args.mode, - "command": command, - "go_version": subprocess.check_output(["go", "version"], text=True).strip(), - "os_arch": subprocess.check_output(["go", "env", "GOOS", "GOARCH"], text=True).split(), - "requests_per_case": args.requests, - "rss_source": "ps RSS of go run child executable, KiB; sampled every 100 ms", - "rows": rows, - } - args.output.parent.mkdir(parents=True, exist_ok=True) - args.output.write_text(json.dumps(result, ensure_ascii=False, indent=2) + "\n") - - -if __name__ == "__main__": - main() diff --git a/scripts/track1_controls.sh b/scripts/track1_controls.sh new file mode 100755 index 00000000..829bfd50 --- /dev/null +++ b/scripts/track1_controls.sh @@ -0,0 +1,48 @@ +#!/bin/sh +# Контроль бюджетов БД и балансировщика, перемежённый с эталоном. +# +# По ходу серии пропускная способность дрейфует: таблица сообщений растёт +# (~95 тыс. строк на профиль), а вместе с ней и стоимость записи. Поэтому +# сравнивать профиль с бюджетом БД 1.00 CPU с эталоном, снятым четверть часа +# назад, нельзя — разница бюджетов утонет в дрейфе. Здесь эталон (2 реплики, +# PostgreSQL 0.50 CPU, LB 0.25 CPU) повторяется дважды, а каждая контролируемая +# ручка меняется ровно в одном профиле рядом с эталоном: +# +# ctl1base -> ctl2pg (БД 1.00) -> ctl3base -> ctl4lb (LB 1.00) +# +# Пара ctl1base/ctl3base даёт масштаб дрейфа за два профиля. +# +# scripts/track1_controls.sh +# rm evidence/track1/{load,stats,profile}-ctl*.{json,csv} # перемерить +set -eu + +ROOT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) +cd "$ROOT_DIR" + +SCALING=scripts/track1_scaling.sh +OUT=${OUT:-evidence/track1} +export OUT + +export CLIENT=${CLIENT:-vm} +export TOTAL_CPU=1.0 TOTAL_MEM_MB=768 DURATION=60 CONCURRENCY=8 WARMUP=15 +export POSTGRES_CPU_LIMIT=0.50 POSTGRES_MEM_LIMIT=384M POSTGRES_MAX_CONNS=10 LB_CPU_LIMIT=0.25 + +run() { + label=$1 + shift + + if [ -f "$OUT/profile-$label.json" ] && [ -f "$OUT/load-$label.json" ]; then + printf 'track1_controls.sh: профиль %s пропущен — артефакты уже есть\n' "$label" + + return 0 + fi + + LABEL="$label" env "$@" "$SCALING" +} + +run ctl1base REPLICAS=2 +run ctl2pg REPLICAS=2 POSTGRES_CPU_LIMIT=1.00 +run ctl3base REPLICAS=2 +run ctl4lb REPLICAS=2 LB_CPU_LIMIT=1.00 + +printf 'track1_controls.sh: готово, сводка — python3 scripts/track1_report.py\n' diff --git a/scripts/track1_report.py b/scripts/track1_report.py new file mode 100755 index 00000000..867f2e12 --- /dev/null +++ b/scripts/track1_report.py @@ -0,0 +1,209 @@ +#!/usr/bin/env python3 +"""Сводка трека 1: артефакты `evidence/track1/*` -> таблица и графики. + +Читает `load-