mirror of
https://github.com/feigeCode/navop.git
synced 2026-09-22 16:01:30 +00:00
- replace the Claude CLI backend with the Codex CLI in scripts/ai/agent.cjs - default provider is codex; openai-compatible stays classification-only - install pinned @openai/codex in classify, implement and review-fix jobs - disable automatic triggers on the three ai workflows, keep workflow_dispatch
178 lines
7.1 KiB
JavaScript
178 lines
7.1 KiB
JavaScript
#!/usr/bin/env node
|
|
'use strict';
|
|
|
|
const test = require('node:test');
|
|
const assert = require('node:assert');
|
|
const auto = require('./automation.cjs');
|
|
|
|
test('gateAutomationRoute honours triage_only', () => {
|
|
assert.equal(auto.gateAutomationRoute('issue_classify', { mode: 'triage_only' }).kind, 'issue_classify');
|
|
assert.equal(auto.gateAutomationRoute('implement', { mode: 'triage_only' }).kind, 'skip');
|
|
assert.equal(auto.gateAutomationRoute('review_loop', { mode: 'full' }).kind, 'review_loop');
|
|
});
|
|
|
|
test('unknown mode defaults to full', () => {
|
|
assert.equal(auto.resolveAutomationMode(''), auto.AUTOMATION_MODE_FULL);
|
|
assert.equal(auto.resolveAutomationMode('weird'), auto.AUTOMATION_MODE_FULL);
|
|
assert.equal(auto.isTriageOnlyMode('triage_only'), true);
|
|
});
|
|
|
|
test('sanitizeUntrustedText strips injection openers', () => {
|
|
const out = auto.sanitizeUntrustedText('hi |