Skip to content

Releases

v0.8.1

Choose a tag to compare

@github-actions github-actions released this 08 Nov 19:19

Changed

  • The rate limiter logs a warning, once per process, when requests carry X-Forwarded-For while AUTH_TRUST_FORWARDED_FOR is false. Behind such a proxy every client has the address of the proxy and shares its limits: 600 anonymous requests a minute count for everyone together, and 30 rejected credentials in a minute, from anyone, answer 429 on every protected route until the window ends. If you run 0.8.0 behind a proxy, Ingress or load balancer that is the only way in, set AUTH_TRUST_FORWARDED_FOR=true.
  • New SQLite projects require modernc.org/sqlite v1.62.0.

v0.8.0

Choose a tag to compare

@github-actions github-actions released this 08 Nov 03:24

Added

  • Every route of a monolith or a gateway is rate limited, except the health probes. Anonymous requests count per client address (RATE_LIMIT_CLIENT, 600 per window), requests of a logged-in account per account (RATE_LIMIT_ACCOUNT, 1,200) and rejected credentials per client address (RATE_LIMIT_FAILURES, 30), in windows of RATE_LIMIT_WINDOW (one minute). Over a limit the answer is 429 with Retry-After; once an address is over its rejected credentials, its protected requests get 429 before any lookup. An expired JWT does not count as a rejected credential. The counters live in the memory of each replica, so the limits are per replica; login, registration and password changes keep their own limits on top. 0 turns a count off, and AUTH_TRUST_FORWARDED_FOR applies to every count. See production.md.

Changed

  • Existing projects get the limits on the next build, through the generated routes_gen.go. A domain you wire by hand in main.go gets them by calling UseRateLimits on its handler in a project without accounts; with accounts the guard counts its requests. Raise or turn off the counts for clients that legitimately send more, such as a server calling an API without accounts or a load test.
  • An expired JWT access token gets 401 with the detail the access token has expired, instead of the access token is invalid or expired; the status and WWW-Authenticate do not change.
  • openapi.json documents 429 on every operation except the health probes.

v0.7.2

Choose a tag to compare

@github-actions github-actions released this 01 Nov 16:47

Fixed

  • The PostgreSQL health checks of the generated docker-compose.yml and CI workflows use pg_isready -h 127.0.0.1. Without -h the check goes through the socket, which also answers while the init server of the postgres image runs, before the port opens, so migrations could start early and stop with connection refused; a slow script in /docker-entrypoint-initdb.d made it happen every time. docker-compose.yml is regenerated on the next build. Workflows are yours: in an existing one, add -h 127.0.0.1 to --health-cmd yourself.

v0.7.1

Choose a tag to compare

@github-actions github-actions released this 01 Nov 01:45

Fixed

  • A project with no route to wire, such as codebuild build --starter before the first spec or one whose entities are all noroutes, no longer fails to compile with declared and not used: idem in internal/app/routes_gen.go.

Security

  • New projects and workspaces on PostgreSQL require github.com/jackc/pgx/v5 v5.12.0, which brings golang.org/x/text v0.41.0. The previous pin brought v0.29.0, affected by GO-2026-6629 and GO-2026-5970, so govulncheck failed in the CI of a new project. go.mod is yours and codebuild does not raise its requirements: in an existing project run go get github.com/jackc/pgx/v5@v5.12.0 and go mod tidy.
  • New workspaces require google.golang.org/grpc v1.85.0 and new SQLite projects modernc.org/sqlite v1.61.1.
  • The tool moves to golang.org/x/sys v0.44.0 (GO-2026-5024, Windows only, not called by the tool).
  • CI runs govulncheck on the tool and on a generated project and workspace of every dialect, on every push and once a week.

v0.7.0

Choose a tag to compare

@github-actions github-actions released this 25 Oct 02:25

Added

  • PATCH /<table>/{id} changes some members of a resource with a JSON merge patch (RFC 7396), sent as application/merge-patch+json or application/json: members that are present replace the stored values, null clears a pointer member, and absent members keep their values. It goes through the same validation, ownership, roles and service Update as PUT. In workspaces the gateway forwards it to a new Patch RPC, which carries the update message and the names of the members to change. CORS now allows PATCH, and the OpenAPI description documents it.
  • decimal=<precision>:<scale> on string fields stores exact decimal numbers, such as money, as NUMERIC on PostgreSQL, DECIMAL on MySQL and SQL Server and canonical text on SQLite. JSON and gRPC carry them as strings such as "1999.90"; requests are validated against the precision and scale, min= and max= become numeric bounds, and values are stored with exactly scale decimals.
  • codebuild.json gains a generate section with kubernetes, observability and ci, all on by default, to leave those files out of a project; codebuild build --starter --minimal creates a project with the three off. Turning a part off makes its generated files stale for --prune.
  • With the ci part, a .github/dependabot.yml keeps the actions of the generated workflows and the Go modules up to date.

Changed

  • Generated workflows pin actions/checkout and actions/setup-go to a commit, with the release in a comment, instead of a moving major tag. Existing workflows are yours and keep their references.
  • Generated repository, account, idempotency and rate limiter tests delete every row they create when they finish, children before parents and soft-deleted rows included, so a shared test database stays empty.

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 24 Oct 17:36

Added

  • The observability stack is generated with the code. Workspaces get deploy/observability, with Jaeger 2 (traces, plus span metrics for its Monitor tab read back from Prometheus), Prometheus scraping every module with alert rules, and Grafana provisioned with both data sources and a dashboard of the project; docker compose --profile observability up starts it, and docker-compose.yml now sets METRICS_ADDR and OTEL_EXPORTER_OTLP_ENDPOINT on every module. Monoliths and workspaces get deploy/kubernetes/components/observability, a kustomize component with Jaeger, PodMonitors, a PrometheusRule and the dashboard as a ConfigMap for the Grafana sidecar; the production overlay of new projects includes it.
  • Operations panels behind the login: when the account entity has a role field, the API or the gateway serves a sign-in page at /_ops/ and proxies /_ops/jaeger/, /_ops/grafana/ and /_ops/prometheus/ to the accounts with a role in OPS_ROLES (admin by default). The proxy never forwards the credentials of the project, and Grafana signs the account in through its auth proxy. Without roles there is no such route, and Compose publishes the panels on 127.0.0.1 only.

Changed

  • Requests under /_ops/ are no longer traced.
  • When the trace collector does not answer, the exporter logs once until it answers again, instead of on every batch, and counts the lost spans in telemetry_spans_dropped_total.
  • The production overlay that codebuild creates for new projects includes the observability component, which needs the CRDs of the Prometheus Operator. Existing overlays are yours and stay as they are; add components: [../../components/observability] to adopt it.
  • The repository and service methods of entities scoped through their parent (see Security below) take the owner as an explicit parameter, like owned entities. service.go is yours, so add ownerID as the second parameter of each of their methods and pass it to s.repo; codebuild plan now warns about every service method whose parameters no longer match what the generated code calls and prints the expected signature.

Security

  • Entities without an owner field that reference an owned entity through a required belongs_to in the same database, such as the items of an owned order or invoice, were not scoped on their own routes: any authenticated user could read, change or delete them by their ID, list them all, and attach new ones to another user's parent. They now inherit the owner of their parent, through any number of levels: every query checks that the parent belongs to the caller, other users get 404, and a create or update pointing at another user's parent answers 422. Such entities can no longer be public.

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 24 Oct 03:57

Added

  • Idempotency-Key on creates: a client that repeats a POST with the same key and body within 24 hours, because it lost the answer to a timeout or a dropped connection, gets the first answer back with Idempotent-Replayed: true instead of a second resource. The same key with another body answers 422, and while the first request still runs, 409. Only successful answers are kept, so a client can fix a rejected request and retry with the same key. Answers live in a new idempotency_keys table of every database, which existing projects get through a new migration, scoped by caller and route and cleaned up in the background. In workspaces the gateway forwards the key and each service keeps the answers of its own creates. The OpenAPI description documents the header.

  • gRPC clients in workspaces balance their calls round robin over every address a backend name resolves to, skipping replicas they cannot reach; the generated Kubernetes Services of the services are headless, so that is every ready replica. A replica that shuts down serves through SHUTDOWN_DELAY and then sends its clients away, so rolling updates do not fail calls. Clients ping idle connections every 30 seconds, reconnect within 5 seconds and resolve a backend again at most every 2 seconds instead of 30 when a replica goes away, and servers end connections after five minutes, so clients find new replicas and rotated certificates, with a 30-second grace for running calls. Servers bound concurrent streams, handshakes and message sizes; GRPC_MAX_MESSAGE_BYTES raises the 4 MiB limit for large pages.

  • auth.WatchPrivateKey and auth.WatchPublicKeys reread the internal token keys every 30 seconds, so key rotations no longer need restarts. New main.go files use them; in an existing workspace replace auth.LoadPrivateKey plus auth.NewSigner in gateway/cmd/gateway/main.go, and auth.LoadPublicKeys plus auth.NewVerifier in each cmd/server/main.go.

  • HTTP_REQUEST_TIMEOUT (12 seconds by default, shorter than HTTP_WRITE_TIMEOUT) gives every gateway request one time budget shared by all its backend calls, so a slow request answers 504 instead of losing its connection. Gateways whose main.go predates it get the same 12-second default from auth.Anonymous.

  • tls_certificate_expiry_timestamp_seconds and tls_reload_errors_total on /metrics, and a warning in the log, when the certificate files of a module stop loading and the previous certificate stays in use.

  • The Kubernetes base spreads replicas over nodes and zones, sets GOMEMLIMIT below the memory limit, gives services 50 seconds to shut down and a connection pool of 10 per replica, so the services sharing a database stay under its default connection limit, tolerates 30 seconds of database outage before a service replica leaves its endpoints, and adds a NetworkPolicy that lets only the pods of the workspace reach the gRPC ports of the services.

  • Generated CI workflows check dependencies for known vulnerabilities with govulncheck.

  • MIGRATE_LOCK_TIMEOUT (10 seconds by default, 0 waits forever) bounds how long a migration waits for a table lock on PostgreSQL, MySQL and SQL Server, so a migration that meets a long transaction fails and can be retried instead of queueing every query on that table behind it.

Changed

  • The circuit breaker of a workspace client counts one outcome per call, after its retries, so one failing replica no longer stops the calls to the whole backend; it ignores calls that start with less than a tenth of GRPC_CALL_TIMEOUT left, whose deadline is the caller's, and only its probe can close it again. Only the generated reads are retried, from an explicit list, instead of every method whose name starts with Get or List.
  • Backend answers the gateway cannot map: a bare ResourceExhausted, such as a message over the size limit, is 502 instead of 429, and Unimplemented, which a newer gateway gets from an older service during a rollout, is 503. A failed call from one service to another is 503 or 504 when the other service is unavailable or slow and 500 otherwise, instead of passing its status through. Monoliths and services answer 503 when the database cannot be reached.
  • offset accepts at most 2147483647; larger values wrapped around in workspaces.
  • A contract field whose wire type changes, such as a string that becomes an integer, now gets a new number and its old number is reserved, so clients built before the change ignore it instead of failing to parse every message; codebuild plan warns about it. codebuild.contracts.json records the type of every field from now on.
  • The Kubernetes Services of workspace services are headless (clusterIP: None). Kubernetes cannot change that in place: delete those Services once before applying the new base.
  • main.go of new services runs the whole shutdown within SHUTDOWN_TIMEOUT after SHUTDOWN_DELAY, and new gateways and services set their logger as the default slog logger.

Security

  • Services in a workspace accept calls with side effects only from the gateway, or from modules named in TLS_TRUSTED_CALLERS; other modules may only call the generated reads (Get, List…, Exists), which is all the generated code needs. Streaming methods added in your own .proto files now go through the same authentication, caller check and panic recovery, and clients send them the internal token, request ID and trace context.
  • Failures of the internal plumbing, such as a rejected internal token or a caller that may not call a method, reach users as 500 with a generic message and are logged by the gateway as errors, instead of a 401 that logs browser users out or a 403 without any log.
  • A password change, accounts set-password and accounts revoke now run in one transaction that holds the account row, and API key creation and logins take the same lock: a key requested with a session that the change revokes is refused instead of surviving it, a login whose password was verified just before a change no longer receives a session or refresh token, and a failure no longer leaves the new password in place with the old credentials still valid. A rehash on login only replaces the hash it verified, so it can no longer restore a password changed meanwhile.
  • With the default AUTH_LIMIT_STORE=memory the per-client limiter has its own store again, so a flood of new identities cannot evict the per-client counters that throttle it.
  • AUTH_LIMIT_STORE=database cleans up in the background and in batches of 1,000 rows, so clients that hang up cannot skip the cleanup and it never locks the table for long; under a flood it drops single-attempt counters instead of the counters that block a client. In workspaces the gateway reports limiter errors without gRPC details, rejects an AUTH_LOGIN_WINDOW above 24 hours at startup instead of answering 400 to every login, and the account service checks the window before converting it.

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 23 Oct 23:02

Added

  • AUTH_LIMIT_STORE=database keeps the login, registration and password change rate limiter in a new auth_rate_limits table, so every replica shares the counters and they survive restarts. Keys are hashed, IPv6 clients are counted per /64, expired rows are cleaned up every minute and the table is bounded under floods. Existing projects get the table through a new migration. In workspaces the gateway asks the account service through the new AuthService.HitRateLimit and ResetRateLimit calls. The default stays memory.
  • Kubernetes manifests: every build writes a kustomize base in deploy/kubernetes/base for the monolith or for every service and the gateway of a workspace (Deployments with startup, liveness and readiness probes on /livez and /readyz, resource requests and limits, non-root read-only containers without service account tokens, Services, PodDisruptionBudgets, generated ConfigMaps, migration Jobs, and Secrets referenced by name only), plus a user-owned overlay in deploy/kubernetes/overlays/production for images, namespace and patches. The base files carry the generated header, so codebuild plan reports edits as conflicts and removed services as stale. A workflow deploys a monolith and a workspace to a kind cluster.
  • gRPC clients in workspaces retry Get, List…, Exists, Authenticate and Me when a backend is unavailable, with jittered exponential backoff inside the call deadline, and open a circuit breaker per backend after repeated failures. GRPC_CALL_TIMEOUT, GRPC_RETRY_ATTEMPTS, GRPC_RETRY_BACKOFF, GRPC_BREAKER_FAILURES and GRPC_BREAKER_COOLDOWN configure them, and /metrics exports retries and breaker state per backend.
  • Services and the gateway reload TLS_CA_FILE, TLS_CERT_FILE and TLS_KEY_FILE every 30 seconds, so certificates from your own PKI (for example cert-manager Secrets) rotate without a restart. A broken file keeps the last working certificate.
  • A load test (CODEBUILD_E2E_LOAD=1, and a manual Load test workflow) measures throughput, latency percentiles and errors of the generated API on PostgreSQL; docs/production.md records the results.
  • docs/production.md: TLS and proxies, secrets and key rotation, backups, migrations in deployments, pool sizing, timeouts, CORS, health checks, metrics, traces and alerts, rate limits, Kubernetes and the remaining limits.
  • AUTH_JWT_CONFIRM=true makes a monolith check every JWT access token against the database on every route, so logout and revocation take effect immediately everywhere. The default stays false.
  • OpenAPI 3.1: every build writes openapi.json at the project root, built from the same views as the handlers (routes, request and response bodies with their validation rules, filters, cursor and offset pagination, problem responses, security and roles), and the API, or the gateway in a workspace, serves it at GET /openapi.json. A test checks that every served route is documented and the reverse. The file opens with an x-codebuild member that marks it as generated.
  • Cursor pagination: every list response carries nextCursor, and ?cursor= returns the rows after it without a COUNT(*), using the list order as the key, so it stays fast on large tables and correct while rows are added. Offset pagination works as before. In workspaces the gateway forwards the cursor and the contracts gain cursor and next_cursor fields; existing field numbers do not change.
  • Database spans: with tracing enabled, every query of the generated repositories and account code is a child span of its request, following the OpenTelemetry database conventions, without parameter values. database.Traced wraps your own *sql.DB or *sql.Tx the same way.

Changed

  • Microservice workspaces are no longer experimental; docs/microservices.md addresses or justifies each of their limits.
  • In workspaces grpcx.Dial takes a CallPolicy (grpcx.LoadCallPolicy reads it from the environment) and grpcx.TLSConfig must come from grpcx.LoadTLSConfig. The generated internal/app code already does both; main.go files written by earlier versions keep compiling.
  • Lists are backed by indexes in their order: lx_<table> on the creation time and the primary key, and lx_<table>_<column> on each reference followed by them, so first pages, cursor pages and the lists of one parent or owner read rows in order instead of sorting the table. Cursor queries add a range bound the planner can use. Existing projects get the indexes through a new migration.
  • auth.Limiter takes a scope and a LimitStore and its Allow and Reset take a context; NewAuthHandler takes the store. Both live in generated files, so this only matters to code of yours that used the limiter directly.
  • Page.Total is an *int64, nil on cursor pages, and Page has a NextCursor *string; ListParams has a Cursor *Cursor. Code of yours that reads Total needs a dereference. In workspace contracts total is now optional.
  • Generated SQLite projects use modernc.org/sqlite v1.61.0.

Fixed

  • naming.Snake and the names derived from it no longer change when applied twice to a name with a capital letter that has no lowercase form, such as ϒ. Found by the weekly fuzz run.

Security

  • Changing the password through PUT /auth/password also deletes every API key of the account, like accounts set-password and accounts revoke already did.
  • JWT: logout, accounts revoke, a password change or reuse detection that ran while a refresh of the same family was committing could leave the refresh token issued by that refresh alive on PostgreSQL. Revocation now repeats its delete until no row is left, and a generated test reproduces the race.

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 23 Oct 02:08

Added

  • SECURITY.md with the supported versions and private vulnerability reporting, issue forms and a pull request template.
  • A weekly workflow that fails when a newer version exists of a module written into generated projects (database drivers, gRPC, protobuf, github.com/google/uuid), and Dependabot updates for the modules of the tool and the GitHub Actions.
  • Release archives come with an SPDX SBOM each, checksums.txt is signed keyless with cosign (Sigstore bundle checksums.txt.sigstore.json), and every archive gets a GitHub build provenance attestation. SECURITY.md explains how to verify them; CI builds a snapshot release with SBOMs on every push.
  • Fuzz tests for the spec parser, struct tags, schema snapshots, the contract registry, codebuild.json, go.mod and go.work, naming and the text diff. Generated projects fuzz password hash verification, JWT parsing and, in workspaces, internal token verification. A weekly workflow runs each fuzz target of the tool for three minutes.
  • Optional observability in generated projects, with the standard library only: Prometheus metrics on METRICS_ADDR (HTTP requests by route and status, latency histograms, gRPC calls, database pool and Go runtime), OpenTelemetry traces exported over OTLP/HTTP JSON when OTEL_EXPORTER_OTLP_ENDPOINT is set, W3C traceparent propagation through HTTP and gRPC, and trace_id and span_id in log lines. See docs/observability.md.
  • Configurable CORS through CORS_ALLOWED_ORIGINS, CORS_ALLOW_CREDENTIALS and CORS_MAX_AGE, answered before routing and authentication.
  • codebuild plan warns when a user-owned main.go does not start telemetry yet, since codebuild never rewrites it.

Changed

  • codebuild mcp is built with github.com/modelcontextprotocol/go-sdk v1.8.0.
  • Microservice workspaces are documented as experimental: their layout and generated code may change between minor releases.
  • Generated endpoints require Content-Type: application/json (or another +json type) on request bodies and answer 415 otherwise. Clients that post JSON without that header, such as curl -d or fetch with a string body, must set it.
  • Linking and unlinking a many-to-many pair needs read and update access to both entities from either route, so writeroles= on one side now also restricts the link routes that start from the other side.
  • auth.NewVerifier takes any number of public keys and auth.LoadPublicKeys reads every key of a PEM file; new service main.go files use them so the internal token key can rotate without downtime. Existing main.go files keep compiling with LoadPublicKey.

Security

These fixes come from an internal review of the generated authentication code; it was not an independent audit.

  • JWT: routes restricted by roles= or writeroles=, and API key creation, check the access token against the database, so a token whose session was revoked, whose account was deleted or whose role changed can no longer use them or mint a lasting API key. In workspaces the account service checks every JWT this way.
  • JWT: a refresh token presented again within AUTH_REFRESH_REUSE_GRACE now receives the successor it already produced instead of starting a second token chain, and concurrent rotations of one token can no longer both create successors, so reuse detection catches a stolen token.
  • The login rate limiter hashes its keys and keeps at most 100,000 of them, and over-long identities are rejected before it, so distinct identities cannot exhaust memory. IPv6 clients are limited per /64 network.
  • PUT /auth/password is rate limited per client and per session, so it cannot be used to guess the current password or to burn CPU on password hashing.
  • AUTH_TRUST_FORWARDED_FOR reads the last X-Forwarded-For header line, so a client cannot choose its address behind proxies that add a separate line.
  • Requiring JSON bodies blocks login CSRF through text/plain HTML forms.
  • In workspaces the account service accepts AuthService calls and account writes only from the gateway's client certificate (TLS_GATEWAY_NAME), so a compromised service cannot replay forwarded user tokens to create API keys or accounts.
  • devcerts -force resets the permissions of the key files it rewrites.

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 20 Oct 00:15

Added

  • Authentication generated from the specs with the standard library only. The entity marker auth=session|jwt[|apikey] turns an entity into the account entity, with the field markers identity, password and role and the entity marker register. Sessions are opaque tokens stored as SHA-256 hashes; JWT uses HS256 access tokens with rotating refresh tokens and reuse detection; API keys are hashed and cannot manage other keys. Passwords use PBKDF2-SHA256 with 600,000 iterations and constant-time, timing-equalized verification.
  • Routes are protected by default once a project has an account entity. The entity markers public, roles and writeroles open or restrict operations, and relation routes combine the rules of both entities.
  • The field marker owner scopes every query of an entity to the caller, takes the owner as an explicit repository and service parameter, and rejects references to rows of other owners.
  • POST /auth/register, /auth/login, /auth/refresh, /auth/logout, GET /auth/me, PUT /auth/password and /auth/api-keys, with HttpOnly SameSite=Strict cookies checked by http.CrossOriginProtection, an in-memory login rate limiter, WWW-Authenticate and Retry-After headers, and configuration through AUTH_* variables.
  • A user-owned AuthService composed from generated Accounts primitives, scaffolded method by method like Service, and a cmd/accounts command to set roles, reset passwords and revoke credentials.
  • httpx.Error carries response headers.
  • docs/authentication.md, the secure and secure-jwt golden projects and their end-to-end HTTP tests; with CODEBUILD_E2E_DOCKER=1 the end-to-end test also builds and starts the image of SQLite projects.
  • Microservice workspaces. A spec may declare a <Name>Service struct whose fields are entities and whose database=own|shared marker chooses the database. The project becomes a Go workspace with one module per service exposing gRPC, a contracts module, a databases/shared module for the shared database and a gateway module that is the only REST API, with the same routes, bodies and problem details as a monolith.
  • codebuild writes the .proto files, the protobuf Go code and the gRPC stubs itself, without protoc. contracts/codebuild.contracts.json keeps field numbers stable and reserves the numbers of removed fields.
  • Services only accept mutual TLS and an Ed25519-signed internal token, valid for one minute, that the gateway mints after authenticating the caller through AuthService.Authenticate and that services forward to each other. gateway/cmd/devcerts creates a development CA, certificates and the token key pair.
  • References to an entity in another database have no foreign key and are checked through the gRPC Exists call of the owning service (422 when missing); services sharing a database keep their foreign keys. Each database has its own migrations, snapshot and migrate command.
  • Workspaces get a generated docker-compose.yml (certificates, databases, migrations, services and the gateway with health checks), a Dockerfile per module, a GitHub Actions workflow per module with path filters, a workspace.yml workflow and a workspace AGENTS.md. codebuild plan and codebuild build find the workspace root from any module, maintain go.work and the go.mod of every module, and refuse to convert a monolith into a workspace or back.
  • docs/microservices.md, the shop specs, golden workspaces for every dialect and an end-to-end test that builds every module, runs the services and the gateway and exercises them over HTTP; with CODEBUILD_E2E_DOCKER=1 it also runs the Compose stack.

Changed

  • app.RegisterRoutes returns an error and new main.go files check it. codebuild plan warns when an authenticated project still ignores it.
  • The manual wiring hint uses NewService(db).
  • Golden projects live in testdata/golden/<project>/go1.NN/<dialect>.
  • Spec files start with //go:build ignore. go mod tidy reads every build tag except ignore, so //go:build spec made it resolve the imports of the specs: it added github.com/google/uuid back on Go 1.27 and failed on the uuid import on Go 1.26. Other constraints are now reported with code build_tag.
  • The project root is the directory of the nearest go.mod; a codebuild.json in a parent directory no longer captures builds in a monorepo.
  • Exit code 6 also covers an outdated plan and a concurrent build.

Fixed

  • Migrations that share a version number, which made one of them disappear silently, now fail both the build and the migrator. The snapshot records the migrations it incorporates, so a migration merged from another branch with a number below the newest one fails the build, and the migrator keeps schema_migrations_history next to schema_migrations to refuse older migrations that never ran instead of skipping them forever.
  • Builds write every file to a temporary file before renaming, write the snapshot last, refuse to apply a plan when files changed since it was computed, and hold .codebuild.lock so the CLI and the MCP server never write at the same time. A migration left without its snapshot by an interrupted build is recognized and reused instead of being generated twice.
  • The MCP tools only accept directories inside the directory the server was started in (after resolving symbolic links), and they refuse projects whose root lies above it; generate is annotated as destructive.
  • Non-nullable []byte fields that the client omits are stored as empty values instead of NULL, and not-null violations become HTTP 422 with the field name in every dialect.
  • MySQL string columns without max= use an expression default (DEFAULT ('x')), which LONGTEXT requires.
  • Soft delete honors the foreign keys that point at the entity: restrict answers 409 while live rows reference it, setnull clears the references, cascade hides the referencing rows and their cascading children from every query, and rows cannot reference deleted ones.
  • PUT requires every non-pointer member instead of resetting omitted members to their defaults, so a PUT without role no longer demotes an admin.
  • SQL Server inserts and updates use OUTPUT ... INTO a table variable, so tables with triggers keep working.
  • JWT refresh runs in a transaction, and a refresh token presented again within AUTH_REFRESH_REUSE_GRACE (30 seconds) issues new tokens instead of revoking the session, so two tabs refreshing at once stay logged in.
  • go.work (or GOWORK) counts for the required toolchain and is checked against the module, and the upgrade for projects below Go 1.26 targets the installed toolchain when it is supported.