test: fix golden stub agent Windows batch files and add Ctrl+C support

- Store batch files with CRLF to avoid Windows 512-byte parser boundary bug
- Handle Ctrl+C (0x03) in raw mode as alternative to Ctrl+D (0x04)
- Update release notes documenting golden test skip behavior on older tags
This commit is contained in:
Jinjing
2026-08-13 09:42:37 -07:00
parent 9b4d4ac517
commit d6f5fe5fa9
5 changed files with 10 additions and 5 deletions
+3
View File
@@ -12,3 +12,6 @@
/src/cli/bundled-skill-guides.ts text eol=lf
# Bundled plugin trees are byte-hashed; CRLF checkout would break the pinned hash.
/resources/plugins/** text eol=lf
# LF-only batch files hit the Windows parser's 512-byte boundary bug; -text keeps
# the stored bytes CRLF so no checkout or blob reader can see them as LF-only.
/tests/e2e/fixtures/golden-stub-agent/*.cmd -text whitespace=cr-at-eol
+1
View File
@@ -784,6 +784,7 @@ jobs:
echo "## Release E2E Signal"
echo ""
echo "- Platform golden E2E is release-blocking: terminal rendering, restrictive-umask profile writes, and agent TUI launch on Linux/macOS, plus fresh startup on Windows."
echo "- Exception: every golden except terminal rendering runs with \`--if-present\`, so it is skipped (not failed) on older tags that predate its script."
echo "- Full E2E runs separately after publication and cannot change the release result."
echo "- Terminal rendering release evidence is diagnostic/non-blocking."
echo ""
@@ -1,2 +1,2 @@
@echo off
call "%~dp0golden-stub-agent.cmd" %*
@echo off
call "%~dp0golden-stub-agent.cmd" %*
@@ -1,2 +1,2 @@
@echo off
node "%~dp0golden-stub-agent.js" %*
@echo off
node "%~dp0golden-stub-agent.js" %*
@@ -83,7 +83,8 @@ function consumeInput() {
pendingInput = pendingInput.slice(1)
if (char === '\r' || char === '\n') {
submit()
} else if (char === '\x04') {
} else if (char === '\x04' || char === '\x03') {
// Raw mode delivers Ctrl+C as \x03 instead of raising SIGINT.
exitCleanly()
} else if (char === '\x7f' || char === '\b') {
composer = composer.slice(0, -1)