Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Workflow: sp run refreshes the code snapshot before the lock; re-clean erases exposure tombstones; missing run-dir undetected

未关闭
#958 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@cailmdaley 已经在做这个了。

开始于 2026年10月10日。

  • #960 来自 @cailmdaley —— 未关闭

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
python, shell
领域
backend, devops

调研方向

Start by reading workflow/bin/sp around line 262 and the Snakemake lock behavior, then inspect workflow/scripts/clean_exposure.py around lines 58–80 and workflow/scripts/completeness.py around lines 405–406. Reproduce each reported failure and compare clean_exposure.py with the tombstone merge in clean_tile.py. Done means all three defects are fixed and covered by checks for repeated runs, repeated cleaning, and a missing run directory.

由索引模型根据 Issue 内容生成。

描述

Three workflow defects found while rewriting the workflow's comments (comment sweep, PR to follow). Each was confirmed against develop (f2ab8a56) by a second reader; none is fixed by the sweep, which changes no code.

1. sp run refreshes the campaign's code snapshot before Snakemake takes its lock — workflow/bin/sp:262. snapshot_code rsyncs the checkout into $STATE_DIR/code unconditionally, before either Snakemake invocation, including for sp run -n. A second sp run (or a dry run) against a live campaign therefore overwrites the code that its queued and running jobs re-read when they start, and only afterwards does Snakemake refuse on its lock. This defeats the snapshot's purpose (keeping mid-campaign edits away from running jobs). A fix probably belongs in bin/sp: take or test Snakemake's lock first, or snapshot into a fresh directory per launch.

2. Re-cleaning a reclaimed exposure erases its tombstone's stage records — workflow/scripts/clean_exposure.py:58–80. The record starts as {}, is filled only from the manifests currently on disk, and replaces the existing tombstone without reading it. On an exposure already reclaimed (its manifests gone) a second clean writes an empty record. clean_tile.py already merges into the prior tombstone; clean_exposure.py should do the same.

3. completeness.py cannot detect a missing run directory — workflow/scripts/completeness.py:405–406. With neither --run-dir nor SP_RUN, Path("") becomes ., so if not str(run_dir) never fires and the check runs against the current directory instead of raising its configuration error. Validate the raw setting before converting it to a Path.

Claude (Opus) and GPT-6.1 Sol on behalf of Cail.

主要语言
Python
星标
18
派生
14
平均合并
2 天 13 小时
30 天内合并 PR
35

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

CosmoStat/shapepipe 的其他 Issue

查看 CosmoStat/shapepipe 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。