Merge origin/master into Speko voice runtime

Preserve both voice and GitHub transport lifecycle behavior and renumber Speko migrations after master.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-10-09 17:15:38 -05:00
commit c7b00b5988
233 files changed
+18355 -61182

No files matched your search

@@ -155,6 +155,16 @@ export const replaceChatEndpointResourcesSchema = z
})
.strict();
export const gitHubRepositoryPageQuerySchema = z.object({
limit: z.coerce.number().int().min(1).max(100).default(20),
offset: z.coerce.number().int().min(0).max(2_147_483_647).default(0),
search: z.string().trim().max(200).default(""),
}).strict();
export const toggleAllGitHubRepositoriesSchema = z.object({
enabled: z.boolean(),
}).strict();
export const publishChatCommentSchema = z
.object({
commentId: z.string().uuid(),
@@ -23,6 +23,8 @@ export const githubReviewPolicySchema = z
events: z
.array(z.enum(GITHUB_REVIEW_EVENTS))
.max(GITHUB_REVIEW_EVENTS.length),
issueOpened: z.boolean().optional(),
issueOpenedInstructions: z.string().max(12000).optional(),
reviewDrafts: z.boolean(),
reviewBotAuthors: z.boolean(),
includeAuthors: shortList,
@@ -53,7 +55,8 @@ export const githubReviewPolicySchema = z
const person = {
githubUserId: githubIdSchema,
login: z.string().regex(/^[a-zA-Z0-9][a-zA-Z0-9-]{0,38}(?:\[bot\])?$/),
automaticReviews: z.boolean(),
// Accept legacy saved configurations; automatic scheduling uses author filters.
automaticReviews: z.boolean().optional(),
};
export const githubAllowedPersonSchema = z.discriminatedUnion("kind", [
z
+1
View File
@@ -439,6 +439,7 @@ export {
issueExecutionStateSchema,
issueRecoveryActionReadModelSchema,
resolveIssueRecoveryActionSchema,
isValidExistingBranchName,
retryWorkspaceExportSchema,
issueReviewRequestSchema,
issueExecutionWorkspaceSettingsSchema,
@@ -5,6 +5,10 @@ import {
} from "./instance.js";
describe("instance experimental settings validators", () => {
it("defaults GitHub review bots off independently of chat and accepts explicit changes", () => {
expect(instanceExperimentalSettingsSchema.parse({ enableChatConnectors: true }).enableGitHubReviewBots).toBe(false);
expect(patchInstanceExperimentalSettingsSchema.parse({ enableGitHubReviewBots: true })).toEqual({ enableGitHubReviewBots: true });
});
it("defaults chat connectors off independently of Apps and accepts only explicit boolean patches", () => {
expect(instanceExperimentalSettingsSchema.parse({}).enableChatConnectors).toBe(false);
expect(instanceExperimentalSettingsSchema.parse({ enableApps: true }).enableChatConnectors).toBe(false);
@@ -54,6 +54,7 @@ export const instanceExperimentalSettingsSchema = z.object({
enablePublicMcp: z.boolean().default(false),
enableOpenAiDot: z.boolean().default(false),
enableChatConnectors: z.boolean().default(false),
enableGitHubReviewBots: z.boolean().default(false),
// Compatibility only: old stored and managed values must still parse.
enableMcpAggregators: z.boolean().default(true),
enableMemoryConnectors: z.boolean().default(false),
@@ -16,6 +16,13 @@ import {
import { createAgentSchema } from "./agent.js";
describe("issue validators", () => {
it("preserves the exact expected execution policy snapshot without defaults", () => {
const snapshot = { mode: "normal", stages: [], monitor: { nextCheckAt: "2026-10-10T12:00:00Z" } };
expect(updateIssueSchema.parse({ expectedExecutionPolicy: snapshot }).expectedExecutionPolicy).toEqual(snapshot);
expect(updateIssueSchema.parse({ expectedExecutionPolicy: null }).expectedExecutionPolicy).toBeNull();
expect(updateIssueSchema.parse({}).expectedExecutionPolicy).toBeUndefined();
expect(updateIssueSchema.safeParse({ expectedExecutionPolicy: [] }).success).toBe(false);
});
it("accepts private visibility without adding defaults to updates", () => {
expect(createIssueSchema.parse({ title: "Private", visibility: "private" }).visibility).toBe("private");
expect(createIssueSchema.parse({ title: "Open" }).visibility).toBe("open");
+9
View File
@@ -564,6 +564,10 @@ export const retryWorkspaceExportSchema = z.object({
export const resolveIssueRecoveryActionSchema = z
.object({
workspaceBaseRef: z.object({
requestedRef: z.string().trim().min(1).max(1024),
branch: z.string().trim().refine(isValidExistingBranchName, { message: "Choose a valid Git branch name" }),
}).strict().optional(),
executionReconciliation: z
.object({
runId: z.string().guid(),
@@ -581,6 +585,9 @@ export const resolveIssueRecoveryActionSchema = z
})
.strict()
.superRefine((value, ctx) => {
if (value.workspaceBaseRef && (!value.actionId || value.outcome !== "restored" || value.sourceIssueStatus !== "todo" || value.executionReconciliation)) {
ctx.addIssue({ code: z.ZodIssueCode.custom, path: ["workspaceBaseRef"], message: "Branch repair must retry the exact recovery action" });
}
if (value.outcome === "restored") {
// A retained-source repair records evidence without changing task state.
// The route verifies the exact server-owned source and unchanged status.
@@ -884,6 +891,8 @@ export const updateIssueSchema = objectWithoutDefaults(
)
.partial()
.extend({
/** Reject a policy write if the policy changed after the caller read it. */
expectedExecutionPolicy: z.record(z.string(), z.unknown()).optional().nullable(),
requestDepth: issueRequestDepthInputSchema.optional(),
assigneeAgentId: z.string().trim().min(1).optional().nullable(),
comment: multilineTextSchema.pipe(z.string().min(1)).optional(),