Loading files
442335385This file is pinned to the selected release. Download the original to open it in your design tool.
Files from this revision, including CAD and LFS contents. Git history is not included.
Or in GitHub Desktop, choose File → Clone repository → URL and paste this address.
Public repositories can be cloned without signing in. For pushing, use your ThingAtlas username and a Git access token as the password.
git lfs install git clone https://thingatlas.com/git/-unclaimed/openharness-1322671404.git
Includes Git history, branches, and Git LFS files. Clones the repository’s default branch, regardless of the version shown here.
import { describe, expect, it } from 'vitest'
import { grokOneShotSpawn } from './oneshot.js'
describe('Grok recap containment', () => {
const options = { prompt: 'summarize this', model: 'grok-4.5', effort: 'low' as const, cwd: '/tmp/summary' }
it('uses print JSON mode with bounded turns and no memory or plan', () => {
const { args } = grokOneShotSpawn(options, '/tmp/isolated-grok', {})
expect(args).toEqual([
'--cwd', '/tmp/summary',
'--always-approve', '--no-memory', '--no-plan', '--max-turns', '1',
'--output-format', 'json', '--model', 'grok-4.5', '--reasoning-effort', 'low',
'-p', 'summarize this',
])
})
it('isolates state and strips agent-discovery variables', () => {
const { env } = grokOneShotSpawn(options, '/tmp/isolated-grok', {
TMUX: 'socket', TMUX_PANE: '%9', MACHINE_ID: 'agent', HOME: '/real-home',
})
expect(env.GROK_HOME).toBe('/tmp/isolated-grok')
expect(env.HOME).toBe('/real-home')
expect(env.TMUX).toBeUndefined()
expect(env.TMUX_PANE).toBeUndefined()
expect(env.MACHINE_ID).toBeUndefined()
})
})
442335385This file is pinned to the selected release. Download the original to open it in your design tool.