Repository navigation
test(agents): run agent stand-ins on a sleep that answers to any name - #3508
Conversation
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
|
All contributors have signed the CLA. Thank you! |
|
recheck |
Merge passMerged head
Merged with these checks red, none of them required: ssh;
|
…ded tail for real (#4991) Fixes #3496. 1. **The Find test did not prove Find.** `scripts/chat-virtual-browser-qa.ts` dispatched `beforematch` itself. With `.chat-tool-result-tail{display:none}` added, the old script still passed. It now asks Chromium to find the text through a text fragment (`location.hash = ":~:text=..."`), the same search Ctrl+F runs: it reveals `hidden=until-found` text and fires `beforematch`. With the tail hidden it now fails. (`window.find` finds the text but fires no `beforematch` and reveals nothing, so it cannot stand in for Ctrl+F.) 2. **Markdown code blocks folded the old way.** Their tail was not in the page, so Find could not reach it, and Show less at the end of the chat scrolled up. The tool-output fold logic moved to `src/lib/textFold.ts` (`useFindableTail` keeps the tail in the page as `hidden=until-found` and unfolds on a match; `showFoldedBlock` skips the scroll back when the chat is at its end), and `ToolOutputText` and `CodeBlock` both use it. On main the new code-block checks fail ("the folded tail is in the page": false; Show less at the end: jump). The rich-text copy now leaves out a folded tail (`hidden=until-found`) and keeps other hidden elements such as the visualization's copy-only `<br hidden>` (`src/lib/markdownClipboard.test.ts`, both cases fail without the change). The plain-text copy is still the browser's own `selection.toString()`. 3. **The grok QA stand-in** was already fixed by #3508 (`scripts/fixtures/sleep.ts`); `scripts/grok-chat-browser-qa.ts` passes on a host whose `/bin/sleep` is uutils. No visible change: before/after screenshots of the code block, folded and unfolded, at 1280 and 390 px are byte-identical. The tail sits next to the code `<pre>`, not inside it, so `HighlightedCode` (also used by the file viewer) is untouched. Checks: `bun scripts/chat-virtual-browser-qa.ts` (4 new PASS lines for code-block Find and Show less at 1440 and 390), `bun run typecheck`, Markdown, MarkdownDocuments, markdown, markdownClipboard, changelog-fold and conventions tests.
Change
The contract tests and two browser QA scripts start agent stand-ins by copying or linking
/bin/sleepunder an agent's name (hermes,agy,grok-*,muse,codex,omp). On Ubuntu 26.04,/bin/sleepis the rust-coreutils multicall binary, which picks its program by the name it runs under, so every stand-in exits at once:The GNU build ships beside it as
/usr/bin/gnusleep(https://packages.ubuntu.com/resolute/amd64/gnu-coreutils/filelist). The newscripts/fixtures/sleep.tsexportsSLEEP, which is/usr/bin/gnusleepwhen it exists and/bin/sleepotherwise. Every stand-in now uses it, so other systems behave as before. This is a test-only change, so there is no changelog entry.Validation
Run on Ubuntu 26.04 with Bun 1.4.2, Node 22 and herdr 0.9.5.
bun run check fast: every step passes except one unit file.scripts/install-herdr-core.test.tsfails on this machine onmaintoo: GNUstepplutilrefuses the LaunchAgent, which test(install): lint the LaunchAgent with plutil on the macOS job and with plistlib elsewhere #3506 fixes.bun test server/hermes.contract.test.ts: 9 pass. Onmain, 1 fails withHermes stand-in did not become the pane's foreground process.bun test server/api.contract.test.ts: 197 pass. Onmain, 4 fail:fixture Grok process did not start, and the same for Agy, Muse and Codex.scripts/agy-chat-browser-qa.ts,scripts/grok-chat-browser-qa.ts), and any run on macOS.