Skip to content

Commit 4d27692

Browse files
sahrizviclaude
andcommitted
test: keep the source guard for ALTIMATE_AUTO_ANSWER beside the behavioural one
Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012Q51zFUmPg1WwtS5CrGJE6
1 parent 363bd01 commit 4d27692

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎packages/opencode/test/release-validation/question-937-codex.test.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,10 @@ describe("release validation PR #937 source-level env plumbing", () => {
360360
// the contract is behavioural now: the non-interactive marker goes, auto-answer stays.
361361
expect(source).toContain("stripHostMarkers(mergedEnv)")
362362
expect(source).toContain("env: mergedEnv")
363+
// The source guard stays too: between the strip and the spawn nothing may delete or
364+
// overwrite the auto-answer policy, or a nested non-interactive command loses it.
365+
expect(source).not.toContain('delete mergedEnv["ALTIMATE_AUTO_ANSWER"]')
366+
expect(source).not.toMatch(/mergedEnv\["ALTIMATE_AUTO_ANSWER"\]\s*=/)
363367
const { stripHostMarkers } = await import("../../src/tool/bash")
364368
const env = stripHostMarkers({ ALTIMATE_NON_INTERACTIVE: "1", ALTIMATE_AUTO_ANSWER: "yes" })
365369
expect(env["ALTIMATE_NON_INTERACTIVE"]).toBeUndefined()

0 commit comments

Comments
 (0)