|
| 1 | +{ |
| 2 | + "task_id": "inv-deep-001", |
| 3 | + "description": "Deep causal chain: Envoy router double-processes response header mutations for local replies", |
| 4 | + "weights": { |
| 5 | + "required_findings": 0.40, |
| 6 | + "file_references": 0.30, |
| 7 | + "causal_chain": 0.20, |
| 8 | + "negative_checks": 0.10 |
| 9 | + }, |
| 10 | + "required_findings": [ |
| 11 | + { |
| 12 | + "id": "f1", |
| 13 | + "description": "Identifies finalizeResponseHeaders as the function that applies response_headers_to_add", |
| 14 | + "patterns": ["finalizeResponseHeaders", "finalize.*[Rr]esponse.*[Hh]eaders"], |
| 15 | + "weight": 0.12 |
| 16 | + }, |
| 17 | + { |
| 18 | + "id": "f2", |
| 19 | + "description": "Identifies the modify_headers_ callback/lambda in the router", |
| 20 | + "patterns": ["modify_headers_", "modify_headers"], |
| 21 | + "weight": 0.12 |
| 22 | + }, |
| 23 | + { |
| 24 | + "id": "f3", |
| 25 | + "description": "Identifies sendLocalReply as the code path where double processing occurs", |
| 26 | + "patterns": ["sendLocalReply", "send.*[Ll]ocal.*[Rr]eply", "local.?reply"], |
| 27 | + "weight": 0.12 |
| 28 | + }, |
| 29 | + { |
| 30 | + "id": "f4", |
| 31 | + "description": "Explains double invocation: sendLocalReply calls finalizeResponseHeaders AND modify_headers_ also calls it", |
| 32 | + "patterns": ["double|twice|two.*times|duplicate.*call|called.*again|both.*call|re.?process|multiple.*times"], |
| 33 | + "weight": 0.12 |
| 34 | + }, |
| 35 | + { |
| 36 | + "id": "f5", |
| 37 | + "description": "Mentions PR #39534 or its effect of moving finalizeResponseHeaders into modify_headers_ callback", |
| 38 | + "patterns": ["39534|moved.*finalize.*into.*modify|modify_headers.*callback.*finalize"], |
| 39 | + "weight": 0.08 |
| 40 | + }, |
| 41 | + { |
| 42 | + "id": "f6", |
| 43 | + "description": "Identifies HeaderParser or header_parser.cc as involved in parsing header config", |
| 44 | + "patterns": ["[Hh]eader[Pp]arser|header_parser"], |
| 45 | + "weight": 0.08 |
| 46 | + }, |
| 47 | + { |
| 48 | + "id": "f7", |
| 49 | + "description": "Mentions append_action enum or OVERWRITE_IF_EXISTS_OR_ADD behavior", |
| 50 | + "patterns": ["append_action|OVERWRITE_IF_EXISTS_OR_ADD|APPEND_IF_EXISTS_OR_ADD|[Hh]eader[Aa]ppend[Aa]ction"], |
| 51 | + "weight": 0.08 |
| 52 | + }, |
| 53 | + { |
| 54 | + "id": "f8", |
| 55 | + "description": "Identifies HeaderValueOption proto or the deprecated append BoolValue field", |
| 56 | + "patterns": ["HeaderValueOption|append.*BoolValue|deprecated.*append|has_append"], |
| 57 | + "weight": 0.06 |
| 58 | + }, |
| 59 | + { |
| 60 | + "id": "f9", |
| 61 | + "description": "Mentions FilterManager or filter_manager role in encode path", |
| 62 | + "patterns": ["FilterManager|filter_manager|encodeHeaders"], |
| 63 | + "weight": 0.06 |
| 64 | + }, |
| 65 | + { |
| 66 | + "id": "f10", |
| 67 | + "description": "Mentions response_headers_to_add route configuration", |
| 68 | + "patterns": ["response_headers_to_add"], |
| 69 | + "weight": 0.06 |
| 70 | + }, |
| 71 | + { |
| 72 | + "id": "f11", |
| 73 | + "description": "Identifies that local replies vs proxied upstream responses behave differently", |
| 74 | + "patterns": ["local.*reply.*differ|upstream.*response.*not.*affect|only.*local|proxied.*response.*correct|upstream.*path.*single"], |
| 75 | + "weight": 0.05 |
| 76 | + }, |
| 77 | + { |
| 78 | + "id": "f12", |
| 79 | + "description": "Mentions getResponseHeaderParsers or evaluateHeaders in the header processing chain", |
| 80 | + "patterns": ["getResponseHeaderParsers|evaluateHeaders"], |
| 81 | + "weight": 0.05 |
| 82 | + } |
| 83 | + ], |
| 84 | + "file_references": [ |
| 85 | + { |
| 86 | + "id": "r1", |
| 87 | + "description": "Identifies source/common/router/router.cc (where sendLocalReply and modify_headers_ live)", |
| 88 | + "patterns": ["source/common/router/router\\.cc", "common/router/router\\.cc", "router/router\\.cc"], |
| 89 | + "weight": 0.25 |
| 90 | + }, |
| 91 | + { |
| 92 | + "id": "r2", |
| 93 | + "description": "Identifies source/common/router/config_impl.cc (where finalizeResponseHeaders is defined)", |
| 94 | + "patterns": ["source/common/router/config_impl\\.cc", "router/config_impl\\.cc"], |
| 95 | + "weight": 0.20 |
| 96 | + }, |
| 97 | + { |
| 98 | + "id": "r3", |
| 99 | + "description": "Identifies source/common/router/header_parser.cc (HeadersToAddEntry, append/append_action logic)", |
| 100 | + "patterns": ["source/common/router/header_parser\\.cc", "router/header_parser\\.cc", "header_parser\\.cc"], |
| 101 | + "weight": 0.15 |
| 102 | + }, |
| 103 | + { |
| 104 | + "id": "r4", |
| 105 | + "description": "Identifies source/common/http/filter_manager.cc (encode path iteration)", |
| 106 | + "patterns": ["source/common/http/filter_manager\\.cc", "http/filter_manager\\.cc", "filter_manager\\.cc"], |
| 107 | + "weight": 0.10 |
| 108 | + }, |
| 109 | + { |
| 110 | + "id": "r5", |
| 111 | + "description": "Identifies api/envoy/config/core/v3/base.proto (HeaderValueOption, append_action enum)", |
| 112 | + "patterns": ["api/envoy/config/core/v3/base\\.proto", "core/v3/base\\.proto", "config/core/v3/base"], |
| 113 | + "weight": 0.10 |
| 114 | + }, |
| 115 | + { |
| 116 | + "id": "r6", |
| 117 | + "description": "Identifies header_mutation filter (source/extensions/filters/http/header_mutation/)", |
| 118 | + "patterns": ["extensions/filters/http/header_mutation", "header_mutation\\.cc", "header_mutation/header_mutation"], |
| 119 | + "weight": 0.10 |
| 120 | + }, |
| 121 | + { |
| 122 | + "id": "r7", |
| 123 | + "description": "Identifies source/common/http/header_mutation.cc (AppendMutation, evaluateHeaders)", |
| 124 | + "patterns": ["source/common/http/header_mutation\\.cc", "http/header_mutation\\.cc"], |
| 125 | + "weight": 0.10 |
| 126 | + } |
| 127 | + ], |
| 128 | + "causal_chain": [ |
| 129 | + { |
| 130 | + "id": "c1", |
| 131 | + "description": "Hop 1-2: sendLocalReply in router.cc calls finalizeResponseHeaders, then modify_headers_ callback also calls finalizeResponseHeaders, causing response_headers_to_add to be processed twice", |
| 132 | + "patterns": ["sendLocalReply|local.*reply", "finalizeResponseHeaders|finalize.*response", "modify_headers_|modify.*header.*callback", "twice|double|duplicate|two.*times|multiple|re.?process"], |
| 133 | + "ordered": true, |
| 134 | + "weight": 0.40 |
| 135 | + }, |
| 136 | + { |
| 137 | + "id": "c2", |
| 138 | + "description": "Hop 3: finalizeResponseHeaders iterates header parsers via getResponseHeaderParsers/evaluateHeaders which applies response_headers_to_add", |
| 139 | + "patterns": ["finalizeResponseHeaders|finalize.*response", "response_headers_to_add|header.*parser|evaluateHeaders"], |
| 140 | + "ordered": true, |
| 141 | + "weight": 0.25 |
| 142 | + }, |
| 143 | + { |
| 144 | + "id": "c3", |
| 145 | + "description": "Hop 4-5: Header config parsing in header_parser.cc resolves append_action from proto, where append vs append_action deprecation and proto defaults (enum 0 = APPEND_IF_EXISTS_OR_ADD) affect mutation behavior", |
| 146 | + "patterns": ["header_parser|HeadersToAddEntry|HeaderParser", "append_action|append.*BoolValue|proto.*default|APPEND_IF_EXISTS"], |
| 147 | + "ordered": false, |
| 148 | + "weight": 0.35 |
| 149 | + } |
| 150 | + ], |
| 151 | + "negative_checks": [ |
| 152 | + { |
| 153 | + "id": "n1", |
| 154 | + "description": "Does NOT blame the upstream server, network issues, or Envoy version incompatibility as root cause", |
| 155 | + "patterns": ["upstream.*server.*root.?cause|network.*root.?cause|version.*incompat.*root.?cause"], |
| 156 | + "must_be_absent": true, |
| 157 | + "weight": 0.50 |
| 158 | + }, |
| 159 | + { |
| 160 | + "id": "n2", |
| 161 | + "description": "Does NOT claim the bug is in the header_mutation HTTP filter extension itself (it's in the router)", |
| 162 | + "patterns": ["header_mutation.*filter.*root.?cause|header.?mutation.*extension.*bug|header_mutation\\.cc.*root.?cause"], |
| 163 | + "must_be_absent": true, |
| 164 | + "weight": 0.50 |
| 165 | + } |
| 166 | + ] |
| 167 | +} |
0 commit comments