工程(注释标记词换代·oracle→判据出处): 用户 2026-11-07 令——判据出处注记的标记词改用项目已有中文名,避免 Oracle 被读成数据库。注释格式句、机检正则、标识符、卡片与登记同步换代;零行为改动。
改动面 112 文件 572+/572-:game/tests/** 与 game/probe/** 共 106 件 545 行 `# oracle:`→`# 判据出处:`;tools/capability_audit.py 正则字面量换中文+ORACLE_*→CRITERION_*/check_oracle_markers→check_criterion_markers/oracle_marked(flagged)→criterion_* 共 11 行;test-conventions.md:119 格式句+:155 措辞;待办清单与需求卡片-QA覆盖余量收口批各 1 处字面量;coverage_enum.py:21 与 camp_scene_layout_test.gd:101 旁支措辞;ui_click_probe.gd 对拍局部变量 oracle→expected 7 处;auto_player.gd 三处 safe_set 真值措辞。不动:历史审计报告两份、test-oracle-anchor 分支名、git 史、生成日志;指针格式/扫描面/判红条件/验收义务全不变。 读数(区内实跑):改前 capability_audit --strict「417 注记函数·红项 0」→改后「417 判据出处注记函数·红项 0」exit=0;新标记 545 行/106 文件,现行义务面 oracle 残留 0(在册沿革除外);diff 自检 game/ 非注释新增行仅 6 行且全在 ui_click_probe.gd 的 expected 变量段;112 改动文件 CRLF=0;py_compile tools/capability_audit.py OK;--docs exit=0【验收通过】无新增红;--gates exit=0(静态扫描绿、闸壳 bash -n ×13 失败 0)。
This commit is contained in:
1 parent
166114e094
commit
9f21236f80
112 files changed
+572
-572
No files matched your search
@@ -61,7 +61,7 @@ func _ready() -> void:
|
||||
if main.ui.modals.menu.debug_overlay.visible:
|
||||
_problems.append("调试浮窗 boot 自动开(菜单优先失守)")
|
||||
# ---- 营地购买合成点击路径(选档进档开层→购买→关闭全走真实按钮信号路径;
|
||||
# oracle: design/gdd/systems/跨局循环/天赋树.md:198 (营地购买段——单币购买只扣钥石组)
|
||||
# 判据出处: design/gdd/systems/跨局循环/天赋树.md:198 (营地购买段——单币购买只扣钥石组)
|
||||
# 隔离存档换注 main.meta 保确定性(禁碰真实档 user://save.json);陈旧档段首清理)----
|
||||
for p0 in ["user://smoke_click_probe_reset.json", "user://smoke_click_probe_reset.json.tmp"]:
|
||||
if FileAccess.file_exists(p0):
|
||||
@@ -214,7 +214,7 @@ func _ready() -> void:
|
||||
if main.ui.modals.camp.scene.visible or not main.ui.screens.start_overlay.visible:
|
||||
_problems.append("营地关闭后未恢复开始层〔句柄子容器批 V1〕")
|
||||
# ---- 选档界面行为走查(迭代 33 卡③):sl5 空槽新档链/sl6 有档槽进档链/sl7 删档二次确认双路径
|
||||
# oracle: design/gdd/systems/表现与支撑/存档序列化.md:61 (选档走查段——激活态建立组)
|
||||
# 判据出处: design/gdd/systems/表现与支撑/存档序列化.md:61 (选档走查段——激活态建立组)
|
||||
# /sl8 消费方分派单口/sl12 动线序不回闪。开层=函数直调(「进入存档」钮归卡② mn3——中间态在案);
|
||||
# 隔离=attach_slot_template 注入命名空间,夹具按槽直写(卡① 注入口)。----
|
||||
var csel_tpl := "user://smoke_click_probe_savesel_slot_%d.json"
|
||||
@@ -318,7 +318,7 @@ func _ready() -> void:
|
||||
_problems.append("[savesel] 关闭后层未隐藏或开始层未恢复(模态栈单口失守)")
|
||||
|
||||
# ---- 设置面段(隔离 store 换注禁碰真实 user://settings.cfg;真实按钮信号路径)----
|
||||
# oracle: design/gdd/systems/表现与支撑/设置与本地化.md:4 (设置面段——最小设置面组)
|
||||
# 判据出处: design/gdd/systems/表现与支撑/设置与本地化.md:4 (设置面段——最小设置面组)
|
||||
for p0 in ["user://smoke_click_probe_settings.cfg"]:
|
||||
if FileAccess.file_exists(p0):
|
||||
DirAccess.remove_absolute(p0)
|
||||
@@ -385,7 +385,7 @@ func _ready() -> void:
|
||||
if ProbeUiUtil.find_button(main.ui.modals.menu.settings_overlay, "退出游戏", "prefix") != null:
|
||||
_problems.append("设置面仍含退出游戏按钮(二轮 D1——只在一级菜单出现)")
|
||||
# ---- 生涯页段(入口点击链+关闭回返,真实按钮信号路径;本页只读零写,
|
||||
# oracle: design/ux/camp.md:45 (生涯页段——同壳同形态组)
|
||||
# 判据出处: design/ux/camp.md:45 (生涯页段——同壳同形态组)
|
||||
# 值断言归冒烟投影段与 ui_struct 结构族,此处只验开合路径与零跳转)----
|
||||
# 生涯页驱动=函数直调中间态(卡② mn10——careerbtn 已撤,卡④ 笔记本改挂前无 UI 路径)
|
||||
if true:
|
||||
@@ -640,7 +640,7 @@ func _ready() -> void:
|
||||
_run_modal_probes_once()
|
||||
_play_one_action()
|
||||
# ---- 预算耗尽收口(T17 硬锁批适配):选件变强后 probe 可能活过预算不再战败——断点段前提
|
||||
# oracle: design/ux/level-map.md:11 (主循环选路段——入口候选组)
|
||||
# 判据出处: design/ux/level-map.md:11 (主循环选路段——入口候选组)
|
||||
# (冒险终局面在案)须主动满足。收口驱动:任何停点层逐个推进(复用主循环分支语义)至
|
||||
# level_screen 选路停点→真实放弃二击→终局面。战斗中则继续 autoplay 打完。
|
||||
if not _done and not main.ui.modals.run.end_overlay.is_open():
|
||||
@@ -689,7 +689,7 @@ func _ready() -> void:
|
||||
_play_one_action()
|
||||
# 排播期/Waiting 等待态=自然流逝(演播秒级、锁随队列空解除)
|
||||
# T17 适配:战败或放弃二途皆达终局面(放弃=预算耗尽收口路径——见上),断点段前提不变。
|
||||
# oracle: design/gdd/systems/表现与支撑/存档序列化.md:180 (断点段——断点域与续玩组)
|
||||
# 判据出处: design/gdd/systems/表现与支撑/存档序列化.md:180 (断点段——断点域与续玩组)
|
||||
await get_tree().process_frame
|
||||
var bp_file := "user://smoke_click_probe_reset.json"
|
||||
var iso_chk = load("res://core/save_manager.gd").new(bp_file)
|
||||
@@ -721,7 +721,7 @@ func _ready() -> void:
|
||||
# ① 战斗收口断点写盘断言保留(上方——冒险流直调中间态 mn10)。
|
||||
|
||||
# ---- 大门两分支断言段(卡④ T5 接收——卡② 移交落点;V3 断言面)----
|
||||
# oracle: design/ux/camp.md:16 (大门段——点大门先出确认组)
|
||||
# 判据出处: design/ux/camp.md:16 (大门段——点大门先出确认组)
|
||||
# 驱动=营地场景根点选信号(真实路由)→组合根 _on_camp_object_pressed→确认弹窗。
|
||||
# 无断点=两出口(是/否);有断点=三出口(set_breakpoint 注入选路停点形——同下方开场行③先例)。
|
||||
# 判据绑可观测提交面:点大门不直接进冒险(is_adventure 翻转只在 confirmed 后);cancelled 恒=
|
||||
@@ -746,7 +746,7 @@ func _ready() -> void:
|
||||
await get_tree().process_frame
|
||||
# R4 位次真点(营地交互修复批——位次与语义绑定钉):真点前消费方前置读(gate_new 在册)→
|
||||
# 按类型定位按钮行 child(0) 全局矩形中心真点——位次若错接,此点命中「否」,下方主证(翻转)即红。
|
||||
# oracle: design/gdd/systems/表现与支撑/HUD框架.md:90 确认弹窗位次定值:推进在左、维持居右(R4 位次真点)
|
||||
# 判据出处: design/gdd/systems/表现与支撑/HUD框架.md:90 确认弹窗位次定值:推进在左、维持居右(R4 位次真点)
|
||||
if String(main._confirm_consumer) != "gate_new":
|
||||
_problems.append("R4 前置:确认消费方非 gate_new(分派面漂移)〔营地交互批 V3〕")
|
||||
var gate_row := _first_hbox(main.ui.modals.menu.confirm_dialog)
|
||||
@@ -761,7 +761,7 @@ func _ready() -> void:
|
||||
if String(main._confirm_consumer) != "":
|
||||
_problems.append("R4 主证:确认后消费方未清零〔营地交互批 V3〕")
|
||||
# 开局终态两钉(营地交互修复批——开始层隐藏收一处后的落点断言):
|
||||
# oracle: design/gdd/systems/冒险循环/关卡节点地图.md:78 关卡开始 → 呈现节点图选路停点(开局终态两钉)
|
||||
# 判据出处: design/gdd/systems/冒险循环/关卡节点地图.md:78 关卡开始 → 呈现节点图选路停点(开局终态两钉)
|
||||
# R1=确认后开始层不可见(被测改动特有提交面——修复前该句恒红=「开局被开始层盖住」缺陷本体);
|
||||
# R2=关卡画面(选路停点)在位(开局终态呈现面,与既有 is_adventure 断言同批缺一即红)
|
||||
if main.ui.screens.start_overlay.visible:
|
||||
@@ -865,10 +865,10 @@ func _ready() -> void:
|
||||
|
||||
|
||||
# ---- 模态/tooltip/刷新链一次性覆盖(真实信号路径驱动) ----
|
||||
# oracle: design/gdd/systems/表现与支撑/HUD框架.md:277 (模态/tooltip 段——遮挡与输入锁组)
|
||||
# 判据出处: design/gdd/systems/表现与支撑/HUD框架.md:277 (模态/tooltip 段——遮挡与输入锁组)
|
||||
|
||||
func _run_modal_probes_once() -> void:
|
||||
# oracle: design/gdd/systems/表现与支撑/HUD框架.md:277 (判定上报通道——验证函数组)
|
||||
# 判据出处: design/gdd/systems/表现与支撑/HUD框架.md:277 (判定上报通道——验证函数组)
|
||||
# ⓪ 玩家面文案真实入口断言(迭代36 卡A wa1——C 区两段头随战斗常驻)
|
||||
if not _tested_copy and main.ui.battle.info_panel != null and main.ui.battle.info_panel.visible:
|
||||
_tested_copy = true
|
||||
@@ -944,7 +944,7 @@ func _run_modal_probes_once() -> void:
|
||||
rnr.effective_ac(), int(rnr.gp)]
|
||||
if String(main.ui.modals.run.status_panel._attrs_label.text) != attr_expect:
|
||||
_problems.append("状态面板属性行投影失真(sv6②——期望 %s 实测 %s)" % [attr_expect, main.ui.modals.run.status_panel._attrs_label.text])
|
||||
# ③ _status_data() 直调对拍(sv7——键集恰八键+curios/feats 独立 oracle)
|
||||
# ③ _status_data() 直调对拍(sv7——键集恰八键+curios/feats 独立预期表)
|
||||
var sd: Dictionary = main.status_data()
|
||||
var keys := ["balance", "hero_hp", "max_hp", "atk", "ac", "gp", "curios", "feats"]
|
||||
var keys_ok: bool = (sd as Dictionary).size() == 8
|
||||
@@ -952,18 +952,18 @@ func _run_modal_probes_once() -> void:
|
||||
keys_ok = keys_ok and (sd as Dictionary).has(k)
|
||||
if not keys_ok:
|
||||
_problems.append("_status_data() 键集≠八键(sv7——实测 %s)" % str((sd as Dictionary).keys()))
|
||||
var oracle: Array = []
|
||||
var expected: Array = []
|
||||
for rec in rnr.treasure_inventory.query_inventory(Callable()):
|
||||
var rr: Dictionary = rec
|
||||
oracle.append({"name": String(main.db.crossrun.treasure_items.row_by_id(String(rr.get("item_id", ""))).get("display_name", "")),
|
||||
expected.append({"name": String(main.db.crossrun.treasure_items.row_by_id(String(rr.get("item_id", ""))).get("display_name", "")),
|
||||
"used": bool(rr.get("used", false))})
|
||||
var sd_curios: Array = (sd as Dictionary).get("curios", [])
|
||||
var curios_ok: bool = (sd_curios as Array).size() == (oracle as Array).size()
|
||||
var curios_ok: bool = (sd_curios as Array).size() == (expected as Array).size()
|
||||
if curios_ok:
|
||||
for i in (oracle as Array).size():
|
||||
curios_ok = curios_ok and String((sd_curios[i] as Dictionary).get("name", "")) == String((oracle[i] as Dictionary).get("name", "")) and bool((sd_curios[i] as Dictionary).get("used", false)) == bool((oracle[i] as Dictionary).get("used", false))
|
||||
for i in (expected as Array).size():
|
||||
curios_ok = curios_ok and String((sd_curios[i] as Dictionary).get("name", "")) == String((expected[i] as Dictionary).get("name", "")) and bool((sd_curios[i] as Dictionary).get("used", false)) == bool((expected[i] as Dictionary).get("used", false))
|
||||
if not curios_ok:
|
||||
_problems.append("_status_data().curios 对拍独立 oracle 失守(sv7——实测 %s vs %s)" % [str(sd_curios), str(oracle)])
|
||||
_problems.append("_status_data().curios 对拍独立预期表失守(sv7——实测 %s vs %s)" % [str(sd_curios), str(expected)])
|
||||
var feats_expect: Array = load("res://presentation/hud_presenter.gd").feat_holdings_lines(main.db, rnr.feats_held())
|
||||
if str((sd as Dictionary).get("feats", [])) != str(feats_expect):
|
||||
_problems.append("_status_data().feats 对拍 feat_holdings_lines 失守(sv7)")
|
||||
@@ -1045,7 +1045,7 @@ func _labels_with_text(labels: Array, needle: String) -> Array:
|
||||
|
||||
|
||||
func _play_one_action() -> void:
|
||||
# oracle: design/gdd/systems/排雷循环/排雷玩法.md:236 (判定上报通道——验证函数组)
|
||||
# 判据出处: design/gdd/systems/排雷循环/排雷玩法.md:236 (判定上报通道——验证函数组)
|
||||
var settlement = main.run_scope.settlement
|
||||
if settlement == null:
|
||||
return # 结算竞态防抖:battle_finished 与本轮动作调度同帧到达时 settlement 可能已被置空(基线既有噪声——加固)
|
||||
@@ -1086,7 +1086,7 @@ func _play_one_action() -> void:
|
||||
|
||||
|
||||
func _random_unknown_adjacent(minesweeper) -> Vector2i:
|
||||
# oracle: design/gdd/systems/排雷循环/排雷玩法.md:236 (判定上报通道——验证函数组)
|
||||
# 判据出处: design/gdd/systems/排雷循环/排雷玩法.md:236 (判定上报通道——验证函数组)
|
||||
var hero: Vector2i = minesweeper.hero_pos()
|
||||
var cands: Array = []
|
||||
for dy in range(-1, 2):
|
||||
@@ -1102,13 +1102,13 @@ func _random_unknown_adjacent(minesweeper) -> Vector2i:
|
||||
|
||||
|
||||
func _click_stop() -> void:
|
||||
# oracle: design/gdd/systems/排雷循环/行动经济.md:262 (判定上报通道——验证函数组)
|
||||
# 判据出处: design/gdd/systems/排雷循环/行动经济.md:262 (判定上报通道——验证函数组)
|
||||
# 停手走真实点击路径(AP 条「停手」钮 → 组合根 settle_batch——排雷玩法 D1×6① 回归载体)
|
||||
ProbeUiUtil.push_click(main, main.ui.battle.board_zone.ap_bar._btn_stop)
|
||||
|
||||
|
||||
# ---- T1 D1:锁期/重放断言(每 run 一次,脚本化场景——演播期豁免的断言化承载) ----
|
||||
# oracle: design/gdd/systems/排雷循环/排雷玩法.md:236 (锁期/重放段——拒绝与锁组)
|
||||
# 判据出处: design/gdd/systems/排雷循环/排雷玩法.md:236 (锁期/重放段——拒绝与锁组)
|
||||
# 锁期断言(排播队列活跃=锁面):注入封印击 → 直落被冻结不受理(封印未置)+ `_locked_click`
|
||||
# 缓存命中且为本注入(「最后一次」语义——注入帧内无并发点击)。
|
||||
# 重放断言(演播完边沿 pump_ended→_replay_locked_click 重入唯一动作通道):缓存清空 +
|
||||
@@ -1116,7 +1116,7 @@ func _click_stop() -> void:
|
||||
# 前提消失守卫:等重放期间出现停点层/战斗收场(注入时点恰逢终结演播)→ 静默弃测不计
|
||||
# problem(封印动作不杀伤,正常局不触发;断言实现形态取舍在代拍白名单内)。
|
||||
func _locktest_tick() -> void:
|
||||
# oracle: design/gdd/systems/排雷循环/排雷玩法.md:236 (判定上报通道——验证函数组)
|
||||
# 判据出处: design/gdd/systems/排雷循环/排雷玩法.md:236 (判定上报通道——验证函数组)
|
||||
if _locktest_state == 2:
|
||||
return
|
||||
var settlement = main.run_scope.settlement
|
||||
@@ -1173,7 +1173,7 @@ func _locktest_tick() -> void:
|
||||
|
||||
|
||||
func _locktest_pick_cell(minesweeper) -> Vector2i:
|
||||
# oracle: design/gdd/systems/排雷循环/排雷玩法.md:236 (判定上报通道——验证函数组)
|
||||
# 判据出处: design/gdd/systems/排雷循环/排雷玩法.md:236 (判定上报通道——验证函数组)
|
||||
var hero: Vector2i = minesweeper.hero_pos()
|
||||
for dy in range(-1, 2):
|
||||
for dx in range(-1, 2):
|
||||
@@ -1191,7 +1191,7 @@ func _locktest_pick_cell(minesweeper) -> Vector2i:
|
||||
# 断言两钉:①覆盖登记件停手键在场(零命中=驱动空转假绿,即红);②相位离开 Active(停手
|
||||
# 收轮)。前提消失守卫:点击后战局收场(终结演播竞态)→ 静默弃测不计 problem(正常局不触发)。
|
||||
func _stoptest_tick() -> void:
|
||||
# oracle: design/gdd/systems/排雷循环/排雷玩法.md:167 (停手=玩家主动收轮——判定上报通道)
|
||||
# 判据出处: design/gdd/systems/排雷循环/排雷玩法.md:167 (停手=玩家主动收轮——判定上报通道)
|
||||
if _stoptest_state == 2:
|
||||
return
|
||||
var settlement = main.run_scope.settlement
|
||||
@@ -1228,7 +1228,7 @@ func _stoptest_tick() -> void:
|
||||
|
||||
|
||||
func _stoptest_assert_hit() -> void:
|
||||
# oracle: design/gdd/systems/排雷循环/排雷玩法.md:167 (停手钮真输入命中登记——判定上报通道)
|
||||
# 判据出处: design/gdd/systems/排雷循环/排雷玩法.md:167 (停手钮真输入命中登记——判定上报通道)
|
||||
var stop_btn: Button = main.ui.battle.board_zone.ap_bar._btn_stop
|
||||
var stop_key := String(_recorder._node_keys.get(stop_btn.get_instance_id(), ""))
|
||||
if stop_key == "" or not _recorder._hits.has(stop_key):
|
||||
@@ -1236,7 +1236,7 @@ func _stoptest_assert_hit() -> void:
|
||||
|
||||
|
||||
func _first_hbox(node: Node) -> HBoxContainer:
|
||||
# oracle: design/gdd/systems/表现与支撑/HUD框架.md:90 (位次真点定位——R4 判据面辅助)
|
||||
# 判据出处: design/gdd/systems/表现与支撑/HUD框架.md:90 (位次真点定位——R4 判据面辅助)
|
||||
if node is HBoxContainer:
|
||||
return node
|
||||
for ch in node.get_children():
|
||||
@@ -1247,7 +1247,7 @@ func _first_hbox(node: Node) -> HBoxContainer:
|
||||
|
||||
|
||||
func _report_stall(st: Dictionary) -> void:
|
||||
# oracle: design/engineering/test-conventions.md:30 (判定上报通道——验证函数组)
|
||||
# 判据出处: design/engineering/test-conventions.md:30 (判定上报通道——验证函数组)
|
||||
var why := ""
|
||||
if st.phase == "Waiting":
|
||||
why = "结算停滞:Waiting 相位无推进(结算应同步走完——窗口段已删除)"
|
||||
@@ -1263,7 +1263,7 @@ func _report_stall(st: Dictionary) -> void:
|
||||
|
||||
|
||||
func _dump_state() -> void:
|
||||
# oracle: design/engineering/test-conventions.md:30 (判定上报通道——验证函数组)
|
||||
# 判据出处: design/engineering/test-conventions.md:30 (判定上报通道——验证函数组)
|
||||
var diag: Dictionary = main.run_scope.settlement.diagnostic_snapshot() # 诊断观测面(私有字段零直读)
|
||||
print(" node_index=%s round=%s phase=%s ap=%s rap=%s" % [
|
||||
str(main.run_scope.runner.node_index), str(main.run_scope.settlement.round_index),
|
||||
|
||||
Reference in new issue
Block a user