Repository navigation
fix(config): merge user and project configs over BEC_CONFIG_PATH - #37
Merged
Merged
Conversation
BEC_CONFIG_PATH replaced the project file, so a project .claude/concise.json was skipped when the variable was set. The hooks now read the BEC_CONFIG_PATH file first. The user file merges over it, and the project file merges over both, so the project file wins a conflict. A relative path resolves against the cwd. When the BEC_CONFIG_PATH file is also the user or project file, it loads once. The settings tools and the console list the BEC_CONFIG_PATH file as layer env-config, before the user layers. The project layer is always the real project file. The playground sets the new BEC_CONFIG_PATH_ONLY variable. A project file cannot change a preview.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BEC_CONFIG_PATH replaced the project file. When the variable was set, the hooks skipped
.claude/concise.jsonin the project. The hooks now read the BEC_CONFIG_PATH file first. The user file merges over it, and the project file merges over both, so the project file wins a conflict.The hooks resolve a relative BEC_CONFIG_PATH against the cwd. When the BEC_CONFIG_PATH file is also the user or project file, it loads once, in the user or project place. The check compares real paths, so a symlink counts as the same file.
The settings tools and the console list the BEC_CONFIG_PATH file as layer
env-configbefore the user layers. Theactiveflags and the layer order follow the merge order.--layer projectwrites the real project file, and creates.claude/concise.jsonwhen no project file exists. Theproject-overridelayer id is gone.The playground passes its config snapshot through BEC_CONFIG_PATH. With the new order, a project file would merge over the snapshot and change the preview. The playground now sets a new variable,
BEC_CONFIG_PATH_ONLY=1, which skips the user file and the project file.environment.mdlists it.configuration.mdandenvironment.mddescribe the new order.INDEX.mdhas the new dates.I ran the checks on Node 24.19.0 with
NODE_V8_COVERAGEset.node scripts/check.mjspassed.node --test test/*.test.mjspassed 201 of 201 tests. The plugin suite passed 1907 of 1907 checks with HOME, USERPROFILE, and XDG_CONFIG_HOME unset.node scripts/coverage.mjsreports 99.93% (6131 of 6135 lines) on my machine. The 4 missed lines are lines 29 to 32 ofhooks/lib/patterns/ai/outline-conclusion.mjs, which this PR does not change. The same 4 lines are missed on my machine for origin/main, where CI reports 100%. All new lines ran.