Changelog
All notable changes to this project are documented here. Format follows Keep a Changelog, and this project follows Semantic Versioning.
Unreleased
1.4.1 - 2026-10-01
Added
fgoths upgradeaccepts projects created with v1.4.0. The runtime itself is unchanged in this release.
Changed
- The
ci-cdrelease workflow builds Linux (amd64, arm64) by default from a singlePLATFORMSlist (Windows targets get.exe) and publishesSHA256SUMSnext to the binaries and SBOM. - The generated GitLab pipeline uses one Go image (
GO_VERSION, matchinggo.mod) for every job. - Generated project and contributor docs point to official install guides instead of OS-specific commands.
Fixed
ci-cdpipelines built./cmd/app, which generated projects do not have, and skipped code generation; they now runassetmanifest(andtemplfor webapp) and build the root package.
1.4.0 - 2026-10-01
Added
fgoths generate crudnow produces a complete resource: list, create, get, update, and delete by id, with a separate input type, a 1 MB body limit, unknown-field rejection, 400/404 responses, and generic 500 errors.fgoths build --sbomwrites a CycloneDX 1.5 SBOM read from the binary's embedded build info: only the modules actually linked, with versions, checksums, replacements, and the Go toolchain. Output is reproducible underSOURCE_DATE_EPOCH.fgoths upgradeaccepts projects created with v1.3.0 and now managespkg/runtime/router.go, so existing projects receive the new dispatch.make benchmark-surface(benchmarks/run-dep-surface.sh) generates projects and measures the modules linked into their binaries next to chi, gin, and go-zero. The full benchmark and comparison scripts reuse it.
Changed
- Documentation reorganized for humans: the README is now a short product
overview that leads with real code and a real upgrade transcript, with new task-focused guides in
docs/(getting started, CLI reference, upgrading, performance). Deep technical material stays inARCHITECTURE.md,COMPARISON.md, and the ADRs. fgoths init --helpnow lists every supported--dbvalue (none|sqlite|postgres|mysql).- Product positioning rewritten around what sets FGOTHS apart: an owned yet upgradable runtime, a minimal supply chain, sidecar-free resilience, built-in governance, and hot reload without Node.
- Dependency-surface figures now measure what ships: a default generated API project links 1 external module (vs gin 18, go-zero 44). The previous "5 packages" figure measured the whole framework runtime package instead.
- Parameterized route dispatch no longer allocates in the router: the
matched pattern is recorded in
Request.PatternandPathValueis resolved lazily, falling back to the standard library. In-process median: 401 ns / 1024 B / 10 allocs (was 471 ns / 1440 B / 13 allocs), on par with the stdlib mux and ahead of chi and go-zero. Static routes stay the fastest of the group at 338 ns.
Fixed
- Generated CRUD handlers no longer accept client-supplied
idorcreated_atvalues.fgoths upgradedoes not rewrite CRUD code you already generated; regenerate a resource or port the input-type pattern by hand. - The SBOM previously listed
go.modrequirements without versions; it now lists linked modules with exact versions. fgoths versionreported0.0.0-devwhen installed withgo install …@vX.Y.Z; it now reports the module version.- Removed a race in the
fgoths devsignal-forwarding test that could intermittently abort theinternal/clitest binary under load.
1.3.0 - 2026-10-01
Added
fgoths upgradeplans and applies versioned embedded-runtime updates in existing generated projects, records project version/configuration, backs up changed files, and three-way merges non-overlapping local edits while preserving originals on conflicts. It keeps upgrade artifacts out of Git without hiding the project metadata. Supported sources are v1.1.0 and v1.2.0; generated projects now record.fgoths/upgrade.jsonso future upgrades no longer need--from.
1.2.0 - 2026-10-01
Fixed
- Generated applications now register routes through the FGOTHS runtime router
instead of replacing
http.Server.Handlerwith a separateServeMux. - Generated projects now create deterministic static asset manifests. MVC projects use fingerprints for immutable production caching, disable browser caching in development, and broadcast reloads after CSS, JS, or HTML changes.
runtime.Servernow providesPut,Patch, andDeletedelegates, and generated CRUD route registries accept the runtime registrar interface.
Added
- Runtime contract coverage for middleware registration order; generator tests now assert the actual flat and MVC entrypoint locations.
- Repository-wide short-mode statement coverage now reaches 100%, enforced by
make cover, with focused tests for uncovered CLI, generator, and runtime paths.
Documentation
- Clarified the generated CRUD endpoint scope, runtime/template synchronization boundary, representative generated-project test matrix, and local coverage commands. Corrected references to CI workflows that are no longer committed.
- Positioned FGOTHS as an organization-specific internal service platform and clarified that the framework comparisons are engineering references, not claims of universal superiority or security guarantees.
1.1.0 - 2026-09-27
Second release: runtime performance pass, server lifecycle hardening, and living examples generated by the framework itself.
Performance
Metrics.Recordcontention eliminated (pkg/runtime/metrics.go). Scalar counters (totalRequests,totalErrors,totalLatency) moved from the global mutex toatomic.Int64, shrinking the mutex's critical section to the maps and the error ring. UnderBenchmarkMetricsRecordParallel(4 routes, contended): ~27 µs/op → ~210 ns/op, 6 → 0 allocs/op. Serial throughput unchanged (~46 ns/op).- Router dispatch: fewer context allocations (
pkg/runtime/router.go).ServeHTTPpreviously issued tworeq.WithContext(context.WithValue(...))per request (one for path params, one for the route pattern) — 4 allocations. Both values now travel in a singlerouteInfocontext value (2 allocations), and static exact-match routes skip the context injection entirely (0 allocations). Measured withbenchmarks/comparison(in-process dispatch, 3 runs): param routes 16 → 13 allocs/op (~520 → ~495 ns/op), static routes 13 → 10 allocs/op (~390 → ~355 ns/op) — static dispatch now matches or beats stdlibhttp.ServeMuxand gin on both time and allocations. RouteHistogram.Recordis now O(1) amortized (pkg/runtime/metrics.go). Percentile computation (full copy +sort.Slice, O(n log n) per request) moved fromRecordtoSnapshotbehind apercentilesDirtyflag — servers withWithMetricsno longer pay a sort per request; percentiles are recomputed only when observed. Snapshot values are unchanged.statusRecorderrecycled viasync.Pool(pkg/runtime/metrics.go). The per-request response wrapper used byWithMetrics,WithLogger, andWithAlertThresholdis now pooled instead of allocated per request; wrappers are released after the request completes.
Changed
- Runtime split into focused files.
pkg/runtime/server.go(1.673 lines) was decomposed: the router moved torouter.go, the reverse proxy toproxy.go, and request-ID middleware torequestid.go. The embedded templates were split accordingly (router.go.tpl,proxy.go.tpl,requestid.go.tpl) andsync-templatesnow tracks all six base runtime files, keeping the verbatim-copy guarantee (ADR 0002) per file. Server.WithListeneradded (pkg/runtime): injects a pre-creatednet.Listenerconsumed by the nextListenAndServe— enables socket activation, systemd handoff, and sandbox-safe tests without binding a port.- Control plane shutdown refactored (
internal/cli): signal handling extracted intoserveControlPlaneUntilSignalwith a stubbablesignalStopChanindirection, mirroring the existingosExit/osReadFiletest-indirection pattern (os helpers are now package-level vars). RunControlPlanenow returns afterosExit(1)paths (defensive; keeps coverage instrumentation accurate).
Added
- Examples regenerated with the framework itself:
examples/api-demo(flat API preset with metrics + OpenAPI) andexamples/webapp-demo(MVC preset with Templ + HTMX + SQLite) replace the hand-writtenexamples/proxy-demo, serving as living proof of both presets (ADR 0003). - CI workflows: nightly benchmark runs and tag-triggered release builds
with version metadata via
make print-ldflagswere added in this release and later removed from the repository (the maintainer runs CI externally); theci-cdfeature templates for generated projects are unaffected. - ADRs: 0002 (selected runtime sources embedded verbatim with drift checks) and 0003 (exactly two architecture presets).
- Tests:
internal/clicoverage raised to 87.1% (target ≥85%) with new CRUD error-path tests,cmd/fgothsmain tests, and an in-process control-plane graceful-shutdown test (TestRunControlPlaneShutdownOnSignal) that uses an in-memorynet.Pipelistener and a synthetic signal channel — no subprocess, no real socket bind, race-detector clean. - Server lifecycle tests (
pkg/runtime):WithListener(injection, single-consumption, nil guards),ListenAndServeerror paths (uninitialized server, bind failure surfacing), theFGOTHS_READY_FILEdev-watcher handshake,OnShutdown/WithShutdownTimeout/WithReusePortnil guards, and thestatusRecorderpool round-trip.pkg/runtimecoverage rose to 90.8% (from 89.8%). - Request-ID fallback test: forced
crypto/randfailure path via arandReadindirection, plus TLS/URL-scheme branches ofschemeFromRequestand upstream registry edge cases (ResolveRouteTargetnil/unknown/no-healthy-upstream,NewProxyerror). - Toolchain-path tests (
internal/cli/generate.go):ensureToolsuccess branch (templ resolvable from a stubbed PATH) and therunGenerateOnceerror branches (realgo installfallback under an isolated HOME/GOPATH) —ensureTool50% → 100%,internal/cli86.5% → 87.1%. TheTestRunGenerateOnceErrorPathsscratch lives outsidet.TempDir()because Go's read-only modcache breaksRemoveAllcleanup; a chmod-before-remove cleanup handles it. - Contention benchmark:
BenchmarkMetricsRecordParallel/Serial(pkg/runtime/metrics_bench_test.go) lock in the Record-contention regression guard for future runtime changes.
Removed
- Dead
nestedRuntimeSyncDirs/nestedRuntimeFilesmachinery insync-templates(no nested modules remain to keep in lockstep) and its orphaned test file. - Orphaned
audit.gotemplate (base/pkg/runtime/audit.go.tpl): it was never wired into the generator orsync-templates, and referencedContextClaims/ContextTenantthat only exist in thejwt-authfeature — the copy shipped inexamples/api-demodid not even compile. The audit middleware remains available inpkg/runtime(AuditLogger) for direct consumers; a future feature-scoped template can reintroduce it properly.
1.0.0 - 2026-09-22
First versioned release. The generator, both project layouts (flat, mvc),
and the embedded runtime have representative end-to-end validation and
reproducible benchmarks. The generated-project test matrix is not exhaustive.
Generator
- Two presets:
api(flat JSON API) andwebapp(MVC SSR + Templ + HTMX), each opt-in to a database (sqlite,postgres,mysql) and a feature set - Opt-in features:
health,metrics,openapi,grpc,flatbuffers,htmx,jwt-auth,mtls,otel,ci-cd - Atomic generation: files are written to a staging directory and only renamed into place after every template renders successfully
- Template drift guard (
TestRuntimeTemplatesInSync,make check-templates): managed source/template pairs for selected runtime files are verified byte-identical to the framework's testedpkg/runtimesources
Runtime (pkg/runtime)
- Native HTTP router with path parameters, middleware chain, mount/prefix stripping, and path rewrite
- Reverse proxy with connection pooling, retry, circuit breaker, rate limiting, and health-checked failover
- TLS and mutual TLS with client identity routing (CN/SAN/SPIFFE)
- JWT policy middleware (roles, scopes, claims) that fails closed without a configured secret
- Request correlation IDs, structured logging, OpenTelemetry tracing
- Readiness/liveness probes and error-rate alerting
Governance & control plane
- Declarative route/upstream registry with per-environment policies
- Deployment ledger and release workflows with multi-approver gates, terminal rollback/reject states
- Policy versioning with actor/reason audit trail and rollback-as-new-version
- Progressive delivery: canary weighting, staged rollout, error-threshold rollback
- REST API (
/api/v1/...) with bearer-token auth that fails closed; file or SQLite (build tagsqlite) persistence
Known limitations
- Control plane persistence is single-process.
FileDeploymentStoreand the SQLite backend are both single-machine stores: there is no distributed lock, so running more than one control plane process against the same store is unsafe (last write wins, silent data loss). Do not run it as a horizontally-scaled or multi-replica service without adding your own coordination in front of it. - No remote/clustered backend (etcd, Postgres with row locking, etc.) is
built in yet. Planned direction: a Postgres-backed
DeploymentStoreusing transactions/row locking for safe multi-process writes — reuses a database the framework already supports instead of adding a new external dependency (etcd/Consul). Not started; only relevant if the control plane is run as a shared, multi-replica service rather than per-project viafgoths init. - Multi-tenancy quotas exist but are not validated under real multi-tenant production load.