Repository navigation
fix(config): let the nearest .openscience directory win - #799
Merged
Ishaan Gangwani (ishaan1124) merged 1 commit intoSep 29, 2026
Conversation
ANIRUDDHA ADAK (aniruddhaadak80)
requested review from
Aayam Bansal (aayambansal) and
Ishaan Gangwani (ishaan1124)
as code owners
September 28, 2026 17:05
|
ANIRUDDHA ADAK (@aniruddhaadak80) is attempting to deploy a commit to the InkVell Team on Vercel. A member of the Team first needs to authorize it. |
Ishaan Gangwani (ishaan1124)
force-pushed
the
fix/config-project-merge-order
branch
from
September 29, 2026 01:24
7ab5e81 to
254a20d
Compare
Filesystem.up yields nearest first and the merge is later-wins, so walking the list as returned let the worktree-wide .openscience override the one written for the directory the run is in. The project config files a few lines above already reverse their list for the same reason.
Ishaan Gangwani (ishaan1124)
force-pushed
the
fix/config-project-merge-order
branch
from
September 29, 2026 01:31
254a20d to
3c6e198
Compare
Ishaan Gangwani (ishaan1124)
merged commit Sep 29, 2026
e978ec2
into
synthetic-sciences:main
1 of 2 checks passed
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.
What
Two facts collided in
Config.get():Filesystem.upwalks fromstartupwards, so it yields the nearest directory first.mergeConfigConcatArraysis later-wins.The collected list was walked as returned, so the farthest
.opensciencewas applied last and won:The project
openscience.jsonblock a few lines above already reverses its list for exactly this reason (found.toReversed()), which is why the two disagreed with each other.Why it matters
A repo can carry a shared
.openscience/at its root and a more specific one in a subtree. The subtree's settings are the ones a user writes to change behaviour for that part of the tree — and they are silently ignored.The sharpest symptom: a
modelset for a subtree always reports the repository default, so an experiment undersrc/tool/runs against a different model than the one configured for it, with nothing in the output to say so.Verification
Fails before, passes after:
The control case pins the other half of the contract: with no nested
.openscience, the worktree-wide file still applies. The first test also asserts a key set only by the outer directory (theme) still comes through, so this is precedence between levels, not a filter.The fixture creates a
.gitdirectory at the outer level, because the worktree is discovered by walking up for.git— without it the two levels are not in the same run.The change
bun run typecheckclean; touched files are Prettier-clean (checked on LF-normalized copies — this checkout hascore.autocrlf=true, which makes Prettier flag every file in the repo).Pre-existing failures in this area
test/config/config.test.tsfails 4 tests onmainin this checkout (loads agents from .openscience/agents (plural),loads commands from .openscience/command (singular),loads commands from .openscience/commands (plural),resolves scoped npm plugins in config) — 58 pass / 4 fail both before and after this change.test/config/markdown.test.tsis 22 pass / 15 fail onmain. Both look Windows-specific and are untouched here.Fixes #798