fix(core): load config across git boundaries (#36577)

Co-authored-by: 𝓛𝓲𝓽𝓽𝓵𝓮 𝓕𝓻𝓪𝓷𝓴 <little-frank@opencord.local>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
This commit is contained in:
opencode-agent[bot] 2026-07-13 00:05:41 +00:00 committed by GitHub
commit f112a73c06
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 17 additions and 40 deletions

View file

@ -200,7 +200,6 @@ const layer = Layer.effect(
.up({
targets: [".opencode", ".claude", ".agents", ...names.toReversed()],
start: location.directory,
stop: location.project.directory,
})
.pipe(Effect.orDie)

View file

@ -876,7 +876,7 @@ describe("Config", () => {
),
)
it.live("loads global, ancestor, and .opencode configuration up to the project boundary", () =>
it.live("loads global and ancestor configuration across the project boundary", () =>
Effect.acquireRelease(
Effect.promise(() => tmpdir()),
(tmp) => Effect.promise(() => tmp[Symbol.asyncDispose]()),
@ -936,6 +936,7 @@ describe("Config", () => {
])
expect(documents.map((document) => document.info.$schema)).toEqual([
"global",
"outside",
"root",
"parent",
"directory",
@ -951,6 +952,8 @@ describe("Config", () => {
AbsolutePath.make(path.join(root, ".agents")),
"global",
AbsolutePath.make(global),
"outside",
AbsolutePath.make(path.join(tmp.path, "opencode.json")),
"root",
AbsolutePath.make(path.join(root, "opencode.json")),
"parent",