fix: address codex+gpt-5.5 review findings
- harvest: tighten sub-3s filter to also require prompt < 200 chars, avoiding false positives on fast real one-shot questions - openclaw schedule_cmd: add docstring clarifying it schedules the shared engine, not the OpenClaw-native runner Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -208,7 +208,12 @@ def reject(night: str = None) -> int:
|
||||
|
||||
|
||||
def schedule_cmd(hour: int, minute: int) -> int:
|
||||
"""Install a nightly cron entry via the shared SkillOpt-Sleep scheduler."""
|
||||
"""Install a nightly cron entry via the shared SkillOpt-Sleep scheduler.
|
||||
|
||||
Note: this schedules the shared engine (``python -m skillopt_sleep run``),
|
||||
not the OpenClaw-specific ``run_sleep.py``. Use ``run_sleep_cron.sh`` if
|
||||
you need the OpenClaw-native backend and category task files instead.
|
||||
"""
|
||||
try:
|
||||
from skillopt_sleep.scheduler import schedule
|
||||
except ImportError:
|
||||
|
||||
@@ -148,8 +148,11 @@ def _is_headless_replay(digest: "SessionDigest") -> bool:
|
||||
for marker in _REPLAY_PROMPT_MARKERS:
|
||||
if marker in prompt:
|
||||
return True
|
||||
# Sub-3-second single-turn sessions are almost certainly programmatic.
|
||||
if digest.started_at and digest.ended_at:
|
||||
# Sub-3-second single-turn sessions with short prompts are almost
|
||||
# certainly programmatic (engine grader/judge calls). We require the
|
||||
# prompt to also be short (<200 chars) to avoid false-positives on
|
||||
# real one-shot questions that Claude happens to answer quickly.
|
||||
if digest.started_at and digest.ended_at and len(prompt) < 200:
|
||||
try:
|
||||
fmt = "%Y-%m-%dT%H:%M:%S"
|
||||
start = datetime.strptime(digest.started_at[:19], fmt)
|
||||
|
||||
Reference in New Issue
Block a user