diff --git a/docs/requirements/api-artifacts.md b/docs/requirements/api-artifacts.md index a73d13d5..8e0a44cb 100644 --- a/docs/requirements/api-artifacts.md +++ b/docs/requirements/api-artifacts.md @@ -208,6 +208,23 @@ binds exactly the URL-accepted branch, and a URL-missed path forwarding anywhere but the continuation is still a scan failure (NF9). +Revision 10 (luna r9 residual NF1): the §7.7(d)(5) AFTER relation +becomes decidable. The witness produces a **pinned lifecycle-order +map** — the totally ordered, citation-backed list of the pinned +adapter version's documented request-lifecycle phases — and the +§7.2 primitive classification records each hook registration's +lifecycle phase as part of the primitive's identity. A raw mount's +dispatch point resolves to the map entry of its recorded hook +phase; an emitting entry resolves through its citation; AFTER is +strict map order. An unresolved dispatch point or emitting entry, +an unresolvable hook phase, and a same-stage pair are each a +FAILURE naming the site — attribution is never assumed for an +unordered pair, and the repair is either restoring resolvability or +a per-(route, entry) probe pair in the body-size pair's style whose +recorded observations decide the attribution; an attribution +carried by neither the map order nor a recorded probe pair is a +phantom. + This contract binds the artifact definitions (§2), the production model (§3), coverage obligations (§4), legacy migration (§5), phase timing (§6), witnesses (§7), and disclosed drafting additions (§8). @@ -645,7 +662,13 @@ scanned source roots, and compared files. a witness failure. Path resolution applies to path-bearing sites; a non-path-bearing site is inventoried as a hook or plugin site with no path witness and is never a route entry by - itself. A hook or plugin callback that routes requests by URL — + itself. Each hook registration's classification records the + adapter lifecycle phase its registration primitive names (the + phase is part of the primitive's identity in the asserted + list); §7.7(d)(5)'s lifecycle-order map resolves raw-mount + dispatch points to lifecycle stages through exactly this + recorded phase, and a hook registration whose phase the + checker cannot resolve is a scan failure naming the site. A hook or plugin callback that routes requests by URL — dispatching on the request path inside the callback, as the raw auth and MCP mounts do — makes the enclosing registration a **raw mount**: it must either appear in the §4.4 delegation @@ -1088,6 +1111,33 @@ handler)`, a computed decorator value) is a scan FAILURE naming and the status attributes to framework-routed routes and to exactly those raw-mounted routes whose §7.2 dispatch point executes AFTER the emitting stage in the adapter's lifecycle. + The AFTER relation is decided against a **pinned + lifecycle-order map**, an explicit witness artifact: the + totally ordered list of the pinned adapter version's documented + request-lifecycle phases — connection handling, + request-line/header processing, each named hook phase the + pinned version documents, body parsing, routing and handler + dispatch, response serialization — each map entry carrying a + citation into the pinned version's lifecycle documentation, + and the map itself failing the witness if any two of its + entries lack a documented relative order. Every raw mount's + §7.2 dispatch point resolves to the map entry of the hook + phase its registration primitive names (§7.2 records the + phase as part of each hook registration's classification), and + every response-emitting entry resolves its emitting stage to a + map entry through its citation; AFTER means strictly later in + the map's total order. A dispatch point or emitting entry that + resolves to no map entry, or a dispatch point whose map entry + EQUALS the emitting entry's, is a witness FAILURE naming the + site and the entry — attribution is never assumed in either + direction for an unordered or same-stage pair. The + implementation repairs such a failure either by making the + order resolvable or by adding, for exactly that (route, entry) + pair, a per-pipeline probe pair in the style of the body-size + pair below — one triggering request down each pipeline — whose + observed outcomes then decide the attribution and are recorded + in the witness output; an attribution carried by neither the + map order nor a recorded probe pair is a phantom. A raw mount whose hook terminates or forwards the request BEFORE a stage runs never carries that stage's status: the raw MCP mount hijacks in a pre-parsing hook and hands the unparsed @@ -1291,7 +1341,12 @@ severable: inventory defaults with the two-pipeline body-size probe pair (§7.7(d)(5)); the per-kind §7.3 content partition; and the §7.2 URL fall-through classification scoping the method - partition to the URL-accepted branch. + partition to the URL-accepted branch. The revision-10 + refinement: the pinned lifecycle-order map with hook-phase + recording in the §7.2 primitive classification, the strict + stage-order AFTER rule, the unresolved/same-stage failure + rule, and the per-(route, entry) probe-pair fallback + (§7.7(d)(5)). ## Ruling request