fix(config): normalize channel streaming config shape (#61381)

* feat(config): add canonical streaming config helpers

* refactor(runtime): prefer canonical streaming accessors

* feat(config): normalize preview channel streaming shape

* test(config): lock streaming normalization followups

* fix(config): polish streaming migration edges

* chore(config): refresh streaming baseline hash
This commit is contained in:
Vincent Koc
2026-04-06 05:08:20 +01:00
committed by GitHub
parent 93ddcb37de
commit 0fdf9e874b
48 changed files with 3012 additions and 705 deletions

View File

@@ -68,8 +68,20 @@ describe("config footprint guardrails", () => {
"hooks.internal.handlers",
"channels.telegram.groupMentionsOnly",
"channels.telegram.streamMode",
"channels.telegram.chunkMode",
"channels.telegram.blockStreaming",
"channels.telegram.draftChunk",
"channels.telegram.blockStreamingCoalesce",
"channels.slack.streamMode",
"channels.slack.chunkMode",
"channels.slack.blockStreaming",
"channels.slack.blockStreamingCoalesce",
"channels.slack.nativeStreaming",
"channels.discord.streamMode",
"channels.discord.chunkMode",
"channels.discord.blockStreaming",
"channels.discord.draftChunk",
"channels.discord.blockStreamingCoalesce",
"channels.googlechat.streamMode",
"channels.slack.channels.*.allow",
"channels.slack.accounts.*.channels.*.allow",
@@ -100,6 +112,16 @@ describe("config footprint guardrails", () => {
}
});
it("keeps canonical nested streaming paths in the public core channel schema", () => {
const source = readSource("src/config/zod-schema.providers-core.ts");
expect(source).toContain("streaming: ChannelPreviewStreamingConfigSchema.optional(),");
expect(source).toContain("streaming: SlackStreamingConfigSchema.optional(),");
expect(source).not.toContain('streamMode: z.enum(["replace", "status_final", "append"])');
expect(source).not.toContain("draftChunk:");
expect(source).not.toContain("nativeStreaming:");
});
it("keeps shared setup input canonical-first", () => {
const source = readSource("src/channels/plugins/types.core.ts");