Commit 51b9e23
committed
fix(config): derive ENV_LLM_KEYS from ENV_LLM_MAP to prevent drift
applyEnvProvenance hardcoded a second literal list of the four
CODEGRAPH_LLM_* env var names to decide whether to attribute
provenance.llm = 'env'. If a new override were ever added to
ENV_LLM_MAP without updating this list, the override would work but
`codegraph config --explain` would silently fail to attribute it.
Move ENV_LLM_MAP above the provenance helpers and derive the key list
via Object.keys(ENV_LLM_MAP) so the two can never drift apart.1 parent bf8e969 commit 51b9e23
2 files changed
Lines changed: 42 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
821 | 821 | | |
822 | 822 | | |
823 | 823 | | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
824 | 837 | | |
825 | 838 | | |
826 | 839 | | |
| |||
866 | 879 | | |
867 | 880 | | |
868 | 881 | | |
869 | | - | |
| 882 | + | |
| 883 | + | |
870 | 884 | | |
871 | 885 | | |
872 | | - | |
873 | | - | |
874 | | - | |
875 | | - | |
876 | | - | |
877 | | - | |
878 | | - | |
| 886 | + | |
879 | 887 | | |
880 | 888 | | |
881 | 889 | | |
| |||
913 | 921 | | |
914 | 922 | | |
915 | 923 | | |
916 | | - | |
917 | | - | |
918 | | - | |
919 | | - | |
920 | | - | |
921 | | - | |
922 | | - | |
923 | 924 | | |
924 | 925 | | |
925 | 926 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
336 | 362 | | |
337 | 363 | | |
338 | 364 | | |
| |||
0 commit comments