test: align Source Control AI registry contracts with OMP

This commit is contained in:
Neil
2026-09-14 06:36:23 -07:00
parent 246eebea5d
commit bfe36ee8da
2 changed files with 12 additions and 3 deletions
+11 -2
View File
@@ -31,14 +31,23 @@ describe('getAgentModelProbeSpec', () => {
)
})
it('aliases commit-message agents by identity rather than copying them', () => {
it('aliases agents without a generation-only default by identity', () => {
// A lossy adapter here would silently drop fields like
// `modelDiscovery.stdinPayload` and break Claude discovery.
for (const id of listCommitMessageAgentIds()) {
for (const id of listCommitMessageAgentIds().filter((agentId) => agentId !== 'omp')) {
expect(getAgentModelProbeSpec(id)).toBe(getCommitMessageAgentSpec(id))
}
})
it('removes only the OMP generation sentinel while preserving discovery', () => {
const generation = getCommitMessageAgentSpec('omp')!
const probe = getAgentModelProbeSpec('omp')!
expect(generation.defaultModelId).toBe('default')
expect(probe.defaultModelId).toBe('')
expect(probe.models).toEqual([])
expect(probe.modelDiscovery).toBe(generation.modelDiscovery)
})
it('keeps grok out of the commit-message registry', () => {
expect(getCommitMessageAgentSpec('grok')).toBeUndefined()
expect(listCommitMessageAgentIds()).not.toContain('grok')
@@ -427,7 +427,7 @@ describe('source-control AI action recipes', () => {
).toEqual({
ok: false,
error:
'Agent "aider" does not support Source Control AI commit messages. Supported agents: Claude, Codex, OpenCode, Pi, Amp, Cursor, Kimi, GitHub Copilot, Antigravity, or Custom command.'
'Agent "aider" does not support Source Control AI commit messages. Supported agents: OMP, Claude, Codex, OpenCode, Pi, Amp, Cursor, Kimi, GitHub Copilot, Antigravity, or Custom command.'
})
})
})