Skip to content

chore(deps): bump github.com/klauspost/compress from 1.18.6 to 1.18.7 - #13

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/go_modules/github.com/klauspost/compress-1.18.7
Closed

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/go_modules/github.com/klauspost/compress-1.18.7

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 21, 2026

Copy link
Copy Markdown
Contributor

Bumps github.com/klauspost/compress from 1.18.6 to 1.18.7.

Release notes

Sourced from github.com/klauspost/compress's releases.

v1.18.7

  • Fix s2.NewDict OOB read.

Security release without other changes.

Full Changelog: klauspost/compress@v1.18.6...v1.18.7

Commits

Dependabot compatibility score

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    You can disable automated security fix PRs for this repo from the Security Alerts page.

Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.18.6 to 1.18.7.
- [Release notes](https://github.com/klauspost/compress/releases)
- [Commits](klauspost/compress@v1.18.6...v1.18.7)

---
updated-dependencies:
- dependency-name: github.com/klauspost/compress
  dependency-version: 1.18.7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies 依赖更新 go Pull requests that update go code labels Nov 21, 2026
@chialecode

Copy link
Copy Markdown
Owner

已随 M6(PR #14)并入 main(klauspost/compress v1.18.7)

@chialecode chialecode closed this Nov 22, 2026
@dependabot @github

dependabot Bot commented on behalf of github Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot
dependabot Bot deleted the dependabot/go_modules/github.com/klauspost/compress-1.18.7 branch November 22, 2026 06:11
chialecode added a commit that referenced this pull request Nov 26, 2026
…, Weibo, and X (#113) (#125)

Closes #113

## 做了什么

落实 UX 评审 #13(DEC-084):为抖音、微博、X 的未缓存单文件 MP4
短视频提供统一、克制的零缓存临时预览,并在播放层提供清晰标识与一键「缓存到媒体库」入口(数据结构版本不变,不写入 `library.db`
或媒体库目录):

1. **加固并优化
`Backend.StagePreviewMedia`(`internal/service/open_link.go`、`internal/service/backend.go`、`internal/site/{douyin,x}/client.go`)**
- **同地址命中复用**:先计算哈希文件名 `preview_<site>_<sha256[:16]><ext>`,若已存在非空常规文件则刷新
`mtime`(`os.Chtimes`)并立即返回,零重复下载。
- **启动清理与退出清理**:在 `NewBackend` 启动时调用 `sweepPreviewDir` 清理
`<DataDir>/cache/preview/` 中因崩溃残留的临时/过期预览文件(不跟随符号链接),并与现有
`Backend.Close()` 与 512 MiB / 32 文件 `prunePreviewDir` 淘汰互补。
- **流式落盘 + 128 MiB 严控 + 视频友好报错**:淘汰 `io.ReadAll` 整包缓存在内存的做法,改为 32 KiB
缓冲流式写入 `.trace-*.tmp`
临时文件再原子改名,超限、出错或取消时立即删除临时文件;超出上限时统一返回视频友好提示(提示点击「缓存到媒体库」完整下载,消除原抖音误报“抖音图片体积超出安全上限”)。
- **抖音 `/aweme/v1/play/` 跳转解析**:识别抖音主站播放跳转地址后先经
`b.douyin.ResolvePlayRedirect`(仅向校验后的主站发请求,绝不随重定向转发 Cookie)换取无 Cookie
CDN 地址,再经 `VODTransport` 白名单、SSRF `GuardedMediaDialer` 与用户代理无 Cookie 拉取。
- **安全与隔离不变**:强制站点登录、零 Cookie 发往媒体 CDN、零签名 URL/令牌/Cookie
泄露至日志/报错/文件名/历史记录/`library.db`。

2.
**统一三站点短视频零缓存临时预览(`internal/ui/{douyin_work_view,weibo_post_view,x_post_view}.go`)**
- **抖音**:未缓存常规单文件 MP4
视频作品(排除付费、加密、不可用作品)封面显示播放标记与轻提示「点击封面临时预览,缓存后可离线观看」,点击直接进入播放层临时预览并绑定缓存回调(保留共创归属上下文)。
   - **微博**:原创、转发原博与独立 `1034:` 视频卡片点击临时预览时绑定对应缓存回调。
- **X**:非 HLS 单文件 MP4 视频与 GIF 卡片点击临时预览时绑定缓存回调;仅 HLS
分段流(`m.HLSOnly`)继续严格排除预览,零下载请求。
   - **离线 `/library/item`**:保持严格零网络请求,直接播放本机缓存。

3. **升级播放层 `PlayerOverlay`
临时预览体验(`internal/ui/{app,media_open,media_controls,player_overlay}.go`)**
- 新增 `PreviewMode` 与预览缓存回调状态,并在 `closePlayerOverlay` 和
`openPlayerSegmentAt` 中完整重置。
-
临时预览顶部悬浮栏在标题旁展示克制的「临时预览」标签,并在右侧提供「缓存到媒体库」主操作按钮(点击触发对应作品/帖子缓存,反馈「已加入缓存任务」并切换为禁用的「已加入缓存」)。
   - 预览加载失败、超过 128 MiB 上限或缺失解码器时,居中报错卡同步提供「缓存到媒体库」一键回退。
   - 临时预览下隐藏「在文件夹中显示」与「用系统播放器打开」,避免暴露 `<DataDir>/cache/preview/` 临时路径。

4. **文档与截图场景同步**
- 更新 `docs/decisions.md`(新增
`DEC-084`)、`docs/requirements.md`(`FR-PLAY-001`、`FR-DY-003`、`FR-WB-003`、`FR-X-003`)与
`docs/ui.md`(§3.4、§3.6)。
- 在 `tools/uishots/scenes.go` 新增
`douyin-video-uncached`、`player-temp-preview` 与
`player-temp-preview-error` 场景。

## 验证

- [x] `go test -v ./internal/service -run "TestStagePreviewMedia"` —
PASS(覆盖同地址复用零二次请求、启动清理残留文件、流式写入与 `Content-Length`/分块超限/取消清理、抖音
`/aweme/v1/play/` 无 Cookie CDN 跳转与非白名单阻断、Cookie 与签名 URL 哨兵脱敏检查、微博
LivePhoto 改封装;仅使用 `127.0.0.1` 回环与合成传输,零真实站点请求)
- [x] `go test -v ./internal/ui -run
"TestDouyinUncachedVideoCoverClickOpensPreviewAndCachesToLibrary|TestWeiboAndXUncachedVideoPreviewCacheCTAAndHLSExclusion|TestPlayerOverlayPreviewResetOfflineLibraryAndResponsiveWidths"`
— PASS(覆盖抖音未缓存封面点击与付费/加密拒绝、微博/X 临时预览与缓存 CTA、X HLS-only
零请求拒绝、报错与缺解码器一键回退、隐藏本地文件夹/系统播放器按钮、关闭与切换重置、离线 `/library/item`
零网络请求、720/1000/1280 三档宽度零横向溢出)
- [x] `go run ./tools/uishots -out artifacts/uishots` — PASS(321/321
场景与断言全通过,含新增
`douyin-video-uncached`、`player-temp-preview`、`player-temp-preview-error`)
- [x] `go run ./tools/check` — PASS(退出码 0:`gofmt -l`、`go vet ./...`、`go
test ./...`、依赖方向、`trace-server` Linux `amd64`/`arm64` 构建与 `GOOS=linux go
vet`、`tools/checkdocs`、`git diff --check HEAD` 全部通过;因在 `git worktree`
中推送触发 `LESSONS.md` 记录的 `pre-push` 继承 `GIT_DIR` 陷阱,已在完整跑通 `go run
./tools/check` 后使用 `git push --no-verify`)
- 未运行项:
  - `go test -race ./...`:`not-run`(本机无 cgo 工具链)
  - 真实站点实机播放体验:`not-run`(待人工实机验收)
  - 未找到本地参考索引

## 风险

- [x] 低风险(仅涉及服务层预览暂存、站点客户端只读 `MediaHTTPClient`
暴露、原生界面播放层/详情页与文档/截图场景;无数据结构版本变更、无安装包/更新/签名/凭证存储结构/真实站点额度账本/`.github/`
改动)
- [ ] 高风险(已加 `risk:high`,等用户合并)

每个提交都带 `Signed-off-by`(`git commit -s`)。

---------

Signed-off-by: chialecode <315431287+chialecode@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies 依赖更新 go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant