docs(review): record deferred If-Match 412-semantics refinement (#265) as an acceptable-defer
Build ErsatzTV Image / Docs update reminder (pull_request) Successful in 6s
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 5m27s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 9m34s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped
Build ErsatzTV Image / Docs update reminder (pull_request) Successful in 6s
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 5m27s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 9m34s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped
Codex re-review of the fix commit confirmed both prior findings resolved and raised one new Medium: RFC 7232 would 412 (not 400) a syntactically-valid but non-matching If-Match (non-canonical "03", weak W/"3", tag lists, empty, overflow). Deferred to #197 (cold contract pass) as #265 — fail-safe today (the mutation is rejected, never applied) and no first-party client is affected. Records the deferral where the #253 fan-out will copy the parser: a code comment in ConcurrencyHeaders + a note in api-conventions §7a. Refs #253 #265 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -63,6 +63,12 @@ public static class ConcurrencyHeaders
|
||||
}
|
||||
}
|
||||
|
||||
// Everything else (a valid-but-non-canonical strong tag like "03", a weak tag W/"3", an
|
||||
// entity-tag list, or plain garbage) is treated as Malformed → 400. Strictly, RFC 7232 would
|
||||
// 412 a syntactically-valid tag that merely doesn't strong-match; that refinement (plus
|
||||
// weak-tag comparison, list support, and 412-vs-404 ordering) is deferred to the #197 cold
|
||||
// contract pass — see #265. This is fail-safe (the mutation is rejected, never applied) and the
|
||||
// first-party SPA only ever echoes the single canonical tag we emit.
|
||||
return new IfMatchCondition(IfMatchKind.Malformed, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -274,8 +274,9 @@ existing `DateUpdated` — a plain `int` is portable across SQLite/MySQL and dec
|
||||
emits a strong `ETag: "3"` of `Version`; the PUT sends it back as `If-Match: "3"`. Mismatch → **412
|
||||
Precondition Failed** (distinct from the §3a **409** "build in progress" lock guard). A successful PUT
|
||||
returns the **new** ETag (post-increment) so a same-tab second save doesn't 412 against its own write.
|
||||
`If-Match: *` and (Phase 1) a missing header force-write; a malformed header → 400. Parse/emit with
|
||||
`ErsatzTV.Extensions.ConcurrencyHeaders` (`ParseIfMatch` → `IfMatchCondition.ExpectedVersion : Option<int>`,
|
||||
`If-Match: *` and (Phase 1) a missing header force-write; a non-canonical/weak/list/malformed header
|
||||
→ 400 (fail-safe; the stricter RFC 7232 "valid-but-non-matching tag → 412" refinement is deferred to
|
||||
#197 — see #265). Parse/emit with `ErsatzTV.Extensions.ConcurrencyHeaders` (`ParseIfMatch` → `IfMatchCondition.ExpectedVersion : Option<int>`,
|
||||
`SetETag`). The items GET returns *children*, so the controller reads `root.Version` separately for the
|
||||
header (here `BlockViewModel` carries `Version`, projected but **not** echoed in the response body —
|
||||
header-only).
|
||||
|
||||
Reference in New Issue
Block a user