โ† All docs  ยท  Home

ADR 0018 โ€” feedback-server conformance hardening

Context

M3 shipped the feedback server with a happy-path container, an all-or-nothing batch POST, and a Freedback-annotation JWT export profile. Issue #28 asks for three pieces of hardening. This ADR records the decisions.

Decision

1. Container conformance (W3C WAP / LDP)

crates/feedback-server/src/collection.rs now emits the full RFC 8288 / WAP ยง3.3.3 navigation set on every collection read:

A dedicated suite (tests/conformance.rs) exercises all of the above plus the edge cases (empty / out-of-range page).

2. Batch POST partial-failure โ€” persist-valid-items

The POST body shape selects the semantics:

Rationale for persist-valid-items over report-only: the protocol is a bulk, batch-oriented ingest (INVARIANT 7); making a client re-submit an entire bulk upload because one row tripped a bound would defeat the point. Idempotency by dedup id (INVARIANT, unchanged) makes a selective client retry of just the failed rows safe.

3. Full Mangrove review-schema mapping

ADR 0010 delivered a Freedback JWT (payload = our annotation). protocol-lib now also maps the Mangrove review schema itself, in a pure-Rust, dual-target module mangrove.rs (to_mangrove_jwt / from_mangrove_jwt, exposed via the server as PUT /submit/mangrove/{jwt}, capability mangrove-review):

Mangrove claim Freedback
iss JWS kid โ†’ creator (stable urn:freedback:key: issuer id)
iat (unix s) created (RFC 3339 UTC)
sub target
rating (int 0..=100) freedback:ScalarRating on [0,100] (ratings rescaled both ways; thumb up/down โ‡’ 100/0)
opinion oa:TextualBody / oa:commenting
images carried on the body / used for tag: markers
metadata.creator_type, metadata.conformsTo, โ€ฆ preserved under metadata

A Mangrove review must carry at least one of rating / opinion (mirroring Mangrove's own check); value bounds remain SHACL's job on the resulting annotation (INVARIANT 3). The signature path is unchanged ES256 JWS, so a Mangrove server verifies an emitted token normally.

Consequences / limitations