Repository navigation
fix(task): 修复任务提交与轮询请求头覆盖(#202) - #206
Merged
Merged
Conversation
Port upstream 9a42033 (QuantumNous#7918). Preserve fork wallet task paths, credential redirect boundaries, content extraction and early keepalive behavior. Closes #202 AI-assisted implementation and focused verification.
This was referenced Nov 5, 2026
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.
🔗 关联任务 / Related Issue
Closes #202
上游:9a42033a616f7196a5d2d10aad4f56191df021b5(QuantumNous#7918)。仅移植这一提交。
🚀 变更类型 / Type of change
📝 变更描述 / Description
渠道请求头覆盖在任务提交、单任务/批量轮询、实时查询及带凭据下载中生效;保存的任务密钥用于轮询占位符,无客户端上下文时跳过客户端头规则。实时查询发现终态时交给既有轮询结算路径,修复失败任务未退款。
手工解决 api_request.go 与 jsplugin/adaptor.go 冲突,保留 fork 钱包任务发送/受限查询、重定向凭据边界、内容路径校验及心跳。无依赖、OAuth、session 或迁移改动;仅授权的 10 个文件,无新增测试文件。
由 Codex AI 辅助实现并执行验证;git 身份 woncc 与近期主要作者一致。独立人工审查尚待完成。
📸 运行证明 / Proof of Work
基线 overlay 上三个新增回归均失败:覆盖头缺失,失败任务仍扣 1000;候选上覆盖优先级、保存密钥、非法头拒绝、跨域重定向剥离及退款/重复读取不二次退款均通过。
实际执行(Go 1.27.2,所有 Go 命令使用
GOMAXPROCS=2 RAYON_NUM_THREADS=2 GOWORK=off):以上全部通过。controller/service/relay 另运行具名集成回归,覆盖下载、轮询初始化、钱包协议及早期 keepalive,三个包均通过;完整命令保存在 evidence 的 commands.json。
退款回归使用真实 SQLite 3.50.4、MySQL 8.0.46、PostgreSQL 15.19。SQLite 在上述具名集成回归中通过;MySQL/PostgreSQL 在本包专用临时数据库运行以下命令并通过,运行后删除自建数据库,未操作 KEEP 数据或引擎生命周期:
测试 DSN 仅经私有环境变量传入。未跑全套矩阵、未访问真实提供方、未部署。首次编译发现 fork 测试调用需补充新 key 参数,修正后通过,原失败日志保留。
安全参考:ASVS 5.0.0、Authentication、Session Management、REST Security。验证限于此改动:凭据放请求头、不持久化客户端头、保留可信主机/端口边界及 HTTPS 降级拒绝;不声明全项目合规。
证据:
/home/box/.parallel-project-orchestrator/programs/new-api-cherry-20261022/evidence/R0212W202/g4-R0212W202-9a42033a6-01/(commands.json、原始日志、补丁及哈希清单)。✅ 提交前检查项 / Checklist