bezeichner

AGENTS.md

This repository contains Bezeichner, a Go service that generates and maps identifiers, exposed via gRPC and HTTP.

HTTP is implemented as an RPC gateway that routes by gRPC full method name.

Shared guidance

Use bin/AGENTS.md for shared skills and cross-repository defaults.

Accepted design

Before recording a finding, audit entry or proposed change, read the accepted-design index and its relevant area files. Apply the recorded scope of each decision. Add owner-accepted design choices, tradeoffs and dependency limitations to the relevant area file as they are agreed.

Repository at a glance

First steps

1) Ensure submodules are present

Most make targets come from the bin/ submodule.

Use make submodule once the shared bin checkout is present; see bin/AGENTS.md for fresh-clone bootstrap details.

2) Install dependencies

make dep

Observed behavior:

Essential commands

Build

make build        # builds ./bezeichner (release binary)
make build-test   # builds ./bezeichner test binary (-tags features, -race, coverage enabled)

Implementation: bin/build/make/_service.mak:191-197.

Test

make specs        # Go test suite (gotestsum + race + coverage)
make features     # end-to-end features under test/ (Ruby + nonnative harness)
make benchmarks   # Ruby benchmark harness
make coverage     # HTML + func coverage reports

Notes:

Lint / format / security

make lint
make fix-lint
make format
make sec

Protobuf (Buf)

make proto-lint
make proto-format
make proto-generate
make proto-breaking
make proto-stale

Buf config is in api/:

Local dev

make dev

This uses air to rebuild/run the server:

See bin/build/make/grpc.mak:51-53.

Environment helpers

make start
make stop

These call scripts under bin/build/docker/env (see bin/build/make/_service.mak:239-245).

Code organization

Entry points / CLI

Dependency injection (DI)

The service uses go-signal/v2 modules:

The v1 module wires transports and the domain service:

API layers

Configuration

A representative config used by dev/feature tests is test/.config/server.yaml.

Notable keys observed:

Notes:

Generators

Generator implementations are in internal/generator/* and are selected by Application.Kind. Standard kinds such as uuid, ksuid, ulid, xid, and nanoid are adapted from github.com/alexfalkowski/go-service/v3/id.

Request size limits (DoS protection)

Limits are enforced in the domain layer:

These surface to clients as InvalidArgument via the gRPC error mapper (internal/api/v1/transport/grpc/error.go:9-14).

Testing

Go specs

make specs runs gotestsum with race and coverage (see bin/build/make/_service.mak:115-118). Outputs land under test/reports/.

Feature tests (Ruby / nonnative)

If the Ruby harness fails loading native gems, refresh dependencies through the repository Make targets before trying ad hoc tool commands.

Style / formatting

CI notes (CircleCI)

The primary CircleCI build-service job runs (see .circleci/config.yml):

The workflow also runs Docker image validation on non-master branches: