Repository navigation
🚚 refactor: move addBedrockCacheControl logic and tests over from LC - #28
Merged
Merged
Conversation
9 tasks done
danny-avila
approved these changes
Nov 11, 2025
addBedrockCacheControl logic and tests over from LC
danny-avila
added a commit
that referenced
this pull request
May 5, 2026
…imes (Codex P1 #28, P2 #29) P1 #28: \`killProcessTree\` only sent SIGTERM. A child that traps the signal (\`trap '' TERM; while true; do sleep 1; done\`) ignores it and never emits \`close\`, so \`spawnLocalProcess\` hangs past timeoutMs / maxSpawnedBytes — defeating both guarantees. Now sends SIGTERM first (graceful), arms a 2 s escalation timer that delivers SIGKILL to the process tree if the child is still alive. The escalation timer is unref'd so it can't keep the Node process alive past natural exit, and is cleared the moment \`close\` fires. Test pinned: \`bash -c "trap '' TERM; while true; do sleep 0.1; done"\` with timeoutMs=1500 — pre-fix Jest would time out at 5 s; post-fix the spawn promise resolves in ~3.5 s (timeout + escalation). P2 #29: the compile-style \`execute_code\` runtimes (\`rs\`, \`c\`, \`cpp\`, \`java\`, \`d\`, \`f90\`) hardcoded \`bash\` via a private \`configShell()\` helper instead of honoring \`local.shell\`. Same shape as the syntax-preflight gap Codex P1 #6 fixed earlier — just missed in this surface. \`getRuntimeCommand\` now takes a \`shellOverride\` param threaded from \`config.shell\`; falls back to \`configShell()\` when undefined (existing behavior). Test pinned: rust runtime invoked with \`shell: '/bin/sh'\` dispatches via \`/bin/sh\`, not bash. 789 tests passing across all suites, lint baseline unchanged.
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.
Sibling PR to #8271
Since 0e19057, addCacheControl logic has been moved into agents from api/server/controllers/agents/client.js. This PR migrates the addBedrockCacheControl logic to sit alongside addCacheControl to maintain architectural consistency.
Still requires testing to confirm proper implementation.