From 3891551fba2e17edcb6095a27e85d5103df27f23 Mon Sep 17 00:00:00 2001 From: Justin Abrahms Date: Mon, 8 Aug 2022 18:29:50 -0700 Subject: [PATCH] Document context merging order for before hook ctx (#125) Signed-off-by: Justin Abrahms Co-authored-by: Todd Baert Signed-off-by: Justin Abrahms --- specification.json | 2 +- specification/sections/04-hooks.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification.json b/specification.json index 24c04dcb..097aa739 100644 --- a/specification.json +++ b/specification.json @@ -400,7 +400,7 @@ { "id": "Requirement 4.3.4", "machine_id": "requirement_4_3_4", - "content": "When `before` hooks have finished executing, any resulting `evaluation context` MUST be merged with the invocation `evaluation context` with the invocation `evaluation context` taking precedence in the case of any conflicts.", + "content": "When `before` hooks have finished executing, any resulting `evaluation context` MUST be merged with the existing `evaluation context` in the following order: before-hook (highest precedence), invocation, client, api (lowest precedence).", "RFC 2119 keyword": "MUST", "children": [] }, diff --git a/specification/sections/04-hooks.md b/specification/sections/04-hooks.md index 419e1d90..0fc8cd46 100644 --- a/specification/sections/04-hooks.md +++ b/specification/sections/04-hooks.md @@ -87,7 +87,7 @@ EvaluationContext | void before(HookContext, HookHints); #### Requirement 4.3.4 -> When `before` hooks have finished executing, any resulting `evaluation context` **MUST** be merged with the invocation `evaluation context` with the invocation `evaluation context` taking precedence in the case of any conflicts. +> When `before` hooks have finished executing, any resulting `evaluation context` **MUST** be merged with the existing `evaluation context` in the following order: before-hook (highest precedence), invocation, client, api (lowest precedence). #### Requirement 4.3.5