From 75163293871bc943bfb8663cf767d2468a937f47 Mon Sep 17 00:00:00 2001 From: Justin Abrahms Date: Mon, 8 Aug 2022 09:47:05 -0700 Subject: [PATCH 1/3] Document context merging order for before hook ctx 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..14f4d617 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 other `evaluation context`s with the following order: invocation (highest precedence), before-hook, 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..32fa2bf4 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 other `evaluation context`s with the following order: invocation (highest precedence), before-hook, client, api (lowest precedence). #### Requirement 4.3.5 From f2ce3320a6a577e350f4e61300d4e62c720fa578 Mon Sep 17 00:00:00 2001 From: Justin Abrahms Date: Mon, 8 Aug 2022 10:07:51 -0700 Subject: [PATCH 2/3] Update specification/sections/04-hooks.md 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 14f4d617..31708ac2 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 other `evaluation context`s with the following order: invocation (highest precedence), before-hook, client, api (lowest precedence).", + "content": "When `before` hooks have finished executing, any resulting `evaluation context` MUST be merged with the existing `evaluation context` in the following order: invocation (highest precedence), before-hook, client, api (lowest precedence).", "RFC 2119 keyword": "MUST", "children": [] }, diff --git a/specification/sections/04-hooks.md b/specification/sections/04-hooks.md index 32fa2bf4..9b5a080c 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 other `evaluation context`s with the following order: invocation (highest precedence), before-hook, client, api (lowest precedence). +> When `before` hooks have finished executing, any resulting `evaluation context` **MUST** be merged with the existing `evaluation context` in the following order: invocation (highest precedence), before-hook, client, api (lowest precedence). #### Requirement 4.3.5 From f853da0c05f85caac2758b66a6aa09d21d8470e3 Mon Sep 17 00:00:00 2001 From: Justin Abrahms Date: Mon, 8 Aug 2022 14:31:25 -0700 Subject: [PATCH 3/3] Fix order to allow hooks as the final say. 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 31708ac2..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 existing `evaluation context` in the following order: invocation (highest precedence), before-hook, client, api (lowest precedence).", + "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 9b5a080c..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 existing `evaluation context` in the following order: invocation (highest precedence), before-hook, client, api (lowest precedence). +> 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