Skip to content
← Public packages

@kentcdodds/sentry-triage

Sentry triage wakes Cole (Grok Bot) per issue: one active wake per repo (lease + queue), loop-safe Discord. Cole may spawn Cursor for isolated repo work.

src/spawn-snapshot.test.ts

19 lines · 690 B · TypeScript
import assert from 'node:assert/strict'
import { describe, it } from 'node:test'
import { emptyIssueState, formatIssueStateForPrompt } from './issue-state.ts'

describe('formatIssueStateForPrompt', () => {
	it('renders hourly caps and stored record status', () => {
		const text = formatIssueStateForPrompt({
			...emptyIssueState(),
			capRemaining: 9,
			spawnedThisHour: 1,
			issuesSeenThisHour: 2,
			record: { status: 'queued', agentUrl: 'https://cursor.com/agents/bc-1' },
		})
		assert.match(text, /capRemaining: 9/)
		assert.match(text, /issuesSeenThisHour: 2/)
		assert.match(text, /stored record status: queued/)
		assert.match(text, /https:\/\/cursor.com\/agents\/bc-1/)
	})
})