Some checks failed
ci / build (push) Failing after 1m6s
Completes FLUID-WP-0002. The record types in internal/contract are generated from schemas/ by a dependency-free generator; fixtures transcribed from the spec's worked examples validate against those schemas and round-trip through the generated types with DisallowUnknownFields, so a spec change that misses the schemas fails CI rather than drifting silently. Adds identifier prefix helpers, Makefile, GitHub Actions, and five ADRs recording the Go choice, out-of-process attachment, the wire contract as boundary, the evidence store, and revision identity. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014KmVxhJ35tCo7rE7UnLwWu Assistant: claude-code Assistant-Model: opus Assistant-Process: 1116572@bnt-lap001 Assistant-Session: 8ba9bb93-a72a-4883-b189-2499cce5c400
46 lines
1.6 KiB
Markdown
46 lines
1.6 KiB
Markdown
# ADR-0001 — Go as the implementation language
|
||
|
||
**Status:** accepted · **Date:** 2026-09-04
|
||
|
||
## Context
|
||
|
||
fluid-core had no implementation. Three stacks were credible: Go, TypeScript
|
||
and Python. The specification (`ArchitectureBlueprint.md` §42–43) points at a
|
||
long-running gateway, a router, an append-only store and, later, a Kubernetes
|
||
controller with custom resources.
|
||
|
||
Python is the obvious first reach — pydantic maps almost literally onto the
|
||
record schemas, and it matches existing tooling in sibling repositories.
|
||
TypeScript is attractive because the first consumers are platform SDKs with
|
||
strong TypeScript clients.
|
||
|
||
## Decision
|
||
|
||
fluid-core is written in Go.
|
||
|
||
## Rationale
|
||
|
||
The always-on component is infrastructure: proxy, router, registry, evidence
|
||
store. That is Go's centre of mass. A single static binary is also the most
|
||
credible form of "drop this in front of any API" — the promise ADR-0002 makes.
|
||
|
||
Blueprint §43 maps 1:1 onto controller-runtime, so the Kubernetes path stays
|
||
open at no extra cost.
|
||
|
||
Go is the lowest-entropy of the three to debug, which matters under a per-task
|
||
budget policy.
|
||
|
||
## What we gave up
|
||
|
||
Record modeling is more verbose in Go than in Python. This is paid once, behind
|
||
generated types (ADR-0003), rather than continuously.
|
||
|
||
The generative Daimon (Blueprint Phase D) would be easier in Python. ADR-0002
|
||
makes that a non-issue: the Daimon is a separate process speaking the wire
|
||
contract, so it may be written in whatever suits it.
|
||
|
||
## Consequences
|
||
|
||
- No third-party Go modules are used where the standard library suffices; the
|
||
build stays offline-capable.
|
||
- Python remains a build-time dependency for schema validation only.
|