| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
… DEFAULTS docs check acknowledged
Sorry, something went wrong.
| // Engine selection: CODEGRAPH_ENGINE env always wins over config-file value. | ||
| if (process.env.CODEGRAPH_ENGINE !== undefined) { | ||
| const val = process.env.CODEGRAPH_ENGINE as 'auto' | 'native' | 'wasm'; | ||
| (config.build as Record<string, unknown>).engine = val; | ||
| } |
There was a problem hiding this comment.
The CODEGRAPH_ENGINE value is cast to the union type without any runtime validation. If the variable is set to an unrecognized value (e.g. CODEGRAPH_ENGINE=typo), it will be written to config undetected and could silently cause the engine-selection logic downstream to behave unexpectedly. The CODEGRAPH_FAST_SKIP_DIAG path uses an explicit === '1' check, which is a safer pattern for this kind of single-source-of-truth override.
| // Engine selection: CODEGRAPH_ENGINE env always wins over config-file value. | |
| if (process.env.CODEGRAPH_ENGINE !== undefined) { | |
| const val = process.env.CODEGRAPH_ENGINE as 'auto' | 'native' | 'wasm'; | |
| (config.build as Record<string, unknown>).engine = val; | |
| } | |
| // Engine selection: CODEGRAPH_ENGINE env always wins over config-file value. | |
| if (process.env.CODEGRAPH_ENGINE !== undefined) { | |
| const val = process.env.CODEGRAPH_ENGINE; | |
| if (val === 'auto' || val === 'native' || val === 'wasm') { | |
| (config.build as Record<string, unknown>).engine = val; | |
| } else { | |
| debug(`applyEnvOverrides: ignoring unknown CODEGRAPH_ENGINE value "${val}" (expected auto|native|wasm)`); | |
| } | |
| } |
Sorry, something went wrong.
There was a problem hiding this comment.
Resolved — merged origin/main which brings in CODEGRAPH_ENGINE and CODEGRAPH_FAST_SKIP_DIAG test coverage from #1589. Additionally, the merge also brings in main's validation-with-warning for CODEGRAPH_ENGINE (the P2 finding itself): invalid values now log a warning and fall back to "auto" rather than being cast blindly.
Sorry, something went wrong.
Codegraph Impact Analysis23 functions changed → 27 callers affected across 4 files
|
Sorry, something went wrong.
Keep main's validation-with-warning for CODEGRAPH_ENGINE and the detailed JSDoc for config.build.engine referencing issue #1596.
|
Addressed Greptile finding: merged origin/main to pick up env-override test coverage for CODEGRAPH_ENGINE and CODEGRAPH_FAST_SKIP_DIAG (landed in #1589). The merge also brings in the validation-with-warning fix for CODEGRAPH_ENGINE (the P2 finding itself) — invalid values now warn and fall back to "auto". All 3126 tests pass locally. |
Sorry, something went wrong.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Mirrors the TS call-resolution decomposition (PR #1591) for the Rust native engine. Decomposes the highest-complexity Rust functions in the build pipeline.
Titan Audit Context
Changes
Metrics Impact
Test plan