Skip to content

Audit fixes: cleanup, license, CI, required tenant_id, load test - #3

Merged
MoFadel26 merged 13 commits into
mainfrom
audit-fixes
Oct 29, 2026
Merged

MoFadel26 merged 13 commits into
mainfrom
audit-fixes

Conversation

@MoFadel26

Copy link
Copy Markdown
Owner

Summary

  • Remove t3code-orchestration.md, DESIGN.md, and the busybox log-forwarder sidecar from deploy/k8s/base/deployment.yaml.
  • Fix the literal \n in two README spots (migrate code block, metrics table).
  • Add MIT LICENSE.
  • Add GitHub Actions CI: go vet, golangci-lint v2.14.0, go test -race against a postgres:16-alpine service, and a linux/amd64,linux/arm64 Docker build (no push).
  • internal/pgtest: when PGTEST_DATABASE_URL is set, tests create and drop their own database on that server instead of starting testcontainers. CI uses this.
  • Fix the 4 errcheck findings so lint passes.
  • GET /v1/logs now returns 400 when tenant_id is missing or blank. The UI falls back to the demo tenant when the field is empty.
  • Add cmd/loadtest and a README "Load test" section with measured results against a 1M-row seeded DB.

Load test (M1 Pro, Postgres 18.6, all on one machine)

  • Highest load with no 503s: 600 req/s x 100 records = about 60k rows/sec persisted, p99 1.27 ms.
  • Overload (50 senders, no rate limit): 84% of requests got 503 with Retry-After, the DB kept writing about 133k rows/sec, /healthz stayed 200, RSS 36-45 MB, and accepted == rows_written with lost = 0 after drain.

Testing

  • go vet ./...: pass
  • golangci-lint run ./...: 0 issues
  • go test -race -count=1 ./...: pass, with testcontainers and with PGTEST_DATABASE_URL
  • docker buildx build --platform linux/amd64,linux/arm64 -f deploy/docker/Dockerfile .: pass
  • actionlint .github/workflows/ci.yml: no errors
  • kubectl kustomize deploy/k8s/overlays/local: renders

@MoFadel26
MoFadel26 merged commit 0908f6b into main Oct 29, 2026
4 checks passed
@MoFadel26
MoFadel26 deleted the audit-fixes branch October 29, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant