Skip to content

chore: remove dead files resurrected by v1.0 launch commit - #6041

Merged
Calcium-Ion merged 1 commit into
QuantumNous:mainfrom
feitianbubu:chore/remove-resurrected-dead-files
Jul 9, 2026
Merged

chore: remove dead files resurrected by v1.0 launch commit#6041
Calcium-Ion merged 1 commit into
QuantumNous:mainfrom
feitianbubu:chore/remove-resurrected-dead-files

Conversation

@feitianbubu

@feitianbubu feitianbubu commented Jul 9, 2026

Copy link
Copy Markdown
Member

📝 变更描述 / Description

删三个没有任何调用方的遗留文件,共 -542 行,无功能变化:

  • controller/task_video.goservice/pre_consume_quota.go:之前分别在 ba25ba8116004f 里已经删过,v1.0 大提交 a42b397 带了回来

🚀 变更类型 / Type of change

  • 🐛 Bug 修复 (Bug fix)
  • ✨ 新功能 (New feature)
  • ⚡ 性能优化 / 重构 (Refactor)
  • 📝 文档更新 (Documentation)

🔗 关联任务 / Related Issue

✅ 提交前检查项 / Checklist

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

📸 运行证明 / Proof of Work

编译通过,业务正常

controller/task_video.go and service/pre_consume_quota.go were already
removed in ba25ba8 and 116004f (logic lives in service/task_polling.go
and BillingSession now), then brought back as stale copies by a42b397.
Both have zero callers.

controller/swag_video.go is a leftover swag stub: the swaggo pipeline is
gone and docs/openapi/relay.json already documents these routes.
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

This change removes three files entirely: controller/swag_video.go (Swagger-documented video generation handlers and request types), controller/task_video.go (video task update/dispatch logic), and service/pre_consume_quota.go (pre-consume quota validation and refund functions).

Changes

Cohort / File(s) Summary
Video Controller Removal
controller/swag_video.go
Removes video generation handler functions, request/parameter structs, and task query handlers for standard and Kling text-to-video/image-to-video endpoints.
Video Task Processing Removal
controller/task_video.go
Removes bulk and per-channel video task dispatch, per-task status/progress handling, quota re-billing/refund logic, and base64 redaction helpers.
Pre-Consume Quota Removal
service/pre_consume_quota.go
Removes ReturnPreConsumedQuota and PreConsumeQuota functions handling quota validation, pre-consumption, and asynchronous refund.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

  • QuantumNous/new-api#1349: Adds controller/swag_video.go and Kling request normalization, directly conflicting with its removal here.
  • QuantumNous/new-api#1775: Refactors how controller/relay.go calls PreConsumeQuota/ReturnPreConsumedQuota, touching the same functions removed here.
  • QuantumNous/new-api#2877: Also removes/replaces the legacy pre-consume quota handling in service/pre_consume_quota.go.

Suggested reviewers: creamlike1024

Poem

A rabbit hops through code so old,
Sweeping files no longer told,
Video tasks and quotas fade,
Clean burrow paths now newly made,
Hop, hop, away we go! 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: removing obsolete files that were reintroduced by the v1.0 launch commit.
✨ 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.

@Calcium-Ion
Calcium-Ion merged commit 246d62a into QuantumNous:main Jul 9, 2026
2 checks passed
xiaomingchen pushed a commit to xiaomingchen/new-api that referenced this pull request Jul 10, 2026
…us#6041)

controller/task_video.go and service/pre_consume_quota.go were already
removed in ba25ba8 and 116004f (logic lives in service/task_polling.go
and BillingSession now), then brought back as stale copies by a42b397.
Both have zero callers.

controller/swag_video.go is a leftover swag stub: the swaggo pipeline is
gone and docs/openapi/relay.json already documents these routes.
Seraphli pushed a commit to Seraphli/new-api that referenced this pull request Jul 10, 2026
…us#6041)

controller/task_video.go and service/pre_consume_quota.go were already
removed in ba25ba8 and 116004f (logic lives in service/task_polling.go
and BillingSession now), then brought back as stale copies by a42b397.
Both have zero callers.

controller/swag_video.go is a leftover swag stub: the swaggo pipeline is
gone and docs/openapi/relay.json already documents these routes.
lansine pushed a commit to evin-pubb/new-api-fork that referenced this pull request Jul 14, 2026
…us#6041)

controller/task_video.go and service/pre_consume_quota.go were already
removed in ba25ba8 and 116004f (logic lives in service/task_polling.go
and BillingSession now), then brought back as stale copies by a42b397.
Both have zero callers.

controller/swag_video.go is a leftover swag stub: the swaggo pipeline is
gone and docs/openapi/relay.json already documents these routes.
zhaodechao2008 pushed a commit to zhaodechao2008/new-api that referenced this pull request Jul 27, 2026
…us#6041)

controller/task_video.go and service/pre_consume_quota.go were already
removed in ba25ba8 and 116004f (logic lives in service/task_polling.go
and BillingSession now), then brought back as stale copies by 674f687.
Both have zero callers.

controller/swag_video.go is a leftover swag stub: the swaggo pipeline is
gone and docs/openapi/relay.json already documents these routes.
330079598 pushed a commit to 330079598/new-api that referenced this pull request Aug 19, 2026
…us#6041)

controller/task_video.go and service/pre_consume_quota.go were already
removed in ba25ba8 and 116004f (logic lives in service/task_polling.go
and BillingSession now), then brought back as stale copies by a42b397.
Both have zero callers.

controller/swag_video.go is a leftover swag stub: the swaggo pipeline is
gone and docs/openapi/relay.json already documents these routes.
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.

2 participants