Skip to content

fix: 纳入上游权限、Redis Streams、Agent 与 Web LTS 修复 - #36

Merged
BlueSkyXN merged 23 commits into
mainfrom
codex/lts-upstream-intake-20260822
Aug 23, 2026
Merged

fix: 纳入上游权限、Redis Streams、Agent 与 Web LTS 修复#36
BlueSkyXN merged 23 commits into
mainfrom
codex/lts-upstream-intake-20260822

Conversation

@BlueSkyXN

@BlueSkyXN BlueSkyXN commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Summary

按 fork 的选择性 LTS 规则,纳入官方 upstream/main 最近 7 天窗口中已经完成 diff 审查、适合当前维护线的安全、权限、数据完整性、可靠性、自托管兼容和窄范围 Web 修复。

审计窗口为 2026-08-16 00:00:00 +0800upstream/main@e18310e52e,first-parent 共 169 个提交。本 PR 不是整体同步 upstream;相对 main 包含 20 个 upstream source fix commits,另有 3 个 fork 侧 review/test follow-up commits。

纳入的 upstream fixes(20 commits)

安全与权限

  • #41079 / #41080:data source integrates GET 补齐 admin + RBAC 权限。
  • #40897:保护 plugin endpoint listings。
  • #40989:强制 dataset document ownership。
  • #41022:RBAC 启用时修正 dataset permission 检查逻辑。
  • #40893:间接资源访问强制 app scope;测试按 fork 当前上下文适配。
  • #41041:datasource credential GET 补齐 edit + RBAC 权限;测试冲突按 fork 结构适配。
  • #40944 / #40945:Tool OAuth custom client GET 补齐 admin/owner 与 workspace CREDENTIAL_MANAGE 权限。

API、数据与可观测性可靠性

  • #40964:修复 Redis Streams 丢失 workflow_started 事件。
  • #41068:给会丢失 traceback 的 logger.warningexc_info=True
  • #40947:workflow logstore 时间戳归一化为 naive UTC。
  • #39129:chat pipeline 错误事件补发 MESSAGE_TRACE task。
  • #40400:Elasticsearch-JA adapter 增加 document_id keyword mapping,并修正 VectorType

Web / UI 窄范围修复

  • #40921:修复移动端登录页内容溢出。
  • #40994:删除 Agent 后正确重定向。
  • #40846:多模态引导高度自适应内容。
  • #41002:明确 Agent 删除后果提示。
  • #41009:移除 billing 中误导性的税务担保文案。
  • #40852:Agent 模式建议模型改为 deepseek-v4-flash
  • #41060:修复 Safari 裁切 tour recovery prompt;因 fork 未引入 upstream IconButton 迁移链,在现有 help-menu 结构上适配 triggerRef 并补回归测试。

Agent / Binding file

  • #41027:对齐 Binding file 上传超时。fork 当前仍是 pre-stdio runtime,因此按现有 config surface 适配,没有提前引入 #41021 -> #39997 -> #41023 的 shellctl/runtime 链。

Fork review follow-ups(3 commits)

  • 移除 workflow collaboration 测试中的 unused imports。
  • 修正 Binding timeout 的 Docker 配置优先级:变量归属 docker/envs/core-services/api.env.exampledify-agent.env.example,不再由 Compose environment 覆盖用户的 service-specific env_file 设置。
  • 恢复 #40893 测试适配遗漏的 nullcontext import;该遗漏由全量 changed API unit tests 捕获。

7 天窗口闭合分类

分类 数量 处理
MUST 1 #40945 权限修复已补入本 PR
SHOULD 11 有价值但存在语义、依赖或真实消费边界,留作独立 staged intake
ALREADY_EQUIVALENT 39 已精确纳入、由 fork 适配等价覆盖,或 upstream 本身为空提交
SKIP 118 test-only、普通 refactor、CI/tooling、SaaS 专属、产品策略、新功能或大型依赖链
合计 169 无漏计

保留为独立 intake 的 11 项

  • #39136:Qwen/vLLM system message 合并置首;会改变所有 provider 的 message 语义,需要真实 provider smoke 后独立决定。
  • #40935:恢复 metrics;24 文件且混入 enterprise telemetry,需先确认 fork 的真实 metrics 消费方。
  • Agent 数据完整性 bundle:#40872#40876#40896#40937#40972,必须按依赖整体 replay,不能零散 cherry-pick。
  • #40888:Agent 删除生命周期;会改变外部 Workflow dangling reference 语义,需要单独确认兼容策略。
  • shellctl/runtime bundle:#41021#39997#41023;未来应从当前 main 依 upstream 顺序重放,再重新适配 #41027

补充等价判断:#40962 是 upstream 空提交,生产权限语义已由 fork 的 #40900 覆盖;#40977#40980 已存在于 main,不计入本 PR 的 20 个 source commits。

Migration / compatibility note

  • 本 PR 没有数据库 migration 文件。
  • #40400 修改 Elasticsearch-JA index mapping;既有索引不会自动获得 document_id keyword mapping,需重建或按运维方案迁移索引后才会完全生效
  • 未改变 fork 现有 HFS provenance、Agent observability 或既有 selective-LTS 边界。

Verification

API

  • Changed unit test files:537 passed
  • make type-check:Pyrefly + mypy 通过,1675 个 source files 无错误。
  • make check:全 API Ruff 通过。
  • Response contract lint:476 valid0 mismatch;2 个既有 refactorable 均不在本 PR。
  • Import Linter:9 kept0 broken
  • dotenv lint:通过。

dify-agent / runtime

  • dify-agent local tests:761 passed,1 个 warning。
  • make -C dify-agent check:通过。
  • 本 PR 变更文件 basedpyright --level error0 errors, 0 warnings, 0 notes
  • dify-agent 完整 typecheck 仍有既有 baseline 58 errors,均在未修改的 examples/core tools/knowledge/runtime test stubs,当前改动文件未出现在错误列表。
  • dify-agent-runtime: go test ./...go vet ./... 通过。

Web / Dify UI

  • Web changed specs:9 files,187 passed
  • Dify UI Popover Browser Mode:4 passed
  • Dify UI typecheck:通过。
  • Web clean-source typecheck:通过;普通命令会被既有 .next/types/validator.tsenvironment-tabs/layout.tsdefault export 的缓存错误阻塞。
  • i18n:24 locales,0 missing keys。
  • changed-file formatter:76 files 全部通过。文件级 lint 的 13 errors / 25 warnings 均定位在本 PR 未修改行;Dify UI 3 个变更文件的 vp check 完全通过。

Git / CI boundary

  • git diff --check origin/main...HEAD:通过。
  • GitHub 上 4 个 fork Docker builds(API / Web / Agent / local-sandbox)已通过。
  • Main CI、Pyrefly、Semantic PR title、Labeler 使用的 Depot runners 在本 fork 长期 queued,尚未实际执行;不能表述为 CI 全绿。
  • main 当前没有 branch protection、ruleset 或 required review/check gate。

Delivery boundary

本 PR 完成 source、local verification、commit/PR/merge gate;没有执行生产/HFS 部署、数据库/索引迁移、真实 provider/runtime smoke 或业务 UAT,这些不能由本地测试和 GitHub merge 推导。

agarwalpranav0711 and others added 20 commits August 22, 2026 20:21
…anggenius#40964)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: QuantumGhost <obelisk.reg+git@gmail.com>
(cherry picked from commit 9d8dacd)
…#40947)

Co-authored-by: wangxiaolei <fatelei@gmail.com>
(cherry picked from commit 54ffbc7)
…39129)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
(cherry picked from commit e425e18)
…ggenius#40921)

Co-authored-by: gegemeimingzi <gegemeimingzi@users.noreply.github.com>
(cherry picked from commit 7d5c68c)
…icsearch-ja adapter (langgenius#40400)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
(cherry picked from commit 385e866)
)

Port popover positioner/popup hardening, tour recovery prompt focus fix
and help-menu trigger ref passthrough. Adapted to fork: skipped hunks
that depend on upstream-only refactors (langgenius#40396 dynamic titles, langgenius#40646
help-menu IconButton migration) covering account-setting dialog chrome,
integrations modal and main-nav spec scaffolding.

(cherry picked from commit faca558)
…GET endpoint (langgenius#41041)

Adapted to fork test layout: appended DatasourceAuth coverage to the
existing credential permission contract test instead of the upstream
hunk context.

(cherry picked from commit 43e59d3)
Port the Binding file download deadline chain (API client 240s, dify-agent
shell command 210s) across api/, dify-agent/ and dify-agent-runtime/.
Adapted to fork: fork's command runner predates upstream langgenius#39997 stdio mode,
so binding_files.py keeps its call signature; docker env contract test
rewritten for the fork's compose template layout.

(cherry picked from commit 0ca9931)
@BlueSkyXN BlueSkyXN changed the title LTS upstream intake 2026-08-22 (19 fixes from upstream) fix: 纳入上游权限加固、Redis Streams 与 Web 可靠性修复(19 项) Aug 22, 2026
@BlueSkyXN BlueSkyXN changed the title fix: 纳入上游权限加固、Redis Streams 与 Web 可靠性修复(19 项) fix: 纳入上游权限、Redis Streams、Agent 与 Web LTS 修复 Aug 23, 2026
@BlueSkyXN
BlueSkyXN merged commit 01466df into main Aug 23, 2026
6 of 10 checks passed
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.