Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

skillopt-sleep: harvest checkpoint is keyed by project, so a second --source in the same project skips its unseen sessions

オープン
#312 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
64/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
backend

調査の方向性

Read cycle.py and the state methods last_harvest_for and set_last_harvest, then trace how the selected transcript source reaches the harvest call. The issue names both checkpoint write branches: the no-tasks branch and the normal end of a stateful run. Update checkpoint handling so each source retains its own cursor while existing state can still be read; reproduce with the mock backend and confirm the second codex dry-run finds its previously unseen sessions.

索引モデルが issue の本文から書いたものです。

説明

What happens

skillopt-sleep run stores one harvest checkpoint per project, whatever --source the run used. cycle.py reads state.last_harvest_for(project) before harvesting and calls state.set_last_harvest(project, started) after every stateful run (both the no-tasks branch and the normal end). So when one project is fed from several transcript sources, one night per source, every source after the first only sees sessions newer than the first run's start: its older, never-harvested sessions are skipped for good. Each source is a separate store with its own timestamps, so a single shared cursor cannot be right for all of them.

Repro (mock backend, isolated state, no model calls)

Version: main at 343db229dbd5ddaf9df6b1d5540d8bcdb2604d5c, installed with uv tool install "skillopt @ git+https://github.com/microsoft/SkillOpt", Python 3.14, macOS. --claude-home points the state at a scratch dir; P is an empty scratch project.

T=$(mktemp -d); mkdir -p $T/.claude $T/proj
common="--project $T/proj --scope all --backend mock --claude-home $T/.claude --progress"
skillopt-sleep dry-run $common --source codex   # harvest done: sessions=60
skillopt-sleep run     $common --source cursor  # stateful; sets last_harvest[$T/proj]
skillopt-sleep dry-run $common --source codex   # harvest done: sessions=0

(Our Codex sessions are CLI rollouts, so we pass --codex-home pointing at a dir whose archived_sessions/ symlinks ~/.codex/sessions/**/rollout-*.jsonl; see #282.)

The second codex dry-run harvests nothing although no codex session was ever harvested: it inherited the cursor run's checkpoint.

Expected

Each source keeps its own checkpoint.

Suggested fix

Key last_harvest by f"{project}::{transcript_source}" and fall back to the bare project key when reading existing state, or accept several --source values in one run so one checkpoint covers them together.

Workaround we use

A wrapper keeps one cursor per source in its own file and writes it into state.json before each per-source run.

主要言語
Python
スター
18.2k
フォーク
1.7k
平均マージ
4日 1時間
マージ済み PR(30日)
10

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/SkillOpt のほかの issue

microsoft/SkillOpt の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。