|
| 1 | +{ |
| 2 | + "task_id": "nlqa-arch-001", |
| 3 | + "description": "Envoy HTTP filter chain architecture: listener to upstream", |
| 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 ConnectionManagerImpl as a Network::ReadFilter", |
| 14 | + "patterns": ["ConnectionManagerImpl", "conn_manager_impl"], |
| 15 | + "weight": 0.15 |
| 16 | + }, |
| 17 | + { |
| 18 | + "id": "f2", |
| 19 | + "description": "Explains FilterChainManager selects network filter chain for incoming connections", |
| 20 | + "patterns": ["FilterChainManager|filter_chain_manager", "findFilterChain|find_filter_chain"], |
| 21 | + "weight": 0.15 |
| 22 | + }, |
| 23 | + { |
| 24 | + "id": "f3", |
| 25 | + "description": "Identifies FilterManager as the HTTP-level filter chain manager", |
| 26 | + "patterns": ["FilterManager|filter_manager"], |
| 27 | + "weight": 0.10 |
| 28 | + }, |
| 29 | + { |
| 30 | + "id": "f4", |
| 31 | + "description": "Explains decoder filters iterate forward (A→B→C) and encoder filters iterate in reverse (C→B→A)", |
| 32 | + "patterns": ["reverse|backward|opposite.*order|C.*B.*A|encoder.*reverse|reverse.*encoder"], |
| 33 | + "weight": 0.15 |
| 34 | + }, |
| 35 | + { |
| 36 | + "id": "f5", |
| 37 | + "description": "Identifies Router::Filter as the terminal HTTP decoder filter", |
| 38 | + "patterns": ["[Rr]outer.*[Ff]ilter|router\\.cc|[Tt]erminal.*filter|isTerminalFilter"], |
| 39 | + "weight": 0.15 |
| 40 | + }, |
| 41 | + { |
| 42 | + "id": "f6", |
| 43 | + "description": "Explains route resolution via refreshCachedRoute or route() callback", |
| 44 | + "patterns": ["refreshCachedRoute|cached.*route|callbacks_->route|routeEntry"], |
| 45 | + "weight": 0.10 |
| 46 | + }, |
| 47 | + { |
| 48 | + "id": "f7", |
| 49 | + "description": "Mentions UpstreamRequest and upstream filter chain", |
| 50 | + "patterns": ["UpstreamRequest|upstream_request", "upstream.*filter"], |
| 51 | + "weight": 0.10 |
| 52 | + }, |
| 53 | + { |
| 54 | + "id": "f8", |
| 55 | + "description": "Describes filter return status values (StopIteration, Continue, StopAllIterationAndBuffer)", |
| 56 | + "patterns": ["StopIteration|Stop.*Iteration|FilterHeadersStatus|StopAll.*Buffer|ContinueAndDontEndStream"], |
| 57 | + "weight": 0.10 |
| 58 | + } |
| 59 | + ], |
| 60 | + "file_references": [ |
| 61 | + { |
| 62 | + "id": "r1", |
| 63 | + "description": "References conn_manager_impl.h or conn_manager_impl.cc", |
| 64 | + "patterns": ["source/common/http/conn_manager_impl\\.(h|cc)", "conn_manager_impl\\.cc", "conn_manager_impl\\.h"], |
| 65 | + "weight": 0.25 |
| 66 | + }, |
| 67 | + { |
| 68 | + "id": "r2", |
| 69 | + "description": "References filter_manager.h or filter_manager.cc", |
| 70 | + "patterns": ["source/common/http/filter_manager\\.(h|cc)", "filter_manager\\.h", "filter_manager\\.cc"], |
| 71 | + "weight": 0.25 |
| 72 | + }, |
| 73 | + { |
| 74 | + "id": "r3", |
| 75 | + "description": "References router.h or router.cc", |
| 76 | + "patterns": ["source/common/router/router\\.(h|cc)", "common/router/router\\.cc", "common/router/router\\.h"], |
| 77 | + "weight": 0.25 |
| 78 | + }, |
| 79 | + { |
| 80 | + "id": "r4", |
| 81 | + "description": "References filter_chain_manager_impl.h or listener_impl.h", |
| 82 | + "patterns": ["filter_chain_manager_impl\\.h|listener_impl\\.h|listener_manager/"], |
| 83 | + "weight": 0.15 |
| 84 | + }, |
| 85 | + { |
| 86 | + "id": "r5", |
| 87 | + "description": "References envoy/http/filter.h or envoy/network/filter.h interface files", |
| 88 | + "patterns": ["envoy/http/filter\\.h|envoy/network/filter\\.h|http/filter\\.h|network/filter\\.h"], |
| 89 | + "weight": 0.10 |
| 90 | + } |
| 91 | + ], |
| 92 | + "causal_chain": [ |
| 93 | + { |
| 94 | + "id": "c1", |
| 95 | + "description": "Full request flow: listener accepts → FilterChainManager selects network filters → HCM receives bytes → codec parses HTTP → ActiveStream created → HTTP filter chain iterates → Router forwards to upstream", |
| 96 | + "patterns": [ |
| 97 | + "listener|accept|TCP", |
| 98 | + "FilterChainManager|network.*filter|filter.*chain.*select", |
| 99 | + "ConnectionManagerImpl|HCM|conn.*manager|onData", |
| 100 | + "codec|dispatch|HTTP.*pars", |
| 101 | + "ActiveStream|newStream|decodeHeaders", |
| 102 | + "Router|upstream|cluster" |
| 103 | + ], |
| 104 | + "ordered": true, |
| 105 | + "weight": 0.60 |
| 106 | + }, |
| 107 | + { |
| 108 | + "id": "c2", |
| 109 | + "description": "Response flow: upstream responds → Router encodeHeaders → encoder filters iterate in reverse → downstream client receives response", |
| 110 | + "patterns": [ |
| 111 | + "upstream.*respon|response.*upstream", |
| 112 | + "encodeHeaders|encode.*header", |
| 113 | + "reverse|backward|encoder.*filter" |
| 114 | + ], |
| 115 | + "ordered": true, |
| 116 | + "weight": 0.40 |
| 117 | + } |
| 118 | + ], |
| 119 | + "negative_checks": [ |
| 120 | + { |
| 121 | + "id": "n1", |
| 122 | + "description": "Does NOT confuse network-level FilterChainManager with HTTP-level FilterManager as the same component", |
| 123 | + "patterns": ["FilterChainManager.*same.*FilterManager|FilterManager.*same.*FilterChainManager|network.*filter.*chain.*identical.*http.*filter"], |
| 124 | + "must_be_absent": true, |
| 125 | + "weight": 0.50 |
| 126 | + }, |
| 127 | + { |
| 128 | + "id": "n2", |
| 129 | + "description": "Does NOT claim the router filter directly writes to the upstream TCP connection (it uses UpstreamRequest/GenericConnPool)", |
| 130 | + "patterns": ["router.*direct.*write.*upstream.*socket|router.*direct.*TCP|router.*bypass.*connection.*pool"], |
| 131 | + "must_be_absent": true, |
| 132 | + "weight": 0.50 |
| 133 | + } |
| 134 | + ] |
| 135 | +} |
0 commit comments