CB-523 (opencode): generated worker config pins compaction.auto
A worker that exhausts its context dies mid-turn and its bridge_reply — the whole point of the turn — dies with it. Auto-compaction is a condition of the turn contract for a spawned peer, not an operator preference. OPENCODE_CONFIG is merged over ~/.config/opencode/config.json rather than replacing it, so workers already inherited auto:true from the home file. That inheritance is exactly what this removes as a dependency: the home file is outside this repo, differs per machine, and is not ours to rely on. The trade is recorded in the code: an OPENCODE_CONFIG value overrides the home value, so an operator cannot disable compaction for bridged workers from home. Deliberate for peers we spawn and whose turns we must land; per-profile control would be a profile knob, not the removal of this line. Origin: fleet-wide auto-compaction audit by peer lead gpt-sol-5.6, which found autoCompactEnabled:false alongside a 300k window across the Claude instance configs. Handed over uncommitted; taken deliberately, with rationale added.
This commit is contained in:
@@ -74,6 +74,8 @@ class OpenCodeLauncherTest {
|
||||
// Assert on parsed structure, not substrings: the generated config is real JSON and its
|
||||
// whitespace is the formatter's business, not the contract's.
|
||||
JsonNode json = new ObjectMapper().readTree(Path.of(cfgPath).toFile());
|
||||
assertTrue(json.path("compaction").path("auto").asBoolean(),
|
||||
"spawned opencode peers explicitly enable automatic compaction");
|
||||
JsonNode bridge = json.path("mcp").path("bridge");
|
||||
assertEquals("remote", bridge.path("type").asText(), "bridge is mounted as a remote MCP server");
|
||||
assertEquals("http://127.0.0.1:8765/mcp", bridge.path("url").asText(),
|
||||
|
||||
Reference in New Issue
Block a user