UK staging lease (4 h) is shorter than the qualify job's 330-minute limit
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Read stage_attempt and attempt_is_recoverable in src/policyengine/provenance/uk_qualification.py, then inspect the recovery cases in tests/test_uk_qualification_pipeline.py. Update the lease to at least six hours, preferably as a named constant tied to the qualify timeout, and adjust the listed expiry tests, including the 10:00 → 14:00 assertion. Done means a live attempt remains recoverable throughout the 330-minute qualify limit and the recovery tests reflect the new lease.
由索引模型根据 Issue 内容生成。
描述
Found in the independent review of #660.
stage_attempt writes expires_at = staged + timedelta(hours=4) (src/policyengine/provenance/uk_qualification.py, about line 1102). attempt_is_recoverable treats an expired attempt as abandoned even while its owner run is live, unless replay/request.json exists, and qualify writes that file only after the gates finish. The lease dates from when qualify had 120 minutes, so it was twice the limit. #660 raises qualify to 330 minutes, which makes the lease shorter than the limit.
Effect: if the gates ever run between about 240 and 330 minutes, the next catch-up re-stages a live attempt. That force-pushes a new candidate commit, un-readies the PR and queues a duplicate qualification. It's churn, not a deadlock. Today's gates are projected at about 140 minutes, so this doesn't trigger now.
Fix: raise the lease to at least 6 hours, ideally as a named constant tied to the qualify timeout. Update the 15 recovery tests in tests/test_uk_qualification_pipeline.py that stage at T and evaluate expiry at T+4–5 h (e.g. test_newer_abandoned_stage_recovers_despite_an_older_replay_request, test_forced_stage_recovery_binds_the_terminal_receipt_it_supersedes[*], test_resolution_preserves_authorization_to_recover_forced_work[expired-*], test_runs_resolved_on_different_main_commits_never_both_stage, test_cross_base_recovery_allocates_new_keys_without_overwriting_evidence), plus test_stage_records_owner_and_expiry_immutably, which pins 10:00 → 14:00.
- 主要语言
- Python
- 星标
- 8
- 派生
- 10
- 平均合并
- 23 小时 16 分钟
- 30 天内合并 PR
- 49
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
PolicyEngine/policyengine.py 的其他 Issue
-
Raise the simulation cache memory warning to 16 GiB可能已有人在做 @anth-volk 于 20 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
PolicyEngine/policyengine.py#549 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
PolicyEngine/policyengine.py#473 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
PolicyEngine/policyengine.py#436 · 1 条评论 ·
维护者通常 1 天内回复
-
Certify populace-uk as the UK certified default可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
PolicyEngine/policyengine.py#408 ·
维护者通常 1 天内回复
-
enhancement low-priority
难度 5/5 一周以上 新手友好度 25/100
PolicyEngine/policyengine.py#667 ·
维护者通常 1 天内回复
查看 PolicyEngine/policyengine.py 的全部 Issue
相似的 Issue
-
changelog investigate
难度 2/5 1-3 小时 新手友好度 65/100
ramnes/notion-sdk-py#423 ·
-
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 89/100
duckdb/duckdb-web#7514 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
jbacalso24/mimry#525 ·
维护者通常 1 天内回复