fix: accept bunnative language in AI chat flow step validation (#10030)

* fix: accept bunnative language in AI chat flow step validation

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: regenerate copilot flow schema from openflow spec

Run gen_openflow_schema.sh + minifiedOpenflowJson.sh instead of hand-patching. Also syncs three fields the checked-in generated files had drifted from since the last regen (reasoning_effort, reasoning_token_delta streaming event, aiagent tag).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: regenerate system prompts for bunnative openflow schema

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
hugocasa
2026-07-10 09:24:09 +02:00
committed by GitHub
parent 5387076c1c
commit 5a460dbec6
8 changed files with 43 additions and 9 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,33 @@
import { describe, expect, it } from 'vitest'
import { flowModulesSchema } from './openFlowZod.gen'
// Guards against the generated copilot flow Zod schema (openFlowZod.gen.ts)
// drifting from the RawScript language enum in openflow.openapi.yaml. A missing
// language here silently rejects AI-generated flow edits that use it in the
// copilot flow-editing path (validateFlowModules -> flowModulesSchema).
function rawScriptModuleWithLanguage(language: string) {
return {
id: 'a',
value: {
type: 'rawscript',
language,
content: 'export async function main() {}',
input_transforms: {}
}
}
}
describe('copilot flow module validation - rawscript language', () => {
it('accepts bunnative (and the bun baseline)', () => {
expect(flowModulesSchema.safeParse([rawScriptModuleWithLanguage('bun')]).success).toBe(true)
expect(flowModulesSchema.safeParse([rawScriptModuleWithLanguage('bunnative')]).success).toBe(
true
)
})
it('still rejects an unknown language (enum is actually enforced)', () => {
expect(
flowModulesSchema.safeParse([rawScriptModuleWithLanguage('not_a_real_lang')]).success
).toBe(false)
})
})
+1
View File
@@ -655,6 +655,7 @@ components:
enum:
- deno
- bun
- bunnative
- python3
- go
- bash
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long