Repository navigation
feat: scope content moderation to selected upstream accounts - #848
Merged
Merged
Conversation
ranxi2001
marked this pull request as ready for review
November 14, 2026 12:41
This was referenced Nov 14, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
解决的问题与行为变化
all保持原 group-only;selected与原始分组、模型范围 AND,空账号列表不匹配任何请求。真实选号后、generation 前检查;未选 A → 选中 B 的 failover 会审计,已审相同逻辑请求/turn 不重复调用。WS 每个新 turn 使用当前客户端模型和内容,重放沿用原决定。9aeeeb3a235014a09994ce5dc6c441edcdd9f1b3。最终候选独审、原生附件及合并前门槛已完成;本轮另外回读该合并提交的 9 个工作流均成功。仅源码交付,不代表发版、部署或生产验收。 当前候选ae4300a0217471f4646c51ee5c1f67eb8dbe6c10;本 PR 仅源码合并,不发版、deploy 或修改生产配置。关联记录与来源
4189ed821d6e4308b2f5fc3791b73d2eb53cda8a,baseproduction。管理员新功能提示
ID / 登记项:
moderation-upstream-account-scope,NEW_FEATURE_NOTICES.moderationUpstreamAccountScope。所有展示位置:内容审计设置页签栏、范围页的“上游账号范围”标题。
关闭行为:两处共用 ID,点击任一标签同步隐藏;当前浏览器、当前管理员 localStorage 持久化,不承诺跨浏览器/服务端同步。
ID 沿用 / 重新公告:这是新功能的新 ID,不替换已有公告 ID。
必要回归:真实父页面/共享组件 + 既有 badge 单测;远程 browser 使用真实 CSS、BaseDialog、locale 与 synthetic API,逐项执行如下操作。当前候选复跑已通过。
A 已关闭后 B 新 ID 仍显示:当前 ae4300 browser 四种语言/设备组合通过。
B 两入口同步隐藏:当前 ae4300 browser 四种组合通过。
同浏览器同管理员 reload 后 B 仍隐藏:当前 ae4300 browser 四种组合通过。
C 新 ID 仍显示、A/B 不复活:当前 ae4300 browser 与实际 notice ID 单测通过;无跨浏览器声明。
复现与验收
backend/internal/handler/moderation_upstream_*_test.go、admin scope/catalog tests、service scope tests、PostgreSQL integration;frontend wrapper/parent/badge tests 与.github/scripts/moderation-scope-preview.mjs。协议、调度或传输改动补充
response.create→ loopbackresponse.completed;拒绝时单一 policy error 且 zero generation。三 turn fixture 在第二 turn failover,第三 turn 必须重新审计;别名 public-a/public-b 映射到相同上游模型时按当前别名判定。实际验证
git diff --checkUI 图片不提交仓库。当前 ae4300 的 8 张 CI PNG 与 manifest 全部匹配,4 组语言/设备交互通过;监督完成 GitHub 原生附件上传及字节 hash 读回,writer 复核映射和本地证据 hash。原始早期 baseline 未稳定,不作为最终截图验收。
验证边界(不是全路径穷举声明)
兼容性与运行影响
upstream_account_scope、upstream_account_ids。缺失 scope 默认 all;selected 空列表不扩大范围;unknown scope 和非法/不存在/不支持 ID 拒绝。账号目录资格来自与 save 相同的服务端谓词。文档与用户可见变化
中英文说明本站供应商账号、AND、空选择与 account-only 模式;新增已选 ID 管理、资格禁用原因及变更绑定恢复步骤。设计/兼容说明位于
docs/implementation/moderation-upstream-account-scope.md。Agent 使用声明
gpt-6.1-sol;writer 实际gpt-6-astra(监督核 rollout turn_context);独立 reviewers 实际gpt-6-astra(监督核review-7968-backend.log/review-7968-ui.logCLI header)。xhigh(同上核实);独立 reviewers 实际xhigh(监督核同一 CLI header);Hermes 推理强度未暴露,未知。fast仅 requested,不宣称 delivered fast。提交前自查
2026-11-14 维护父级最终核验
固定
ae4300a0217471f4646c51ee5c1f67eb8dbe6c10:131 checks(87 success、44条件skipped)、54 workflow runs/current attempts 全部完成,traditional statuses=0。原独审七项机制/F1–F4/指针类型发现均有源码关闭映射;本轮父级亲读限定源码与差异、专用4 job原始日志和模板,并独立下载8张原生附件核SHA256与正文链接,视觉核对桌面前后及手机中文。UI为真实CSS/合成API;另有真实认证admin PUT/GET PostgreSQL回归,不宣称生产/真实供应商。旧 all-scope 行为不属于本次修复声明。维护授权覆盖ready/固定head合并;不含Release、部署、生产配置或付费请求。Agent补充:Hermes Agent /
gpt-6.1-sol/ 推理强度未知(运行时未暴露),负责本轮独立复核、附件读回、精确CI/base检查和固定SHA合并;原writer及独立reviewers声明保留。