Repository navigation
Releases
v0.8.1
Changed
- The rate limiter logs a warning, once per process, when requests carry
X-Forwarded-ForwhileAUTH_TRUST_FORWARDED_FORisfalse. 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, setAUTH_TRUST_FORWARDED_FOR=true. - New SQLite projects require
modernc.org/sqlitev1.62.0.
v0.8.0
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 ofRATE_LIMIT_WINDOW(one minute). Over a limit the answer is 429 withRetry-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.0turns a count off, andAUTH_TRUST_FORWARDED_FORapplies 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 inmain.gogets them by callingUseRateLimitson 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 ofthe access token is invalid or expired; the status andWWW-Authenticatedo not change. openapi.jsondocuments 429 on every operation except the health probes.
v0.7.2
Fixed
- The PostgreSQL health checks of the generated
docker-compose.ymland CI workflows usepg_isready -h 127.0.0.1. Without-hthe check goes through the socket, which also answers while the init server of thepostgresimage runs, before the port opens, so migrations could start early and stop withconnection refused; a slow script in/docker-entrypoint-initdb.dmade it happen every time.docker-compose.ymlis regenerated on the next build. Workflows are yours: in an existing one, add-h 127.0.0.1to--health-cmdyourself.
v0.7.1
Fixed
- A project with no route to wire, such as
codebuild build --starterbefore the first spec or one whose entities are allnoroutes, no longer fails to compile withdeclared and not used: idemininternal/app/routes_gen.go.
Security
- New projects and workspaces on PostgreSQL require
github.com/jackc/pgx/v5v5.12.0, which bringsgolang.org/x/textv0.41.0. The previous pin brought v0.29.0, affected by GO-2026-6629 and GO-2026-5970, sogovulncheckfailed in the CI of a new project.go.modis yours and codebuild does not raise its requirements: in an existing project rungo get github.com/jackc/pgx/v5@v5.12.0andgo mod tidy. - New workspaces require
google.golang.org/grpcv1.85.0 and new SQLite projectsmodernc.org/sqlitev1.61.1. - The tool moves to
golang.org/x/sysv0.44.0 (GO-2026-5024, Windows only, not called by the tool). - CI runs
govulncheckon the tool and on a generated project and workspace of every dialect, on every push and once a week.
v0.7.0
Added
PATCH /<table>/{id}changes some members of a resource with a JSON merge patch (RFC 7396), sent asapplication/merge-patch+jsonorapplication/json: members that are present replace the stored values,nullclears a pointer member, and absent members keep their values. It goes through the same validation, ownership, roles and serviceUpdateasPUT. In workspaces the gateway forwards it to a newPatchRPC, which carries the update message and the names of the members to change. CORS now allowsPATCH, and the OpenAPI description documents it.decimal=<precision>:<scale>onstringfields stores exact decimal numbers, such as money, asNUMERICon PostgreSQL,DECIMALon 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=andmax=become numeric bounds, and values are stored with exactlyscaledecimals.codebuild.jsongains ageneratesection withkubernetes,observabilityandci, all on by default, to leave those files out of a project;codebuild build --starter --minimalcreates a project with the three off. Turning a part off makes its generated files stale for--prune.- With the
cipart, a.github/dependabot.ymlkeeps the actions of the generated workflows and the Go modules up to date.
Changed
- Generated workflows pin
actions/checkoutandactions/setup-goto 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
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 upstarts it, anddocker-compose.ymlnow setsMETRICS_ADDRandOTEL_EXPORTER_OTLP_ENDPOINTon every module. Monoliths and workspaces getdeploy/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
rolefield, 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 inOPS_ROLES(adminby 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.gois yours, so addownerIDas the second parameter of each of their methods and pass it tos.repo;codebuild plannow warns about every service method whose parameters no longer match what the generated code calls and prints the expected signature.
Security
- Entities without an
ownerfield that reference an owned entity through a requiredbelongs_toin 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 bepublic.
v0.5.0
Added
-
Idempotency-Keyon creates: a client that repeats aPOSTwith 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 withIdempotent-Replayed: trueinstead 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 newidempotency_keystable 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_DELAYand 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_BYTESraises the 4 MiB limit for large pages. -
auth.WatchPrivateKeyandauth.WatchPublicKeysreread the internal token keys every 30 seconds, so key rotations no longer need restarts. Newmain.gofiles use them; in an existing workspace replaceauth.LoadPrivateKeyplusauth.NewSigneringateway/cmd/gateway/main.go, andauth.LoadPublicKeysplusauth.NewVerifierin eachcmd/server/main.go. -
HTTP_REQUEST_TIMEOUT(12 seconds by default, shorter thanHTTP_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 whosemain.gopredates it get the same 12-second default fromauth.Anonymous. -
tls_certificate_expiry_timestamp_secondsandtls_reload_errors_totalon/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
GOMEMLIMITbelow 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,0waits 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_TIMEOUTleft, 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 withGetorList. - Backend answers the gateway cannot map: a bare
ResourceExhausted, such as a message over the size limit, is 502 instead of 429, andUnimplemented, 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. offsetaccepts 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 planwarns about it.codebuild.contracts.jsonrecords 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.goof new services runs the whole shutdown withinSHUTDOWN_TIMEOUTafterSHUTDOWN_DELAY, and new gateways and services set their logger as the defaultsloglogger.
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.protofiles 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-passwordandaccounts revokenow 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=memorythe 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=databasecleans 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 anAUTH_LOGIN_WINDOWabove 24 hours at startup instead of answering 400 to every login, and the account service checks the window before converting it.
v0.4.0
Added
AUTH_LIMIT_STORE=databasekeeps the login, registration and password change rate limiter in a newauth_rate_limitstable, 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 newAuthService.HitRateLimitandResetRateLimitcalls. The default staysmemory.- Kubernetes manifests: every build writes a kustomize base in
deploy/kubernetes/basefor the monolith or for every service and the gateway of a workspace (Deployments with startup, liveness and readiness probes on/livezand/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 indeploy/kubernetes/overlays/productionfor images, namespace and patches. The base files carry the generated header, socodebuild planreports 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,AuthenticateandMewhen 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_FAILURESandGRPC_BREAKER_COOLDOWNconfigure them, and/metricsexports retries and breaker state per backend. - Services and the gateway reload
TLS_CA_FILE,TLS_CERT_FILEandTLS_KEY_FILEevery 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 manualLoad testworkflow) measures throughput, latency percentiles and errors of the generated API on PostgreSQL;docs/production.mdrecords 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=truemakes a monolith check every JWT access token against the database on every route, so logout and revocation take effect immediately everywhere. The default staysfalse.- OpenAPI 3.1: every build writes
openapi.jsonat 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 atGET /openapi.json. A test checks that every served route is documented and the reverse. The file opens with anx-codebuildmember that marks it as generated. - Cursor pagination: every list response carries
nextCursor, and?cursor=returns the rows after it without aCOUNT(*), 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 gaincursorandnext_cursorfields; 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.Tracedwraps your own*sql.DBor*sql.Txthe same way.
Changed
- Microservice workspaces are no longer experimental;
docs/microservices.mdaddresses or justifies each of their limits. - In workspaces
grpcx.Dialtakes aCallPolicy(grpcx.LoadCallPolicyreads it from the environment) andgrpcx.TLSConfigmust come fromgrpcx.LoadTLSConfig. The generatedinternal/appcode already does both;main.gofiles written by earlier versions keep compiling. - Lists are backed by indexes in their order:
lx_<table>on the creation time and the primary key, andlx_<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.Limitertakes a scope and aLimitStoreand itsAllowandResettake a context;NewAuthHandlertakes the store. Both live in generated files, so this only matters to code of yours that used the limiter directly.Page.Totalis an*int64, nil on cursor pages, andPagehas aNextCursor *string;ListParamshas aCursor *Cursor. Code of yours that readsTotalneeds a dereference. In workspace contractstotalis nowoptional.- Generated SQLite projects use
modernc.org/sqlitev1.61.0.
Fixed
naming.Snakeand 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/passwordalso deletes every API key of the account, likeaccounts set-passwordandaccounts revokealready 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
Added
SECURITY.mdwith 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.txtis signed keyless with cosign (Sigstore bundlechecksums.txt.sigstore.json), and every archive gets a GitHub build provenance attestation.SECURITY.mdexplains 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.modandgo.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 whenOTEL_EXPORTER_OTLP_ENDPOINTis set, W3Ctraceparentpropagation through HTTP and gRPC, andtrace_idandspan_idin log lines. Seedocs/observability.md. - Configurable CORS through
CORS_ALLOWED_ORIGINS,CORS_ALLOW_CREDENTIALSandCORS_MAX_AGE, answered before routing and authentication. codebuild planwarns when a user-ownedmain.godoes not start telemetry yet, since codebuild never rewrites it.
Changed
codebuild mcpis built withgithub.com/modelcontextprotocol/go-sdkv1.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+jsontype) on request bodies and answer 415 otherwise. Clients that post JSON without that header, such ascurl -dorfetchwith 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.NewVerifiertakes any number of public keys andauth.LoadPublicKeysreads every key of a PEM file; new servicemain.gofiles use them so the internal token key can rotate without downtime. Existingmain.gofiles keep compiling withLoadPublicKey.
Security
These fixes come from an internal review of the generated authentication code; it was not an independent audit.
- JWT: routes restricted by
roles=orwriteroles=, 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_GRACEnow 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/passwordis 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_FORreads the lastX-Forwarded-Forheader line, so a client cannot choose its address behind proxies that add a separate line.- Requiring JSON bodies blocks login CSRF through
text/plainHTML forms. - In workspaces the account service accepts
AuthServicecalls 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 -forceresets the permissions of the key files it rewrites.
v0.2.0
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 markersidentity,passwordandroleand the entity markerregister. 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,rolesandwriterolesopen or restrict operations, and relation routes combine the rules of both entities. - The field marker
ownerscopes 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/passwordand/auth/api-keys, withHttpOnlySameSite=Strictcookies checked byhttp.CrossOriginProtection, an in-memory login rate limiter,WWW-AuthenticateandRetry-Afterheaders, and configuration throughAUTH_*variables.- A user-owned
AuthServicecomposed from generatedAccountsprimitives, scaffolded method by method likeService, and acmd/accountscommand to set roles, reset passwords and revoke credentials. httpx.Errorcarries response headers.docs/authentication.md, thesecureandsecure-jwtgolden projects and their end-to-end HTTP tests; withCODEBUILD_E2E_DOCKER=1the end-to-end test also builds and starts the image of SQLite projects.- Microservice workspaces. A spec may declare a
<Name>Servicestruct whose fields are entities and whosedatabase=own|sharedmarker chooses the database. The project becomes a Go workspace with one module per service exposing gRPC, acontractsmodule, adatabases/sharedmodule for the shared database and agatewaymodule that is the only REST API, with the same routes, bodies and problem details as a monolith. - codebuild writes the
.protofiles, the protobuf Go code and the gRPC stubs itself, withoutprotoc.contracts/codebuild.contracts.jsonkeeps 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.Authenticateand that services forward to each other.gateway/cmd/devcertscreates 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
Existscall 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, aworkspace.ymlworkflow and a workspaceAGENTS.md.codebuild planandcodebuild buildfind the workspace root from any module, maintaingo.workand thego.modof every module, and refuse to convert a monolith into a workspace or back. docs/microservices.md, theshopspecs, 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; withCODEBUILD_E2E_DOCKER=1it also runs the Compose stack.
Changed
app.RegisterRoutesreturns an error and newmain.gofiles check it.codebuild planwarns 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 tidyreads every build tag exceptignore, so//go:build specmade it resolve the imports of the specs: it addedgithub.com/google/uuidback on Go 1.27 and failed on theuuidimport on Go 1.26. Other constraints are now reported with codebuild_tag. - The project root is the directory of the nearest
go.mod; acodebuild.jsonin 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_historynext toschema_migrationsto 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.lockso 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;
generateis annotated as destructive. - Non-nullable
[]bytefields 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')), whichLONGTEXTrequires. - Soft delete honors the foreign keys that point at the entity:
restrictanswers 409 while live rows reference it,setnullclears the references,cascadehides the referencing rows and their cascading children from every query, and rows cannot reference deleted ones. PUTrequires every non-pointer member instead of resetting omitted members to their defaults, so aPUTwithoutroleno longer demotes an admin.- SQL Server inserts and updates use
OUTPUT ... INTOa 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(orGOWORK) 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.