Repository navigation
fix(FrogBoss):修复对弈竞猜相关资源,激活oas策略客制化权重。 - #1850
Conversation
There was a problem hiding this comment.
你好——我发现了 1 个问题
给 AI Agent 的提示
请处理此代码审查中的评论:
## 单独评论
### 评论 1
<location path="tasks/FrogBoss/script_task.py" line_range="98-103" />
<code_context>
+ if self._try_next_competition_fallback(idle_timer):
+ continue
+
+ if not history_checked and self.config.model.frog_boss.frog_boss_config.strategy_frog == Strategy.Oas:
+ if (self.appear(self.I_FROG_LOG_CHECK) or self.appear(self.I_BETTED)
+ or self.appear(self.I_FROG_BOSS_REST)
+ or (self.appear(self.I_BET_LEFT) and self.appear(self.I_BET_RIGHT))):
+ self.record_oas_history_page()
+ history_checked = True
+ idle_timer.reset()
+ continue
</code_context>
<issue_to_address>
**问题(更广泛的影响):** OAS 结算仅在初始记录页面检查期间执行一次,而成功和失败路径不再调用 `settle`,也不会以其他方式持久化当前回合的结果。第一回合之后,新完成的回合将永远不会添加到历史记录中,因此其来源权重会一直过时,直到任务重新启动。
**触发条件:** 任务在不重启的情况下持续运行并经历多个 FrogBoss 回合时。
**建议修复:** 根据检测到的获胜方或下注结果,立即结算每个已完成的回合;或者在每个回合完成后重新打开并处理记录页面,而不是通过 `history_checked` 永久限制该操作。
</issue_to_address>Sourcery 评估
需要人工审查。 首先需要处理 1 个发现的问题;模板匹配错误或经过签名的 OAS 权重可能会选择错误的一方,或重复提交下注,从而消耗游戏货币并记录错误结果,进而影响后续下注。回滚可以阻止进一步的错误行为,但无法撤销已经下达的下注;持久化的历史记录可以修复或清除。
阻塞性发现:tasks/FrogBoss/script_task.py:103
Original comment in English
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="tasks/FrogBoss/script_task.py" line_range="98-103" />
<code_context>
+ if self._try_next_competition_fallback(idle_timer):
+ continue
+
+ if not history_checked and self.config.model.frog_boss.frog_boss_config.strategy_frog == Strategy.Oas:
+ if (self.appear(self.I_FROG_LOG_CHECK) or self.appear(self.I_BETTED)
+ or self.appear(self.I_FROG_BOSS_REST)
+ or (self.appear(self.I_BET_LEFT) and self.appear(self.I_BET_RIGHT))):
+ self.record_oas_history_page()
+ history_checked = True
+ idle_timer.reset()
+ continue
</code_context>
<issue_to_address>
**issue (broader_impact):** OAS settlement is performed only once during the initial record-page check, while the success and failure paths no longer call `settle` or otherwise persist the current round's outcome. After the first round, newly completed rounds are never added to history, so their source weights remain stale until the task is restarted.
**Triggers:** When the task continues running through more than one FrogBoss round without restarting.
**Suggested fix:** Settle each completed round immediately from the detected winner or bet outcome, or reopen and process the record page after every completed round instead of permanently gating it with `history_checked`.
</issue_to_address>Sourcery assessment
Needs a human reviewer. 1 finding to address first, and a bad template match or signed OAS weighting can select the wrong side or repeatedly submit a wager, spending the game's currency and recording incorrect outcomes that influence later bets. Reverting can stop further incorrect behavior, but it cannot undo wagers already placed; the persisted history can be repaired or cleared.
Blocking findings: tasks/FrogBoss/script_task.py:103
| if not history_checked and self.config.model.frog_boss.frog_boss_config.strategy_frog == Strategy.Oas: | ||
| if (self.appear(self.I_FROG_LOG_CHECK) or self.appear(self.I_BETTED) | ||
| or self.appear(self.I_FROG_BOSS_REST) | ||
| or (self.appear(self.I_BET_LEFT) and self.appear(self.I_BET_RIGHT))): | ||
| self.record_oas_history_page() | ||
| history_checked = True |
There was a problem hiding this comment.
issue (broader_impact): OAS 结算仅在初始记录页面检查期间执行一次,而成功和失败路径不再调用 settle,也不会以其他方式持久化当前回合的结果。第一回合之后,新完成的回合将永远不会添加到历史记录中,因此其来源权重会一直过时,直到任务重新启动。
Triggers: 任务在不重启的情况下持续运行并经历多个 FrogBoss 回合时。
Suggested fix: 根据检测到的获胜方或下注结果,立即结算每个已完成的回合;或者在每个回合完成后重新打开并处理记录页面,而不是通过 history_checked 永久限制该操作。
Original comment in English
issue (broader_impact): OAS settlement is performed only once during the initial record-page check, while the success and failure paths no longer call settle or otherwise persist the current round's outcome. After the first round, newly completed rounds are never added to history, so their source weights remain stale until the task is restarted.
Triggers: When the task continues running through more than one FrogBoss round without restarting.
Suggested fix: Settle each completed round immediately from the detected winner or bet outcome, or reopen and process the record page after every completed round instead of permanently gating it with history_checked.
Change Summary
Reconstructed Intent点击此处展开
Observed Constraints点击此处展开
Intent Alignment
Release Risk
Validation Gaps点击此处展开
Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "ab.chatgpt.com"See Network Configuration for more information.
|
Findings
Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "ab.chatgpt.com"See Network Configuration for more information.
|
Sourcery 摘要
提升 FrogBoss 下注的可靠性,并启用由结果驱动的带符号 OAS 策略权重。
新功能:
错误修复:
增强功能:
测试:
Original summary in English
Summary by Sourcery
Improve FrogBoss betting reliability and activate outcome-driven, signed OAS strategy weighting.
New Features:
Bug Fixes:
Enhancements:
Tests: