Files
orca/tests/tools/omp-source-control-runtime-smoke.mjs
T
Neil 17690e6b9a style: settle oxfmt 0.70 drift and stop formatting vendored licences (#23377)
The oxfmt 0.65 -> 0.70 bump landed without a repo-wide reformat, so 36 files
already in the tree no longer matched what the new version emits. Anyone running
`pnpm format` picked all of them up alongside their own change.

Also excludes `resources/licenses/**`: `oxfmt --write .` was rewriting the
vendored PCRE2 licence, turning its `*` redistribution bullets into `-`. Third
party licence text has to be reproduced verbatim, so formatting must not touch it.
2026-09-27 01:14:53 -07:00

34 lines
1.2 KiB
JavaScript

import assert from 'node:assert/strict'
import { pathToFileURL } from 'node:url'
import { join, resolve } from 'node:path'
import { getCommitMessageAgentSpec } from '../../src/shared/commit-message-agent-spec.ts'
const reference = process.argv[2]
assert.ok(reference, 'Pass the read-only source checkout path')
const { parseArgs } = await import(
pathToFileURL(join(resolve(reference), 'packages/coding-agent/src/cli/args.ts')).href
)
const spec = getCommitMessageAgentSpec('omp')
assert.ok(spec)
for (const model of ['default', 'provider/model']) {
const args = spec.buildArgs({ prompt: 'Generated entirely from stdin', model })
const parsed = parseArgs(args)
assert.equal(parsed.print, true)
assert.equal(parsed.noSession, true)
assert.equal(parsed.noTools, true)
assert.equal(parsed.noExtensions, true)
assert.equal(parsed.noSkills, true)
assert.equal(parsed.noRules, true)
assert.equal(parsed.mode, 'text')
assert.equal(parsed.model, model === 'default' ? undefined : model)
assert.deepEqual(parsed.messages, [])
}
console.log(
JSON.stringify({
actualArgumentParser: true,
promptDelivery: spec.promptDelivery,
configDefault: true,
explicitModel: true,
modelCalls: 0
})
)