+{"timestamp":"2026-05-14T20:58:46.411Z","type":"event_msg","payload":{"type":"patch_apply_end","call_id":"call-0006","turn_id":"turn-0004","stdout":"Success. Updated the following files:\nA /sandbox/beads/internal/storage/issueops/dialect_mysql.go\n","stderr":"","success":true,"changes":{"/sandbox/beads/internal/storage/issueops/dialect_mysql.go":{"type":"add","content":"//go:build !sqlite_lite\n\npackage issueops\n\nimport \"fmt\"\n\nfunc insertIssueSQL(table string) string {\n\treturn fmt.Sprintf(`\n\t\tINSERT INTO %s (\n\t\t\tid, content_hash, title, description, design, acceptance_criteria, notes,\n\t\t\tstatus, priority, issue_type, assignee, estimated_minutes,\n\t\t\tcreated_at, created_by, owner, updated_at, started_at, closed_at, external_ref, spec_id,\n\t\t\tcompaction_level, compacted_at, compacted_at_commit, original_size,\n\t\t\tsender, ephemeral, no_history, wisp_type, pinned, is_template,\n\t\t\tmol_type, work_type, source_system, source_repo, close_reason,\n\t\t\tevent_kind, actor, target, payload,\n\t\t\tawait_type, await_id, timeout_ns, waiters,\n\t\t\tdue_at, defer_until, metadata\n\t\t) VALUES (\n\t\t\t?, ?, ?, ?, ?, ?, ?,\n\t\t\t?, ?, ?, ?, ?,\n\t\t\t?, ?, ?, ?, ?, ?, ?, ?,\n\t\t\t?, ?, ?, ?,\n\t\t\t?, ?, ?, ?, ?, ?,\n\t\t\t?, ?, ?, ?, ?,\n\t\t\t?, ?, ?, ?,\n\t\t\t?, ?, ?, ?,\n\t\t\t?, ?, ?\n\t\t)\n\t\tON DUPLICATE KEY UPDATE\n\t\t\tcontent_hash = VALUES(content_hash),\n\t\t\ttitle = VALUES(title),\n\t\t\tdescription = VALUES(description),\n\t\t\tdesign = VALUES(design),\n\t\t\tacceptance_criteria = VALUES(acceptance_criteria),\n\t\t\tnotes = VALUES(notes),\n\t\t\tstatus = VALUES(status),\n\t\t\tpriority = VALUES(priority),\n\t\t\tissue_type = VALUES(issue_type),\n\t\t\tassignee = VALUES(assignee),\n\t\t\testimated_minutes = VALUES(estimated_minutes),\n\t\t\tupdated_at = VALUES(updated_at),\n\t\t\tstarted_at = VALUES(started_at),\n\t\t\tclosed_at = VALUES(closed_at),\n\t\t\texternal_ref = VALUES(external_ref),\n\t\t\tsource_repo = VALUES(source_repo),\n\t\t\tclose_reason = VALUES(close_reason),\n\t\t\tmetadata = VALUES(metadata)\n\t`, table)\n}\n\nfunc insertLabelSQL(table string) string {\n\treturn fmt.Sprintf(`INSERT IGNORE INTO %s (issue_id, label) VALUES (?, ?)`, table)\n}\n\nfunc upsertLabelSQL(table string) string {\n\treturn fmt.Sprintf(`\n\t\tINSERT INTO %s (issue_id, label)\n\t\tVALUES (?, ?)\n\t\tON DUPLICATE KEY UPDATE label = label\n\t`, table)\n}\n\nfunc upsertDependencyNoopSQL(table string) string {\n\treturn fmt.Sprintf(`\n\t\tINSERT INTO %s (issue_id, depends_on_id, type, created_by, created_at)\n\t\tVALUES (?, ?, ?, ?, ?)\n\t\tON DUPLICATE KEY UPDATE type = type\n\t`, table)\n}\n\nfunc upsertChildCounterMaxSQL() string {\n\treturn `\n\t\tINSERT INTO child_counters (parent_id, last_child) VALUES (?, ?)\n\t\tON DUPLICATE KEY UPDATE last_child = GREATEST(last_child, ?)\n\t`\n}\n\nfunc setChildCounterSQL() string {\n\treturn `\n\t\tINSERT INTO child_counters (parent_id, last_child) VALUES (?, ?)\n\t\tON DUPLICATE KEY UPDATE last_child = ?\n\t`\n}\n\nfunc insertDependencyNowSQL(table string) string {\n\treturn fmt.Sprintf(`\n\t\tINSERT INTO %s (issue_id, depends_on_id, type, created_at, created_by, metadata, thread_id)\n\t\tVALUES (?, ?, ?, NOW(), ?, ?, ?)\n\t`, table)\n}\n\nfunc upsertRepoMtimeSQL() string {\n\treturn `\n\t\tINSERT INTO repo_mtimes (repo_path, jsonl_path, mtime_ns, last_checked)\n\t\tVALUES (?, ?, ?, NOW())\n\t\tON DUPLICATE KEY UPDATE\n\t\t\tjsonl_path = VALUES(jsonl_path),\n\t\t\tmtime_ns = VALUES(mtime_ns),\n\t\t\tlast_checked = NOW()\n\t`\n}\n\nfunc upsertFederationPeerSQL() string {\n\treturn `\n\t\tINSERT INTO federation_peers (name, remote_url, username, password_encrypted, sovereignty)\n\t\tVALUES (?, ?, ?, ?, ?)\n\t\tON DUPLICATE KEY UPDATE\n\t\t\tremote_url = VALUES(remote_url),\n\t\t\tusername = VALUES(username),\n\t\t\tpassword_encrypted = VALUES(password_encrypted),\n\t\t\tsovereignty = VALUES(sovereignty),\n\t\t\tupdated_at = CURRENT_TIMESTAMP\n\t`\n}\n\nfunc insertDefaultConfigSQL() string {\n\treturn `\n\t\tINSERT IGNORE INTO config (` + \"`key`\" + `, value) VALUES\n\t\t\t('compaction_enabled', 'false'),\n\t\t\t('compact_tier1_days', '30'),\n\t\t\t('compact_tier1_dep_levels', '2'),\n\t\t\t('compact_tier2_days', '90'),\n\t\t\t('compact_tier2_dep_levels', '5'),\n\t\t\t('compact_tier2_commits', '100'),\n\t\t\t('compact_batch_size', '50'),\n\t\t\t('compact_parallel_workers', '5'),\n\t\t\t('auto_compact_enabled', 'false')\n\t`\n}\n\nfunc jsonPathExistsClause() string {\n\treturn \"JSON_EXTRACT(metadata, ?) IS NOT NULL\"\n}\n\nfunc jsonPathEqualsClause() string {\n\treturn \"JSON_UNQUOTE(JSON_EXTRACT(metadata, ?)) = ?\"\n}\n\nfunc recentIssueSortClause() string {\n\treturn `\n\t\tCASE WHEN created_at >= DATE_SUB(NOW(), INTERVAL 48 HOUR) THEN 0 ELSE 1 END ASC,\n\t\tCASE WHEN created_at >= DATE_SUB(NOW(), INTERVAL 48 HOUR) THEN priority ELSE 999 END ASC,\n\t`\n}\n"}},"status":"completed"}}
0 commit comments