Skip to content

fix: expand channels.group column length (#6017) - #6111

Closed
cat0825 wants to merge 2 commits into
QuantumNous:mainfrom
cat0825:codex/fix-6017-channel-group-length
Closed

cat0825 wants to merge 2 commits into
QuantumNous:mainfrom
cat0825:codex/fix-6017-channel-group-length

Conversation

@cat0825

@cat0825 cat0825 commented Jul 11, 2026 •

Copy link
Copy Markdown

⚠️ 提交说明 / PR Notice

Important

  • 请提供人工撰写的简洁摘要,避免直接粘贴未经整理的 AI 输出。

📝 变更描述 / Description

将 channels.group 字段从 varchar(64) 扩展到 varchar(1024),避免渠道关联多个/较长分组时保存失败,也避免升级后 AutoMigrate 把字段改回 64。

This PR was AI-assisted and manually reviewed before submission.

🚀 变更类型 / Type of change

  • 🐛 Bug 修复 (Bug fix) - 请关联对应 Issue,避免将设计取舍、理解偏差或预期不一致直接归类为 bug
  • ✨ 新功能 (New feature) - 重大特性建议先通过 Issue 沟通
  • ⚡ 性能优化 / 重构 (Refactor)
  • 📝 文档更新 (Documentation)

🔗 关联任务 / Related Issue

✅ 提交前检查项 / Checklist

  • 人工确认: 我已亲自整理并撰写此描述,没有直接粘贴未经处理的 AI 输出。
  • 非重复提交: 我已搜索现有的 Issues 与 PRs,确认不是重复提交。
  • Bug fix 说明: 若此 PR 标记为 Bug fix,我已提交或关联对应 Issue,且不会将设计取舍、预期不一致或理解偏差直接归类为 bug。
  • 变更理解: 我已理解这些更改的工作原理及可能影响。
  • 范围聚焦: 本 PR 未包含任何与当前任务无关的代码改动。
  • 本地验证: 已在本地运行并通过测试或手动验证,维护者可以据此复核结果。
  • 安全合规: 代码中无敏感凭据,且符合项目代码规范。

📸 运行证明 / Proof of Work

Change is schema-tag only. Verified with:
git show HEAD:model/channel.go | rg 'Group.*varchar\(1024\)'

Summary by CodeRabbit

  • Improvements
    • Increased the maximum supported length for channel group names.
    • Preserved the default group value for new channels.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f4970ab9-9092-405d-a64c-cbdb5e319668

📥 Commits

Reviewing files that changed from the base of the PR and between 918427d and c16bebd.

📒 Files selected for processing (1)
  • model/channel.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • model/channel.go

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


Walkthrough

The Channel.Group GORM column mapping changes from varchar(64) to varchar(1024). The default remains 'default'.

Changes

Channel group column capacity

Layer / File(s) Summary
Widen Channel.Group mapping
model/channel.go
The GORM column type changes to varchar(1024) and retains the 'default' value.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to c16be

This PR only expands the channels.group column capacity to prevent valid longer group values from failing to save; no actionable merge-blocking risk remains beyond normal checks.

Poem

A rabbit widens the channel lane,
Longer groups now fit without strain.
The default value stays in place,
More characters have storage space.
The schema hops at a steady pace.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: increasing the length of the channels.group column.
Linked Issues check ✅ Passed The change addresses issue #6017 by increasing Channel.Group from varchar(64) to varchar(1024). The updated GORM annotation also prevents AutoMigrate from reverting the column to varchar(64).
Out of Scope Changes check ✅ Passed The pull request contains one schema annotation change directly related to the linked issue. No unrelated changes are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cat0825

cat0825 commented Jul 13, 2026

Copy link
Copy Markdown
Author

该分支当前可合并,PR Check 与 CodeRabbit 均已通过。PR 仍处于 draft,但 GitHub 拒绝由当前作者账号执行 ready for review(仓库权限不足);烦请维护者协助转为 Ready。

@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@cat0825

cat0825 commented Aug 29, 2026

Copy link
Copy Markdown
Author

已 rebase 到最新 main(此前落后 190 个 commit,现在 ahead 2, behind 0),无冲突,MERGEABLE。

关于这次 CI 红:Backend vet, build, and test 失败在 relay/channel/task/jsplugin/adaptor_test.go:318(TestTaskAdaptorReDecodesFinalCandidateAndRejectsModelDrift),与本 PR 无关,本 PR 只改了一行 model/channel.go 的 gorm tag。判断依据:

我没有 rerun 权限(gh run rerun 返回 Must have admin rights to Repository),麻烦维护者点一次 re-run 就应该会绿。

范围:仅 #6017 —— 扩长 channels.group 列,避免分组名多了以后被截断。

@Calcium-Ion @seefs001 麻烦有空时 review,另外这个 PR 和 #6112 都还挂在 draft 上,我的账号没有 ready for review 权限,也请顺手帮忙转成 Ready。

@seefs001 seefs001 closed this Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

扩大 channel.group 的字段长度限制

2 participants