Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#312 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
64/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python
Área
backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
18.2k
Forks
1.7k
Merge medio
4 d 1 h
PR fusionados (30 d)
10

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de microsoft/SkillOpt

Todos los issues de microsoft/SkillOpt

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.