fluid-core/workplans/FLUID-WP-0003-deterministic-data-plane.md
tegwick 61d8d8cabe Add the OpenAPI contract validator, closing FLUID-WP-0003
The gateway can now enforce a revision's declared contract, which makes
"a deterministic API contract" -- the first minimal-conformance
requirement -- something the framework actually checks rather than
assumes.

The JSON Schema support is a documented subset. Keywords outside it are
reported as unsupported rather than skipped, because a validator that
silently ignores a constraint it does not understand is worse than none:
it reports success it did not earn. The same reasoning refuses remote
$refs, which would make request-path validation depend on a network
fetch, and refuses to serve a revision whose contract is not registered.

String lengths are counted in runes. A 4096-character limit that
rejected a 3000-character hall entry because of its accents would be
wrong in exactly the case this framework was built to publish.

Literal routes are matched before templated ones, so /entries/latest is
not swallowed by /entries/{id} -- which matters, since a latest-entry
convenience route is the Blueprint's own worked example.

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
2026-09-04 08:14:19 +02:00

146 lines
3.5 KiB
Markdown

---
id: FLUID-WP-0003
type: workplan
title: "Deterministic data plane (Blueprint Phase A)"
domain: infotech
repo: fluid-core
status: done
owner: worsch
topic_slug: fluid-core
created: "2026-09-04"
updated: "2026-09-04"
planning_priority: high
planning_order: 2
depends_on:
- FLUID-WP-0002
state_hub_workstream_id: "d9ce8eae-cd6f-5c43-a20b-eee8cc89b172"
---
# FLUID-WP-0003 - Deterministic data plane
The production request path. No AI, no analysis, no dependency on the control
plane. Blueprint §5 and §34: the gateway must keep serving when everything
above it is dead.
## T01 - Edge gateway
```task
id: FLUID-WP-0003-T01
status: done
priority: high
state_hub_task_id: "0dac6ab6-f3e4-5234-bb3c-2393558d8590"
```
Transport termination, correlation IDs, coarse rate limiting, request size and
shape limits. Blueprint §5.1 — the gateway must not invent interface semantics.
## T02 - Revision resolver
```task
id: FLUID-WP-0003-T02
status: done
priority: high
state_hub_task_id: "6d8333ac-1bad-59a4-943d-b83819c8127a"
```
The §5.2 precedence chain: explicit revision, bound client contract, experiment
assignment, stable default. Every resolution records its reason; resolution
without an auditable reason is a defect.
## T03 - Revision router
```task
id: FLUID-WP-0003-T03
status: done
priority: high
state_hub_task_id: "1f042c4f-9e3f-50fa-985c-e4f2ebb3b38a"
```
Map a resolved revision to an adapter upstream. Reject unpublished, failed,
ineligible and retired revisions (§5.3). Allocation rules are deterministic and
read from routing policy the router does not author.
## T04 - Contract validator
```task
id: FLUID-WP-0003-T04
status: done
priority: high
state_hub_task_id: "70bae578-d3e3-5a00-b5cd-4c363bc5b473"
```
OpenAPI 3.1 request and response validation (§5.4). The contract digest is part
of the revision artifact and is content-addressed.
## T05 - Backend connector layer
```task
id: FLUID-WP-0003-T05
status: done
priority: high
state_hub_task_id: "0d62a681-3154-50af-894a-98b35db7b040"
```
Timeout, retry, circuit breaker, error mapping, tenant propagation (§5.6). The
adapter is an upstream process reached over HTTP — this is where the
language-agnostic promise is kept.
## T06 - Response policy
```task
id: FLUID-WP-0003-T06
status: done
priority: medium
state_hub_task_id: "cc3c2a03-b24c-51de-b695-8aa9bfae85ab"
```
Structured errors carrying a FLUID correlation reference, leaking no backend
detail (§5.7).
## T07 - Telemetry emitter
```task
id: FLUID-WP-0003-T07
status: done
priority: high
state_hub_task_id: "e10a5011-cb7e-5f1c-9a0d-0cfd2d535d13"
```
Fire-and-forget emission. Blueprint §34.2 is a hard invariant: telemetry
backpressure must never block or slow a request. Test it under a stalled sink.
## T08 - Evidence store
```task
id: FLUID-WP-0003-T08
status: done
priority: high
state_hub_task_id: "1773c7bf-9400-576e-9e74-aa210f08e0c4"
```
Append-only event storage, SQLite for development and Postgres-ready. Mutable
summaries exist only as derived views (§26).
## T09 - Intent store
```task
id: FLUID-WP-0003-T09
status: done
priority: high
state_hub_task_id: "23d70a60-14bf-525e-a712-1d3a14111f62"
```
Bind every revision to an `InterfaceEvolutionIntent` version (§27), so audit can
later answer whether a change was valid under the intent that existed when it
was made.
## T10 - Operator CLI, first commands
```task
id: FLUID-WP-0003-T10
status: done
priority: medium
state_hub_task_id: "ad7d83d7-a088-5ea4-94e7-fa5be49897b9"
```
`fluid revision create|publish|list`, `fluid intent show`, `fluid events tail`.