Commit dd60906
fix(jrag): honor JAVA_CODEBASE_RAG_SOURCE_ROOT over a stray ancestor marker (#387)
jrag._resolve_cfg passed source_root=discover_project_root(cwd) into
resolve_operator_config, which only honors JAVA_CODEBASE_RAG_SOURCE_ROOT when
source_root is None. So any ancestor .java-codebase-rag marker silently
overrode the env var that pipeline.subprocess_env sets for the cocoindex child
(and that operators/tests rely on), making `jrag imports/outline <rel-file>`
resolve against the wrong root → "file not found", exit 2.
Pass source_root=None instead, mirroring cli._resolved_from_ns: resolution is
now env var → YAML source_root → discover_project_root(cwd). Interactive use
(discovery fallback) is unchanged; the #383 config_source pointer is preserved.
Regression test creates a non-empty ancestor marker + sets the env var and
asserts the env var wins (fails on pre-fix code, passes with the fix).
Co-authored-by: Claude <noreply@anthropic.com>1 parent 9061da0 commit dd60906
2 files changed
Lines changed: 57 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1096 | 1096 | | |
1097 | 1097 | | |
1098 | 1098 | | |
1099 | | - | |
1100 | | - | |
1101 | | - | |
1102 | | - | |
1103 | | - | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
1104 | 1107 | | |
1105 | 1108 | | |
1106 | 1109 | | |
1107 | 1110 | | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
1108 | 1114 | | |
1109 | | - | |
| 1115 | + | |
1110 | 1116 | | |
1111 | 1117 | | |
1112 | | - | |
| 1118 | + | |
1113 | 1119 | | |
1114 | 1120 | | |
1115 | 1121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
172 | 174 | | |
173 | 175 | | |
174 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
0 commit comments