fix(deploy): 兼容 HiFox 确认事件跨秒写入
build / build (push) Successful in 1m29s

任务更新时间与状态事件分别写入,允许小幅时间偏差。
仍以最近事件验证操作者,并要求验收证据早于两条时间记录。
This commit is contained in:
姚章浩
2026-11-23 03:01:42 +08:00
parent 71971e8164
commit 084ee1b176
2 changed files with 12 additions and 3 deletions
+1
View File
@@ -150,6 +150,7 @@ class ProductionCD(unittest.TestCase):
def test_hifox_dispatch_claims_one_transition(self):
task, timeline = self.hifox_fixture()
timeline[-1]['createdAt'] = '2026-11-22T18:00:01Z'
cd.atomic_write(self.root / 'active-since', b'2026-11-22T17:55:00Z\n')
with patch.object(trigger, 'hifox', side_effect=[task, timeline, task, timeline]), \
patch.object(trigger, 'forge', return_value={'workflow_run_id': 42}) as dispatch: